CN106326316B - Webpage advertisement filtering method and device - Google Patents
Webpage advertisement filtering method and device Download PDFInfo
- Publication number
- CN106326316B CN106326316B CN201510399154.7A CN201510399154A CN106326316B CN 106326316 B CN106326316 B CN 106326316B CN 201510399154 A CN201510399154 A CN 201510399154A CN 106326316 B CN106326316 B CN 106326316B
- Authority
- CN
- China
- Prior art keywords
- webpage
- filtering
- advertisement
- node
- module
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A web advertisement filtering method, comprising: the method comprises the steps of detecting a filtering instruction of a user and a filtering area selected in a webpage, determining a webpage target node corresponding to the filtering area, updating attribute parameters in a webpage advertisement filtering rule corresponding to the filtering area according to attributes of the webpage target node, receiving an instruction for confirming filtering, and filtering webpage element nodes corresponding to the filtering rule. Meanwhile, the webpage advertisement filtering device is provided, and the corresponding webpage element nodes are filtered by instantly generating the filtering rules according to the webpage content to be filtered selected by the user, so that the webpage content is filtered in time, the operation is simpler, and the efficiency is higher.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for filtering webpage advertisements.
Background
A web browser (hereinafter referred to as a browser) is a software that displays files in a web server or file system and allows a user to interact with the files. It is used to display text, images and other information in the world wide web or local area network. These texts or images can be hyperlinks to other web sites, so that the user can browse various information quickly and easily. The web pages are typically in the format of HyperText Markup Language (HTML). The browser at the PC end generally realizes the advertisement filtering function by integrating an adblock plugin, and the adblock plugin intercepts advertisement requests or filters advertisement contents in pages through a group of advertisement filtering rules so as to achieve the purpose of advertisement filtering. Most browsers of mobile terminals can not use adblock plug-ins, and the advertisement filtering function is realized according to the principle of the adblock plug-ins.
In the prior art, advertisement filtering is realized according to filtering rules, and because the content and the form of a webpage are always changed and new websites are continuously appeared, the filtering rules need to be continuously updated in order to achieve good advertisement filtering effect. The method for updating the filtering rules may be automatic updating of the browser, but the updating method has a long updating period, may update with the pace of publishing or once per month, and covers the websites incompletely, because of limited resources, the browser generally only advertises and filters a part of commonly used websites, many other websites are likely to be uncovered, and the maintenance cost is high, and a special developer is required to continuously monitor the adverting and filtering conditions of the commonly used websites and write new filtering rules. The filtering rules can be updated manually by users, but the updating method has high operation cost and operation threshold because many users do not know how to update the advertisement filtering rules and many users do not know how to write the filtering rules.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for filtering a web advertisement, which filter a corresponding web element node by generating a new advertisement filtering rule in real time according to a web advertisement selected by a user to be filtered, so as to filter the web advertisement in time, and have the advantages of simple operation and high efficiency.
The embodiment of the invention provides a webpage advertisement filtering method, which comprises the following steps:
detecting a filtering instruction of a user and a filtering area selected in a webpage; determining a webpage target node corresponding to the filtering area; updating attribute parameters in the webpage advertisement filtering rules corresponding to the filtering area according to the attributes of the webpage target nodes, and prompting the user to confirm filtering; and receiving a command for confirming the filtering, and filtering the webpage element nodes corresponding to the updated webpage advertisement filtering rule.
The embodiment of the invention provides a webpage advertisement filtering device, which comprises:
the detection module is used for detecting a filtering instruction of a user and a filtering area selected in a webpage; the determining module is used for determining a webpage target node corresponding to the filtering area; the updating module is used for updating the attribute parameters in the webpage advertisement filtering rules corresponding to the filtering areas according to the attributes of the webpage target nodes; the prompting module is used for prompting the user to confirm the filtering; the receiving module is used for receiving a filtering confirming instruction by a user; and the filtering module is used for filtering the webpage element nodes corresponding to the webpage advertisement filtering rules updated by the updating module.
According to the webpage advertisement filtering method and device of the embodiment, the user selects the area where the webpage content to be filtered is located, the browser automatically updates the filtering rule of the webpage content according to the selection of the user and filters the webpage element nodes corresponding to the filtering rule so as to achieve the purpose of filtering the webpage content, and when the webpage is loaded again, the filtering rule is executed immediately so that the filtered webpage content does not appear any more, the operation is simpler, the efficiency is higher, and the filtering rule is updated quickly. And the user selects the filtered webpage content according to the preference of the user, so that the operation pertinence is stronger.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
FIG. 1 is a flowchart illustrating a method for filtering web advertisements according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a pop-up webpage advertisement scenario when browsing a page in the embodiment of the present invention;
FIG. 3 is a schematic view illustrating a pop-up webpage advertisement operation menu in an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a scenario of selecting a web advertisement to be filtered according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a pop-up webpage advertisement filtering confirmation interface in an embodiment of the present invention;
fig. 6 is a schematic flowchart of a web advertisement filtering method according to a second embodiment of the present invention;
FIG. 7 is a schematic diagram of a webpage advertisement filtering rule management interface according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a web advertisement filtering device according to a third embodiment of the present invention;
fig. 9 is a schematic diagram of a web advertisement filtering apparatus according to a fourth embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, features and effects according to the present invention will be made with reference to the accompanying drawings and preferred embodiments.
The webpage advertisement filtering method provided by the embodiment of the invention can be used as a webpage advertisement filtering mode alone, can also be used together with the existing adblock advertisement plug-in to filter webpage advertisements, and has a wide application range. The web page content in the following embodiments takes the web page advertisement as an example, and other web page content also uses the web page advertisement filtering method provided by the embodiments of the present invention.
Referring to fig. 1, a method for filtering web advertisements according to a first embodiment of the present invention includes:
101. detecting a filtering instruction of a user and a filtering area selected in a webpage;
the embodiment of the invention can be suitable for mobile terminals and PC computer terminals. When the mobile terminal is in a suitable scene, a user performs gesture operation, for example, a finger presses a touch screen for a long time in a region to be filtered, when the user moves a mouse to the region to be filtered in the suitable scene of the PC computer terminal, and after the browser detects the gesture and the mouse operation, the browser judges that the user needs to filter the content of the current webpage, and pops up an operation menu.
Further, there is a filtering instruction in the operation menu, the user selects the filtering instruction, and the browser prompts the user to select a filtering area. The user selects the filtering area on the screen through a finger or selects the filtering area through a mouse, and the browser detects the filtering instruction of the user and simultaneously detects the filtering area selected by the user in the webpage. And, in order to highlight the filtering area, the frame of the filtering area is set to a special format, for example, the frame is highlighted by a thick black line, the special format is preset in the system, and when the filtering area is determined, the special format is automatically used.
Taking the example of filtering the web page advertisement in the current web page by the user, please refer to fig. 2, when the user browses the web page through the browser, the web page advertisement 202 pops up at the lower right corner of the page 201, the user performs a specific operation at the web page advertisement position, for example, the user clicks a right mouse button at the PC computer terminal, or presses a finger on the touch screen for a long time to call up an operation menu, at this time, the browser pops up the operation menu after detecting the operation of the mouse or the finger, the operation menu has options related to the filtering advertisement, fig. 3 shows that there is an option of "shielding the advertisement" in the popped up operation menu 203, after the user clicks the option, the web page advertisement to be filtered is selected by the operation of the mouse, the handwriting device or the finger, and the portion surrounded by the black frame 204 highlighted by the thick black line in fig. 4 is the web page advertisement to be filtered selected by the user.
102. Determining a webpage target node corresponding to the filtering area;
and determining a webpage target node corresponding to the filtering area selected by the user, wherein the webpage target node is a webpage element node with the same specified measurement value as the filtering area. The web page element node refers to a Document Object Model (dom) node.
dom defines the criteria for accessing HTML and XML documents, i.e., the entire document is a document node, each HTML tag is an element node, the text contained in the HTML is a text node, and each HTML attribute is an attribute node.
For example, the contents of an HTML document are as follows:
<html>
<head>
<title>DOM Tutorial</title>
</head>
<body>
<h1>DOM Lesson one</h1>
<p>Hello world!</p>
</body>
</html>
then, among them < head >, < body >, < title >, < p >, hello world! Etc. are all nodes.
103. Updating the attribute parameters in the webpage advertisement filtering rules corresponding to the filtering area according to the attributes of the webpage target nodes, and prompting the user to confirm filtering;
the web page advertisement filtering rules are expressed by attributes and attribute values, and the existing web page advertisement rules can be updated by updating different attribute parameters such as the attributes and the attribute values, so that the web page advertisement filtering rules corresponding to the filtering area are obtained.
Specifically, the web advertisement filtering rules are preset in the system, and a corresponding new web advertisement filtering rule can be obtained by updating each parameter in the rules. And the attribute of each webpage target node has a corresponding attribute value (value), and the attribute parameters in the webpage advertisement filtering rule are updated according to the attributes of the webpage target nodes in the filtering area, so that the webpage advertisement filtering rule corresponding to the filtering area is obtained. The web page content that meets the attribute value is filtered, and not only the web page advertisement content. For example: if the target node of the web page is div, the information of the div node may be:
<div class="z-catalog nslog-area log-set-param"log-set-param="catalogshow"Data-nslog-type="1016"id="catalog-0"date-subindex="0"style="width:310px;Background-image:url(/static/lemma/view3/img/cate_top_15.png);">…</div>
the attributes include class, id, style and the like, and the web advertisement filtering rule can be formulated through a plurality of attributes and attribute values, and can be as follows:
the domain name # # # domTagName [ attribute1= value1] [ attribute2= value2].
Where dom is the web page target node.
For example, the web page advertisement filtering rule qq.com # # # div [ id = "abc" ] [ class = "def" ] indicates that the in-page attribute with the domain name qq.com satisfies id attribute value abc, and the div node with class attribute value def is filtered.
Further, the user may be prompted to confirm the filtering, which may be a confirmation interface for pop-up web advertisement filtering as shown in fig. 5. The confirmation interface comprises a filter prompt message, and two selection buttons of cancel and confirm, wherein the content of the filter prompt message can be' do you want to shield the selected advertisement? When the user selects to cancel, the filtering of the webpage advertisement is cancelled, and when the user selects to determine, the filtering of the webpage advertisement is executed.
104. And receiving a command for confirming filtering, and filtering the webpage element nodes corresponding to the updated webpage advertisement filtering rule.
After receiving the instruction for confirming the filtering, the browser filters the webpage element nodes corresponding to the updated webpage advertisement filtering rule, so that the webpage content corresponding to the filtering area selected by the user is filtered, namely, the webpage advertisement selected by the user is filtered, and the webpage advertisement can be filtered when the user visits the webpage next time and cannot be displayed on the webpage.
In the embodiment of the invention, the user selects the area where the webpage advertisement to be filtered is located, the browser automatically updates the corresponding filtering rule according to the selection of the user and filters the webpage element nodes corresponding to the filtering rule so as to achieve the purpose of filtering the webpage content, and when the webpage is loaded again, the filtered webpage content does not appear any more, the operation is simpler, the efficiency is higher, and the filtering rule is updated quickly. And the user selects the filtered webpage content according to the preference of the user, so that the operation pertinence is stronger.
Referring to fig. 6, a web advertisement filtering method according to a second embodiment of the present invention includes:
201. detecting a filtering instruction of a user and a filtering area selected in a webpage;
the embodiment of the invention can be suitable for mobile terminals and PC computer terminals. When the mobile terminal is in a suitable scene, a user performs gesture operation, for example, a finger presses a touch screen for a long time in a region to be filtered, when the user moves a mouse to the region to be filtered in the suitable scene of the PC computer terminal, and after the browser detects the gesture and the mouse operation, the browser judges that the user needs to filter the content of the current webpage, and pops up an operation menu.
Further, there is a filtering instruction in the operation menu, the user selects the filtering instruction, and the browser prompts the user to select a filtering area. The user selects the filtering area on the screen through a finger or selects the filtering area through a mouse, and the browser detects the filtering instruction of the user and simultaneously detects the filtering area selected by the user in the webpage. And, in order to highlight the filtering area, the frame of the filtering area is set to a special format, for example, the frame is highlighted by a thick black line, the special format is preset in the system, and when the filtering area is determined, the special format is automatically used.
Taking the example of filtering the web page advertisement in the current web page by the user, please refer to fig. 2, when the user browses the web page through the browser, the web page advertisement 202 pops up at the lower right corner of the page 201, the user performs a specific operation at the web page advertisement position, for example, the user clicks a right mouse button at the PC computer terminal, or presses a finger on the touch screen for a long time to call up an operation menu, at this time, the browser pops up the operation menu after detecting the operation of the mouse or the finger, the operation menu has options related to the filtering advertisement, fig. 3 shows that there is an option of "shielding the advertisement" in the popped up operation menu 203, after the user clicks the option, the web page advertisement to be filtered is selected by the operation of the mouse, the handwriting device or the finger, and the portion surrounded by the black frame 204 highlighted by the thick black line in fig. 4 is the web page advertisement to be filtered selected by the user.
202. Determining a webpage element node of the center of the filtering area in a webpage;
determining the center point of the filtering area selected by the user, acquiring the coordinate P (centerX, centerY) of the center point in the page, and further confirming the webpage element (dom) node corresponding to the coordinate.
203. Judging whether the specified metric value of the webpage element node conforms to the specified metric value of the area or not;
the specified metric values refer to width and height. Further, the width and height of the dom node are obtained, and whether the width and height of the dom node are consistent with the width and height of the filtering area selected by the user or not is judged.
If yes, go to step 204; if not, go to step 205.
204. Saving the webpage element node as the webpage target node;
if the width and the height of the dom node are consistent with the width and the height of the filtering area selected by the user, the dom node needing filtering is successfully found and stored as a webpage target node.
205. Searching father nodes with the specified metric value conforming to the specified metric value of the area in each level of father nodes of the webpage element nodes, and storing the first found father node conforming to the conditions as a webpage target node;
if the width and the height of the dom node do not accord with the width and the height of the filtering area selected by the user, searching a father node of the dom node, and judging whether the width and the height of the father node accord with the width and the height of the filtering area selected by the user, so that the father node is searched for being empty step by step upwards, if no dom node which accords with the conditions is found in the searching process, the searching is considered to be failed, and if the dom node which accords with the conditions is found, the dom node is stored as a webpage target node.
The above process may be summarized as searching for a node having a width and height that are consistent with the width and height of the filtering area selected by the user from the web page element node and its parent node, and recording the first searched node as the web page target node.
206. Acquiring the attribute and the attribute value of the target node of the webpage;
and acquiring the attribute and the attribute value of the target node of the webpage, wherein the attribute of the target node of the webpage has a corresponding attribute value (value), and the webpage element nodes conforming to the attribute value are filtered.
Specifically, each dom node may be identified by a combination of one or more attributes, the attributes of the dom node include class, id, style, and the like, and the attribute priority selected as the filtering rule for generating the web page advertisement is: id > class > style, i.e., if the dom node is identified by only one attribute as a filtering rule for generating web advertisements, id is preferred.
207. Updating the display state of the webpage element nodes with the same attributes and attribute values into a filter state, and prompting the user to confirm the filtering;
and updating the display state of the webpage element nodes with the same acquired attributes and attribute values into filtering, so that webpage advertisement filtering rules can be set through the attributes and attribute values of one or more webpage element nodes. For example, one web page advertisement filtering rule may be:
com # # # div [ id = "abc" ] [ class = "def" ] indicates that the in-page attribute with the domain name qq.com satisfies id attribute value abc, and the div node with class attribute value def is filtered.
The domain name # # # domTagName [ attribute1= value1] [ attribute2= value2].
Where dom is the web page target node. The web page element nodes satisfying [ attribute1= value1] and [ attribute2= value2] are filtered.
In this embodiment, each dom node may be identified by a combination of one or more attributes, where the priority of the selected attribute is: id > class > style, i.e. if a dom node is identified by only one attribute, the id attribute is preferably used.
Further, the user is prompted to confirm the filtering, such as the confirmation interface for pop-up web advertisement filtering shown in FIG. 5.
When the browser is started, analyzing all webpage advertisement filtering rules in the memory, judging whether the webpage advertisement filtering rules which are consistent with the currently loaded webpage domain name exist or not when the webpage loading is finished, if so, confirming the dom nodes to be filtered corresponding to the webpage advertisement filtering rules, specifically, filtering the dom nodes by calling related JS (JavaScript) sentences, and if not, not processing the dom nodes. And storing the generated webpage advertisement filtering rule in a memory to take effect immediately.
In a specific example, a user adds a webpage advertisement filtering rule generated by circling the webpage advertisement into the memory in time, the webpage advertisement filtering rule takes effect immediately, and the circled webpage advertisement is not popped up when the webpage is opened next time.
Further, the user can select or delete each webpage advertisement filtering rule through the webpage advertisement filtering rule management interface. Specifically, when the operation of managing the webpage advertisement filtering rules triggered by the user is detected, a management interface is displayed, webpage thumbnails corresponding to the webpage advertisement filtering rules and corresponding selection buttons are displayed in the management interface, and the currently effective webpage advertisement filtering rules are determined according to the selection operation of the user. Referring to fig. 7, fig. 7 is a web advertisement filtering rule management interface 701, and a user may determine whether to filter a corresponding web advertisement in a web page thumbnail by clicking a selection button 704 or 705 on the left side of the web page thumbnail 702 or 703 (which may be a web screenshot). Selection (selection button 704) indicates that filtering is required and deselection (selection button 705) indicates that filtering is not required. When the user selects, the user only needs to identify the webpage advertisements to be filtered through the webpage thumbnails and confirms whether to filter or not through clicking operation, and therefore the webpage advertisements filtering method is high in identifiability and simple in operation.
207. And receiving a command for confirming filtering, and filtering the webpage element nodes corresponding to the webpage advertisement filtering rule.
After receiving the instruction for confirming the filtering, the webpage element nodes corresponding to the updated webpage advertisement filtering rule are filtered, so that the webpage content corresponding to the filtering area is filtered, namely, the webpage advertisements selected by the user are filtered, and the webpage advertisements can be filtered when the user visits the webpage next time and cannot be displayed on the webpage.
In the embodiment of the invention, the user selects the area where the webpage advertisement to be filtered is located, the browser automatically updates the filtering rule of the webpage advertisement according to the selection of the user and filters the webpage element nodes corresponding to the filtering rule so as to achieve the purpose of filtering the webpage content, and when the webpage is loaded again, the filtered webpage content does not appear any more, the operation is simpler, the efficiency is higher, and the filtering rule is updated quickly. And the user selects the filtered webpage content according to the preference of the user, so that the operation pertinence is stronger.
Referring to fig. 8, a third embodiment of the present invention provides a web advertisement filtering device, including:
a detection module 801, configured to detect a filtering instruction of a user and a filtering area selected in a web page;
a determining module 802, configured to determine a webpage target node corresponding to the filtering area;
an updating module 803, configured to update an attribute parameter in the web advertisement filtering rule corresponding to the filtering area according to the attribute of the web target node;
a prompt module 804 for prompting the user to confirm filtering;
a receiving module 805, which receives the instruction for confirming the filtering;
the filtering module 806 is configured to filter the webpage element nodes corresponding to the webpage advertisement filtering rule.
For other details of the technical solution for implementing each module in the apparatus of this embodiment, reference may be made to the description of the first embodiment, and details are not repeated here.
In the embodiment, the user selects the area where the webpage advertisement to be filtered is located, the browser automatically updates the filtering rule of the webpage advertisement according to the selection of the user, and filters the webpage element nodes corresponding to the filtering rule so as to achieve the purpose of filtering the webpage content, when the webpage is loaded again, the filtered webpage content does not appear, the operation is simpler, the efficiency is higher, and the filtering rule is updated quickly. And the user selects the filtered webpage content according to the preference of the user, so that the operation pertinence is stronger.
Referring to fig. 9, a web advertisement filtering device according to a fourth embodiment of the present invention includes:
a detecting module 901, configured to detect a filtering instruction of a user and a filtering area selected in a webpage;
a determining module 902, configured to determine a webpage target node corresponding to the filtering area;
an updating module 903, configured to update an attribute parameter in the web advertisement filtering rule corresponding to the filtering area according to the attribute of the web target node;
a prompt module 904 for prompting the user to confirm the filtering;
a receiving module 905 that the user receives the instruction for confirming the filtering;
and a filtering module 906, configured to filter the webpage element nodes corresponding to the webpage advertisement filtering rules updated by the updating module 903.
Wherein the determining module 902 comprises:
a determining submodule 9021, configured to determine a web page element node of the center of the filtering area in the web page;
a first determining module 9022, configured to determine whether the specified metric value of the web page element node matches the specified metric value of the filtering area;
a saving module 9023, configured to save the webpage element node as the webpage target node if the first determining module 9022 determines that the specified metric value of the webpage element node matches the specified metric value of the filtering area;
a searching submodule 9024, configured to, if the first determining module 9022 determines that the specified metric value of the web page element node does not match the specified metric value of the filtering area, gradually search, in each level of parent nodes of the web page element node, a parent node whose specified metric value matches the specified metric value of the filtering area;
the saving module 9023 is further configured to save the parent node meeting the condition, which is first found by the searching sub-module 9024, as the target node of the webpage.
The update module 903 includes:
an obtaining module 9031, configured to obtain an attribute and an attribute value of the target node of the web page;
and the updating sub-module 9032 is configured to update the display status of the web page element node that has the same attribute and attribute value as the attribute and the attribute value to filter.
Further, the apparatus further comprises:
the analysis module 907 is used for analyzing and reading all webpage advertisement filtering rules when the webpage is loaded;
the second determining module 908 is configured to determine whether a webpage advertisement filtering rule that the domain name of the loaded webpage conforms to exists.
The filtering module 906 is further configured to, if the second determining module 908 determines that the web advertisement filtering rule that the domain name of the loaded web page conforms to exists, filter the web element nodes having the same web element node attributes and attribute values as those in the web advertisement filtering rule that conforms to the web advertisement filtering rule.
The apparatus may further comprise:
a display module 909, configured to display a management interface in which a web page thumbnail corresponding to each web page advertisement filtering rule and a corresponding selection button are displayed when an operation of managing the web page advertisement filtering rules triggered by a user is detected.
Further, the determining module 902 is further configured to determine a currently effective web advertisement filtering rule according to the selection operation of the user.
For other details of the technical solution for implementing each module in the apparatus of this embodiment, reference may be made to the descriptions of the first and second embodiments, which are not repeated herein.
In the embodiment, the user selects the area where the webpage advertisement to be filtered is located, the browser automatically updates the filtering rule of the webpage advertisement according to the selection of the user, and filters the webpage element nodes corresponding to the filtering rule so as to achieve the purpose of filtering the webpage content, when the webpage is loaded again, the filtered webpage content does not appear any more, the operation is simpler, the efficiency is higher, and the filtering rule is updated quickly. And the user selects the filtered webpage content according to the preference of the user, so that the operation pertinence is stronger.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored, where the computer-readable storage medium is, for example, a non-volatile memory such as an optical disc, a hard disc, or a flash memory. The computer-executable instructions are used for making a computer or a similar operation device perform various operations in the data processing method.
Although the present invention has been described with reference to the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but is intended to cover various modifications, equivalents and alternatives falling within the spirit and scope of the invention.
Claims (12)
1. A method for filtering web advertisements is characterized by comprising the following steps:
popping up a webpage advertisement on a webpage, responding to a specific operation aiming at the webpage advertisement, popping up an operation menu, receiving a filtering instruction triggered based on the operation menu, and determining a filtering area in the webpage;
determining a central point of the filtering area and a coordinate of the central point in the webpage, and determining a webpage element node corresponding to the coordinate according to the coordinate;
acquiring an appointed measurement value of the filtering area, searching at least one webpage element node which is the same as the appointed measurement value of the filtering area from the webpage element node and a father node of the webpage element node, and taking a first webpage element node in the searched at least one webpage element node as a webpage target node corresponding to the filtering area; the webpage element node refers to a document object model node; the specified measurement value refers to the width and height of the webpage element node;
updating attribute parameters in the webpage advertisement filtering rules corresponding to the filtering area according to the attributes of the webpage target nodes to obtain the updated webpage advertisement filtering rules corresponding to the filtering area, and displaying a confirmation interface containing filtering prompt information, wherein the filtering prompt information is used for prompting to execute filtering operation aiming at the webpage advertisement, and the webpage advertisement filtering rules are determined based on the attributes and attribute values of the webpage element nodes;
receiving a filtering confirmation instruction selected by aiming at the confirmation interface, and filtering the webpage element nodes corresponding to the updated webpage advertisement filtering rule to filter the webpage content corresponding to the filtering area; the web page content includes web page advertisement content of the web page advertisement circled in the highlighted filtering area.
2. The method according to claim 1, wherein the searching for at least one web page element node having a same specified metric value as the filtering area from the web page element node and a parent node of the web page element node, and taking a first web page element node of the at least one web page element node that is found as a web page target node corresponding to the filtering area comprises:
determining a webpage element node of the center of the filtering area in a webpage;
when the specified metric value of the webpage element node is the same as the specified metric value of the filtering area, saving the webpage element node as the webpage target node;
and when the specified metric value of the webpage element node is different from the specified metric value of the filtering area, gradually searching parent nodes of which the specified metric value is consistent with the specified metric value of the filtering area in all levels of parent nodes of the webpage element node, and storing the first searched parent node which is consistent with the conditions as the webpage target node.
3. The method according to claim 2, wherein the updating the attribute parameters in the web page advertisement filtering rules corresponding to the filtering area according to the attributes of the web page target node comprises:
acquiring the attribute and the attribute value of the webpage target node;
and updating the display state of the webpage element nodes with the same attributes and attribute values into filtering.
4. The method of any of claims 1 to 3, further comprising:
when the webpage is loaded, analyzing and reading all webpage advertisement filtering rules;
judging whether a webpage advertisement filtering rule which is met by the domain name of the loaded webpage exists or not;
if yes, filtering the webpage element nodes with the same attribute and attribute value as the attribute of the webpage element nodes in the matched webpage advertisement filtering rule.
5. The method of claim 4, further comprising:
when detecting that a user triggers operation for managing the webpage advertisement filtering rules, displaying a management interface, wherein webpage thumbnails corresponding to the webpage advertisement filtering rules and corresponding selection buttons are displayed in the management interface;
and determining the currently effective webpage advertisement filtering rule according to the selection operation of the user.
6. A web advertisement filtering device, comprising:
the detection module is used for popping up a webpage advertisement on a webpage, responding to a specific operation aiming at the webpage advertisement, popping up an operation menu, receiving a filtering instruction triggered based on the operation menu, and determining a filtering area in the webpage;
the determining module is used for determining a central point of the filtering area and a coordinate of the central point in the webpage, and determining a webpage element node corresponding to the coordinate according to the coordinate;
acquiring an appointed measurement value of the filtering area, searching at least one webpage element node which is the same as the appointed measurement value of the filtering area from the webpage element node and a father node of the webpage element node, and taking a first webpage element node in the searched at least one webpage element node as a webpage target node corresponding to the filtering area; the webpage element node refers to a document object model node; the specified measurement value refers to the width and height of the webpage element node;
the updating module is used for updating the attribute parameters in the webpage advertisement filtering rules corresponding to the filtering area according to the attributes of the webpage target nodes to obtain the updated webpage advertisement filtering rules corresponding to the filtering area;
the system comprises a prompt module, a display module and a display module, wherein the prompt module is used for displaying a confirmation interface containing filtering prompt information, the filtering prompt information is used for prompting that filtering operation is executed aiming at a webpage advertisement, and the webpage advertisement filtering rule is determined based on the attribute and the attribute value of a webpage element node;
the receiving module is used for receiving a command of confirmation filtering selected by the confirmation interface by a user;
the filtering module is used for filtering the webpage element nodes corresponding to the updated webpage advertisement filtering rules obtained by the updating module so as to filter the webpage content corresponding to the filtering area; the web page content includes web page advertisement content of the web page advertisement circled in the highlighted filtering area.
7. The apparatus of claim 6, wherein the determining module comprises:
the determining submodule is used for determining a webpage element node of the center of the filtering area in a webpage;
a storage module, configured to store the webpage element node as the webpage target node when the specified metric value of the webpage element node is the same as the specified metric value of the filtering area;
the searching submodule is used for searching the father nodes of which the specified metric values are consistent with the specified metric values of the filtering area in each level of father nodes of the webpage element nodes when the specified metric values of the webpage element nodes are different from the specified metric values of the filtering area;
the storage module is further configured to store the first found father node meeting the conditions as the webpage target node.
8. The apparatus of claim 7, wherein the update module comprises:
the acquisition module is used for acquiring the attribute and the attribute value of the webpage target node;
and the updating submodule is used for updating the display state of the webpage element nodes with the same attributes and attribute values into a filtering state.
9. The apparatus of claim 8, further comprising:
the analysis module is used for analyzing and reading all webpage advertisement filtering rules when the webpage is loaded;
the second judgment module is used for judging whether a webpage advertisement filtering rule which is met by the domain name of the loaded webpage exists or not;
and the filtering module is used for filtering the webpage element nodes with the same attribute and attribute value as the attribute values in the webpage advertisement filtering rule if the result of the judgment of the second judging module is that the webpage advertisement filtering rule which is accorded with the domain name of the loaded webpage exists.
10. The apparatus of claim 9, further comprising:
the system comprises a display module, a display module and a display module, wherein the display module is used for displaying a management interface when detecting that a user triggers the operation of managing the webpage advertisement filtering rules, and the management interface displays webpage thumbnails corresponding to the webpage advertisement filtering rules and corresponding selection buttons;
the determining module is further configured to determine a currently effective webpage advertisement filtering rule according to the selection operation of the user.
11. An electronic device, comprising:
a memory for storing executable instructions;
a processor for implementing the web advertisement filtering method of any one of claims 1 to 5 when executing the executable instructions stored in the memory.
12. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the web advertisement filtering method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510399154.7A CN106326316B (en) | 2015-07-08 | 2015-07-08 | Webpage advertisement filtering method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510399154.7A CN106326316B (en) | 2015-07-08 | 2015-07-08 | Webpage advertisement filtering method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106326316A CN106326316A (en) | 2017-01-11 |
CN106326316B true CN106326316B (en) | 2022-11-29 |
Family
ID=57724897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510399154.7A Active CN106326316B (en) | 2015-07-08 | 2015-07-08 | Webpage advertisement filtering method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106326316B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108280107B (en) * | 2017-03-08 | 2022-01-14 | 阿里巴巴(中国)有限公司 | Webpage processing method and device and user terminal |
CN107193870B (en) * | 2017-04-12 | 2020-12-04 | 广东万丈金数信息技术股份有限公司 | Webpage content extraction method and system |
CN107193889A (en) * | 2017-05-02 | 2017-09-22 | 努比亚技术有限公司 | Ad blocking method, terminal and computer-readable recording medium |
CN110020332B (en) * | 2017-07-25 | 2021-06-04 | 北京国双科技有限公司 | Event generation method and device based on circled elements |
CN107395628A (en) * | 2017-08-23 | 2017-11-24 | 上海斐讯数据通信技术有限公司 | A kind of wireless router and its domain filter method |
CN108388667A (en) * | 2018-03-16 | 2018-08-10 | 武汉大学 | A kind of web advertisement visual marker and intercepting system and method |
CN110489636A (en) * | 2018-05-15 | 2019-11-22 | 南京大学 | A kind of web advertisement screen method based on code analysis and image procossing |
CN109408747A (en) * | 2018-10-09 | 2019-03-01 | 上海二三四五网络科技有限公司 | A kind of control method and control device based on user behavior shielding web page element |
CN109829092B (en) * | 2018-12-26 | 2021-05-28 | 厦门邑通软件科技有限公司 | Method for directionally monitoring webpage |
CN111767454B (en) * | 2019-04-02 | 2024-10-01 | 阿里巴巴集团控股有限公司 | Business object filtering method and device, electronic equipment and computer storage medium |
CN111580967A (en) * | 2020-05-07 | 2020-08-25 | 拉扎斯网络科技(上海)有限公司 | Virtual resource allocation method, device, server, terminal and storage medium |
CN112149032B (en) * | 2020-09-11 | 2023-12-08 | 麒麟合盛网络技术股份有限公司 | Advertisement interception method and device |
CN113971237A (en) * | 2021-10-27 | 2022-01-25 | 百度在线网络技术(北京)有限公司 | Advertisement filtering rule generation method and device and electronic equipment |
CN114025210B (en) * | 2021-11-01 | 2023-02-28 | 深圳小湃科技有限公司 | Popup shielding method, equipment, storage medium and device |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101867784A (en) * | 2010-02-02 | 2010-10-20 | 深圳市同洲电子股份有限公司 | Method for filtering advertisements, digital television receiving terminal, server terminal and system |
CN102033881A (en) * | 2009-09-30 | 2011-04-27 | 国际商业机器公司 | Method and system for recognizing advertisement in web page |
CN102456050A (en) * | 2010-10-27 | 2012-05-16 | 中国移动通信集团四川有限公司 | Method and device for extracting data from webpage |
CN102722563A (en) * | 2012-05-31 | 2012-10-10 | 优视科技有限公司 | Method and device for displaying page |
CN102768664A (en) * | 2011-05-06 | 2012-11-07 | 李超 | Distributed webpage advertisement blocking method and system |
CN103019719A (en) * | 2012-12-14 | 2013-04-03 | 北京奇虎科技有限公司 | Device and method for intercepting pop-up window |
CN103064943A (en) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | Customer premises equipment |
CN103530560A (en) * | 2013-09-29 | 2014-01-22 | 北京金山网络科技有限公司 | Method, device and client side for advertisement blocking |
CN103593354A (en) * | 2012-08-15 | 2014-02-19 | 腾讯科技(深圳)有限公司 | Method, device, server and system for filtering network page advertisements |
CN103886088A (en) * | 2014-03-28 | 2014-06-25 | 北京金山网络科技有限公司 | Method and device for intercepting advertisements in webpage |
CN104021172A (en) * | 2014-05-30 | 2014-09-03 | 北京搜狗科技发展有限公司 | Advertisement filtering method and advertisement filtering device |
CN104133896A (en) * | 2014-07-31 | 2014-11-05 | 可牛网络技术(北京)有限公司 | Method and device for filtering out webpage advertisements |
CN104133865A (en) * | 2014-07-17 | 2014-11-05 | 可牛网络技术(北京)有限公司 | Advertisement filtering method and device |
CN104361082A (en) * | 2014-11-07 | 2015-02-18 | 北京奇虎科技有限公司 | Method and device for displaying specified element in web page in browser |
CN104462583A (en) * | 2014-12-30 | 2015-03-25 | 北京奇虎科技有限公司 | Browser device for advertisement blocking processing and mobile terminal |
CN104572798A (en) * | 2014-07-25 | 2015-04-29 | 上海二三四五网络科技有限公司 | Method, equipment and system for processing webpage |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6449636B1 (en) * | 1999-09-08 | 2002-09-10 | Nortel Networks Limited | System and method for creating a dynamic data file from collected and filtered web pages |
US8271336B2 (en) * | 1999-11-22 | 2012-09-18 | Accenture Global Services Gmbh | Increased visibility during order management in a network-based supply chain environment |
US7630916B2 (en) * | 2003-06-25 | 2009-12-08 | Microsoft Corporation | Systems and methods for improving collaborative filtering |
US20060085283A1 (en) * | 2004-10-19 | 2006-04-20 | William Griffiths | System and method for linking automobile buyers and sellers |
US8066565B2 (en) * | 2005-11-10 | 2011-11-29 | Nemisys Networks, Llc | System, method, and apparatus for the electronic operation, management, sponsorship, advertising, promotion, marketing, and regulation of games of chance on a network |
US8131722B2 (en) * | 2006-11-20 | 2012-03-06 | Ebay Inc. | Search clustering |
CN101551796A (en) * | 2008-04-02 | 2009-10-07 | 上海亿动信息技术有限公司 | Control system for releasing information according to carrier content and corresponding control method |
US20130117112A1 (en) * | 2011-10-31 | 2013-05-09 | Bing Liu | Method and system for placing targeted ads into email or web page with comprehensive domain name data |
CN102622443A (en) * | 2012-03-13 | 2012-08-01 | 北京邮电大学 | Customized screening system and method for microblog |
CN103150513B (en) * | 2013-03-20 | 2015-12-09 | 北京奇虎科技有限公司 | The method of the implantation information in interception application program and device |
CN103220648A (en) * | 2013-04-28 | 2013-07-24 | 先人掌信息科技(上海)有限公司 | Information interaction method, information interaction system and advertisement interaction method based on short message |
CN103605991A (en) * | 2013-10-28 | 2014-02-26 | 复旦大学 | Automatic video advertisement detection method |
KR102705898B1 (en) * | 2019-09-19 | 2024-09-11 | 구글 엘엘씨 | Network filtering using private analyzable addresses |
-
2015
- 2015-07-08 CN CN201510399154.7A patent/CN106326316B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102033881A (en) * | 2009-09-30 | 2011-04-27 | 国际商业机器公司 | Method and system for recognizing advertisement in web page |
CN101867784A (en) * | 2010-02-02 | 2010-10-20 | 深圳市同洲电子股份有限公司 | Method for filtering advertisements, digital television receiving terminal, server terminal and system |
CN102456050A (en) * | 2010-10-27 | 2012-05-16 | 中国移动通信集团四川有限公司 | Method and device for extracting data from webpage |
CN102768664A (en) * | 2011-05-06 | 2012-11-07 | 李超 | Distributed webpage advertisement blocking method and system |
CN102722563A (en) * | 2012-05-31 | 2012-10-10 | 优视科技有限公司 | Method and device for displaying page |
CN103593354A (en) * | 2012-08-15 | 2014-02-19 | 腾讯科技(深圳)有限公司 | Method, device, server and system for filtering network page advertisements |
CN103019719A (en) * | 2012-12-14 | 2013-04-03 | 北京奇虎科技有限公司 | Device and method for intercepting pop-up window |
CN103064943A (en) * | 2012-12-25 | 2013-04-24 | 北京奇虎科技有限公司 | Customer premises equipment |
CN103530560A (en) * | 2013-09-29 | 2014-01-22 | 北京金山网络科技有限公司 | Method, device and client side for advertisement blocking |
CN103886088A (en) * | 2014-03-28 | 2014-06-25 | 北京金山网络科技有限公司 | Method and device for intercepting advertisements in webpage |
CN104021172A (en) * | 2014-05-30 | 2014-09-03 | 北京搜狗科技发展有限公司 | Advertisement filtering method and advertisement filtering device |
CN104133865A (en) * | 2014-07-17 | 2014-11-05 | 可牛网络技术(北京)有限公司 | Advertisement filtering method and device |
CN104572798A (en) * | 2014-07-25 | 2015-04-29 | 上海二三四五网络科技有限公司 | Method, equipment and system for processing webpage |
CN104133896A (en) * | 2014-07-31 | 2014-11-05 | 可牛网络技术(北京)有限公司 | Method and device for filtering out webpage advertisements |
CN104361082A (en) * | 2014-11-07 | 2015-02-18 | 北京奇虎科技有限公司 | Method and device for displaying specified element in web page in browser |
CN104462583A (en) * | 2014-12-30 | 2015-03-25 | 北京奇虎科技有限公司 | Browser device for advertisement blocking processing and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN106326316A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106326316B (en) | Webpage advertisement filtering method and device | |
US20210168234A1 (en) | Page control method and apparatus, and computer-readable storage medium | |
KR102455232B1 (en) | Method and electronic device for tab management based on context | |
US8640037B2 (en) | Graphical overlay related to data mining and analytics | |
CN104077387B (en) | A kind of web page contents display methods and browser device | |
CN110069683B (en) | Method and device for crawling data based on browser | |
CN104036011B (en) | Webpage element display method and browser device | |
US9317257B2 (en) | Folded views in development environment | |
US10664537B2 (en) | User interface element for surfacing related results | |
CN106844635B (en) | Method and device for editing elements in webpage | |
CN101782914A (en) | Method and system for prompting web page information | |
US20220114269A1 (en) | Page processing method, electronic apparatus and non-transitory computer-readable storage medium | |
CN103559227A (en) | Webpage displaying method and browser | |
CN104965871A (en) | Page loading method and device and electronic equipment | |
CN111898053A (en) | Page browsing method, device, equipment and computer readable storage medium | |
CN113901360A (en) | Data processing method and device and electronic equipment | |
CN113010814A (en) | Webpage content processing method, computing device and computer storage medium | |
US20140189478A1 (en) | Web browsers for mobile and small screen devices | |
CN115659087B (en) | Page rendering method, equipment and storage medium | |
KR102565950B1 (en) | Page processing method, device, electronic device and computer readable medium | |
CN113722630B (en) | Method and equipment for presenting resource data in web page based on client rendering | |
CN108280107B (en) | Webpage processing method and device and user terminal | |
CN115408627A (en) | Menu display method, device, equipment and medium | |
CN105488178A (en) | Network picture processing method and device | |
CN105138704A (en) | Search result control method and electronic equipment |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20221122 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133 Applicant after: Shenzhen Yayue Technology Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |