CN113900750A - Method and device for determining window interface boundary, storage medium and electronic equipment - Google Patents

Method and device for determining window interface boundary, storage medium and electronic equipment Download PDF

Info

Publication number
CN113900750A
CN113900750A CN202111131346.1A CN202111131346A CN113900750A CN 113900750 A CN113900750 A CN 113900750A CN 202111131346 A CN202111131346 A CN 202111131346A CN 113900750 A CN113900750 A CN 113900750A
Authority
CN
China
Prior art keywords
point
window interface
boundary
window
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111131346.1A
Other languages
Chinese (zh)
Other versions
CN113900750B (en
Inventor
陈潼升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baohaowan Technology Co Ltd
Original Assignee
Zhuhai Baohaowan Technology 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 Zhuhai Baohaowan Technology Co Ltd filed Critical Zhuhai Baohaowan Technology Co Ltd
Priority to CN202111131346.1A priority Critical patent/CN113900750B/en
Publication of CN113900750A publication Critical patent/CN113900750A/en
Application granted granted Critical
Publication of CN113900750B publication Critical patent/CN113900750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

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

Abstract

One or more embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for determining a window interface boundary, where the method for determining a window interface boundary includes: acquiring a non-dominant region corresponding to a currently displayed window interface in a display unit; the non-dominant region is a region actually occupied by the window interface on the display unit; searching a point on the window interface in the non-dominant region as a first point; and searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point. The embodiment of the invention can effectively determine the boundary of the window interface.

Description

Method and device for determining window interface boundary, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and an apparatus for determining a window interface boundary, a storage medium, and an electronic device.
Background
Currently, an operating system provides an Application Programming Interface (API) for acquiring a rectangular position of a window, but the API cannot acquire an accurate position of a window under special conditions such as a special-shaped window with a transparent property and a window portion being blocked, for example, some windows implemented based on directou (drawing directly on a parent window) are entirely transparent windows of a full screen, but only a small window in a lower right corner is really visible to a user, which results in that the position of the window cannot be accurately located.
Disclosure of Invention
In view of the above, one or more embodiments of the present invention provide a method, an apparatus, a storage medium, and an electronic device for determining a window interface boundary, so as to accurately locate a position of a window.
One or more embodiments of the present invention provide a method for determining a window interface boundary, including: acquiring a non-dominant region corresponding to a currently displayed window interface in a display unit; the non-dominant region is a region actually occupied by the window interface on the display unit; searching a point on the window interface in the non-dominant region as a first point; and searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point.
Optionally, the method further includes: searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then determining whether the window interface belongs to an advertisement window or not according to the boundary of the window interface; and if the window interface belongs to the advertisement window, closing the window interface.
Optionally, finding a point on the window interface in the non-dominant region includes: searching points on the window interface by taking the non-dominant region as a target search region; responding to the situation that the point on the window interface is not found in the target search area, after the target search area is subjected to secondary differentiation, taking the area obtained after the secondary differentiation as a new target search area to continuously find the point on the window interface, and taking the found point on the window interface as the first point.
Optionally, the method further includes: and after the area obtained after the second differentiation is used as a new target search area to continuously search the point on the window interface until the size of the point on the window interface or the target search area is found to meet the preset condition, ending the search.
Optionally, finding a point on the window interface in the non-dominant region includes: searching a target point in the non-dominant region by using a depth-first search algorithm; and judging whether the target Point is a Point on the Window interface or not through a Window From Point function.
Optionally, searching for a boundary point of the window interface in the non-explicit region with the first point as a starting point, and determining a boundary of the window interface according to the searched boundary point, including: and taking the first point as a starting point, diffusing around the first point by a dichotomy search method to search the boundary point of the window interface, and determining the boundary of the window interface according to the searched boundary point of the window interface.
Optionally, the method further includes: and after the boundary point of the window interface is searched in the non-explicit region by taking the first point as a starting point, and the boundary of the window interface is determined according to the searched boundary point, a preset window is presented at a preset position of the window interface, wherein the type information of the window interface and/or a control for closing the window interface are displayed in the preset window.
Optionally, the method further includes: and after the boundary point of the window interface is searched in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then carrying out screenshot on the window interface according to the boundary of the window interface.
One or more embodiments of the present invention also provide an apparatus for determining a window interface boundary, including: the acquisition module is configured to acquire a non-dominant region corresponding to a currently displayed window interface in the display unit; the non-dominant region is a region actually occupied by the window interface on the display unit; a search module configured to search for a point on the window interface within the non-dominant region as a first point; and the first determining module is configured to search the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, and determine the boundary of the window interface according to the searched boundary point.
Optionally, the apparatus further comprises: a second determining module, configured to find a boundary point of the window interface in the non-explicit region with the first point as a starting point, determine a boundary of the window interface according to the found boundary point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface; and if the window interface belongs to the advertisement window, closing the window interface.
Optionally, the search module is specifically configured to: searching points on the window interface by taking the non-dominant region as a target search region; responding to the situation that the point on the window interface is not found in the target search area, after the target search area is subjected to secondary differentiation, taking the area obtained after the secondary differentiation as a new target search area to continuously find the point on the window interface, and taking the found point on the window interface as the first point.
Optionally, the apparatus further comprises: and the search ending module is configured to continue searching for the point on the window interface by taking the area obtained after the second differentiation as a new target search area until the size of the point on the window interface or the target search area is found to meet a preset condition, and ending the search.
Optionally, the search module is specifically configured to: searching a target point in the non-dominant region by using a depth-first search algorithm; and judging whether the target Point is a Point on the Window interface or not through a Window From Point function.
Optionally, the first determining module is specifically configured to: and taking the first point as a starting point, diffusing around the first point by a dichotomy search method to search the boundary point of the window interface, and determining the boundary of the window interface according to the searched boundary point of the window interface.
Optionally, the apparatus further comprises: and the presenting module is configured to find the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, and present a preset window at a preset position of the window interface after determining the boundary of the window interface according to the found boundary point, wherein the type information of the window interface and/or a control for closing the window interface are displayed in the preset window.
Optionally, the apparatus further comprises: and the screenshot module is configured to search the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, determine the boundary of the window interface according to the searched boundary point, and then screenshot the window interface according to the boundary of the window interface.
One or more embodiments of the present invention provide an electronic device including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing any one of the above methods for determining the boundary of the window interface.
One or more embodiments of the invention provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform any of the above methods of determining a window interface boundary.
The method, the device, the storage medium and the electronic equipment for determining the window interface boundary in one or more embodiments of the present invention obtain a non-linear region corresponding to a currently displayed window interface in a display unit, search a point on the window interface in the non-linear region as a first point, further search a boundary point of the window interface with the first point as a starting point, determine the window interface boundary according to the point on the window interface boundary, and can effectively determine the position of the window interface.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method for determining a window interface boundary in accordance with one or more embodiments of the invention;
FIG. 2 is a schematic diagram illustrating a window interface including an invisible window in accordance with one or more embodiments of the invention;
FIG. 3 is a diagram illustrating a lookup of a multi-way tree in accordance with one or more embodiments of the invention;
FIG. 4 is a schematic diagram illustrating a find window interface boundary in accordance with one or more embodiments of the invention;
FIG. 5 is a schematic diagram illustrating an apparatus for determining a boundary of a window interface in accordance with one or more embodiments of the invention;
fig. 6 is a schematic structural diagram of an electronic device according to one or more embodiments of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and 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 invention.
FIG. 1 is a flow diagram illustrating a method for determining a window interface boundary, according to one or more embodiments of the invention, as shown in FIG. 1, the method including:
step 101: acquiring a non-dominant region corresponding to a currently displayed window interface in a display unit; the non-dominant region is a region actually occupied by the window interface on the display unit;
the currently displayed window interface may refer to a window interface displayed to a user in a pop-up manner on the user interface, and in some scenarios, such a window interface may include a large, e.g., full-screen, invisible window, which has a transparent property, e.g., is a transparent window that is invisible to the user, and the window portion visible to the user is only a small window in the lower right corner of the entire transparent window. The example is illustrated in fig. 2, where area 21 represents a small window visible to the user and area 22 represents a transparent window not visible to the user. In this case, before step 101, a request may be made to the system to acquire window information, and then the system may return the position information of the invisible window, for example, may return the position coordinates of the invisible window, and may determine the coverage area corresponding to the currently displayed window interface according to the position coordinates.
The currently displayed window interface may be any form of pop-up window, for example. The window interface may include an invisible window whose occupied area exceeds the window interface itself, in this case, the area corresponding to the window interface is the area occupied by the invisible window interface included in the window interface, the window position information may be, for example, a position coordinate of the invisible window, and the area occupied by the invisible window may be calculated according to the position coordinate. In addition, the window interface may also include only the window interface itself, in this case, the area corresponding to the window interface is the area occupied by the window interface itself, and the window position information may be the position coordinate of the window interface, and the area corresponding to the window interface may be calculated according to the position coordinate.
Step 102: searching a point on the window interface in the non-dominant region as a first point;
taking the example that the window interface includes an invisible window, as shown in fig. 2, the area occupied by the invisible window is illustrated by a graph 22 shown in fig. 2, the window interface is illustrated by a graph 21 shown in fig. 2, and the first point on the window interface may be any point on the graph 21, for example.
In step 102, a depth-first search algorithm or a breadth-first search algorithm may be used to search any point on the window interface in a coverage area corresponding to the window interface, where when determining whether the searched point is a point on the window interface, a hwnd (window From point) function may be used to determine a window handle of the detected coordinate point, so as to determine whether the detected coordinate point is a coordinate point in the window interface, and if the window handle of the detected coordinate point is a window interface handle, the searched coordinate point is determined to be a point on the window interface. HWND is a computer function that functions to obtain a handle to a window containing a specified point.
Step 103: and searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point.
Through the step 103, an arbitrary point on the window interface may be found as the first point, and fig. 3 exemplarily shows that the first point on the window interface may be found, and the point on the window interface boundary may be found in each direction of the first point by the first point to determine the position of the window interface boundary. After the position of the window interface boundary is determined, the size of the window interface can be determined, and whether the window interface is an advertisement window can be further determined according to the position and/or the size of the window interface.
The method for determining the window interface boundary in one or more embodiments of the present invention obtains a non-linear region corresponding to a currently displayed window interface in a display unit, searches for a point on the window interface in the non-linear region as a first point, further searches for a boundary point of the window interface with the first point as a starting point, determines the window interface boundary according to the point on the window interface boundary, and can effectively determine the position of the window interface.
In one or more embodiments of the present invention, the method of determining a window interface boundary may further include: the method further comprises the following steps: searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then determining whether the window interface belongs to an advertisement window or not according to the boundary of the window interface; and if the window interface belongs to the advertisement window, closing the window interface. Optionally, the system may preset a condition that the window interface belonging to the advertisement window needs to satisfy, for example, the system may preset a condition that the size that the advertisement window needs to satisfy and/or the position of the advertisement window needs to satisfy, so after the boundary of the window interface is found, whether the window interface belongs to the advertisement window may be determined according to the coordinate points on the boundary of the window interface, still taking the rectangular window as an example, and according to the coordinate points of four vertices of the rectangular window, whether the position of the rectangular window and/or the size of the rectangular window meets the condition of the advertisement window. Therefore, the popup is convenient to classify, and the corresponding treatment is carried out on the popup according to the classification of the popup, so that the disturbance of the advertisement popup to a user is reduced as much as possible.
In one or more embodiments of the present invention, finding a point on the window interface within the non-dominant region as a first point may include:
searching points on the window interface by taking the non-dominant region as a target search region;
responding to the situation that the point on the window interface is not found in the target search area, after the target search area is subjected to secondary differentiation, taking the area obtained after the secondary differentiation as a new target search area to continuously find the point on the window interface, and taking the found point on the window interface as the first point.
In one or more embodiments of the present invention, the method of determining a window interface boundary may further include:
and after the area obtained after the second differentiation is used as a new target search area to continuously search the point on the window interface until the size of the point on the window interface or the target search area is found to meet the preset condition, ending the search.
For example, a depth-first search algorithm may be used to search for any point on the window interface, and in the search process, if the window interface is not hit by each search, the search area (i.e., the target search area) is binary-divided, and then the search is continued until a hit point (any point on the window interface) is found. The search process may be embodied as a search multi-branch tree diagram, for example, as shown in the search multi-branch tree in fig. 3, from top to bottom in fig. 3, a process of searching for any point in the window interface is divided into two, where the top layer in fig. 3 is used to indicate that any point on the window interface is not found in the area corresponding to the window interface, the area is divided into two, the four graphs in the second layer are sequentially used to indicate that any point in the window interface is not found again in the divided area, each area obtained by the last division is continued to be divided twice, and the rest layers are sequentially analogized until any point in the line of the window interface or the length or width of the rectangular area obtained by the division is found to be not greater than the set threshold.
In the process of searching any point on the window interface, if a hit point is found, the search is quitted, and the recursive search is not continued, or if the length or width of a rectangular region (which is an example of the target search region) to be searched is smaller than the maximum limit value, that is, the size of the target search region meets the preset condition, the search is also quitted, and the recursive search is not continued. Therefore, the searching process can be optimized, and the searching efficiency is improved.
In one or more embodiments of the invention, finding a point on the window interface within the non-dominant region may include:
searching a target point in the non-dominant region by using a depth-first search algorithm;
and judging whether the target Point is a Point on the Window interface or not through a Window From Point function. For example, a depth-first search algorithm may be used to search for a Point in a coverage area corresponding to the Window interface, the searched Point is used as a target Point, and then a Window From Point function is used to determine whether the target Point is a Point on the Window interface, if the target Point is not a Point on the Window interface, the target search area may be subjected to binary differentiation, and the search for the next target Point may be continued. The target point is searched by using a depth-first search algorithm, so that the search efficiency can be improved.
In one or more embodiments of the present invention, searching for a boundary point of the window interface in the non-explicit region using the first point as a starting point, and determining a boundary of the window interface according to the searched boundary point may include:
and taking the first point as a starting point, diffusing around the first point by a dichotomy search method to search the boundary point of the window interface, and determining the boundary of the window interface according to the searched boundary point of the window interface. Taking fig. 4 as an example, the area 21 is an invisible window area, the area 22 is a window interface area, and the point 41 is an example of a first point, and as shown by an arrow in fig. 4, the boundary points of the search window interface may be diffused in four directions of the first starting point by using a depth search algorithm with the first point as a starting point, and when the boundary points of the window interface are determined not to be searched each time, the area searched each time is divided by using a binary search method, and then the search is continued. When judging whether the searched point is the boundary point of the window interface, the boundary point of the window interface can be determined through the relation between the coordinates of the two adjacent searched points. For example, two adjacent coordinate points are found as S1 and S2, and if it is determined by the Window From Point function that the S1 coordinate Point is not the boundary Point of the Window interface and that S2 is the boundary Point of the Window interface, it is determined that S1 is the boundary Point of the Window interface. After the boundary point of the window interface is found, the position and size of the window interface can be determined according to the coordinates of the boundary point of the window interface, and after four vertices of the rectangular window are found, the position and size of the rectangular window can be determined according to the coordinates of the four vertices of the rectangular window, taking the rectangular window as an example.
In one or more embodiments of the present invention, the method of determining a window interface boundary may further include:
and searching the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, and after determining the boundary of the window interface according to the searched boundary point, presenting a preset window at a preset position of the window interface, wherein the type information of the window interface and/or a control for closing the window interface are displayed in the preset window. As described above, after the boundary points of the window interface are found, the position of the window interface can be determined. In order to facilitate accurate indication of the position of the window interface, for example, a preset window may be displayed on the top of the window interface (which is an example of the preset position), and prompt information indicating whether the current window interface is an advertisement window (which is an example of the type information of the window interface) may be displayed in the preset window, or a control for closing the window interface may be further presented in the preset window, and if the user clicks the control for closing the window interface, the window interface may be closed, and the window interface is no longer displayed. The preset window is presented at the appointed position of the window interface, so that the user can conveniently know the type of the currently displayed window interface, the user can conveniently close the window interface, the user operation is facilitated, and unnecessary disturbance of the window interface to the user is avoided.
In one or more embodiments of the present invention, the method of determining a window interface boundary may further include: and after the boundary point of the window interface is searched in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then carrying out screenshot on the window interface according to the boundary of the window interface. After the boundary of the window interface is determined, the actual position of the window interface can be obtained, on the basis, screenshot is carried out on the window interface, and the captured image only contains the window interface. However, if the window interface is still expected to be captured and saved under the condition that the boundary of the window interface is not found, if an instruction for capturing the image based on the window interface is issued, the captured image not only includes the window interface, but also includes the content of the invisible window part corresponding to the window interface. Under the general condition, the user interface is considered to possibly relate to the user privacy, and the screenshot on the user interface is not reasonable operation, so that the screenshot on the window interface is performed after the boundary of the window interface is determined, and the screenshot on the window interface popped up by the system can be stored on the basis of protecting the user privacy, so that the user does not need to pay attention to the popup window in real time, the user can conveniently check the specific content of the popup window in idle time, and the user experience is improved.
Fig. 5 is a schematic structural diagram of an apparatus for determining a window interface boundary according to one or more embodiments of the present invention, and as shown in fig. 5, the apparatus 50 includes:
an obtaining module 51 configured to obtain a non-dominant region corresponding to a currently displayed window interface in a display unit; the non-dominant region is a region actually occupied by the window interface on the display unit;
a search module 52 configured to search for a point on the window interface within the non-dominant region as a first point;
a first determining module 53, configured to find boundary points of the window interface in the non-explicit region with the first point as a starting point, and determine a boundary of the window interface according to the found boundary points.
In one or more embodiments of the invention, the apparatus further comprises:
a second determining module, configured to find a boundary point of the window interface in the non-explicit region with the first point as a starting point, determine a boundary of the window interface according to the found boundary point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface;
and if the window interface belongs to the advertisement window, closing the window interface.
In one or more embodiments of the present invention, the lookup module is specifically configured to:
searching points on the window interface by taking the non-dominant region as a target search region;
responding to the situation that the point on the window interface is not found in the target search area, after the target search area is subjected to secondary differentiation, taking the area obtained after the secondary differentiation as a new target search area to continuously find the point on the window interface, and taking the found point on the window interface as the first point.
In one or more embodiments of the present invention, the means for determining the window interface boundary may further include: and the search ending module is configured to continue searching for the point on the window interface by taking the area obtained after the second differentiation as a new target search area until the size of the point on the window interface or the target search area is found to meet a preset condition, and ending the search.
In one or more embodiments of the present invention, the lookup module may be specifically configured to:
searching a target point in the non-dominant region by using a depth-first search algorithm;
and judging whether the target Point is a Point on the Window interface or not through a Window From Point function.
In one or more embodiments of the present invention, the first determining module may be specifically configured to: and taking the first point as a starting point, diffusing around the first point by a dichotomy search method to search the boundary point of the window interface, and determining the boundary of the window interface according to the searched boundary point of the window interface.
In one or more embodiments of the present invention, the means for determining the window interface boundary may further include: and the presenting module is configured to find the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, and present a preset window at a preset position of the window interface after determining the boundary of the window interface according to the found boundary point, wherein the type information of the window interface and/or a control for closing the window interface are displayed in the preset window.
In one or more embodiments of the present invention, the means for determining the window interface boundary may further include: and the screenshot module is configured to search the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, determine the boundary of the window interface according to the searched boundary point, and then screenshot the window interface according to the boundary of the window interface.
One or more embodiments of the present invention also provide an electronic device including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing any one of the above methods for determining the boundary of the window interface.
One or more embodiments of the present invention also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any one of the above-described methods of determining a window interface boundary.
Accordingly, as shown in fig. 6, an electronic device provided by one or more embodiments of the present invention may include: the electronic device comprises a shell 61, a processor 62, a memory 63, a circuit board 64 and a power circuit 65, wherein the circuit board 64 is arranged inside a space enclosed by the shell 61, and the processor 62 and the memory 63 are arranged on the circuit board 64; a power supply circuit 65 for supplying power to each circuit or device of the electronic apparatus; the memory 63 is used to store executable program code; the processor 62 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 63, for executing any one of the methods for determining the boundary of the window interface provided in the foregoing embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for determining a window interface boundary, comprising:
acquiring a non-dominant region corresponding to a currently displayed window interface in a display unit; the non-dominant region is a region actually occupied by the window interface on the display unit;
searching a point on the window interface in the non-dominant region as a first point;
and searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point.
2. The method of claim 1, further comprising:
searching the boundary point of the window interface in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then determining whether the window interface belongs to an advertisement window or not according to the boundary of the window interface;
and if the window interface belongs to the advertisement window, closing the window interface.
3. The method of claim 1, wherein finding a point on the window interface within the non-dominant region as a first point comprises:
searching points on the window interface by taking the non-dominant region as a target search region;
responding to the situation that the point on the window interface is not found in the target search area, after the target search area is subjected to secondary differentiation, taking the area obtained after the secondary differentiation as a new target search area to continuously find the point on the window interface, and taking the found point on the window interface as the first point.
4. The method of claim 3, further comprising:
and after the area obtained after the second differentiation is used as a new target search area to continuously search the point on the window interface until the size of the point on the window interface or the target search area is found to meet the preset condition, ending the search.
5. The method of claim 1, wherein finding a point on the window interface within the non-dominant region comprises:
searching a target point in the non-dominant region by using a depth-first search algorithm;
and judging whether the target Point is a Point on the Window interface or not through a Window From Point function.
6. The method of claim 1, wherein searching for the boundary point of the window interface in the non-explicit region with the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point comprises:
and taking the first point as a starting point, diffusing around the first point by a dichotomy search method to search the boundary point of the window interface, and determining the boundary of the window interface according to the searched boundary point of the window interface.
7. The method of claim 1, further comprising:
and after the boundary point of the window interface is searched in the non-explicit region by taking the first point as a starting point, and the boundary of the window interface is determined according to the searched boundary point, a preset window is presented at a preset position of the window interface, wherein the type information of the window interface and/or a control for closing the window interface are displayed in the preset window.
8. The method according to any one of claims 1 to 7, further comprising:
and after the boundary point of the window interface is searched in the non-dominant region by taking the first point as a starting point, determining the boundary of the window interface according to the searched boundary point, and then carrying out screenshot on the window interface according to the boundary of the window interface.
9. An apparatus for determining a window interface boundary, comprising:
the acquisition module is configured to acquire a non-dominant region corresponding to a currently displayed window interface in the display unit; the non-dominant region is a region actually occupied by the window interface on the display unit;
a search module configured to search for a point on the window interface within the non-dominant region as a first point;
and the first determining module is configured to search the boundary point of the window interface in the non-explicit region by taking the first point as a starting point, and determine the boundary of the window interface according to the searched boundary point.
10. The apparatus of claim 9, further comprising:
a second determining module, configured to find a boundary point of the window interface in the non-explicit region with the first point as a starting point, determine a boundary of the window interface according to the found boundary point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface;
and if the window interface belongs to the advertisement window, closing the window interface.
CN202111131346.1A 2021-09-26 2021-09-26 Method and device for determining window interface boundary, storage medium and electronic equipment Active CN113900750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111131346.1A CN113900750B (en) 2021-09-26 2021-09-26 Method and device for determining window interface boundary, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111131346.1A CN113900750B (en) 2021-09-26 2021-09-26 Method and device for determining window interface boundary, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113900750A true CN113900750A (en) 2022-01-07
CN113900750B CN113900750B (en) 2024-02-23

Family

ID=79029403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111131346.1A Active CN113900750B (en) 2021-09-26 2021-09-26 Method and device for determining window interface boundary, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113900750B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101460945A (en) * 2004-09-27 2009-06-17 Bt网络解决方案有限责任公司 Method and apparatus for enhanced browsing
CN101529366A (en) * 2006-10-18 2009-09-09 微软公司 Identification and visualization of trusted user interface objects
CN102830963A (en) * 2012-06-28 2012-12-19 北京奇虎科技有限公司 Method and system for matching screenshot
CN105872710A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Video playing method, device and client
CN106293325A (en) * 2016-07-26 2017-01-04 网易(杭州)网络有限公司 The method and apparatus of automatic seeking window
CN108427633A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 The processing method and processing device of display interface
CN108563967A (en) * 2018-03-15 2018-09-21 青岛海信移动通信技术股份有限公司 A kind of screenshot method and device
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium
CN109684021A (en) * 2018-12-28 2019-04-26 北京金山安全软件有限公司 Data processing method, device and storage medium
CN110334706A (en) * 2017-06-30 2019-10-15 清华大学深圳研究生院 A kind of images steganalysis method and device
CN111046290A (en) * 2019-12-13 2020-04-21 珠海格力电器股份有限公司 Advertisement processing method and device, electronic equipment and storage medium
CN111125433A (en) * 2019-12-13 2020-05-08 珠海格力电器股份有限公司 Popup window management method and device, electronic equipment and readable storage medium
CN111597008A (en) * 2020-05-22 2020-08-28 广州酷狗计算机科技有限公司 Popup management method, popup management device, terminal and storage medium
CN112083973A (en) * 2020-09-18 2020-12-15 珠海豹趣科技有限公司 Window closing method and device, electronic equipment and storage medium
CN112800337A (en) * 2021-02-08 2021-05-14 联想(北京)有限公司 Information processing method and device, electronic equipment and computer storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101460945A (en) * 2004-09-27 2009-06-17 Bt网络解决方案有限责任公司 Method and apparatus for enhanced browsing
CN101529366A (en) * 2006-10-18 2009-09-09 微软公司 Identification and visualization of trusted user interface objects
CN102830963A (en) * 2012-06-28 2012-12-19 北京奇虎科技有限公司 Method and system for matching screenshot
CN105872710A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Video playing method, device and client
CN106293325A (en) * 2016-07-26 2017-01-04 网易(杭州)网络有限公司 The method and apparatus of automatic seeking window
CN108427633A (en) * 2017-02-15 2018-08-21 腾讯科技(深圳)有限公司 The processing method and processing device of display interface
CN110334706A (en) * 2017-06-30 2019-10-15 清华大学深圳研究生院 A kind of images steganalysis method and device
CN108563967A (en) * 2018-03-15 2018-09-21 青岛海信移动通信技术股份有限公司 A kind of screenshot method and device
CN108628657A (en) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 Pop-up processing method, device, computer equipment and storage medium
CN109684021A (en) * 2018-12-28 2019-04-26 北京金山安全软件有限公司 Data processing method, device and storage medium
CN111046290A (en) * 2019-12-13 2020-04-21 珠海格力电器股份有限公司 Advertisement processing method and device, electronic equipment and storage medium
CN111125433A (en) * 2019-12-13 2020-05-08 珠海格力电器股份有限公司 Popup window management method and device, electronic equipment and readable storage medium
CN111597008A (en) * 2020-05-22 2020-08-28 广州酷狗计算机科技有限公司 Popup management method, popup management device, terminal and storage medium
CN112083973A (en) * 2020-09-18 2020-12-15 珠海豹趣科技有限公司 Window closing method and device, electronic equipment and storage medium
CN112800337A (en) * 2021-02-08 2021-05-14 联想(北京)有限公司 Information processing method and device, electronic equipment and computer storage medium

Non-Patent Citations (11)

* Cited by examiner, † Cited by third party
Title
HE WEIGANG: "Enhancement of image edge definition by modified Quadtree sobel operator", 2016 WORLD AUTOMATION CONGRESS (WAC), 6 October 2016 (2016-10-06), pages 21 - 24 *
HOSSAIN SHAHRIAR: "ProClick: a framework for testing clickjacking attacks in web applications", ROCEEDINGS OF THE 6TH INTERNATIONAL CONFERENCE ON SECURITY OF INFORMATION AND NETWORKS, 30 November 2013 (2013-11-30), pages 144 *
PANPAN XU: "Edge bundling in information visualization", TSINGHUA SCIENCE AND TECHNOLOGY, vol. 18, no. 2, 30 April 2013 (2013-04-30), pages 145, XP055346430, DOI: 10.1109/TST.2013.6509098 *
WEN-QUAN FAN: "Image segmentation based on Blob analysis and quad-tree algorithm", 2018 IEEE 3RD ADVANCED INFORMATION TECHNOLOGY, ELECTRONIC AND AUTOMATION CONTROL CONFERENCE (IAEAC), 16 December 2018 (2018-12-16), pages 1 - 7 *
YAO‐PING: "Detecting pop‐up advertisement browser windows using support vector machines", JOURNAL OF THE CHINESE INSTITUTE OF ENGINEERS, vol. 31, 21 February 2008 (2008-02-21), pages 1189 - 1198 *
傅建明: "Chrome扩展安全", 武汉大学学报(理学版), vol. 65, no. 2, 28 February 2019 (2019-02-28), pages 111 - 125 *
卢玉婷: "基于用户角度下的手机广告检测方法研究", 信息与电脑(理论版), vol. 31, no. 20, 31 October 2019 (2019-10-31), pages 62 - 63 *
周平,赵春江,等: "基于二分法的鸡蛋图像边缘快速检测方法", 农业工程学报, vol. 26, no. 1, pages 238 - 242 *
孙冲冲: "恶意弹窗广告攻击检测技术的研究", 软件工程, vol. 20, no. 5, 31 May 2020 (2020-05-31), pages 27 - 30 *
昌晶: "体育比赛视频中标牌型广告检测方法研究", 优秀硕士电子期刊, 15 July 2018 (2018-07-15), pages 1 - 81 *
王娟: "基于改进的形态学二分法的车牌定位方法", 微计算机信息, vol. 26, no. 2, 29 February 2016 (2016-02-29), pages 181 - 183 *

Also Published As

Publication number Publication date
CN113900750B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN106325688B (en) Text processing method and device
CN104268006A (en) Keyboard and mouse script playback method and device
CN104077014A (en) Information processing method and equipment
CN108769234B (en) Application downloading method and device, storage medium and electronic equipment
CN109508189B (en) Layout template processing method and device and computer readable storage medium
CN104778194A (en) Search method and device based on touch operation
CN109978044B (en) Training data generation method and device, and model training method and device
CN104778195A (en) Terminal and touch operation-based searching method
CN112149570A (en) Multi-person living body detection method and device, electronic equipment and storage medium
US20180336243A1 (en) Image Search Method, Apparatus and Storage Medium
US9720705B2 (en) System and method of demand oriented user interface framework
CN113900750B (en) Method and device for determining window interface boundary, storage medium and electronic equipment
CN106910207B (en) Method and device for identifying local area of image and terminal equipment
CN112068947A (en) Application program entering method and device, terminal equipment and computer readable medium
CN110908570B (en) Image processing method, device, terminal and storage medium
CN104035655B (en) The method and device that control character input method is shown
CN113342684A (en) Webpage testing method, device and equipment
CN108958929B (en) Method and device for applying algorithm library, storage medium and electronic equipment
CN112597012A (en) Traversal method and device of application program, electronic equipment and storage medium
CN112749769A (en) Graphic code detection method and device, computer equipment and storage medium
CN111476462A (en) Index data processing method, device, terminal and medium
CN103870509B (en) Browser resource storage method and terminal equipment
CN112363918B (en) User interface AI automatic test method, device, equipment and storage medium
CN104239209B (en) A kind of perspective and method of testing for web system, relevant apparatus and system
CN111090374B (en) Multi-information display method, device, terminal and storage medium

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
GR01 Patent grant
GR01 Patent grant