


技术领域technical field
本发明涉及网络数据通信技术领域,具体涉及一种用于拦截弹窗的装置和方法。The invention relates to the technical field of network data communication, in particular to a device and method for intercepting pop-up windows.
背景技术Background technique
目前,互联网中的各种应用软件一般都会进行自己推送信息的弹窗,每日新闻的提示等。几乎所有热门的应用软件都会在用户开机的时候或进行其他操作的时候弹出这些窗口。这种向用户强制推广信息的方式对用户造成了很大的打扰。At present, various application software on the Internet generally carry out pop-up windows for pushing information by themselves, reminders of daily news, and the like. Almost all popular application software will pop up these windows when the user turns on the computer or performs other operations. This way of forcing the promotion of information to the user has caused a lot of disturbance to the user.
现有的屏蔽软件都是在获取到弹窗的具体特征后进行针对性屏蔽,这样会导致无法实时拦截新出现的弹窗,并且以前的弹窗修改掉其自己的一些特征后,也无法保证拦截效果。The existing blocking software performs targeted blocking after obtaining the specific characteristics of pop-up windows, which will result in the inability to intercept new pop-up windows in real time, and after modifying some of its own characteristics, the previous pop-up windows cannot be guaranteed. interception effect.
另外,现有的屏蔽软件也无法对在特定区域弹出的弹窗进行识别拦截。例如,不能实现只拦截屏幕右下角区域的弹窗,而不拦截屏幕中央区域的弹窗。因此无法根据弹窗的弹出区域进行识别拦截。In addition, existing blocking software cannot identify and intercept pop-up windows popping up in specific areas. For example, it cannot be realized that only the pop-up windows in the lower right corner of the screen are intercepted, but the pop-up windows in the central area of the screen are not blocked. Therefore, it is impossible to identify and intercept according to the pop-up area of the pop-up window.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种用于拦截弹窗的装置和相应的用于拦截弹窗的方法。In view of the above problems, the present invention is proposed to provide a device for intercepting popup windows and a corresponding method for intercepting popup windows that overcome the above problems or at least partially solve the above problems.
依据本发明的一个方面,一种用于拦截弹窗的装置,该装置包括:存储单元、设置单元、窗口位置获取单元、位置判断单元和阻止单元;According to one aspect of the present invention, a device for intercepting pop-up windows, the device includes: a storage unit, a setting unit, a window position acquisition unit, a position judgment unit and a blocking unit;
所述存储单元,适于保存显示屏幕指定区域范围信息;The storage unit is suitable for saving the range information of the designated area of the display screen;
所述设置单元,适于设置用于拦截窗口消息的窗口钩子程序,并接收所述窗口钩子程序拦截到的窗口消息;The setting unit is adapted to set a window hook program for intercepting window messages, and receive the window messages intercepted by the window hook program;
所述窗口位置获取单元,适于在所述设置单元接收到所述窗口钩子程序拦截到的窗口消息时,获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域;The window position obtaining unit is adapted to obtain the coordinate position area of the window corresponding to the window message to be displayed on the screen when the setting unit receives the window message intercepted by the window hook program;
所述位置判断单元,适于判断所述窗口位置获取单元获取的所述坐标位置区域,是否在所述存储单元中保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则通知所述阻止单元;The position judgment unit is adapted to judge whether the coordinate position area acquired by the window position acquisition unit is within the range of the designated area of the display screen represented by the range information of the designated area of the display screen stored in the storage unit, if yes then notify said blocking unit;
所述阻止单元,适于阻止该窗口消息对应的窗口的弹出。The blocking unit is adapted to prevent the window corresponding to the window message from popping up.
可选地,该装置进一步包括:白名单判断单元;Optionally, the device further includes: a whitelist judging unit;
所述存储单元,还适于保存预设的白名单;The storage unit is also suitable for storing a preset white list;
所述白名单判断单元,适于在所述设置单元接收到所述窗口钩子程序拦截到的窗口消息时,获取该窗口消息对应的窗口所属的进程名,判断该进程名是否在预设的白名单中,是则不做处理,否则通知所述窗口位置获取单元;The white list judging unit is adapted to obtain the process name of the window corresponding to the window message when the setting unit receives the window message intercepted by the window hook program, and judge whether the process name is in the preset white list or not. list, if yes, do not process, otherwise notify the window position acquisition unit;
所述窗口位置获取单元,适于在所述设置单元接收到所述窗口钩子程序拦截到窗口消息并在收到所述白名单判断单元的通知时,获取该窗口消息对应的窗口最终要在屏幕上显示的位置区域。The window position obtaining unit is adapted to obtain the window corresponding to the window message to finally be displayed on the screen when the setting unit receives the window message intercepted by the window hook program and receives the notification from the white list judgment unit. The location area shown on the .
可选地,该装置进一步包括:用户接口;Optionally, the device further includes: a user interface;
所述用户接口,适于接收用户的指令,并根据用户的指令在所述存储单元中创建、修改或删除所述屏幕的指定区域范围信息。The user interface is adapted to receive a user's instruction, and create, modify or delete the designated area range information of the screen in the storage unit according to the user's instruction.
可选地,所述设置单元,适于通过调用Windows操作系统的SetWindowsHookEx接口来设置用于拦截窗口消息的窗口钩子程序。Optionally, the setting unit is adapted to set a window hook program for intercepting window messages by calling the SetWindowsHookEx interface of the Windows operating system.
可选地,所述存储单元保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围包括:位于显示屏幕正中的一定范围的区域,和/或,位于显示屏幕右下角的一定范围的区域。Optionally, the range of the designated area of the display screen represented by the range information of the designated area of the display screen saved by the storage unit includes: a certain range of areas located in the center of the display screen, and/or a certain range of areas located at the lower right corner of the display screen .
根据本发明的另一方面,提供了一种用于拦截弹窗的方法,该方法包括:According to another aspect of the present invention, a method for intercepting pop-up windows is provided, the method comprising:
设置用于拦截窗口消息的窗口钩子程序;Set a window hook program for intercepting window messages;
当所述窗口钩子程序拦截到窗口消息时,根据对应窗口要显示的区域进行弹窗阻止操作;When the window hook program intercepts the window message, perform pop-up window blocking operation according to the area to be displayed in the corresponding window;
所述根据对应窗口要显示的区域进行弹窗阻止操作包括:获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域;判断获取的所述坐标位置区域是否在所保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则阻止该窗口消息对应的窗口的弹出。The pop-up blocking operation according to the area to be displayed of the corresponding window includes: obtaining the coordinate position area of the window corresponding to the window message to be displayed on the screen; judging whether the obtained coordinate position area is in the saved display screen designated area The display screen indicated by the range information is within the range of the specified area, and if so, the pop-up of the window corresponding to the window message is prevented.
可选地,当所述窗口钩子程序拦截到窗口消息时,并在所述根据窗口要显示的区域进行弹窗阻止操作之前,该方法进一步包括:Optionally, when the window hook program intercepts the window message, and before performing the pop-up blocking operation according to the area to be displayed of the window, the method further includes:
获取该窗口消息对应的窗口所属的进程名;Obtain the process name to which the window corresponding to the window message belongs;
如果该进程名在预设的白名单中,则不再执行所述根据窗口要显示的区域进行弹窗阻止操作的步骤;If the process name is in the preset white list, then no longer perform the step of performing the pop-up window blocking operation according to the area to be displayed in the window;
如果该进程名不在预设的白名单中,则执行所述根据窗口要显示的区域进行弹窗阻止操作的步骤。If the process name is not in the preset white list, then perform the step of performing the pop-up window blocking operation according to the area to be displayed in the window.
可选地,该方法还包括:提供用户接口,使得用户能够通过该用户接口创建、修改或删除所述屏幕指定区域范围信息。Optionally, the method further includes: providing a user interface, so that the user can create, modify or delete the range information of the designated area on the screen through the user interface.
可选地,所述设置用于拦截窗口消息的窗口钩子程序包括:通过调用Windows操作系统的SetWindowsHookEx接口来设置用于拦截窗口消息的窗口钩子程序。Optionally, the setting the window hook program for intercepting window messages includes: setting the window hook program for intercepting window messages by calling the SetWindowsHookEx interface of the Windows operating system.
可选地,所述显示屏幕指定区域范围包括:位于显示屏幕正中的一定范围的区域,和/或,位于显示屏幕右下角的一定范围的区域。Optionally, the specified area range of the display screen includes: an area of a certain range located in the center of the display screen, and/or an area of a certain range located in the lower right corner of the display screen.
根据本发明的这种设置用于拦截窗口消息的窗口钩子程序,当该窗口钩子程序拦截到窗口消息时,根据对应窗口要显示的区域进行弹窗阻止操作;其中所述根据对应窗口要显示的区域进行弹窗阻止操作包括:获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域,判断获取的所述坐标位置区域是否在所保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则阻止该窗口消息对应的窗口的弹出的技术方案中:由于通过设置的窗口钩子程序拦截窗口消息,因此可以在窗口弹出前进行判断,并阻止广告窗口的弹出,并且判断的方式是根据窗口要在屏幕上显示的坐标位置区域进行的,当窗口要在屏幕上显示的坐标位置区域在广告窗口弹出的指定范围内时阻止窗口的弹出,因此避免了根据广告窗口自身的特征进行拦截的现有方案中,当广告窗口修改特征时拦截效果不佳的问题。According to the window hook program for intercepting window messages according to this setting of the present invention, when the window hook program intercepts window messages, the pop-up window blocking operation is performed according to the area to be displayed on the corresponding window; wherein the window to be displayed according to the corresponding window The pop-up window blocking operation in the area includes: obtaining the coordinate position area of the window corresponding to the window message to be displayed on the screen, and judging whether the obtained coordinate position area is specified in the display screen indicated by the saved display screen specified area range information. Within the range of the region, if it is, prevent the pop-up of the window corresponding to the window message in the technical scheme: because the window message is intercepted by the set window hook program, it can be judged before the window pops up, and the pop-up of the advertisement window is prevented, and the judgment The method is based on the coordinate position area of the window to be displayed on the screen. When the coordinate position area of the window to be displayed on the screen is within the specified range of the advertisement window pop-up, the pop-up of the window is prevented, thus avoiding the advertisement window itself. In the existing scheme of intercepting features, the interception effect is not good when the advertisement window modifies the features.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1示出了根据本发明一个实施例的一种用于拦截弹窗的方法的流程图;Fig. 1 shows a flow chart of a method for intercepting pop-up windows according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的一种用于拦截弹窗的方法的流程图;Fig. 2 shows a flow chart of a method for intercepting pop-up windows according to an embodiment of the present invention;
图3示出了根据本发明一个实施例的一种用于拦截弹窗的装置的结构图;FIG. 3 shows a structural diagram of a device for intercepting pop-up windows according to an embodiment of the present invention;
图4示出了根据本发明一个实施例的一种用于拦截弹窗的装置的结构图。Fig. 4 shows a structural diagram of a device for intercepting pop-up windows according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
图1示出了根据本发明一个实施例的一种用于拦截弹窗的方法的流程图。参见图1,该方法包括:Fig. 1 shows a flowchart of a method for intercepting pop-up windows according to an embodiment of the present invention. Referring to Figure 1, the method includes:
步骤S110,设置用于拦截窗口消息的窗口钩子程序。Step S110, setting a window hook program for intercepting window messages.
窗口钩子程序是Windows操作系统中的一个处理消息的程序,通过系统调用,把它挂入系统。每当特定的消息发出,在没有到达目的窗口前,窗口钩子程序就先捕获该消息,亦即窗口钩子程序先得到控制权。这时窗口钩子程序即可以修改该消息,也可以不作处理而继续传递该消息,还可以强制结束该消息的传递。The window hook program is a message processing program in the Windows operating system, which is hooked into the system through system calls. Whenever a specific message is sent, before reaching the destination window, the window hook program first captures the message, that is, the window hook program first obtains control. At this time, the window hook program can modify the message, or continue to transmit the message without processing, or forcefully end the transmission of the message.
在本发明的一个实施例中,通过调用Windows操作系统的SetWindowsHookEx接口来设置用于拦截窗口消息的窗口钩子程序。即实现本方法的程序在启动后会调用SetWindowsHookEx接口向Windows操作系统注册一个窗口钩子程序,用于拦截系统创建窗口和移动窗口的消息,当有窗口创建或移动位置时,通知实现本方法的程序优先处理此消息。In one embodiment of the present invention, a window hook program for intercepting window messages is set by calling the SetWindowsHookEx interface of the Windows operating system. That is, the program that implements this method will call the SetWindowsHookEx interface to register a window hook program with the Windows operating system after startup, which is used to intercept the system's message of creating and moving windows, and notify the program that implements this method when a window is created or moved. Prioritize this message.
步骤S120,当所述窗口钩子程序拦截到窗口消息时,根据对应窗口要显示的区域进行弹窗阻止操作;其中,根据对应窗口要显示的区域进行弹窗阻止操作包括:获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域,判断获取的该坐标位置区域是否在所保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则阻止该窗口消息对应的窗口的弹出。Step S120, when the window hook program intercepts the window message, perform the pop-up blocking operation according to the area to be displayed in the corresponding window; wherein, performing the pop-up blocking operation according to the area to be displayed in the corresponding window includes: obtaining the window corresponding to the window message The coordinate position area to be displayed on the screen by the window, judge whether the obtained coordinate position area is within the specified area range of the display screen indicated by the saved display screen specified area range information, and if so, prevent the corresponding window from the window message pop up.
在本发明的实施例中,所保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围即为常见的广告窗口弹出的位置,例如在本发明的一个实施例中,该显示屏幕指定区域范围为:位于显示屏幕正中的一定范围的区域,或者,位于显示屏幕右下角的一定范围的区域,或者,位于显示屏幕正中的一定范围的区域以及位于显示屏幕右下角的一定范围的区域。In an embodiment of the present invention, the designated area range of the display screen represented by the saved designated area range information of the display screen is the position where a common advertisement window pops up. For example, in an embodiment of the present invention, the designated area of the display screen The range is: a certain area in the middle of the display screen, or a certain area in the lower right corner of the display screen, or a certain area in the middle of the display screen and a certain area in the lower right corner of the display screen.
图1所示的方法中,由于通过设置的窗口钩子程序拦截窗口消息,因此可以在窗口弹出前进行判断,并阻止广告窗口的弹出,并且判断的依据是窗口要在屏幕上显示的坐标位置,而不是根据窗口自身的特征作为依据,因此避免了根据广告窗口自身的特征进行拦截的现有方案中,当广告窗口修改特征时拦截效果不佳的问题。In the method shown in Figure 1, since the window message is intercepted by the set window hook program, it can be judged before the window pops up, and the pop-up of the advertisement window can be prevented, and the judgment is based on the coordinate position of the window to be displayed on the screen, Instead of using the characteristics of the window itself as a basis, it avoids the problem of poor interception effect when the characteristics of the advertisement window are modified in the existing solution of blocking according to the characteristics of the advertisement window itself.
在本发明的一个实施例中,还可以将一些不想拦截其弹出窗口的进程名列入白名单,在检查窗口要弹出的位置之前,先判断要弹出的窗口的进程名是否在白名单内,是则不再检查窗口要弹出的位置,直接放行,任其窗口弹出。具体如图2所示。In one embodiment of the present invention, some process names that do not want to intercept its pop-up window can also be included in the white list, before checking the position where the window will pop up, first judge whether the process name of the window to pop up is in the white list, If yes, no longer check the position of the window to be popped up, let it go directly, and allow the window to pop up. Specifically shown in Figure 2.
图2示出了根据本发明一个实施例的一种用于拦截弹窗的方法的流程图。参见图2,该方法包括:Fig. 2 shows a flowchart of a method for intercepting pop-up windows according to an embodiment of the present invention. Referring to Figure 2, the method includes:
步骤S210,设置用于拦截窗口消息的窗口钩子程序。Step S210, setting a window hook program for intercepting window messages.
步骤S220,当所述窗口钩子程序拦截到窗口消息时,获取该窗口消息对应的窗口所属的进程名。Step S220, when the window hook program intercepts a window message, obtain the name of the process to which the window corresponding to the window message belongs.
在本发明的一个实施例中,可以通过操作系统提供的接口获取窗口消息对应的窗口所属的进程名。In an embodiment of the present invention, the name of the process to which the window corresponding to the window message belongs can be acquired through an interface provided by the operating system.
步骤S230,判断该进程名是否在预设的白名单中,是则结束本方法流程,否则执行步骤S240。Step S230, judging whether the process name is in the preset white list, if yes, end the flow of the method, otherwise execute step S240.
步骤S240,获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域。Step S240, acquiring the coordinate location area to be displayed on the screen of the window corresponding to the window message.
在本发明的一个实施例中,通过操作系统提供的接口获取窗口消息对应的窗口要在屏幕上显示的坐标位置区域。In an embodiment of the present invention, the coordinate location area to be displayed on the screen of the window corresponding to the window message is obtained through an interface provided by the operating system.
步骤S250,判断获取的该坐标位置区域是否在所保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,是则执行步骤S260,否则结束本方法流程。Step S250, judging whether the obtained coordinate position area is within the range of the designated area of the display screen indicated by the saved designated area range information of the display screen, if yes, execute step S260; otherwise, end the flow of the method.
步骤S260,阻止该窗口消息对应的窗口的弹出。Step S260, preventing the window corresponding to the window message from popping up.
图2所示的方法中,通过设置白名单,可以使得一些用户希望看到的窗口弹出,而不是全部阻止,进一步提高了用户体验。In the method shown in FIG. 2 , by setting a white list, some windows that the user wants to see can be popped up instead of being blocked, which further improves the user experience.
在本发明的一个实施例中,还提供用户接口,使得用户能够通过该用户接口创建、修改或删除屏幕指定区域范围信息。通常情况下,各种应用软件在屏幕的右下角或屏幕的正中弹窗,此时将这两个位置设置为屏幕指定区域范围即可,则屏幕指定区域范围信息表示的即为这两个位置。但是,在有些情况下,可能用户对屏幕工作区域有其特殊的需求,因此可以根据用户指令在屏幕的不同位置创建多个指定区域范围。另外,各应用软件也有可能变更弹窗的位置,因此提供用户接口,可以使得用户能够根据实际情况和需求设置需要进行弹窗拦截的屏幕区域。这样,用户可以随时调整进行弹窗拦截的屏幕区域,以达到看自己想看的弹窗并屏蔽掉自己不想看会影响自己的弹窗。In an embodiment of the present invention, a user interface is also provided, so that the user can create, modify or delete the range information of the designated area of the screen through the user interface. Under normal circumstances, various application software pop-up windows in the lower right corner of the screen or in the middle of the screen. At this time, it is enough to set these two positions as the specified area range of the screen, and the range information of the specified area area on the screen indicates these two positions . However, in some cases, the user may have special requirements for the screen working area, so multiple specified area ranges can be created at different positions of the screen according to user instructions. In addition, each application software may also change the position of the pop-up window, so providing a user interface can enable the user to set the screen area where the pop-up window needs to be intercepted according to the actual situation and needs. In this way, users can adjust the screen area for pop-up interception at any time, so as to see the pop-up windows they want to see and block the pop-up windows that they don't want to see that will affect them.
在实际体验中,用户每次开机的时候,当前比较热门的应用软件(如即时通信工具软件、下载软件以及播放器软件等)都会在屏幕的中央弹出新闻窗口,这样用户需要连续关掉多个窗口才可以进行正常的操作。此外,在使用电脑的过程中,一般在屏幕的右下角也会有各种消息窗口和广告窗口弹出,影响用户的正常使用。而采用本发明上述的技术方案后,可根据用户的选择进行自动屏蔽这些弹窗,这样就不会影响用户对电脑的正常操作了。In actual experience, every time the user turns on the computer, the currently popular application software (such as instant messaging tool software, download software, and player software, etc.) will pop up a news window in the center of the screen, so that the user needs to close multiple applications in succession. window for normal operation. In addition, in the process of using the computer, there are generally various message windows and advertisement windows popping up in the lower right corner of the screen, which affects the normal use of the user. After adopting the above-mentioned technical scheme of the present invention, these pop-up windows can be automatically shielded according to the user's selection, so that the normal operation of the computer by the user will not be affected.
图3示出了根据本发明一个实施例的一种用于拦截弹窗的装置的结构图。如图3所示,该用于拦截弹窗的装置300包括:存储单元301、设置单元302、窗口位置获取单元303、位置判断单元304和阻止单元305;Fig. 3 shows a structural diagram of a device for intercepting pop-up windows according to an embodiment of the present invention. As shown in FIG. 3 , the
存储单元301,适于保存显示屏幕指定区域范围信息。The
设置单元302,适于设置用于拦截窗口消息的窗口钩子程序,并接收所述窗口钩子程序拦截到的窗口消息。The
窗口位置获取单元303,适于在设置单元302接收到窗口钩子程序拦截到的窗口消息时,获取该窗口消息对应的窗口要在屏幕上显示的坐标位置区域。The window
位置判断单元304,适于判断窗口位置获取单元303获取的该坐标位置区域,是否在存储单元301中保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则通知阻止单元305。The
阻止单元305,适于阻止该窗口消息对应的窗口的弹出。The preventing
图3所示的装置中,由于设置单元302设置了窗口钩子程序拦截窗口消息,因此窗口位置获取单元303可以在窗口弹出前获得窗口要显示的位置,以及位置判断单元304可以根据窗口要显示的位置进行判断是否进行阻止,在判断为阻止时由阻止单元305阻止广告窗口的弹出,因此在窗口弹出前就可以进行拦截,并且由于是根据窗口要弹出的位置作为判断依据,而不是以窗口本身的特征作为判断依据,因此避免了当广告窗口修改特征时拦截效果不佳的问题。In the device shown in Figure 3, since the
图4示出了根据本发明一个实施例的一种用于拦截弹窗的装置的结构图。如图4所示,该用于拦截弹窗的装置400包括:存储单元401、设置单元402、窗口位置获取单元403、位置判断单元404、阻止单元405、白名单判断单元406和用户接口407。Fig. 4 shows a structural diagram of a device for intercepting pop-up windows according to an embodiment of the present invention. As shown in FIG. 4 , the
存储单元401,适于保存显示屏幕指定区域范围信息,还适于保存预设的白名单。The
设置单元402,适于设置用于拦截窗口消息的窗口钩子程序,并接收所述窗口钩子程序拦截到的窗口消息。The
白名单判断单元406,适于在设置单元402接收到窗口钩子程序拦截到的窗口消息时,获取该窗口消息对应的窗口所属的进程名,判断该进程名是否在存储单元401中的预设的白名单中,是则不做处理,否则通知窗口位置获取单元403。这样,可以通过设置白名单使得一些用户希望看到的窗口弹出,而不是全部阻止,进一步提高了用户体验。The white
窗口位置获取单元403,适于在设置单元402接收到窗口钩子程序拦截到窗口消息并在收到白名单判断单元406的通知时,获取该窗口消息对应的窗口最终要在屏幕上显示的位置区域。The window
位置判断单元404,适于判断窗口位置获取单元403获取的该坐标位置区域,是否在存储单元401中保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围内,如果是则通知阻止单元405。The
阻止单元405,适于阻止该窗口消息对应的窗口的弹出。The preventing
用户接口407,适于接收用户的指令,并根据用户的指令在存储单元401中创建、修改或删除所述屏幕的指定区域范围信息。这样,用户可以随时调整进行弹窗拦截的屏幕区域,以达到看自己想看的弹窗并屏蔽掉自己不想看会影响自己的弹窗。The
在本发明的一个实施例中,设置单元402适于通过调用Windows操作系统的SetWindowsHookEx接口来设置用于拦截窗口消息的窗口钩子程序。In one embodiment of the present invention, the
在本发明的一个实施例中,存储单元401保存的显示屏幕指定区域范围信息所表示的显示屏幕指定区域范围包括:位于显示屏幕正中的一定范围的区域,和/或,位于显示屏幕右下角的一定范围的区域。In one embodiment of the present invention, the range of the designated area of the display screen represented by the range information of the designated area of the display screen saved by the
综上所述,本发明的这种技术方案中,由于设置了窗口钩子程序拦截窗口消息,因此可以在窗口弹出前进行判断,并阻止广告窗口的弹出,并且判断的依据是根据窗口要在屏幕上显示的坐标位置区域进行的,当窗口要在屏幕上显示的坐标位置区域在广告窗口弹出的指定范围内时阻止窗口的弹出,因此避免了根据广告窗口自身的特征进行拦截的现有方案中,当广告窗口修改特征时拦截效果不佳的问题。In summary, in this technical solution of the present invention, because the window hook program is set to intercept the window message, it can be judged before the window pops up, and prevents the pop-up of the advertisement window, and the basis for judging is that the window should be displayed on the screen. When the coordinate position area to be displayed on the screen is within the specified range of the advertisement window pop-up, the pop-up of the window is prevented, thus avoiding the existing scheme of blocking according to the characteristics of the advertisement window itself , the problem that the blocking effect is not good when the advertisement window modifies the characteristics.
本发明技术方案可以对用户打扰巨大的广告弹窗进行屏蔽。目前各种应用软件对用户强制推广信息的情况越来越多,几乎每个软件都想在开机启动后就推送给用户一些信息,而且屏幕正中,右下角各个位置相对集中,采用本发明这种根据弹出位置屏蔽这些弹窗的方案,可以很好的解决新软件,新弹窗的广告屏蔽问题,不需要屏蔽软件进行升级就可以得到很好的屏蔽效果,让用户的使用体验得到提升。The technical solution of the invention can shield the huge advertisement pop-up window that disturbs the user. At present, there are more and more situations where various application softwares force users to promote information. Almost every software wants to push some information to users after starting up, and the center of the screen and the positions in the lower right corner are relatively concentrated. The scheme of blocking these pop-up windows according to the pop-up location can solve the new software and the advertising blocking problem of new pop-up windows well. It can get a good blocking effect without upgrading the blocking software, so that the user experience can be improved.
需要说明的是:It should be noted:
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings), as well as any method or method so disclosed, may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的用于拦截弹窗的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all of the components in the device for intercepting pop-up windows according to the embodiment of the present invention . The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210544565.7ACN103034800B (en) | 2012-12-14 | 2012-12-14 | Device and a method for intercepting pop-up windows |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210544565.7ACN103034800B (en) | 2012-12-14 | 2012-12-14 | Device and a method for intercepting pop-up windows |
| Publication Number | Publication Date |
|---|---|
| CN103034800Atrue CN103034800A (en) | 2013-04-10 |
| CN103034800B CN103034800B (en) | 2017-06-20 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210544565.7AActiveCN103034800B (en) | 2012-12-14 | 2012-12-14 | Device and a method for intercepting pop-up windows |
| Country | Link |
|---|---|
| CN (1) | CN103034800B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103019719A (en)* | 2012-12-14 | 2013-04-03 | 北京奇虎科技有限公司 | Device and method for intercepting pop-up window |
| CN104091125A (en)* | 2014-07-18 | 2014-10-08 | 北京奇虎科技有限公司 | Floating window processing method and device |
| CN104123276A (en)* | 2013-04-23 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Method, device and system for intercepting popup windows in browser |
| CN104252477A (en)* | 2013-06-27 | 2014-12-31 | 贝壳网际(北京)安全技术有限公司 | Method and device for controlling webpage pop-up window |
| CN106446684A (en)* | 2016-09-22 | 2017-02-22 | 武汉斗鱼网络科技有限公司 | Network account protection method and system based on password control |
| CN106658195A (en)* | 2015-11-04 | 2017-05-10 | 珠海市君天电子科技有限公司 | Video advertisement blocking method and device |
| CN106776610A (en)* | 2015-11-19 | 2017-05-31 | 珠海市君天电子科技有限公司 | Advertisement popup intercepting method and device |
| CN106909377A (en)* | 2017-02-21 | 2017-06-30 | 北京奇虎科技有限公司 | A kind of hot-zone page processing method and device |
| CN107391115A (en)* | 2017-06-28 | 2017-11-24 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and computer equipment for realizing pop-up alternative events |
| CN108920243A (en)* | 2018-06-29 | 2018-11-30 | 北京奇虎科技有限公司 | Control the method and device of pop-up |
| CN113448668A (en)* | 2021-06-22 | 2021-09-28 | 北京百度网讯科技有限公司 | Method and device for skipping popup window and electronic equipment |
| CN115391771A (en)* | 2022-10-28 | 2022-11-25 | 荣耀终端有限公司 | Pop-up blocking method, device, electronic device and readable storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102129348A (en)* | 2011-03-10 | 2011-07-20 | 央视国际网络有限公司 | Method and device for prompting web page message |
| CN102236553A (en)* | 2011-06-09 | 2011-11-09 | 北京思创银联科技股份有限公司 | Method for filtering Windows system window |
| CN102385583A (en)* | 2010-08-31 | 2012-03-21 | 腾讯科技(深圳)有限公司 | Method for controlling browser to open window and web browser |
| CN102819713A (en)* | 2012-06-29 | 2012-12-12 | 北京奇虎科技有限公司 | Method and system for detecting security of popup window |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102385583A (en)* | 2010-08-31 | 2012-03-21 | 腾讯科技(深圳)有限公司 | Method for controlling browser to open window and web browser |
| CN102129348A (en)* | 2011-03-10 | 2011-07-20 | 央视国际网络有限公司 | Method and device for prompting web page message |
| CN102236553A (en)* | 2011-06-09 | 2011-11-09 | 北京思创银联科技股份有限公司 | Method for filtering Windows system window |
| CN102819713A (en)* | 2012-06-29 | 2012-12-12 | 北京奇虎科技有限公司 | Method and system for detecting security of popup window |
| Title |
|---|
| 田长根 等: "《基于hook技术拦截IE弹出广告窗口的实现》", 《计算机与现代化》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103019719B (en)* | 2012-12-14 | 2016-08-24 | 北京奇虎科技有限公司 | A kind of pop-up blocking apparatus and method |
| CN103019719A (en)* | 2012-12-14 | 2013-04-03 | 北京奇虎科技有限公司 | Device and method for intercepting pop-up window |
| CN104123276A (en)* | 2013-04-23 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Method, device and system for intercepting popup windows in browser |
| CN104252477B (en)* | 2013-06-27 | 2018-06-15 | 贝壳网际(北京)安全技术有限公司 | Method and device for controlling webpage pop-up window |
| CN104252477A (en)* | 2013-06-27 | 2014-12-31 | 贝壳网际(北京)安全技术有限公司 | Method and device for controlling webpage pop-up window |
| CN104091125A (en)* | 2014-07-18 | 2014-10-08 | 北京奇虎科技有限公司 | Floating window processing method and device |
| CN104091125B (en)* | 2014-07-18 | 2017-11-17 | 北京奇虎科技有限公司 | Handle the method and suspended window processing unit of suspended window |
| CN106658195A (en)* | 2015-11-04 | 2017-05-10 | 珠海市君天电子科技有限公司 | Video advertisement blocking method and device |
| CN106658195B (en)* | 2015-11-04 | 2019-08-23 | 珠海豹趣科技有限公司 | A kind of video ads hold-up interception method and device |
| CN106776610A (en)* | 2015-11-19 | 2017-05-31 | 珠海市君天电子科技有限公司 | Advertisement popup intercepting method and device |
| CN106776610B (en)* | 2015-11-19 | 2020-04-17 | 珠海豹趣科技有限公司 | Advertisement popup intercepting method and device |
| CN106446684A (en)* | 2016-09-22 | 2017-02-22 | 武汉斗鱼网络科技有限公司 | Network account protection method and system based on password control |
| CN106909377A (en)* | 2017-02-21 | 2017-06-30 | 北京奇虎科技有限公司 | A kind of hot-zone page processing method and device |
| CN106909377B (en)* | 2017-02-21 | 2020-08-11 | 北京安云世纪科技有限公司 | Hot area page processing method and device |
| CN107391115B (en)* | 2017-06-28 | 2018-10-23 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and computer equipment for realizing pop-up alternative events |
| CN107391115A (en)* | 2017-06-28 | 2017-11-24 | 武汉斗鱼网络科技有限公司 | A kind of method, apparatus and computer equipment for realizing pop-up alternative events |
| CN108920243A (en)* | 2018-06-29 | 2018-11-30 | 北京奇虎科技有限公司 | Control the method and device of pop-up |
| CN113448668A (en)* | 2021-06-22 | 2021-09-28 | 北京百度网讯科技有限公司 | Method and device for skipping popup window and electronic equipment |
| CN113448668B (en)* | 2021-06-22 | 2023-09-29 | 北京百度网讯科技有限公司 | A method, device and electronic device for skipping pop-up windows |
| CN115391771A (en)* | 2022-10-28 | 2022-11-25 | 荣耀终端有限公司 | Pop-up blocking method, device, electronic device and readable storage medium |
| Publication number | Publication date |
|---|---|
| CN103034800B (en) | 2017-06-20 |
| Publication | Publication Date | Title |
|---|---|---|
| CN103019719B (en) | A kind of pop-up blocking apparatus and method | |
| CN103034800B (en) | Device and a method for intercepting pop-up windows | |
| CN104360794B (en) | Method and device for controlling window pop-up through full screen mode identification | |
| CN103164268B (en) | System optimization method and device | |
| CN104111847B (en) | A kind of method and device for improving game running speed | |
| CN104036019B (en) | The open method and device of web page interlinkage | |
| CN103577749B (en) | The treating method and apparatus of informing message | |
| CN103019676B (en) | A kind of method of managing software and system | |
| CN106201167A (en) | The multi-screen display method of terminal screen, device and terminal | |
| CN103226474B (en) | Exchange method between page script and browser program, Apparatus and system | |
| CN104503841A (en) | Process clearing method and process clearing device | |
| CN104346463B (en) | A kind of loading method of page-tag, device and browser client | |
| CN105812836A (en) | VPN based video advertisement blocking method and device | |
| WO2018045873A1 (en) | Message processing method for instant messaging application and related product | |
| CN106909377A (en) | A kind of hot-zone page processing method and device | |
| CN103019677A (en) | Method and device for software management | |
| CN106227649A (en) | A kind of test the application method and apparatus that excessively renders of the page | |
| CN107493442A (en) | A kind of method and apparatus for editing video | |
| CN106909354A (en) | image display method and device | |
| CN106648937A (en) | Broadcast agent method and device for Android applications | |
| WO2022121537A1 (en) | Message sending method and apparatus, message receiving method and apparatus, and electronic device | |
| CN107580039A (en) | Transmission progress display method, device and terminal | |
| CN103023757B (en) | Message display device and methods of exhibiting | |
| CN104375831B (en) | Realize the methods, devices and systems of the webpage and inter-application communication on terminal device | |
| CN104484176B (en) | A kind of Android system window object acquisition methods and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | Effective date of registration:20220725 Address after:Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after:BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before:100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before:BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before:Qizhi software (Beijing) Co.,Ltd. | |
| TR01 | Transfer of patent right |