CN111949356A - Popup window processing method and device and electronic equipment - Google Patents

Popup window processing method and device and electronic equipment Download PDF

Info

Publication number
CN111949356A
CN111949356A CN202010825070.6A CN202010825070A CN111949356A CN 111949356 A CN111949356 A CN 111949356A CN 202010825070 A CN202010825070 A CN 202010825070A CN 111949356 A CN111949356 A CN 111949356A
Authority
CN
China
Prior art keywords
window
pop
risk
popup
image
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
CN202010825070.6A
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202010825070.6A priority Critical patent/CN111949356A/en
Publication of CN111949356A publication Critical patent/CN111949356A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a popup window processing method, a popup window processing device and electronic equipment, wherein the method comprises the following steps: detecting that the pop-up window pops up, and obtaining an image of the pop-up window; determining window layout characteristics of the popup window based on the image of the popup window; carrying out feature matching on the window layout features of the pop-up window and risk window layout features in a risk feature library, wherein the risk window layout features in the risk feature library are window layout features determined based on the pop-up window sample with the risk; and if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library, identifying the popup window as the popup window with the risk. The scheme of the application can improve the reliability and accuracy of the interception risk popup window.

Description

Popup window processing method and device and electronic equipment
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a pop-up window processing method and apparatus, and an electronic device.
Background
A popup refers to a window that pops up automatically after a user accesses a website or opens an application. Such as advertisement pop-ups that pop up during the course of accessing a web page, news-like pop-ups, and game pop-ups for linked games, etc.
In many cases, the content in the popup is not of interest to the user, and thus a large number of popped-up popup may cause interference to the user, and therefore, it is necessary to identify the popup at risk of interfering with the user and perform interception. However, because the content of the pop-up window changes frequently, the pop-up window to be intercepted cannot be determined accurately and reliably in the existing pop-up window intercepting process.
Disclosure of Invention
The application provides a popup window processing method and device and electronic equipment.
The popup window processing method comprises the following steps:
detecting that a pop-up window pops up to obtain an image of the pop-up window;
determining window layout characteristics of the popup window based on the image of the popup window;
performing feature matching on the window layout features of the pop-up window and risk window layout features in a risk feature library, wherein the risk window layout features in the risk feature library are window layout features determined based on the pop-up window sample with the risk;
and if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library, identifying the popup window as the popup window with the risk.
Preferably, the determining the window layout characteristics of the pop-up window based on the image of the pop-up window includes:
performing edge detection on the image of the pop-up window, and determining at least one component forming the pop-up window;
determining a window layout feature reflecting a distribution feature of the plurality of components based on the at least one component in the image of the pop-up window.
Preferably, the determining the window layout characteristics of the pop-up window based on the image of the pop-up window includes:
and inputting the image of the pop-up window into a feature recognition model to obtain the window layout features of the pop-up window output by the feature recognition model, wherein the feature recognition model is obtained by training a plurality of pop-up window samples based on known window layout features.
Preferably, the detecting that the pop-up window pops up to obtain the image of the pop-up window includes:
detecting that a popup window pops up, and acquiring attribute characteristics of the popup window;
if the attribute characteristics of the popup window belong to the attribute characteristics in the risk attribute library, closing the popup window;
and if the attribute characteristics of the popup window do not belong to the attribute characteristics in the risk attribute library, obtaining the image of the popup window.
Preferably, after the identifying the popup window as a risk popup window, the method further includes:
closing the pop-up window;
alternatively, the first and second electrodes may be,
and outputting an interception confirmation item aiming at the popup window, closing the popup window after a confirmation interception instruction aiming at the interception confirmation item is detected, and adding the attribute characteristics of the popup window to the risk attribute library.
Preferably, the detecting that the pop-up window pops up to obtain the image of the pop-up window includes:
under the condition that the popup window is confirmed to pop up through an operating system, obtaining a window coordinate area of the popup window through the operating system;
and intercepting the image in the window coordinate area in the display interface to obtain the image of the popup window.
Preferably, the method further comprises the following steps:
and if the risk characteristic library does not have the risk window layout characteristics matched with the window layout characteristics of the popup window and the risk marking operation aiming at the popup window is detected, storing the window layout characteristics of the popup window into the risk characteristic library.
In another aspect, the present application further provides a pop-up window processing apparatus, including:
the image obtaining unit is used for detecting that the pop-up window pops up and obtaining an image of the pop-up window;
the characteristic determining unit is used for determining window layout characteristics of the popup window based on the image of the popup window;
the characteristic matching unit is used for carrying out characteristic matching on the window layout characteristics of the pop-up window and the risk window layout characteristics in a risk characteristic library, wherein the risk window layout characteristics in the risk characteristic library are window layout characteristics determined based on the pop-up window sample with the risk;
and the risk identification unit is used for identifying the popup window as the popup window with the risk if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library.
Preferably, the image obtaining unit includes:
the attribute extraction subunit is used for detecting the popup window and acquiring the attribute characteristics of the popup window;
the window processing subunit is used for closing the popup window if the attribute characteristics of the popup window belong to the attribute characteristics in the risk attribute library;
and the image obtaining subunit is used for obtaining the image of the popup window if the attribute feature of the popup window does not belong to the attribute feature in the risk attribute library.
In another aspect, the present application further provides an electronic device, including:
a processor and a memory;
wherein the processor is configured to execute the popup processing method as described in any of the above;
the memory is used for storing programs needed by the processor to perform operations.
According to the scheme, when the popup window is detected to pop up, the window layout characteristics of the popup window can be determined based on the image of the popup window. For the pop-up windows such as advertisements or games, although the contents of the pop-up windows popped up at different moments may be different, the window layouts of the same type of pop-up windows are basically the same and have low frequency of change, so that whether the pop-up window belongs to the pop-up window with the risk can be judged by performing feature matching on the window layout features of the pop-up window and the window layout features in the risk feature library, the pop-up window with the risk can be detected more reliably and comprehensively, and the reliability and the accuracy of intercepting the risk pop-up window can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating an embodiment of a pop-up window processing method provided in the present application;
FIG. 2 is a schematic view of a pop-up window provided herein;
FIG. 3 is a diagram illustrating the types of features included in the window layout features of the pop-up window shown in FIG. 2;
FIG. 4 is a schematic view of another pop-up window provided herein;
FIG. 5 is a diagram illustrating the types of features included in the window layout features of the pop-up window shown in FIG. 4;
FIG. 6 is a schematic flow chart illustrating a pop-up window processing method according to another embodiment of the present disclosure;
FIG. 7 is a diagram illustrating a pop-up window intercept confirmation output by the present application;
FIG. 8 is a schematic flow chart diagram illustrating a pop-up window processing method according to yet another embodiment of the present disclosure;
fig. 9 is a schematic structural diagram illustrating an embodiment of a pop-up window processing apparatus according to the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device provided in the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings described above, if any, 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 practiced otherwise than as specifically illustrated.
Detailed Description
The scheme of this application is applicable to and handles the popup of arbitrary type to comparatively comprehensive reliable determine the popup that has the risk, with be favorable to reliable and comprehensive interception to have the popup of risk.
The popup window refers to a window that pops up automatically during the running process of an application of the electronic device, such as the aforementioned window that pops up automatically after a user accesses a website or opens an application.
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 a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present disclosure.
Referring to fig. 1, a flowchart illustrating an embodiment of a pop-up window processing method according to the present application is shown, where the embodiment can be applied to any electronic device, for example, the electronic device can be a mobile phone, a tablet computer, a desktop computer, and the like.
The method of the embodiment may include:
s101, detecting that the pop-up window pops up, and obtaining an image of the pop-up window.
For example, whether a popup window pops up may be detected by an operating system of the electronic device.
And the popup window pops up, namely the popup window is presented to a display interface.
The manner of obtaining the image of the pop-up window can be various.
For example, in one possible case, the window position coordinate region of the popup window may be obtained by the operating system in a case where it is confirmed by the operating system that there is the popup window. Then, an image in the window position coordinate area in the display interface is intercepted, and an image of the popup window is obtained.
For example, an image of the display interface may be obtained by means of screenshot and the like, and a window image of the pop-up window may be extracted from the image of the display interface based on the window coordinate area of the pop-up window determined by the operating system. Of course, the image in the corresponding region may also be directly obtained based on the window coordinate region, so as to obtain the window image of the pop-up window.
In another possible case, when the pop-up window pops up, the image of the display interface is obtained, and then the image containing the pop-up window is extracted from the image of the display interface according to the display position feature of the pop-up window.
And the display position characteristic represents the display position of the popup window on the display interface. For example, in most cases, the pop-up window is displayed in the lower right corner of the display interface, and therefore, the setting range at the lower right of the display interface can be set as the image capture range according to the coverage area of the conventional pop-up window, so that the image is extracted from the image of the display interface based on the image capture range, and the image including the pop-up window is obtained.
Of course, there may be other ways to obtain the image of the pop-up window in practical applications, which is not limited to this.
S102, determining window layout characteristics of the popup window based on the image of the popup window.
The window layout characteristics of the pop-up window at least can reflect the components of the pop-up window and the layout mode of the components.
For example, the window of the pop-up window may be divided into a plurality of content display regions, each for displaying information content. Correspondingly, the window layout characteristics of the popup window can at least reflect the content display area and the arrangement mode of the content display area included in the popup window, and can also include information such as the attribute characteristics of each content display area.
The attribute feature of the content display area may include a block feature of the content display area itself, and may also include a content feature of content presented in the content display area. The block characteristic may be a shape and an area of the content display area. The content display area displays the content features of the content type of the content displayed by the content display area, for example, the content display area may be a content display area for displaying the content type of text, title or picture.
For ease of understanding, the description is made in conjunction with the examples of fig. 2 and 3.
Fig. 2 shows a schematic view of a pop-up window. The various content display areas in the pop-up window are indicated in fig. 2 by dashed boxes.
It can be seen that the pop-up window shown in fig. 2 includes 7 content display areas, where the 7 content display areas respectively include a title display area 201 located at the top of the pop-up window for displaying a title of the window, a text display area 202 located in the middle area of the pop-up window for displaying text content, three image display areas 203 (i.e., picture areas) distributed at the left side of the text display area 202 for displaying pictures, and two image display areas 203 distributed at the right side of the text display area 202 for displaying pictures. Meanwhile, the five image display regions on the left and right sides are similar in shape but different in area size.
Therefore, the pop-up window has 7 content display areas, and the form, size, distribution position, and the like of the 7 content display areas all belong to the window layout characteristics of the pop-up window. Of course, the contents displayed in the 7 content display areas can also be used as a part of the window layout feature of the pop-up window.
Based on the popup window shown in fig. 2, the analyzed window layout features of the popup window can be visually represented as shown in fig. 3.
As can be seen from a comparison between fig. 2 and fig. 3, the number of content display areas of the pop-up window, the specific shape, the coverage area, the displayed content category, and other attribute information of each content display block, and the window layout characteristics such as the relative position relationship (position arrangement) between the content display blocks can be visually seen from fig. 3.
For a more intuitive understanding of the window layout features of different pop-up windows, see another example, as shown in fig. 4 and 5. Fig. 4 is a schematic diagram of another pop-up window, and fig. 5 is a schematic diagram of a pop-up layout feature of the pop-up window shown in fig. 4. As can be seen, fig. 5 shows specific features of each content display area included in the popup window in fig. 4 and features such as relative position arrangement.
Comparing fig. 2 and 4, and fig. 3 and 5, it can be seen that when the pop-up windows are different, the window layout characteristics of the pop-up windows are also different.
There are many possible specific ways to determine the window layout characteristics based on the image of the pop-up window. Two possible ways are illustrated below:
in a possible implementation manner, edge detection may be performed on the image of the pop-up window, and at least one component constituting the pop-up window is determined, that is, a contour region of each component in the image of the pop-up window is obtained. Accordingly, based on the at least one component in the image of the pop-up window, a window layout feature reflecting a distribution feature of the plurality of components is determined.
The purpose of edge detection on the image is to identify points in the digital image where the brightness changes significantly, so that the components in the image of the pop-up window can be determined by edge detection, and each component is actually a component of the pop-up window. For example, as described in conjunction with the pop-up window image of fig. 2, it can be determined by examining fig. 2 that 7 components are included in fig. 2, and these 7 components are the aforementioned display content areas.
As can be seen from the foregoing examples, after each component of the pop-up window is determined from the image in the pop-up window, the window layout characteristics, such as the relative position of each component in the image and the attribute characteristics of each component, can be obtained based on the image of the pop-up window.
In yet another possible implementation manner, the present application may also train a feature recognition model for recognizing the window layout features of the pop-up window in advance. The feature recognition model can be trained by a plurality of pop-up window samples based on known window layout features.
For example, a plurality of pop-up windows marked as advertisements or game links belonging to the risk may be obtained, and the images of the pop-up windows may be used as training samples, i.e. pop-up window samples; then, the respective window layout characteristics of the plurality of pop-up window samples are marked respectively, for example, the window layout characteristics of the components and the relative position relationship of the pop-up window are marked manually. And finally, training machine learning models such as neural network models and the like by utilizing a plurality of pop-up window samples marked with window layout characteristics to obtain a characteristic recognition model. The specific process of training the machine learning model by using a plurality of pop-up window samples marked with window layout features is not limited by the application.
Correspondingly, after the image of the pop-up window is obtained, the image of the pop-up window is input into the feature recognition model, and the window layout feature of the pop-up window output by the feature recognition model is obtained. The information included in the window layout feature can be referred to in the related description of the previous embodiments, and is not described herein again.
S103, carrying out feature matching on the window layout features of the popup window and the risk window layout features in the risk feature library.
And the risk window layout characteristics in the risk characteristic library are window layout characteristics determined based on the popup window samples with risks. For example, when the pop-up window belongs to an advertisement pop-up window, the window layout feature of the pop-up window may be extracted and stored in the risk feature library, so that the risk feature library includes the advertisement pop-up window.
At least one risk window layout feature may be included in the risk feature library, and of course, most of the risk feature libraries include a plurality of risk window layout features.
As an alternative, the risk feature library may be updated at irregular time, for example, the latest risk feature library is obtained through a web server, or based on the risk popup window marked by the user, the window layout feature of the risk popup window newly added to the risk feature library, etc., which is not limited herein.
The characteristic matching between the window layout characteristic of the pop-up window and the risk window layout characteristic may be determining a similarity between the window layout characteristic of the pop-up window and the risk window layout characteristic.
And S104, if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library, identifying the popup window as the popup window with the risk.
The characteristic matching between the window layout characteristic of the pop-up window and the risk window layout characteristic may be that the similarity between the window layout characteristic of the pop-up window and the risk window layout characteristic exceeds a set threshold.
The inventor of the application finds out through research that: because the content of the popup window can be changed frequently, if the content based on the popup window can not intercept all the popup windows with risks more reliably and comprehensively. Although the variability of some attribute information of the popup window, such as the window class name and the window title, is relatively small, because the window class name and the window title of the popup window are relatively convenient to change, the window class name and the window title also can be changed frequently, so if only some attribute information of the popup window with risk, such as the window class name and the window title, is preset, once the attribute of the popup window is changed, the popup window with risk cannot be detected in time.
It can be understood that, for a pop-up window from the same website and of the same type, although the content of the pop-up window appearing at different times is different, since the window layout change of the pop-up window requires a developer to perform a complicated adjustment, the window layout characteristics of the pop-up windows belonging to the same category of the same source do not change frequently. For example, for a pop-up window from the same website that is used to present a daily news hotspot, the pop-up window popped up each day is merely a change in the content information but the window layout characteristics of the pop-up window may remain unchanged for a long time.
It can be seen that, because the window layout characteristics of a popup window are stable relative to the variability of the content in the popup window, the detection of whether the popup window belongs to a popup window with a risk based on the window layout characteristics of the popup window and the risk characteristic library can reduce the missed detection caused by the change of the attribute or the content of the popup window.
It can be understood that, after determining that the pop-up window is a risk pop-up window, the application may close the pop-up window, or perform other processing operations on the risk pop-up window, which is not limited to this.
As an optional manner, if there is no risk window layout feature matching the window layout feature of the pop-up window in the risk feature library, and when a risk marking operation for the pop-up window is detected, the window layout feature of the pop-up window is stored in the risk feature library.
For example, if the pop-up window does not belong to a window placement feature in the risk feature library, a selection box may be displayed that may be used to prompt the user whether the user wishes to pop-up the pop-up window of that type. If the user does not want to pop up the popup window, the popup window can be confirmed to be the popup window which does not want to pop up through the selection box, on the basis, the electronic equipment detects the operation, the popup window can be confirmed to be the popup window with the risk, and the window layout characteristics of the popup window are added to the risk characteristic library.
As can be seen from the above, when detecting that a pop-up window pops up, the present application determines the window layout feature of the pop-up window based on the image of the pop-up window. For the pop-up windows such as advertisements or games, although the contents of the pop-up windows popped up at different moments may be different, the window layouts of the same type of pop-up windows are basically the same and have low frequency of change, so that whether the pop-up window belongs to the pop-up window with the risk can be judged by performing feature matching on the window layout features of the pop-up window and the window layout features in the risk feature library, the pop-up window with the risk can be detected more reliably and comprehensively, and the reliability and the accuracy of intercepting the risk pop-up window can be improved.
It can be understood that, in order to be able to detect the popup window with the risk more efficiently and to be able to reduce the situation of the misidentification, the present application may further combine the window attribute of the popup window and the window layout feature of the popup window to comprehensively analyze whether the popup window belongs to the popup window with the risk.
As shown in fig. 6, which shows a schematic flowchart of another embodiment of the pop-up window processing method of the present application, the method of the present embodiment is applied to the aforementioned electronic device, and the method of the present embodiment may include:
s601, detecting that the popup window pops up, and obtaining the attribute characteristics of the popup window.
The attribute feature of the popup window refers to an attribute capable of reflecting the content feature presented by the popup window.
For example, the attribute characteristics of the pop-up window may include at least one or more of window title of the pop-up window, window class name of the pop-up window, and the like. Wherein the window class name specifies the class name of the window. Wherein the window title is text displayed on a title bar of the popup window.
The mode of obtaining the attribute feature of the pop-up window may be based on a source code of the pop-up window or obtained by analyzing an image of the pop-up window, and the application is not limited to how to obtain the attribute feature specifically.
S602, if the attribute feature of the popup window belongs to the attribute feature in the risk attribute library, closing the popup window.
If the risk characteristic library is similar, the risk attribute library stores the attribute characteristics of the popup windows with risks. For example, the determined attribute features belonging to the popup window with the risk are extracted in advance and stored in the risk attribute library. As another example, the risk attribute library may be pre-tagged with attribute features belonging to risk-presenting pop-up windows for a user of the electronic device.
It can be understood that if the attribute feature of the pop-up window belongs to the attribute feature in the risk attribute library, it indicates that the pop-up window has a risk, such as a pop-up window belonging to an advertisement class or a game recommendation class, and on this basis, in order to facilitate the pop-up window to interfere with the user, the pop-up window may be directly closed.
S603, if the attribute feature of the popup window does not belong to the attribute feature in the risk attribute library, obtaining the image of the popup window, and determining the window layout feature of the popup window based on the image of the popup window.
It should be noted that, in this embodiment, when detecting that the pop-up window pops up, only the attribute information of the pop-up window is obtained, and only when the attribute information of the pop-up window does not belong to the attribute feature in the risk attribute library, the image of the pop-up window is obtained. However, it can be understood that, in this embodiment, when detecting that the pop-up window pops up, the image of the pop-up window and the attribute information of the pop-up window are obtained, and on this basis, if the attribute feature of the pop-up window does not belong to the attribute feature in the risk attribute library, the window layout feature of the pop-up window may be determined directly based on the image of the pop-up window.
S604, carrying out feature matching on the window layout features of the popup window and the risk window layout features in the risk feature library.
And the risk window layout characteristics in the risk characteristic library are window layout characteristics determined based on the popup window samples with risks.
And S605, if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library, identifying the popup window as the popup window with the risk.
The above steps S603 to S605 can refer to the related description of the previous embodiment, and are not described herein again.
It is understood that, in the step S605, after the popup window is determined to be a risk popup window, the popup window may be closed.
In another possible implementation manner, after determining that the popup window is a popup window with a risk, an interception confirmation item for the popup window may be further output. Correspondingly, after a confirmation interception instruction aiming at the interception confirmation item is detected, the popup window is closed, and the attribute characteristics of the popup window are added to the risk attribute library.
The interception confirmation item may be an option for prompting the user whether to intercept the popup window. The confirmation interception of the interception confirmation item indicates the operation of confirmation interception input by the user for the interception confirmation item.
For example, see fig. 7, which shows a schematic diagram of the interception acknowledgement term output by the present application.
As can be seen from fig. 7, after it is determined that the pop-up window is the pop-up window with risk based on the window layout feature of the pop-up window, a dialog box is output in the present application, where the dialog box includes a prompt, and the prompt is used to prompt whether the pop-up window has risk interception. And simultaneously, two options of 'immediate interception' and 'temporary interception' are displayed in the dialog box, and if the user wants to intercept the popup window, the user can click the 'immediate interception' option. In this case, the electronic device closes the pop-up window, stores the attribute information of the pop-up window in the risk attribute library, and accordingly, if the pop-up window pops up again, based on the attribute information of the pop-up window and the risk attribute library, the pop-up window can be directly intercepted.
Therefore, under the condition that the attribute information of the popup window belongs to the risk attribute library, the popup window can be directly closed so as to intercept the popup window timely and quickly. Meanwhile, if the attribute information of the popup does not belong to the risk attribute library, whether the window layout characteristics of the popup window are matched with the risk window layout characteristics in the risk characteristic library or not can be detected, so that the popup window with the risk which cannot be detected due to the change of the attribute information such as the window class name of the popup window is reduced, and the omission of the risk popup window is reduced.
In addition, after the risk of the popup window is determined based on the window layout characteristics of the popup window, the popup window can be closed after the user confirms to intercept the popup window, and the attribute information of the popup window is added to the risk attribute library, so that the missed detection can be avoided, and the risk of mistaken identification can be reduced; and moreover, the purpose of updating the risk attribute library in time is achieved by adding the attribute information of the popup window with the risk to the risk attribute library, and even if the attribute information of the popup window changes, the attribute information in the risk attribute library can be updated in time, so that the popup window with the risk can be intercepted in time.
In order to facilitate understanding of the solution of the present application, the following description takes the attribute information of the popup window as the window class name and the window title of the popup window, and the window layout features of the popup window are the components of the popup window and the distribution features of each component as an example.
As shown in fig. 8, which shows a schematic flow chart of another embodiment of the pop-up window processing method of the present application, the method of this embodiment may include:
s801, detecting that the popup window pops up, and obtaining the window class name and the window title of the popup window.
S802, if the window class name and the window title of the popup window belong to the characteristic information in the risk attribute library, closing the popup window.
And S803, if the window class name and the window title of the popup window do not belong to the attribute characteristics in the risk attribute library, acquiring the image of the popup window.
S804, edge detection is carried out on the image of the popup window, and a plurality of components forming the popup window are determined.
S805, determining distribution characteristics of the plurality of components based on the at least one component in the image of the pop-up window, and obtaining a window layout characteristic including the plurality of components and the distribution characteristics of the plurality of components.
The present embodiment is an example of a manner of determining a window layout feature, and the present embodiment is also applicable to other manners.
And S806, performing feature matching on the window layout features of the popup window and the risk window layout features in the risk feature library.
The risk window layout characteristics in the risk characteristic library are window layout characteristics determined based on the popup window samples with risks;
s807, if there is a risk window layout feature matching the window layout feature in the risk feature library, outputting an interception confirmation item for the popup window.
S808, after the confirmation interception instruction aiming at the interception confirmation item is detected, closing the popup window, and adding the window class name and the window title of the popup window to the risk attribute library.
It can be seen that, if a certain popup window belongs to a popup window with a risk, after the window class name and the window title of the popup window are added to the risk attribute library, when it is detected that the popup window with the window class name and the window title pops up, the popup window is directly intercepted according to the risk attribute library. If the window class name and the window title of the popup window are changed after the window class name and the window title of the popup window are added into the risk attribute library, the popup window can still be intercepted as long as the window layout characteristics of the popup window are not changed because the window layout characteristics of the popup window are also stored in the risk characteristic library.
The application also provides a popup window processing device corresponding to the popup window processing method.
As shown in fig. 9, which shows a schematic structural diagram of an embodiment of a pop-up window processing apparatus according to the present application, the apparatus of the embodiment may include:
an image obtaining unit 901, configured to detect that a pop-up window pops up, and obtain an image of the pop-up window;
a feature determining unit 902, configured to determine a window layout feature of the pop-up window based on the image of the pop-up window;
a feature matching unit 903, configured to perform feature matching on the window layout features of the pop-up window and risk window layout features in a risk feature library, where the risk window layout features in the risk feature library are window layout features determined based on a pop-up window sample with a risk;
and a risk identification unit 904, configured to identify the popup window as a popup window with a risk if a risk window layout feature matching the window layout feature of the popup window exists in the risk feature library.
In one possible implementation manner, the feature determination unit includes:
the edge detection unit is used for carrying out edge detection on the image of the pop-up window and determining at least one component forming the pop-up window;
a first feature determination unit configured to determine, based on the at least one component in the image of the pop-up window, a window layout feature for reflecting a distribution feature of the plurality of components.
In another possible implementation manner, the feature determining unit includes:
and the second characteristic determining unit is used for inputting the image of the popup window into a characteristic recognition model to obtain the window layout characteristic of the popup window output by the characteristic recognition model, wherein the characteristic recognition model is obtained by training a plurality of popup window samples based on known window layout characteristics.
In one possible implementation, the image obtaining unit includes:
the area determining unit is used for obtaining a window coordinate area of the popup window through the operating system under the condition that the popup window popup is confirmed through the operating system;
and the image intercepting unit is used for intercepting the image in the window coordinate area in the display interface to obtain the image of the popup window.
In yet another possible implementation manner, the apparatus further includes:
and the characteristic adding unit is used for storing the window layout characteristics of the popup window into the risk characteristic library when the risk window layout characteristics matched with the window layout characteristics of the popup window do not exist in the risk characteristic library and the risk marking operation aiming at the popup window is detected.
In yet another possible implementation manner, the image obtaining unit includes:
the attribute extraction subunit is used for detecting the popup window and acquiring the attribute characteristics of the popup window;
the window processing subunit is used for closing the popup window if the attribute characteristics of the popup window belong to the attribute characteristics in the risk attribute library;
and the image obtaining subunit is used for obtaining the image of the popup window if the attribute feature of the popup window does not belong to the attribute feature in the risk attribute library.
Optionally, the apparatus further comprises:
the first window intercepting unit is used for closing the popup window after the risk identification unit identifies the popup window as the popup window with the risk;
alternatively, the first and second electrodes may be,
and the second window intercepting unit is used for outputting an interception confirmation item aiming at the popup window, closing the popup window after a confirmation interception instruction aiming at the interception confirmation item is detected, and adding the attribute characteristics of the popup window to the risk attribute library.
On the other hand, the application also provides an electronic device. As shown in fig. 10, which shows a schematic view of a composition structure of an electronic device according to the present application, the electronic device of the present embodiment at least includes: a processor 1001 and a memory 1002.
Wherein the processor is configured to execute the popup processing method according to any of the above embodiments.
The memory is also used for storing programs needed by the processor to perform operations.
It will be appreciated that the electronic device may also include other components, as shown in fig. 10, a display 1003, an input device 1004 to which the electronic device is connected, and a communication bus 1005. The processor, memory and display and input device may be connected by a communication bus.
Of course, the electronic device may also include more or less components than those shown in fig. 10, which is not limited in this regard.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A pop-up window processing method, comprising:
detecting that a pop-up window pops up to obtain an image of the pop-up window;
determining window layout characteristics of the popup window based on the image of the popup window;
performing feature matching on the window layout features of the pop-up window and risk window layout features in a risk feature library, wherein the risk window layout features in the risk feature library are window layout features determined based on the pop-up window sample with the risk;
and if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library, identifying the popup window as the popup window with the risk.
2. The method of claim 1, the determining window layout features for the pop-up window based on the image of the pop-up window, comprising:
performing edge detection on the image of the pop-up window, and determining at least one component forming the pop-up window;
determining a window layout feature reflecting a distribution feature of the plurality of components based on the at least one component in the image of the pop-up window.
3. The method of claim 1, the determining window layout features for the pop-up window based on the image of the pop-up window, comprising:
and inputting the image of the pop-up window into a feature recognition model to obtain the window layout features of the pop-up window output by the feature recognition model, wherein the feature recognition model is obtained by training a plurality of pop-up window samples based on known window layout features.
4. The method of claim 1, the detecting a pop-up window pop-up, obtaining an image of the pop-up window, comprising:
detecting that a popup window pops up, and acquiring attribute characteristics of the popup window;
if the attribute characteristics of the popup window belong to the attribute characteristics in the risk attribute library, closing the popup window;
and if the attribute characteristics of the popup window do not belong to the attribute characteristics in the risk attribute library, obtaining the image of the popup window.
5. The method of claim 4, further comprising, after the identifying the pop-up window as a risky pop-up window:
closing the pop-up window;
alternatively, the first and second electrodes may be,
and outputting an interception confirmation item aiming at the popup window, closing the popup window after a confirmation interception instruction aiming at the interception confirmation item is detected, and adding the attribute characteristics of the popup window to the risk attribute library.
6. The method of claim 1, the detecting a pop-up window pop-up, obtaining an image of the pop-up window, comprising:
under the condition that the popup window is confirmed to pop up through an operating system, obtaining a window coordinate area of the popup window through the operating system;
and intercepting the image in the window coordinate area in the display interface to obtain the image of the popup window.
7. The method of claim 1, further comprising:
and if the risk characteristic library does not have the risk window layout characteristics matched with the window layout characteristics of the popup window and the risk marking operation aiming at the popup window is detected, storing the window layout characteristics of the popup window into the risk characteristic library.
8. A pop-up window treatment apparatus comprising:
the image obtaining unit is used for detecting that the pop-up window pops up and obtaining an image of the pop-up window;
the characteristic determining unit is used for determining window layout characteristics of the popup window based on the image of the popup window;
the characteristic matching unit is used for carrying out characteristic matching on the window layout characteristics of the pop-up window and the risk window layout characteristics in a risk characteristic library, wherein the risk window layout characteristics in the risk characteristic library are window layout characteristics determined based on the pop-up window sample with the risk;
and the risk identification unit is used for identifying the popup window as the popup window with the risk if the risk window layout characteristics matched with the window layout characteristics of the popup window exist in the risk characteristic library.
9. The method of claim 1, the image obtaining unit, comprising:
the attribute extraction subunit is used for detecting the popup window and acquiring the attribute characteristics of the popup window;
the window processing subunit is used for closing the popup window if the attribute characteristics of the popup window belong to the attribute characteristics in the risk attribute library;
and the image obtaining subunit is used for obtaining the image of the popup window if the attribute feature of the popup window does not belong to the attribute feature in the risk attribute library.
10. An electronic device, comprising:
a processor and a memory;
wherein the processor is configured to execute the pop-window processing method according to any one of claims 1 to 7;
the memory is used for storing programs needed by the processor to perform operations.
CN202010825070.6A 2020-08-17 2020-08-17 Popup window processing method and device and electronic equipment Pending CN111949356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010825070.6A CN111949356A (en) 2020-08-17 2020-08-17 Popup window processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010825070.6A CN111949356A (en) 2020-08-17 2020-08-17 Popup window processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111949356A true CN111949356A (en) 2020-11-17

Family

ID=73343279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010825070.6A Pending CN111949356A (en) 2020-08-17 2020-08-17 Popup window processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111949356A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI765706B (en) * 2021-05-11 2022-05-21 凌華科技股份有限公司 Non-intrusive shared processing method and system for pop-up window
TWI787885B (en) * 2021-06-25 2022-12-21 凌華科技股份有限公司 Non-intrusive detection method and device for pop-up window button

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182687A (en) * 2014-08-01 2014-12-03 北京奇虎科技有限公司 Security detecting method and security detecting device for mobile terminal input window
CN104462979A (en) * 2014-12-26 2015-03-25 深圳数字电视国家工程实验室股份有限公司 Automatic dynamic detection method and device of application program
CN105303105A (en) * 2015-10-20 2016-02-03 珠海市君天电子科技有限公司 Window message interception method and device and terminal equipment
US20160164901A1 (en) * 2014-12-05 2016-06-09 Permissionbit Methods and systems for encoding computer processes for malware detection
CN106528148A (en) * 2016-11-04 2017-03-22 广东欧珀移动通信有限公司 Interface skipping method, interface skipping system and terminal equipment
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium
CN109344350A (en) * 2018-09-30 2019-02-15 珠海市君天电子科技有限公司 A kind of information processing method and its equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182687A (en) * 2014-08-01 2014-12-03 北京奇虎科技有限公司 Security detecting method and security detecting device for mobile terminal input window
US20160164901A1 (en) * 2014-12-05 2016-06-09 Permissionbit Methods and systems for encoding computer processes for malware detection
CN104462979A (en) * 2014-12-26 2015-03-25 深圳数字电视国家工程实验室股份有限公司 Automatic dynamic detection method and device of application program
CN105303105A (en) * 2015-10-20 2016-02-03 珠海市君天电子科技有限公司 Window message interception method and device and terminal equipment
CN106528148A (en) * 2016-11-04 2017-03-22 广东欧珀移动通信有限公司 Interface skipping method, interface skipping system and terminal equipment
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium
CN109344350A (en) * 2018-09-30 2019-02-15 珠海市君天电子科技有限公司 A kind of information processing method and its equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI765706B (en) * 2021-05-11 2022-05-21 凌華科技股份有限公司 Non-intrusive shared processing method and system for pop-up window
TWI787885B (en) * 2021-06-25 2022-12-21 凌華科技股份有限公司 Non-intrusive detection method and device for pop-up window button

Similar Documents

Publication Publication Date Title
CN108595583B (en) Dynamic graph page data crawling method, device, terminal and storage medium
CN107273019B (en) Collaborative gesture based input language
US10540167B2 (en) Image based method and system for building object model and application states comparison and graphic-based interoperability with an application
US20140143721A1 (en) Information processing device, information processing method, and computer program product
US20090092318A1 (en) One-screen reconciliation of business document image data, optical character recognition extracted data, and enterprise resource planning data
CN109828906B (en) UI (user interface) automatic testing method and device, electronic equipment and storage medium
WO2016101717A1 (en) Touch interaction-based search method and device
CN109784369A (en) H5 page test method and device, electronic equipment, storage medium
CN109800153A (en) Mobile application test method and device, electronic equipment, storage medium
CN111949356A (en) Popup window processing method and device and electronic equipment
US8392887B2 (en) Systems and methods for identifying graphic user-interface components
CN112308069A (en) Click test method, device, equipment and storage medium for software interface
CN110765015A (en) Method for testing application to be tested and electronic equipment
CN113657361A (en) Page abnormity detection method and device and electronic equipment
CN111355628A (en) Model training method, business recognition device and electronic device
CN108665769B (en) Network teaching method and device based on convolutional neural network
Cooley et al. Privacy-preserving screen capture: Towards closing the loop for health IT usability
CN113609028A (en) Page testing method, computing device and readable storage medium
CN115269359A (en) Terminal interface testing method and device
TWI704804B (en) Electronic apparatus and automatic advertisement closing method thereof
US20150026561A1 (en) System and method for displaying web page
CN111597936A (en) Face data set labeling method, system, terminal and medium based on deep learning
CN115687146A (en) BIOS (basic input output System) test method and device, computer equipment and storage medium
US20210286709A1 (en) Screen test apparatus and computer readable medium
CN110209242B (en) Button function binding method, button function calling method, button function binding device, button function calling device and projection control equipment

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