CN112083974B - Advertisement window closing method and device and electronic equipment - Google Patents
Advertisement window closing method and device and electronic equipment Download PDFInfo
- Publication number
- CN112083974B CN112083974B CN202010989343.0A CN202010989343A CN112083974B CN 112083974 B CN112083974 B CN 112083974B CN 202010989343 A CN202010989343 A CN 202010989343A CN 112083974 B CN112083974 B CN 112083974B
- Authority
- CN
- China
- Prior art keywords
- window
- advertisement
- invisible
- handle
- electronic equipment
- 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 41
- 238000001514 detection method Methods 0.000 claims description 20
- 238000004891 communication Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 12
- 238000004883 computer application Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000007246 mechanism Effects 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
- 238000011161 development 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
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)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention provides an advertisement window closing method and device and electronic equipment, and relates to the technical field of computer application. The advertisement window closing method comprises the following steps: when a pop-up advertisement window in the electronic equipment is detected, creating a window invisible to a user as an invisible window; establishing a father-son relationship for an advertisement window and an invisible window, wherein the advertisement window is a child window, and the invisible window is a father window; the invisible window is closed such that the advertising window is closed. By adopting the embodiment of the invention, the advertisement window can be closed rapidly.
Description
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and an apparatus for closing an advertisement window, and an electronic device.
Background
With the rapid development of information technology, electronic devices have become a main way for people to acquire information in life and work, however, users often suffer from interference of automatically popped advertisement windows in the process of using the electronic devices.
Typically, pop-up advertising windows require the user to click on the close button to close, however, some advertising windows often have close buttons that are deliberately weakened or false close buttons that make it difficult for the user to quickly find the close button to close the advertising window.
Disclosure of Invention
The embodiment of the invention aims to provide an advertisement window closing method, an advertisement window closing device and electronic equipment, so as to realize rapid closing of an advertisement window. The specific technical scheme is as follows:
the embodiment of the invention provides an advertisement window closing method, which is applied to electronic equipment and comprises the following steps:
When the fact that the advertisement window is shot out of the electronic equipment is detected, creating a window invisible to a user as an invisible window;
establishing a parent-child relationship for the advertisement window and the invisible window, wherein the advertisement window is a child window and the invisible window is a parent window;
closing the invisible window to enable the advertisement window to be closed.
Further, the establishing a parent-child relationship between the advertisement window and the invisible window includes:
Acquiring a first handle of the invisible window, and setting a parent window handle of the advertisement window by using the first handle; and/or the number of the groups of groups,
And acquiring a second handle of the advertisement window, and setting a child window handle of the invisible window by using the second handle.
Further, the creating a window invisible to the user, as an invisible window, includes:
Creating a window which is of a display type and meets the preset invisible conditions of the user as an invisible window; or alternatively
A window of which the window type is a hidden type is created as an invisible window.
Further, the predetermined user invisible condition includes:
The height and width are both less than a preset threshold and/or are in an off-screen position.
Further, the method further comprises: when detecting that a new window pops up in the electronic equipment, acquiring window information of the new window;
If the acquired window information meets the advertisement window detection condition, detecting that the advertisement window is shot out of the electronic equipment, wherein the advertisement window detection condition is set based on the window information of the advertisement window collected in advance.
The embodiment of the invention also provides an advertisement window closing device which is applied to the electronic equipment and comprises:
the window creation module is used for creating a window invisible to a user when the advertisement window is shot out of the electronic equipment, and the window is used as an invisible window;
The relation establishing module is used for establishing a father-son relation between the advertisement window and the invisible window, wherein the advertisement window is a child window, and the invisible window is a father window;
And the window closing module is used for closing the invisible window so as to close the advertisement window.
Further, the relationship establishing module is specifically configured to obtain a first handle of the invisible window, and set a parent window handle of the advertisement window by using the first handle; and/or, acquiring a second handle of the advertisement window, and setting a child window handle of the invisible window by using the second handle.
Further, the window creation module is specifically configured to create, as an invisible window, a window whose window type is a display type and meets a predetermined invisible condition of a user; or creating a window with a window type of hidden type as an invisible window.
Further, the predetermined user invisible condition includes:
The height and width are both less than a preset threshold and/or are in an off-screen position.
Further, the device further comprises:
the information acquisition module is used for acquiring window information of a new window when detecting that the new window pops up in the electronic equipment;
And the window determining module is used for detecting that the advertisement window is shot out from the electronic equipment if the acquired window information meets the advertisement window detection condition, wherein the advertisement window detection condition is set based on the window information of the advertisement window collected in advance.
The embodiment of the invention also provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface, and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the above advertisement window closing method steps when executing the program stored in the memory.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program realizes the steps of the advertisement window closing method when being executed by a processor.
The embodiment of the invention also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the advertisement window closing method described in any one of the above.
The embodiment of the invention has the beneficial effects that:
According to the advertisement window closing method, the advertisement window closing device and the electronic equipment, when the advertisement window is detected to pop up, the invisible window is created, the father-child relationship is built for the advertisement window and the invisible window, wherein the advertisement window is the child window, and the invisible window is the father window.
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 an advertisement window closing method according to an embodiment of the present invention.
Fig. 2 is a flowchart of an advertisement window closing method according to another embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an advertisement window closing apparatus according to an embodiment of the present invention.
Fig. 4 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 quickly close an advertisement window, an embodiment of the present invention provides an advertisement window closing method, which is applied to an electronic device, as shown in fig. 1, and includes:
s101: when a pop-up advertisement window in the electronic device is detected, a window invisible to the user is created as an invisible window.
S102: and establishing a parent-child relationship for the advertisement window and the invisible window, wherein the advertisement window is a child window, and the invisible window is a parent window.
S103: the invisible window is closed such that the advertising window is closed.
The electronic device may be an electronic device running an operating system with a parent-child window closing mechanism, such as a computer running a Windows operating system. In addition, the execution subject of the advertisement window closing method provided by the embodiment of the invention can be an advertisement window closing device running in the electronic equipment. By way of example, the window closing means may be a security class client, an assistant class client or a management class client running in the electronic device, etc.; 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. For the step S101, when the pop-up advertisement window in the electronic device is detected, the window generating function may be called to generate a window invisible to the user, so that the automatic closing of the advertisement window is implemented by using the window invisible to the user. In addition, in order to realize automatic closing of the advertisement window, in one embodiment of the invention, the operation condition of the electronic device can be monitored, and whether the advertisement popup window exists in the electronic device or not can be detected based on the operation condition.
The window which is invisible to the user and is not displayed in the screen and only runs in the background, such as a hidden window with a hidden window type; or a window that actually exists in the screen but is not perceived by the user, such as a window that occupies only 1 pixel in both length and width of the window, or a window that actually exists but is generated at a position outside the screen, etc.
In one embodiment of the present invention, the invisible window may be generated in any one of the following first and second manners:
the first way is: the window type is a window which is a display type and meets a predetermined user invisible condition, and is created as an invisible window.
The window types may include a display type and a hidden type, among others. It will be appreciated that a display type window is a window that needs to be rendered for display, while a hidden type window is a window that does not need to be rendered for display.
The above predetermined user invisible condition may be set according to an actual usage scenario and experience. For example, for the purpose of being invisible to the user, the predetermined user-invisible conditions may include:
The height and width are both less than a preset threshold and/or are in an off-screen position.
Wherein, the height and width of the window are smaller than the preset threshold value, which means that the display area occupied by the window is smaller, so that the window is invisible to the user. Wherein the preset threshold may be determined based on the usage scenario and experience, if the preset threshold is 2 pixels long, the height and width of the window may be 1 pixel long, i.e. a window occupying 1 pixel is created.
In addition, a window may be created in an off-screen location in order to be invisible to the user. As known to those skilled in the art, the maximum resolution of a screen of an electronic device is known, such as 1280×720, which means that the screen contains 1280 pixels in the horizontal direction and 720 pixels in the vertical direction. Based on this, a window outside the screen may be created, and illustratively, the screen resolution of the electronic device is 1280×720, for any of the inner pixels whose abscissa is in the interval 0-1280 and whose ordinate is in the interval 0-720, it may be rendered for display, and for the pixels not in this interval, since they exceed the display interval of the screen, they are rendered but not displayed, and thus, a window whose screen coordinates are not within the above interval, i.e., a window may be created at a position outside the screen.
The second way is: a window of which the window type is a hidden type is created as an invisible window.
In the method, the window with the window type being the hidden type can be directly created, and the height, the width and the creation position of the window can be any position, and the window with the window type being the hidden type is only in the background and cannot be rendered, so that the window is invisible to a user.
For step S102 described above, the creation of the parent-child relationship may take different forms in conjunction with different operating systems. Optionally, for the Windows system, a parent-child relationship between different Windows may be established based on the handles of the Windows, where establishing a parent-child relationship for the advertisement window and the invisible window may include:
Acquiring a first handle of the invisible window, and setting a parent window handle of the advertisement window by using the first handle; and/or obtaining a second handle of the advertisement window, and setting a child window handle of the invisible window by using the second handle.
As known to those skilled in the art, each window has a unique handle corresponding to the window, and the unique handle is used as an identity identifier for distinguishing and managing the windows by the system.
Optionally, when a parent-child relationship between the invisible window and the advertisement window needs to be established, a first handle of the invisible window may be acquired first, and the parent window handle of the advertisement window may be set by using the first handle in different manners according to different states of the advertisement window.
In the event that the advertisement window does not have a parent window, the parent window handle of the advertisement window may be set to the first handle. As known to those skilled in the art, when the advertisement window does not have a parent window, one of the parent window handles in the attribute parameters of the advertisement window is null, and at this time, the first handle may be set as the parent window handle of the advertisement window; in the event that the advertising window already has a parent window, the advertising window's original parent window handle may be replaced with the retrieved first handle. As known to those skilled in the art, when the advertisement window has a parent window, one of the parent window handles in the attribute parameters of the advertisement window is the handle of the other window, and the parent window handle of the advertisement window can be replaced by the first handle.
Optionally, when a parent-child relationship between the invisible window and the advertisement window needs to be established, a second handle of the advertisement window may be acquired first, and a child window handle of the invisible window may be set as the second handle. Since the invisible window is newly created, the invisible window does not have a child window, that is, one item of the child window handle in the attribute parameter of the invisible window is empty, and at this time, the second handle can be set as the child window handle of the invisible window.
Optionally, when a parent-child relationship between the invisible window and the advertisement window needs to be established, a first handle of the invisible window and a second handle of the advertisement window may also be obtained at the same time, the first handle is used to set a parent window handle of the advertisement window, and the second handle is used to set a child window handle of the invisible window. The specific implementation is the same as or similar to the above process, and will not be repeated here.
For step S103, the invisible window may be closed by calling a window closing function, or may be closed by simulating a user to close the window.
As the closing mechanism of the father and son windows is used for closing the invisible window as the father window and the advertisement window as the son window is also closed, the advertisement window can be closed without the need of the user to manually click the closing button of the advertisement window.
According to the advertisement window closing method shown in fig. 1, when the advertisement window is detected to pop up, the invisible window is created, and the father-son relationship is established for the advertisement window and the invisible window, wherein the advertisement window is a child window, and the invisible window is a father window.
In another embodiment, as shown in fig. 2, the embodiment of the present invention further provides an advertisement window closing method, before S101, further includes:
S100A: and when detecting that a new window pops up in the electronic equipment, acquiring window information of the new window.
In this step, the electronic device may monitor a window running in the electronic device, and when detecting that a new window pops up, may read window information of the new window. Alternatively, the window information may include at least one of the following parameters: window class name, window title.
S100B: and judging whether the acquired window information meets the advertisement window detection condition.
In one embodiment of the present invention, window information of a certain number of advertisement windows may be collected in advance, and advertisement window detection conditions may be set according to the collected certain number of window information.
Optionally, window class names of a plurality of advertisement windows may be collected in advance, and accordingly, the advertisement window detection condition may include: the window class name of the window is the same as any one of window class names of a plurality of advertisement windows collected in advance. Then, determining whether the acquired window information satisfies the advertisement window detection condition may include: and judging whether the window class name of the new window is the same as any one of the collected window class names, if so, judging that the new window is an advertisement window, and executing the step S100C.
Alternatively, window titles of a plurality of advertisement windows may be collected in advance, and accordingly, the advertisement window detection condition may include: the window title of the window is the same as any one of window titles of a plurality of advertisement windows collected in advance. Then, determining whether the acquired window information satisfies the advertisement window detection condition may include: and judging whether the window title of the new window is the same as any one of the collected window titles, if so, judging that the new window is an advertisement window, and executing the step S100C.
Optionally, window class names and window titles of a plurality of advertisement windows may be collected in advance, and accordingly, the advertisement window detection conditions may include: the window title of the window is the same as any one of the window titles of the plurality of advertisement windows collected in advance, and the window title of the window is the same as any one of the window titles of the plurality of advertisement windows collected in advance. Then, determining whether the acquired window information satisfies the advertisement window detection condition may include: judging whether the window title of the new window is the same as any one of the collected window titles, if so, judging that the new window is an advertisement window, and executing the step S100C.
Optionally, if the obtained window information does not meet the advertisement window detection condition, it indicates that the new window is not an advertisement window, and the new window does not need to be automatically closed and can not be processed.
S100C: a pop-up advertisement window in the electronic device is detected.
In the step, under the condition that the acquired window information meets the advertisement window detection condition, the new window is determined to be the advertisement window, namely, the pop-up of the advertisement window in the electronic equipment is detected, and then the subsequent advertisement window closing step is executed.
According to the scheme provided by the embodiment, the advertisement window can be closed in a mode of closing the invisible window, so that the user is prevented from manually searching for the closing button of the advertisement window to close, and the advertisement window is quickly closed. In addition, the implementation mode for judging whether the new window is the advertisement window based on the window information of the new window is provided in the scheme, and the implementation mode can be used for rapidly and accurately judging whether the new window is the advertisement window based on the window information of the new window, so that a foundation is provided for rapidly closing the advertisement window.
Based on the same inventive concept, as shown in fig. 3, the embodiment of the invention further provides an advertisement window closing device, which is applied to an electronic device, and the device comprises:
A window creation module 301, configured to create, when a pop-up advertisement window in the electronic device is detected, a window that is invisible to the user, as an invisible window;
The relationship establishing module 302 is configured to establish a parent-child relationship for an advertisement window and an invisible window, where the advertisement window is a child window and the invisible window is a parent window;
and a window closing module 303, configured to close the invisible window, so that the advertisement window is closed.
Further, the relationship establishing module is specifically configured to obtain a first handle of the invisible window, and set a parent window handle of the advertisement window by using the first handle; and/or obtaining a second handle of the advertisement window, and setting a child window handle of the invisible window by using the second handle.
Further, the window creation module is specifically configured to create a window, which is of a display type and meets a predetermined invisible condition of a user, as an invisible window; or creating a window with a window type of hidden type as an invisible window.
Further, the predetermined user invisible condition includes:
The height and width are both less than a preset threshold and/or are in an off-screen position.
Further, the apparatus further comprises:
The information acquisition module is used for acquiring window information of a new window when the fact that the new window pops up in the electronic equipment is detected;
And the window determining module is used for detecting that the advertisement window is shot out from the electronic equipment if the acquired window information meets the advertisement window detection condition, wherein the advertisement window detection condition is set based on the window information of the advertisement window collected in advance.
The advertisement window closing device shown in fig. 3 provided by the embodiment of the invention can create the invisible window when the advertisement window is detected to pop up, and establish the parent-child relationship between the advertisement window and the invisible window, wherein the advertisement window is a child window, and the invisible window is a parent window.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404,
A memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
When the fact that the advertisement window is shot out of the electronic equipment is detected, creating a window invisible to a user as an invisible window;
establishing a parent-child relationship for the advertisement window and the invisible window, wherein the advertisement window is a child window and the invisible window is a parent window;
closing the invisible window to enable the advertisement window to be closed.
According to the electronic device shown in the embodiment of the invention, when the pop-up of the advertisement window is detected, the invisible window is created, and the father-son relationship is established for the advertisement window and the invisible window, wherein the advertisement window is a child window, and the invisible window is a father window.
It should be noted that, other embodiments of the method for closing an advertisement window in the electronic device are the same as the advertisement window closing method mentioned in the foregoing method embodiment, and are not described herein again.
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 a computer program stored therein, which when executed by a processor, implements the steps of any of the advertisement 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 advertisement 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 apparatus, electronic devices, computer readable storage media and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
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 (8)
1. An advertisement window closing method, applied to an electronic device, comprising:
when the fact that the advertisement window is shot out of the electronic equipment is detected, creating a window which is of a display type and meets the preset invisible condition of a user, and taking the window as an invisible window; or creating a window with a window type of a hidden type as an invisible window;
Acquiring a first handle of the invisible window, and setting a parent window handle of the advertisement window by using the first handle;
Acquiring a second handle of the advertisement window, and setting a child window handle of the invisible window by utilizing the second handle to establish a father-son relationship between the advertisement window and the invisible window, wherein the advertisement window is a child window and the invisible window is a father window;
closing the invisible window to enable the advertisement window to be closed.
2. The method of claim 1, wherein the predetermined user-invisible condition comprises:
The height and width are both less than a preset threshold and/or are in an off-screen position.
3. The method according to claim 1, wherein the method further comprises:
when detecting that a new window pops up in the electronic equipment, acquiring window information of the new window;
If the acquired window information meets the advertisement window detection condition, detecting that the advertisement window is shot out of the electronic equipment, wherein the advertisement window detection condition is set based on the window information of the advertisement window collected in advance.
4. An advertising window closing apparatus, characterized by being applied to an electronic device, comprising:
The window creation module is used for creating a window which is of a display type and meets the preset invisible condition of a user when the advertisement window is shot out of the electronic equipment, and the window is used as an invisible window; or creating a window with a window type of a hidden type as an invisible window;
the relation establishing module is used for acquiring a first handle of the invisible window and setting a parent window handle of the advertisement window by utilizing the first handle; acquiring a second handle of the advertisement window, and setting a child window handle of the invisible window by utilizing the second handle to establish a father-son relationship between the advertisement window and the invisible window, wherein the advertisement window is a child window and the invisible window is a father window;
And the window closing module is used for closing the invisible window so as to close the advertisement window.
5. The apparatus of claim 4, wherein the predetermined user-invisible condition comprises:
The height and width are both less than a preset threshold and/or are in an off-screen position.
6. The apparatus of claim 4, wherein the apparatus further comprises:
the information acquisition module is used for acquiring window information of a new window when detecting that the new window pops up in the electronic equipment;
And the window determining module is used for detecting that the advertisement window is shot out from the electronic equipment if the acquired window information meets the advertisement window detection condition, wherein the advertisement window detection condition is set based on the window information of the advertisement window collected in advance.
7. 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-3 when executing a program stored on a memory.
8. 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-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010989343.0A CN112083974B (en) | 2020-09-18 | 2020-09-18 | Advertisement window closing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010989343.0A CN112083974B (en) | 2020-09-18 | 2020-09-18 | Advertisement window closing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112083974A CN112083974A (en) | 2020-12-15 |
CN112083974B true CN112083974B (en) | 2024-08-20 |
Family
ID=73739794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010989343.0A Active CN112083974B (en) | 2020-09-18 | 2020-09-18 | Advertisement window closing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112083974B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115202533A (en) * | 2022-07-11 | 2022-10-18 | 上海连尚网络科技有限公司 | Method, device, medium and program product for displaying presence information |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105892817A (en) * | 2016-04-01 | 2016-08-24 | 腾讯科技(深圳)有限公司 | Control method and device for windows in application program |
CN107861759A (en) * | 2017-11-21 | 2018-03-30 | 广东欧珀移动通信有限公司 | Window control method, apparatus, terminal device and storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101620529B (en) * | 2008-07-03 | 2013-05-01 | 联想(北京)有限公司 | Method and system for intercepting pop-up window |
CN103617395B (en) * | 2013-12-06 | 2017-01-18 | 北京奇虎科技有限公司 | Method, device and system for intercepting advertisement programs based on cloud security |
CN104156139A (en) * | 2014-08-06 | 2014-11-19 | 广州三星通信技术研究有限公司 | Method and device for stopping links to advertisement pages |
CN105893558B (en) * | 2016-04-01 | 2020-04-21 | 腾讯科技(深圳)有限公司 | Recommended data display method and system |
CN107479892B (en) * | 2017-08-18 | 2020-10-16 | 武汉斗鱼网络科技有限公司 | Popup frame view creating method and device and electronic equipment |
-
2020
- 2020-09-18 CN CN202010989343.0A patent/CN112083974B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105892817A (en) * | 2016-04-01 | 2016-08-24 | 腾讯科技(深圳)有限公司 | Control method and device for windows in application program |
CN107861759A (en) * | 2017-11-21 | 2018-03-30 | 广东欧珀移动通信有限公司 | Window control method, apparatus, terminal device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112083974A (en) | 2020-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105471935B (en) | Information prompting method and device | |
CN111026392A (en) | Method and device for generating guide page and electronic equipment | |
CN104935494A (en) | Information processing method and device | |
CN110996154B (en) | Video playing method and device and electronic equipment | |
CN112817817A (en) | Buried point information query method and device, computer equipment and storage medium | |
CN110908880B (en) | Buried point code injection method, event reporting method and related equipment thereof | |
CN113254338A (en) | Test case generation method, device and equipment | |
CN110888628B (en) | Method, apparatus, device and storage medium for generating control tool | |
WO2020258773A1 (en) | Method, apparatus, and device for determining pushing user group, and storage medium | |
CN106021069A (en) | CPU occupation detection method, device and equipment | |
CN111125433A (en) | Popup window management method and device, electronic equipment and readable storage medium | |
CN112083974B (en) | Advertisement window closing method and device and electronic equipment | |
CN104216996A (en) | File information display method and device | |
CN112882933A (en) | Script recording method, device, equipment and storage medium | |
CN111626356A (en) | Advertisement recognition method, model training method, electronic device and storage medium | |
CN113378036A (en) | Page operation analysis and point burying method, device, equipment and storage medium | |
KR20100069147A (en) | Method and apparatus for testing quality of website | |
CN112995765B (en) | Network resource display method and device | |
CN112084503B (en) | Interception rule base generation method and device and electronic equipment | |
CN110569459A (en) | statistical method and device for webpage information | |
JP7235110B2 (en) | Operation log acquisition device, operation log acquisition method, and operation log acquisition program | |
CN111178942A (en) | Advertisement shielding method, device, equipment and storage medium | |
CN113395234B (en) | Method and device for detecting flow hijacking of popularization information | |
CN113986954B (en) | User event acquisition method and device, intelligent terminal and readable storage medium | |
CN106708705A (en) | Terminal background process monitoring method and system |
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 |