CN111177702A - Webpage content anti-shielding method, device, equipment and computer storage medium - Google Patents
Webpage content anti-shielding method, device, equipment and computer storage medium Download PDFInfo
- Publication number
- CN111177702A CN111177702A CN201911273895.5A CN201911273895A CN111177702A CN 111177702 A CN111177702 A CN 111177702A CN 201911273895 A CN201911273895 A CN 201911273895A CN 111177702 A CN111177702 A CN 111177702A
- Authority
- CN
- China
- Prior art keywords
- shielding
- content
- client
- webpage
- information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a method, a device and equipment for preventing webpage content from being shielded and a computer storage medium, and relates to the technical field of information flow. The specific implementation scheme is as follows: analyzing shielding information of a client to webpage content by monitoring the change of a Document Object Model (DOM) in rendered webpage content; collecting a rendering log, wherein the rendering log comprises shielding information of a client on webpage content; and monitoring the rendering log so as to replace an anti-shielding strategy according to the shielding information of the client on the webpage content. The anti-shielding effect can be improved, and the timeliness is enhanced.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for preventing web content from being masked in the field of information flow technologies.
Background
With the increasing requirements for network environment, more and more clients are available to shield the web page content. Such as illegal content, e.g., sensitive information, yellow-related information, etc., and also including promotional content (e.g., advertisements). However, the promotion content on the web page is an important revenue source for the web page manager, and the promotion content is also an important channel for marketing, promotion and information dissemination of related merchants. If the normal display of legal information such as promotion content of the web page cannot be guaranteed, the loss is undoubtedly great for website managers and merchants.
At present, most of the anti-shielding modes for web page contents bypass the shielding mode of the client by some special web page content code settings. However, the shielding mode adopted by the client is often ambiguous and needs to be determined through manual analysis, and then the web page code is rewritten through the manual mode, which results in poor anti-shielding timeliness, and once the shielding mode is changed by the client, the web page content is still shielded and cannot be displayed.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, a device, and a computer storage medium for preventing shielding of web page content, so as to effectively improve the anti-shielding effect and enhance the timeliness.
In a first aspect, the present application provides a method for preventing shielding of web page content, including:
analyzing the shielding information of the webpage content by the client by monitoring the change of a Document Object Model (DOM) in the rendered webpage content;
collecting a rendering log, wherein the rendering log comprises shielding information of a client on webpage content;
and monitoring the rendering log so as to replace an anti-shielding strategy according to the shielding information of the client on the webpage content.
According to a preferred embodiment of the present application, analyzing the shielding information of the web content by the client by monitoring the change of the document object model DOM in the rendered web content includes:
the webpage script monitors the change of DOM in the rendered webpage content, and determines whether the client side shields the webpage content or not and the shielding mode adopted by the client side to the webpage content.
According to a preferred embodiment of the present application, the collecting the rendering log includes:
the webpage script records information of rendered webpage content and uploads the information to the server, wherein the information comprises information of the displayed webpage content and shielding information of the client on the webpage content.
According to a preferred embodiment of the present application, the client shielding information for web page content includes:
the masked webpage content identification, the client information and the masking mode.
According to a preferred embodiment of the present application, the monitoring the rendering log to replace the anti-shielding policy according to the shielding information of the client on the web page content includes:
the server monitors the rendering log to determine shielded webpage contents with a shielding condition meeting a first preset requirement;
and replacing the anti-shielding strategy aiming at the shielded webpage content.
According to a preferred embodiment of the present application, the monitoring the rendering log to replace the anti-shielding policy according to the shielding information of the client on the web page content includes:
the server monitors the rendering log to determine the client type of the webpage content, wherein the shielding condition of the webpage content meets a second preset requirement;
and replacing the anti-shielding strategy aiming at the client type.
According to a preferred embodiment of the present application, the monitoring the rendering log to replace the anti-shielding policy according to the shielding information of the client on the web page content includes:
the server side monitors the rendering log and counts the shielding condition of each type of client side to each webpage content;
and if the shielding condition of a certain client type on certain webpage content meets a third preset requirement, replacing the anti-shielding strategy aiming at the access request of the client type on the webpage content.
According to a preferred embodiment of the present application, the replacement anti-shielding strategy includes:
the server side issues the replaced anti-shielding strategy configuration information through the configuration platform so as to be read by the webpage script; alternatively, the first and second electrodes may be,
and the server side issues the webpage script adopting the replaced anti-shielding strategy in the webpage.
According to a preferred embodiment of the present application, the replacement anti-shielding strategy includes at least one of:
writing DOM style information in a line;
disabling a style name indicating promotional content;
replacing the label of the shielded webpage content;
asynchronously rendering the shielded webpage content;
the insertion position of the shielded web page content is changed.
According to a preferred embodiment of the present application, the masked web page content includes promotional information.
In a second aspect, the present application further provides an anti-shielding apparatus for web page content, including:
the monitoring unit is used for analyzing the shielding information of the webpage content from the client by monitoring the change of a Document Object Model (DOM) in the rendered webpage content;
the log collection unit is used for collecting a rendering log, and the rendering log comprises shielding information of the client on webpage content;
the monitoring unit is used for monitoring the rendering log and informing the strategy replacement unit to replace the anti-shielding strategy according to the shielding information of the client on the webpage content;
and the strategy replacing unit is used for replacing the anti-shielding strategy.
According to a preferred embodiment of the present application, the monitoring unit is configured to be a web script, and is specifically configured to monitor changes in a DOM in rendered web content, and determine whether a client performs shielding on the web content and a shielding manner that the client uses on the web content.
According to a preferred embodiment of the present application, the log collection unit is configured as a web script, and is specifically configured to record information of rendering the web content and upload the information to the server, where the information includes information of rendering the web content and information of shielding the web content by the client.
According to a preferred embodiment of the present application, the monitoring unit is configured at the server, and specifically configured to:
monitoring a rendering log to determine shielded webpage contents with a shielding condition meeting a first preset requirement, and informing the strategy replacement unit to replace an anti-shielding strategy for the shielded webpage contents; alternatively, the first and second electrodes may be,
monitoring a rendering log to determine a client type with a webpage content shielding condition meeting a second preset requirement, and informing the strategy replacement unit to replace an anti-shielding strategy aiming at the client type; alternatively, the first and second electrodes may be,
monitoring the rendering logs and counting the shielding condition of each type of client to each webpage content, and if the shielding condition of a certain client type to a certain webpage content meets a third preset requirement, informing the policy replacement unit to replace the anti-shielding policy for the access request of the client type to the webpage content.
According to a preferred embodiment of the present application, the policy replacing unit is configured at the server, and is specifically configured to:
issuing the replaced anti-shielding strategy configuration information through a configuration platform for reading a webpage script; alternatively, the first and second electrodes may be,
and issuing a webpage script adopting the replaced anti-shielding strategy in the webpage.
According to a preferred embodiment of the present application, the replacement anti-shielding strategy includes at least one of:
writing DOM style information in a line;
disabling a style name indicating promotional information;
replacing the label of the shielded webpage content;
asynchronously rendering the shielded webpage content;
the insertion position of the shielded web page content is changed.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods described above.
In a fourth aspect, the present application provides a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of the above.
The method and the device analyze the shielding mode of the client by monitoring the DOM changes in the rendered webpage content, and timely replace the shielded webpage content with the anti-shielding strategy by collecting and monitoring the rendering logs, so that the anti-shielding effect and timeliness are improved.
According to the method and the device, a mechanism of issuing the configuration information is adopted, the webpage codes do not need to be rewritten or the webpage templates do not need to be modified, the replacement of the anti-shielding strategy can be realized only by issuing the replaced anti-shielding configuration information, and the timeliness is further improved.
The device provided by the application can be used as a component in different projects, and has high portability.
The replacement mechanism of the anti-shielding strategy has high expandability, and besides the general anti-shielding strategy, developers can flexibly develop some private anti-shielding strategies according to actual conditions.
The application provides a plurality of anti-shielding strategies, which can be selected and utilized in a targeted manner according to actual conditions, so that the anti-shielding effect is further improved.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 illustrates an exemplary system architecture of an apparatus or method for anti-blocking web content to which embodiments of the present invention may be applied;
FIG. 2 is a flow chart of a main method provided by an embodiment of the present application;
FIG. 3 is a flowchart of a detailed method provided by an embodiment of the present application;
fig. 4 is a structural diagram of an anti-shielding device provided in an embodiment of the present application;
fig. 5 is a block diagram of an electronic device for implementing the anti-shielding method according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 shows an exemplary system architecture of an anti-blocking method or apparatus for web page content to which an embodiment of the present invention may be applied.
As shown in fig. 1, the system architecture may include a client and a server. The client installed and running on the terminal device may be a client such as a browser capable of rendering and presenting a webpage to a user. The client can interact with the server through the network. Wherein the network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal device may be various electronic devices capable of installing and operating the client. Including but not limited to smart phones, tablets, smart televisions, and the like.
In the application, the client can request the web page content from the server and render the web page content. The server may embed a web script, such as a js (javascript) script, in the web content sent to the client. The web script can be executed in the terminal device.
The webpage content anti-shielding device can be arranged and operated on the server side, and the server side can also issue partial functions to the webpage script to realize the webpage content anti-shielding device. It may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, and is not particularly limited herein. The server may be a single server or a server group consisting of a plurality of servers.
Fig. 2 is a flowchart of a main method provided in an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
in 201, the shielding information of the web page content by the client is analyzed by monitoring the change of DOM (Document Object Model) in the rendered web page content.
This step may be performed by a web script. And after the page is issued to the client, executing the webpage script embedded in the webpage. After rendering the web page content, the client often uses some shielding methods to shield part of the web page content. Therefore, the webpage script conducts DOM monitoring on the rendered webpage content. On one hand, whether the client side shields the webpage content is determined, and on the other hand, the shielding mode of the client side on the webpage content is determined.
In particular, the web script may monitor changes to the DOM through, for example, a MutationObserver interface, which provides the ability to monitor changes made to the DOM tree.
Generally, the shielding modes adopted by a client to shield webpage content mainly include three types:
the first is to remove a DOM node of a specific type, for example, remove a DOM node corresponding to promotion information.
The second method is to change the style of a DOM node of a specific type, for example, to change the style of the DOM node corresponding to the promotion information into transparent.
The third is to intercept a request of a specific path, for example, an access request of a specific domain name.
At 202, a rendering log is collected, the rendering log including client-side shielding information for web page content.
The recording of the rendering log may be performed by a web script. The webpage script records the rendering log according to the rendering condition of the webpage content. Wherein rendering the log may include exposing the log and masking the log. The presentation log may record presentation information of the web content, and the mask log may record information of the web content masked by the client, which may include, for example, a masked web content identifier, client information, and a masking manner.
The maintenance of the rendering log can be executed by a log platform of the server, namely, each webpage script reports the rendering log recorded by the script to the log platform in real time or at regular time. And maintaining and counting by the log platform.
In 203, the rendering log is monitored to replace the anti-shielding policy according to the shielding information of the client on the webpage content.
The step is executed by the server, wherein the monitoring of the rendering log can be executed by a log platform of the server, and the replacement of the anti-shielding strategy can be executed by a configuration platform.
The specific implementation of this step may include, but is not limited to, the following three ways:
the first mode is as follows: the server monitors the rendering log to determine shielded webpage contents with shielded conditions meeting preset first preset requirements, and the shielded webpage contents are replaced by the shielding prevention strategy.
The log platform can monitor the presentation log and the shielding log respectively to determine the shielding rate of the shielded content and determine the shielded webpage content with the shielding rate higher than a preset shielding rate threshold. The presentation log and the number of times of screening may also be monitored to determine the presentation rate of the screened content, and determine the screened web page content having a presentation rate lower than a preset presentation rate threshold. In addition, masked web page content whose masking number exceeds a preset threshold may also be used, and the like, which are not exhaustive herein.
For example, if the number of times a promotional message is displayed and the number of times b a promotional message is masked, the display rate may beShielding ratio of
In this way, if a piece of promotional information (e.g., an ad slot) is frequently masked, it indicates that the current anti-blocking policy for the promotional information has been broken by a plurality of clients, and the anti-blocking policy needs to be changed for the promotional information. Namely, when responding to the webpage access request containing the promotion information, the replaced anti-shielding strategy is adopted.
The second mode is as follows: the server monitors the rendering log to determine the client type of which the shielding condition of the webpage content meets a second preset requirement.
Similarly, the log platform can monitor the display log and the shielding log, count the shielding condition of each client type on the specific webpage content, and if the shielding rate of a certain client type on the specific webpage content is higher than a preset shielding rate threshold, change the anti-shielding strategy for the client type. Or if the presentation rate of a certain client type to specific webpage content is lower than a preset presentation rate threshold, replacing the anti-shielding strategy for the client type. Or if the shielding times of a certain client type to specific webpage contents exceed a preset shielding time threshold, replacing the anti-shielding strategy for the client type. And so on.
Because the shielding modes of the same type of client for specific webpage content such as promotion information are generally consistent, if the promotion information is frequently shielded by a certain type of client, the anti-shielding policy for the type of client is considered to be invalid, and the anti-shielding policy needs to be replaced for the type of client. Namely, when responding to the webpage access request of the client, the replaced anti-shielding strategy is adopted.
The third mode is as follows: the server side monitors the rendering log and counts the shielding condition of each type of client side to each webpage content; and if the shielding condition of a certain client type on certain webpage content meets a third preset requirement, replacing the anti-shielding strategy aiming at the access request of the client type on the webpage content.
Due to the fact that shielding capabilities of the client sides are stronger and stronger, the client sides can often adopt different shielding modes according to different webpage contents, and therefore shielding conditions of various webpage contents can be counted according to various client side types. For example, if the shielding rate of the client type 1 on the ad spot a exceeds a preset shielding rate threshold, or the presentation rate of the client type 1 on the ad spot a is lower than a preset presentation rate threshold, or the like, the anti-shielding policy may be replaced for the combination of the client type 1 and the ad spot a. Namely, when responding to the webpage access request containing the advertisement space a by the client type 1, the replaced anti-shielding strategy is adopted.
In this step, the mode of replacing the anti-shielding strategy can adopt, but is not limited to, the following two modes:
the first mode is as follows: and issuing the replaced anti-shielding strategy configuration information through the configuration platform, reading the configuration information by the webpage script and executing the replaced anti-shielding strategy.
The configuration platform may configure the replaced anti-blocking policy configuration information for the masked web content, the configuration information is sent along with the web page, and the web script reads the configuration information and executes the replaced anti-blocking policy.
When the anti-shielding strategy configuration information is sent, the configuration field can be added. For example, the format of the configuration field is:
${type}_${num}_${value}
the type value may be 0 or 1, with 0 representing a generic policy mechanism and 1 representing a developer-customized policy mechanism. The num value is used for indicating the identification of the anti-shielding strategy, and the value is the content of the anti-shielding strategy.
That is, some general anti-shadowing strategies may be employed in the system for use and selection. In addition, developers can flexibly develop some private anti-shielding strategies according to actual conditions and then issue the strategies through a configuration platform.
The second mode is as follows: and issuing a webpage script adopting the replaced anti-shielding strategy in the webpage.
The log platform, the configuration platform, and the like are logically divided, and may be implemented by being installed in one server of the server, or by being installed in a plurality of servers.
The "client" referred to in the embodiments of the present application may be a browser, or may be other clients capable of rendering and presenting web page content. In the following embodiments of the present application, a browser is described as an example.
The web content targeted by the anti-blocking in the present application may be a specified type of web content, and the following embodiments of the present application are described by taking the popularization content as an example.
Fig. 3 is a flowchart of a detailed method provided by an embodiment of the present application, and as shown in fig. 3, the method may include the following steps:
in 301, after the webpage is sent to the browser for rendering, the webpage script monitors DOM changes corresponding to the rendered promotion content to analyze whether the browser shields the promotion content; if not, executing 302, namely recording the display log, uploading to a log platform, and turning to 304; if so, 303 is performed.
The webpage script can monitor DOM changes corresponding to the rendered promotion content through the MutationObserver interface, so as to determine whether the promotion content is shielded and a specific shielding mode.
And if the browser does not shield the promotion content, recording a display log. For example, the identification of the promotional content, browser identification, presentation time, etc. may be recorded.
In 303, the webpage script analyzes the shielding mode adopted by the promotion content, records the shielding log, and uploads the shielding log to the log platform.
The shielding mode can include: removing the DOM node corresponding to the promotion content, changing the DOM node style corresponding to the promotion content and intercepting a request of a specific path.
The web script records a shielding log, such as the identification of the promotion content, the identification of the browser, the shielding mode, and the like. In the embodiment of the application, whether the log is displayed or shielded is uploaded to a log platform for unified maintenance.
At 304, the log platform maintains rendering logs including presentation logs and mask logs, collects and accounts the rendering logs.
And the log platform monitors the maintained rendering logs and monitors and counts the shielding condition of the popularization content of each browser. The monitoring and counting of the shielding status of the promotion content by each browser may include counting of indexes such as shielding rate, presentation rate, shielding times and the like of the promotion content. In this embodiment, the statistical masking rate is taken as an example.
Statistics may be performed, for example, using the data format shown in table 1 below:
TABLE 1
Browser identification | Promotion content identification | Number of masks | Number of presentations |
Browser 1 | Popularization content a | 80 | 20 |
Browser 1 | Popularization content b | 2 | 88 |
Browser 2 | Popularization content a | 60 | 40 |
Browser 2 | Popularization content b | 55 | 45 |
… | … | … | … |
In 305, if the shielding rate of a certain type of browser for a certain promotion content exceeds a preset shielding rate threshold, the developer side device is notified of the information of the shielding of the promotion content by the browser of the type.
Continuing with the example shown in table 1, assuming that the preset shielding rate threshold is 80%, it can be seen from table 1 that the shielding rate of the browser 1 on the promotion content a reaches 80%, and then the developer-side device may be notified with a message that the shielding rate of the browser 1 on the promotion content a reaches 80%.
The developer side device may be notified by means of, for example, mail, short message, or the like, and notify of, for example, the identifier of the promotion content that is masked, the browser identifier, the masking means, or the like.
In 306, the anti-shielding policy is replaced for the access request of the browser to the promotion content, and the configuration platform issues the replaced anti-shielding policy configuration information to the webpage script.
Continuing with the example shown in table 1, the anti-blocking policy may be replaced for the combination of browser 1 and promotion content a, and the replacement of the anti-blocking policy needs to be determined according to the shielding manner adopted by browser 1 for promotion content a. Accordingly, when the browser 1 responds to the webpage access request containing the promotion content a, the replaced anti-shielding strategy is adopted,
the format of the configuration information may be the same as that described in the first embodiment, and is not described herein again. The manner in which the anti-shield strategy is replaced is described in detail herein, and may specifically include, but is not limited to, the following:
the first mode is as follows: and writing DOM style information of the promotion content in a line. The labels are commonly used as div, span, h 1-h 6 labels, and the in-line Styles (Inline Styles) are adopted instead of using id or class labels.
The second mode is as follows: the style name indicating the promotion information is disabled. Usually, when the browser is used for shielding promotion content, matching is performed through a keyword "ad" and the like, so that the style name of the "ad" and the like can be forbidden.
The third mode is as follows: and replacing the label shielded with the promotion information. For example, if the original promotional content uses a div tag, but is recognized and masked by the browser, the promotional content may be replaced with a promotional content using h1 tag, etc.
The fourth mode is that: the masked web page content is rendered asynchronously. When the promotion content is shielded by a plurality of browsers, the DOM corresponding to the promotion content is changed or removed after the webpage content is rendered. If an asynchronous rendering mode is adopted for the promotion content, namely after the rendering of other webpage contents except the promotion content is completed, the promotion content is requested to be obtained and rendered from the server, and therefore the shielding difficulty of the browser on the promotion content is increased.
The fifth mode is as follows: the insertion position of the shielded web page content is changed. If the browser shields the promotion content according to the DOM position of the promotion content, the DOM position of the promotion content can be replaced.
At 307, the web script reads the anti-blocking policy configuration information and executes the replaced anti-blocking policy. Proceed to execution 301.
And after the webpage script reads the anti-shielding strategy configuration information, executing the replaced anti-shielding strategy according to the configuration information in the executing process.
In the application, a mode of issuing the anti-shielding policy configuration information by the configuration platform is taken as an example, in addition, a mode of directly issuing a webpage script which adopts the replaced anti-shielding policy can be adopted, so that the replaced anti-shielding policy is executed during execution.
After the anti-blocking policy is changed, the web script proceeds to 301 to perform the process of listening for DOM changes and logging.
The above is a detailed description of the method provided in the present application, and the following is a detailed description of the apparatus provided in the present application with reference to the embodiments.
Fig. 4 is a structural diagram of an anti-shielding apparatus provided in an embodiment of the present application, and as shown in fig. 4, the apparatus may include: the monitoring unit 01, the log collecting unit 02, the monitoring unit 03 and the policy replacing unit 04, and may further include a notifying unit 05. The main functions of each component unit are as follows:
and the monitoring unit 01 is used for analyzing the shielding information of the webpage content by the client by monitoring the DOM change in the rendered webpage content.
Specifically, the monitoring unit 01 may be configured as a web script, configured to monitor changes in the DOM in the rendered web content, for example, monitor changes in the DOM through, for example, a MutationObserver interface, and determine whether the client masks the web content and a manner in which the client masks the web content. Wherein the masking may include removing the DOM, altering the DOM pattern, or intercepting a request for a particular path.
And the log collection unit 02 is used for collecting a rendering log, wherein the rendering log comprises shielding information of the client on the webpage content.
Specifically, the log collection unit 02 may be configured as a web script to record information that the web content is rendered and upload to the server, including information that the web content is displayed and information that the web content is masked by the client. For example, a rendering log may be recorded and uploaded to a log platform of the server, where the rendering log includes a presentation log and a mask log.
The information that the webpage content is shielded may include: the masked webpage content identification, the client information and the masking mode.
And the monitoring unit 03 is configured to monitor the rendering log and notify the policy replacing unit 04 of replacing the anti-shielding policy according to the shielding information of the client on the web content.
The maintenance and monitoring of the rendering log can be executed by a log platform of the server, the log platform can respectively monitor the display log and the shielding log, and one of the following modes is adopted:
the first mode is as follows: monitoring a rendering log to determine shielded webpage contents with a shielding condition meeting a first preset requirement, and informing the policy replacement unit to replace an anti-shielding policy for the shielded webpage contents.
The second mode is as follows: and monitoring the rendering log to determine the client type with the shielding condition of the webpage content meeting a second preset requirement, and informing the strategy replacement unit to replace the anti-shielding strategy aiming at the client type.
The third mode is as follows: monitoring the rendering logs and counting the shielding condition of each type of client to each webpage content, and if the shielding condition of a certain client type to a certain webpage content meets a third preset requirement, informing the policy replacement unit to replace the anti-shielding policy for the access request of the client type to the webpage content.
A notification unit 05, configured to notify the developer side device of information that the anti-blocking policy needs to be replaced. Specifically, the developer side device may be notified of information that the shielding status of the web page content meets a first preset requirement, the developer side device may be notified of information that the shielding status of the client side to the web page content meets a second preset requirement, and the developer side device may be notified of information that the shielding status of the specific client side type to the web page content meets a third preset requirement.
And the strategy replacing unit 04 is used for replacing the anti-shielding strategy.
Specifically, the policy replacing unit 04 may replace the anti-shielding policy in, but not limited to, the following two ways:
the first mode is as follows: and issuing the replaced anti-shielding strategy configuration information through the configuration platform for the webpage script to read.
The second mode is as follows: and issuing a webpage script adopting the replaced anti-shielding strategy in the webpage.
Wherein, the replacement anti-shielding strategy comprises at least one of the following modes:
the first mode is as follows: the DOM style information is written within a line.
The second mode is as follows: the style name indicating the promotion information is disabled.
The third mode is as follows: the label of the masked web page content is replaced.
The fourth mode is that: the masked web page content is rendered asynchronously.
The fifth mode is as follows: the insertion position of the shielded web page content is changed.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 5 is a block diagram of an electronic device according to an anti-shielding method of the embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 5, the electronic apparatus includes: one or more processors 501, memory 502, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 5, one processor 501 is taken as an example.
The memory 502, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the anti-blocking method in the embodiments of the present application. The processor 501 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 502, that is, implements the anti-blocking method in the above-described method embodiments.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to an electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the anti-shielding method may further include: an input device 503 and an output device 504. The processor 501, the memory 502, the input device 503 and the output device 504 may be connected by a bus or other means, and fig. 5 illustrates the connection by a bus as an example.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or other input devices. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
From the above description, it can be seen that the method, apparatus, device, and computer storage medium provided by the present application have the following advantages:
1) according to the method and the device, the shielding mode of the client is analyzed by monitoring the DOM changes in the rendered webpage content, the rendering log is collected and monitored to timely replace the shielding-proof strategy for the shielded webpage content, and compared with the mode of manually analyzing and rewriting the webpage code, the timeliness is higher. And under the condition that the shielding mode is changed at the client, the anti-shielding strategy can be timely and flexibly changed, and the anti-shielding effect is effectively improved.
2) By adopting a mechanism of issuing the configuration information, the replacement of the anti-shielding strategy can be realized only by issuing the replaced anti-shielding configuration information without rewriting the webpage codes or modifying the webpage template, and the timeliness is further improved.
3) The device provided by the application can be used as a component in different projects, and has high portability.
4) The replacement mechanism of the anti-shielding strategy has high expandability, and besides the general anti-shielding strategy, developers can flexibly develop some private anti-shielding strategies according to actual conditions.
5) The application provides a plurality of anti-shielding strategies, which can be selected and utilized in a targeted manner according to actual conditions, so that the anti-shielding effect is further improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (18)
1. An anti-shielding method for web page contents, comprising:
analyzing the shielding information of the webpage content by the client by monitoring the change of a Document Object Model (DOM) in the rendered webpage content;
collecting a rendering log, wherein the rendering log comprises shielding information of a client on webpage content;
and monitoring the rendering log so as to replace an anti-shielding strategy according to the shielding information of the client on the webpage content.
2. The method according to claim 1, wherein analyzing the shielding information of the web page content by the client by monitoring the rendered web page content for changes in the document object model DOM comprises:
the webpage script monitors the change of DOM in the rendered webpage content, and determines whether the client side shields the webpage content or not and the shielding mode adopted by the client side to the webpage content.
3. The method of claim 1, wherein the collecting rendering logs comprises:
the webpage script records information of rendered webpage content and uploads the information to the server, wherein the information comprises information of the displayed webpage content and shielding information of the client on the webpage content.
4. The method of claim 1, wherein the client's screening information for web page content comprises:
the masked webpage content identification, the client information and the masking mode.
5. The method of claim 1, wherein monitoring the rendering log to replace the anti-blocking policy based on the blocking information of the client to the web content comprises:
the server monitors the rendering log to determine shielded webpage contents with a shielding condition meeting a first preset requirement;
and replacing the anti-shielding strategy aiming at the shielded webpage content.
6. The method of claim 1, wherein monitoring the rendering log to replace the anti-blocking policy based on the blocking information of the client to the web content comprises:
the server monitors the rendering log to determine the client type of the webpage content, wherein the shielding condition of the webpage content meets a second preset requirement;
and replacing the anti-shielding strategy aiming at the client type.
7. The method of claim 1, wherein monitoring the rendering log to replace the anti-blocking policy based on the blocking information of the client to the web content comprises:
the server side monitors the rendering log and determines the shielding condition of each type of client side to each webpage content;
and if the shielding condition of a certain client type on certain webpage content meets a third preset requirement, replacing the anti-shielding strategy aiming at the access request of the client type on the webpage content.
8. The method of claim 1, wherein the replacement anti-blocking policy comprises:
the server side issues the replaced anti-shielding strategy configuration information through the configuration platform so as to be read by the webpage script; alternatively, the first and second electrodes may be,
and the server side issues the webpage script adopting the replaced anti-shielding strategy in the webpage.
9. The method of claim 1, wherein the replacement anti-shadowing policy comprises at least one of:
writing DOM style information in a line;
disabling a style name indicating promotional content;
replacing the label of the shielded webpage content;
asynchronously rendering the shielded webpage content;
the insertion position of the shielded web page content is changed.
10. The method of any of claims 1 to 9, wherein the masked web content comprises promotional information.
11. An anti-blocking device for web content, comprising: the device includes:
the monitoring unit is used for analyzing the shielding information of the webpage content from the client by monitoring the change of a Document Object Model (DOM) in the rendered webpage content;
the log collection unit is used for collecting a rendering log, and the rendering log comprises shielding information of the client on webpage content;
the monitoring unit is used for monitoring the rendering log and informing the strategy replacement unit to replace the anti-shielding strategy according to the shielding information of the client on the webpage content;
and the strategy replacing unit is used for replacing the anti-shielding strategy.
12. The apparatus according to claim 11, wherein the monitoring unit is configured to be a web script, and specifically configured to monitor a DOM change in the rendered web content, and determine whether the client performs the shielding on the web content and a shielding manner adopted by the client on the web content.
13. The apparatus according to claim 11, wherein the log collection unit is configured as a web script, and is specifically configured to record information of rendering the web content and upload the information to the server, including information of rendering the web content and information of shielding the web content by the client.
14. The apparatus according to claim 12, wherein the monitoring unit is configured at the server, and is specifically configured to:
monitoring a rendering log to determine shielded webpage contents with a shielding condition meeting a first preset requirement, and informing the strategy replacement unit to replace an anti-shielding strategy for the shielded webpage contents; alternatively, the first and second electrodes may be,
monitoring a rendering log to determine a client type with a webpage content shielding condition meeting a second preset requirement, and informing the strategy replacement unit to replace an anti-shielding strategy aiming at the client type; alternatively, the first and second electrodes may be,
and monitoring the rendering log and determining the shielding condition of each type of client to each webpage content, and if the shielding condition of a certain client type to a certain webpage content meets a third preset requirement, informing the policy replacement unit to replace the anti-shielding policy for the access request of the client type to the webpage content.
15. The apparatus according to claim 11, wherein the policy changing unit is configured at the server, and is specifically configured to:
issuing the replaced anti-shielding strategy configuration information through a configuration platform for reading a webpage script; alternatively, the first and second electrodes may be,
and issuing a webpage script adopting the replaced anti-shielding strategy in the webpage.
16. The apparatus of claim 11, wherein the replacement anti-shadowing policy comprises at least one of:
writing DOM style information in a line;
disabling a style name indicating promotional information;
replacing the label of the shielded webpage content;
asynchronously rendering the shielded webpage content;
the insertion position of the shielded web page content is changed.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911273895.5A CN111177702B (en) | 2019-12-12 | 2019-12-12 | Webpage content anti-shielding method, device, equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911273895.5A CN111177702B (en) | 2019-12-12 | 2019-12-12 | Webpage content anti-shielding method, device, equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111177702A true CN111177702A (en) | 2020-05-19 |
CN111177702B CN111177702B (en) | 2023-01-13 |
Family
ID=70646364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911273895.5A Active CN111177702B (en) | 2019-12-12 | 2019-12-12 | Webpage content anti-shielding method, device, equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111177702B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113688339A (en) * | 2021-07-26 | 2021-11-23 | 珠海金山办公软件有限公司 | Information loading method and device, electronic equipment and computer storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103679487A (en) * | 2012-09-05 | 2014-03-26 | 阿里巴巴集团控股有限公司 | Advertisement display monitoring method and device |
CN104580244A (en) * | 2015-01-26 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Method and device for defending against malicious click |
US20170264712A1 (en) * | 2016-03-09 | 2017-09-14 | Sourcepoint Technologies Inc. | Content blocker detection and circumvention |
CN108243249A (en) * | 2018-01-04 | 2018-07-03 | 网宿科技股份有限公司 | Anti- screen method, content distributing network and the client of a kind of web advertisement |
US20180314676A1 (en) * | 2017-04-28 | 2018-11-01 | Microsoft Technology Licensing, Llc | Web page nonintrusive content protection on user device |
CN109150965A (en) * | 2018-07-06 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | The anti-screen method of information resources, device, computer equipment and storage medium |
CN109325192A (en) * | 2018-10-11 | 2019-02-12 | 网宿科技股份有限公司 | A kind of method and apparatus of the anti-shielding of advertisement |
CN109669580A (en) * | 2018-12-28 | 2019-04-23 | 努比亚技术有限公司 | False-touch prevention operating method, mobile terminal and computer readable storage medium |
CN109948080A (en) * | 2019-03-18 | 2019-06-28 | 西安电子科技大学 | A kind of counteradvertising based on machine learning intercepts the application method of detection system |
-
2019
- 2019-12-12 CN CN201911273895.5A patent/CN111177702B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103679487A (en) * | 2012-09-05 | 2014-03-26 | 阿里巴巴集团控股有限公司 | Advertisement display monitoring method and device |
CN104580244A (en) * | 2015-01-26 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Method and device for defending against malicious click |
US20170264712A1 (en) * | 2016-03-09 | 2017-09-14 | Sourcepoint Technologies Inc. | Content blocker detection and circumvention |
US20180314676A1 (en) * | 2017-04-28 | 2018-11-01 | Microsoft Technology Licensing, Llc | Web page nonintrusive content protection on user device |
CN108243249A (en) * | 2018-01-04 | 2018-07-03 | 网宿科技股份有限公司 | Anti- screen method, content distributing network and the client of a kind of web advertisement |
CN109150965A (en) * | 2018-07-06 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | The anti-screen method of information resources, device, computer equipment and storage medium |
CN109325192A (en) * | 2018-10-11 | 2019-02-12 | 网宿科技股份有限公司 | A kind of method and apparatus of the anti-shielding of advertisement |
CN109669580A (en) * | 2018-12-28 | 2019-04-23 | 努比亚技术有限公司 | False-touch prevention operating method, mobile terminal and computer readable storage medium |
CN109948080A (en) * | 2019-03-18 | 2019-06-28 | 西安电子科技大学 | A kind of counteradvertising based on machine learning intercepts the application method of detection system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113688339A (en) * | 2021-07-26 | 2021-11-23 | 珠海金山办公软件有限公司 | Information loading method and device, electronic equipment and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111177702B (en) | 2023-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10701030B2 (en) | Real-time monitoring of web page code | |
US11868373B2 (en) | Method and apparatus for monitoring an in-memory computer system | |
US9696894B2 (en) | Analytic process design | |
US10097440B2 (en) | User interface element adjustment using web analytics | |
US12021939B2 (en) | System and method analyzing actual behavior of website visitors | |
US9501377B2 (en) | Generating and implementing data integration job execution design recommendations | |
US20180123922A1 (en) | Correlating performance outliers and network performance impacting event metric | |
CN112527748A (en) | Method, device, equipment and storage medium for analyzing user operation behaviors | |
US8972338B2 (en) | Sampling transactions from multi-level log file records | |
CN110570217A (en) | cheating detection method and device | |
Bao et al. | Tracking and Analyzing Cross-Cutting Activities in Developers' Daily Work (N) | |
CN111177702B (en) | Webpage content anti-shielding method, device, equipment and computer storage medium | |
WO2021189766A1 (en) | Data visualization method and related device | |
US8566345B2 (en) | Enterprise intelligence (‘EI’) reporting in an EI framework | |
WO2013143407A1 (en) | Data processing, data collection | |
US10318650B2 (en) | Identifying corrupted text segments | |
GB2521637A (en) | Messaging digest | |
US20180314765A1 (en) | Field name recommendation | |
US9659266B2 (en) | Enterprise intelligence (‘EI’) management in an EI framework | |
US9639815B2 (en) | Managing processes in an enterprise intelligence (‘EI’) assembly of an EI framework | |
US9952773B2 (en) | Determining a cause for low disk space with respect to a logical disk | |
Chen et al. | System-Level Data Management for Endpoint Advanced Persistent Threat Detection: Issues, Challenges and Trends | |
US8893289B1 (en) | Internal privacy invasion detection and prevention system | |
US9646278B2 (en) | Decomposing a process model in an enterprise intelligence (‘EI’) framework | |
US20220171670A1 (en) | Adaptive log analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |