Window filtering method, device, electronic device and storage medium

CN113761301BActive Publication Date: 2025-03-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110074281.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-20
Publication Date
2025-03-18
Estimated Expiration
2041-01-20

AI Technical Summary

Technical Problem

The prior art can only filter the forms displayed by terminal devices, and cannot filter hidden or covered forms, resulting in incomplete filtering of forms and low accuracy.

Method used

By obtaining the handles of the top-level form in the terminal device that is displayed in the top-level, obtaining the handles of other forms in turn, determining the display information and file information of each form, and filtering according to the preset filtering strategy.

Benefits of technology

It realizes comprehensive filtering of all forms in the terminal device, improving the accuracy and comprehensiveness of form filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761301B_ABST
    Figure CN113761301B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for window filtering, and relates to the field of computer technology. A specific implementation of the method includes: obtaining the handle of the top-level window in the display order of each window included in the terminal device; according to the handle of the top-level window, sequentially obtaining the handles of other windows included in the terminal device; according to the handles of each window included in the terminal device, determining the file information of the application corresponding to each window and the display information of each window; filtering each window according to the preset filtering strategy, file information and display information. This implementation can solve the problem that only the windows displayed by the terminal device can be filtered, and the hidden or covered windows cannot be filtered, so the filtering of the windows is not comprehensive and the accuracy is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a form filtering method, device, electronic equipment and storage medium. Background Art

[0002] When a user is using a terminal device, the terminal device can display content related to the user's operation through a window. In some scenarios, the terminal device will automatically pop up some windows that the user does not need, such as some junk windows popped up due to abnormalities or advertisements. In order to avoid the window popped up by the terminal device not meeting the needs of the user, the terminal device can filter the pop-up window and filter out unnecessary windows to avoid affecting the user. At present, the window filtering method is usually to take a screenshot of the desktop of the terminal device at a fixed time, and then analyze the image content of the screenshot to determine the window information, and then implement window filtering. However, this method can only filter the windows displayed by the terminal device, and cannot filter hidden or covered windows, so the window filtering is not comprehensive and the accuracy is low. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method, device, electronic device and storage medium for window filtering, which can solve the problem that only windows displayed on terminal devices can be filtered, but hidden or covered windows cannot be filtered, so the window filtering is incomplete and has low accuracy.

[0004] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for window filtering is provided.

[0005] A window filtering method in an embodiment of the present invention includes: obtaining the handle of the top-level window that is at the top level in the display order among the windows included in the terminal device; according to the handle of the top-level window, sequentially obtaining the handles of other windows included in the terminal device; according to the handles of the windows included in the terminal device, determining the file information of the application corresponding to each window and the display information of each window; filtering each window according to a preset filtering strategy, the file information and the display information.

[0006] In one embodiment, the display information includes the name of the window, the display state and / or the relative position to the screen of the terminal device;

[0007] The file information includes attributes of the application and / or a file signature of the application.

[0008] In yet another embodiment, the preset strategy includes target display information and target file information;

[0009] The filtering of each window according to the preset filtering strategy, the file information and the display information includes:

[0010] For each of the windows, determine whether the display information of each window satisfies the target display information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine whether the file information of the application corresponding to each window satisfies the target file information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine that each window is a normal window.

[0011] In yet another embodiment, sequentially acquiring handles of other windows included in the terminal device according to the handle of the top-level window includes:

[0012] Based on the handle of the top-level window, obtain the handle of the sub-level window that is displayed after the top-level window and adjacent to the top-level window, and based on the handle of the sub-level window, obtain the handle of the next window that is displayed after the sub-level window and adjacent to the sub-level window, until the handles of the windows included in the terminal device are obtained.

[0013] In yet another embodiment, determining the file information of the application corresponding to each window according to the handle of each window included in the terminal device includes:

[0014] According to the handles of the windows and the preset correspondence between the handles and the applications, the file information of the applications corresponding to the windows is obtained.

[0015] In yet another embodiment, before filtering the windows according to the preset filtering strategy, the file information and the display information, the method further includes:

[0016] Send a filtering policy request to the server;

[0017] Receive response information sent by the server, and update the preset filtering strategy according to the response information.

[0018] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for window filtering is provided.

[0019] A window filtering device according to an embodiment of the present invention comprises: an acquisition unit, used to acquire the handle of a top-level window that is at the top level in the display order among the windows included in a terminal device; the acquisition unit is also used to sequentially acquire the handles of other windows included in the terminal device according to the handle of the top-level window; a determination unit, used to determine the file information of the application corresponding to each window and the display information of each window according to the handles of each window included in the terminal device; and a filtering unit, used to filter each window according to a preset filtering strategy, the file information and the display information.

[0020] In one embodiment, the display information includes the name of the window, the display state and / or the relative position to the screen of the terminal device;

[0021] The file information includes attributes of the application and / or a file signature of the application.

[0022] In yet another embodiment, the preset strategy includes target display information and target file information;

[0023] The filtering unit is specifically used for:

[0024] For each of the windows, determine whether the display information of each window satisfies the target display information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine whether the file information of the application corresponding to each window satisfies the target file information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine that each window is a normal window.

[0025] In yet another embodiment, the acquiring unit is specifically configured to:

[0026] Based on the handle of the top-level window, obtain the handle of the sub-level window that is displayed after the top-level window and adjacent to the top-level window, and based on the handle of the sub-level window, obtain the handle of the next window that is displayed after the sub-level window and adjacent to the sub-level window, until the handles of the windows included in the terminal device are obtained.

[0027] In yet another embodiment, the determining unit is specifically configured to:

[0028] According to the handles of the windows and the preset correspondence between the handles and the applications, the file information of the applications corresponding to the windows is obtained.

[0029] In yet another embodiment, the apparatus further comprises:

[0030] A sending unit, used for sending a filtering policy request to a server;

[0031] An updating unit is used to receive the response information sent by the server and update the preset filtering strategy according to the response information.

[0032] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0033] An electronic device according to an embodiment of the present invention comprises: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the form filtering method provided by the embodiment of the present invention.

[0034] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0035] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the method for window filtering provided by the embodiment of the present invention is implemented.

[0036] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the terminal device can first obtain the handle of the top-level window in the top layer of the display order, and then can sequentially obtain the handles of each window included based on the handle of the top-level window, and then determine the display information of each window and the file information of the corresponding application according to the handle of each window, so as to achieve filtering of each window in the terminal device in combination with the preset strategy. In this way, in the embodiment of the present invention, the handles of each window are obtained according to the handle of the top-level window, and then the file information and display information of the application corresponding to each window can be determined, and filtering of each window is achieved based on the file information and display information, so that each window in the terminal device can be filtered, thereby improving the comprehensiveness of window filtering, and filtering the window from both the file information and the display information, thereby improving the accuracy of window filtering.

[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 is a schematic diagram of a main process of a form filtering method according to an embodiment of the present invention;

[0040] Figure 2is a schematic diagram of another main process of the form filtering method according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of main units of a window filtering device according to an embodiment of the present invention;

[0042] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0043] Figure 5 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0045] It should be pointed out that the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.

[0046] The embodiment of the present invention provides a method for window filtering, which can be executed by a terminal device, such as Figure 1 As shown, the method includes the following steps.

[0047] S101: Obtaining a handle of a top-level window that is at the top in display order among windows included in a terminal device.

[0048] When a user uses a terminal device, multiple windows can be opened at the same time. The windows are usually displayed in the order of user operations. That is, the window most recently operated by the user is usually displayed at the top. The closer the time of the last window operated by the user is to the current time, the closer the window is to the top.

[0049] In a terminal device, multiple open windows can form an overlapping window stack. The display order of each window in the window stack can be positioned along an imaginary axis, which extends outward from the screen of the terminal device and can be called the "Z axis". Therefore, the display order of each window in the window stack can also be called the "Z order". The window at the top of the Z order, that is, the top window, covers all other windows, and the window at the bottom of the Z order is covered by all other windows.

[0050] In this step, the terminal device obtains the handle of the window at the top of the display order, that is, the handle of the window at the top of the “Z order.” Specifically, the terminal device can implement this step by calling a system API, for example, the system API that can be called is GetTopWindow.

[0051] It should be noted that the form may include a programming window and a dialog box corresponding to the application. Since a new form may pop up in the terminal device as the user operates, the program is executed, etc., in order to ensure the comprehensiveness of the filtering of each form in the terminal device, the form filtering method in the embodiment of the present invention can be executed periodically, such as periodically obtaining the handle of the top-level form in the display order of each form included in the terminal device, and then executing the subsequent steps. The specific value of the period can be set according to the specific application scenario.

[0052] S102: According to the handle of the top-level window, the handles of other windows included in the terminal device are obtained in sequence.

[0053] Among them, after obtaining the handle of the top-level window, the handle of the next layer of window of the top-level window can be obtained according to the handle of the top-level window. By executing in this way in a loop, the handles of other windows included in the terminal device can be obtained in turn. Therefore, through steps S101 and S102, the handles of all windows included in the terminal device can be obtained.

[0054] Specifically, this step can be executed as follows: based on the handle of the top-level window, obtain the handle of the sub-level window that is displayed after the top-level window and adjacent to the top-level window; and based on the handle of the sub-level window, obtain the handle of the next window that is displayed after the sub-level window and adjacent to the sub-level window, until the handles of the windows included in the terminal device are obtained.

[0055] Since the handle of the window in the previous layer of the display order can be used to obtain the handle of the adjacent window in the next layer of the display order, in this step, the handle of the second layer of the window can be obtained by first using the handle of the top-level window, and then the handle of the next layer of the window can be obtained based on the handle of the second-level window. This cycle can be repeated to obtain the handle of each window in the display order from the top layer to the bottom layer, that is, the handles of each window included in the terminal device can be obtained.

[0056] It should be noted that in the embodiment of the present invention, the terminal device obtains the handle of the window in the next layer according to the handle of the window in the previous layer in the display order by calling the system API. For example, the system API that can be called is GetNextWindow.

[0057] S103: Determine the file information of the application corresponding to each window and the display information of each window according to the handle of each window included in the terminal device.

[0058] The window handle is a reference to a system internal data structure, which may include window title, name, display area, display status and other display information related to the window, so the window display information can be determined through the window handle. In addition, in the terminal device, a correspondence between the window handle and the corresponding application of the window can be established for each window, so the application corresponding to the window can be determined through the window handle, and then the file information of the application can be determined.

[0059] Specifically, the display information includes the name of the window, the display state and / or the relative position to the screen of the terminal device; the file information includes the properties of the application and / or the file signature of the application.

[0060] The display information indicates the associated information when the form is displayed, such as the name, title, logo, display status, relative position to the screen of the terminal device, etc. The display status may include display and hide, display means that the form is currently displayed on the screen of the terminal device, and hide means that the form is currently hidden in the screen of the terminal device. The relative position to the screen of the terminal device indicates the position of the form in the screen of the terminal device, which may be referred to as the display area. The attributes of the application may include multiple types, such as name, version number, description information, MD5 identification code, etc., and the file signature of the application may also include multiple types, such as a digital signature.

[0061] It should be noted that some parameters included in the file information of the application are calculated by a preset algorithm, for example, MD5 identification code and digital signature. MD5 identification code refers to a unique identification code calculated by the MD5 algorithm for the file corresponding to the application. The MD5 algorithm is a preset algorithm. In the embodiment of the present invention, other algorithms can also be preset to calculate the unique identification code. Digital signature refers to a file corresponding to the application calculated by a preset algorithm. The preset algorithm can include multiple types.

[0062] In the embodiment of the present invention, each window establishes a correspondence between the window handle and the application corresponding to the window, which can be established by the process running the application. For example, when the window is running, there is a mapping relationship between its handle and the corresponding process, so the PID (unique identifier of the program process in the operating system) of the process corresponding to the window can be obtained according to the window handle, and then the application corresponding to the process can be determined through the PID of the process, that is, the correspondence between the window handle and the application corresponding to the window is established.

[0063] In the embodiment of the present invention, the method of determining the display information of a window according to the handle of each window can be implemented by calling a system API. For example, when determining the display area of ​​a window, it can be implemented by calling the system API: GetWindowRect, and when determining the name and title of the window, it can be implemented by calling the system API: GetWindowText. The method of determining the file information of the application corresponding to the window according to the handle of each window can also be implemented by calling a system API. For example, when determining the PID of the process corresponding to the window, it can be implemented by calling the system API: GetWindowThrea dProcessId, and when determining the file information, it can be implemented by calling the system API: GetFileVersionInfo.

[0064] S104: Filter each window according to the preset filtering strategy, file information and display information.

[0065] The filtering policy indicates the policy information for filtering the window, which may include target display information and target file information. The target display information indicates the display information of the filtered window, and the target file information indicates the file information of the filtered window. For example, in the embodiment of the present invention, if it is necessary to filter out the window corresponding to a certain application, the attribute of the application can be determined as the target file information, so that the window of the application can be filtered out from the windows included in the terminal device in this step.

[0066] The filtering strategy is preset and can be set according to user needs. Specifically, the preset filtering strategy can be obtained from the server and stored so as to be used for filtering the form in this step.

[0067] Therefore, before executing this step, the following steps may also be performed: sending a filtering policy request to the server; receiving response information sent by the server, and updating the preset filtering policy according to the response information.

[0068] The terminal device can send a filtering policy request to the server to request the filtering policy of the window in the server. After receiving the request from the terminal device, the server can send the stored filtering policy to the terminal device, that is, send a response message to the terminal device, and the response message includes the filtering policy. After receiving the response message, the terminal device can update the preset filtering policy in the terminal device according to the filtering policy in the response message. Among them, if the terminal device sends a filtering policy request to the server for the first time, the filtering policy in the response message can be directly stored as the preset filtering policy, which is equivalent to updating the preset filtering policy. Specifically, a network interface can be established between the terminal device and the server, and then the terminal device and the server can exchange data through the network interface.

[0069] It should be noted that the terminal device may also pre-set corresponding operations for the filtered windows, such as hiding, closing, etc. In this step, the set corresponding operations may be directly executed after the windows are filtered out, and no other operations may be performed on the filtered windows, and normal processing may be sufficient.

[0070] In an embodiment of the present invention, the terminal device can first obtain the handle of the top-level window in the top layer of the display order, and then can sequentially obtain the handles of each window included based on the handle of the top-level window, and then determine the display information of the window and the file information of the corresponding application according to the handle of each window, so as to achieve filtering of each window in the terminal device in combination with the preset strategy. In this way, in an embodiment of the present invention, the handles of each window are obtained according to the handle of the top-level window, and then the file information and display information of the application corresponding to each window can be determined, and filtering of each window is achieved based on the file information and display information, so that each window in the terminal device can be filtered, thereby improving the comprehensiveness of window filtering, and filtering the window from both the file information and the display information, thereby improving the accuracy of window filtering.

[0071] It should be noted that the preset filtering strategy may include target display information and target file information, and the target display information and target file information may also include a variety of information for filtering. When performing window filtering in step S104, it is usually determined in turn whether the display information and file information of the window meet the target display information and target file information, and then the filtered window is determined. Among them, when filtering the window, when it is determined that a certain information of the window meets the target information in the preset filtering strategy, the window can be determined as the filtered window, and the preset filtering strategy that has not been executed subsequently does not need to be executed again.

[0072] Specifically, the following is combined Figure 1 In the embodiment shown in FIG. 1 , the method for filtering the form in step S104 is specifically described in the embodiment of the present invention. Since step S104 needs to be executed for each form, the execution process of any form is described as an example in the embodiment of the present invention. Figure 2 As shown, the method includes the following steps.

[0073] S201: Determine whether the display information of the window meets the target display information.

[0074] In this step, the window may be filtered according to its displayed information.

[0075] The display information may include the name, title, display area, display status, etc. of the window, and the target display information may include the name, title, display area, display status, etc. of the window that needs to be filtered out. For example, in the embodiment of the present invention, it is necessary to filter out the window in the specified area, and the specified area can be determined as the target display information, so that it can be judged in this step whether the display area of ​​the window is the specified area. If it is, it can be directly determined that the window is a filtered window, that is, a filtered window, and step S204 is executed; if not, step S202 can be executed to continue to judge. For another example, in the embodiment of the present invention, it is necessary to filter out the window with a specified title, and the title can be determined as the target display information, so that it can be judged in this step whether the title of the window is the specified title. If it is, it can be directly determined that the window is a filtered window, and step S204 is executed; if not, step S202 can be executed to continue to judge.

[0076] It should be noted that the target display information may include multiple parameters. In this step, the window needs to be judged according to each parameter in the target display information. After determining that the display information of the window does not meet the parameters in the target display information, it can be determined that the display information of the window does not meet the target display information, and step S202 is executed. Otherwise, step S204 is executed.

[0077] S202: If not, determine whether the file information of the application corresponding to the window satisfies the target file information.

[0078] After determining that the target information of the window does not meet the target display information, it is also necessary to determine whether the file information of the application corresponding to the window meets the target file information.

[0079] The file information may include the properties of the application and the file signature of the application, etc., and the target file information may include the properties and the corresponding application corresponding to the form to be filtered out. For example, in the embodiment of the present invention, it is necessary to filter out the form with an illegal digital signature, and then an illegal digital signature library may be set to determine it as the target file information, so that in this step, it can be determined whether the file signature of the corresponding application in the file information of the form belongs to the illegal digital signature library. If so, the form can be directly determined to be a filtered form, and step S204 is executed; if not, the judgment can be continued, or step S203 is executed to determine it is a normal form. For another example, in the embodiment of the present invention, it is necessary to filter out the form corresponding to the specified application, and then the name of the specified application can be set as the target file information, so that in this step, it can be determined whether the file name of the corresponding application in the file information of the form is the name of the specified application. If so, the form can be directly determined to be a filtered form, and step S204 is executed; if not, the judgment can be continued, or step S203 is executed to determine it is a normal form.

[0080] It should be noted that the target display information may include multiple parameters. In this step, the window needs to be judged according to each parameter in the target display information. After determining that the display information of the window does not meet the parameters in the target display information, it can be determined that the display information of the window does not meet the target display information, and step S202 is executed. Otherwise, step S204 is executed.

[0081] S203: If not, determine that the window is a normal window.

[0082] The normal windows refer to windows that do not need to be filtered out. For these windows, the embodiment of the present invention does not need to process them and can be executed normally.

[0083] S204: If yes, determine that the window is a filtered window, and perform an operation corresponding to the filtered window.

[0084] The filtered window indicates the window that needs to be filtered out. In the embodiment of the present invention, operations corresponding to the filtered window can be pre-set, so after the filtered window is determined, the operation corresponding to the filtered window can be performed on it.

[0085] In an embodiment of the present invention, each window is filtered according to the file information and display information of the window, so that each window in the terminal device can be filtered, which improves the comprehensiveness of window filtering, and filters the window from both file information and display information to improve the accuracy of window filtering.

[0086] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a window filtering device 300, such as Figure 3 As shown, the device 300 includes:

[0087] The acquisition unit 301 is used to acquire the handle of the top-level window which is at the top level in the display order among the windows included in the terminal device;

[0088] The acquisition unit 301 is further used to sequentially acquire handles of other windows included in the terminal device according to the handle of the top-level window;

[0089] A determination unit 302, configured to determine, according to the handles of the windows included in the terminal device, the file information of the application corresponding to each window and the display information of each window;

[0090] The filtering unit 303 is used to filter the windows according to a preset filtering strategy, the file information and the display information.

[0091] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1The method of the illustrated embodiment is the same and will not be described again here.

[0092] In an implementation of the embodiment of the present invention, the display information includes the name of the window, the display state and / or the relative position to the screen of the terminal device;

[0093] The file information includes attributes of the application and / or a file signature of the application.

[0094] In another implementation of the embodiment of the present invention, the preset strategy includes target display information and target file information;

[0095] The filtering unit 303 is specifically used for:

[0096] For each of the windows, determine whether the display information of each window satisfies the target display information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine whether the file information of the application corresponding to each window satisfies the target file information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine that each window is a normal window.

[0097] In another implementation of the embodiment of the present invention, the acquisition unit 301 is specifically used to:

[0098] Based on the handle of the top-level window, obtain the handle of the sub-level window that is displayed after the top-level window and adjacent to the top-level window, and based on the handle of the sub-level window, obtain the handle of the next window that is displayed after the sub-level window and adjacent to the sub-level window, until the handles of the windows included in the terminal device are obtained.

[0099] In another implementation of the embodiment of the present invention, the determining unit 302 is specifically configured to:

[0100] According to the handles of the windows and the preset correspondence between the handles and the applications, the file information of the applications corresponding to the windows is obtained.

[0101] In another implementation of the embodiment of the present invention, the device 300 further includes:

[0102] A sending unit, used for sending a filtering policy request to a server;

[0103] An updating unit is used to receive the response information sent by the server and update the preset filtering strategy according to the response information.

[0104] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 or Figure 2 The method of the illustrated embodiment is the same and will not be described again here.

[0105] In an embodiment of the present invention, the terminal device can first obtain the handle of the top-level window in the top layer of the display order, and then can sequentially obtain the handles of each window included based on the handle of the top-level window, and then determine the display information of the window and the file information of the corresponding application according to the handle of each window, so as to achieve filtering of each window in the terminal device in combination with the preset strategy. In this way, in an embodiment of the present invention, the handles of each window are obtained according to the handle of the top-level window, and then the file information and display information of the application corresponding to each window can be determined, and filtering of each window is achieved based on the file information and display information, so that each window in the terminal device can be filtered, thereby improving the comprehensiveness of window filtering, and filtering the window from both the file information and the display information, thereby improving the accuracy of window filtering.

[0106] According to an embodiment of the present invention, the embodiment of the present invention further provides an electronic device and a readable storage medium.

[0107] The electronic device of an embodiment of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the window filtering method provided by the embodiment of the present invention.

[0108] Figure 3 An exemplary system architecture 700 is shown to which the method for window filtering or the apparatus for window filtering according to the embodiment of the present invention can be applied.

[0109] like Figure 3 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0110] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0111] The terminal devices 701 , 702 , and 703 may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0112] The server 705 may be a server that provides various services. The server may analyze and process the received query request for the filtering policy and other data, and feed back the processing result (such as product information - just an example) to the terminal device.

[0113] It should be noted that the form filtering method provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the form filtering device is generally disposed in the server 705 .

[0114] It should be understood that Figure 3 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0115] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 800 suitable for implementing an embodiment of the present invention. Figure 4 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0116] like Figure 4 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0117] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0118] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0119] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a determination unit, and an acquisition unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit of the function of the acquisition unit".

[0122] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the form filtering method provided by the present invention.

[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A form filtering method, characterized in that: include: Get the handle of the top-level window in the display order of all windows included in the terminal device; According to the handle of the top-level window, sequentially obtain the handles of other windows included in the terminal device; Determining, according to the handles of the windows included in the terminal device, the file information of the application corresponding to each window and the display information of each window; Filtering each window according to a preset filtering strategy, the file information and the display information; The preset filtering strategy includes target display information and target file information; The filtering of each window according to the preset filtering strategy, the file information and the display information includes: For each of the windows, determining whether the display information of each window satisfies the target display information; If so, each of the windows is determined to be a filtered window, and the operation corresponding to the filtered window is executed; if not, it is determined whether the file information of the application corresponding to each window satisfies the target file information. If so, each of the windows is determined to be a filtered window, and the operation corresponding to the filtered window is executed; if not, each of the windows is determined to be a normal window.

2. The method according to claim 1, characterized in that The display information includes the name of the window, display status and / or relative position to the screen of the terminal device; The file information includes attributes of the application and / or a file signature of the application.

3. The method according to claim 1, characterized in that The step of sequentially acquiring handles of other windows included in the terminal device according to the handle of the top-level window includes: Based on the handle of the top-level window, obtain the handle of the sub-level window that is displayed after the top-level window and adjacent to the top-level window, and based on the handle of the sub-level window, obtain the handle of the next window that is displayed after the sub-level window and adjacent to the sub-level window, until the handles of the windows included in the terminal device are obtained.

4. The method according to claim 1, characterized in that The step of determining the file information of the application corresponding to each window according to the handle of each window included in the terminal device includes: According to the correspondence between the window handle and the application, the file information of the application corresponding to each window is obtained.

5. The method according to claim 1, characterized in that Before filtering the windows according to the preset filtering strategy, the file information and the display information, the method further includes: Send a filtering policy request to the server; Receive response information sent by the server, and update the preset filtering strategy according to the response information.

6. A window filtering device, characterized in that: include: An acquisition unit, used for acquiring a handle of a top-level window which is at the top level in the display order among the windows included in the terminal device; The acquisition unit is further used to sequentially acquire handles of other windows included in the terminal device according to the handle of the top-level window; A determination unit, configured to determine, according to the handles of the windows included in the terminal device, the file information of the application corresponding to each window and the display information of each window; A filtering unit, configured to filter the windows according to a preset filtering strategy, the file information and the display information; The preset filtering strategy includes target display information and target file information; The filtering unit is specifically used for: For each of the windows, determine whether the display information of each window satisfies the target display information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine whether the file information of the application corresponding to each window satisfies the target file information; if so, determine that each window is a filtered window, and execute the operation corresponding to the filtered window; if not, determine that each window is a normal window.

7. The device according to claim 6, characterized in that The display information includes the name of the window, display status and / or relative position to the screen of the terminal device; The file information includes attributes of the application and / or a file signature of the application.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and system for intercepting pop-up window

    CN101620529A

  • Method and device for intercepting popup

    CN102945341A