WO2020073374A1 - 一种广告防屏蔽的方法和装置 - Google Patents

一种广告防屏蔽的方法和装置 Download PDF

Info

Publication number
WO2020073374A1
WO2020073374A1 PCT/CN2018/112682 CN2018112682W WO2020073374A1 WO 2020073374 A1 WO2020073374 A1 WO 2020073374A1 CN 2018112682 W CN2018112682 W CN 2018112682W WO 2020073374 A1 WO2020073374 A1 WO 2020073374A1
Authority
WO
WIPO (PCT)
Prior art keywords
url
webpage
level
script
content
Prior art date
Application number
PCT/CN2018/112682
Other languages
English (en)
French (fr)
Inventor
朱易辰
陈伟军
Original Assignee
网宿科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 网宿科技股份有限公司 filed Critical 网宿科技股份有限公司
Priority to EP18936861.6A priority Critical patent/EP3863252A4/en
Priority to US16/485,691 priority patent/US11477158B2/en
Publication of WO2020073374A1 publication Critical patent/WO2020073374A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2596Translation of addresses of the same type other than IP, e.g. translation from MAC to MAC addresses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history
    • G06Q30/0256User search
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0277Online advertisement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0242Determining effectiveness of advertisements
    • G06Q30/0244Optimization
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/604Address structures or formats
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • H04L63/0421Anonymous communication, i.e. the party's identifiers are hidden from the other party or parties, e.g. using an anonymizer

Definitions

  • the invention relates to the technical field of the Internet, in particular to a method and device for preventing advertisements from being blocked.
  • the webpage content of a webpage is generally composed of resources such as text, pictures, and videos.
  • the browser loads the webpage content, it can initiate an access request to the URL (Uniform Resource Locator) of these resources to obtain the above resources.
  • the advertisement blocking plug-in can identify the above URL to be accessed by the browser. If the URL is identified as an advertisement URL, the advertisement blocking plug-in can prevent the browser from accessing the URL, resulting in the browser being unable to obtain the corresponding advertisement content. Therefore, the advertisement cannot be displayed. There is an urgent need for an anti-blocking method for advertisements with better effects and lower costs.
  • embodiments of the present invention provide a method and device for preventing advertisements from being blocked.
  • the technical solution is as follows:
  • a method for preventing advertisements includes:
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting of various levels of URLs in the webpage content to corresponding anti-shielding URLs based on a preset encryption algorithm includes:
  • the advertisement anti-blocking script detects that the webpage script initiates a third access request to the multi-level URL
  • the multi-level URL is rewritten as the third access request based on a preset encryption algorithm as
  • the corresponding anti-blocking URLs include:
  • the advertisement anti-blocking script detects that the webpage script initiates a third access request to the multi-level URL, based on a preset blocking rule base, determine whether the multi-level URL is a blocked URL;
  • the advertising URL keywords in the multi-level URL are encoded and obfuscated in the third access request to generate a corresponding anti-shield URL.
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting of various levels of URLs in the webpage content to corresponding anti-shielding URLs based on a preset encryption algorithm includes:
  • the webpage script in the webpage content is loaded, and based on a preset encryption algorithm, the multi-level URL recorded by the webpage script is rewritten to a corresponding anti-shield URL.
  • the rewriting of the multi-level URL recorded by the webpage script to the corresponding anti-blocking URL based on a preset encryption algorithm includes:
  • the advertisement URL keywords in the multi-level URL recorded by the webpage script are encoded and confused based on a preset encryption algorithm to generate a corresponding anti-shield URL.
  • the rewriting of the first-level URL in the webpage content to the corresponding anti-shield URL based on a preset encryption algorithm includes:
  • the advertisement URL keywords in the first-level URL in the webpage content are encoded and obfuscated to generate a corresponding anti-shield URL.
  • a device for preventing advertisements includes:
  • An obtaining module configured to receive the first access request of the terminal to the target webpage and obtain the webpage content of the target webpage
  • a rewriting module configured to rewrite all levels of URLs in the webpage content into corresponding anti-shield URLs based on a preset encryption algorithm, and return the rewritten webpage content to the terminal;
  • a restoration module configured to restore the anti-blocking URL to the corresponding URLs at all levels based on a preset decryption algorithm when receiving the second access request of the terminal to the anti-blocking URL;
  • the return module is used to obtain the resources pointed to by the URLs at all levels and return the resources to the terminal.
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting module is specifically used for:
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting module is specifically used for:
  • the webpage script in the webpage content is loaded, and based on a preset encryption algorithm, the multi-level URL recorded by the webpage script is rewritten to a corresponding anti-shield URL.
  • the rewriting module is also used to:
  • the advertisement URL keywords in the multi-level URL recorded by the webpage script are encoded and confused based on a preset encryption algorithm to generate a corresponding anti-shield URL.
  • the rewriting module is also used to:
  • the advertisement URL keywords in the first-level URL in the webpage content are encoded and obfuscated based on a preset encryption algorithm to generate a corresponding anti-shield URL.
  • an edge server in a third aspect, includes a processor and a memory.
  • the memory stores at least one instruction, at least one program, code set, or instruction set.
  • the at least one instruction, the at least one A program, the code set or the instruction set is loaded and executed by the processor to implement the method for preventing advertisements as described in the first aspect.
  • the first access request to the target webpage by the terminal is received to obtain the webpage content of the target webpage; based on a preset encryption algorithm, all levels of URLs in the webpage content are rewritten to corresponding anti-shield URLs, and the rewritten The webpage content is returned to the terminal; when receiving the terminal's second access request to the anti-blocking URL, the anti-blocking URL is restored to the corresponding URLs at all levels based on a preset decryption algorithm; the resources pointed to by the URLs at various levels are obtained and the resources are returned to terminal.
  • the edge server or proxy server can be used to modify the cached webpage content.
  • the cache server or proxy server can change all levels of URLs in the webpage content, including advertising URLs. , Rewritten to a URL that the ad blocking plugin does not recognize, and then when the terminal subsequently accesses the rewritten URL in the web page content, the ad blocking plugin can be disabled, so that the edge server or proxy server can receive the rewritten URL, Then, the rewritten URL is restored to the original URLs at all levels, and then the edge server or proxy server can obtain the resources pointed to by the original URLs at all levels, such as advertising resources, and return them to the terminal, so that the terminal can display advertisements normally.
  • the edge server or proxy server it is not necessary to modify the original internal processing logic of the website provider's website, which effectively reduces the cost of the website provider's advertisement anti-blocking.
  • FIG. 1 is a schematic diagram of a network scenario provided by an embodiment of the present invention.
  • FIG. 2 is a flowchart of a method for preventing advertisements provided by an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a device for preventing advertisements provided by an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an edge server according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for preventing advertisements.
  • the execution subject of the method may be an edge server or a proxy server, and the edge server or the proxy server may be any cache server in a CDN (Content Delivery Network) cluster.
  • It can receive any terminal (such as a smartphone, tablet) access request to a webpage, and then based on the access request, the cached webpage content of the webpage can be returned to the terminal; if the webpage content of the webpage is not cached ,
  • the edge server or the proxy server may obtain the webpage content of the webpage from the source site (website provider), and then return the acquired webpage content of the webpage to the terminal.
  • the corresponding network scenario can be shown in Figure 1.
  • the foregoing edge server may include a processor, a memory, and a transceiver.
  • the processor may be used to perform advertisement anti-shield processing in the following process
  • the memory may be used to store data required and generated data in the following process.
  • the transceiver It can be used to receive and send the relevant data in the following process.
  • the execution subject is an edge server, and the case where the execution subject is a proxy server is similar, and will not be repeated one by one.
  • Step 201 Receive a terminal's first access request to the target webpage, and obtain the webpage content of the target webpage.
  • the user when a user wants to access a webpage (which may be called a target webpage), the user can open a pre-installed browser program on any terminal, and then enter the target webpage in the input box of the browser program URL.
  • the browser program may initiate an access request to the target webpage based on the web address input by the user (which may be referred to as a first access request).
  • the terminal may send the first access request to the edge server serving the terminal.
  • the edge server may receive the first access request of the terminal to the target webpage, and then, the edge server may obtain the webpage content of the target webpage according to the first request.
  • the above-mentioned webpage content may be HTML (HyperText Markup Language, Hypertext Markup Language) content
  • the HTML content may include various tags of webpage codes and tag images, videos and other resources, such as link tags and scripts.
  • Tags, img (picture) tags, etc., the src (source, resource) attribute or href (Hypertext Reference, specified hyperlink target) attribute of each tag can record the URL of the corresponding resource, and the corresponding URL can be obtained by accessing the URL Resources.
  • Step 202 Based on a preset encryption algorithm, rewrite all levels of URLs in the webpage content to corresponding anti-shield URLs, and return the rewritten webpage content to the terminal.
  • the advertisement blocking plug-in when the browser initiates the access request to a certain URL, the advertisement blocking plug-in can combine the blocking rules that record various keywords of the advertisement URL Library, to identify the URL in the above access request in units of characters. If the URL keyword of the advertising category recorded in the blocking rule library is identified, the ad blocking plugin can intercept the above access request, if the blocking rule library is not identified If the recorded URL keyword of the advertisement type, the advertisement blocking plug-in can allow the browser to access the URL.
  • the edge server can encrypt all levels of URLs in the webpage content based on a preset encryption algorithm, for example, advertising Type URL keywords to encode and obfuscate, and generate corresponding anti-blocking URLs to achieve the purpose of being unrecognized by advertisement blocking plugins.
  • the various levels of URLs in the webpage content may include first-level URLs and multi-level URLs.
  • the first-level URLs may be URLs recorded in the webpage content, such as the URLs recorded in the src attribute or href attribute of the above tags; multi-level URLs may be The URL recorded by the webpage script in the webpage content.
  • This URL is usually recorded in the script content of the webpage script, but not recorded in the webpage content.
  • the webpage script may be a front-end script or an ad network script added by the website provider. When running, you can call the browser to access the URL (that is, multi-level URL) recorded in the webpage script. After that, the edge server can return the rewritten webpage content to the terminal.
  • the above preset encryption algorithm may be a common encryption algorithm, such as DES (Data Encryptin Standard, symmetric encryption standard) algorithm, AES (Advanced Encryptin Standard, advanced encryption standard) algorithm, the above preset encryption algorithm may also be Custom encryption algorithm.
  • a multi-level URL among various levels of URLs can be rewritten at the terminal through an advertisement anti-blocking script.
  • part of the processing in step 202 can be as follows: based on a preset encryption algorithm The first-level URL in the content is rewritten to the corresponding anti-blocking URL; and, an advertisement anti-blocking script is added to the web page content, so that the advertising anti-blocking script detects that the web page script initiates the third access request to the multi-level URL based on the pre- Let the encryption algorithm rewrite the multi-level URL into the corresponding anti-shield URL in the third access request.
  • the URLs at all levels include the first-level URL recorded in the webpage content and the multi-level URL recorded by the webpage script in the webpage content.
  • the first-level URL is configured in advance by the website provider and recorded in the webpage content. Therefore, when the edge server obtains the webpage content of the target webpage, it can directly rewrite the first-level URL.
  • the multi-level URL it is not recorded in the web page content, but after the browser loads the web page script in the web page content, it is obtained by the web page script, and then the multi-level URL can be rewritten.
  • the advertisement of the target webpage can be provided by the affiliate network.
  • the website provider only needs to add the URL of the affiliate network script developed by the affiliate network to the webpage content to complete the advertisement access.
  • the above ad alliance script can be obtained and run from the corresponding server of the ad alliance, and then, the ad alliance script can be initiated based on the multi-level URL of the ad class pre-recorded in the script content.
  • the ad alliance script can be initiated based on the multi-level URL of the ad class pre-recorded in the script content.
  • call the browser to obtain the corresponding advertisement class resource to complete the loading of the advertisement.
  • the edge server can add an advertisement anti-blocking script to the web page content to rewrite the above multi-level URL.
  • the advertisement anti-blocking script can detect the content of the script initiated by the web page script
  • the third access request of the multi-level URL is recorded, and the multi-level URL can be rewritten before the web script calls the browser to obtain the corresponding resource corresponding to the above multi-level URL.
  • the edge server may rewrite the first-level URL in the webpage content to the corresponding anti-shield URL based on a preset encryption algorithm.
  • the edge server may add an advertisement anti-blocking script to the webpage content, and then return the webpage content to which the advertisement anti-blocking script is added to the terminal.
  • the advertisement anti-blocking script can detect whether the webpage script initiates the third access request for the multi-level URL recorded in the script content, when the webpage is detected
  • the advertisement anti-blocking script may be based on a preset encryption algorithm, and the multi-level URL is rewritten to the corresponding anti-blocking URL in the third access request, and then the webpage script may call the browser Access the anti-blocking URL, so that the anti-blocking plug-in of the browser will not be able to recognize whether the anti-blocking URL is an advertising URL, and then the browser can access the anti-blocking URL normally.
  • the multi-level URL of the advertisement class can be selectively rewritten, and the corresponding processing can be as follows:
  • the advertisement anti-blocking script detects that the web page script initiates the third access request to the multi-level URL, based on the preset blocking rule
  • the library determines whether the multi-level URL is a shielded URL; if it is, based on a preset encryption algorithm, encodes and confuses the advertising URL keywords in the multi-level URL in the third access request to generate a corresponding anti-blocking URL.
  • each level of URL in the webpage content also includes a larger number of non-advertising URLs. If all URLs at all levels are rewritten, the processing resources of the edge server will be greatly consumed. At the same time, it will also reduce the processing efficiency of the edge server for preventing advertisements.
  • the edge server can combine the preset blocking rule base, such as the general blocking rule base used by the advertisement blocking plug-in, to determine whether the multi-level URL in the web page content is an advertisement URL, that is, the blocking URL to decide whether to rewrite it .
  • the advertisement anti-blocking script when the advertisement anti-blocking script detects that the web page script initiates the third access request to the multi-level URL, the advertisement anti-blocking script may be based on each preset advertisement URL keyword in the preset blocking rule base To determine whether the multi-level URL contains the preset advertisement URL keywords. If so, the ad anti-blocking script can determine that the multi-level URL is the blocking URL, and then the ad anti-blocking script can be based on the preset encryption algorithm.
  • the advertising URL keywords in the multi-level URL are encoded and confused to generate the corresponding anti-blocking URL; if the URL is not blocked, the ad anti-blocking script may not rewrite the multi-level URL, thereby saving the edge server System resources, improve the efficiency of the edge server for advertising anti-blocking processing, and at the same time, it can also reduce the hardware requirements such as the installation environment of the terminal for the advertising anti-blocking script. Some terminals with lower configurations can also obtain better Advertising anti-blocking effect.
  • the multi-level URLs in all levels of URLs may also be rewritten at the edge server.
  • part of the processing in step 202 may be as follows: based on the preset encryption algorithm, the The first-level URL is rewritten to the corresponding anti-blocking URL; and, the webpage script loaded in the webpage content is rewritten to the corresponding anti-blocking URL based on the preset encryption algorithm.
  • the URLs at all levels include the first-level URL recorded in the webpage content and the multi-level URL recorded by the webpage script in the webpage content.
  • the edge server may rewrite the first-level URL in the webpage content to the corresponding anti-blocking URL based on a preset encryption algorithm.
  • the edge server can access the first-level URL of each webpage script recorded in the webpage content to load these webpage scripts.
  • the edge server can multi-level record the script content of these webpage scripts based on a preset encryption algorithm
  • the URL is rewritten to the corresponding anti-blocking URL, and the rewritten webpage script is cached. After that, the edge server can return the rewritten webpage content to the terminal.
  • the edge server can send the cached rewritten webpage script to the terminal, and then the rewritten webpage script can call the browser to access the anti-shield URL in the rewritten script content.
  • the corresponding processing can be as follows: Based on the preset blocking rule base, determine whether the multi-level URL recorded by the webpage script is a blocked URL; if it is, based on the pre- The encryption algorithm is used to encode and obfuscate the advertisement URL keywords in the multi-level URL recorded by the webpage script to generate the corresponding anti-shield URL.
  • the edge server in order to save the system resources of the edge server and provide the processing efficiency of advertisement anti-blocking, it is also possible to determine whether the multi-level URL recorded by the webpage script is a blocking URL at the edge server in combination with a preset blocking rule base.
  • the edge server may determine whether the multilevel URL recorded by the webpage script contains the preset advertisement type URL based on each preset advertisement type URL keyword in the preset blocking rule base Keywords, if included, the edge server can determine that the multi-level URL is a blocked URL, and then the edge server can encode and confuse the advertising URL keywords in the multi-level URL recorded by the webpage script based on a preset encryption algorithm to generate a corresponding Anti-blocking URL; if it is not a blocking URL, the edge server may not rewrite the multi-level URL recorded by the webpage script.
  • the edge server can also determine whether the first-level URL in the webpage content is a shielded URL based on the preset blocking rule base; if it is a shielded URL, the edge server can be based on The preset encryption algorithm encodes and confuses the advertisement URL keywords in the first-level URL in the webpage content to generate the corresponding anti-shielding URL. If it is not the shielding URL, the edge server may not rewrite the first-level URL in the webpage content.
  • Step 203 When receiving the second access request of the terminal to the anti-blocking URL, the anti-blocking URL is restored to the corresponding URLs at all levels based on a preset decryption algorithm.
  • the terminal may sequentially initiate an access request (which may be referred to as a second access request) to the anti-shield URL in the website content.
  • an access request (which may be referred to as a second access request)
  • the edge server may restore the anti-blocking URL to corresponding URLs of various levels based on a preset decryption algorithm, such as a first-level URL or a multi-level URL.
  • a preset decryption algorithm such as a first-level URL or a multi-level URL.
  • the edge server needs to use the preset decryption algorithm corresponding to the above preset encryption algorithm. For example, when the preset encryption algorithm is the DES algorithm, the preset decryption algorithm is also the same DES algorithm.
  • Step 204 Obtain the resources pointed to by the URLs at all levels and return the resources to the terminal.
  • the edge server can access the restored URLs at all levels to obtain the resources pointed to by it, such as text, pictures, or videos related to advertisements. After that, the edge server may return the acquired resources to the terminal. In this way, the terminal can render and display on the browser interface based on the received resources.
  • the first access request to the target webpage by the terminal is received to obtain the webpage content of the target webpage; based on a preset encryption algorithm, all levels of URLs in the webpage content are rewritten to corresponding anti-shield URLs, and the rewritten The webpage content is returned to the terminal; when receiving the terminal's second access request to the anti-blocking URL, the anti-blocking URL is restored to the corresponding URLs at all levels based on a preset decryption algorithm; the resources pointed to by the URLs at various levels are obtained and the resources are returned to terminal.
  • the edge server or proxy server can be used to modify the cached webpage content.
  • the cache server or proxy server can change all levels of URLs in the webpage content, including advertising URLs. , Rewritten to a URL that the ad blocking plugin does not recognize, and then when the terminal subsequently accesses the rewritten URL in the web page content, the ad blocking plugin can be disabled, so that the edge server or proxy server can receive the rewritten URL, Then, the rewritten URL is restored to the original URLs at all levels, and then the edge server or proxy server can obtain the resources pointed to by the original URLs at all levels, such as advertising resources, and return them to the terminal, so that the terminal can display advertisements normally.
  • the edge server or proxy server it is not necessary to modify the original internal processing logic of the website provider's website, which effectively reduces the cost of the website provider's advertisement anti-blocking.
  • an embodiment of the present invention also provides an advertisement anti-shielding device. As shown in FIG. 3, the device includes:
  • the obtaining module 301 is configured to receive the first access request of the terminal to the target webpage and obtain the webpage content of the target webpage;
  • the rewriting module 302 is configured to rewrite all levels of URLs in the webpage content into corresponding anti-shield URLs based on a preset encryption algorithm, and return the rewritten webpage content to the terminal;
  • the restoration module 303 is configured to restore the anti-blocking URL to the corresponding URLs at all levels based on a preset decryption algorithm when receiving the second access request of the terminal to the anti-blocking URL;
  • the return module 304 is configured to obtain resources pointed to by the URLs at all levels and return the resources to the terminal.
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting module 302 is specifically used for:
  • the URLs at various levels include a URL at the first level recorded in the content of the webpage and a URL at a multilevel recorded by the webpage script in the content of the webpage;
  • the rewriting module 302 is specifically used for:
  • the webpage script in the webpage content is loaded, and based on a preset encryption algorithm, the multi-level URL recorded by the webpage script is rewritten to a corresponding anti-shield URL.
  • the rewriting module 302 is also used to:
  • the advertisement URL keywords in the multi-level URL recorded by the webpage script are encoded and confused based on a preset encryption algorithm to generate a corresponding anti-shield URL.
  • the rewriting module 302 is also used to:
  • the advertisement URL keywords in the first-level URL in the webpage content are encoded and obfuscated based on a preset encryption algorithm to generate a corresponding anti-shield URL.
  • the advertisement anti-shielding device when the advertisement anti-shielding device provided in the above embodiment performs advertisement anti-shielding, only the above-mentioned division of each functional module is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functions as needed. Module completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
  • the advertising anti-shielding device and the advertising anti-shielding method embodiment provided in the above embodiments belong to the same concept. For the specific implementation process, see the method embodiments, and details are not described here.
  • the edge server 400 may have a relatively large difference due to different configurations or performance, and may include one or more central processors 422 (for example, one or more processors) and a memory 432, one or more storage application programs 442
  • the storage medium 430 of the data 444 (for example, one or one mass storage device).
  • the memory 432 and the storage medium 430 may be short-term storage or persistent storage.
  • the program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the edge server.
  • the central processor 422 may be configured to communicate with the storage medium 430 and execute a series of instruction operations in the storage medium 430 on the edge server 400.
  • the edge server 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, one or more keyboards 456, and / or one or more operating systems 441, such as Windows Server TM, Mac OS XTM, Unix TM, Linux TM, FreeBSD TM, etc.
  • the edge server 400 may include a memory, and one or more programs, where one or more programs are stored in the memory, and are configured to be executed by one or more processors.
  • the one or more programs include for performing The above instructions for blocking ads.
  • the program may be stored in a computer-readable storage medium.
  • the mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computing Systems (AREA)
  • Power Engineering (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种广告防屏蔽的方法和装置,属于互联网技术领域。所述方法包括:接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;获取所述各级URL指向的资源,将所述资源返回至所述终端。采用本发明,可以降低网站提供商进行广告防屏蔽的成本。

Description

一种广告防屏蔽的方法和装置 技术领域
本发明涉及互联网技术领域,特别涉及一种广告防屏蔽的方法和装置。
背景技术
现有的浏览器往往集成有广告屏蔽插件,其可以对网页中的广告进行屏蔽,以提升用户体验,然而,这给各个网站提供商带来了严重的损失,极大的降低了其广告收入。
网页的网页内容一般由文字、图片、视频等资源组成,浏览器在加载网页内容时,可以对这些资源各自的URL(Uniform Resource Locator,统一资源定位符)发起访问请求,以获取上述资源。广告屏蔽插件可以对浏览器待访问的上述URL进行识别,如果识别出该URL为广告类URL,则广告屏蔽插件可以阻止浏览器对该URL进行访问,导致浏览器无法获取到相应的广告内容,进而无法对广告进行显示。目前亟需一种效果较好且成本较低的广告防屏蔽的方法。
发明内容
为了解决现有技术的问题,本发明实施例提供了一种广告防屏蔽的方法和装置。所述技术方案如下:
第一方面,提供了一种广告防屏蔽的方法,所述方法包括:
接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;
基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;
当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;
获取所述各级URL指向的资源,将所述资源返回至所述终端。
进一步的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,包括:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,在所述网页内容中添加广告防屏蔽脚本,以使所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL。
进一步的,所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL,包括:
当所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设屏蔽规则库,判断所述多级URL是否为屏蔽URL;
如果是,则基于预设加密算法在所述第三访问请求中将所述多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
进一步的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,包括:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,加载网页内容中的所述网页脚本,基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL。
进一步的,所述基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL,包括:
基于预设屏蔽规则库,判断所述网页脚本记录的多级URL是否为屏蔽URL;
如果是,则基于预设加密算法将所述网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
进一步的,所述基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL,包括:
基于预设屏蔽规则库,判断所述网页内容中的所述一级URL是否为屏蔽URL;
如果是,则基于预设加密算法将所述网页内容中的所述一级URL中的广告 类URL关键词进行编码混淆,生成相应的防屏蔽URL。
第二方面,提供了一种广告防屏蔽的装置,所述装置包括:
获取模块,用于接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;
改写模块,用于基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;
还原模块,用于当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;
返回模块,用于获取所述各级URL指向的资源,将所述资源返回至所述终端。
进一步的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述改写模块,具体用于:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,在所述网页内容中添加广告防屏蔽脚本,以使所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL。
进一步的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述改写模块,具体用于:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,加载网页内容中的所述网页脚本,基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL。
进一步的,所述改写模块,还用于:
基于预设屏蔽规则库,判断所述网页脚本记录的多级URL是否为屏蔽URL;
如果是,则基于预设加密算法将所述网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
进一步的,所述改写模块,还用于:
基于预设屏蔽规则库,判断所述网页内容中的所述一级URL是否为屏蔽 URL;
如果是,则基于预设加密算法将所述网页内容中的所述一级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
第三方面,提供了一种边缘服务器,所述边缘服务器包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如第一方面所述的广告防屏蔽的方法。
本发明实施例提供的技术方案带来的有益效果是:
在本实施例中,接收终端对目标网页的第一访问请求,获取目标网页的网页内容;基于预设加密算法将网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至终端;当接收到终端对防屏蔽URL的第二访问请求时,基于预设解密算法将防屏蔽URL还原为相应的各级URL;获取各级URL指向的资源,将资源返回至终端。这样,可以利用边缘服务器或代理服务器能够对缓存的网页内容进行修改的特点,在接收到终端对网页的访问请求时,缓存服务器或代理服务器可以将网页内容中的各级URL,包括广告类URL,改写为广告屏蔽插件无法识别的URL,进而终端在后续对网页内容中的改写后的URL进行访问时,可以使得广告屏蔽插件失效,从而边缘服务器或代理服务器可以接收到上述改写后的URL,然后将改写后的URL还原为原始的各级URL,进而边缘服务器或代理服务器可以获取原始的各级URL所指向的资源,例如广告资源,并将其返还给终端,从而终端可以正常显示广告。另外,将上述广告防屏蔽的处理放在边缘服务器或代理服务器进行,可以无需修改网站提供商的网站原有的内部处理逻辑,有效降低网站提供商进行广告防屏蔽的成本。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1是本发明实施例提供的一种网络场景示意图;
图2是本发明实施例提供的一种广告防屏蔽的方法流程图;
图3是本发明实施例提供的一种广告防屏蔽的装置结构示意图;
图4是本发明实施例提供的一种边缘服务器的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
本发明实施例提供了一种广告防屏蔽的方法,该方法的执行主体可以是边缘服务器或代理服务器,边缘服务器或代理服务器可以是CDN(Content Delivery Network,内容分发网络)集群中的任意缓存服务器,其可以接收任意终端(如智能手机、平板电脑)对某一网页的访问请求,然后可以基于该访问请求,将缓存的该网页的网页内容返回给上述终端;如果没有缓存该网页的网页内容,边缘服务器或代理服务器可以从源站(网站提供商)获取该网页的网页内容,然后将获取的该网页的网页内容返回给上述终端。相应的网络场景可以如图1所示。上述边缘服务器中可以包括处理器、存储器、收发器,处理器可以用于进行下述流程中广告防屏蔽的处理,存储器可以用于存储下述处理过程中需要的数据以及产生的数据,收发器可以用于接收和发送下述处理过程中的相关数据。本实施例以执行主体为边缘服务器进行说明,执行主体为代理服务器的情况与之类似,不再一一赘述。
下面将结合具体实施方式,对图2所示的一种广告防屏蔽的方法的处理流程进行详细的说明,内容可以如下:
步骤201:接收终端对目标网页的第一访问请求,获取目标网页的网页内容。
在实施中,当某用户想要访问某网页(可称为目标网页)时,该用户可以在任一终端上打开预先安装的浏览器程序,然后可以在浏览器程序的输入框中输入目标网页的网址。之后,浏览器程序可以基于用户输入的网址,发起对该目标网页的访问请求(可称为第一访问请求)。进而终端可以将该第一访问请求发送至服务终端的边缘服务器。这样,边缘服务器可以接收到终端对目标网页的第一访问请求,然后,边缘服务器可以根据该第一请求获取目标网页的网页内容。具体的,上述网页内容可以是HTML(HyperText Markup Language,超 级文本标记语言)内容,HTML内容中可以包括网页代码和标记图片、视频等资源的各类标签,例如link(链接)标签、script(脚本)标签、img(图片)标签等,每个标签的src(source,资源)属性或href(Hypertext Reference,指定超链接目标)属性可以记录有相应资源的URL,通过访问该URL可以获取到对应的资源。
步骤202:基于预设加密算法将网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至终端。
在实施中,首先对广告屏蔽插件对广告类URL进行屏蔽的原理进行说明:当浏览器发起对某一URL的访问请求时,广告屏蔽插件可以结合记录有各种广告类URL关键词的屏蔽规则库,以字符为单位对上述访问请求中的URL进行识别,如果识别出屏蔽规则库记录的广告类URL关键词,则广告屏蔽插件可以对上述访问请求进行拦截处理,如果未识别出屏蔽规则库记录的广告类URL关键词,则广告屏蔽插件可以允许浏览器对该URL进行访问。
基于上述广告屏蔽插件对广告类URL进行屏蔽的原理,边缘服务器在获取目标网页的网页内容后,可以基于预设加密算法对网页内容中的各级URL进行加密,例如将各级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL,以达到无法被广告屏蔽插件识别的目的。其中,网页内容中的各级URL可以包括一级URL和多级URL,一级URL可以是网页内容中记录的URL,例如上述标签的src属性或href属性记录的URL;多级URL可以是由网页内容中的网页脚本记录的URL,该URL通常记录在网页脚本的脚本内容中,并未在网页内容中进行记录,网页脚本可以是网站提供商添加的前端脚本或广告联盟脚本,网页脚本在运行时可以调用浏览器对网页脚本中记录的URL(即多级URL)进行访问。之后,边缘服务器可以将改写后的网页内容返回至终端。需要说明的是,上述预设加密算法可以是常见的加密算法,例如DES(Data Encryptin Standard,对称加密标准)算法、AES(Advanced Encryptin Standard,高级加密标准)算法,上述预设加密算法也可以是自定义的加密算法。
可选的,在一实施例中,可以通过广告防屏蔽脚本,在终端处对各级URL中的多级URL进行改写,相应的,步骤202的部分处理可以如下:基于预设加密算法将网页内容中的一级URL改写为相应的防屏蔽URL;以及,在网页内容中添加广告防屏蔽脚本,以使广告防屏蔽脚本检测到网页脚本发起对多级URL 的第三访问请求时,基于预设加密算法在第三访问请求中将多级URL改写为相应的防屏蔽URL。
其中,各级URL包括在网页内容中记录的一级URL和由网页内容中的网页脚本记录的多级URL。
在实施中,对于一级URL,由于其预先由网站提供商配置而记录在网页内容中,因此边缘服务器在获取到目标网页的网页内容时,可以直接对一级URL进行改写。而对于多级URL,其没有记录在网页内容中,而是当浏览器加载网页内容中的网页脚本后,由网页脚本进行获取,之后,才可以对多级URL进行改写。以网页脚本为广告联盟脚本为例,目标网页的广告可以由广告联盟提供,网站提供商只需将广告联盟开发的广告联盟脚本的URL添加在网页内容中即可完成广告接入,当浏览器访问网页内容中记录的广告联盟脚本的URL时,可以从广告联盟的相应服务器处获取并运行上述广告联盟脚本,之后,广告联盟脚本可以基于脚本内容中预先记录的广告类的多级URL,发起对广告类的多级URL的访问请求,调用浏览器获取相应的广告类资源,以完成广告的加载。这样,基于上述多级URL加载的滞后性,边缘服务器可以在网页内容中添加广告防屏蔽脚本,以对上述多级URL进行改写,该广告防屏蔽脚本可以检测到网页脚本发起的对脚本内容中记录的多级URL的第三访问请求,并可以在网页脚本调用浏览器获取上述多级URL对应的相应资源之前,对多级URL进行改写。具体的,对于一级URL,边缘服务器可以基于预设加密算法,将网页内容中的一级URL改写为相应的防屏蔽URL。对于多级URL,边缘服务器可以在网页内容中添加广告防屏蔽脚本,然后将添加有广告防屏蔽脚本的网页内容返回给终端。这样,当终端的浏览器加载上述网页内容中的广告防屏蔽脚本时,广告防屏蔽脚本可以对网页脚本是否发起对脚本内容中记录的多级URL的第三访问请求进行检测,当检测到网页脚本发起对上述多级URL的第三访问请求时,广告防屏蔽脚本可以基于预设加密算法,在第三访问请求中将多级URL改写为相应的防屏蔽URL,然后网页脚本可以调用浏览器对该防屏蔽URL进行访问,这样,浏览器的防屏蔽插件将无法识别出防屏蔽URL是否为广告类URL,进而浏览器可以正常访问该防屏蔽URL。
可选的,可以选择性的对广告类的多级URL进行改写,相应的处理可以如下:当广告防屏蔽脚本检测到网页脚本发起对多级URL的第三访问请求时,基 于预设屏蔽规则库,判断多级URL是否为屏蔽URL;如果是,则基于预设加密算法在第三访问请求中将多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
在实施中,除了广告类URL,网页内容中的各级URL还包括数量更多的非广告类URL,如果对所有的各级URL均进行改写,将会极大的消耗边缘服务器的处理资源,同时,也会降低边缘服务器进行广告防屏蔽的处理效率。这时,边缘服务器可以结合预设屏蔽规则库,例如广告屏蔽插件采用的通用屏蔽规则库,判断网页内容中的多级URL是否为广告类URL,即屏蔽URL,以决定是否进行对其进行改写。具体的,对于多级URL,广告防屏蔽脚本在检测到网页脚本发起对多级URL的第三访问请求时,广告防屏蔽脚本可以基于预设屏蔽规则库中的各个预设广告类URL关键词,判断多级URL中是否包含有预设广告类URL关键词,如果包含,则广告防屏蔽脚本可以判断该多级URL为屏蔽URL,进而广告防屏蔽脚本可以基于预设加密算法,在第三访问请求中将多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL;如果不是屏蔽URL,则广告防屏蔽脚本可以不对该多级URL进行改写,从而可以节省边缘服务器的系统资源,提高边缘服务器进行广告防屏蔽的处理效率,同时,也可以降低广告防屏蔽脚本对终端的安装环境等硬件要求,一些配置较低的终端也可以基于上述广告防屏蔽脚本取得较好的广告防屏蔽效果。
可选的,在另一实施例中,也可以在边缘服务器处对各级URL中的多级URL进行改写,相应的,步骤202的部分处理可以如下:基于预设加密算法将网页内容中的一级URL改写为相应的防屏蔽URL;以及,加载网页内容中的网页脚本,基于预设加密算法将网页脚本记录的多级URL改写为相应的防屏蔽URL。
其中,各级URL包括在网页内容中记录的一级URL和由网页内容中的网页脚本记录的多级URL。
在实施中,边缘服务器在获取到目标网页的网页内容后,对于网页内容中的一级URL,边缘服务器可以基于预设加密算法,将网页内容中的一级URL改写为相应的防屏蔽URL。同时,边缘服务器可以对网页内容中记录的各个网页脚本的一级URL进行访问,以加载这些网页脚本,之后,边缘服务器可以基于预设加密算法,将这些网页脚本的脚本内容中记录的多级URL改写为相应的防 屏蔽URL,并对这些改写后的网页脚本进行缓存。之后,边缘服务器可以将改写后的网页内容返回给终端。这样,当终端请求加载上述网页脚本时,边缘服务器可以将缓存的改写后的网页脚本发送给终端,进而改写后的网页脚本可以调用浏览器对改写后的脚本内容中的防屏蔽URL进行访问。
可选的,可以选择性的对广告类的多级URL进行改写,相应的处理可以如下:基于预设屏蔽规则库,判断网页脚本记录的多级URL是否为屏蔽URL;如果是,则基于预设加密算法将网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
在实施中,为了节省边缘服务器的系统资源,提供广告防屏蔽的处理效率,同样可以结合预设屏蔽规则库,在边缘服务器处对网页脚本记录的多级URL是否为屏蔽URL进行判断。具体的,边缘服务器在加载网页内容中的网页脚本后,可以基于预设屏蔽规则库中的各个预设广告类URL关键词,判断网页脚本记录的多级URL中是否包含有预设广告类URL关键词,如果包含,则边缘服务器可以判断该多级URL为屏蔽URL,进而边缘服务器可以基于预设加密算法,将网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL;如果不是屏蔽URL,则边缘服务器可以不对网页脚本记录的多级URL进行改写。
进一步的,对于一级URL,边缘服务器在获取到网页内容后,同样可以基于上述预设屏蔽规则库,判断网页内容中的一级URL是否为屏蔽URL;如果是屏蔽URL,则边缘服务器可以基于预设加密算法将网页内容中的一级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL,如果不是屏蔽URL,则边缘服务器可以不对网页内容中的一级URL进行改写。
步骤203:当接收到终端对防屏蔽URL的第二访问请求时,基于预设解密算法将防屏蔽URL还原为相应的各级URL。
在实施中,终端在接收到边缘服务器发送的目标网页的网站内容后,可以依次对网站内容中的防屏蔽URL发起访问请求(可称为第二访问请求)。这样,当边缘服务器接收到终端发起的对防屏蔽URL的第二访问请求时,可以基于预设解密算法将防屏蔽URL还原为相应的各级URL,例如一级URL或多级URL。需要说明的是,为了将改写的防屏蔽URL进行还原,边缘服务器需要采用与上述预设加密算法相对应的预设解密算法,例如,当预设加密算法为DES算法时, 预设解密算法同样为DES算法。
步骤204:获取各级URL指向的资源,将资源返回至终端。
在实施中,边缘服务器在将防屏蔽URL还原为相应的各级URL后,可以对还原后的各级URL进行访问,获取其指向的资源,例如与广告相关的文字、图片或视频等资源。之后,边缘服务器可以将获取的上述资源返回给终端。这样,终端可以基于接收到的上述资源,在浏览器界面进行渲染展示。
在本实施例中,接收终端对目标网页的第一访问请求,获取目标网页的网页内容;基于预设加密算法将网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至终端;当接收到终端对防屏蔽URL的第二访问请求时,基于预设解密算法将防屏蔽URL还原为相应的各级URL;获取各级URL指向的资源,将资源返回至终端。这样,可以利用边缘服务器或代理服务器能够对缓存的网页内容进行修改的特点,在接收到终端对网页的访问请求时,缓存服务器或代理服务器可以将网页内容中的各级URL,包括广告类URL,改写为广告屏蔽插件无法识别的URL,进而终端在后续对网页内容中的改写后的URL进行访问时,可以使得广告屏蔽插件失效,从而边缘服务器或代理服务器可以接收到上述改写后的URL,然后将改写后的URL还原为原始的各级URL,进而边缘服务器或代理服务器可以获取原始的各级URL所指向的资源,例如广告资源,并将其返还给终端,从而终端可以正常显示广告。另外,将上述广告防屏蔽的处理放在边缘服务器或代理服务器进行,可以无需修改网站提供商的网站原有的内部处理逻辑,有效降低网站提供商进行广告防屏蔽的成本。
基于相同的技术构思,本发明实施例还提供了一种广告防屏蔽的装置,如图3所示,所述装置包括:
获取模块301,用于接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;
改写模块302,用于基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;
还原模块303,用于当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;
返回模块304,用于获取所述各级URL指向的资源,将所述资源返回至所 述终端。
可选的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述改写模块302,具体用于:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,在所述网页内容中添加广告防屏蔽脚本,以使所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL。
可选的,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
所述改写模块302,具体用于:
基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
以及,加载网页内容中的所述网页脚本,基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL。
可选的,所述改写模块302,还用于:
基于预设屏蔽规则库,判断所述网页脚本记录的多级URL是否为屏蔽URL;
如果是,则基于预设加密算法将所述网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
可选的,所述改写模块302,还用于:
基于预设屏蔽规则库,判断所述网页内容中的所述一级URL是否为屏蔽URL;
如果是,则基于预设加密算法将所述网页内容中的所述一级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
需要说明的是:上述实施例提供的广告防屏蔽的装置在进行广告防屏蔽时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的广告防屏蔽的装置与广告防屏蔽的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图4是本发明实施例提供的边缘服务器的结构示意图。该边缘服务器400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器422(例如,一个或一个以上处理器)和存储器432,一个或一个以上存储应用程序442或数据444的存储介质430(例如一个或一个以上海量存储设备)。其中,存储器432和存储介质430可以是短暂存储或持久存储。存储在存储介质430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对边缘服务器中的一系列指令操作。更进一步地,中央处理器422可以设置为与存储介质430通信,在边缘服务器400上执行存储介质430中的一系列指令操作。
边缘服务器400还可以包括一个或一个以上电源426,一个或一个以上有线或无线网络接口450,一个或一个以上输入输出接口458,一个或一个以上键盘456,和/或,一个或一个以上操作系统441,例如Windows Server TM,Mac OS XTM,Unix TM,Linux TM,FreeBSD TM等等。
边缘服务器400可以包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行上述广告防屏蔽的指令。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (12)

  1. 一种广告防屏蔽的方法,其特征在于,所述方法包括:
    接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;
    基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;
    当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;
    获取所述各级URL指向的资源,将所述资源返回至所述终端。
  2. 根据权利要求1所述的方法,其特征在于,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
    所述基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,包括:
    基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
    以及,在所述网页内容中添加广告防屏蔽脚本,以使所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL。
  3. 根据权利要求2所述的方法,其特征在于,所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL,包括:
    当所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设屏蔽规则库,判断所述多级URL是否为屏蔽URL;
    如果是,则基于预设加密算法在所述第三访问请求中将所述多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
  4. 根据权利要求1所述的方法,其特征在于,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
    所述基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽 URL,包括:
    基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
    以及,加载网页内容中的所述网页脚本,基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL。
  5. 根据权利要求4所述的方法,其特征在于,所述基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL,包括:
    基于预设屏蔽规则库,判断所述网页脚本记录的多级URL是否为屏蔽URL;
    如果是,则基于预设加密算法将所述网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
  6. 根据权利要求2或4所述的方法,其特征在于,所述基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL,包括:
    基于预设屏蔽规则库,判断所述网页内容中的所述一级URL是否为屏蔽URL;
    如果是,则基于预设加密算法将所述网页内容中的所述一级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
  7. 一种广告防屏蔽的装置,其特征在于,所述装置包括:
    获取模块,用于接收终端对目标网页的第一访问请求,获取所述目标网页的网页内容;
    改写模块,用于基于预设加密算法将所述网页内容中的各级URL改写为相应的防屏蔽URL,并将改写后的网页内容返回至所述终端;
    还原模块,用于当接收到所述终端对所述防屏蔽URL的第二访问请求时,基于预设解密算法将所述防屏蔽URL还原为相应的所述各级URL;
    返回模块,用于获取所述各级URL指向的资源,将所述资源返回至所述终端。
  8. 根据权利要求7所述的装置,其特征在于,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
    所述改写模块,具体用于:
    基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
    以及,在所述网页内容中添加广告防屏蔽脚本,以使所述广告防屏蔽脚本检测到所述网页脚本发起对所述多级URL的第三访问请求时,基于预设加密算法在所述第三访问请求中将所述多级URL改写为相应的防屏蔽URL。
  9. 根据权利要求7所述的装置,其特征在于,所述各级URL包括在所述网页内容中记录的一级URL和由所述网页内容中的网页脚本记录的多级URL;
    所述改写模块,具体用于:
    基于预设加密算法将所述网页内容中的一级URL改写为相应的防屏蔽URL;
    以及,加载网页内容中的所述网页脚本,基于预设加密算法将所述网页脚本记录的多级URL改写为相应的防屏蔽URL。
  10. 根据权利要求9所述的装置,其特征在于,所述改写模块,还用于:
    基于预设屏蔽规则库,判断所述网页脚本记录的多级URL是否为屏蔽URL;
    如果是,则基于预设加密算法将所述网页脚本记录的多级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
  11. 根据权利要求8或9所述的装置,其特征在于,所述改写模块,还用于:
    基于预设屏蔽规则库,判断所述网页内容中的所述一级URL是否为屏蔽URL;
    如果是,则基于预设加密算法将所述网页内容中的所述一级URL中的广告类URL关键词进行编码混淆,生成相应的防屏蔽URL。
  12. 一种边缘服务器,其特征在于,所述边缘服务器包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或指令集由所述处理器加载并执行以实现如权利要求1至6任一所述的广告防屏蔽的方法。
PCT/CN2018/112682 2018-10-11 2018-10-30 一种广告防屏蔽的方法和装置 WO2020073374A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18936861.6A EP3863252A4 (en) 2018-10-11 2018-10-30 ADVERTISING ANTI-PROTECTION PROCESS AND DEVICE
US16/485,691 US11477158B2 (en) 2018-10-11 2018-10-30 Method and apparatus for advertisement anti-blocking

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811184685.4A CN109325192B (zh) 2018-10-11 2018-10-11 一种广告防屏蔽的方法和装置
CN201811184685.4 2018-10-11

Publications (1)

Publication Number Publication Date
WO2020073374A1 true WO2020073374A1 (zh) 2020-04-16

Family

ID=65261275

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/112682 WO2020073374A1 (zh) 2018-10-11 2018-10-30 一种广告防屏蔽的方法和装置

Country Status (4)

Country Link
US (1) US11477158B2 (zh)
EP (1) EP3863252A4 (zh)
CN (1) CN109325192B (zh)
WO (1) WO2020073374A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325192B (zh) * 2018-10-11 2021-11-23 网宿科技股份有限公司 一种广告防屏蔽的方法和装置
CN111177702B (zh) * 2019-12-12 2023-01-13 北京百度网讯科技有限公司 网页内容的防屏蔽方法、装置、设备和计算机存储介质
CN113949738B (zh) * 2021-12-21 2022-09-16 深圳佑驾创新科技有限公司 一种广告推送方法、装置和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156093A (zh) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 广告内容的识别方法和装置
CN107547524A (zh) * 2017-08-09 2018-01-05 百度在线网络技术(北京)有限公司 一种网页检测方法、装置和设备
CN107707670A (zh) * 2017-10-30 2018-02-16 拓文化传媒(上海)有限公司 一种移动广告推送监测系统
US20180101507A1 (en) * 2016-10-10 2018-04-12 Red Spark, Lp Method and system for bypassing ad-blocking technology
US20180137546A1 (en) * 2016-11-15 2018-05-17 Social Networking Technology, Inc. Systems and methods for delivering advertisements

Family Cites Families (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058633B1 (en) * 2002-09-09 2006-06-06 Cisco Technology, Inc. System and method for generalized URL-rewriting
US20060235960A1 (en) * 2004-11-23 2006-10-19 Inventec Appliances Corporation Method for blocking network advertising
US7917523B2 (en) * 2006-04-05 2011-03-29 Cisco Technology, Inc. Method and system for providing improved URL mangling performance using fast re-write
US9881323B1 (en) * 2007-06-22 2018-01-30 Twc Patent Trust Llt Providing hard-to-block advertisements for display on a webpage
US20090254633A1 (en) * 2008-04-03 2009-10-08 Olive Bentley J Methods, systems, and computer program products for distributing profile-based advertisement content and user identification-tagged media content
US8589810B2 (en) * 2008-11-18 2013-11-19 At&T Intellectual Property I, L.P. Methods, systems, and products for recording browser navigations
US20160140611A1 (en) * 2010-12-20 2016-05-19 Sizmek Technologies Ltd. System and method for criteria-based advertisement blocking
US8745753B1 (en) * 2011-06-20 2014-06-03 Adomic, Inc. Systems and methods for blocking of web-based advertisements
KR101462311B1 (ko) * 2012-05-18 2014-11-14 (주)이스트소프트 악성 코드 차단 방법
US9679315B2 (en) * 2014-09-01 2017-06-13 AdSupply, Inc. Systems and methods to bypass online advertisement blockers
CA2931517A1 (en) * 2014-09-12 2016-03-17 Adallom Technologies Inc. A cloud suffix proxy and methods thereof
US10037552B1 (en) * 2014-09-18 2018-07-31 Pathmatics, Inc. Systems and methods for discovery and tracking of obscured web-based advertisements
CN105992060A (zh) * 2015-02-13 2016-10-05 中兴通讯股份有限公司 一种视频广告过滤的方法、装置和系统
US9992259B2 (en) * 2015-04-10 2018-06-05 Yavli Limited Systems and methods to circumvent advertisement blocking on the internet
US10817913B2 (en) * 2015-10-16 2020-10-27 Akamai Technologies, Inc. Server-side detection and mitigation of client-side content filters
WO2017153838A1 (en) * 2016-03-09 2017-09-14 Sourcepoint Technologies Inc. Content blocker detection and circumvention
US11436645B2 (en) * 2016-04-13 2022-09-06 Melih Abdulhayoglu System and process for displaying media content files in an unblockable manner
US20170345063A1 (en) * 2016-05-26 2017-11-30 Mark Bauman Advertisement blocker circumvention system
CN106227847A (zh) * 2016-07-27 2016-12-14 宁波圆形网络科技有限公司 一种去广告系统及方法
US10237339B2 (en) * 2016-08-19 2019-03-19 Microsoft Technology Licensing, Llc Statistical resource balancing of constrained microservices in cloud PAAS environments
CN107959660A (zh) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 一种基于Nginx的静态文件访问方法和装置
CN106599298A (zh) * 2016-12-28 2017-04-26 北京金山安全软件有限公司 广告拦截方法、装置以及终端设备
CN106657105B (zh) * 2016-12-29 2019-10-11 网宿科技股份有限公司 目标资源的发送方法和装置
US20180189824A1 (en) * 2016-12-29 2018-07-05 Apomaya, Inc. System for managing advertising content
CN108512813B (zh) * 2017-02-27 2021-10-19 百度在线网络技术(北京)有限公司 用于防止信息被屏蔽的装置和方法
CN108366058B (zh) * 2018-02-07 2021-01-26 平安普惠企业管理有限公司 防止广告运营商流量劫持的方法、装置、设备及存储介质
US10262343B1 (en) * 2018-07-01 2019-04-16 Figleaf Limited Ad-blocking system using rule-based filtering of internet traffic
CN109325192B (zh) * 2018-10-11 2021-11-23 网宿科技股份有限公司 一种广告防屏蔽的方法和装置
WO2020177113A1 (en) * 2019-03-07 2020-09-10 Entit Software Llc Workflow initiation based on simulated network address

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156093A (zh) * 2015-04-01 2016-11-23 阿里巴巴集团控股有限公司 广告内容的识别方法和装置
US20180101507A1 (en) * 2016-10-10 2018-04-12 Red Spark, Lp Method and system for bypassing ad-blocking technology
US20180137546A1 (en) * 2016-11-15 2018-05-17 Social Networking Technology, Inc. Systems and methods for delivering advertisements
CN107547524A (zh) * 2017-08-09 2018-01-05 百度在线网络技术(北京)有限公司 一种网页检测方法、装置和设备
CN107707670A (zh) * 2017-10-30 2018-02-16 拓文化传媒(上海)有限公司 一种移动广告推送监测系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3863252A4 *

Also Published As

Publication number Publication date
EP3863252A4 (en) 2021-11-24
CN109325192A (zh) 2019-02-12
EP3863252A1 (en) 2021-08-11
CN109325192B (zh) 2021-11-23
US11477158B2 (en) 2022-10-18
US20220078161A1 (en) 2022-03-10

Similar Documents

Publication Publication Date Title
US10798127B2 (en) Enhanced document and event mirroring for accessing internet content
US8910277B1 (en) Process-based domain isolation
US10049168B2 (en) Systems and methods for modifying webpage data
EP2433258B1 (en) Protected serving of electronic content
US8527862B2 (en) Methods for making ajax web applications bookmarkable and crawlable and devices thereof
US9032066B1 (en) Virtual sandboxing for supplemental content
US8966446B1 (en) Systems and methods of live experimentation on content provided by a web site
US10447742B2 (en) Information sharing method and device
US20120101907A1 (en) Securing Expandable Display Advertisements in a Display Advertising Environment
US8613106B2 (en) Reducing the value of a browser fingerprint
TW201723897A (zh) 資訊顯示方法、裝置及智能終端
US11455365B2 (en) Data processing method and apparatus
JP6404816B2 (ja) ウェブページアクセス要求に対する応答の方法および装置
US20170237823A1 (en) System and method for transforming online content
WO2020073374A1 (zh) 一种广告防屏蔽的方法和装置
CN105354337A (zh) 一种网络爬虫实现方法和网络爬虫系统
US10303898B2 (en) Detection and blocking of web trackers for mobile browsers
US20190222587A1 (en) System and method for detection of attacks in a computer network using deception elements
US20220256006A1 (en) Methods for controlling tracking elements of a web page and related electronic devices
US11562092B1 (en) Loading and managing third-party tools on a website
US20230350984A1 (en) System and method for client-side rewriting of code included in a web page
CN109768973A (zh) 一种安全公告的发布监控方法、系统及装置
CN113158107A (zh) 访问通知栏消息的方法、装置、电子设备和存储介质
CN117349565A (zh) 页面渲染方法、装置、设备及介质
CN113553522A (zh) 一种页面显示方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18936861

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018936861

Country of ref document: EP

Effective date: 20210504