Movatterモバイル変換


[0]ホーム

URL:


CN104123276A - Method, device and system for intercepting popup windows in browser - Google Patents

Method, device and system for intercepting popup windows in browser
Download PDF

Info

Publication number
CN104123276A
CN104123276ACN201310141901.8ACN201310141901ACN104123276ACN 104123276 ACN104123276 ACN 104123276ACN 201310141901 ACN201310141901 ACN 201310141901ACN 104123276 ACN104123276 ACN 104123276A
Authority
CN
China
Prior art keywords
request
popup
pop
interception
intercepting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310141901.8A
Other languages
Chinese (zh)
Other versions
CN104123276B (en
Inventor
童磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN201310141901.8ApriorityCriticalpatent/CN104123276B/en
Publication of CN104123276ApublicationCriticalpatent/CN104123276A/en
Application grantedgrantedCritical
Publication of CN104123276BpublicationCriticalpatent/CN104123276B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the invention discloses a method, device and system for intercepting popup windows in a browser. When it is detected that the browser sends out a popup window request, a hook function is called, then whether the popup window request is sent by a user willingly is determined through the hook function, if the request is sent by the user willingly, popup window operation is carried out, and otherwise the popup window request is intercepted according to preset rules. The hook function is suitable for all browsers, so that compatibility is good, the compatibility problem does not exist, special popup window intercepting plug-ins do not need to be developed for different browsers, later maintenance is not needed, development capacity is small, and the method, device and system are easy and flexible to achieve.

Description

Method, device and system for intercepting popup in browser
Technical Field
The invention relates to the technical field of communication, in particular to a method, a device and a system for intercepting a popup window in a browser.
Background
A Browser (Browser), which is a client browsing program of a web service, can interpret, display, and play data, such as hypertext information and various multimedia data, returned by the web server according to various requests by sending the requests to the web server. Through the browser, the user can browse various data of the web service, such as web pages, videos, and the like. In the process, besides the data requested by the user, other data such as pop-up advertisements often appear, and these pop-up windows often cause harassment to the user, and greatly affect the browsing experience of the user.
Taking a pop-up window advertisement as an example, in the prior art, the pop-up window advertisement interception plug-in is generally loaded in a browser to intercept the pop-up window advertisement in the browser. However, because the types of the current browsers are many and the characteristics of the various browsers are quite different, it is difficult to migrate the same pop-up advertisement blocking plug-in to different browsers, that is, different plug-ins are generally required to be developed for different browsers.
In the research and practice process of the prior art, the inventor of the present invention finds that, because each browser kernel in the prior art needs to additionally maintain one plug-in, the later maintenance is troublesome, and different plug-ins need to be developed for different browsers, the development amount is also large, and the implementation is not flexible enough.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for intercepting a popup window in a browser, which do not need later maintenance, have small development amount and are flexible to implement.
The embodiment of the invention provides a method for intercepting a popup in a browser, which comprises the following steps:
when detecting that a browser initiates a popup request, calling a hook function;
determining whether the popup request is a request actively initiated by a user by using the hook function;
if yes, performing popup operation according to the popup request;
if not, intercepting the popup request according to a preset rule.
Optionally, the calling the hook function when detecting that the browser initiates the pop-up request may include:
when detecting that the browser calls a specified popup function to open a link address, calling a hook function; or,
and when detecting that the browser calls the ActiveX control to open the link address in a popup window mode, calling a hook function.
Optionally, the determining, by using the hook function, whether the pop-up window request is a request actively initiated by a user may include:
and determining whether the link address is a request actively initiated by a user by using the hook function.
Optionally, the preset rule includes an interception mode and an interception rule, and intercepting the popup request according to the preset rule may include:
determining a current interception mode and an interception rule;
if the current interception mode is a strong interception mode, intercepting the popup request;
and if the current interception mode is the accurate interception mode, determining whether the popup request conforms to an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
Optionally, the determining whether the pop-up window request meets an interception rule, if yes, intercepting the pop-up window request, and if not, performing a pop-up window operation according to the pop-up window request, which may include:
determining whether the pop-up window request is a pop-up window advertisement link or not according to an interception rule;
if yes, intercepting the popup request;
and if not, performing popup operation according to the popup request.
Optionally, after intercepting the pop window request, the method may further include:
and informing the user of the interception result and the intercepted detailed information.
Correspondingly, the embodiment of the invention also provides an intercepting device of the popup in the browser, which comprises a detection unit, a judgment unit, a first processing unit and a second processing unit;
the detection unit is used for calling a hook function when detecting that the browser initiates a popup request;
the judging unit is used for determining whether the popup request is a request initiated by a user actively by utilizing the hook function;
the first processing unit is used for performing popup operation according to the popup request when the judging unit determines that the popup request is a request actively initiated by a user;
and the second processing unit is used for intercepting the popup request according to a preset rule when the judging unit determines that the popup request is not a request actively initiated by a user.
Optionally, the detecting unit may be specifically configured to call a hook function when detecting that the browser calls a specified popup function to open the link address; or, when detecting that the browser calls the ActiveX control to open the link address in a popup mode, calling the hook function.
Optionally, the determining unit may be specifically configured to determine whether the link address is a request actively initiated by the user by using the hook function.
Optionally, the preset rule may include an interception mode and an interception rule, and then:
the second processing unit may be specifically configured to determine a current interception mode and an interception rule; if the current interception mode is a strong interception mode, intercepting the popup request; and if the current interception mode is the accurate interception mode, determining whether the popup request conforms to an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
Optionally, the second processing unit may be specifically configured to determine a current interception mode and an interception rule; if the current interception mode is a strong interception mode, intercepting the popup request; if the current interception mode is the accurate interception mode, determining whether the pop-up window request is a pop-up window advertisement link according to an interception rule, and if the current interception mode is the accurate interception mode, intercepting the pop-up window request; and if the advertisement link is not the popup advertisement link, carrying out popup operation according to the popup request.
Optionally, the intercepting apparatus for popup window in the browser may further include a notification unit, as follows:
and the notification unit is used for notifying the user of the interception result and the intercepted detailed information.
In addition, the embodiment of the invention also provides a communication system which comprises any one of the intercepting devices for the popup in the browser provided by the embodiment of the invention.
The method comprises the steps of calling a hook function when detecting that a browser initiates a popup request, then determining whether the popup request is a request actively initiated by a user by using the hook function, if so, performing popup operation, and otherwise, intercepting the popup request according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an interception method for a popup in a browser according to an embodiment of the present invention;
fig. 2a is a scene schematic diagram of an intercepting method of a popup in a browser according to an embodiment of the present invention;
fig. 2b is another flowchart of a method for intercepting a popup in a browser according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an intercepting apparatus for pop-up windows in a browser according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method, a device and a system for intercepting a popup in a browser. The following are detailed below.
The first embodiment,
The embodiment of the present invention will be described from the perspective of an intercepting device for pop-up windows in a browser, where the intercepting device for pop-up windows in a browser may be specifically integrated in a client, and the client may be loaded in a terminal, where the terminal may specifically be a smart phone, a tablet computer, an electronic book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts compression standard Audio Layer 3), a laptop, a desktop computer, and the like.
A method for intercepting popup in a browser comprises the following steps: when detecting that a browser initiates a popup request, calling a hook function, determining whether the popup request is a request actively initiated by a user by using the hook function, and if so, performing popup operation according to the popup request; if not, intercepting the popup request according to a preset rule.
As shown in fig. 1, the specific process may be as follows:
101. and when detecting that the browser initiates a popup request, calling a hook function.
The pop-up window is realized in two general ways, one is realized by directly calling a pop-up window function, and the other is realized by calling some ActiveX controls which can realize the function of opening the link address, that is, step 101 may specifically include any one of the following ways:
(1) when detecting that the browser calls a specified popup function to open a link address, calling a hook function;
for example, the specified popup function may be "window.
(2) And when detecting that the browser calls the ActiveX control to open the link address in a popup window mode, calling a hook function.
For example, the ActiveX control may be "Windows API ShellExecuteEx" or the like.
The link address may be a Uniform Resource Locator (URL).
102. And determining whether the pop-up window request is a request initiated by the user actively by using the hook function called in the step 101, if so, executing the step 103, and if not, executing the step 104.
For example, it may be specifically determined whether the link address requested by the pop-up request is a request actively initiated by the user by using the called hook function, and if the link address is the request actively initiated by the user, step 103 is executed, otherwise, if the link address is not the request actively initiated by the user, step 104 is executed.
103. And performing popup operation according to the popup request.
For example, the browser may specifically be allowed to call a specified popup function, such as "window.
104. And intercepting the popup request according to a preset rule.
The preset rules may include an interception mode and an interception rule. The interception mode may include a strong interception mode and an accurate interception mode, and in the strong interception mode, the pop-up window request may be directly intercepted, and in the accurate interception mode, the pop-up window request may be intercepted only when the pop-up window request meets a preset interception rule. That is, the step of "intercepting the pop-up request according to the preset rule" may include:
determining a current interception mode and an interception rule; if the current interception mode is a strong interception mode, intercepting the popup request; if the current interception mode is the accurate interception mode, determining whether the popup request accords with an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
The interception rule may be set according to a requirement of an actual application, for example, if a popup advertisement needs to be intercepted, a popup advertisement rule base may be set to store rules (for example, various popup links) of various popup advertisements, and if a popup request meets the rules, the popup request is indicated as a popup advertisement, so that the popup request needs to be intercepted at this time. That is, the step "determining whether the pop-up window request meets the interception rule, if yes, intercepting the pop-up window request, and if not, performing the pop-up window operation according to the pop-up window request" may specifically be as follows:
determining whether the pop-up window request is a pop-up window advertisement link according to an interception rule, and if so, intercepting the pop-up window request; and if not, performing popup operation according to the popup request.
In addition, optionally, in order to improve the quality of user experience, the user may also be notified of the interception result and detailed information of interception. That is, after the step "intercepting the pop-up request", the method for intercepting the pop-up in the browser may further include:
and informing the user of the interception result and the intercepted detailed information.
As can be seen from the above, in the embodiment, when it is detected that the browser initiates a pop-up request, a hook function is called, then the hook function is used to determine whether the pop-up request is a request initiated by a user actively, if the request is the request initiated by the user actively, a pop-up operation is performed, otherwise, the pop-up request is intercepted according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Example II,
According to the method described in the first embodiment, the following description will take the example of blocking pop-up advertisements.
As shown in fig. 2a, the browser page data filtering apparatus may be specifically a client, such as a browser, which may be loaded in a terminal, and the client may include a browser monitoring module, a detection interception module, and a user notification module. In this embodiment, the functions of the respective modules may be as follows:
(1) a browser monitoring module;
the browser monitoring module is mainly used for detecting the browser, when the browser is detected to initiate a popup request, the popup request is paused, the popup request is forwarded to the detection and interception module to detect whether the popup request is a request actively initiated by a user, whether the popup request is a popup advertisement link or not, a detection and interception result returned by the detection and interception module is received, if the detection result indicates that the popup request is the request actively initiated by the user, the browser is informed to perform popup operation according to the popup request, and if the popup request is not the request actively initiated by the user, the popup request is intercepted according to a preset rule. For example, if the current interception mode is a strong interception mode, the pop window request is directly intercepted; and if the current interception mode is the accurate interception mode, intercepting the pop-up window request when the pop-up window request is determined to be the pop-up window advertisement link.
The form of the popup may include various forms, such as an automatic popup, a webpage click popup (i.e., a popup popped up when a webpage is clicked), a webpage bounce (i.e., a popup popped up when a webpage is exited), and the like.
(2) A detection interception module;
and the detection interception module is mainly used for receiving the popup request forwarded by the browser injection module, determining the popup request to detect by using the called hook function according to the called hook function of the popup request so as to judge whether the popup request is a request actively initiated by a user, detecting whether data requested by the popup request is a popup advertisement link or not by using an advertisement rule base, and returning a detection result to the browser monitoring module.
It should be noted that, since the interception rules are all in the advertisement rule base, when the system is started, the detection interception module needs to analyze the advertisement rule base and detect the update condition of the advertisement rule base, that is, request a new advertisement rule base, so that the advertisement can be intercepted more accurately.
The advertisement rule base can be stored in the server and maintained by the server, for example, a "background pop-up window rule collection module" can be specifically set at the server for daily URL source code analysis work, pop-up window advertisement links in the URLs are extracted, and the generated interception rules are issued to the client for use by the detection interception module.
(3) A user notification module;
and the user notification module is mainly used for notifying the user of the interception result and the intercepted detailed information after the detection interception module intercepts the popup advertisement so that the user can judge whether the interception is proper or not, and then the user can check the intercepted information in a log checking mode and the like.
Based on the structure of the client, as shown in fig. 2b, a method for filtering browser page data may specifically include the following steps:
201. when the browser monitoring module detects that the browser initiates a popup request, the popup request is forwarded to the detection intercepting module.
For example, when the browser monitoring module detects that the browser calls a specified popup function, such as "window.
For another example, when the browser monitoring module detects that the browser calls the ActiveX control to open the link address in a pop-up form, the browser monitoring module suspends the request of the pop-up request, forwards the pop-up request to the detection intercepting module to determine whether the pop-up request is a request actively initiated by the user, determines whether data requested by the pop-up request is a link of a pop-up advertisement, and waits for the detection intercepting module to return a detection result.
202. The detection interception module calls a hook function according to the pop-up window request received in step 201.
203. Detecting whether the called hook function of the interception module determines that the link address requested by the pop-up window request is a request actively initiated by a user, if not, executing step 204; if the request is initiated by the user, a detection result indicating that the pop-up request is initiated by the user is returned to the browser monitoring module, and step 205 is executed.
204. The detection interception module determines a current interception mode and an interception rule, detects the popup request according to the interception mode and the interception rule to obtain a detection result, and sends the detection result to the browser monitoring module, wherein the detection result specifically comprises the following steps:
if the current interception mode is the powerful interception mode, directly returning a detection result indicating that the popup request is not a request actively initiated by the user and needs to be directly intercepted to the browser monitoring module, and executing step 205;
if the current interception mode is the accurate interception mode, determining whether the pop-up window request is a pop-up window advertisement link according to an interception rule, if so, returning a detection result indicating that the pop-up window request is not a request actively initiated by a user and is the pop-up window advertisement link to the browser monitoring module, and executing step 205; if not, returning a detection result indicating that the pop-up request is not the request actively initiated by the user but is not the pop-up advertisement link to the browser monitoring module, and executing step 205.
205. The browser monitoring module receives a detection result returned by the detection intercepting module, and if the detection result indicates that the popup request is a request actively initiated by a user, or if the detection result indicates that the popup request is not a request actively initiated by the user but is not linked with the popup advertisement, the browser is informed to carry out popup operation according to the popup request; otherwise, if the detection result indicates that the pop-up request is not the request actively initiated by the user and needs to be intercepted directly, or if the detection result indicates that the pop-up request is not the request actively initiated by the user and is linked with the pop-up advertisement, the pop-up request is intercepted.
206. Optionally, the user notification module may receive the interception result and the interception detailed information sent by the browser monitoring module, for example, which pop-up advertisements are specifically intercepted, and notify the user of the interception result and the interception detailed information, so that the user can determine whether the interception is appropriate.
Thereafter, the user can view the interception information by viewing a log or the like.
As can be seen from the above, in the embodiment, when it is detected that the browser initiates a pop-up request, a hook function is called, then the hook function is used to determine whether the pop-up request is a request initiated by a user actively, if the request is the request initiated by the user actively, a pop-up operation is performed, otherwise, the pop-up request is intercepted according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Furthermore, the interception scheme in the prior art can only intercept the popup advertisement which realizes the popup by calling the popup function through the JS execution engine, but cannot intercept the popup advertisement which realizes the popup by calling the plug-in, and the scheme is suitable for both the popup modes, so that the condition of missed interception can be avoided, and the interception of the popup advertisement is more effective and accurate.
Example III,
In order to better implement the above method, an embodiment of the present invention further provides an apparatus for intercepting a pop-up window in a browser, as shown in fig. 3, the apparatus for intercepting a pop-up window in a browser includes a detecting unit 301, a determining unit 302, a first processing unit 303, and a second processing unit 304;
the detection unit 301 is configured to call a hook function when detecting that a browser initiates a pop-up request;
a determining unit 302, configured to determine whether the pop-up window request is a request initiated by a user actively by using the called hook function;
a first processing unit 303, configured to perform a pop-up operation according to the pop-up request when the determining unit 302 determines that the pop-up request is a request initiated by a user actively;
the second processing unit 304 is configured to intercept the popup request according to a preset rule when the determining unit 302 determines that the popup request is not a request actively initiated by a user.
The pop-up window is realized in two general ways, one is realized by directly calling a pop-up window function, and the other is realized by calling some ActiveX controls which can realize the function of opening the link address, namely:
the detecting unit 301 may be specifically configured to call a hook function when detecting that the browser calls a specified popup function to open the link address; or, when detecting that the browser calls the ActiveX control to open the link address in a popup mode, calling the hook function.
For example, the specified popup function may be "window. The ActiveX control can be 'Windows API Shell ExecuteEx' and the like.
At this time, the determining unit 302 may be specifically configured to determine whether the link address is a request actively initiated by the user by using the called hook function.
Optionally, the preset rule may include an interception mode and an interception rule, the interception mode may include a powerful interception mode and an accurate interception mode, and in the powerful interception mode, the pop-up window request may be directly intercepted, and in the accurate interception mode, the pop-up window request may be intercepted only when the pop-up window request meets the preset interception rule. Namely:
the second processing unit 304 may specifically be configured to determine a current interception mode and an interception rule; if the current interception mode is a strong interception mode, intercepting the popup request; if the current interception mode is the accurate interception mode, determining whether the popup request accords with an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
The interception rule may be set according to a requirement of an actual application, for example, if a popup advertisement needs to be intercepted, a popup advertisement rule base may be set to store rules (for example, various popup links) of various popup advertisements, and if a popup request meets the rules, the popup request is indicated as a popup advertisement, so that the popup request needs to be intercepted at this time. Namely:
the second processing unit 304 may specifically be configured to determine a current interception mode and an interception rule; if the current interception mode is a strong interception mode, intercepting the popup request; if the current interception mode is the accurate interception mode, determining whether the pop-up window request is a pop-up window advertisement link according to an interception rule, and if the current interception mode is the accurate interception mode, intercepting the pop-up window request; and if the advertisement link is not the popup advertisement link, carrying out popup operation according to the popup request.
In addition, optionally, in order to improve the quality of user experience, the user may also be notified of the interception result and detailed information of interception. Namely, the intercepting device of the popup window in the browser can also comprise a notification unit;
and the notification unit is used for notifying the user of the interception result and the intercepted detailed information.
In specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same entity or several entities, for example, implemented in the form of a browser monitoring module, a detection and interception module, and a user notification module in the second embodiment, and so on, which are not described herein again.
The intercepting device for the pop-up window in the browser can be integrated into a client, and the client can be loaded in a terminal, and the terminal can be a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, a desktop computer, and the like.
As can be seen from the above, the detecting unit 301 of the apparatus for intercepting a pop-up window in a browser in this embodiment may call a hook function when detecting that the browser initiates a pop-up window request, then the determining unit 302 determines whether the pop-up window request is a request actively initiated by a user by using the hook changing function, if the request is the request actively initiated by the user, the first processing unit 303 performs a pop-up window operation, otherwise, the second processing unit 304 intercepts the pop-up window request according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Example four,
Correspondingly, an embodiment of the present invention further provides a communication system, including any one of the intercepting devices for popup windows in a browser provided in the embodiments of the present invention, where the intercepting device for popup windows in a browser specifically refers to embodiment three, for example, the intercepting device for popup windows in a browser may be specifically integrated in a client, as follows:
the client is used for calling a hook function when detecting that the browser initiates a popup request, determining whether the popup request is a request actively initiated by a user by using the hook function, and if so, performing popup operation according to the popup request; if not, the pop-up window request is intercepted according to a preset rule, which may specifically refer to the foregoing embodiment, and is not described herein again.
In addition, the communication system may further include a server as follows:
and the server is used for providing the interception rule for the client.
The client side may be specifically configured to, when it is detected that the browser initiates a pop-up request, invoke a hook function, determine whether the pop-up request is a request actively initiated by a user by using the hook function, and if so, perform a pop-up operation according to the pop-up request; if not, determining an interception mode, acquiring an interception rule from the server, and if the current interception mode is a strong interception mode, intercepting the popup request; if the current interception mode is the accurate interception mode, determining whether the popup request accords with an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
For example, taking the pop-up advertisement blocking as an example, the server may store and maintain an advertisement rule base, and provide the blocking rule in the advertisement rule base for the client to use, and the client may detect whether the data to be requested by the pop-up request is a pop-up advertisement link by using the blocking rule, and process the data request message according to the detection result.
The communication system can achieve the same beneficial effects of the browser page data filtering device provided by the embodiment of the invention, namely the following steps are specifically performed:
the intercepting device of the pop-up window in the browser in the communication system of this embodiment calls a hook function when detecting that the browser initiates a pop-up window request, then determines whether the pop-up window request is a request actively initiated by a user by using the hook function, performs pop-up window operation if the pop-up window request is the request actively initiated by the user, and otherwise intercepts the pop-up window request according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Example V,
Accordingly, an embodiment of the present invention further provides a terminal, as shown in fig. 4, the terminal may include Radio Frequency (RF) circuits 401, a memory 402 including one or more computer-readable storage media, an input unit 403, a display unit 404, a sensor 405, an audio circuit 406, a Wireless Fidelity (WiFi) module 407, a processor 408 including one or more processing cores, and a power supply 409. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 401 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one or more processors 408 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 401 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 401 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 402 may be used to store software programs and modules, and the processor 408 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 408 and the input unit 403 access to the memory 402.
The input unit 403 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in a particular embodiment, the input unit 403 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 408, and can receive and execute commands from the processor 408. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 403 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 404 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 404 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 408 to determine the type of touch event, and then the processor 408 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 4 the touch-sensitive surface and the display panel are shown as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, can be used for applications for identifying the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking) and the like, and can be further configured with a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor and other sensors, which are not described herein again.
Audio circuitry 406, a speaker, and a microphone may provide an audio interface between the user and the terminal. The audio circuit 406 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by the audio circuit 406 and converted into audio data, which is then processed by the audio data output processor 408, and then transmitted to, for example, another terminal via the RF circuit 401, or the audio data is output to the memory 402 for further processing. The audio circuitry 406 may also include an earbud jack to provide peripheral headset communication with the terminal.
WiFi belongs to short distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web page and access streaming media etc. through WiFi module 407, it provides wireless broadband internet access for the user. Although fig. 4 shows the WiFi module 407, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 408 is a control center of the terminal, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring the handset. Optionally, processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 408.
The terminal also includes a power source 409 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 408 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 409 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the processor 408 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 408 runs the application programs stored in the memory 402, thereby implementing various functions:
although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, the display unit of the terminal is a touch screen display, the terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
when detecting that a browser initiates a popup request, calling a hook function, determining whether the popup request is a request actively initiated by a user by using the hook function, and if so, performing popup operation according to the popup request; if not, intercepting the popup request according to a preset rule.
The pop-up window is realized in two general ways, one is realized by directly calling a pop-up window function, and the other is realized by calling some ActiveX controls which can realize the function of opening the link address, that is, when detecting that the browser initiates a pop-up window request, calling a hook function specifically includes:
when detecting that the browser calls a specified popup function to open a link address, calling a hook function; or,
and when detecting that the browser calls the ActiveX control to open the link address in a popup window mode, calling a hook function.
The specified popup function may be specifically "window. The ActiveX control can be 'Windows API Shell ExecuteEx' and the like.
Optionally, determining whether the pop-up window request is a request initiated by the user actively by using the called hook function may include:
and determining whether the link address is a request actively initiated by a user by using the hook function.
The preset rules may include an interception mode and an interception rule. The interception mode may include a strong interception mode and an accurate interception mode, and in the strong interception mode, the pop-up window request may be directly intercepted, and in the accurate interception mode, the pop-up window request may be intercepted only when the pop-up window request meets a preset interception rule. That is, the step of "intercepting the pop-up request according to the preset rule" may include:
determining a current interception mode and an interception rule;
if the current interception mode is a strong interception mode, intercepting the popup request;
if the current interception mode is the accurate interception mode, determining whether the popup request accords with an interception rule, if so, intercepting the popup request, and if not, performing popup operation according to the popup request.
The interception rule may be set according to a requirement of an actual application, for example, if a popup advertisement needs to be intercepted, a popup advertisement rule base may be set to store rules (for example, various popup links) of various popup advertisements, and if a popup request meets the rules, the popup request is indicated as a popup advertisement, so that the popup request needs to be intercepted at this time. That is, the step "determining whether the pop-up window request meets the interception rule, if yes, intercepting the pop-up window request, and if not, performing the pop-up window operation according to the pop-up window request" may specifically be as follows:
determining whether the pop-up window request is a pop-up window advertisement link or not according to an interception rule; if yes, intercepting the popup request; and if not, performing popup operation according to the popup request.
The popup operation according to the popup request may specifically be as follows:
specifically, the browser may be allowed to call a specified pop-window function, such as "window.
In addition, optionally, in order to improve the quality of user experience, the user may also be notified of the interception result and detailed information of interception. That is, after the step "intercepting the pop-up request", the method for intercepting the pop-up in the browser may further include:
and informing the user of the interception result and the intercepted detailed information.
As can be seen from the above, in the embodiment, when it is detected that the browser initiates a pop-up request, a hook function is called, then the hook function is used to determine whether the pop-up request is a request initiated by a user actively, if the request is the request initiated by the user actively, a pop-up operation is performed, otherwise, the pop-up request is intercepted according to a preset rule; the hook function can be suitable for all browsers, so that the scheme is good in compatibility, the problem of compatibility is solved, specific popup intercepting plugins do not need to be developed for different browsers, post-maintenance is not needed, the development amount is small, and the implementation is simple and flexible.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The method, the device and the system for intercepting pop-up windows in a browser provided by the embodiment of the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

CN201310141901.8A2013-04-232013-04-23The hold-up interception method of pop-up, device and system in a kind of browserActiveCN104123276B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201310141901.8ACN104123276B (en)2013-04-232013-04-23The hold-up interception method of pop-up, device and system in a kind of browser

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201310141901.8ACN104123276B (en)2013-04-232013-04-23The hold-up interception method of pop-up, device and system in a kind of browser

Publications (2)

Publication NumberPublication Date
CN104123276Atrue CN104123276A (en)2014-10-29
CN104123276B CN104123276B (en)2017-12-01

Family

ID=51768689

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201310141901.8AActiveCN104123276B (en)2013-04-232013-04-23The hold-up interception method of pop-up, device and system in a kind of browser

Country Status (1)

CountryLink
CN (1)CN104123276B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104463642A (en)*2014-12-292015-03-25北京奇虎科技有限公司Advertisement filtering processing method and device and browser client side
CN104462284A (en)*2014-11-272015-03-25百度在线网络技术(北京)有限公司Method and system for judging webpage quality
CN104539584A (en)*2014-12-052015-04-22北京奇虎科技有限公司Anti-injection method for browser, browser client and device
CN105654333A (en)*2015-12-162016-06-08北京奇虎科技有限公司Browser and prompt window pop-up realization method and system
WO2017008552A1 (en)*2015-07-152017-01-19腾讯科技(深圳)有限公司Multimedia information popup window processing method and device, and computer storage medium
CN106909262A (en)*2015-12-222017-06-30北京奇虎科技有限公司 A data processing method and device
WO2017113561A1 (en)*2015-12-302017-07-06腾讯科技(深圳)有限公司Information interception processing method and terminal, and computer storage medium
CN107797841A (en)*2017-11-212018-03-13广东欧珀移动通信有限公司Window control method, apparatus, terminal device and storage medium
CN107861759A (en)*2017-11-212018-03-30广东欧珀移动通信有限公司Window control method and device, terminal equipment and storage medium
CN113961276A (en)*2020-07-022022-01-21网神信息技术(北京)股份有限公司 Method and device for blocking pop-up windows

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101620529A (en)*2008-07-032010-01-06联想(北京)有限公司Method and system for intercepting pop-up window
CN103019719A (en)*2012-12-142013-04-03北京奇虎科技有限公司Device and method for intercepting pop-up window
CN103034800A (en)*2012-12-142013-04-10北京奇虎科技有限公司Device and method for intercepting pop-up windows

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101620529A (en)*2008-07-032010-01-06联想(北京)有限公司Method and system for intercepting pop-up window
CN103019719A (en)*2012-12-142013-04-03北京奇虎科技有限公司Device and method for intercepting pop-up window
CN103034800A (en)*2012-12-142013-04-10北京奇虎科技有限公司Device and method for intercepting pop-up windows

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
田长根 等: "基于hook技术拦截IE弹出广告窗口的实现", 《计算机与现代化》*
袁东锋 等: "C#下全局鼠标钩子的实现", 《电脑编程技巧与维护》*

Cited By (17)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104462284B (en)*2014-11-272018-04-13百度在线网络技术(北京)有限公司Judge the method and system of web page quality
CN104462284A (en)*2014-11-272015-03-25百度在线网络技术(北京)有限公司Method and system for judging webpage quality
CN104539584B (en)*2014-12-052018-01-19北京奇虎科技有限公司The anti-method for implanting of browser, browser client and device
CN104539584A (en)*2014-12-052015-04-22北京奇虎科技有限公司Anti-injection method for browser, browser client and device
WO2016086765A1 (en)*2014-12-052016-06-09北京奇虎科技有限公司Browser injection prevention method, browser client, and device
CN104463642A (en)*2014-12-292015-03-25北京奇虎科技有限公司Advertisement filtering processing method and device and browser client side
WO2017008552A1 (en)*2015-07-152017-01-19腾讯科技(深圳)有限公司Multimedia information popup window processing method and device, and computer storage medium
US10579690B2 (en)2015-07-152020-03-03Tencent Technology (Shenzhen) Company LimitedMultimedia information pop-up window processing method and device, and computer storage medium
CN105654333A (en)*2015-12-162016-06-08北京奇虎科技有限公司Browser and prompt window pop-up realization method and system
CN106909262A (en)*2015-12-222017-06-30北京奇虎科技有限公司 A data processing method and device
US10567841B2 (en)2015-12-302020-02-18Tencent Technology (Shenzhen) Company LimitedInformation interception processing method, terminal, and computer storage medium
WO2017113561A1 (en)*2015-12-302017-07-06腾讯科技(深圳)有限公司Information interception processing method and terminal, and computer storage medium
US11206451B2 (en)2015-12-302021-12-21Tencent Technology (Shenzhen) Company LimitedInformation interception processing method, terminal, and computer storage medium
CN107861759A (en)*2017-11-212018-03-30广东欧珀移动通信有限公司Window control method and device, terminal equipment and storage medium
CN107797841A (en)*2017-11-212018-03-13广东欧珀移动通信有限公司Window control method, apparatus, terminal device and storage medium
CN107797841B (en)*2017-11-212021-11-05Oppo广东移动通信有限公司 Window control method, device, terminal device and storage medium
CN113961276A (en)*2020-07-022022-01-21网神信息技术(北京)股份有限公司 Method and device for blocking pop-up windows

Also Published As

Publication numberPublication date
CN104123276B (en)2017-12-01

Similar Documents

PublicationPublication DateTitle
CN104123276B (en)The hold-up interception method of pop-up, device and system in a kind of browser
US10643021B2 (en)Method and device for processing web page content
US10853437B2 (en)Method and apparatus for invoking application programming interface
TWI606360B (en)Method, apparatus and system for detecting webpages
CN107040609B (en)Network request processing method and device
WO2017206916A1 (en)Method for determining kernel running configuration in processor and related product
US10956653B2 (en)Method and apparatus for displaying page and a computer storage medium
US10095666B2 (en)Method and terminal for adding quick link
CN104065693A (en)Method, device and system for accessing network data in webpage applications
CN104123120B (en)A kind of browser page data filtering method, device and system
CN109948090B (en)Webpage loading method and device
US20150128033A1 (en)Method and apparatus for webpage browsing
CN109088844B (en)Information interception method, terminal, server and system
CN110020293B (en)Multimedia data display method, device and storage medium
US9582584B2 (en)Method, apparatus and system for filtering data of web page
CN109145182B (en)Data acquisition method and device, computer equipment and system
CN105631059B (en)Data processing method, data processing device and data processing system
CN103336677A (en)Method, device and system for outputting images to display equipment
CN112799857A (en)Application access method and device
CN107798008B (en)Content pushing system, method and device
CN108269223B (en)Webpage graph drawing method and terminal
CN105740396B (en)HTTP data processing method and device
CN104615623B (en)A kind of method and apparatus for obtaining Internet resources
CN104809121B (en)Method and device for controlling display of browser webpage window
CN108616552B (en)Webpage access method, device and system

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp