CN113900750B - 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
CN113900750B
CN113900750B CN202111131346.1A CN202111131346A CN113900750B CN 113900750 B CN113900750 B CN 113900750B CN 202111131346 A CN202111131346 A CN 202111131346A CN 113900750 B CN113900750 B CN 113900750B
Authority
CN
China
Prior art keywords
window interface
point
window
boundary
searching
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.)
Active
Application number
CN202111131346.1A
Other languages
Chinese (zh)
Other versions
CN113900750A (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

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

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 boundary points 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 points. 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, an apparatus, a storage medium, and an electronic device for determining a window interface boundary.
Background
Currently, an operating system provides an API (Application Programming Interface, application program interface) for acquiring rectangular positions of windows, but the application interface cannot acquire accurate positions of windows in special cases such as special windows with transparent attributes and window portions being blocked, for example, some windows realized based on DirectUI (drawing directly on a parent window) are transparent windows in whole screen, but only one small window in the right lower corner is actually visible to a user, which results in that the position of the window cannot be accurately positioned.
Disclosure of Invention
In view of this, one or more embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for determining a window interface boundary to accurately locate a position of a window.
One or more embodiments of the present invention provide a method of 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 boundary points 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 points.
Optionally, the method further comprises: searching boundary points 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 points, and determining 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, searching a point on the window interface in the non-dominant region includes: searching for points on the window interface by taking the non-dominant region as a target searching region; and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to find the point on the window interface, and taking the found point on the window interface as the first point.
Optionally, the method further comprises: and after the area obtained after the differentiation is used as a new target search area to continuously search the points on the window interface, ending the search until the points on the window interface or the size of the target search area are found to meet the preset condition.
Optionally, searching a point on the window interface in the non-dominant region includes: searching for a target point in the non-dominant region using a depth-first search algorithm; it is determined by Window From Point function whether the target point is a point on the window interface.
Optionally, searching for a boundary point of the window interface in the non-dominant region with the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point includes: and taking the first point as a starting point, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface.
Optionally, the method further comprises: and searching boundary points 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 points, and then presenting a preset window at a preset position of the window interface, wherein the preset window is displayed with type information of the window interface and/or controls for closing the window interface.
Optionally, the method further comprises: and searching boundary points 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 points, and then capturing a picture of 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 searching module configured to search for a point on the window interface as a first point in the non-dominant region; and the first determining module is configured to search the boundary point of the window interface in the non-dominant 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 includes: the second determining module is configured to search for boundary points of the window interface in the non-dominant region by taking the first point as a starting point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface after determining the boundary of the window interface according to the searched boundary points; and if the window interface belongs to the advertisement window, closing the window interface.
Optionally, the search module is specifically configured to: searching for points on the window interface by taking the non-dominant region as a target searching region; and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to find the point on the window interface, and taking the found point on the window interface as the first point.
Optionally, the apparatus further includes: and the ending searching module is configured to finish searching after continuously searching the points on the window interface by taking the area obtained after the two differentiation as a new target searching area until the points on the window interface or the size of the target searching area are found to meet the preset condition.
Optionally, the search module is specifically configured to: searching for a target point in the non-dominant region using a depth-first search algorithm; it is determined by Window From Point function whether the target point is a point on the window interface.
Optionally, the first determining module is specifically configured to: and taking the first point as a starting point, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface.
Optionally, the apparatus further includes: the presentation module is configured to search the boundary point of the window interface in the non-dominant 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 searched boundary point, wherein the preset window is displayed with the type information of the window interface and/or controls for closing the window interface.
Optionally, the apparatus further includes: and the screenshot module is configured to search the boundary point of the window interface in the non-dominant 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 surrounded by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to respective circuits or devices of the electronic apparatus; 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, for performing any one of the methods of determining window interface boundaries described above.
One or more embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform any of the methods of determining window interface boundaries described above.
According to the method, the device, the storage medium and the electronic equipment for determining the boundary of the window interface, which are disclosed by one or more embodiments of the invention, a nonlinear region corresponding to the window interface currently displayed in the display unit is obtained, then a point on the window interface is searched in the nonlinear region and used as a first point, and further the first point is used as a starting point to search the boundary point of the window interface, the boundary of the window interface is determined according to the point on the boundary of the window interface, and the position of the window interface can be effectively determined.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram illustrating a method of determining window interface boundaries in accordance with one or more embodiments of the present invention;
FIG. 2 is a schematic diagram of a window interface including an invisible window, shown in accordance with one or more embodiments of the present invention;
FIG. 3 is a schematic diagram illustrating one type of lookup multi-way tree in accordance with one or more embodiments of the present invention;
FIG. 4 is a schematic diagram of a search window interface boundary, shown in accordance with one or more embodiments of the present invention;
FIG. 5 is a schematic diagram illustrating an apparatus for determining window interface boundaries in accordance with one or more embodiments of the present invention;
fig. 6 is a schematic structural diagram of an electronic device, shown in accordance with 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 merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 is a flow diagram illustrating a method of determining window interface boundaries, as shown in FIG. 1, in accordance with one or more embodiments of the present invention, the method comprising:
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 be a window interface that is displayed to the user in a pop-up manner in the user interface, and in some scenarios, such window interface may include a larger, e.g., full-screen, invisible window, e.g., having transparent properties, that is a transparent window that is invisible to the user, with the portion of the window visible to the user having only a small window in the lower right corner of the entire transparent window. An example is illustrated in fig. 2, where region 21 represents a small window visible to the user and region 22 represents a transparent window invisible to the user. In this case, before step 101, the system may request to acquire window information, and then the system may return location information of the invisible window, for example, may return location coordinates of the invisible window, and according to the location coordinates, may determine a coverage area corresponding to the currently displayed window interface.
The currently displayed window interface may be, for example, any form of popup window. The window interface may include an invisible window whose occupied area exceeds the window interface itself, in which case, the area corresponding to the window interface is an area occupied by the invisible window interface included in the window interface, and 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 only include the window interface itself, in this case, the area corresponding to the window interface is the area occupied by the window interface itself, 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 the graph 22 shown in fig. 2, the window interface is illustrated by the 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 this step 102, any point on the window interface may be searched in the coverage area corresponding to the window interface by using a depth-first search algorithm or a breadth-first search algorithm, where when determining whether the searched point is a point on the window interface, a window handle of the detected coordinate point may be determined by using a HWND (Window From Point) function 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 the window interface handle, it is determined that the searched coordinate point is a point on the window interface. Where HWND is a computer function whose function is to obtain a handle to a window containing a specified point.
Step 103: and searching boundary points 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 points.
Through the step 103, any point on the window interface may be found as the first point, and fig. 3 illustrates that the first point on the window interface is found, and the point on the window interface boundary may be found by the first point in each direction of the first point, so as to determine the position of the window interface boundary. After determining the position of the window interface boundary, 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.
According to the method for determining the boundary of the window interface, one or more embodiments of the invention are implemented, a nonlinear region corresponding to the window interface currently displayed in the display unit is obtained, then a point on the window interface is searched in the nonlinear region and used as a first point, and further the first point is used as a starting point to search the boundary point of the window interface, the boundary of the window interface is determined according to the point on the boundary of the window interface, and the position of the window interface can be effectively determined.
In one or more embodiments of the present invention, the method of determining window interface boundaries may further comprise: the method further comprises the steps of: searching boundary points 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 points, and determining 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 conditions required to be met by the window interface belonging to the advertisement window may be preset in the system, for example, the conditions required to be met by the size of the advertisement window and/or the position of the advertisement window may be predefined in the system, 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 whether the position of the rectangular window and/or the size of the rectangular window meet the conditions of the advertisement window may be determined according to the coordinate points of four vertices of the rectangular window. Therefore, the popup windows are conveniently classified, and the popup windows are correspondingly processed according to the classification of the popup windows, so that the disturbance of the advertisement popup windows to users is reduced as much as possible.
In one or more embodiments of the present invention, searching for a point on the window interface in the non-dominant region as a first point may include:
searching for points on the window interface by taking the non-dominant region as a target searching region;
and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to 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 window interface boundaries may further comprise:
and after the area obtained after the differentiation is used as a new target search area to continuously search the points on the window interface, ending the search until the points on the window interface or the size of the target search area are found to meet the preset condition.
For example, a depth-first search algorithm may be used to search for any point on the window interface, and during the search, if each search does not hit the window interface, the search area (i.e., the target search area) is subjected to the dichotomy, and then the search is continued until the hit point (any point on the window interface) is found. The searching process may be represented as a multi-tree searching chart, as shown in the multi-tree searching chart in fig. 3, in the process of searching any point in the window interface from top to bottom in fig. 3, the target searching area is divided into two parts, wherein the uppermost layer in fig. 3 is used for indicating that any point on the window interface is not searched in the area corresponding to the window interface, the area is divided into two parts, four graphs of the second layer are sequentially used for indicating that any point in the window interface is not searched again in the divided area, then the areas obtained by the previous division are continuously subjected to secondary operation, and the other layers are sequentially analogized until the length or the width of any point of the window interface row or the rectangular area obtained by the division is not greater than a set threshold value.
In the process of searching any point on the window interface, if the hit point is searched, the search is stopped, the recursive search is not continued, or if the length or width of a rectangular area (which is an example of the target search area) to be searched is smaller than a maximum limiting value, that is, the size of the target search area meets a preset condition, the search is stopped, and the recursive search is not continued. Thus, the searching process can be optimized, and the searching efficiency is improved.
In one or more embodiments of the present invention, searching for a point on the window interface within the non-dominant region may include:
searching for a target point in the non-dominant region using a depth-first search algorithm;
it is determined by Window From Point function whether the target point is a point on the window interface. For example, a depth-first search algorithm may be used to search for points in the coverage area corresponding to the window interface, the searched points are used as target points, and a Window From Point function is used to determine whether the target points are points on the window interface, and if the target points are not points on the window interface, the target search area may be subjected to dichotomy, and the search of the next target point may be continued. The target point is searched by utilizing a depth-first search algorithm, so that the searching 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 area using the first point as a starting point, and determining the boundary of the window interface according to the searched boundary point may include:
and taking the first point as a starting point, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface. Taking the example shown in fig. 4 as an example, the area 421 is an area of an invisible window, the area 422 is an area of a window interface, the point 41 is an example of a first point, as shown by an arrow in fig. 4, the first point may be used as a starting point, boundary points of the window interface may be searched for in four directions of the first starting point by using a depth search algorithm, and when determining that the boundary points of the window interface are not searched for each time, the search may be continued after differentiating the area searched for each time by using a binary search method. 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 searched relation between the coordinates of two adjacent points. For example, if two adjacent coordinate points are S1 and S2, and if it is determined by the Window From Point function that the S1 coordinate point is not a boundary point of the window interface and the S2 coordinate point is a boundary point of the window interface, it can be determined that S1 is a boundary point of the window interface. After the boundary points of the window interface are found, the position and the size of the window interface can be determined according to the coordinates of the boundary points of the window interface, and for example, the position and the size of the rectangular window can be determined according to the coordinates of four vertexes of the rectangular window after the four vertexes of the rectangular window are found.
In one or more embodiments of the present invention, the method of determining window interface boundaries may further comprise:
and searching boundary points of the window interface in the non-dominant region by taking the first point as a starting point, and after determining the boundary of the window interface according to the searched boundary points, presenting a preset window at a preset position of the window interface, wherein the preset window is displayed with type information of the window interface and/or controls for closing the window interface. As described above, after the boundary point of the window interface is found, the position of the window interface can be determined. In order to accurately indicate 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), where, for example, a prompt information about whether the current window interface advertises a 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 displayed 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 may not be displayed any more. The preset window is presented at the appointed position of the window interface, so that a 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 to the user caused by the window interface is avoided.
In one or more embodiments of the present invention, the method of determining window interface boundaries may further comprise: and searching boundary points 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 points, and then capturing a picture of the window interface according to the boundary of the window interface. After determining the boundary of the window interface, the actual position of the window interface can be obtained, and on the basis, the window interface is subjected to screenshot, and the intercepted image only comprises the window interface. However, if the window interface is still expected to be saved in a screenshot manner under the condition that the boundary of the window interface is not found, if an instruction for performing screenshot based on the window interface is issued, the intercepted image not only comprises the window interface, but also comprises the content of the invisible window part corresponding to the window interface. In general, taking into account that the user interface may relate to user privacy, it is not a reasonable operation to perform screenshot on the user interface, so after determining the boundary of the window interface, screenshot on the window interface is performed, and screenshot on the window interface popped up by the system can be saved on the basis of protecting the user privacy, so that the user does not need to pay attention to popup windows in real time, so that the user can conveniently view the specific contents of the popup windows in idle time, and user experience is improved.
FIG. 5 is a schematic structural diagram of an apparatus for determining window interface boundaries according to one or more embodiments of the present invention, 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 the 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 as a first point within the non-dominant region;
a first determining module 53, configured to search for a boundary point of the window interface in the non-explicit area with the first point as a starting point, and determine a boundary of the window interface according to the searched boundary point.
In one or more embodiments of the invention, the apparatus further comprises:
the second determining module is configured to search for boundary points of the window interface in the non-dominant region by taking the first point as a starting point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface after determining the boundary of the window interface according to the searched boundary points;
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 for points on the window interface by taking the non-dominant region as a target searching region;
and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to 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 apparatus for determining a window interface boundary may further include: and the ending searching module is configured to finish searching after continuously searching the points on the window interface by taking the area obtained after the two differentiation as a new target searching area until the points on the window interface or the size of the target searching area are found to meet the preset condition.
In one or more embodiments of the present invention, the lookup module may be specifically configured to:
searching for a target point in the non-dominant region using a depth-first search algorithm;
it is determined by Window From Point function whether the target point is a point on the window interface.
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, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface.
In one or more embodiments of the present invention, the apparatus for determining a window interface boundary may further include: the presentation module is configured to search the boundary point of the window interface in the non-dominant 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 searched boundary point, wherein the preset window is displayed with the type information of the window interface and/or controls for closing the window interface.
In one or more embodiments of the present invention, the apparatus for determining a window interface boundary may further include: and the screenshot module is configured to search the boundary point of the window interface in the non-dominant 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 surrounded by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to respective circuits or devices of the electronic apparatus; 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, for performing any one of the methods of determining window interface boundaries described above.
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 of the methods of determining window interface boundaries described above.
Accordingly, as shown in fig. 6, an electronic device provided in one or more embodiments of the present invention may include: the processor 62 and the memory 63 are arranged on the circuit board 64, wherein the circuit board 64 is arranged in a space surrounded by the shell 61; a power supply circuit 65 for supplying power to the respective circuits or devices of the electronic apparatus; the memory 63 is for storing 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 performing any one of the methods of determining window interface boundaries provided in the foregoing embodiments.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
For convenience of description, the above apparatus is described as being functionally divided into various units/modules, respectively. Of course, the functions of the various elements/modules may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps 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 (Random Access Memory, RAM), or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (16)

1. A method of determining window interface boundaries, 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;
searching boundary points 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 points;
searching a point on the window interface in the non-dominant region as a first point, including:
searching for points on the window interface by taking the non-dominant region as a target searching region;
and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to find the point on the window interface, and taking the found point on the window interface as the first point.
2. The method according to claim 1, wherein the method further comprises:
searching boundary points 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 points, and determining 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.
3. The method according to claim 1, wherein the method further comprises:
and after the area obtained after the differentiation is used as a new target search area to continuously search the points on the window interface, ending the search until the points on the window interface or the size of the target search area are found to meet the preset condition.
4. The method of claim 1, wherein finding a point on the window interface within the non-dominant region comprises:
searching for a target point in the non-dominant region using a depth-first search algorithm;
it is determined by Window From Point function whether the target point is a point on the window interface.
5. The method of claim 1, wherein searching for boundary points of the window interface in the non-dominant region with the first point as a starting point, and determining the boundary of the window interface based on the searched boundary points, comprises:
and taking the first point as a starting point, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface.
6. The method according to claim 1, wherein the method further comprises:
and searching boundary points 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 points, and then presenting a preset window at a preset position of the window interface, wherein the preset window is displayed with type information of the window interface and/or controls for closing the window interface.
7. The method according to any one of claims 1 to 6, further comprising:
and searching boundary points 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 points, and then capturing a picture of the window interface according to the boundary of the window interface.
8. An apparatus for determining window interface boundaries, 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 searching module configured to search for a point on the window interface as a first point in the non-dominant region;
the first determining module is configured to search a boundary point of the window interface in the non-dominant region by taking the first point as a starting point, and determine the boundary of the window interface according to the searched boundary point;
the search module is specifically configured to:
searching for points on the window interface by taking the non-dominant region as a target searching region;
and responding to the fact that the point on the window interface is not found in the target search area, performing the second differentiation on the target search area, taking the area obtained after the second differentiation as a new target search area, continuing to find the point on the window interface, and taking the found point on the window interface as the first point.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the second determining module is configured to search for boundary points of the window interface in the non-dominant region by taking the first point as a starting point, and determine whether the window interface belongs to an advertisement window according to the boundary of the window interface after determining the boundary of the window interface according to the searched boundary points;
and if the window interface belongs to the advertisement window, closing the window interface.
10. The apparatus of claim 8, wherein the apparatus further comprises:
and the ending searching module is configured to finish searching after continuously searching the points on the window interface by taking the area obtained after the two differentiation as a new target searching area until the points on the window interface or the size of the target searching area are found to meet the preset condition.
11. The apparatus of claim 8, wherein the lookup module is specifically configured to:
searching for a target point in the non-dominant region using a depth-first search algorithm;
it is determined by Window From Point function whether the target point is a point on the window interface.
12. The apparatus of claim 8, wherein the first determination module is specifically configured to:
and taking the first point as a starting point, performing diffusion searching on the boundary points of the window interface to the periphery of the first point through a dichotomy searching method, and determining the boundary of the window interface according to the searched boundary points of the window interface.
13. The apparatus of claim 8, wherein the apparatus further comprises:
the presentation module is configured to search the boundary point of the window interface in the non-dominant 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 searched boundary point, wherein the preset window is displayed with the type information of the window interface and/or controls for closing the window interface.
14. The apparatus according to any one of claims 8 to 13, further comprising:
and the screenshot module is configured to search the boundary point of the window interface in the non-dominant 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.
15. An electronic device, the electronic device comprising: 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 surrounded by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to respective circuits or devices of the electronic apparatus; the memory is used for storing executable program codes; a processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the method of determining a window interface boundary as claimed in any one of the preceding claims 1 to 7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of determining window interface boundaries of any one of claims 1 to 7.
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 CN113900750A (en) 2022-01-07
CN113900750B true 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
Chrome扩展安全;傅建明;武汉大学学报(理学版);20190228;第65卷(第2期);111-125 *
Detecting pop‐up advertisement browser windows using support vector machines;Yao‐Ping;Journal of the Chinese Institute of Engineers;20080221;第31卷;1189-1198 *
Edge bundling in information visualization;Panpan Xu;Tsinghua Science and Technology;20130430;第18卷(第2期);145 - 156 *
Enhancement of image edge definition by modified Quadtree sobel operator;He Weigang;2016 World Automation Congress (WAC);20161006;21-24 *
Image segmentation based on Blob analysis and quad-tree algorithm;Wen-Quan Fan;2018 IEEE 3rd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC);20181216;1-7 *
ProClick: a framework for testing clickjacking attacks in web applications;Hossain Shahriar;roceedings of the 6th International Conference on Security of Information and Networks;20131130;144–151 *
体育比赛视频中标牌型广告检测方法研究;昌晶;优秀硕士电子期刊;20180715;1-81 *
基于二分法的鸡蛋图像边缘快速检测方法;周平,赵春江,等;农业工程学报;第26卷(第1期);238-242 *
基于改进的形态学二分法的车牌定位方法;王娟;微计算机信息;20160229;第26卷(第2期);181-183 *
基于用户角度下的手机广告检测方法研究;卢玉婷;信息与电脑(理论版);20191031;第31卷(第20期);62-63 *
恶意弹窗广告攻击检测技术的研究;孙冲冲;软件工程;20200531;第20卷(第5期);27-30 *

Also Published As

Publication number Publication date
CN113900750A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
CN103500066B (en) Screenshot device and method suitable for touch screen equipment
CN108664364B (en) Terminal testing method and device
CN104268006A (en) Keyboard and mouse script playback method and device
WO2021088422A1 (en) Application message notification method and device
CN109508189B (en) Layout template processing method and device and computer readable storage medium
CN111814885B (en) Method, system, device and medium for managing image frames
US20140330814A1 (en) Method, client of retrieving information and computer storage medium
US10955985B2 (en) Optimizing an arrangement of content on a display of a user device based on user focus
CN112131121B (en) Fuzzy detection method and device for user interface, electronic equipment and storage medium
US20170287444A1 (en) Display control device, display control method, and display control program
WO2022222510A1 (en) Interaction control method, terminal device, and storage medium
WO2014176938A1 (en) Method and apparatus of retrieving information
CN113900750B (en) Method and device for determining window interface boundary, storage medium and electronic equipment
US20180336243A1 (en) Image Search Method, Apparatus and Storage Medium
Mozgovoy et al. Using image recognition for testing hand-drawn graphic user interfaces
US9720705B2 (en) System and method of demand oriented user interface framework
CN112000413B (en) Screenshot method and system capable of protecting information and intelligent terminal
CN111694477B (en) Label processing method and device and electronic equipment
CN111258576A (en) Interface generation method and device, electronic equipment and computer storage medium
CN110908570B (en) Image processing method, device, terminal and storage medium
CN113076257A (en) Test script recording method, device, medium and computer equipment
CN104035655B (en) The method and device that control character input method is shown
US11782850B2 (en) Information processing method, server, terminal, and computer storage medium
WO2016101768A1 (en) Terminal and touch operation-based search method and device
CN112749769A (en) Graphic code detection method and device, computer equipment 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