CN112083973B - Window closing method and device, electronic equipment and storage medium - Google Patents
Window closing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112083973B CN112083973B CN202010989069.7A CN202010989069A CN112083973B CN 112083973 B CN112083973 B CN 112083973B CN 202010989069 A CN202010989069 A CN 202010989069A CN 112083973 B CN112083973 B CN 112083973B
- Authority
- CN
- China
- Prior art keywords
- window
- coordinate
- coordinates
- target
- advertisement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000006870 function Effects 0.000 claims description 41
- 238000004891 communication Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention provides a window closing method, a device, electronic equipment and a storage medium, which are applied to the technical field of computers, wherein the window closing method is applied to the electronic equipment and comprises the following steps: determining an advertisement window to be processed as a target window; identifying a first coordinate of a closing key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment; and simulating clicking the screen position indicated by the first coordinate. Because the first coordinate of the target window is identified and the screen position indicated by the first coordinate is simulated to be clicked, the closing key of the target window can be clicked without manual operation of a user, and the target window is closed. Therefore, the purpose of automatically closing the advertisement window can be achieved through the scheme, and user experience is improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for closing a window, an electronic device, and a storage medium.
Background
An advertisement window is a form of advertisement that often occurs when a user browses a web page or opens application software in an electronic device. Wherein the advertisement window contains one or more advertisement contents to be promoted.
The user experience is greatly reduced due to the frequent pop-up of the advertisement window. Moreover, the closing key of the advertisement window is usually weakened to be displayed intentionally or belongs to a false key, which brings inconvenience to the manual closing of the user.
Therefore, how to automatically close the advertisement window after the advertisement window pops up, so as to improve the user experience is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention aims to provide a window closing method, a device, electronic equipment and a storage medium, which are used for realizing the purpose of automatically closing an advertisement window. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for closing a window, which is applied to an electronic device, and the method includes:
Determining an advertisement window to be processed as a target window, wherein the advertisement window is a window display interface for displaying advertisement content;
identifying a first coordinate of a closing key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
and simulating to click the screen position indicated by the first coordinate so as to trigger the closing key to close the advertisement window.
Optionally, the simulating clicking the screen position indicated by the first coordinate includes:
Constructing a click event for the first coordinate based on a target function; wherein the target function is a function for simulating clicking;
and executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
Optionally, the identifying the first coordinate of the close key of the target window includes:
searching coordinates corresponding to the preset window characteristics of the target window from a preset corresponding relation as second coordinates; the preset corresponding relation is a corresponding relation between preset window characteristics of each advertisement window and coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the affiliated advertisement window;
and calculating the first coordinate of the closing key of the target window based on the second coordinate.
Optionally, the calculating, based on the second coordinate, a first coordinate of a close key of the target window includes:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
Optionally, the objective function includes: the mouse_event function in the windows system function.
In a second aspect, an embodiment of the present invention provides a window closing apparatus, including:
The window determining module is used for determining an advertisement window to be processed as a target window, wherein the advertisement window is a window display interface for displaying advertisement content;
The coordinate recognition module is used for recognizing the first coordinate of the closing key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
And the simulated clicking module is used for simulated clicking the screen position indicated by the first coordinate so as to trigger the closing key to close the advertisement window.
Optionally, the analog click module is specifically configured to:
Constructing a click event for the first coordinate based on a target function; wherein the target function is a function for simulating clicking;
and executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
Optionally, the coordinate recognition module includes:
the coordinate searching sub-module is used for searching the coordinate corresponding to the preset window characteristic of the target window from the preset corresponding relation as a second coordinate; the preset corresponding relation is a corresponding relation between preset window characteristics of each advertisement window and coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the affiliated advertisement window;
and the coordinate calculation sub-module is used for calculating the first coordinate of the closing key of the target window based on the second coordinate.
Optionally, the coordinate calculation sub-module is specifically configured to:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
Optionally, the objective function includes: the mouse_event function in the windows system function.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
and the processor is used for realizing the steps of any window closing method when executing the program stored in the memory.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of an incumbent window closing method.
The embodiment of the invention has the beneficial effects that:
The scheme provided by the embodiment of the invention determines the advertisement window to be processed as a target window; identifying a first coordinate of a closing key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment; and simulating clicking the screen position indicated by the first coordinate. Because the first coordinate of the target window is identified and the screen position indicated by the first coordinate is simulated to be clicked, the closing key of the target window can be clicked without manual operation of a user, and the target window is closed. Therefore, the purpose of automatically closing the advertisement window can be achieved through the scheme, and user experience is improved.
In addition, because the screen position indicated by the first coordinate of the close button is simulated to click, namely the close button is simulated to click by the user, and the advertisement window is a window which is allowed to be closed by the user, the program for popup advertisement window can not form a countermeasure mode to avoid closing the advertisement window, thereby ensuring the effective closing of the advertisement window.
In addition, because the screen position indicated by the first coordinate of the closing key is simulated and clicked, when a user browses a page, even if the page size or the page position is manually adjusted, the advertisement window can be automatically closed rapidly through the scheme.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or 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 embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for closing a window according to an embodiment of the present invention;
FIG. 2 is another flowchart of a window closing method according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a window closing device according to an embodiment of the present invention;
Fig. 4 is another schematic structural view of a window closing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. 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.
In order to achieve the purpose of automatically closing an advertisement window, the embodiment of the invention provides a window closing method, a window closing device, electronic equipment and a storage medium. It should be noted that, the window closing method provided by the embodiment of the present invention is applied to an electronic device, and the electronic device may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.
Specifically, the execution body of the window closing method provided by the embodiment of the invention can be a window closing device running in the electronic equipment. For example, if the electronic device is a terminal device, the window closing apparatus may be a security client, an assistant client, or a management client running in the electronic device, and so on; of course, the window closing device may also be a plug-in a security class client, an assistant class client, or a management class client, etc., which is reasonable.
The window closing method provided by the embodiment of the invention can comprise the following steps:
Determining an advertisement window to be processed as a target window, wherein the advertisement window is a window display interface for displaying advertisement content;
identifying a first coordinate of a closing key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
and simulating to click the screen position indicated by the first coordinate so as to trigger the closing key to close the advertisement window.
Because the first coordinate of the target window is identified and the screen position indicated by the first coordinate is simulated to be clicked, the closing key of the target window can be clicked without manual operation of a user, and the target window is closed. Therefore, the purpose of automatically closing the advertisement window can be achieved through the scheme, and user experience is improved.
The following describes a window closing method according to an embodiment of the present invention with reference to the accompanying drawings.
As shown in fig. 1, a method for closing a window provided by an embodiment of the present invention may include the following steps:
S101, determining an advertisement window to be processed as a target window;
The advertisement window is a window display interface for displaying advertisement content. It is understood that the pop-up window in the electronic device may be an advertisement window containing advertisement content or may be an information window containing non-advertisement content. In this embodiment, any one of the pop-up advertisement windows in the electronic device may be used as the advertisement window to be processed, that is, after detecting that the pop-up window is the advertisement window, the pop-up advertisement window may be determined to be the advertisement window to be processed, so as to execute the subsequent auto-close step.
There are various implementations of detecting whether a pop-up window is an advertisement window. Optionally, in one implementation, detecting whether the pop-up window is an advertising window may include:
Acquiring window characteristics of a pop-up window;
If the acquired window characteristics meet the advertisement window detection conditions, determining that the pop-up window is an advertisement window, wherein the advertisement window detection conditions are set based on the window characteristics of the advertisement window collected in advance.
By way of example, window characteristics may include, but are not limited to, one or more of a category of window, a window name, a process name, and size information. Accordingly, the advertisement window detection condition may be that the window feature is a specified window feature set based on the window feature of the advertisement window collected in advance.
S102, identifying a first coordinate of a closing key of the target window;
The first coordinates are coordinates of the closing key in a display unit of the electronic device.
It can be understood that the target window includes a closing button, the closing button may be a virtual button, and there may be multiple triggering modes of the virtual button, for example, clicking the virtual button by a mouse or a finger to trigger the virtual button to close the target window; or clicking a virtual key by using a touch device such as a touch pen to trigger the virtual key, closing the target window, and the like.
The icon form of the closing button of the target window may be any one of the prior art, and is not limited herein; also, the position of the close key of the target window may be located at any position within the target window, for example, at the upper right corner of the target window, and so on.
In this embodiment, the first coordinate is a screen coordinate of the close key, that is, an absolute coordinate of the close key relative to a display unit of the electronic device; also, the origin position of the user screen may be any position, such as an upper left corner vertex or an upper right corner vertex of the screen, and so on.
For the sake of clarity of the solution and clarity of the layout, the following details will be described with reference to another embodiment with respect to the first coordinate identifying the close key of the target window.
And S103, clicking the screen position indicated by the first coordinate in a simulation mode to trigger the closing key to close the advertisement window.
After the first coordinates are obtained, a simulated click may be performed on the screen location indicated by the first coordinates. The closing key of the target window can be clicked by simulating clicking the screen position indicated by the first coordinate, so that the aim of closing the target window is fulfilled. It should be noted that, for the electronic device that implements the operation by using the mouse, the screen position indicated by the simulated click on the first coordinate may specifically refer to: and simulating to click the screen position indicated by the first coordinate.
The specific implementation manner of the screen position indicated by the first coordinate in the simulated click mode can be any manner capable of realizing the simulated click of a certain screen position. For example: invoking a preset plug-in for simulating a click screen, simulating clicking the screen position indicated by the first coordinate, or simulating clicking the screen position indicated by the first coordinate by running a function for simulating a click screen preset in a window closing device, and the like.
Because the first coordinate of the target window is identified and the screen position indicated by the first coordinate is simulated to be clicked, the closing key of the target window can be clicked without manual operation of a user, and the target window is closed. Therefore, the purpose of automatically closing the advertisement window can be achieved through the scheme, and user experience is improved.
Alternatively, based on the embodiment shown in fig. 1, in another embodiment of the present invention, as shown in fig. 2, step S103 may include:
S103A, constructing a click event aiming at the first coordinate based on a target function;
Wherein the objective function is a function for simulating a click.
For example, in one implementation, constructing a click event for the first coordinate based on the target function may include:
the first coordinate is passed to an objective function to construct a click event for the first coordinate.
For example, for an electronic device employing a windows system, the target function may include a mouse_event function in the windows system function. Accordingly, for an electronic device adopting the android system or the IOS system, the target function may include a function capable of implementing a simulated click function in the android system or the IOS system function.
And S103B, executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
After constructing the click event, to enable the auto-close window, the click event may be performed, simulating clicking on the screen location indicated by the first coordinate. For example, for an electronic device employing a windows system, the mouse may be controlled to execute the click event to simulate clicking on the screen location indicated by the first coordinate.
It will be appreciated that when the screen position indicated by the first coordinate is clicked in a simulated manner, the closing operation of the target window is realized.
Because the screen position indicated by the screen coordinates of the close key is simulated to be clicked, namely the close key is simulated to be clicked by the user, and the advertisement window is a window which is allowed to be closed by the user, the program of the pop-up advertisement window can not form a countermeasure mode to avoid the advertisement window from being closed, thereby ensuring the effective closing of the advertisement window.
Optionally, in another embodiment of the present invention, the identifying the first coordinate of the close key of the target window includes the following a-B steps:
Searching coordinates corresponding to the preset window characteristics of the target window from a preset corresponding relation as second coordinates;
the preset corresponding relation is a corresponding relation between the preset window characteristics of each advertisement window and the coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the advertisement window to which the closing key belongs. In addition, the preset correspondence may be stored in the server or in the terminal device, which is reasonable.
It can be understood that, in order to improve the efficiency of closing the advertisement window, the advertisement windows appearing in the history may be collected in advance, and the coordinates of the closing key and the predetermined window features corresponding to each collected advertisement window may be identified, so as to construct a corresponding relationship between the predetermined window features of each advertisement window and the coordinates of the closing key, so that when the user browses the page or opens the application software and the target window to be processed appears, the coordinates corresponding to the predetermined window features of the target window may be searched from the preset corresponding relationship.
The second coordinate of the target window is the relative coordinate of the closing key of the target window with respect to the advertisement window to which the closing key belongs, and it is understood that the origin coordinate of the target window may be the top left corner vertex, the top right corner vertex, the bottom left corner vertex, or the like of the target window, which is reasonable.
It can be understood that, in the preset correspondence, the coordinates corresponding to the predetermined window features of the target window may be found, or the coordinates corresponding to the predetermined window features of the target window may not be found. When the coordinates corresponding to the preset window characteristics of the target window cannot be found, namely, the target window is not in the range of the advertisement window collected in advance, the target window is closed when the target window pops up next time, and when the coordinates corresponding to the preset window characteristics of the target window cannot be found, a request for updating the preset corresponding relation can be sent to the server.
And B, calculating the first coordinate of the closing key of the target window based on the second coordinate.
In an implementation, calculating, based on the second coordinate, a first coordinate of a close key of the target window may include:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
The screen coordinates of the target window may be the coordinates of the center point of the target window, or the coordinates of any corner point of the target window, for example, the coordinates of the upper left corner point, the coordinates of the upper right corner point, or the like of the target window. It will be appreciated that the screen coordinates of the target window are the absolute coordinates of the origin of coordinates of the target window relative to the user screen. Illustratively, when the origin of coordinates of the target window is the top left corner vertex, the origin of coordinates of the user screen is the top left corner vertex of the user screen.
For example, assuming that the close button of the target window is located at the position of the top right corner vertex of the target window, the coordinate origin of the target window is the top left corner vertex of the target window, the coordinate origin of the user screen is the top left corner vertex of the user screen, and the screen coordinates of the target window are the coordinates of the top left corner point of the target window relative to the user screen; if the second coordinate of the closing button of the target window is (200, 0), the acquired screen coordinate of the target window is (100, -200), and at this time, the abscissa x=200+100=300 of the first coordinate, and the ordinate y=200+0=200 of the first coordinate, that is, the first coordinate is (300, -200).
For example, assuming that the close button of the target window is located at the position of the top left corner vertex of the target window, the coordinate origin of the target window is the top right corner vertex of the target window, the coordinate origin of the user screen is the top right corner vertex of the user screen, and the screen coordinates of the target window are the coordinates of the top right corner point of the target window relative to the user screen; if the second coordinate of the closing button of the target window is (-100, 0), the acquired screen coordinate of the target window is (-50, -20), and at this time, the abscissa x= -100+ (-50) = -150, and the ordinate y=0+ (-20) = -20, i.e. the first coordinate is (-150, -20).
According to the scheme provided by the embodiment of the invention, the screen position indicated by the first coordinate of the closing key is simulated to be clicked, namely the closing key is simulated to be clicked by the user, and the advertisement window is the window which is allowed to be closed by the user, so that the program of the pop-up advertisement window can not form a countermeasure mode to avoid the advertisement window from being closed, and the effective closing of the advertisement window can be ensured.
In addition, because the screen position indicated by the first coordinate of the closing key is simulated and clicked, when a user browses a page, even if the page size or the page position is manually adjusted, the advertisement window can be automatically closed rapidly through the scheme.
With respect to the above embodiment of the method, the embodiment of the present invention provides a window closing device, as shown in fig. 3, including:
A window determining module 310, configured to determine an advertisement window to be processed as a target window, where the advertisement window is a window display interface for displaying advertisement content;
a coordinate identifying module 320, configured to identify a first coordinate of a close key of the target window; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
And a simulated clicking module 330, configured to simulate clicking the screen position indicated by the first coordinate to trigger the close button to close the advertisement window.
Because the screen coordinates of the target window are identified and the screen position indicated by the first coordinates is simulated to be clicked, the closing key of the target window can be clicked without manual operation of a user, and the target window is closed. Therefore, the purpose of automatically closing the advertisement window can be achieved through the scheme, and user experience is improved.
Optionally, the analog click module 330 is specifically configured to:
Constructing a click event for the first coordinate based on a target function; wherein the target function is a function for simulating clicking;
and executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
Optionally, as shown in fig. 4, the coordinate recognition module 320 includes:
A coordinate searching sub-module 340, configured to search, from a preset correspondence, coordinates corresponding to a predetermined window feature of the target window as second coordinates; the preset corresponding relation is a corresponding relation between preset window characteristics of each advertisement window and coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the affiliated advertisement window;
And a coordinate calculation sub-module 350, configured to calculate, based on the second coordinate, a first coordinate of the close button of the target window.
Optionally, the coordinate calculation sub-module 350 is specifically configured to:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
The embodiment of the invention also provides an electronic device, as shown in fig. 5, which comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete communication with each other through the communication bus 504,
A memory 503 for storing a computer program;
The processor 501 is configured to implement steps of a window closing method when executing a program stored in the memory 503.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the window closing methods described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the window closing methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
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 embodiments of the apparatus, the electronic device, i.e. the storage medium, etc., the description is relatively simple, as it is substantially similar to the method embodiments, and reference should be made to the description of portions of the method embodiments where relevant.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (10)
1. A window closing method, applied to an electronic device, the method comprising:
Determining an advertisement window to be processed as a target window, wherein the advertisement window is a window display interface for displaying advertisement content;
searching coordinates corresponding to the preset window characteristics of the target window from a preset corresponding relation as second coordinates; the preset corresponding relation is a corresponding relation between preset window characteristics of each advertisement window and coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the affiliated advertisement window;
Calculating a first coordinate of a closing key of the target window based on the second coordinate; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
and simulating to click the screen position indicated by the first coordinate so as to trigger the closing key to close the advertisement window.
2. The method of claim 1, wherein the simulated clicking on the screen location indicated by the first coordinate comprises:
Constructing a click event for the first coordinate based on a target function; wherein the target function is a function for simulating clicking;
and executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
3. The method of claim 1, wherein calculating the first coordinate of the close key of the target window based on the second coordinate comprises:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
4. The method of claim 2, wherein the objective function comprises: the mouse_event function in the windows system function.
5. A window closing apparatus, characterized in that it is applied to an electronic device, said apparatus comprising:
The window determining module is used for determining an advertisement window to be processed as a target window, wherein the advertisement window is a window display interface for displaying advertisement content;
a coordinate recognition module, comprising:
the coordinate searching sub-module is used for searching the coordinate corresponding to the preset window characteristic of the target window from the preset corresponding relation as a second coordinate; the preset corresponding relation is a corresponding relation between preset window characteristics of each advertisement window and coordinates of a closing key, and the coordinates of the closing key are relative coordinates of the closing key relative to the affiliated advertisement window;
The coordinate calculation sub-module is used for calculating the first coordinate of the closing key of the target window based on the second coordinate; the first coordinates are coordinates of the closing key in a display unit of the electronic equipment;
And the simulated clicking module is used for simulated clicking the screen position indicated by the first coordinate so as to trigger the closing key to close the advertisement window.
6. The apparatus of claim 5, wherein the analog clicking module is specifically configured to:
Constructing a click event for the first coordinate based on a target function; wherein the target function is a function for simulating clicking;
and executing the clicking event to simulate clicking the screen position indicated by the first coordinate.
7. The apparatus of claim 5, wherein the coordinate calculation sub-module is specifically configured to:
acquiring screen coordinates of the target window, wherein the screen coordinates are coordinates of the target window in a display unit of the electronic equipment;
and calculating a first coordinate of a closing key of the target window based on the screen coordinate of the target window and the second coordinate.
8. The apparatus of claim 6, wherein the objective function comprises: the mouse_event function in the windows system function.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010989069.7A CN112083973B (en) | 2020-09-18 | 2020-09-18 | Window closing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010989069.7A CN112083973B (en) | 2020-09-18 | 2020-09-18 | Window closing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112083973A CN112083973A (en) | 2020-12-15 |
CN112083973B true CN112083973B (en) | 2024-07-23 |
Family
ID=73739332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010989069.7A Active CN112083973B (en) | 2020-09-18 | 2020-09-18 | Window closing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112083973B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112578958B (en) * | 2020-12-16 | 2022-05-17 | 珠海格力电器股份有限公司 | Control method, control device, terminal equipment and storage medium |
CN113608817B (en) * | 2021-08-19 | 2024-05-07 | 上海幻电信息科技有限公司 | Method and system for processing bullet frame |
CN113900750B (en) * | 2021-09-26 | 2024-02-23 | 珠海豹好玩科技有限公司 | Method and device for determining window interface boundary, storage medium and electronic equipment |
CN114546556A (en) * | 2022-02-15 | 2022-05-27 | 西安闻泰信息技术有限公司 | Method and device for processing advertisement in application, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105549975A (en) * | 2015-12-15 | 2016-05-04 | 北京金山安全软件有限公司 | Processing method and device for prompt advertisement window |
CN106708558A (en) * | 2016-10-31 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Method and device for closing application program |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013228797A (en) * | 2012-04-24 | 2013-11-07 | Ricoh Co Ltd | Image control device, and image processing system and program |
CN103870038B (en) * | 2012-12-10 | 2017-05-24 | 联想(北京)有限公司 | Electronic device and controlling method thereof |
CN103399657B (en) * | 2013-07-31 | 2016-09-28 | 小米科技有限责任公司 | The control method of mouse pointer, device and terminal unit |
CN105630499A (en) * | 2015-12-24 | 2016-06-01 | 北京奇虎科技有限公司 | Method and device for processing information |
CN105824499A (en) * | 2016-03-04 | 2016-08-03 | 维沃移动通信有限公司 | Window control method and mobile terminal |
CN109803050B (en) * | 2019-01-14 | 2020-09-25 | 南京点明软件科技有限公司 | Full screen guiding clicking method suitable for blind person to operate mobile phone |
CN111917805A (en) * | 2019-05-10 | 2020-11-10 | 梁友兵 | Remote driving and controlling method through intelligent terminal |
CN111046290A (en) * | 2019-12-13 | 2020-04-21 | 珠海格力电器股份有限公司 | Advertisement processing method and device, electronic equipment and storage medium |
CN111158811B (en) * | 2019-12-16 | 2022-06-21 | 珠海格力电器股份有限公司 | Advertisement processing method and device, electronic equipment and storage medium |
CN111651361A (en) * | 2020-06-10 | 2020-09-11 | 宋文韬 | Script-free automatic testing method based on visual page |
-
2020
- 2020-09-18 CN CN202010989069.7A patent/CN112083973B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105549975A (en) * | 2015-12-15 | 2016-05-04 | 北京金山安全软件有限公司 | Processing method and device for prompt advertisement window |
CN106708558A (en) * | 2016-10-31 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Method and device for closing application program |
Non-Patent Citations (1)
Title |
---|
一种利用Win32钩子实现快速关闭窗口的方法;李伟;;计算机与数字工程(第04期);第169-171页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112083973A (en) | 2020-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112083973B (en) | Window closing method and device, electronic equipment and storage medium | |
CN102629273B (en) | Advertising information pushing method based on browser, device and browser system | |
US10175852B2 (en) | Information processing methods and electronic devices for classifying applications | |
CN109144392B (en) | Method and device for processing gesture conflict and electronic equipment | |
US9632693B2 (en) | Translation of touch input into local input based on a translation profile for an application | |
US20130080910A1 (en) | Dynamic visualization of page element access rates in a web application | |
WO2016095689A1 (en) | Recognition and searching method and system based on repeated touch-control operations on terminal interface | |
CN113032682A (en) | Product recommendation method, device, equipment and storage medium based on collaborative filtering | |
CN111026392B (en) | Method and device for generating guide page and electronic equipment | |
CN102664925B (en) | A kind of method of displaying searching result and device | |
CN109240591B (en) | Interface display method and device | |
CN104102704B (en) | System control methods of exhibiting and device | |
CN110781427A (en) | Method, device, equipment and storage medium for calculating first screen time | |
CN115033317A (en) | Bullet frame processing method and device, electronic equipment and readable storage medium | |
CN112084503A (en) | Interception rule base generation method and device and electronic equipment | |
CN109740054A (en) | It is a kind of for determining the method and apparatus of the association financial information of target user | |
US20140071058A1 (en) | Positioning Clickable Hotspots On A Touchscreen Display | |
CN115933946A (en) | Page jump method, device, computer equipment and storage medium | |
CN112083974A (en) | Advertisement window closing method and device and electronic equipment | |
US9262523B2 (en) | Enhancement of touch user experiences | |
CN112149743A (en) | Access control method, device, equipment and medium | |
CN114063848B (en) | Information editing method, device, computer readable medium and electronic equipment | |
CN112783395B (en) | Method, device, electronic equipment and medium for displaying form field | |
CN113360356B (en) | Method for identifying reading cheating behaviors, computing device and computer storage medium | |
CN113934321B (en) | Touch control method, electronic device and computer readable 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 |