Web page advertisement filtering method, electronic device and storage medium
By voting and information exchange between clients within the local area network, advertisement filtering rules are automatically generated, which solves the problem of server dependence in the existing technology, enables clients to independently update advertisement filtering rules, and improves the real-time performance and efficiency of advertisement identification and filtering.
Patent Information
- Application Number
- CN202011198965.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-31
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-10-31
AI Technical Summary
The existing technology relies on the server to generate advertisement filtering rules, which results in the client being unable to update the advertisement filtering rules in a timely manner and unable to identify newly appeared advertisements. In addition, the server is overloaded and cannot effectively filter web advertisements.
By voting and exchanging information between clients in the local area network, advertisement filtering rules are automatically generated without server intervention. The main client updates and issues advertisement filtering rules based on the voting results.
This enables the client to independently update ad filtering rules without server support, improving the real-time and efficiency of ad recognition and filtering and reducing the burden on the server.
Smart Images

Figure CN114445103B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a web page advertisement filtering method, electronic device, and storage medium. Background Art
[0002] With the booming e-commerce industry, web pages are increasingly being infested with a variety of advertisements. Some ads obscure webpage content or are irrelevant, while others slow down web browsing, all of which degrade the user's online experience. Consequently, ad blockers, software installed on browsers that block all ads, have emerged. However, this results in publishers earning less money from ads, making it harder to pay for the free content users enjoy. This also hinders advertisers who create high-quality ads from connecting with users, and prevents users from seeing useful and relevant ads. Summary of the Invention
[0003] In view of the above, it is necessary to provide a web advertisement filtering method, electronic device and storage medium, which can generate advertisement filtering rules by an existing client without the intervention and presence of a server.
[0004] A first aspect of the present invention provides a webpage advertisement filtering method, applied to a master client, the method comprising:
[0005] receiving a web page element to be filtered sent by a client in the local area network where the master client is located;
[0006] Sending a first inquiry broadcast message including the web page element to be filtered to the local area network where the master client is located;
[0007] receiving first query feedback information generated by all clients in the local area network according to the first query broadcast information;
[0008] If the first query feedback information meets a preset condition, determining that the webpage element to be filtered is an advertisement;
[0009] Advertisement filtering rules are updated according to the webpage element to be filtered that is an advertisement.
[0010] Preferably, the method further comprises:
[0011] The updated advertisement filtering rules are sent to other clients in the local area network except the master client.
[0012] Preferably, the method further comprises:
[0013] Filter web page advertisements according to the updated advertisement filtering rules.
[0014] Preferably, before receiving the web page element to be filtered sent by the client in the local area network where the master client is located, the method further comprises:
[0015] A first client is determined as the master client among multiple clients in the same local area network.
[0016] Preferably, determining the first client as the master client among multiple clients in the same local area network includes:
[0017] Sending a recommendation broadcast message including a request to vote for the first client to the local area network where the first client is located;
[0018] receiving recommendation feedback information generated by other clients in the local area network except the first client according to the recommendation broadcast information;
[0019] If the recommendation feedback information meets a preset condition, the first client is determined to be a primary client.
[0020] Preferably, if the recommendation feedback information satisfies a preset condition and the first client is determined to be a primary client, the method further includes:
[0021] Send notification broadcast information including itself as the master client to the local area network where the master client is located.
[0022] Preferably, the method further comprises:
[0023] receiving query broadcast information sent by a fifth client in the local area network where the fifth client is located, querying whether the fifth client is a primary client, wherein the fifth client is a client newly joined the local area network after the advertisement filtering rule is updated;
[0024] Replying confirmation information to the fifth client according to the query broadcast information;
[0025] receiving an advertisement filtering rule request sent by the fifth client;
[0026] Sending advertisement filtering rules to the fifth client according to the advertisement filtering rule request.
[0027] Preferably, the method further comprises:
[0028] receiving a web page element to be displayed sent by a client in the local area network where the master client is located;
[0029] Sending a second inquiry broadcast message including the webpage element to be displayed to the local area network where the master client is located;
[0030] receiving second query feedback information generated by all clients in the local area network according to the second query broadcast information;
[0031] If the second query feedback information satisfies a preset rule, determining that the webpage element to be displayed is not an advertisement;
[0032] Advertisement filtering rules are updated according to the webpage elements to be displayed that are not advertisements.
[0033] A second aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement any one of the web page advertisement filtering methods described above when executing at least one instruction stored in the memory.
[0034] A third aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor to implement any one of the web page advertisement filtering methods described above.
[0035] This case receives web page elements to be filtered sent by clients in the local area network where the main client is located, initiates voting in the local area network, determines whether the web page elements to be filtered are advertisements through voting, and generates advertisement filtering rules accordingly. The advertisement filtering rules can be generated by existing clients without the intervention and existence of a server. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 FIG. 1 is a schematic diagram of an application environment according to an embodiment of the present invention.
[0037] Figure 2 FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0038] Figure 3 The figure is a flow chart of a method for determining a master client in a webpage advertisement filtering method according to an embodiment of the present invention.
[0039] Figure 4 A schematic diagram of determining a master client among multiple clients in the same local area network according to an embodiment of the present invention.
[0040] Figure 5 The flowchart is a method for generating advertisement filtering rules in a webpage advertisement filtering method according to an embodiment of the present invention.
[0041] Figure 6 A schematic diagram of generating advertisement filtering rules for multiple clients in the same local area network according to an embodiment of the present invention.
[0042] Figure 7 The present invention is a flowchart of a method for intercepting advertisements by a fifth client in a local area network in a web advertisement filtering method according to an embodiment of the present invention.
[0043] Figure 8 This is a schematic diagram of a fifth client in the same local area network intercepting advertisements according to an embodiment of the present invention.
[0044] Figure 9 The flowchart is a method for regenerating advertisement filtering rules in a webpage advertisement filtering method according to an embodiment of the present invention.
[0045] Figure 10 A schematic diagram of regenerating advertisement filtering rules for multiple clients in the same local area network according to an embodiment of the present invention.
[0046] Figure 11 This is a flow chart of a web page advertisement filtering method according to an embodiment of the present invention.
[0047] Description of main component symbols
[0048] Electronic device 1
[0049] Network device 2
[0050] Client 10
[0051] Communication module 20
[0052] Server 3
[0053] Memory 30
[0054] Processor 40 DETAILED DESCRIPTION
[0055] In the following, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first", "second", "third", "fourth" and "fifth" may explicitly or implicitly include one or more of the said features. In the description of the embodiments of the present application, words such as "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described as "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "for example" is intended to present the relevant concepts in a concrete way.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art to which this application relates. The terms used in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit the present invention. It should be understood that, in this application, unless otherwise specified, "a plurality" refers to two or more than two.
[0057] The web page advertisement filtering method of the embodiment of the present invention can be that the client transmits advertisement feedback information to the server according to the user's operation, the server generates advertisement filtering rules according to the advertisement feedback information, and sends the advertisement filtering rules to each client, and the client filters or blocks advertisements according to the advertisement filtering rules when loading the web page. However, this method relies on the server to generate the filtering rules. If the client cannot connect to the server, the client cannot update the advertisement filtering rules and therefore cannot identify and filter newly appeared advertisements. At the same time, the server needs to adjust the advertisement filtering rules according to the feedback from the client. Regardless of whether the server adjusts the advertisement filtering rules manually or intelligently, there will be a certain lag in sending the advertisement filtering rules. In addition, the large number of client requests generated by the increase in the number of clients, the changes in web pages and formats, and the emergence of new web pages will increase the burden on the server.
[0058] refer to Figure 1 , is a schematic diagram of an application environment of an embodiment of the present invention. Figure 1 As shown, multiple electronic devices 1 are connected together through a network device 2, so that the multiple electronic devices 1 are in the same local area network. Each electronic device 1 includes a client 10. The client 10 has nothing to do with the user. Even if the same user is on different clients 10, the clients 10 are different clients. Each electronic device 1 also includes a communication module 20. The communication module 20 is used for connecting the electronic device 1 to the network device 2. Figure 1 In the embodiment, the electronic device 1 is connected to the network device 2 by wire. Obviously, the electronic device 1 and the network device 2 are not limited to Figure 1 The wired connection can also be a wireless connection. The network device 2 can be at least one of the network devices such as a switch, a base station and a router. For example, the network device 2 is three switches connected to each other, or a switch and a router connected to each other. The network device 2 can forward the information of the electronic device 1. Thus, by connecting to the network device 2, multiple electronic devices 1 can be in the same local area network. In the local area network, all electronic devices 1 can be considered to be in the same network and can communicate freely with each other. If a client 10 in the local area network sends a broadcast message, other clients 10 in the local area network can all receive the broadcast message. Each electronic device 1 is also connected to a server 3. Figure 1 In the embodiment, the electronic device 1 is wirelessly connected to the server 3. Obviously, the electronic device 1 and the server 3 are not limited to Figure 1 The wireless connection may also be a wired connection. The electronic device 1 may transmit a web page request to the server 3, receive web page information transmitted by the server 3 according to the web page request, and load and display a web page according to the web page information.
[0059] refer to Figure 2 , is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 1 may include a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a wearable device, etc. Figure 2 As shown, the electronic device includes not only the client 10 and the communication module 20, but also includes components such as a memory 30 and a processor 40. Those skilled in the art will understand that Figure 2 The structure shown in the figure does not constitute a limitation on the electronic device 2. The electronic device 2 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently.
[0060] The memory 30 can be used to store the client. The memory 30 can also be used to store other software programs and / or modules / units. The processor 40 implements various functions of the electronic device 1 by running or executing the software programs and / or modules / units stored in the memory 30, and calling the data stored in the memory 30. The memory 30 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a web browsing function, a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device 1 (such as audio data, etc.). In addition, the memory 30 may include a non-volatile computer-readable memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device.
[0061] The processor 40 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 40 may be a microprocessor or any conventional processor. The processor 40 is the control center of the electronic device 1 and connects various parts of the entire electronic device 1 using various interfaces and lines.
[0062] refer to Figure 3 , is a flow chart of a method for determining a primary client in a web page advertisement filtering method according to an embodiment of the present invention. The method for determining a primary client in the web page advertisement filtering method includes:
[0063] S31: One or more first clients in the same local area network send recommendation broadcast information including a request to vote for themselves to the local area network where the first clients are located.
[0064] One or more first clients are clients that simultaneously initiate vote requests for themselves. In this embodiment, the one or more first clients are client 1. In other embodiments, the one or more first clients may be, for example, client 1 and client 2. Each first client may send a recommendation broadcast message to the local area network including a vote request for itself. For example, client 1 may send a message to the local area network including a vote request for client 1, and client 2 may send a message to the local area network including a vote request for client 2. In the local area network, all clients except the first client may receive the broadcast message sent by the first client.
[0065] In this embodiment, please also refer to Figure 4 The local area network includes, for example, client 1, client 2, and client 3. The client 1 simultaneously sends a recommendation broadcast message including a request to vote for itself to the client 2 and the client 3.
[0066] S32: The second client sends recommendation feedback information to each first client according to the recommendation broadcast information, wherein the second client is other clients in the local area network except the first client.
[0067] The number of the second clients may be one or more. The recommendation feedback information includes voting for the first client or not voting for the first client. Each client has one vote, that is, voting for one client to elect one client as the master client.
[0068] In this embodiment, the second client includes, for example, Figure 4 As shown, client 2 and client 3. Client 2 votes for client 1 according to the recommended broadcast information. Client 3 votes for client 1 according to the recommended broadcast information.
[0069] In order to prevent other clients from requesting to vote after the client completes voting, the client 2 also transmits information that it has voted for the client 1 to the client 3, and the client 3 also transmits information that it has voted for the client 1 to the client 2.
[0070] S33: If the recommendation feedback information meets a preset condition, the first client determines itself as a master client.
[0071] The preset conditions include that the number of votes received is greater than or equal to a preset number, or the proportion of votes received is greater than a preset value, etc. In this embodiment, the client 1, for example Figure 4 As shown, after receiving the votes of client 2 and client 3, client 1 determines itself as the master client. At this time, client 1 is the master client. There is only one master client in a local area network.
[0072] S34: The first client determined to be the master client sends a broadcast notification message including its own identity as the master client to the local area network where the first client is located.
[0073] For example, Figure 4 As shown, the client 1 sends a notification broadcast message including itself as the master client to the client 2 and the client 3.
[0074] In this embodiment, the method further includes:
[0075] If the recommendation feedback information does not meet the preset condition, the first client determines that it is not the main client.
[0076] At this time, other clients, such as client 3, may send recommendation broadcast information including a request to vote for themselves to the local area network where the client is located.
[0077] refer to Figure 5, is a flow chart of a method for generating advertisement filtering rules in a webpage advertisement filtering method according to an embodiment of the present invention. The method for generating advertisement filtering rules in the webpage advertisement filtering method includes:
[0078] S51: According to the operation on the browsed web page, the third client determines the web page elements to be filtered.
[0079] The operation on the browsed webpage may include long pressing or right-clicking a certain content on the browsed webpage. The browser then displays a selection dialog box. The selection dialog box includes a "Mark as Advertisement" option. The operation on the browsed webpage may also include selecting the "Mark as Advertisement" option. The third client is any client in the local area network other than the primary client. The determination of the webpage element to be filtered is determining the webpage element to be filtered based on the content of the operation.
[0080] For example, the content of the HTML page is as follows:
[0081]
[0082]
[0083] <title> My first HTML page< / title>
[0084]
[0085]
[0086] <div id="topbanner_02"class="jy_fx168_default_head_navadbox_middle">
[0087] The contents of the body element are displayed in the browser.
[0088] The content of the title element is displayed in the browser's title bar.
[0089] <img src="http: png.zhongwangmy.cn jpg 200"> abc.img
[0090] <svg xmlns="http: / / www.w3.org / 2000 / svg"version="1.1"height="190">
[0091] <polygon points="100,10 40,180 190,60 10,60 160,180"
[0092] style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" / >
[0093]
[0094]
[0095]
[0096] If the web page element corresponding to the content of the operation is: <img src="http: png.zhongwangmy.cn jpg 200"> abc.img, then determine the key information in the web page element, for example, png.zhongwangmy.cn / jpg / 200 is the web page element to be filtered, that is, an advertisement.
[0097] Please also refer to Figure 6 The third client determines the web page elements to be filtered based on the operation on the browsed web page. For example, the client 1 displays the web page for the user to browse, and determines the web page elements to be filtered based on the marked content.
[0098] S52: The third client transmits the webpage element to be filtered to a master client of the local area network where the third client is located.
[0099] In this embodiment, the third client transmits the webpage element to be filtered to the primary client according to an agreed method, so that the primary client can determine that the received content is the webpage element to be filtered according to the agreed method. For example, the third client transmits adltems:["png.zhongwangmy.cn / jpg / 200"] to the primary client.
[0100] The third client may transmit the web page element to be filtered to the main client, for example, Figure 6 As shown, client 1 transmits the web page elements to be filtered to the master client.
[0101] S53: The master client sends a first inquiry broadcast message including the web page elements to be filtered to the local area network where the master client is located.
[0102] In this embodiment, after receiving adltems:["png.zhongwangmy.cn / jpg / 200"] transmitted by the third client, the master client parses out the keywords adltems and png.zhongwangmy.cn / jpg / 200, and determines png.zhongwangmy.cn / jpg / 200 as the webpage element to be filtered according to the keyword adltems.
[0103] Before the master client sends the first query broadcast information including the web page element to be filtered to the local area network where the master client is located, the method further includes:
[0104] After receiving the webpage elements to be filtered within a preset time, the master client sends first inquiry broadcast information including the webpage elements to be filtered to the local area network where the master client is located.
[0105] The webpage elements to be filtered within the preset time period may be two webpage elements to be filtered transmitted by the third client within the preset time period, or may be webpage elements to be filtered transmitted by the third client and other clients within the preset time period. The preset time period may be, for example, one week, three days, etc.
[0106] The master client may send the first query broadcast information including the web page element to be filtered to the local area network where the master client is located, for example, Figure 6 As shown, the local area network includes, for example, client 1, client 2, client 3, client 4, and client 5. Client 2 is a master client. Client 2 simultaneously sends a first query broadcast message including the web page elements to be filtered to client 1, client 3, client 4, and client 5.
[0107] S54: Each client sends first query feedback information to the master client according to the first query broadcast information.
[0108] The first query feedback information includes voting for the web page element to be filtered as an advertisement and voting for the web page element to be filtered as not an advertisement. Each client has one vote for each web page element to be filtered. For example, each client can vote for web page element 1 to be filtered as an advertisement or not an advertisement, but cannot vote for web page element 1 to be filtered as an advertisement and not an advertisement at the same time. Each first query feedback information can correspond to one web page element to be filtered, or each first query feedback information can correspond to multiple web page elements to be filtered.
[0109] In this embodiment, for example, Figure 6 As shown, the client 1, the client 2, the client 3, the client 4 and the client 5 all send first inquiry feedback information to the client 2 according to the first inquiry broadcast information, that is, voting whether the web page element to be filtered is an advertisement or not.
[0110] S55: If the first query feedback information meets a preset condition, the master client determines that the webpage element to be filtered is an advertisement.
[0111] The preset condition may include that the number of web page elements received as votes to be filtered that are advertisements is greater than the number of web page elements received as votes to be filtered that are not advertisements, or that the proportion of web page elements received as votes to be filtered that are advertisements is greater than a preset value, etc. The first query feedback information is the first query feedback information of a web page element to be filtered or the first query feedback information of certain web page elements to be filtered.
[0112] In this embodiment, the main client, that is, client 2, is, for example Figure 6 As shown, it is determined whether the first query feedback information meets a preset condition, and the web page element 1 to be filtered is determined to be an advertisement according to the first query feedback information.
[0113] S56: The main client updates the advertisement filtering rules according to the web page element to be filtered which is an advertisement.
[0114] The number of web page elements to be filtered as advertisements may be one or more. The advertisement filtering rules may be, for example, easylist.txt. The advertisement filtering rules may contain a large amount of advertisement information, such as png.zhongwangmy.cn / jpg / 201. Updating the advertisement filtering rules may include, for example, adding png.zhongwangmy.cn / jpg / 200 to the advertisement filtering rules.
[0115] In this embodiment, the main client, that is, client 2, is, for example Figure 6 As shown, the advertisement filtering rules are updated according to the web page elements to be filtered which are advertisements.
[0116] S57: The master client sends the updated advertisement filtering rule to a fourth client, where the fourth client is another client in the local area network except the master client.
[0117] The number of the fourth client can be one or more. In this embodiment, the main client, that is, client 2, is, for example Figure 6 As shown, the updated advertisement filtering rules are sent to the client 1, the client 3, the client 4 and the client 5.
[0118] S58: The fourth client updates the local advertisement filtering rule according to the updated advertisement filtering rule.
[0119] Each client includes advertisement filtering rules and filters web page advertisements according to the advertisement filtering rules. Figure 6 As shown, the client 1 updates the advertising filtering rules of the client 1 according to the updated advertising filtering rules, the client 3 updates the advertising filtering rules of the client 3 according to the updated advertising filtering rules, the client 4 updates the advertising filtering rules of the client 4 according to the updated advertising filtering rules, and the client 5 updates the advertising filtering rules of the client 5 according to the updated advertising filtering rules.
[0120] S59: Each client in the local area network filters web page advertisements according to the updated advertisement filtering rules.
[0121] The web page elements of the web page include separately downloaded resources, such as multimedia, JS, etc. Before downloading the web page elements, the client will match the web page elements with the updated advertising filtering rules. If the web page elements match the updated advertising filtering rules, the client does not download the web page elements. If the web page elements do not match the updated advertising filtering rules, the client downloads the web page elements. For example, if the client attempts to download the resource corresponding to png.zhongwangmy.cn / jpg / 200, and the client determines that the web page elements match the updated advertising filtering rules, the client does not download the web page elements, thereby filtering web page advertisements.
[0122] In this embodiment, if Figure 6 As shown, the client 1 filters web page advertisements according to the updated advertisement filtering rules, the client 2 filters web page advertisements according to the updated advertisement filtering rules, the client 3 filters web page advertisements according to the updated advertisement filtering rules, the client 4 filters web page advertisements according to the updated advertisement filtering rules, and the client 5 filters web page advertisements according to the updated advertisement filtering rules.
[0123] In this embodiment, the method further includes:
[0124] If the first query feedback information does not meet a preset condition, the master client determines that the webpage element to be filtered is not an advertisement.
[0125] In this embodiment, the main client, that is, client 2, is, for example Figure 6 As shown, it is determined according to the first query feedback information that the web page element 2 to be filtered is not an advertisement.
[0126] refer to Figure 7 , is a flow chart of a method for intercepting advertisements by a fifth client in a local area network in a webpage advertisement filtering method according to an embodiment of the present invention. The method for intercepting advertisements by a fifth client in a local area network in the webpage advertisement filtering method includes:
[0127] S71: The fifth client sends query broadcast information including querying whether it is a master client to the local area network where the fifth client is located, wherein the fifth client is a client that newly joins the local area network after the advertisement filtering rule is updated.
[0128] The fifth client is a client newly added to the local area network. The fifth client can freely communicate with any client in the local area network. Figure 8The local area network includes, for example, a fifth client, client 1, client 2, and client 3. The fifth client is a new client that has joined the local area network after the advertisement filtering rules have been updated. Client 3 is a master client. The fifth client sends a query broadcast message to client 1, client 2, and the master client, including a query indicating whether the client is the master client.
[0129] S72: The master client in the local area network replies with confirmation information to the fifth client according to the query broadcast information.
[0130] like Figure 8 As shown, the main client, that is, client 3, replies confirmation information to the fifth client according to the query broadcast information.
[0131] S73: The fifth client sends an advertisement filtering rule request to the master client.
[0132] like Figure 8 As shown, the fifth client sends an advertisement filtering rule request to the main client, ie, client 3 .
[0133] S74: The main client sends the advertisement filtering rule to the fifth client according to the advertisement filtering rule request.
[0134] The master client includes advertisement filtering rules, and the master client filters web page advertisements according to the advertisement filtering rules. Figure 8 As shown, the main client, namely client 3, replies with advertisement filtering rules to the fifth client.
[0135] S75: The fifth client filters web page advertisements according to the advertisement filtering rules.
[0136] like Figure 8 As shown, the fifth client filters web page advertisements according to the advertisement filtering rules.
[0137] refer to Figure 9 , is a flow chart of a method for regenerating advertisement filtering rules in a webpage advertisement filtering method according to an embodiment of the present invention. The method for regenerating advertisement filtering rules in the webpage advertisement filtering method includes:
[0138] S91: The sixth client determines web page elements to be displayed according to an operation on a web page browsed when the web page advertisement blocking switch is in the off state.
[0139] The sixth client is any client other than the main client in the local area network. Each client includes a web page advertisement blocking switch. If the web page advertisement blocking switch is in the on state, the client does not display advertisements. If the web page advertisement blocking switch is in the off state, the client displays advertisements. When it is necessary to determine which web page elements are to be displayed, the web page advertisement blocking switch can be switched from the on state to the off state or from the off state to the on state, so that the user can determine which web page elements have been blocked by comparing the results when the advertisements are blocked and when the advertisements are not blocked, and determine which web page elements do not want to be blocked.
[0140] The operation on the browsed webpage may include long pressing or right-clicking a certain content on the browsed webpage. The browser then displays a selection dialog box. The selection dialog box includes a "Mark as non-advertisement" option. The operation on the browsed webpage may also include selecting the "Mark as non-advertisement" option. Determining the webpage elements to be filtered is determining the webpage elements to be displayed based on the content of the operation.
[0141] For example, the content of the HTML page is as follows:
[0142]
[0143]
[0144] <title> My first HTML page< / title>
[0145]
[0146]
[0147] <div id="topbanner_02"class="jy_fx168_default_head_navadbox_middle">
[0148] The contents of the body element are displayed in the browser.
[0149] The content of the title element is displayed in the browser's title bar.
[0150] <img src="http: png.zhongwangmy.cn jpg 205"> abc.img
[0151] <svg xmlns="http: / / www.w3.org / 2000 / svg"version="1.1"height="190">
[0152] <polygon points="100,10 40,180 190,60 10,60 160,180"
[0153] style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" / >
[0154]
[0155]
[0156]
[0157] If the web page element corresponding to the content of the operation is: <img src="http: png.zhongwangmy.cn jpg 205"> abc.img, then determine the key information in the web page element, for example, png.zhongwangmy.cn / jpg / 205 is the web page element to be displayed.
[0158] Please also refer to Figure 10 , the sixth client determines the web page elements to be displayed based on the operation of browsing the web page when the web page blocking advertisement switch is in the off state, for example, client 2 displays the web page for user browsing based on the off operation of the web page blocking advertisement switch, and determines the web page elements to be displayed based on the marked content.
[0159] S92: The sixth client transmits the webpage element to be displayed to the master client of the local area network where the sixth client is located.
[0160] In this embodiment, the sixth client transmits the webpage element to be displayed to the primary client according to an agreed method, so that the primary client can determine that the received content is the webpage element to be displayed according to the agreed method. For example, the sixth client transmits notadltems:["png.zhongwangmy.cn / jpg / 205"] to the primary client.
[0161] The sixth client may transmit the web page element to be displayed to the main client, for example, Figure 10 As shown, the client 2 transmits the web page elements to be displayed to the master client.
[0162] S93: The master client sends a second inquiry broadcast message including the web page element to be displayed to the local area network where the master client is located.
[0163] In this embodiment, after receiving notadltems:["png.zhongwangmy.cn / jpg / 205"] transmitted by the sixth client, the master client parses out the keywords notadltems and png.zhongwangmy.cn / jpg / 205, and determines png.zhongwangmy.cn / jpg / 205 as the webpage element to be displayed according to the keyword notadltems.
[0164] Before the master client sends the second inquiry broadcast information including the webpage element to be displayed to the local area network where the master client is located, the method further includes:
[0165] After receiving the webpage element to be displayed at a preset time, the master client sends a second inquiry broadcast message including the webpage element to be displayed to the local area network where the master client is located.
[0166] The webpage elements to be displayed within the preset time period may be two webpage elements to be displayed transmitted by the sixth client within the preset time period, or may be webpage elements to be displayed transmitted by the sixth client and other clients within the preset time period. The preset time period may be, for example, one week, three days, etc.
[0167] The master client sends the second query broadcast information including the web page element to be displayed to the local area network where the master client is located, for example, Figure 10 As shown, the local area network includes, for example, client 1, client 2, client 3, client 4, and client 5. Client 2 is a master client. Client 2 simultaneously sends a second query broadcast message including the web page element to be displayed to client 1, client 3, client 4, and client 5.
[0168] S94: Each client sends second query feedback information to the master client according to the second query broadcast information.
[0169] The second query feedback information includes voting for a web page element to be displayed as an advertisement and voting for a web page element to be displayed as not an advertisement. Each client has one vote for each web page element to be displayed. For example, each client can vote for web page element 1 to be displayed as an advertisement or not as an advertisement, but cannot vote for both web page element 1 to be displayed as an advertisement and not as an advertisement at the same time. Each second query feedback information can correspond to one web page element to be displayed, or each second query feedback information can correspond to multiple web page elements to be displayed.
[0170] In this embodiment, for example, Figure 10 As shown, the client 1, the client 2, the client 3, the client 4 and the client 5 all send a second inquiry feedback message to the client 2 according to the second inquiry broadcast message, i.e., voting whether the web page element to be displayed is an advertisement or not.
[0171] S95: If the second query feedback information satisfies a preset rule, the master client determines that the webpage element to be displayed is not an advertisement.
[0172] The preset rule may include that the number of web page elements received as votes for being non-advertisements to be displayed is greater than the number of web page elements received as votes for being advertisements to be displayed, or that the proportion of web page elements received as votes for being non-advertisements to be displayed is greater than a preset value. The second query feedback information is second query feedback information for a web page element to be displayed or second query feedback information for certain web page elements to be displayed.
[0173] In this embodiment, the main client, that is, client 2, is, for example Figure 10 As shown, it is determined whether the second query feedback information meets a preset rule, and it is determined based on the second query feedback information that the web page element 3 to be displayed is not an advertisement.
[0174] S96: The master client updates advertisement filtering rules according to the webpage elements to be displayed that are not advertisements.
[0175] The number of the webpage elements to be displayed that are not advertisements may be one or more. The advertisement filtering rules may be, for example, easylist.txt. The advertisement filtering rules may contain a large amount of advertisement information, such as png.zhongwangmy.cn / jpg / 205. Updating the advertisement filtering rules may include, for example, deleting png.zhongwangmy.cn / jpg / 205 from the advertisement filtering rules.
[0176] In this embodiment, the main client, that is, client 2, is, for example Figure 10 As shown, the advertisement filtering rules are updated according to the web page elements to be displayed that are not advertisements.
[0177] S97: The master client sends the updated advertisement filtering rule to a fourth client, where the fourth client is another client in the local area network except the master client.
[0178] The number of the fourth client can be one or more. In this embodiment, the main client, that is, client 2, is, for example Figure 10 As shown, the updated advertisement filtering rules are sent to the client 1, the client 3, the client 4 and the client 5.
[0179] S98: The fourth client updates the local advertisement filtering rule according to the updated advertisement filtering rule.
[0180] Each client includes advertisement filtering rules and filters web page advertisements according to the advertisement filtering rules. Figure 10As shown, the client 1 updates the advertising filtering rules of the client 1 according to the updated advertising filtering rules, the client 3 updates the advertising filtering rules of the client 3 according to the updated advertising filtering rules, the client 4 updates the advertising filtering rules of the client 4 according to the updated advertising filtering rules, and the client 5 updates the advertising filtering rules of the client 5 according to the updated advertising filtering rules.
[0181] S99: Each client in the local area network filters web page advertisements according to the updated advertisement filtering rules.
[0182] The web page elements of the web page include separately downloaded resources, such as multimedia, JS, etc. Before downloading the web page elements, the client will match the web page elements with the updated advertisement filtering rules. If the web page elements match the updated advertisement filtering rules, the client does not download the web page elements. If the web page elements do not match the updated advertisement filtering rules, the client downloads the web page elements. For example, if the client attempts to download the resource corresponding to png.zhongwangmy.cn / jpg / 205, and the client determines that the web page elements do not match the updated advertisement filtering rules, the client downloads the web page elements, thereby not filtering the web page elements.
[0183] In this embodiment, if Figure 10 As shown, the client 1 filters web page advertisements according to the updated advertisement filtering rules, the client 2 filters web page advertisements according to the updated advertisement filtering rules, the client 3 filters web page advertisements according to the updated advertisement filtering rules, the client 4 filters web page advertisements according to the updated advertisement filtering rules, and the client 5 filters web page advertisements according to the updated advertisement filtering rules.
[0184] In this embodiment, the method further includes:
[0185] If the second query feedback information does not satisfy a preset rule, the master client determines that the webpage element to be displayed is an advertisement.
[0186] In this embodiment, the main client, that is, client 2, is, for example Figure 10 As shown, it is determined that the webpage element 2 to be displayed is an advertisement according to the second query feedback information.
[0187] refer to Figure 11 , is a flow chart of a web page advertisement filtering method according to an embodiment of the present invention. The web page advertisement filtering method is applied to a master client. The web page advertisement filtering method includes:
[0188] S1101: Receive web page elements to be filtered sent by a client in the local area network where the master client is located.
[0189] S1102: Sending first query broadcast information including the web page elements to be filtered to the local area network where the master client is located.
[0190] S1103: Receive first query feedback information generated by all clients in the local area network according to the first query broadcast information.
[0191] S1104: If the first query feedback information meets a preset condition, determine that the webpage element to be filtered is an advertisement.
[0192] S1105: Update advertisement filtering rules according to the web page element to be filtered that is an advertisement.
[0193] In this embodiment, the method further includes:
[0194] The updated advertisement filtering rules are sent to other clients in the local area network except the master client.
[0195] In this embodiment, the method further includes:
[0196] Filter web page advertisements according to the updated advertisement filtering rules.
[0197] In this embodiment, before receiving the webpage element to be filtered sent by the client in the local area network where the master client is located, the method further includes:
[0198] A first client is determined as the master client among multiple clients in the same local area network.
[0199] In this embodiment, determining a first client as the master client among multiple clients in the same local area network includes:
[0200] Sending a recommendation broadcast message including a request to vote for the first client to the local area network where the first client is located;
[0201] receiving recommendation feedback information generated by other clients in the local area network except the first client according to the recommendation broadcast information;
[0202] If the recommendation feedback information meets a preset condition, the first client is determined to be a primary client.
[0203] In this embodiment, if the recommendation feedback information satisfies a preset condition and the first client is determined to be a primary client, the method further includes:
[0204] Send notification broadcast information including itself as the master client to the local area network where the master client is located.
[0205] In this embodiment, the method further includes:
[0206] receiving query broadcast information sent by a fifth client in the local area network where the fifth client is located, querying whether the fifth client is a primary client, wherein the fifth client is a client newly joined the local area network after the advertisement filtering rule is updated;
[0207] Replying confirmation information to the fifth client according to the query broadcast information;
[0208] receiving an advertisement filtering rule request sent by the fifth client;
[0209] Sending advertisement filtering rules to the fifth client according to the advertisement filtering rule request.
[0210] In this embodiment, the method further includes:
[0211] receiving a web page element to be displayed sent by a client in the local area network where the master client is located;
[0212] Sending a second inquiry broadcast message including the webpage element to be displayed to the local area network where the master client is located;
[0213] receiving second query feedback information generated by all clients in the local area network according to the second query broadcast information;
[0214] If the second query feedback information satisfies a preset rule, determining that the webpage element to be displayed is not an advertisement;
[0215] Advertisement filtering rules are updated according to the webpage elements to be displayed that are not advertisements.
[0216] In this embodiment, the method further includes:
[0217] The updated advertisement filtering rules are sent to other clients in the local area network except the master client.
[0218] In this case, by receiving web page elements to be filtered sent by clients in the local area network where the main client is located, a vote is initiated in the local area network, and whether the web page elements to be filtered are advertisements is determined by voting, and advertisement filtering rules are generated accordingly. The advertisement filtering rules can be generated by existing clients without the intervention and presence of a server. By sending the advertisement filtering rules to other clients in the local area network except the main client, the advertisement filtering rules can be synchronized to all clients in the local area network without relying on the server's function of sending the rules to the clients. When a fifth client is added to the local area network, even a newly added client can obtain the advertisement filtering rules without relearning and without relying on the server. By receiving web page elements to be displayed sent by clients in the local area network where the main client is located, a vote is initiated in the local area network, and whether the web page elements to be displayed are advertisements is determined by voting, and advertisement filtering rules are generated accordingly. In the scenario where a web page element is mistakenly judged as an advertisement, the correction of the web page element can be achieved, and the advertisement filtering rules can be updated by the existing client without the intervention and presence of a server.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A web page advertisement filtering method, applied to a main client, characterized in that: The method comprises: receiving a web page element to be filtered sent by a client in the local area network where the master client is located; Sending a first inquiry broadcast message including the web page element to be filtered to the local area network where the master client is located; receiving first query feedback information generated by all clients in the local area network according to the first query broadcast information; If the first query feedback information meets a preset condition, determining that the webpage element to be filtered is an advertisement; Advertisement filtering rules are updated according to the webpage element to be filtered that is an advertisement.
2. The webpage advertisement filtering method according to claim 1, wherein: The method further comprises: The updated advertisement filtering rules are sent to other clients in the local area network except the master client.
3. The webpage advertisement filtering method according to claim 1, wherein: The method further comprises: Filter web page advertisements according to the updated advertisement filtering rules.
4. The webpage advertisement filtering method according to claim 1, wherein: Before receiving the webpage element to be filtered sent by the client in the local area network where the master client is located, the method further includes: A first client is determined as the master client among multiple clients in the same local area network.
5. The webpage advertisement filtering method according to claim 4, wherein: The step of determining a first client as the master client among multiple clients in the same local area network includes: Sending a recommendation broadcast message including a request to vote for the first client to the local area network where the first client is located; receiving recommendation feedback information generated by other clients in the local area network except the first client according to the recommendation broadcast information; If the recommendation feedback information meets a preset condition, the first client is determined to be a primary client.
6. The webpage advertisement filtering method according to claim 5, wherein: If the recommendation feedback information satisfies a preset condition and the first client is determined to be a primary client, the method further includes: Send notification broadcast information including itself as the master client to the local area network where the master client is located.
7. The webpage advertisement filtering method according to claim 1, wherein: The method further comprises: receiving query broadcast information sent by a fifth client in the local area network where the fifth client is located, querying whether the fifth client is a primary client, wherein the fifth client is a client newly joined the local area network after the advertisement filtering rule is updated; Replying confirmation information to the fifth client according to the query broadcast information; receiving an advertisement filtering rule request sent by the fifth client; Sending advertisement filtering rules to the fifth client according to the advertisement filtering rule request.
8. The webpage advertisement filtering method according to claim 1, wherein: The method further comprises: receiving a web page element to be displayed sent by a client in the local area network where the master client is located; Sending a second inquiry broadcast message including the webpage element to be displayed to the local area network where the master client is located; receiving second query feedback information generated by all clients in the local area network according to the second query broadcast information; If the second query feedback information satisfies a preset rule, determining that the webpage element to be displayed is not an advertisement; Advertisement filtering rules are updated according to the webpage elements to be displayed that are not advertisements.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, and the processor is configured to implement the web page advertisement filtering method according to any one of claims 1 to 8 when executing at least one instruction stored in the memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor to implement the web page advertisement filtering method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Distributed webpage advertisement blocking method and system
CN102768664A