How does the search engine ad billing system defend against malicious clicks?

Source: Internet
Author: User

When you search for "Chuan Zhi podcast" and "Java training" on some search engines, you will see some ad links. As long as you click on these ad links, this will consume the cost of the AD publishers. The ad publishers must pay the corresponding advertising fee for this click. Some people want to consume their competitor's advertising funds and fight against them by clicking the ad link of their competitors on the search engine, can such clicks bring great economic losses to competitors? In fact, such click-by-click operations do not have a great impact on advertising publishers. This is like a merchant distributing leaflets on the street. There must be a lot of leaflets that are wasted, as long as the whole package of leaflets is not directly thrown into the recycle bin by the dispatch personnel, the final advertising effect of sellers can still achieve their expected goals.
Someone may think of repeatedly clicking on the competitor's advertisement to consume a lot of the competitor's advertising fees, so that the competitor's advertising plans will fail! This idea is obviously too simple, because not only do you have it, but many people have it. Of course, search engine manufacturers will also consider it and take some technical measures to prevent it. Even if you use dynamic dialing to access the Internet and constantly change the IP address, a computer can click the same ad link no matter how many times in a day, A good search engine will only charge 1 or 2 clicks for this in the background.
People familiar with Web website development technologies should be clear that the search engine's backend billing system identifies whether it is accessed from the same computer. This relies on cookies, we only need to clear the cookie of the browser and add dynamic dialing to change the IP address method to repeatedly search for a keyword and click the ad link on the search result page, the search engine's backend billing system considers these ad clicks as from multiple computers, and charges for each click. If you use artificial methods to repeat these actions, as long as you persevere, it will certainly bring a great deal of advertising economic losses to your competitors. However, when you cause these losses to your competitors, you also need to spend a lot of energy and carefully calculate an account, and you will find that this is a completely "destroy the enemy three thousand, self-loss 10 thousand" method, the final winner is only the search engine manufacturer. However, if someone writes the so-called "Search Engine ad click robot" to repeat these manual operations, it may consume a large amount of advertising fees for sellers, so that sellers do not dare to put ads on the search engine, in the end, it will cause great losses to the advertisement business of search engine manufacturers. Therefore, a good advertisement billing system for search engines must be able to effectively prevent malicious clicks, so that sellers can place advertisements on their search engine platforms with confidence.
To learn how the ad billing systems of various search engines defend against malicious clicks and evaluate their effectiveness, I conducted code analysis and testing on some ad billing systems of some search engines. After compiling a "Search Engine ad click robot" and a large number of tests and verifications, I finally learned about the anti-malicious click principle of some well-known search engine ad billing systems, most of the time is spent on testing and waiting for the results, because the search engine's backend billing system is not billed immediately when a click occurs, but the click fee for each query of a keyword, it only counts the clicks that occurred one hour ago. To see whether the search engine's backend billing system bills the clicks triggered by the "Search Engine ad click robot", we need to purchase promotion keywords for research on the search engine advertising platform, each time you modify the ad click bot program and run it, you must wait for more than one hour to verify the result. Only after the search engine's backend billing system does deduct the advertising fee for these keywords, we can determine that the "Search Engine ad auto-click robot" program is successful, and we must perform a high-intensity test, only in this way can we check whether such a "Search Engine ad click robot" is harmful. It may take several hundred yuan for the trial and testing!
Through repeated tests of the "Search Engine ad click robot", I found that some search engine backend billing systems are still very good at preventing malicious clicks, even if you use automation tools such as "Search Engine ad click robot", you cannot effectively consume the advertising fees that make the seller heartache, because most search engine backend billing systems are not billed in real time, they have limits on the total number of clicks that occur for a keyword within a unit of time, it will count the total number of CLICKS For a keyword in the previous period. If the total number of clicks is large, it will far exceed the statistical number in the previous year-on-year period, A good search engine backend billing system will deduct the excessive clicks based on a certain algorithm. You can only lower the click frequency of the "Search Engine ad click robot", but the click frequency is too low. This "Search Engine ad auto click tool" has no practical value, if the click frequency is too high, it will be regarded by the search engine's backend billing system as a malicious click and will be voided for a long time! The number of clicks is appropriate. Obviously, it takes a lot of time to experiment with your own advertising fee. Those good search engine backend billing systems are so intelligent that even if you can call one thousand people to click an ad link on some search engines at the same time, it is futile, because a good search engine background billing system will invalidate this! It is impossible for you to write out the "Search Engine ad click robot" that has practical significance after you spend a lot of energy ".
For those good search engine back-end billing systems, you no longer worry that advertising on them will lead to a large number of malicious clicks, but you can implement your company's advertising promotion plan with confidence. Although the search engine ad auto-click tool is not very practical, it is very challenging and interesting to study and compile the "Search Engine ad click robot" program, it involves a lot of technical details and skills. I will share these technical details and skills with you below:
(1) Use the httpclient open source toolkit to access a keyword search URL on a search engine, such as, http://www.itcastsoso.com/s? WD = % B4 % AB % D6 % C7 % B2 % a5 % BF % Cd.
(2) Use httpparser open-source toolkit to analyze the search result pages returned by the search engine and extract the ad links on the left and in the middle.
(3) use the httpclient open-source toolkit to access the extracted ad link and save the result content of each link as an HTML file to confirm that the webpage with the ad link is obtained. Here, we need to share the cookie information in step (1) and the URL address in step 1 as a referer, which is generally considered by the search engine's backend billing system to be accessed by the same browser.
(4) Repeat steps 1, 2, and 3, instead of directly accessing the address in step 2, because a good search engine changes the URL of the AD link of a keyword each time, that is to say, the address of an ad link is one-time. After accessing the link, you must search for keywords again and obtain the new ad link address on the new result page.
(5) After writing the above program, the running effect seems to be perfect on the surface. However, does the search engine's backend billing system actually charge for this simulated click access? You need to purchase some partial keyword advertisements for your website on a search engine. It is certain that almost no one clicks these partial keywords, then run the newly compiled "Search Engine ad click robot" program and let it click our ad link several times. After two hours, check whether the search engine's backend billing system is billed. The results show that although we get the ad link address from the search results page and access the ad page corresponding to the ad link address, the search engine's backend billing system does not charge for this! If you are billed, the search engine's backend billing system is also too bad, and merchants must not place ad advertisements on such search engines.
(6) move out of the HTTP listening tool httpwatch and check what information the browser sends to the server when accessing the ad URL, because these hyperlinks use the target = "_ blank" attribute, clicking these hyperlinks always opens a new window, And the HTTP message in the new window cannot be monitored by the opened httpwatch. Using Firefox and firebug plug-ins for monitoring remains fruitless! Finally, I had to move out of a more professional and powerful network listening tool. I found a tool called effetech httpsnifer and finally listened to the HTTP message of the AD link address, the ad link address that the browser finally accessed is not the original address specified by the href attribute of the <a href = ""/> tag on the search result page, instead, a special message is appended to this address, for example, the Code for the hyperlink tag in the web page is href = "http://www.itcastsoso.com/souso.php? Url = xxxxxxxxxx ", while the browser actually sends the Request Path to" http://www.itcastsoso.com/souso.php? Url = XXXXXXXXX & ck = 645.0.125.295.105.383.115.2563 ", with an additional CK parameter! How is this CK parameter appended?
(7) This must have triggered the JavaScript function when we click the ad link address in the browser. The JavaScript function modified the hyperlink address and appended it! When accessing the ad link address, our own "auto-click robot for search engine ads" program must also append the ck = 645.0.125.295.105.383.115.2563 parameter to simulate the effect of clicking a hyperlink. The value after the CK parameter is not fixed, but calculated by some algorithm. Do we have to use a Java program to write such an algorithm tool and method? Let's take a look at how this JavaScript function is written! View the JavaScript source code on the search results page of the search engine. These JavaScript codes are usually arranged in one line, which is too difficult to read. Of course, the search engine manufacturer is eager to let us understand it! It doesn't matter. Copy the code to the JS file in myeclipse and format it with CTL + Shift + F. The code is neatly arranged, this kind of tool software can also help you at critical moments!
(8) I have probably understood the functions and main code of all of the JavaScript Functions, but I am not sure about the detailed algorithms in the functions, be sure to clearly identify the things that must be understood and which ones are negligible. Are these JavaScript Functions transplanted into corresponding Java code, or are these existing JavaScript Functions directly called using Java code? The latter is obviously more convenient and easier. Can Java code call JavaScript code? It seems that Java 6 has provided such a new function. You can search and confirm it on the Internet. You can open the help document of Java 6 and learn how to call JavaScript. Then, the JavaScript code in the keyword search result webpage is slightly modified to be suitable for calling Java code. The main reason is that some variables are used in the original JavaScript to record mouse clicks and the mouse pops up, set the coordinates and time of the mouse clicks to simulate the variables.
(9) run the modified "Search Engine ad click robot" again and let it click our ad link several times, two hours later, check whether the search engine's backend billing system is billed. The results showed that our program indeed modified the ad link address and accessed the ad page corresponding to the ad link address. However, the search engine's backend billing system may not be charged for this, so it is depressing! I want to give up. After all, I have been busy for several days. Is it so fruitless? Don't be reconciled. Please be brave and continue to study and experiment. Come and say "come on" to yourself. Just play!
(10) Move out of sniffer again, use the search engine to search for our promotional keywords, click an advertisement hyperlink, and use sniffer to listen to the entire process to see which requests the browser sends to the server, and the composition format of each request message. It is found that when a keyword is searched on the search engine, the result page also uses JavaScript code to hide a tag that does not know what to do, these tags do not display real images, but reference a program on the search engine server. This is the watermark or hidden number left by the search engine on the search results page, this watermark must be available first, and the subsequent click access can be valid? Let's try again later! Modify the "Search Engine ad click robot" program so that it can generate the link address of the tag and send an access request after sending an access request for a search keyword and a result page. Start the modified "Search Engine ad click robot" program and let it click our ad link several times. After two hours, check whether the search engine's backend billing system is billed. The billing result is usually displayed! Finally succeeded!
You may ask, is it a coincidence that the billing results are displayed? Some netizens search for these keywords and click the ad link through the search engine? Is the billing result really from our "Search Engine ad click robot" program? This is a good question. We only need to compare the Website access statistics tools on the home page of our site to know the results. If the keyword is clicked in a normal browser, when parsing the homepage of a promotion site, the browser also accesses the label embedded in the Website access statistics Tool on the page. The website access statistics tool embedded in the homepage records the access process, however, our "Search Engine ad click robot" program does not parse the content of the homepage of the promotion site, and the website access statistics Tool on the homepage will not record it. Therefore, if the search engine's back-end billing system is billed, and the website access statistics Tool on the website homepage is not recorded, this must be the result of clicking "Search Engine ad click robot. For the sake of rigor, we can use the "Search Engine ad click robot" program to test the number of times, and find that every time we are billed.
(11) using the "Search Engine ad click robot" to complete several clicks only indicates that the program logic is passed, however, it cannot be confirmed whether it is of practical value or deterrent to competitors. The "Search Engine ad click robot" program must have at least 50 clicks within an hour, in order to cause a heavy blow to the competitor's advertising promotion plan. To confirm whether the plan is feasible, you must first experiment with yourself and open up hundreds of dollars in advertising fees so that the "Search Engine ad click robot" program can be clicked 50 times per hour, let's see how much we can spend on advertising when we were young. As a result, after several hours, the search engine's back-end billing system also deducts more than a dozen clicks. It seems that even if every request sent by our "Search Engine ad click robot" is efficient for the search engine's backend billing system, such requests are too regular or too frequent, A good search engine's backend billing system will invalidate them during billing statistics!
(12) How can I be reconciled if all the program logic is finished, but it cannot bring great practical value? Let's make some final efforts with luck! First, modify the fixed click frequency of the "Search Engine ad click robot" program, and let the "Search Engine ad click robot" program re-dial each time and change the IP address, only one simulated search and one-click access is sent. After a random period of time is paused, the user can re-dial and change the IP address, and then send the next simulated search and one-click access, in addition, if a keyword contains multiple promotion links, the ad link you clicked last time is not the same link as the ad link you clicked next time, instead, multiple ad links are followed in sequence. After such a process repeats three to seven times, three to seven times are also calculated randomly, and a long random time is paused, in this way, there is no rule to follow for every simulated search and click of the "Search Engine ad click robot" program. In addition, the program cannot access the ad link of a certain keyword all the time. Instead, it needs to perform Alternate access between AD links on several keyword search pages. For example, first, access the first link in all the ad links of the "Chuanzhi podcast" keyword, and then access the first link in all the ad links of the "Java training" keyword, go back to the second link in all the ad links of the "Chuanzhi podcast" keyword, and then access the second link in all the ad links of the "Java training" keyword, recurrence ......, the use of mutex multithreading technology can solve this problem well.
(13) various exceptions may occur during repeated running of the program, especially problems such as deadlocks in the program. It is very difficult to find out the bug. To facilitate Error Tracking and troubleshooting, use the log4j open-source toolkit for logging.

The final statement:
This article and subsequent source code and video tutorials are only used for technical research and communication, and we hope that the majority of learners will not use them for commercial purposes, in particular, it cannot be used to combat competitors and consume competitor advertising funds. Otherwise, I will not be responsible for any legal disputes arising therefrom!
In addition, the ultimate goal of this article and subsequent video courses is to teach you network programming technology and problem-solving analysis skills, as long as the search engine's backend billing system adjusts the advertising algorithm, the program we teach will no longer work. However, as long as you study the techniques and steps described in this article, you will be able to write the corresponding "Search Engine ad click robot" program. This is like learning to write a antivirus program for a virus. This program does not work for a new virus, but as long as you study the new virus, then, according to the original method of writing anti-virus programs, we will be able to write anti-virus programs for new viruses.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.