CN115688102A - Window processing method and device, processor and electronic equipment - Google Patents

Window processing method and device, processor and electronic equipment Download PDF

Info

Publication number
CN115688102A
CN115688102A CN202211413595.4A CN202211413595A CN115688102A CN 115688102 A CN115688102 A CN 115688102A CN 202211413595 A CN202211413595 A CN 202211413595A CN 115688102 A CN115688102 A CN 115688102A
Authority
CN
China
Prior art keywords
window
target
pop
target window
advertisement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211413595.4A
Other languages
Chinese (zh)
Inventor
刘志诚
贺志强
张攀
孟鹏
谢伊然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hillstone Networks Co Ltd
Original Assignee
Hillstone Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hillstone Networks Co Ltd filed Critical Hillstone Networks Co Ltd
Priority to CN202211413595.4A priority Critical patent/CN115688102A/en
Publication of CN115688102A publication Critical patent/CN115688102A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a window processing method and device, a processor and electronic equipment. The method comprises the following steps: when detecting that a target process calls a computer program function to display the target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; and processing the target window according to the current pop-up window protection mode. Through the application, the problem that the popup advertisements in software influence normal use of users in the related art is solved.

Description

Window processing method and device, processor and electronic equipment
Technical Field
The present application relates to the field of computer software, and in particular, to a window processing method, device, processor, and electronic device.
Background
At present, most of free software downloaded from websites is used, and the websites or the software are often bound with some pop-up advertisements for profit. The pop-up advertisements cannot be closed easily after being popped up, and a malicious website of a browser in a computer system can be opened usually by clicking a closing button prompted by the pop-up advertisements, so that the normal use of a user can be influenced by popping up the pop-up advertisements in the website.
Aiming at the problem that the pop-up advertisements in software in the related art influence the normal use of users, no effective solution is provided at present.
Disclosure of Invention
The application mainly aims to provide a window processing method, a window processing device, a processor and electronic equipment, so as to solve the problem that pop-up advertisements in software in the related art affect normal use of users.
In order to achieve the above object, according to one aspect of the present application, there is provided a window processing method. The method comprises the following steps: when detecting that a target process calls a computer program function to display a target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; and processing the target window according to the current pop-up window protection mode.
Further, when it is detected that the target process calls a computer program function to display the target window, determining whether the target window has a characteristic of a pop-up window advertisement further includes: calculating the position of the central point of the target window, and judging whether the position of the central point of the target window is located in a monitoring range, wherein the monitoring range at least comprises: a display center area and a display lower right corner area, wherein the center point position is an intersection point of diagonals of the target window; if the center point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process; if the window process is not the system process, intercepting the area of the target window through a screenshot tool to obtain a target picture; and judging whether the target window has the characteristics of the pop-up window advertisement or not according to the target picture.
Further, the processing the target window according to the current pop-up window protection mode further includes: if the current pop-up window protection mode is the monitoring mode, executing target operation on the target window; and if the current pop-up window protection mode is the interception mode, modifying the parameters of the target window to hide the target window.
Further, according to the target picture, judging whether the target window has the characteristics of the pop-up window advertisement further comprises: calculating the entropy of the pixel block of the target picture, and judging whether the entropy of the pixel block of the target picture is larger than a threshold value; and if the entropy of the pixel block of the target picture is larger than the threshold value, determining that the target window accords with the characteristics of the popup advertisement.
Further, if the center point of the target window is located within the monitoring range, determining whether the window process of the target window is a system process further includes: acquiring the value of the window process, and judging whether the value of the window process is in the range of the system process; determining that the window process is not one of the system processes if the value of the window process is not within the range of the system process.
Further, in calculating the position of the center point of the target window, and determining whether the position of the center point of the target window is located in the monitoring range, the method further includes: acquiring the area of the target window, and judging whether the area of the target window is larger than a preset area or not; and if the area of the target window is larger than the preset area, executing the step of calculating the position of the central point of the target window.
Further, the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking the target information of the target process.
In order to achieve the above object, according to another aspect of the present application, there is provided a processing apparatus of a window. The device includes: the system comprises a first judging unit, a second judging unit and a third judging unit, wherein the first judging unit is used for judging whether a target window has the characteristics of a popup advertisement or not when the target process is detected to call a computer program function so as to display the target window, and the target process is not a process in a process white list of a computer system; the first determining unit is used for determining the current pop-up protection mode of the computer system if the target window has the characteristics of the pop-up advertisement; and the first processing unit is used for processing the target window according to the current pop-up window protection mode.
Further, the first judgment unit further includes: a first determining subunit, configured to calculate a position of a center point of the target window, and determine whether the position of the center point of the target window is within a monitoring range, where the monitoring range at least includes: a display center region and a region range of a display lower right corner region, wherein the center point position is an intersection point of diagonals of the target window; a second judging subunit, configured to judge whether a window process of the target window is a system process if the center point position of the target window is located within the monitoring range; an obtaining subunit, configured to, if the window process is not the system process, capture an area of the target window by using a screenshot tool to obtain a target picture; and the third judging subunit is used for judging whether the target window has the characteristics of the popup advertisement or not according to the target picture.
Further, the first processing unit further includes: the first execution subunit is used for executing target operation on the target window if the current pop-up window protection mode is a monitoring mode; a first modifying subunit, configured to modify a parameter of the target window to hide the target window if the current pop-up window protection mode is an interception mode.
Further, the third determining subunit further includes: the calculation module is used for calculating the entropy of the pixel block of the target picture and judging whether the entropy of the pixel block of the target picture is larger than a threshold value or not; a first determining module, configured to determine that the target window meets the characteristics of the popup advertisement if the entropy of the pixel block of the target picture is greater than a threshold.
Further, the second judging subunit further includes: the acquisition module is used for acquiring the value of the window process and judging whether the value of the window process is in the range of the system process; a second determining module, configured to determine that the window process is not a system process if the value of the window process is not within the range of the system process.
Further, the first judgment unit further includes: a fourth determining subunit, configured to obtain a region area of the target window and determine whether the region area of the target window is larger than a preset area when calculating the position of the center point of the target window and determining whether the position of the center point of the target window is located in front of a monitoring range; and the execution subunit is configured to execute the step of calculating the position of the center point of the target window if the area of the region of the target window is larger than the preset area.
Further, the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking the target information of the target process.
Through the application, the following steps are adopted: when detecting that a target process calls a computer program function to display a target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; and processing the target window according to the current pop-up window protection mode, so that the problem that the normal use of a user is influenced by the pop-up window advertisement in software in the related technology is solved, and the target window is processed according to the current pop-up window protection mode by automatically identifying whether the target window has the characteristics of the pop-up window advertisement under the condition that the target window is determined to have the characteristics of the pop-up window advertisement, so that the target window with the characteristics of the pop-up window advertisement is correspondingly processed, and the influence of the pop-up window advertisement on the user is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, are included to provide a further understanding of the application, and the description of the exemplary embodiments of the application are intended to be illustrative of the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for processing a window provided according to an embodiment of the present application;
FIG. 2 is a first schematic diagram illustrating an alternative window processing method according to an embodiment of the present disclosure;
FIG. 3 is a second schematic diagram of an alternative window processing method provided in an embodiment of the present application;
FIG. 4 is a third schematic diagram illustrating an alternative window processing method according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a processing device for a window provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
an Application Programming Interface (API) may be directly understood in the present embodiment as a computer program function provided by a computer operating system. On the Windows operating system, microsoft corporation has provided rich APIs for window operations. The roles of these APIs include: creating a window, setting a location of a window, setting a style of a window, displaying or hiding a window, destroying a window, and so forth. Software developers of the Windows platform can directly call the APIs to complete a series of operations such as window creation and the like.
Entropy, proposed in 1865 by the german physicist clausius, was originally one of the state parameters of matter used to describe "energy degradation" and was widely used in thermodynamics. Since 1948, kraude-Ell Wu De, shannon introduced the concept of entropy into the process of channel communication, which is used to represent the degree of disorder of data, thereby creating an "information theory", and the "entropy" defined by Shannon is also called "information entropy". Meanwhile, shannon provides a calculation formula of 'information entropy'.
The present invention is described below with reference to preferred implementation steps, and fig. 1 is a flowchart of a window processing method provided in an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
step S101, when it is detected that the target process calls a computer program function to display the target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of the computer system.
For example, when the compressed software (corresponding to the target process) is used to decompress the file, double-clicking the decompressed file will pop up an advertisement window (corresponding to the target window) to be displayed on the central area of the display. When detecting that the compression software pops up a window, judging the pop-up window and judging whether the window has the advertisement characteristics.
In the embodiment of the application, a computer program function (API) (application interface programming) determines whether a window has an advertisement feature when detecting that a target process calls the API to create a new window or when the calling API modifies an attribute of an existing window to be displayed on a display. By judging the pop-up window, whether the window has the advertisement characteristics or not can be determined, misoperation on the pop-up window is reduced, and meanwhile, the efficiency of processing the window is improved.
Step S102, if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system.
And if the pop-up window is judged to have the characteristics of the pop-up window advertisement, acquiring the current pop-up window protection mode of the computer system. The target window is managed according to the current pop-up window protection mode, the diversity of window processing modes is increased, and the control over the pop-up window is more reasonable.
And step S103, processing the target window according to the current pop window protection mode.
And managing the popup window according to the current popup window protection mode, wherein different popup window protection modes have different processing operations on the popup window. By setting different pop-up window protection modes for the pop-up window, the window can be processed more flexibly, and the effect of conveniently and effectively managing the pop-up window is achieved.
To sum up, the window processing method provided in the embodiment of the present application, when it is detected that a target process calls a computer program function to display the target window, determines whether the target window has a feature of a pop-up window advertisement, where the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; the target window is processed according to the current pop-up window protection mode, the problem that the normal use of a user is influenced by the pop-up window advertisement in software in the related technology is solved, whether the target window has the characteristics of the pop-up window advertisement or not is automatically identified, and the target window is processed according to the current pop-up window protection mode under the condition that the target window is determined to have the characteristics of the pop-up window advertisement, so that the target window with the characteristics of the pop-up window advertisement is correspondingly processed, and the influence of the pop-up window advertisement on the user is reduced.
Optionally, in the window processing method provided in the embodiment of the present application, when it is detected that the target process calls a computer program function to display the target window, determining whether the target window has a feature of a pop-up advertisement further includes: calculating the central point position of the target window, and judging whether the central point position of the target window is positioned in a monitoring range, wherein the monitoring range at least comprises: the display comprises a display center area and an area range of a display lower right corner area, wherein the center point position is the intersection point of the diagonals of a target window; if the central point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process; if the window process is not a system process, intercepting a target window area through a screenshot tool to obtain a target picture; and judging whether the target window has the characteristics of the popup advertisement or not according to the target picture.
In this embodiment, the window process is a function of processing messages, and the system process represents a function provided by the computer system for processing messages, and receives messages for controlling window behavior. When the system process processes the window message, the system process can normally respond to a user instruction, such as normally checking or closing the window, and the situation that the window cannot be controlled similarly to the popup advertisement can not occur. The popup advertisement window modifies the method for processing window messages in the system process, so that the user cannot normally close the window or open a browser and access an advertisement page. If the window process of the target window is in the range of the system process, the window process of the window is not modified, namely the logic of the pop-up advertisement is not implanted, and the window containing the pop-up advertisement cannot be popped up, so that the window does not need to be controlled. In addition, the scheme calculates the area range of the central area and the lower right corner area of the display during initialization.
Judging whether the target window has the characteristics of the pop-up window advertisement needs to be carried out for three times, and firstly, judging whether the central point position of the target window is positioned in the area range of the central area and the lower right corner area of the display. Then, if the central point position of the target window is located in the area range of the central area and the lower right corner area of the display, continuously judging whether the window process of the target window is a system process; if the center point position of the target window is not in the area range of the center area and the lower right corner area of the display, the window is not monitored any more without carrying out the next step. Then, if the window process of the target window is not a system process, continuously judging whether the target window has the characteristics of the popup advertisement or not through the screenshot of the target window; if the windowing process for the target window is a systematic process, the window is no longer monitored.
For example, when the compressed software is used to decompress a file, double-clicking the decompressed file pops up an advertisement window to be displayed in the central area of the display. At this time, the center position of the window is obtained, i.e. the intersection point coordinates of the window diagonal are calculated. If the center position of the window is within the area range of the center area and the lower right corner area of the display, the window is judged next. It is determined whether the windowing process for the window is a systematic process. If the window was not created by a system process, the window may continue to make decisions.
Through the scheme, the popup window is judged for multiple times according to the characteristics of the popup window advertisement, whether the popup window has the advertisement characteristics is determined, the accuracy of judging whether the popup window is the popup window advertisement is improved, and the effect that a user can better control the popup window is achieved.
Optionally, in the window processing method provided in the embodiment of the present application, operating the target window according to the current pop-up window protection mode further includes: if the current pop-up window protection mode is the monitoring mode, executing target operation on the target window; and if the current pop-up window protection mode is the interception mode, modifying the parameters of the target window to hide the target window.
In the embodiment of the application, two popup protection modes are provided, namely an interception mode and a monitoring mode, and management is performed on popup windows according to the current popup protection mode of a computer system. The monitoring mode can perform various operations on the popup window, including closing, viewing the process and the like; the block mode will directly hide the pop-up window with the ad feature. Two management modes aiming at the popup window are set, so that a user can control the popup window more flexibly, and more choices are provided for the user to manage the popup window.
For example, when a user uses word software or wps software to process a document, a plurality of documents may be popped up for processing, and at this time, a monitoring mode can be selected to manage a pop-up window, so that the false alarm rate of the pop-up window is reduced; when a user uses certain free software to process files or perform other operations, the probability of popping up the pop-up window advertisement is greatly increased, so that the probability of clicking the pop-up window advertisement by mistake by the user is greatly increased, and at the moment, the user can switch to an interception model to directly hide an advertisement window, thereby reducing the loss of the pop-up window advertisement to the user.
Optionally, in the window processing method provided in the embodiment of the present application, determining whether the target window has the characteristics of a pop-up advertisement according to the target picture further includes: calculating the entropy of the pixel block of the target picture, and judging whether the entropy of the pixel block of the target picture is larger than a threshold value; and if the entropy of the pixel block of the target picture is larger than the threshold value, determining that the target window accords with the characteristics of the popup advertisement.
In the embodiment of the application, whether the pop-up window has the advertisement characteristics is judged by using the entropy of the target picture. Most pop-up advertisements use a high-saturation, multi-color picture to be displayed on the display in order to attract the attention of the user, resulting in the user's involuntary attention to the advertisements. At present, the entropy is commonly used for explaining the chaos degree of information and can express the color richness degree of a picture to a certain degree, so that the scheme judges whether a pop-up window has advertisement characteristics by using the entropy. By introducing the calculation of the entropy, whether the pop-up window has the advertisement characteristics or not is judged better, so that the obtained result is more accurate, and the influence of the pop-up window advertisement on the user is reduced.
Optionally, in the window processing method provided in this embodiment of the present application, if the center point of the target window is located within the monitoring range, determining whether the window process of the target window is a system process further includes: acquiring a value of a window process, and judging whether the value of the window process is in the range of the system process; if the value of the window process is not within the range of the system process, it is determined that the window process is not a system process.
In the embodiment of the application, the window process is a function provided by the computer system for processing messages, and the system process can normally respond to a user instruction when processing the window message. If the window process is a system process, the window instruction sent by the user can not be abnormally responded, the use of the user can not be influenced, and the window does not need to be monitored; if the window process is not the system process, the window may respond abnormally to the instruction sent by the user, and a next judgment needs to be made to determine whether the window has the advertisement characteristic. By the scheme, the window created by the system process can be directly monitored, system resources are saved to a certain extent, and the working efficiency of the scheme is improved.
Optionally, in the window processing method provided in this embodiment of the present application, after calculating the center point position of the target window, and determining whether the center point position of the target window is located in the monitoring range, the method further includes: acquiring the area of a target window, and judging whether the area of the target window is larger than a preset area or not; and if the area of the target window is larger than the preset area, executing a step of calculating the position of the center point of the target window.
In the embodiment of the application, whether the pop-up window is displayed in the display or not is judged by calculating the area of the pop-up window. By the scheme, the computer system can be prevented from processing the window which is not displayed on the display, or the computer system can be prevented from processing the window which is hidden on the display, and the resources of the computer system are saved.
Optionally, in the window processing method provided in the embodiment of the present application, the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking target information of the target process.
For example, a pop-up advertisement is popped up at the lower right corner by opening certain software, and the pop-up advertisement cannot be closed by clicking a close button, but a browser is opened to enter a certain webpage. The pop-up window advertisement can be closed in the monitoring mode; and viewing the process of creating the window, and manually closing or uninstalling the process to avoid creating more popup advertisements by the process. In another case, when a window created by opening a certain software processing picture or opening software is mistakenly recognized as having an advertisement characteristic, the process can be added into a white list, and the window created by the process for working is prevented from being shielded later.
In this embodiment, after determining that the target window has the advertisement feature, the target window may be managed in a monitoring mode using a variety of methods. Through the scheme, the advertisement popup can be closed or managed, the problem that the advertisement popup cannot be closed or managed in the prior art is solved, and the effect of better managing the popup is achieved.
To sum up, the window processing method provided in the embodiment of the present application, when it is detected that a target process calls a computer program function to display the target window, determines whether the target window has a feature of a pop-up window advertisement, where the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; the target window is processed according to the current pop-up window protection mode, the problem that the normal use of a user is influenced by the pop-up window advertisement in software in the related technology is solved, whether the target window has the characteristics of the pop-up window advertisement or not is automatically identified, and the target window is processed according to the current pop-up window protection mode under the condition that the target window is determined to have the characteristics of the pop-up window advertisement, so that the target window with the characteristics of the pop-up window advertisement is correspondingly processed, and the influence of the pop-up window advertisement on the user is reduced.
Optionally, in this embodiment, as shown in fig. 2, the initialization process of the present solution may first obtain the size of the display; then, calculating the area range of the central area and the lower right corner area of the display according to the size of the display, and subsequently judging whether the pop-up window has the advertisement characteristics; then, loading a process white list to avoid a user from shielding a useful window; and finally, setting a popup protection mode as a monitoring mode to complete initialization.
Optionally, in this embodiment, as shown in fig. 3, a process of managing a window in the present solution may first call an API by a monitoring process to create a pop-up window; after detecting that the window is created, judging whether the process belongs to a process white list or not, and avoiding shielding the window used by a user; then judging whether the window has the advertisement characteristics; and finally, managing the pop-up window according to the pop-up window protection mode, wherein if the pop-up window is in the monitoring mode, the information of the pop-up window is recorded, and if the pop-up window is in the intercepting mode, the pop-up window is hidden.
Optionally, in this embodiment, a process of determining whether the pop-up window has the advertisement feature may be as shown in fig. 4, first determining whether an area of the window is larger than a preset area, and if so, entering the next determination; judging whether the central point position of the pop-up window is located in the area range of the central area and the lower right corner area of the display or not, and if the central point position of the pop-up window is located in the area range of the central area and the lower right corner area of the display, entering the next judgment; judging whether the window process of the pop-up window is a system process, and if not, entering the next judgment; and judging whether the entropy of the screenshot of the window is greater than a preset value (M), and if the entropy of the screenshot of the window is greater than the preset value, judging that the window has the advertisement characteristics. By the scheme, whether the window has the advertisement characteristics or not is accurately judged, so that the accuracy of corresponding processing on the target window with the popup advertisement characteristics in the follow-up process is ensured, and the influence of the popup advertisement on a user is reduced.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a processing apparatus for a window, and it should be noted that the processing apparatus for a window in the embodiment of the present application may be used to execute the processing method for a window provided in the embodiment of the present application. The following describes a window processing apparatus according to an embodiment of the present application.
Fig. 5 is a schematic view of a processing device of a window according to an embodiment of the present application. As shown in fig. 5, the apparatus includes: a first judging unit 501, a first determining unit 502 and a first processing unit 503.
A first determining unit 501, configured to determine whether a target window has a characteristic of a pop-up window advertisement when it is detected that the target process calls a computer program function to display the target window, where the target process is not a process in a process white list of a computer system.
For example, when the compressed software (corresponding to the target process) is used to decompress the file, double-clicking the decompressed file will pop up an advertisement window (corresponding to the target window) to be displayed on the central area of the display. When detecting that the compression software pops up a window, the first determining unit 501 determines that the pop-up window has an advertisement feature.
In this embodiment, the first determining unit 501 determines whether a window displayed has an advertisement feature when detecting that a target process calls an API to create a new window, or when the calling API modifies an attribute of an existing window to be displayed on a display. The first judging unit 501 detects the target process in real time, so that the response to the pop-up window can be timely made, the probability of popping up the advertisement window is reduced, and the efficiency of processing the window is improved.
A first determining unit 502, configured to determine a current pop-up protection mode of the computer system if the target window has a feature of a pop-up advertisement.
If the pop-up window is judged to have the characteristics of the pop-up advertisement, the first determining unit 502 is utilized to judge the current pop-up protection mode of the computer system. The target window is managed according to the current pop-up window protection mode, the diversity of window management is increased, and the management and control of the pop-up window are more reasonable.
The first processing unit 503 is configured to perform a processing operation on the target window according to the current pop-up protection mode.
According to the current pop-up window protection mode, the first processing unit 503 is used to perform processing operation on the pop-up window, and different pop-up window protection modes have different processing operations on the pop-up window. By setting different protection modes for the pop-up window, the window can be processed more flexibly, and the effect of conveniently and effectively managing the pop-up window is achieved.
To sum up, in the window processing apparatus provided in the embodiment of the present application, when it is detected that a target process calls a computer program function to display the target window, the first determining unit 501 determines whether the target window has a feature of a pop-up window advertisement, where the target process is not a process in a process white list of a computer system; the first determining unit 502 determines a current pop-up protection mode of the computer system if the target window has the characteristics of the pop-up advertisement; the first processing unit 503 performs processing operation on the target window according to the current pop-up window protection mode, so as to solve the problem that the pop-up window advertisement in software in the related art affects the normal use of the user, and performs processing operation on the target window according to the current pop-up window protection mode by automatically identifying whether the target window has the characteristics of the pop-up window advertisement under the condition that the target window is determined to have the characteristics of the pop-up window advertisement, thereby implementing corresponding processing on the target window having the characteristics of the pop-up window advertisement, and reducing the influence of the pop-up window advertisement on the user.
Optionally, in the apparatus for processing a window provided in the embodiment of the present application, the first determining unit 501 includes: the first judging subunit is configured to calculate a center point position of the target window, and judge whether the center point position of the target window is located in a monitoring range, where the monitoring range at least includes: the display comprises a display center area and an area range of a display lower right corner area, wherein the center point position is the intersection point of the diagonals of a target window; the second judgment subunit is used for judging whether the window process of the target window is a system process or not if the central point position of the target window is located in the monitoring range; the acquisition subunit is used for intercepting a target window area through a screenshot tool to obtain a target picture if the window process is not a system process; and the third judging subunit is used for judging whether the target window has the characteristics of the popup advertisement or not according to the target picture.
Judging whether the target window has the characteristics of the pop-up window advertisement for three times, firstly, calculating the position of the central point of the target window by using a first judging subunit, and judging whether the position of the central point of the target window is positioned in the area range of the central area and the lower right corner area of the display. Then, if the central point position of the target window is located in the area range of the central area and the lower right corner area of the display, a second judgment subunit is used to continuously judge whether the window process of the target window is a system process; if the center point position of the target window is not in the area range of the center area and the lower right corner area of the display, the window is not monitored any more without carrying out the next step. Then, if the window process of the target window is not a system process, through a third judging subunit, the obtaining subunit is used for obtaining the screenshot of the window, and whether the target window has the characteristics of the pop-up window advertisement or not is continuously judged; if the windowing process for the target window is a systematic process, the window is no longer monitored.
Through the scheme, the popup window is judged for multiple times according to the characteristics of the popup window advertisement, whether the popup window has the advertisement characteristics is determined, the accuracy of judging whether the popup window is the popup window advertisement is improved, and the effect that a user can better control the popup window is achieved.
Optionally, in the apparatus for processing a window provided in the embodiment of the present application, the first processing unit 503 further includes: the first execution subunit is used for executing target operation on the target window if the current pop-up window protection mode is the monitoring mode; and the first modification subunit is used for modifying the parameter of the target window to hide the target window if the current pop-up window protection mode is the interception mode.
In the embodiment of the application, two popup protection modes are provided, namely an interception mode and a monitoring mode, and the popup is managed according to the current popup protection mode. The monitoring mode can utilize the first execution subunit to perform various operations on the popup window, including closing, viewing a process, and the like; the interception mode uses the first modification subunit to directly hide the pop-up window with the advertisement feature. By setting two management modes aiming at the popup window, a user can control the popup window more flexibly, and more choices are provided for the user.
Optionally, in the apparatus for processing a window provided in the embodiment of the present application, the third determining subunit further includes: the calculation module is used for calculating the entropy of the pixel block of the target picture and judging whether the entropy of the pixel block of the target picture is larger than a threshold value or not; the first determining module is used for determining that the target window accords with the popup advertisement characteristic if the entropy of the pixel blocks of the target picture is larger than a threshold value.
In the embodiment of the application, the entropy of the target picture is used for judging whether the pop-up window has the advertisement characteristic or not. Most pop-up advertisements use a high-saturation, multi-color picture to be displayed on the display in order to attract the attention of the user, resulting in the user's involuntary attention to the advertisements. At present, the entropy is commonly used for explaining the chaos degree of information and can express the color richness degree of a picture to a certain degree, so the scheme uses a calculation module to calculate the entropy of the picture and uses a first determination module to judge whether a pop-up window has advertisement characteristics. By introducing the calculation of the entropy, whether the pop-up window has the advertisement characteristics or not is judged better, so that the obtained result is more accurate, and the influence of the pop-up window advertisement on the user is reduced.
Optionally, in the apparatus for processing a window provided in the embodiment of the present application, the second determining subunit further includes: the judging module is used for acquiring the value of the window process and judging whether the value of the window process is in the range of the system process; and the second determining module is used for determining that the window process is not a system process if the value of the window process is not in the range of the system process.
In the embodiment of the application, the window process is a function provided by the computer system for processing messages, and the system process can normally respond to a user instruction when processing the window message. The use judging module can judge whether the window process for processing the pop-up window is modified, and if the window process is the system process, the second determining module is used for assigning a value to the process. If the system process processes the window message, the window does not generate abnormal response and does not need to be monitored; if the window message is not processed by the system process, the function method for processing the window message may be modified, and the window may generate an abnormal response to the operation of the user, so that a next judgment needs to be performed to confirm whether the window has the advertisement characteristics. By the scheme, the window created by the system process can be directly monitored, system resources are saved to a certain extent, and the working efficiency of the scheme is improved.
Optionally, in the window processing apparatus provided in this embodiment of the present application, the first determining unit 501 further includes: the fourth judging subunit is used for acquiring the area of the target window and judging whether the area of the target window is larger than the preset area; and the execution subunit is used for executing the step of calculating the position of the center point of the target window if the area of the region of the target window is larger than the preset area.
In the embodiment of the application, the area of the pop-up window is calculated by the fourth judging subunit to judge whether the window is displayed in the display. And if the window is displayed on the display, executing the step of calculating the position of the central point of the target window by the execution subunit. By the scheme, the computer system can be prevented from processing the window which is not displayed on the display, or the computer system can be prevented from processing the window which is hidden on the display, and the resources of the computer system are saved.
Optionally, in the processing apparatus for a window provided in the embodiment of the present application, the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking target information of the target process.
For example, a pop-up advertisement is popped up at the lower right corner by opening certain software, and the pop-up advertisement cannot be closed by clicking a close button, but a browser is opened to enter a certain webpage. The pop-up window advertisement can be closed in the monitoring mode; and viewing the process of creating the window, and manually closing or uninstalling the process to avoid creating more popup advertisements by the process. In another case, when a window created by opening a certain software processing picture or the opened software is mistakenly considered to have the advertisement characteristics, the process is written into a white list, and the window created by the process and used for working is prevented from being shielded later.
In this embodiment, after determining that the target window has the advertisement feature, the target window may be managed in a monitoring mode using a variety of methods. Through the scheme, the popup advertisements can be closed or managed, the problem that the popup advertisements cannot be closed or managed in the prior art is solved, and a user can better manage the popup advertisements.
The processing device of the window comprises a processor and a memory, wherein the first judging unit 501, the first determining unit 502, the first processing unit 503 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the kernel parameter is adjusted to provide a window processing method, a window processing device, a window processor and electronic equipment, so that the problem that pop-up advertisements in software in the related art influence normal use of users is solved.
The application discloses a window processing method. The method comprises the following steps: when the target process is detected to call a computer program function to display the target window, judging whether the target window has the characteristics of a pop-up window advertisement, wherein the target process is not a process in a process white list of the computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; and processing the target window according to the current pop-up window protection mode. Through the application, the problem that the popup advertisements in software influence normal use of users in the related art is solved.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium on which a program is stored, the program implementing the processing method of the window when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the processing method of a window is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: when detecting that a target process calls a computer program function to display the target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system; and processing the target window according to the current pop-up window protection mode.
The processor executes the program and further realizes the following steps: when the data copying component detects that the target process calls a computer program function to display the target window, the judging whether the target window has the characteristics of the popup advertisement further comprises the following steps: calculating the position of the central point of the target window, and judging whether the position of the central point of the target window is positioned in a monitoring range, wherein the monitoring range at least comprises: the display comprises a display center area and an area range of a display lower right corner area, wherein the center point position is the intersection point of the diagonals of a target window; if the central point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process; if the window process is not a system process, capturing a target window area through a screenshot tool to obtain a target picture; and judging whether the target window has the characteristics of the popup advertisement or not according to the target picture.
The processor executes the program and further realizes the following steps: the processing operation of the target window according to the current pop-up window protection mode through the data copying component further comprises the following steps: if the current pop-up window protection mode is the monitoring mode, executing target operation on the target window; and if the current pop-up window protection mode is the interception mode, modifying the parameters of the target window to hide the target window.
The processor executes the program and further realizes the following steps: through the data replication component, according to the target picture, the characteristic of judging whether the target window has the popup advertisement further comprises: calculating the entropy of the pixel block of the target picture, and judging whether the entropy of the pixel block of the target picture is larger than a threshold value; and if the entropy of the pixel block of the target picture is larger than the threshold value, determining that the target window accords with the characteristics of the popup advertisement.
The processor executes the program and further realizes the following steps: through the data copying component, if the central point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process further comprises the following steps: acquiring a value of a window process, and judging whether the value of the window process is in the range of the system process; if the value of the window process is not within the range of the system process, it is determined that the window process is not a system process.
The processor executes the program and further realizes the following steps: through the data copying component, calculating the center point position of the target window, and judging whether the center point position of the target window is positioned in front of the monitoring range, the method further comprises the following steps: acquiring the area of a target window, and judging whether the area of the target window is larger than a preset area or not; and if the area of the target window is larger than the preset area, executing a step of calculating the position of the center point of the target window.
The processor executes the program and further realizes the following steps: by the data replication component, the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking target information of the target process. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application also provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: when detecting that a target process calls a computer program function to display the target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system; if the target window has the characteristics of the pop-up window advertisement, determining the current pop-up window protection mode of the computer system; and processing the target window according to the current pop-up window protection mode.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: when it is detected that the target process calls a computer program function to display the target window, the step of judging whether the target window has the characteristics of the popup advertisement further comprises the following steps: calculating the position of the central point of the target window, and judging whether the position of the central point of the target window is positioned in a monitoring range, wherein the monitoring range at least comprises: the display comprises a display center area and an area range of a display lower right corner area, wherein the center point position is the intersection point of the diagonals of a target window; if the central point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process; if the window process is not a system process, intercepting a target window area through a screenshot tool to obtain a target picture; and judging whether the target window has the characteristics of the popup advertisement or not according to the target picture.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: the processing operation of the target window according to the current pop-up window protection mode further comprises: if the current pop-up window protection mode is the monitoring mode, executing target operation on the target window; and if the current pop-up window protection mode is the interception mode, modifying the parameters of the target window to hide the target window.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: according to the target picture, the characteristic of judging whether the target window has the popup advertisement further comprises the following steps: calculating the entropy of the pixel block of the target picture, and judging whether the entropy of the pixel block of the target picture is larger than a threshold value; and if the entropy of the pixel block of the target picture is larger than the threshold value, determining that the target window accords with the characteristics of the popup advertisement.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: if the center point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process further comprises: acquiring a value of a window process, and judging whether the value of the window process is in the range of the system process; if the value of the window process is not within the range of the system process, it is determined that the window process is not a system process.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: calculating the position of the central point of the target window, and judging whether the position of the central point of the target window is positioned in front of the monitoring range, wherein the method further comprises the following steps: acquiring the area of a target window, and judging whether the area of the target window is larger than a preset area or not; and if the area of the target window is larger than the preset area, executing the step of calculating the position of the central point of the target window.
When executed on a data processing device, is further adapted to perform a procedure for initializing the following method steps: the target operation is at least one of: displaying, hiding or closing the target window; bringing the target process into a process white list; and opening a folder where the target process is located, and checking target information of the target process.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for processing a window, comprising:
when detecting that a target process calls a computer program function to display a target window, judging whether the target window has the characteristics of a popup advertisement, wherein the target process is not a process in a process white list of a computer system;
if the target window has the characteristics of the popup advertisement, determining the current popup protection mode of the computer system;
and processing the target window according to the current pop-up window protection mode.
2. The method of claim 1, wherein determining whether the target window has a pop-up advertisement feature upon detecting that the target process calls a computer program function to display the target window further comprises:
calculating the central point position of the target window, and judging whether the central point position of the target window is located in a monitoring range, wherein the monitoring range at least comprises: a display center region and a region range of a display lower right corner region, wherein the center point position is an intersection point of diagonals of the target window;
if the center point position of the target window is located in the monitoring range, judging whether the window process of the target window is a system process;
if the window process is not the system process, intercepting the area of the target window through a screenshot tool to obtain a target picture;
and judging whether the target window has the characteristics of a popup advertisement or not according to the target picture.
3. The method of claim 1, wherein processing the target window according to the current pop-up protection mode further comprises:
if the current pop-up window protection mode is the monitoring mode, executing target operation on the target window;
and if the current pop-up window protection mode is the interception mode, modifying the parameters of the target window to hide the target window.
4. The method of claim 2, wherein determining whether the target window has a pop-up advertisement feature according to the target picture further comprises:
calculating the entropy of the pixel block of the target picture, and judging whether the entropy of the pixel block of the target picture is larger than a threshold value;
and if the entropy of the pixel block of the target picture is larger than the threshold value, determining that the target window accords with the characteristics of the popup advertisement.
5. The method of claim 2, wherein if the center point of the target window is located within the monitoring range, determining whether the window process of the target window is a system process further comprises:
acquiring the value of the window process, and judging whether the value of the window process is in the range of the system process;
determining that the window process is not one of the system processes if the value of the window process is not within the range of the system process.
6. The method of claim 2, wherein before calculating the position of the center point of the target window and determining whether the position of the center point of the target window is within the monitoring range, the method further comprises:
acquiring the area of the target window, and judging whether the area of the target window is larger than a preset area or not;
and if the area of the target window is larger than the preset area, executing the step of calculating the position of the central point of the target window.
7. The method of claim 3, wherein the target operation is at least one of: displaying, hiding or closing the target window; incorporating the target process into a process white list; and opening a folder where the target process is located, and checking the target information of the target process.
8. A device for processing a window, comprising:
the system comprises a first judging unit, a second judging unit and a third judging unit, wherein the first judging unit is used for judging whether a target window has the characteristics of a popup advertisement or not when the target process is detected to call a computer program function so as to display the target window, and the target process is not a process in a process white list of a computer system;
the first determining unit is used for determining the current pop-up protection mode of the computer system if the target window has the characteristics of the pop-up advertisement;
and the first processing unit is used for processing the target window according to the current pop-up window protection mode.
9. A processor, configured to execute a program, wherein the program executes a method for processing a window according to any one of claims 1 to 7.
10. An electronic device, comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of processing a window of any of claims 1-7.
CN202211413595.4A 2022-11-11 2022-11-11 Window processing method and device, processor and electronic equipment Pending CN115688102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211413595.4A CN115688102A (en) 2022-11-11 2022-11-11 Window processing method and device, processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211413595.4A CN115688102A (en) 2022-11-11 2022-11-11 Window processing method and device, processor and electronic equipment

Publications (1)

Publication Number Publication Date
CN115688102A true CN115688102A (en) 2023-02-03

Family

ID=85051976

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211413595.4A Pending CN115688102A (en) 2022-11-11 2022-11-11 Window processing method and device, processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN115688102A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116311209A (en) * 2023-03-28 2023-06-23 北京匠数科技有限公司 Window detection system method and system and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116311209A (en) * 2023-03-28 2023-06-23 北京匠数科技有限公司 Window detection system method and system and electronic equipment
CN116311209B (en) * 2023-03-28 2024-01-19 北京匠数科技有限公司 Window detection method, system and electronic equipment

Similar Documents

Publication Publication Date Title
US10701030B2 (en) Real-time monitoring of web page code
CN109976821B (en) Application program loading method and device, terminal and storage medium
CN110826071B (en) Software vulnerability risk prediction method, device, equipment and storage medium
US20170324859A1 (en) Information processing method, terminal, and computer-readable storage medium
KR101803890B1 (en) Method and Apparatus for Detecting Evasive Malware
CN105955802B (en) Application running method of mobile terminal and mobile terminal
CN108829371B (en) Interface control method and device, storage medium and electronic equipment
US12013929B2 (en) Stack pivot exploit detection and mitigation
WO2015200618A1 (en) Light dismiss manager
CN105279431B (en) Method, device and system for recording operation information in mobile equipment
CN105094791A (en) Status bar notification storage method and status bar notification storage device
CN109857964B (en) Thermodynamic diagram drawing method and device for page operation, storage medium and processor
CN115688102A (en) Window processing method and device, processor and electronic equipment
CN106155870B (en) Terminal optimization processing method and device and terminal
CN110858242A (en) Page skipping method and device
CN110868347A (en) Message prompting method, device and system
CN110837465A (en) Android-based handle leakage detection method and system
CN107729107B (en) Modal dialog box processing method and device
CN113395234B (en) Method and device for detecting flow hijacking of popularization information
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN109766692B (en) Method and device for judging privacy calling rationality and machine-readable storage medium
CN107103242B (en) Data acquisition method and device
CN113836216A (en) Data display method and device, storage medium and electronic equipment
CN108228307B (en) Application display method and device, storage medium and electronic equipment
CN109783156B (en) Application starting control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination