CN108062324A - Advertisement filter method, apparatus and user terminal - Google Patents
Advertisement filter method, apparatus and user terminal Download PDFInfo
- Publication number
- CN108062324A CN108062324A CN201610981659.9A CN201610981659A CN108062324A CN 108062324 A CN108062324 A CN 108062324A CN 201610981659 A CN201610981659 A CN 201610981659A CN 108062324 A CN108062324 A CN 108062324A
- Authority
- CN
- China
- Prior art keywords
- node tree
- web page
- page resources
- hierarchical relationship
- child node
- 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.)
- Pending
Links
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/957—Browsing optimisation, e.g. caching or content distillation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
- H04L63/0227—Filtering policies
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of advertisement filter method, apparatus and user terminals, are related to Internet technical field.Advertisement filter method includes:Receive the web page resources page that server-side is sent;Parse the node tree that the web page resources page obtains web page resources;Search the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;When finding the child node tree that meets default hierarchical relationship, and when the nodal community of the child node tree for meeting default hierarchical relationship meets default advertising node attribute, delete or hide the child node tree for meeting default hierarchical relationship.Advertisement filter method, apparatus provided by the invention and user terminal can be deleted or hidden to the child node tree for meeting default hierarchical relationship and advertising node attribute, so as to be filtered to various types of web advertisements and filter effect is persistently effective.
Description
Technical field
It is whole in particular to a kind of advertisement filter method, apparatus and user the present invention relates to Internet technical field
End.
Background technology
With the rise and development of mobile Internet, various types of web sites have all gathered the mobile end that the scale of construction does not wait
Hold (mobile phone, tablet) user.As customer flow cash most direct mode, web advertisement be most web sites not
Two selections.But the web advertisement ways of presentation (such as bottom floating window advertisement) of many experience sense differences, significantly impact user for
The normal browsing of web page contents.Such as the domestic non-legal novel website of major part, maintain website due to needing advertising income
Operation (or even profit), the floating window series advertisements from third party's advertising platform have been launched in each page.This series advertisements is fixed
At the bottom of the page or top, user's scroll through pages, position remains unchanged, and this showing advertisement mode is brought to user
Many tastes around.The text display area of mobile terminal is made to become smaller, and is easy to cause user to make former page without floating window advertisement is clicked on
The body matter browsing in face is interrupted.
At present, the advertising filtering function that existing browser provides is mainly based upon AdBlock storehouses and rule to realize,
AdBlock supports uniform resource locator (Uniform resoure locator, Url) path and two class of hiding element money
Source filter type.However, using the filter type based on AdBlock, when the Url changes of advertising resource or id/class attributes hair
When changing more, then advertising filtering function can be caused to fail.
Therefore, how to solve the problems, such as effective filtering web page advertisement is the big problem of one faced at present.
The content of the invention
In view of this, the embodiment of the present invention be designed to provide a kind of advertisement filter method, apparatus and user terminal with
Improve the above problem.
To achieve these goals, the technical solution that the embodiment of the present invention uses is as follows:
In a first aspect, an embodiment of the present invention provides a kind of advertisement filter method, applied to what is communicated to connect with server-side
Client, the advertisement filter method include:
Receive the web page resources page that server-side is sent;
Parse the node tree that the web page resources page obtains web page resources;
Search the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;
When finding the child node tree that meets default hierarchical relationship, and the child node tree for meeting default hierarchical relationship
When nodal community meets default advertising node attribute, delete or hide the child node tree for meeting default hierarchical relationship.
Second aspect, an embodiment of the present invention provides a kind of advertisement filter device, applied to what is communicated to connect with server-side
Client, the advertisement filter device include:
Receiving unit, for receiving the web page resources page of server-side transmission;
Resolution unit, for parsing the node tree that the web page resources page obtains web page resources;
Searching unit, for searching the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;
Execution unit for meeting the child node tree of default hierarchical relationship when finding, and described meets default level pass
When the nodal community of the child node tree of system meets default advertising node attribute, delete or hide and described meet default hierarchical relationship
Child node tree.
The third aspect, an embodiment of the present invention provides a kind of user terminal, the user terminal includes:
Memory;
Processor;And
Advertisement filter device, the advertisement filter device are installed in the memory and including one or more by described
The software function module that processor performs, the advertisement filter device include:
Receiving unit, for receiving the web page resources page of server-side transmission;
Resolution unit, for parsing the node tree that the web page resources page obtains web page resources;
Searching unit, for searching the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;
Execution unit for meeting the child node tree of default hierarchical relationship when finding, and described meets default level pass
When the nodal community of the child node tree of system meets default advertising node attribute, delete or hide and described meet default hierarchical relationship
Child node tree.
For the prior art, advertisement filter method, apparatus provided by the invention and user terminal have following beneficial effect
Fruit:
Advertisement filter method, apparatus provided by the invention and user terminal can solve the web page resources page got
Analysis obtains the node tree of web page resources, and the child node to meeting default hierarchical relationship and advertising node attribute (pattern and layout)
Tree is deleted or is hidden, so as to be filtered to various types of web advertisements and filter effect is persistently effective.
For the above objects, features and advantages of the present invention is enable to be clearer and more comprehensible, preferred embodiment cited below particularly, and coordinate
Appended attached drawing, is described in detail below.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair
The restriction of scope, for those of ordinary skill in the art, without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the schematic diagram that the server-side that present pre-ferred embodiments provide is interacted with user terminal.
Fig. 2 is the block diagram for the user terminal that present pre-ferred embodiments provide.
The flow chart for the advertisement filter method that Fig. 3 present pre-ferred embodiments provide.
The flow chart for the another advertisement filter method that Fig. 4 present pre-ferred embodiments provide.
Fig. 5 is the high-level schematic functional block diagram for the advertisement filter device that present pre-ferred embodiments provide.
Icon:100- user terminals, 110- advertisement filter devices, 111- receiving units, the first judging units of 112-, 113-
Writing unit, 114- resolution units, 115- searching units, 116- second judgment units, 117- execution units, 120- memories,
130- storage controls, 140- processors, 150- Peripheral Interfaces, 160- input-output units, 170- audio units, 180- are shown
Unit, 190- communication units, 200- networks, 300- server-sides.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can configure to arrange and design with a variety of herein.Cause
This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below
Scope, but it is merely representative of the selected embodiment of the present invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Go out all other embodiments obtained on the premise of creative work, belong to the scope of protection of the invention.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.Meanwhile the present invention's
In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that instruction or hint relative importance.
As shown in Figure 1, it is that the server-side 300 that present pre-ferred embodiments provide is shown with what user terminal 100 interacted
It is intended to.The server-side 300 is communicatively coupled by network 200 and one or more user terminals 100, is led to carrying out data
Letter or interaction.The server-side 300 can be network server, database server etc..The user terminal 100 can be
People's computer (personal computer, PC), tablet computer, smart mobile phone, personal digital assistant (personal digital
Assistant, PDA) etc..
As shown in Fig. 2, it is the block diagram of the user terminal 100.The user terminal 100 is filled including advertisement filter
Put 110, memory 120, storage control 130, processor 140, Peripheral Interface 150, input-output unit 160, audio unit
170th, display unit 180, communication unit 190.
The memory 120, storage control 130, processor 140, Peripheral Interface 150, input-output unit 160, sound
Frequency unit 170, display unit 180,190 each element of communication unit are directly or indirectly electrically connected between each other, to realize number
According to transmission or interaction.For example, these elements can be realized electrically between each other by one or more communication bus or signal wire
Connection.The advertisement filter device 110 include it is at least one can be stored in the form of software or firmware (firmware) it is described
In memory 120 or the software that is solidificated in the operating system (operating system, OS) of 100 equipment of user terminal
Function module.The processor 140 is used to perform the executable module stored in memory 120, such as advertisement filter dress
Put 110 software function modules or computer program included.
Wherein, memory 120 may be, but not limited to, random access memory (Random Access Memory,
RAM), read-only memory (Read Only Memory, ROM), (the Programmable Read- of programmable read only memory 120
Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory,
EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory,
EEPROM) etc..Wherein, memory 120 is for storing program, and the processor 140 is after receiving and executing instruction, described in execution
Program, the method performed by user terminal 100 that the stream process that foregoing any embodiment of the embodiment of the present invention discloses defines can be with
It is realized applied in processor 140 or by processor 140.
Processor 140 may be a kind of IC chip, have the processing capacity of signal.Above-mentioned processor 140 can
To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit
(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC),
Field programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard
Part component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor
Can be microprocessor or the processor 140 can also be any conventional processor etc..
Various input/output devices are coupled to processor 140 and memory 120 by the Peripheral Interface 150.At some
In embodiment, Peripheral Interface 150, processor 140 and storage control 130 can be realized in one single chip.Other one
In a little examples, they can be realized by independent chip respectively.
Input-output unit 160 is used to that user input data to be supplied to realize user and the interaction of the user terminal.Institute
It states input-output unit 160 may be, but not limited to, mouse and keyboard etc..
Audio unit 170 provides a user audio interface, may include one or more microphones, one or more raises
Sound device and voicefrequency circuit.
Display unit 180 provides an interactive interface (such as user interface) between the user terminal and user
Or it is referred to for display image data to user.In the present embodiment, the display unit 180 can be liquid crystal display or touch
Control display.Can be that the capacitance type touch control screen or resistance-type of single-point and multi-point touch operation is supported to touch if touch control display
Control screen etc..Single-point and multi-point touch operation is supported to refer to that touch control display can sense on the touch control display one or more
The touch control operation generated simultaneously at a position, and the touch control operation that this is sensed transfers to processor 140 to be calculated and handled.
The communication unit 190 is used to connect by establishing between the network 200 and the server-side 300, so as to real
Existing communication connection between the user terminal 100 and server-side 300, and for passing through 200 transceiving data of network.
Referring to Fig. 3, be present pre-ferred embodiments provide be applied to advertisement filter device 110 shown in Fig. 2 it is wide
Accuse the flow chart of filter method.Idiographic flow shown in Fig. 3 will be described in detail below.
Step S310 receives the web page resources page that server-side 300 is sent.
In embodiments of the present invention, when user is when user terminal 100 is by browser access webpage, server-side 300 will
The web page resources page of accessed webpage is sent to user terminal 100, and user terminal 100 receives the webpage that server-side 300 is sent
Resource page.
Step S320 writes advertisement filter code to the web page resources page.
After user terminal 100 receives the web page resources page of the transmission of server-side 300, write to the web page resources page pre-
The advertisement filter code first write.
Preferably, in T0 stages (when the http request of the web page resources page starts to receive reply data) write-in advertisement
It is optimal to filter code.
Certainly, in the present embodiment, which is not limited in writing in the web page resources page, such as can be with
The advertisement filter code is previously written browser kernel, when user terminal 100 receives the web page resources of the transmission of server-side 300
After the page, the advertisement filter being previously written code is called to perform subsequent step.
Step S330, analyzing web page resource page obtain the node tree of web page resources.
User terminal 100 is after the advertisement filter code that the web page resources page write-in received is write in advance, to the net
Page resource page is parsed, and obtains the node tree of the web page resources page.
Step S340 searches the child node tree for meeting default hierarchical relationship.
In the present embodiment, default hierarchical relationship is by the pattern to advertisement position and spatial layout feature effectively conclude drawing
, which can be user's definition by induction in advertisement filter code in advance, when carrying out advertisement filter, user
Terminal 100 can find out all child node trees for meeting default hierarchical relationship by calling the advertisement filter code.
For example, for floating window advertisement, pattern and spatial layout feature can be described below:
1. totally 2 grades of nodes, the 1st grade of node is div, and style attributes meet some specific conditions, as display belongs to
Property for block (block element), position attributes are fixed (position is fixed), and width attributes, which are more than, shields wide certain percentage
Or certain value (such as larger than shielding wide 95% or more than 415px), z-index attributes are more than a certain value, and (value is bigger, and display location is got over
It is forward) etc..
2. the 2nd grade of node (child node of the 1st grade of node) is a nodes, the sub- attribute of style attributes, which need to meet, to be carried
The sub- attributes of background-image, and quote picture resource.
Therefore, the child node tree that the hierarchical relationship of node is div/a is satisfied by the default hierarchical relationship, which can
It can be the node tree of floating window advertisement.
These are only for example, certainly page ad node tree hierarchical relationship be not limited in it is above-mentioned described
Mode, the purpose of this step are to find all child node trees for the hierarchical relationship for meeting the node that user terminal 100 is concluded in advance,
All child node trees found are likely to be the node tree of page ad.
In the present embodiment, search and meet the child node tree of default hierarchical relationship in the node tree of web page resources and be performed such
's:
User terminal 100 is within the preset period (such as 5 seconds), every default time interval (such as 50 millis
Second) node trees of web page resources is searched once, it searches whether to have in the node tree of web page resources and meets default hierarchical relationship
Child node tree if there is meeting the child node tree of default hierarchical relationship, then performs step S350, if closed without default level is met
The child node tree of system then treats that next time interval is searched again, until the preset period terminates.
Certainly, search meet in the node tree of web page resources default hierarchical relationship child node tree can also use others
Mode carries out, and is not specifically limited in the present embodiment.For example, it is also possible to call network application using within the default period
Meeting default hierarchical relationship in the node tree of routine interface (such as Mutation Observer interfaces) the lookup web page resources
Child node tree.
Step S350, judges whether the nodal community of the child node tree found out meets default advertising node attribute, such as
Fruit is to perform step S360.
The nodal community of page ad meets certain characteristic.As described above, the 1st grade of node div of floating window advertisement,
Style attributes meet some specific conditions, and if display attributes are block (block element), position attributes are fixed
(position is fixed), width attributes, which are more than, shields wide certain percentage or more than certain value, and z-index attributes are more than a certain value (value
Bigger, display location is more forward) etc..The sub- attribute of 2nd grade of node a, style attribute of floating window advertisement, which need to meet, to be carried
The sub- attributes of background-image.
Likewise, default advertising node attribute is also user's definition by induction in advertisement filter code in advance, such as
Above-mentioned display attributes are block (block element), and position attributes are fixed (position is fixed), and width attributes are more than
Shield wide certain percentage or more than certain value, z-index attributes are more than a certain value (value is bigger, and display location is more forward) etc.
Deng.After the child node tree for meeting default hierarchical relationship is found out, user terminal 100 can judge to search according to advertisement filter code
Whether the nodal community of the child node tree gone out meets default advertising node attribute, if meeting default advertising node attribute,
Then illustrate the node tree that the child node tree is page ad, perform step S360;If not meeting default advertising node attribute,
Then terminate entire method flow.
Step S360 is deleted or is hidden the child node tree.
When finding the child node tree that meets default hierarchical relationship, and the section of the child node tree for meeting default hierarchical relationship
When point attribute meets default advertising node attribute, then illustrate the node tree that the child node tree is page ad.At this point, user is whole
End 100 hides the filtering that can be realized to page ad by the way that the node Style Attributes of the child node tree are arranged to.Specifically,
Sub- attribute display in the style attributes of the 1st grade of node of the child node tree is arranged to " none ".
Certainly, page ad is filtered and is not limited only to the side that the above-mentioned top node by the child node tree is hidden
Formula.For example, it is also possible to be realized in a manner that the child node tree is directly deleted from the node tree of web page resources, the present invention is real
It applies in example and is not specifically limited.
To sum up, advertisement filter method provided in this embodiment can be by writing advertisement to the web page resources page received
Code is filtered, and web page resources are searched every default time interval within the default period according to the advertisement filter code of write-in
Node tree in meet the child node tree of default hierarchical relationship, and when the child node tree that find out meets default advertising node category
Property when, hide the child node tree so as to the filtering for reaching page ad.Consolidate since the final ways of presentation of page ad is opposite
Fixed (level and nodal community of the node tree of page ad are relatively fixed, i.e. pattern and layout is relatively fixed), therefore it may only be necessary to
The advance good filtering rule of definition by induction can effectively filter page ad in advertisement filter code, even if advertisement provides
Still the filter effect of page ad is not interfered with when Url the or id/class attributes in source change, it is ensured that filter effect is held
Long effectively, good viewing experience is provided to the user.
Referring to Fig. 4, be present pre-ferred embodiments provide be applied to advertisement filter device 110 shown in Fig. 2 again
The flow chart of one advertisement filter method.Idiographic flow shown in Fig. 4 will be described in detail below.
Step S410 receives the web page resources page that server-side is sent.
In embodiments of the present invention, when user is when user terminal 100 is by browser access webpage, server-side 300 will
The web page resources page of accessed webpage is sent to user terminal 100, and user terminal 100 receives the webpage that server-side 300 is sent
Resource page.
Step S420, judges whether the domain name of the web page resources page received meets predetermined domain name rule, if so,
Perform step S430.
User terminal 100 can establish the black and white lists mechanism of host's page domain name, the part web page resources page be carried out wide
Accuse filtering.Specifically, the domain name rule of advertisement filter is applicable in the definition of user terminal 100 in advance, when the web page resources received
After the page, whether the web page resources page that user terminal 100 judges to receive meets predetermined domain name rule.When the net received
(as being preset domain when the domain name of the web page resources page received when page resource page meets predetermined domain name rule
When name or the top level domain of the web page resources page received belong to a certain class domain name), then perform subsequent advertisement filter step
Suddenly, otherwise not subsequent advertisement filter step is performed.
For example, the domain name of certain more non-legal novel website of page ad can be arranged in blacklist in advance, when
When logging in the non-legal novel website, user terminal 100 is to carry out advertisement to the web page resources page of the non-legal novel website
Filtering.
It in this way, can be according to the website progress targetedly advertisement needed to some specific websites or a certain type of user
Filtering, so as to fulfill the personalized customization of advertisement filter.
Step S430, the advertisement filter code that browser kernel is called to be previously written.
After user terminal 100 receives the web page resources page of the transmission of server-side 300, browser kernel is called to write in advance
The advertisement filter code entered is to perform subsequent step.
Certainly, the advertisement filter code of calling is not limited in being previously written the mode of browser kernel.For example, work as user
After terminal 100 receives the web page resources page of the transmission of server-side 300, it can also use and be write to the web page resources page received
Enter the mode for the advertisement filter code finished in advance.
Step S440, analyzing web page resource page obtain the node tree of web page resources.
User terminal 100 is after the advertisement filter code that the web page resources page write-in received is write in advance, to the net
Page resource page is parsed, and obtains the node tree of the web page resources page.
Step S450 searches the child node tree for meeting default hierarchical relationship.
In the present embodiment, default hierarchical relationship is by the pattern to advertisement position and spatial layout feature effectively conclude drawing
, which can be user's definition by induction in advertisement filter code in advance, when carrying out advertisement filter, user
Terminal 100 can find out all child node trees for meeting default hierarchical relationship by calling the advertisement filter code.
Specifically, user terminal 100 is within the preset period, every default time interval to web page resources
Node tree is searched once, and whether search has the child node tree for meeting default hierarchical relationship in the node tree of web page resources, if there is
Meet the child node tree of default hierarchical relationship, then perform step S460, if without if meeting the child node tree of default hierarchical relationship
Treat that next time interval is searched again, until the preset period terminates.
Step S460, judges whether the nodal community of the child node tree found out meets default advertising node attribute, such as
Fruit is to perform step S470.
Default advertising node attribute can be user's definition by induction in advertisement filter code in advance, meet finding out
After the child node tree of default hierarchical relationship, user terminal 100 can be sentenced according to default advertising node attribute in advertisement filter code
Whether the nodal community of the disconnected child node tree found out meets default advertising node attribute, if meeting default advertising node
Attribute then illustrates the node tree that the child node tree is page ad, performs step S470;If default advertising node is not met
Attribute then terminates entire method flow.
Step S470 is deleted or is hidden the child node tree.
When finding the child node tree that meets default hierarchical relationship, and the section of the child node tree for meeting default hierarchical relationship
When point attribute meets default advertising node attribute, then illustrate the node tree that the child node tree is page ad.At this point, user is whole
End 100 directly can be filtered out page ad by way of deleting the child node tree.
Certainly, the mode for being not limited only to above-mentioned deletion child node tree is filtered to page ad.For example, it is also possible to using
The node Style Attributes of the child node tree are arranged to the filtering that hiding mode realizes page ad.
To sum up, advertisement filter method provided in this embodiment to browser kernel by writing advertisement filter code, and root
It is pre- every meeting in the node tree that default time interval searches web page resources within the default period according to advertisement filter code
If the child node tree of hierarchical relationship, and when the child node tree found out meets default advertising node attribute, delete the sub- section
Point sets the filtering for reaching page ad, it is ensured that filter effect is persistently effective, provides good viewing experience to the user.Together
When, advertisement filter method provided in this embodiment can also be according to predetermined domain name rule to meeting the net of the predetermined domain name rule
Page resource page is targetedly filtered, so as to fulfill the personalized customization of advertisement filter.
Referring to Fig. 5, it is the function module for the advertisement filter device 110 shown in Fig. 2 that present pre-ferred embodiments provide
Schematic diagram.The advertisement filter device 110 includes receiving unit 111, the first judging unit 112, writing unit 113, parsing
Unit 114, searching unit 115, second judgment unit 116 and execution unit 117.
The receiving unit 111 is used to receive the web page resources page of the transmission of server-side 300.
In embodiments of the present invention, when user is when user terminal 100 is by browser access webpage, server-side 300 will
The web page resources page of accessed webpage is sent to user terminal 100, and user terminal 100 is received by receiving unit 111 and serviced
The web page resources page that end 300 is sent.
It should be understood that the receiving unit 111 can be used for performing above-mentioned step S410 or step S310.
Whether domain name of first judging unit 112 for the web page resources page that judgement receives meets predetermined domain
Name rule.
After the web page resources page that user terminal 100 receives, user terminal 100 is sentenced by the first judging unit 112
Whether the web page resources page that disconnecting receives meets predetermined domain name rule.
It should be understood that first judging unit 112 can perform above-mentioned step S420.
Writing unit 113 is used to write advertisement filter code to the web page resources page or be write to browser kernel
Advertisement filter code.
After user terminal 100 receives the web page resources page of the transmission of server-side 300, user terminal 100 passes through write-in
Unit 113 writes the advertisement filter code write in advance to the web page resources page or writes advertisement filter to browser kernel
Code.
It should be understood that said write unit 113 can perform above-mentioned step S430.
Resolution unit 114 is used to parse the node tree that the web page resources page obtains web page resources.
User terminal 100 is write pre- by writing unit 113 to the web page resources page (or browser kernel) received
After the advertisement filter code first write, the web page resources page is parsed by resolution unit 114, obtains web page resources page
The node tree in face.
It should be understood that the resolution unit 114 can perform above-mentioned step S440 or step S330.
Searching unit 115 meets the child node tree of default hierarchical relationship for searching in the node tree of the web page resources.
When resolution unit 114 parses the web page resources page, after obtaining the node tree of the web page resources page, user is whole
End 100 can call the advertisement filter code so as to find out all son sections for meeting default hierarchical relationship by searching for unit 115
Point tree.
It should be understood that the searching unit 115 can perform above-mentioned step S450 or step S340.
It is pre- whether the nodal community for the child node tree that second judgment unit 116 meets default hierarchical relationship for judgement meets
If advertising node attribute.
After the child node tree for meeting default hierarchical relationship is found out, user terminal 100 can pass through second judgment unit 116
It is pre- according to whether the nodal community of the child node tree that default advertising node determined property is found out in advertisement filter code meets
If advertising node attribute.
It should be understood that the second judgment unit 116 can perform above-mentioned step S460 or step S350.
Execution unit 117 is used to work as the child node tree for finding and meeting default hierarchical relationship, and meets default hierarchical relationship
The nodal community of child node tree when meeting default advertising node attribute, delete or hide and described meet default hierarchical relationship
Child node tree.
When finding the child node tree that meets default hierarchical relationship, and the section of the child node tree for meeting default hierarchical relationship
When point attribute meets default advertising node attribute, then illustrate the node tree that the child node tree is page ad.At this point, user is whole
End 100 can filter out page ad in a manner that the child node tree is deleted or hidden to execution unit 117.
It should be understood that the execution unit 117 can perform above-mentioned step S470 or step S360.
To sum up, advertisement filter device 110 provided in an embodiment of the present invention can by the web page resources page received or
Browser kernel write advertisement filter code, and according to advertisement filter code within the default period every between the default time
Every meeting the child node tree of default hierarchical relationship in the node tree for searching web page resources, and the child node tree that ought be found out meet it is pre-
If advertising node attribute when, delete or hide the child node tree so as to the filtering for reaching page ad, it is ensured that filter effect is held
Long effectively, good viewing experience is provided to the user.It meanwhile can also be according to predetermined domain name rule to meeting the predetermined domain name
The web page resources page of rule is targetedly filtered, so as to fulfill the personalized customization of advertisement filter.
In several embodiments provided herein, it should be understood that disclosed apparatus and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the devices of multiple embodiments according to the present invention, method and computer program product architectural framework in the cards,
Function and operation.In this regard, each box in flow chart or block diagram can represent the one of a module, program segment or code
Part, a part for the module, program segment or code include one or more and are used to implement holding for defined logic function
Row instruction.It should also be noted that at some as in the realization method replaced, the function that is marked in box can also be to be different from
The order marked in attached drawing occurs.For example, two continuous boxes can essentially perform substantially in parallel, they are sometimes
It can perform in the opposite order, this is depending on involved function.It is it is also noted that every in block diagram and/or flow chart
The combination of a box and the box in block diagram and/or flow chart can use function or the dedicated base of action as defined in performing
It realizes or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be
People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.It needs
Illustrate, herein, relational terms such as first and second and the like be used merely to by an entity or operation with
Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities
The relation or order on border.Moreover, term " comprising ", "comprising" or its any other variant are intended to the bag of nonexcludability
Contain so that process, method, article or equipment including a series of elements not only include those elements, but also including
It other elements that are not explicitly listed or further includes as elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, also there are other identical elements in article or equipment.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exists
Similar terms is represented in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, is then not required in subsequent attached drawing
It is further defined and is explained.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.
Claims (12)
- A kind of 1. advertisement filter method, applied to the client communicated to connect with server-side, which is characterized in that the advertisement filter Method includes:Receive the web page resources page that server-side is sent;Parse the node tree that the web page resources page obtains web page resources;Search the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;When finding the child node tree that meets default hierarchical relationship, and the node of the child node tree for meeting default hierarchical relationship When attribute meets default advertising node attribute, delete or hide the child node tree for meeting default hierarchical relationship.
- 2. according to the method described in claim 1, it is characterized in that, in the web page resources page for receiving server-side and sending After step, the method further includes:Judge whether the domain name of the web page resources page received meets predetermined domain name rule;The step of parsing web page resources page obtains the node tree of web page resources includes:When the domain name of the web page resources page received meets predetermined domain name rule, the web page resources page is parsed Obtain the node tree of web page resources.
- 3. according to the method described in claim 1, it is characterized in that, the method is applied to the browsing of client installation Device, before the step of parsing web page resources page obtains the node tree of web page resources, the method further includes:The advertisement being previously written to the kernel that the web page resources page writes advertisement filter code or calls the browser Filter code.
- 4. according to the method described in claim 1, it is characterized in that, meet in the node tree for searching the web page resources pre- If the step of child node tree of hierarchical relationship, includes:Every meeting default level in the node tree that default time interval searches the web page resources within the default period The child node tree of relation or the node tree that web page resources described in web application interface lookup are called within the default period In meet the child node tree of default hierarchical relationship.
- 5. according to the method described in claim 1, it is characterized in that, described hide the child node for meeting default hierarchical relationship The step of tree, includes:The node Style Attributes of the child node tree for meeting default hierarchical relationship are arranged to hiding.
- A kind of 6. advertisement filter device, applied to the client communicated to connect with server-side, which is characterized in that the advertisement filter Device includes:Receiving unit, for receiving the web page resources page of server-side transmission;Resolution unit, for parsing the node tree that the web page resources page obtains web page resources;Searching unit, for searching the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;Execution unit for meeting the child node tree of default hierarchical relationship when finding, and described meets default hierarchical relationship When the nodal community of child node tree meets default advertising node attribute, delete or hide the son for meeting default hierarchical relationship Node tree.
- 7. advertisement filter device according to claim 6, which is characterized in that the advertisement filter device further includes:Whether the first judging unit, the domain name for judging the web page resources page received meet predetermined domain name rule Then;The resolution unit is used for when the domain name of the web page resources page received meets predetermined domain name rule, parsing The web page resources page obtains the node tree of web page resources.
- 8. advertisement filter device according to claim 6, which is characterized in that the advertisement filter device further includes:Second judgment unit, it is default whether the nodal community for judging the child node tree for meeting default hierarchical relationship meets Advertising node attribute.
- 9. advertisement filter device according to claim 6, which is characterized in that the advertisement filter device is applied to the visitor The browser of family end installation, the advertisement filter device further include:Writing unit, for writing advertisement filter code to the web page resources page or calling the kernel of the browser pre- The advertisement filter code first write.
- 10. advertisement filter device according to claim 6, which is characterized in that the searching unit is used for when default Between in section every the child node tree for meeting default hierarchical relationship in the node tree that default time interval searches the web page resources, Or it is called within the default period in the node tree of web page resources described in web application interface lookup and meets default level The child node tree of relation.
- 11. advertisement filter device according to claim 6, which is characterized in that the execution unit is used to meet described The node Style Attributes of the child node tree of default hierarchical relationship are arranged to hiding.
- 12. a kind of user terminal, which is characterized in that the user terminal includes:Memory;Processor;AndAdvertisement filter device, the advertisement filter device are installed in the memory and including one or more by the processing The software function module that device performs, the advertisement filter device include:Receiving unit, for receiving the web page resources page of server-side transmission;Resolution unit, for parsing the node tree that the web page resources page obtains web page resources;Searching unit, for searching the child node tree for meeting default hierarchical relationship in the node tree of the web page resources;Execution unit for meeting the child node tree of default hierarchical relationship when finding, and described meets default hierarchical relationship When the nodal community of child node tree meets default advertising node attribute, delete or hide the son for meeting default hierarchical relationship Node tree.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610981659.9A CN108062324A (en) | 2016-11-08 | 2016-11-08 | Advertisement filter method, apparatus and user terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610981659.9A CN108062324A (en) | 2016-11-08 | 2016-11-08 | Advertisement filter method, apparatus and user terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108062324A true CN108062324A (en) | 2018-05-22 |
Family
ID=62136921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610981659.9A Pending CN108062324A (en) | 2016-11-08 | 2016-11-08 | Advertisement filter method, apparatus and user terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108062324A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108846061A (en) * | 2018-06-01 | 2018-11-20 | 北京金山云网络技术有限公司 | Shield the method, apparatus and terminal device of advertisement |
CN109582900A (en) * | 2018-11-14 | 2019-04-05 | 百度在线网络技术(北京)有限公司 | The page loads filter method and its device |
CN112099875A (en) * | 2020-09-21 | 2020-12-18 | 深圳市欢太科技有限公司 | Webpage loading method and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130145255A1 (en) * | 2010-08-20 | 2013-06-06 | Li-Wei Zheng | Systems and methods for filtering web page contents |
CN103838880A (en) * | 2014-03-28 | 2014-06-04 | 北京金山网络科技有限公司 | Webpage advertisement filter method and device |
CN104239422A (en) * | 2014-08-21 | 2014-12-24 | 小米科技有限责任公司 | Advertisement identification method, advertisement identification device and electronic equipment |
CN104778405A (en) * | 2015-03-11 | 2015-07-15 | 小米科技有限责任公司 | Method and device for blocking advertisements |
CN106033450A (en) * | 2015-03-17 | 2016-10-19 | 中兴通讯股份有限公司 | Method and device for blocking advertisement, and browser |
-
2016
- 2016-11-08 CN CN201610981659.9A patent/CN108062324A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130145255A1 (en) * | 2010-08-20 | 2013-06-06 | Li-Wei Zheng | Systems and methods for filtering web page contents |
CN103838880A (en) * | 2014-03-28 | 2014-06-04 | 北京金山网络科技有限公司 | Webpage advertisement filter method and device |
CN104239422A (en) * | 2014-08-21 | 2014-12-24 | 小米科技有限责任公司 | Advertisement identification method, advertisement identification device and electronic equipment |
CN104778405A (en) * | 2015-03-11 | 2015-07-15 | 小米科技有限责任公司 | Method and device for blocking advertisements |
CN106033450A (en) * | 2015-03-17 | 2016-10-19 | 中兴通讯股份有限公司 | Method and device for blocking advertisement, and browser |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108846061A (en) * | 2018-06-01 | 2018-11-20 | 北京金山云网络技术有限公司 | Shield the method, apparatus and terminal device of advertisement |
CN108846061B (en) * | 2018-06-01 | 2022-04-29 | 北京金山云网络技术有限公司 | Method, device and terminal equipment for shielding advertisement |
CN109582900A (en) * | 2018-11-14 | 2019-04-05 | 百度在线网络技术(北京)有限公司 | The page loads filter method and its device |
CN112099875A (en) * | 2020-09-21 | 2020-12-18 | 深圳市欢太科技有限公司 | Webpage loading method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9582156B2 (en) | Electronic publishing mechanisms | |
US8533141B2 (en) | Systems and methods for rule based inclusion of pixel retargeting in campaign management | |
US20190347287A1 (en) | Method for screening and injection of media content based on user preferences | |
CN102629273B (en) | Advertising information pushing method based on browser, device and browser system | |
US8090703B1 (en) | Overlapping experiments | |
Zeng et al. | Bad news: Clickbait and deceptive ads on news and misinformation websites | |
US20110321003A1 (en) | Systems and Methods For Providing Modular Configurable Creative Units For Delivery Via Intext Advertising | |
CN102930058B (en) | A kind of method and apparatus realizing searching in the address field of browser | |
US20100318422A1 (en) | Method for recommending information of goods and system for executing the method | |
CN102930057A (en) | Search implementation method and device | |
CN105677654B (en) | Advertisement filtering method and device | |
CN102591971A (en) | Method and device for extracting webpage information | |
CN105243058A (en) | Webpage content translation method and electronic apparatus | |
CN103164423A (en) | Method and device for confirming browser inner core type rendering web pages | |
CN108062324A (en) | Advertisement filter method, apparatus and user terminal | |
CN104216885A (en) | Recommending system and method with static and dynamic recommending reasons automatically combined | |
CN107798558A (en) | User behavior data analysis method and server | |
CN105224652A (en) | A kind of information recommendation method based on video and electronic equipment | |
CN109522497A (en) | A kind of the adaptation display methods and device of the news web page page | |
CN105138702A (en) | Web search method based on search engines and electronic equipment | |
CN105224654A (en) | A kind of Web browsing mode changing method and electronic equipment | |
CN105260432A (en) | Network searching result screening method and electronic device | |
CN105183903A (en) | Information recommendation method based on article and electronic equipment | |
CN105138704A (en) | Search result control method and electronic equipment | |
CN105243133B (en) | A kind of search record display methods and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200622 Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province Applicant after: Alibaba (China) Co.,Ltd. Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping B radio 14 floor tower square Applicant before: GUANGZHOU UCWEB COMPUTER TECHNOLOGY Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180522 |