CN113282361A - Window processing method and electronic equipment - Google Patents

Window processing method and electronic equipment Download PDF

Info

Publication number
CN113282361A
CN113282361A CN202110432625.5A CN202110432625A CN113282361A CN 113282361 A CN113282361 A CN 113282361A CN 202110432625 A CN202110432625 A CN 202110432625A CN 113282361 A CN113282361 A CN 113282361A
Authority
CN
China
Prior art keywords
window
preset
electronic device
preset window
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110432625.5A
Other languages
Chinese (zh)
Other versions
CN113282361B (en
Inventor
肖名鹏
雒云
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211085269.5A priority Critical patent/CN115543500B/en
Priority to CN202110432625.5A priority patent/CN113282361B/en
Publication of CN113282361A publication Critical patent/CN113282361A/en
Application granted granted Critical
Publication of CN113282361B publication Critical patent/CN113282361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Landscapes

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

Abstract

The embodiment of the application provides a window processing method and electronic equipment, relates to the technical field of electronic equipment, and can ensure that the electronic equipment can respond to the operation of a user in time and improve the use experience of the user. The specific scheme comprises the following steps: when the electronic equipment is turned off, the electronic equipment acquires a first instruction of a first application, and the first instruction is used for indicating the electronic equipment to create a preset window. After that, the electronic device may obtain attribute information of the preset window, where the attribute information of the preset window includes a pixel size and/or a transparency of the preset window. Then, the electronic device may detect whether the preset window is a transparent window according to the attribute information of the preset window. Then, if the preset window is a transparent window, the electronic device executes the first type of event or the second type of event. The first type of event is that the creation of a preset window is forbidden, and the second type of event is that the created preset window is removed.

Description

Window processing method and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of electronic equipment, in particular to a window processing method and electronic equipment.
Background
With the development of electronic technology, an electronic device (such as a mobile phone, a tablet computer, or a smart watch) can check and kill a process of an application program which runs in a background and has a low priority, so as to reduce power consumption of the electronic device.
In the conventional technology, in order to keep running in the background of the electronic device, a transparent window may be created when the electronic device goes off the screen, so as to increase the priority of use of the application, so as to avoid the electronic device from killing the process of the application. The transparent window is displayed on an upper layer of an interface displayed by the electronic equipment in an invisible mode, and when the electronic equipment receives an operation acting on the transparent window, no event is executed.
However, when the user inputs an operation (for example, an operation of answering a call) on the interface displayed on the electronic apparatus; since the transparent window is layered on top of the interface displayed by the electronic device. Therefore, after the electronic device receives the operation input by the user, the electronic device cannot implement a corresponding function (for example, answering a call), which seriously affects the use experience of the user using the electronic device.
Disclosure of Invention
The application provides a window processing method and electronic equipment, which can ensure that the electronic equipment can respond to the operation of a user in time and improve the use experience of the user.
In a first aspect, the present application provides a window processing method, which may be applied to an electronic device running at least one application program in a background, where the at least one application program includes a first application.
According to the method, when the electronic equipment is turned off, the electronic equipment acquires a first instruction of a first application, and the first instruction is used for indicating the electronic equipment to create a preset window. Then, the electronic device may obtain attribute information of the preset window, where the attribute information of the preset window includes a pixel size and/or a transparency of the preset window, and the pixel size is used to indicate a distribution of pixel points included in the preset window. Then, the electronic device may detect whether the preset window is a transparent window according to the attribute information of the preset window. The transparent window is a window which is displayed on the upper layer of the display interface of the electronic equipment in an invisible mode and is used for keeping the application program corresponding to the transparent window alive after the electronic equipment is turned off. Then, if the preset window is a transparent window, the electronic device executes the first type of event or the second type of event. The first type of event is that the creation of a preset window is forbidden, and the second type of event is that the created preset window is removed.
It will be appreciated that a transparent window is typically a window with a higher degree of transparency and/or a smaller pixel size of the window. Therefore, in the embodiment of the present application, the electronic device may determine whether the preset window is a transparent window according to the pixel size and/or the transparency of the preset window. If the preset window is a transparent window, the electronic device may prohibit the background application from creating the window, or the electronic device may remove the window. In this way, the transparent window is not located on an upper layer of the display interface of the electronic device. When the electronic equipment receives the operation of the user, the electronic equipment can respond to the operation, so that the phenomena of screen freezing, screen flashing and the like of the electronic equipment are avoided, and the use experience of the user is improved.
With reference to the first aspect, in one possible design manner, the attribute information of the preset window includes a pixel size. If the pixel size of the preset window is smaller than the preset pixel threshold, the electronic device may determine that the preset window is a transparent window.
It will be appreciated that a transparent window is typically a window having a smaller pixel size. When the pixel size of the preset window is smaller than the preset pixel threshold, the pixel size of the preset window is smaller, and the electronic device can determine that the preset window is a transparent window.
With reference to the first aspect, in another possible design manner, the attribute information of the preset window includes transparency. If the transparency of the preset window is smaller than the preset transparency threshold, the electronic device determines that the preset window is a transparent window.
It should be noted that the smaller the transparency of the preset window is, the higher the transparency of the preset window is. The greater the transparency of the preset window, the lower the transparency of the preset window.
It will be appreciated that a transparent window is generally a window in which the window is more transparent. When the transparency of the preset window is smaller than the preset transparency threshold, it is indicated that the transparency degree of the preset window is higher, and the electronic device may determine that the preset window is a transparent window.
With reference to the first aspect, in another possible design manner, the electronic device stores at least one preset identifier, and each preset identifier in the at least one preset identifier is used to identify a transparent window that has been created in the electronic device. Before the electronic device obtains the attribute information of the preset window, the electronic device may obtain an identifier of the preset window. Then, the electronic device may detect whether the identifier of the preset window is the same as any one of the at least one preset identifier. And if the mark of the preset window is different from each preset mark in the at least one preset mark, the electronic equipment acquires the attribute information of the preset window.
That is, the electronic device may compare the identity of the preset window with the saved preset identity. When the mark of the preset window is different from each preset mark, the preset window is not a transparent window or the preset window is created for the first time. The electronic device can acquire the attribute information of the preset window and determine whether the preset window is a transparent window.
With reference to the first aspect, in another possible design manner, if the identifier of the preset window is the same as any one of the at least one preset identifier, the electronic device executes the first type of event or the second type of event, where the preset window is a transparent window.
It will be appreciated that each preset identification is used to identify a transparent window that was created in the electronic device. When the mark of the preset window is the same as any one of the preset marks, the preset window is established, and the preset window is a transparent window. Thus, the electronic device may execute either the first type of event or the second type of event. In this way, the transparent window is not located on an upper layer of the display interface of the electronic device. When the electronic equipment receives the operation of the user, the electronic equipment can respond to the operation, so that the phenomena of screen freezing, screen flashing and the like of the electronic equipment are avoided, and the use experience of the user is improved.
Moreover, the electronic device verifies whether the preset window is a transparent window through the stored preset identifier, so that the complexity of detecting whether the preset window is a transparent window by the electronic device can be reduced. In this way, the power consumption of the electronic device can be reduced.
With reference to the first aspect, in another possible design manner, the electronic device stores the number of times of creating the transparent window corresponding to each preset identifier. And if the mark of the preset window is the same as any one of the preset marks, and the creation frequency of the preset window is greater than a preset frequency threshold value, the electronic equipment executes the first type of event or the second type of event.
It can be understood that, when the creation number of the preset window is greater than the preset number threshold, it indicates that the preset window is created multiple times, and is determined as a transparent window multiple times. Therefore, when the creation times of the preset window are larger than the preset time threshold, the electronic equipment executes the preset event, the probability that the electronic equipment processes the non-transparent window can be reduced, and the accuracy of the electronic equipment in processing the transparent window is improved.
With reference to the first aspect, in another possible design manner, after a preset duration that the electronic device lights the screen, if the preset window is a transparent window, the electronic device executes the second type of event.
It can be understood that the electronic device processes the preset window after the preset duration of the bright screen, which can ensure that the first application has sufficient time to process the preset window. If the preset window is not processed by the first application, the electronic device can remove the preset window so as to avoid abnormal conditions such as screen freezing and the like of the electronic device, and the use experience of a user is guaranteed.
In a second aspect, the present application provides an electronic device comprising: a memory, a display screen, and one or more processors, the memory, display screen, and the processors coupled; the memory is for storing computer program code, the computer program code comprising computer instructions; the computer instructions, when executed by the one or more processors described above, cause the electronic device to perform the method as described in the first aspect and any possible design thereof.
In a third aspect, the present application provides a chip system, which is applied to an electronic device. The system-on-chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is configured to receive a signal from a memory of the electronic device and to transmit the signal to the processor, the signal including computer instructions stored in the memory. When executed by a processor, the computer instructions cause an electronic device to perform the method according to the first aspect and any of its possible designs.
In a fourth aspect, the present application provides a computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method according to the first aspect and any one of its possible design forms.
In a fifth aspect, the present application provides a computer program product for causing a computer to perform the method according to the first aspect and any one of its possible designs when the computer program product runs on the computer.
It should be understood that beneficial effects that can be achieved by the electronic device according to the second aspect and any one of the possible design manners of the electronic device according to the second aspect, the chip system according to the third aspect, the computer storage medium according to the fourth aspect, and the computer program product according to the fifth aspect may refer to the beneficial effects of the first aspect and any one of the possible design manners of the electronic device, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram illustrating an example of a display transparent window according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a window processing method according to an embodiment of the present disclosure;
FIG. 4 is a schematic view of an example of a transparent window provided in an embodiment of the present application;
fig. 5A is a schematic diagram illustrating an example of another display transparent window provided in an embodiment of the present application;
FIG. 5B is a flowchart of another window processing method according to an embodiment of the present disclosure;
fig. 6A is a flowchart of another window processing method provided in the present application;
FIG. 6B is a flowchart of another window processing method according to an embodiment of the present disclosure;
fig. 6C is a flowchart of another window processing method provided in the embodiment of the present application;
FIG. 7 is a flowchart of another window processing method provided in the embodiments of the present application;
FIG. 8A is a flowchart of another window processing method according to an embodiment of the present disclosure;
FIG. 8B is a flowchart of another window processing method according to an embodiment of the present disclosure;
fig. 9 is a schematic composition diagram of a window processing apparatus according to an embodiment of the present disclosure;
fig. 10 is a schematic structural component diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The "/" character in this application generally indicates that the former and latter associated objects are in an "or" relationship. For example, A/B may be understood as A or B.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "e.g.," is intended to present concepts in a concrete fashion.
In order to facilitate understanding of the technical solution of the present application, before describing the window processing method provided in the embodiments of the present application in detail, terms mentioned in the embodiments of the present application are described.
1. A transparent window.
A transparent window is a window whose window attribute is transparent and/or whose window pixels are smaller than a preset pixel (e.g., 4 pixels). The transparent window is created by an application program (which may be referred to simply as a background application) running in the background of the electronic device. The created transparent window can be displayed on the upper layer of the interface displayed by the electronic equipment in a transparent mode; that is, when the interface (e.g., the main interface) displayed by the electronic device has a transparent window on the upper layer, the transparent window does not obscure any interface element in the main interface, and the electronic device can completely display the main interface. The transparent window does not contain any elements. Typically, the transparent window is a 1-pixel transparent window. When the transparent window is displayed on the upper layer of the display interface, the display interface cannot receive the operation of the user. Thus, the application associated with the display interface cannot respond to the user's operation.
Illustratively, as shown in fig. 1, the electronic device displays an incoming call reminder interface 101, where the incoming call reminder interface 101 includes: the electronic equipment comprises an 'accept' button and a 'reject' button, wherein the 'accept' button is used for triggering the electronic equipment to put through an incoming call, and the 'reject' button is used for triggering the electronic equipment to reject the incoming call. Transparent window 102 (transparent window 102 is not actually visible in incoming call reminder interface 101, and transparent window 102 is shown in dashed line form for ease of illustration herein) is on top of incoming call reminder interface 101. If the user answers the call via the electronic device, an action A (e.g., swipe to the right, click, etc.) may be entered at the "accept" button. Since the "accept" button is on the bottom layer, the transparent window 102 is on the top layer of the "accept" button; when the user inputs operation a, the "accept" button cannot receive operation a. Thus, the electronic apparatus cannot put the incoming call in response to operation a.
That is to say, when a transparent window exists on an upper layer of a display interface of the electronic device, the electronic device may not implement a corresponding function, and a use experience of the user using the electronic device is seriously affected. In addition, the transparent window improves the use priority of the background application, so that the electronic equipment cannot check and kill the progress of the background application, and the power consumption of the electronic equipment is high.
Therefore, the embodiment of the application provides a window processing method. In the method, if the electronic device detects that the window created by the background application is a transparent window, the electronic device may prohibit the background application from creating the window, or the electronic device may remove the window. In this way, the window is not on top of the electronic device display interface. When the electronic equipment receives the operation of the user, the electronic equipment can respond to the operation, so that the phenomena of screen freezing, screen flashing and the like of the electronic equipment are avoided, and the use experience of the user is improved.
And, because the window created by the background application is not on the upper layer of the display interface of the electronic device, the priority of use of the background application is low. Therefore, the electronic equipment can check and kill the process of the background application so as to reduce the power consumption of the electronic equipment.
The application (e.g., the first application, the second application) in the embodiment of the present application may be an embedded application installed in the electronic device (i.e., a system application of the electronic device) or a downloadable application. An embedded application is an application provided as part of an implementation of an electronic device, such as a cell phone. The downloadable application is an application that can provide its own Internet Protocol Multimedia Subsystem (IMS) connection, and may be an application pre-installed in the terminal or a third party application that can be downloaded by the user and installed in the terminal.
The application may be, for example, an embedded application installed in the terminal (i.e., a system application of the terminal). For example, the first application may be an alarm clock and the second application may be a calendar.
For another example, the plurality of applications may be downloadable applications. The first application may be a social application and the second application may be a multimedia application.
For example, the electronic device in the embodiment of the present application may be a tablet computer, a mobile phone, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) \ Virtual Reality (VR) device, a vehicle-mounted device, and the like, and the embodiment of the present application does not particularly limit the specific form of the electronic device.
The execution main body of the window processing method provided by the application can be a window processing device, and the execution device can be the electronic equipment shown in fig. 2. Meanwhile, the execution device may also be a Central Processing Unit (CPU) of the electronic device, or a control module for Processing a window in the electronic device. In the embodiment of the present application, a method for processing a window executed by an electronic device is taken as an example, and the method for processing a window provided in the embodiment of the present application is described.
Referring to fig. 2, the electronic device provided in the present application is described herein by taking the electronic device as the mobile phone 200 shown in fig. 2 as an example. Therein, the cell phone 200 shown in fig. 2 is only one example of an electronic device, and the cell phone 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
As shown in fig. 2, the handset 200 may include: the mobile communication device includes a processor 210, an external memory interface 220, an internal memory 221, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display 294, and a Subscriber Identity Module (SIM) card interface 295.
The sensor module 280 may include a pressure sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
Processor 210 may include one or more processing units, such as: processor 210 may include a modem processor, a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be the neural center and command center of the cell phone 200. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that have just been used or recycled by processor 210.
In some embodiments, processor 210 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, among others.
The charge management module 240 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. The charging management module 240 may also supply power to the electronic device through the power management module 241 while charging the battery 242.
The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charge management module 240 to power the processor 210, the internal memory 221, and the wireless communication module 260, among other things. In some embodiments, the power management module 241 and the charging management module 240 may also be disposed in the same device.
The wireless communication function of the mobile phone 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, the baseband processor, and the like. In some embodiments, antenna 1 of handset 200 is coupled to mobile communication module 250 and antenna 2 is coupled to wireless communication module 260, such that handset 200 may communicate with networks and other devices via wireless communication techniques.
The mobile communication module 250 may provide a solution including 2G/3G/4G/5G wireless communication applied to the handset 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, and the like. The mobile communication module 250 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 250 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The wireless communication module 260 may provide a solution for wireless communication applied to the mobile phone 200, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity, Wi-Fi) networks), Near Field Communication (NFC), Infrared (IR) technologies, and the like. For example, in the embodiment of the present application, the mobile phone 200 may access a Wi-Fi network through the wireless communication module 260.
The wireless communication module 260 may be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 210.
The display screen 294 is used to display images, video, and the like. The display screen 294 includes a display panel. For example, in the present embodiment, the display screen 294 may be used to display a lock screen interface, a main interface, and the like.
The mobile phone 200 may implement a shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor. The ISP is used to process the data fed back by the camera 293. The camera 293 is used to capture still images or video. In some embodiments, handset 200 may include 1 or N cameras 293, N being a positive integer greater than 1.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the mobile phone 200.
Internal memory 221 may be used to store computer-executable program code, including instructions. The processor 210 executes various functional applications and data processing of the cellular phone 200 by executing instructions stored in the internal memory 221.
The mobile phone 200 can implement an audio function through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor. Such as music playing, recording, etc.
The keys 290 include a power-on key, a volume key, etc. The motor 291 can be used for both incoming call vibration prompting and touch vibration feedback. Indicator 292 may be an indicator light that may be used to indicate a state of charge, a change in charge, or may be used to indicate a message, missed call, notification, etc. The SIM card interface 295 is used to connect a SIM card.
Although not shown in fig. 2, the mobile phone 200 may also be a flash, a micro-projector, a Near Field Communication (NFC) device, etc., and will not be described herein.
It is to be understood that the structure illustrated in the present embodiment does not specifically limit the mobile phone 200. In other embodiments, handset 200 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The methods in the following embodiments may be implemented in an electronic device having the above hardware structure and the above system architecture.
In this embodiment of the application, when the electronic device extinguishes the screen of the electronic device, the background application of the electronic device may create a preset window on an upper layer of a display interface of the electronic device. And then, the electronic device can detect whether the preset window is a transparent window or not, and process the preset window, so that the preset window does not exist on the upper layer of the display interface of the electronic device.
As shown in fig. 3, an embodiment of the present application provides a method for processing a window, which may include S301 to S304.
S301, the electronic equipment acquires a first instruction of the first application.
The electronic equipment comprises an electronic equipment body and a first application, wherein at least one application program runs in the background of the electronic equipment body, and the first application is any one of the at least one application program running in the background of the electronic equipment body. The first instruction is used for instructing the electronic equipment to create a preset window.
In one possible implementation manner, when the electronic device extinguishes the screen of the electronic device, a first application of the electronic device may issue a first instruction to instruct the electronic device to create a preset window. Exemplarily, the electronic device is taken as a mobile phone. The mobile phone may extinguish the screen in response to an operation of the user on the power key (or the mobile phone receives the operation of the user for a long time). When the mobile phone is OFF SCREEN, the operating system of the mobile phone may broadcast a SCREEN-OFF message (e.g., SCREEN _ OFF) indicating that the mobile phone has been OFF SCREEN, which an application (e.g., the first application) running in the background of the mobile phone may listen to. Thereafter, the first application may receive the screen-off message and issue a first instruction to instruct the electronic device to create a preset window. (such as the transparent window 102 shown in fig. 1).
It is understood that the first application may increase the priority of use of the first application after the preset window is created on the display interface of the electronic device. Therefore, the probability of the electronic equipment for checking and killing the first application can be reduced, and the first application is guaranteed to continuously run in the background of the electronic equipment.
S302, the electronic equipment detects whether the preset window is a transparent window.
The transparent window is a window which is displayed on the upper layer of the display interface of the electronic device in an invisible mode and is used for keeping alive the application program corresponding to the transparent window (namely the application program which sends an instruction to create the transparent window) after the electronic device is turned off.
In the embodiment of the application, the electronic device may obtain attribute information of the preset window. After that, the electronic device may detect whether the preset window is a transparent window.
In some embodiments, the attribute information of the preset window includes a pixel size, and the pixel size is used to indicate a distribution of pixel points included in the preset window. The pixel size includes at least one of: a first pixel size, a second pixel size, and a third pixel size. The first pixel size is used for indicating the pixel size of the long side of the preset window, the second pixel size is used for indicating the pixel size of the short side of the preset window, and the third pixel size is used for indicating the pixel size of the preset window. Illustratively, as shown in fig. 4, the long side of the preset window 401 is 3 pixels, the short side of the preset window is 1 pixel, and the preset window is 3 pixels. The method of the embodiments of the present application is described below by taking as an example that the pixel size includes a first pixel size and a second pixel size.
In one possible implementation, the electronic device may obtain a pixel size of a preset window and compare the pixel size with a preset pixel threshold. The preset pixel threshold is not limited in the embodiment of the present application, and the preset pixel threshold may be 1 pixel, 5 pixels, 10 pixels, and the like. If the pixel size is smaller than the preset pixel threshold value, the electronic device determines that the preset window is a transparent window. For example, if the predetermined pixel threshold is 10 pixels. Referring to fig. 4, both the first pixel size and the second pixel size of the preset window 401 are smaller than 10 pixels, and the electronic device may determine that the preset window 401 is a transparent window.
It will be appreciated that typically, the windows created by the application will contain some content information and the windows will not be too small. When the preset window is smaller, the electronic device may determine that the preset window is a transparent window. Therefore, the accuracy of the electronic equipment for judging the transparent window can be improved.
If the pixel size is larger than the preset pixel threshold value, the electronic device determines that the preset window is a non-transparent window. The non-transparent window is a window other than the transparent window, such as a short message window, an update message window, and the like. For example, if the first pixel size of the predetermined window (e.g., the update message window) is 1000 pixels, the second pixel size is 505 pixels, and the predetermined pixel threshold is 10 pixels. The first pixel size and the second pixel size of the preset window are both larger than 10 pixels, and the electronic device can determine that the preset window is a non-transparent window.
It should be noted that, in the embodiment of the present application, the first pixel size and the second pixel size may also correspond to different preset pixel thresholds, which is not limited in the embodiment of the present application. Illustratively, the preset pixel threshold includes a preset pixel threshold a (e.g., 10 pixels) and a preset pixel threshold b (e.g., 5 pixels), where the preset pixel threshold a corresponds to a first pixel threshold and the preset pixel threshold b corresponds to a second pixel threshold.
In some embodiments, the attribute information of the preset window includes transparency. The electronic device may determine whether the preset window is a transparent window according to the transparency of the preset window.
In the embodiment of the present application, the value range of the transparency is not limited. For example, the transparency may be between 0 and 100. For another example, the transparency can be between 0 and 50. In the embodiment of the application, the smaller the value of the transparency is, the higher the transparency degree of the preset window is; the larger the value of the transparency is, the lower the transparency degree of the preset window is. Illustratively, the transparency is assumed to be between 0 and 100. When the transparency of the preset window is 0, the preset window may be the transparent window 102 shown in fig. 1, that is, the transparent window 102 is uncovered on the lower incoming call reminder interface 101. That is, the user may see a "receive" button or the like through the electronic device. When the transparency of the preset window is 100, the preset window may be a window 501 as shown in fig. 5A, and the window 501 covers the lower incoming call reminder interface 101. That is, the user cannot see the "accept" button or the like at the bottom of the window 501 through the electronic device.
In a possible implementation manner, the electronic device may obtain the transparency of the preset window, and compare the transparency with a preset transparency threshold. The preset transparent threshold is not limited in the embodiment of the present application. For example, the preset transparency threshold may be 1. For another example, the transparency threshold may be 1.1. If the transparency of the preset window is smaller than the preset transparency threshold, the electronic device determines that the preset window is a transparent window. For example, if the preset transparency threshold is 1, the transparency of the preset window is 0; the electronic device determines that the preset window is a transparent window.
If the transparency of the preset window is larger than the preset transparency threshold, the electronic device determines that the preset window is a non-transparent window. For example, if the preset transparency threshold is 1, the transparency of the preset window is 50; the electronic device determines that the preset window is a non-transparent window.
It will be appreciated that, in general, a window created by an application may contain some information, and the transparency of the window may be high in order to facilitate the user's viewing and manipulation of the window. When the transparency of the window is low, the electronic device may determine that the window is a transparent window. Therefore, the accuracy of the electronic equipment for judging the transparent window can be improved.
In some embodiments, the attribute information of the preset window may include a window style. The electronic device may determine whether the preset window is a transparent window according to a window style of the preset window. Specifically, the electronic device may obtain a window style of the preset window. If the window style is a preset style (e.g., a transparent style), the electronic device determines that the preset window is a transparent window. If the window style is not the transparent style, the electronic device determines that the preset window is a non-transparent window.
It will be appreciated that by checking the window style of the window, the electronic device can determine whether the window is a transparent window. Therefore, the accuracy of the electronic equipment for judging the transparent window can be improved.
In some embodiments, the attribute information of the preset window may include at least two of: pixel size, transparency, window style. If any attribute information of the preset window meets the preset condition, the electronic device can determine that the preset window is a transparent window. For the specific description of the preset condition corresponding to each attribute information, reference may be made to the above description, which is not repeated herein. For example, as shown in fig. 5B, the mobile phone may obtain attribute information of the preset window. Then, the mobile phone can respectively determine whether the pixel size of the window is smaller than a preset pixel threshold, whether the transparency of the preset window is smaller than a preset transparency threshold, and whether the window style of the preset window is a transparent style, and determine whether the preset window is a transparent window. For example, if the attribute information includes a pixel size and transparency; the first pixel size of the preset window is 15, the second pixel size is 11, and the preset pixel threshold is 10 pixels; the transparency of the preset window is 0, and the preset transparency threshold is 1. In summary, the pixel size of the preset window does not meet the preset condition, the transparency meets the preset condition, and the electronic device can determine that the preset window is a transparent window.
It can be understood that, when any attribute information of the window meets the preset condition, the electronic device can divide the window into transparent windows to the greatest extent, and then process the window, so as to ensure that the electronic device can normally operate.
In other embodiments, the attribute information of the preset window may include at least two of: pixel size, transparency, window style. If the attribute information of the preset window meets the preset condition, the electronic device may determine that the preset window is a transparent window. For the specific description of the preset condition corresponding to each attribute information, reference may be made to the above description, which is not repeated herein.
It can be understood that, when each attribute information of the window meets the preset condition, the electronic device can accurately identify the transparent window, and the identification rate of the transparent window is improved. Therefore, the non-transparent window can be prevented from being processed, and the use experience of a user is guaranteed.
In some embodiments, before the electronic device detects whether the preset window is a transparent window, the electronic device may determine whether the first application creates the preset window. If the first application creates the preset window, the electronic device executes S302.
In this embodiment, if the predetermined window is a non-transparent window, the electronic device may execute S303. If the predetermined window is a transparent window, the electronic device may execute S304.
And S303, the electronic equipment displays a preset window on the upper layer of the display interface.
Illustratively, when the electronic device extinguishes the screen, the display interface displayed by the electronic device is the main interface. The preset window created by the first application may be displayed in an invisible form on an upper layer of the main interface. And after the electronic device extinguishes the screen, the electronic device may display a screen locking interface, which may be on an upper layer of the preset window.
S304, the electronic equipment executes a preset event.
The electronic device executes the preset event so that the upper layer of the display interface does not include the preset window. The preset events may include a first type of event and a second type of event. The first type of event is used for indicating that the creation of the preset window is forbidden, and the second type of event is used for indicating that the preset window is removed.
It should be noted that, in the embodiment of the present application, a manner of removing the preset window by the electronic device is not limited. For example, the electronic device may obtain an identifier of the preset window, and remove the preset window by a Finish method or a Destroy method. For another example, the electronic device may remove a task corresponding to a preset window from a window task stack, where tasks corresponding to respective windows displayed by the electronic device are stored in the window task stack. For another example, the electronic device may obtain a process number of the first application and call a clean-up interface (e.g., a KillProcess interface) to kill the process of the first application. For another example, the electronic device may create a new display interface (e.g., a home interface) that is on top of the default window.
It is understood that after the electronic device executes the preset event, the upper layer of the display interface of the electronic device does not include the preset window. In this way, the display interface may receive an operation input by the user, so that the electronic device responds. Therefore, abnormal conditions such as screen freezing of the electronic equipment can be avoided, and the use experience of a user is guaranteed.
In this embodiment of the application, when the preset event is a first type event, the electronic device may execute the first type event in a process of creating a preset window by the first application. For example, the first application may create a preset window when the electronic device is off the screen. In the process of creating the preset window by the first application, if the electronic device detects that the preset window is a transparent window, the electronic device prohibits the first application from creating the preset window.
That is, the first application has not successfully created the preset window. Thus, no transparent window exists on the upper layer of the display interface of the electronic device. Therefore, abnormal conditions such as screen freezing and the like of the electronic equipment can be avoided. And, since the preset window created by the first application is not on the upper layer of the display interface of the electronic device, the priority of use of the first application is low. Therefore, the electronic equipment can check and kill the process of the background application so as to reduce the power consumption of the electronic equipment.
It should be noted that, the second type of event is used to indicate that the preset window is removed. That is, in the embodiment of the present application, when the electronic device executes the second type of event, the first application has already completed creating the preset window. That is, the electronic device may execute the second type event after executing S303.
In some embodiments, when the preset event is a second type event, the electronic device may execute the second type event in response to a bright screen operation of the user. For example, as shown in fig. 6A, when the mobile phone is turned off, the first application may issue the first instruction after monitoring the screen-off message. Then, the mobile phone can detect whether the preset window is a transparent window. If the preset window is a transparent window, the mobile phone can mark the preset window and create the preset window. And if the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on screen, the mobile phone can detect whether the background application creates a window when the screen is off. If the mobile phone has created a window, the mobile phone may detect whether the window (e.g., a predetermined window) is a transparent window. If the preset window is a transparent window, the mobile phone removes the preset window. If the preset window is not a transparent window, the mobile phone does not process the window.
Wherein the cell phone indicia of the window is used to indicate that the cell phone is saving a record of the transparent window created upon the screen being turned off. For example, the handset may save window creation information that includes an identification of the window. Therefore, when the mobile phone is on the screen, the mobile phone can determine whether the electronic equipment creates a window when the screen is off according to the creation information.
It should be noted that, in a normal case, when the electronic device is turned on, the operating system of the electronic device may broadcast a screen-on message (for example, create _ OFF, USER _ PRESENT, etc.). The first application may remove the preset window after receiving the bright screen message. However, the preset window may be displayed on an upper layer of the display interface of the electronic device because the first application does not remove the preset window when the electronic device is turned on due to some factors (e.g., the first application does not receive the screen-up message).
In some embodiments, when the preset event is the second type of event, before the electronic device detects whether the preset window is a transparent window, the electronic device may detect whether a window exists in an upper layer of the display interface. Illustratively, as shown in fig. 6B, before S302, the processing method of the window may include S601.
S601, the electronic equipment detects whether a window exists in the upper layer of the display interface.
In one possible design, if a window exists on the upper layer of the display interface (e.g., the window includes a preset window created by the first application), the electronic device performs S302. If the window does not exist in the upper layer of the display interface, the background application is indicated to remove the created window.
It can be understood that, if no window exists on the upper layer of the display interface, the electronic device does not need to detect whether the window is a transparent window and process the window.
It should be noted that, after receiving the bright screen message, the first application may remove the preset window. However, the electronic device may detect the presence of the transparent window in the upper layer of the display interface when the electronic device is bright due to some factor (e.g., the first application does not receive the bright screen message), and when the electronic device is bright, there is a delay in removing the preset window by the first application (e.g., removing the preset window after 0.8 seconds of bright screen).
In some embodiments, when the preset event is the second type of event, the electronic device may remove the preset window after a preset duration of lighting the screen. Illustratively, the first application creates a preset window. Then, the electronic device is turned on, and a transparent window (for example, a first preset window) is detected to exist on the upper layer of the display interface. Then, after the screen is turned on for a preset duration (e.g., 1 second), the electronic device may detect whether the preset window exists on the upper layer of the display interface again, and if the electronic device detects that the preset window exists on the upper layer of the display interface, detect whether the preset window is a transparent window. In the case that the preset window is a transparent window, the electronic device may remove the preset window.
For example, as shown in fig. 6C, when the mobile phone is turned off, after the first application monitors the screen-off message, the mobile phone may be instructed to create the preset window. Then, the mobile phone can detect whether the preset window is a transparent window. If the preset window is a transparent window, the mobile phone can mark the preset window and create the preset window. And if the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on screen, the mobile phone can detect whether a window is created when the mobile phone is off screen. If the mobile phone creates the window, the mobile phone can detect whether a transparent window exists on the upper layer of the display interface. If the upper layer of the display interface has the transparent window, the mobile phone can detect whether the upper layer of the display interface has the transparent window again after N seconds (for example, 1.1 seconds). If the transparent window exists on the upper layer of the display interface, the mobile phone can remove the transparent window.
It should be noted that, in the embodiment of the present application, a process of removing the preset window after the preset duration of the electronic device being on the screen is not limited. For example, the electronic device may define a preset thread and a preset queue. When the electronic device detects the transparent window, a preset task can be sent to the message queue, and the preset task is used for indicating that the transparent window is removed when the transparent window is detected after a preset time length. After the preset duration of the electronic device being on the screen, the preset thread may execute the preset task.
It can be understood that the electronic device processes the preset window after the preset duration of the bright screen, which can ensure that the first application has sufficient time to process the preset window. If the preset window is not processed by the first application, the electronic device can remove the preset window so as to avoid abnormal conditions such as screen freezing and the like of the electronic device, and the use experience of a user is guaranteed.
It should be noted that, in the embodiment of the present application, each window may correspond to one identifier. The window identifier is not limited in the embodiments of the present application. For example, the identification may be a window name, a window identification number (ID), and the like.
In some embodiments, the electronic device may store an exception window list, where at least one preset identifier is stored in the exception window list, and each preset identifier in the at least one preset identifier is used to identify a transparent window that was created in the electronic device. Before the electronic device obtains the attribute information of the preset window, the electronic device may determine whether the preset window is a transparent window according to the identifier of the preset window and the abnormal window list. As shown in fig. 7, before S302, the processing method of the window further includes S701 to S703.
S701, the electronic equipment obtains the mark of the preset window.
S702, the electronic equipment detects whether the mark of the preset window is the same as any preset mark in at least one preset mark.
For example, please refer to table 1, which shows that the window saved by the electronic device is an identifier (i.e. a preset identifier) of the transparent window.
TABLE 1
Preset identification
A01
A11
A15
That is, the window identified as a01, a11, or a15 is a transparent window. For example, if the identifier of the preset window is a11, the electronic device may determine that the same identifier as the identifier of the preset window exists in the identifier of the at least one window.
In a possible design, if the identifier of the preset window is the same as any one of the preset identifiers, the electronic device performs S703. If the identifier of the preset window is different from any one of the at least one preset identifier, the electronic device executes S302. Optionally, after the electronic device executes S302, if the preset window is a transparent window, the electronic device may store the identifier of the preset window to the abnormal window list.
Therefore, when the electronic device detects the preset window again, the preset window can be determined to be the transparent window according to the mark of the preset window, and the complexity of detecting whether the preset window is the transparent window by the electronic device is reduced.
S703, the electronic device determines that the preset window is a transparent window and executes a preset event.
In some embodiments, the electronic device may execute the first type of event during the creation of the preset window by the first application. For example, the first application may create a preset window when the electronic device is off the screen. In the process of creating the preset window by the first application, the electronic device determines that the preset identifier stored in the electronic device has an identifier identical to the identifier of the preset window, and the electronic device may prohibit the first application from creating the preset window.
In some embodiments, the electronic device may execute the second type of event after the first application has created the preset window. For example, the first application may complete creating the preset window when the electronic device is off the screen. When the electronic device lights the screen, the electronic device detects that the identifier identical to the identifier of the preset window exists in the at least one preset identifier, and the electronic device can remove the preset window.
It can be understood that the electronic device checks whether the preset window is a transparent window through the stored preset identifier, and the complexity of detecting whether the preset window is a transparent window by the electronic device can be reduced. In this way, the power consumption of the electronic device can be reduced.
In some embodiments, the exception window list saved by the electronic device may further include the number of times of creating the transparent window corresponding to each preset identifier, and a correspondence (which may be referred to as a first correspondence) exists between the number of times of creating the transparent window corresponding to each preset identifier and each preset identifier. In the case that the preset window is a transparent window, the electronic device may determine whether to execute the preset event according to the number of times of creation corresponding to the identifier of the preset window. As shown in fig. 8A, S703 may include S801-S802.
S801, the electronic device judges whether the creation times of the preset window are larger than a preset time threshold value.
In a possible implementation manner, under the condition that the electronic device stores the identifier of the preset window, after the electronic device obtains the identifier of the preset window, the electronic device may determine the number of times of creating the preset window according to the identifier of the preset window and the first corresponding relationship. Thereafter, the electronic device may compare the number of times of creation of the preset window with a preset number threshold.
In a possible design, if the number of times of creating the preset window is greater than the preset number threshold, the electronic device may execute S802.
For example, referring to table 2 in conjunction with table 1, a relationship between the creation times of the transparent windows corresponding to the preset identifiers and the preset identifiers is shown.
TABLE 2
Preset identification Number of times of creation
A01 5
A11 1
A15 10
That is, the number of creation times of the transparent window identified as a01 is 5, the number of creation times of the transparent window identified as a11 is 1, and the number of creation times of the transparent window identified as a15 is 10. If the predetermined number threshold is 3. When the identifier of the preset window is a01, the electronic device executes S802.
S802, the electronic equipment executes a preset event.
It can be understood that, when the creation number of the preset window is greater than the preset number threshold, it indicates that the preset window is created multiple times, and is determined as a transparent window multiple times. Therefore, when the creation times of the preset window are larger than the preset time threshold, the electronic equipment executes the preset event, the probability that the electronic equipment processes the non-transparent window can be reduced, and the accuracy of the electronic equipment in processing the transparent window is improved.
Optionally, if the number of times of creating the preset window is greater than the preset number threshold, the electronic device may update the number of times of creating the preset window. Illustratively, suppose the preset number threshold is 3. With reference to table 2, when the identifier of the preset window is a01, the electronic device may update the number of creation times corresponding to a01 to 6.
It should be noted that, for the description of the process of executing the preset event by the electronic device, reference may be made to the description of executing the preset event by the electronic device in S304 and S703, which is not described herein again.
Optionally, in S801, if the creation number of the preset window is smaller than the preset number threshold, the electronic device may execute S803.
And S803, the electronic equipment updates the creation times of the preset window.
Illustratively, suppose the preset number threshold is 3. With reference to table 2, when the identifier of the preset window is a11, the electronic device may update the number of creation times corresponding to a01 to 2. Therefore, the electronic equipment can update the times of creating the transparent window in real time conveniently, and the electronic equipment can process the transparent window with higher creating times so as to ensure that the electronic equipment can normally operate.
S801 to S803 will be described below with reference to fig. 8B. Taking the electronic device as an example of a mobile phone, when the mobile phone turns off the screen, the first application may send a first instruction after monitoring the screen turning-off message. Then, the mobile phone can determine that the creation times of the preset window is greater than a preset time threshold according to the abnormal window list. And if the creation times of the preset window are larger than the preset time threshold, the mobile phone forbids to create the preset window. If the creation times of the preset window are smaller than the preset time threshold, the electronic device detects whether the preset window is a transparent window. If the preset window is a transparent window, the mobile phone can mark the preset window and create the preset window. And if the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on the screen, the first application monitors the screen-on message, and the preset window can be destroyed. If the first application destroys the preset window, the mobile phone detects whether the preset window is a transparent window. And if the preset window is a transparent window, the mobile phone updates the establishing times of the preset window. If the first application does not destroy the preset window, the mobile phone determines whether the creation times of the preset window are greater than a preset time threshold value according to the abnormal window list. And if the creation times of the preset window are greater than the preset time threshold, removing the preset window by the mobile phone. If the creation times of the preset window are smaller than the preset time threshold, the mobile phone detects whether the preset window is a transparent window. And if the preset window is a transparent window, the mobile phone updates the times of creating the preset window in the abnormal window list. If the preset window is a non-transparent window, the mobile phone does not process the preset window.
In some embodiments, the electronic device may upload the exception window information to a cloud server. The exception window information may include: and presetting the identification or the first corresponding relation. Optionally, the exception window information may further include: a package name of an application creating the transparent window, a process ID of the application creating the transparent window, a version of the application creating the transparent window, attribute information of the transparent window, and the like. The embodiment of the present application does not limit the exception window information. And then, the cloud server determines a preset event according to the abnormal window information and sends the preset event to the electronic equipment. After the electronic device receives the preset event, the preset event can be executed. Optionally, the cloud server may send the exception window information to other electronic devices.
It can be understood that, the electronic device shares the abnormal window information with the cloud server, so that other electronic devices can also obtain the abnormal window information. Therefore, the transparent window can be accurately identified and processed by other electronic equipment, and normal operation of the electronic equipment can be guaranteed.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of electronic equipment. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those skilled in the art will readily appreciate that the steps of a method of processing a window of the examples described in connection with the embodiments disclosed herein may be implemented in hardware or a combination of hardware and computer software. Whether a function is performed as hardware or as software driven hardware in an electronic device depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the functional modules or the functional units may be divided according to the method example, for example, each functional module or functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module or a functional unit. The division of the modules or units in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Please refer to fig. 9, which illustrates a schematic diagram of a window processing apparatus according to an embodiment of the present application. The processing device of the window may be a functional module in the above-mentioned electronic device (e.g. the mobile phone 200) for implementing the method of the embodiment of the present application. As shown in fig. 9, the processing means of the window may include: an acquisition module 901, a processing module 902 and an exception window management module 903.
The obtaining module 901 is configured to support the mobile phone 200 to execute: data (e.g., window identification, attribute information, etc.) in the handset 200 is obtained. For example, the obtaining module 901 is used to support the handset 200 to execute S701 in the above method embodiment, and/or other processes for the technology described herein.
The processing module 902 is configured to support the handset 200 to perform: verifying the data information, determining an event executed by the electronic device, and executing the event. For example, the processing module 902 is configured to enable the handset 200 to perform S302, S304, S601, S702, S703, S801 in the above-described method embodiments, and/or other processes for the techniques described herein.
The exception window management module 903 is used for supporting the mobile phone 200 to execute: and managing the information of the transparent window and interacting data with the cloud server. For example, the exception window management module 903 is configured to support the mobile phone 200 to perform S803 in the foregoing method embodiment, upload the exception window information in the mobile phone 200 to the cloud server, receive the exception window information and the preset event from the cloud server, and/or perform other processes for the technology described herein.
Other embodiments of the present application provide an electronic device (e.g., a mobile phone 200 shown in fig. 2) having a plurality of preset applications installed therein. The electronic device may include: a memory and one or more processors. The memory is coupled to the processor. The electronic device may further include a camera. Or, the electronic device may be externally connected with a camera. The memory is for storing computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform various functions or steps performed by the mobile phone in the above-described method embodiments. The structure of the electronic device may refer to the structure of the cellular phone 200 shown in fig. 2.
The embodiment of the present application further provides a chip system, as shown in fig. 10, the chip system includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 may be interconnected by wires. For example, the interface circuit 1002 may be used to receive signals from other devices (e.g., a memory of an electronic device). Also for example, the interface circuit 1002 may be used to send signals to other devices, such as the processor 1001. Illustratively, the interface circuit 1002 may read instructions stored in the memory and send the instructions to the processor 1001. The instructions, when executed by the processor 1001, may cause an electronic device (such as the cell phone 200 shown in fig. 2) to perform the steps in the above-described embodiments. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are run on the electronic device (e.g., the mobile phone 200 shown in fig. 2), the electronic device is caused to perform various functions or steps performed by the mobile phone in the foregoing method embodiment.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute each function or step executed by the mobile phone in the above method embodiments.
Through the description of the above embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. The window processing method is applied to an electronic device, at least one application program runs in a background of the electronic device, and the at least one application program comprises a first application; the method comprises the following steps:
when the electronic equipment is turned off, the electronic equipment acquires a first instruction of the first application, wherein the first instruction is used for indicating the electronic equipment to create a preset window;
the electronic equipment acquires attribute information of the preset window, wherein the attribute information of the preset window comprises the pixel size and/or the transparency of the preset window, and the pixel size is used for indicating the distribution condition of pixel points included by the preset window;
the electronic equipment detects whether the preset window is a transparent window or not according to the attribute information of the preset window; the transparent window is a window which is displayed on the upper layer of the display interface of the electronic equipment in an invisible mode and is used for keeping the application program corresponding to the transparent window alive after the electronic equipment is turned off;
if the preset window is the transparent window, the electronic equipment executes a first type of event or a second type of event;
the first type of event is that the creation of the preset window is forbidden, and the second type of event is that the created preset window is removed.
2. The method according to claim 1, wherein the attribute information of the preset window includes a pixel size, and the detecting whether the preset window is a transparent window according to the attribute information of the preset window includes:
if the pixel size of the preset window is smaller than a preset pixel threshold value, the electronic device determines that the preset window is the transparent window.
3. The method according to claim 1 or 2, wherein the attribute information of the preset window includes transparency, and the detecting whether the preset window is a transparent window according to the attribute information of the preset window includes:
if the transparency of the preset window is smaller than a preset transparency threshold, the electronic device determines that the preset window is the transparent window.
4. The method according to any one of claims 1-3, wherein the electronic device stores at least one preset identifier, and each preset identifier of the at least one preset identifier is used for identifying one transparent window that has been created in the electronic device; before the electronic device acquires the attribute information of the preset window, the method further includes:
the electronic equipment acquires the identifier of the preset window;
the electronic equipment detects whether the mark of the preset window is the same as any preset mark in the at least one preset mark;
the method for acquiring the attribute information of the preset window by the electronic equipment comprises the following steps:
and if the mark of the preset window is different from each preset mark in the at least one preset mark, the electronic equipment acquires the attribute information of the preset window.
5. The method of claim 4, further comprising:
and if the identifier of the preset window is the same as any one of the preset identifiers, the electronic equipment executes the first type of event or the second type of event, wherein the preset window is the transparent window.
6. The method according to claim 5, wherein the electronic device stores the number of creation times of the transparent window corresponding to each preset identifier;
if the identifier of the preset window is the same as any one of the preset identifiers, the electronic device executes the first type of event or the second type of event, including:
and if the identifier of the preset window is the same as any one of the preset identifiers, and the creation frequency of the preset window is greater than a preset frequency threshold value, the electronic equipment executes the first type event or the second type event.
7. The method according to any one of claims 1-6, wherein if the predetermined window is the transparent window, the electronic device executes the second type of event, including:
after the preset duration of lighting the screen by the electronic device, if the preset window is the transparent window, the electronic device executes the second type of event.
8. An electronic device, characterized in that the electronic device comprises: a memory, a display screen, and one or more processors; the memory, the display screen, and the processor, the memory to store computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to:
when the electronic equipment is turned off, acquiring a first instruction of a first application, wherein the first instruction is used for indicating the electronic equipment to create a preset window, and the first application is any application program running in the background of the electronic equipment;
acquiring attribute information of the preset window, wherein the attribute information of the preset window comprises the pixel size and/or the transparency of the preset window, and the pixel size is used for indicating the distribution condition of pixel points included in the preset window;
detecting whether the preset window is a transparent window or not according to the attribute information of the preset window; the transparent window is a window which is displayed on the upper layer of the display interface of the electronic equipment in an invisible mode and is used for keeping the application program corresponding to the transparent window alive after the electronic equipment is turned off;
if the preset window is the transparent window, executing a first type event or a second type event;
the first type of event is that the creation of the preset window is forbidden, and the second type of event is that the created preset window is removed.
9. The electronic device according to claim 8, wherein the attribute information of the preset window includes a pixel size; the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
and if the pixel size of the preset window is smaller than a preset pixel threshold value, determining that the preset window is the transparent window.
10. The electronic device according to claim 8 or 9, wherein the attribute information of the preset window includes a transparency; the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
and if the transparency of the preset window is smaller than a preset transparency threshold, determining that the preset window is the transparent window.
11. The electronic device according to any one of claims 8-10, wherein the electronic device stores at least one preset identifier, and each preset identifier of the at least one preset identifier is used for identifying one transparent window that has been created in the electronic device;
the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
acquiring an identifier of the preset window;
detecting whether the mark of the preset window is the same as any preset mark in the at least one preset mark;
and if the mark of the preset window is different from each preset mark in the at least one preset mark, acquiring the attribute information of the preset window.
12. The electronic device of claim 11, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
and if the identifier of the preset window is the same as any one of the preset identifiers, executing the first type of event or the second type of event, wherein the preset window is the transparent window.
13. The electronic device according to claim 12, wherein the electronic device stores the number of times of creating the transparent window corresponding to each preset identifier;
the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
and if the mark of the preset window is the same as any one of the preset marks, and the creation times of the preset window is greater than a preset time threshold, executing the first type event or the second type event.
14. The electronic device of any of claims 8-13, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
and after the preset duration of lighting the screen by the electronic equipment, if the preset window is the transparent window, executing the second type of event.
15. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-7.
CN202110432625.5A 2021-04-21 2021-04-21 Window processing method and electronic equipment Active CN113282361B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211085269.5A CN115543500B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment
CN202110432625.5A CN113282361B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110432625.5A CN113282361B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211085269.5A Division CN115543500B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113282361A true CN113282361A (en) 2021-08-20
CN113282361B CN113282361B (en) 2022-09-23

Family

ID=77277114

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110432625.5A Active CN113282361B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment
CN202211085269.5A Active CN115543500B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202211085269.5A Active CN115543500B (en) 2021-04-21 2021-04-21 Window processing method and electronic equipment

Country Status (1)

Country Link
CN (2) CN113282361B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879896A (en) * 2022-07-08 2022-08-09 荣耀终端有限公司 Screen freezing processing method, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN107797841A (en) * 2017-11-21 2018-03-13 广东欧珀移动通信有限公司 Window control method, apparatus, terminal device and storage medium
CN107861857A (en) * 2017-11-09 2018-03-30 上海触乐信息科技有限公司 Screen virtual shade control method, device and terminal device in a kind of terminal device
CN107885309A (en) * 2017-11-30 2018-04-06 河南浩德科技有限公司 Application management method, device, mobile terminal and computer-readable storage medium
CN109753425A (en) * 2017-11-06 2019-05-14 腾讯科技(深圳)有限公司 Pop-up processing method and processing device
CN110309647A (en) * 2019-06-28 2019-10-08 北京金山安全软件有限公司 Processing method and device for application program, electronic equipment and storage medium
CN111753191A (en) * 2020-06-04 2020-10-09 珠海豹趣科技有限公司 Advertisement popup intercepting method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240791B (en) * 2018-09-25 2022-03-11 Oppo广东移动通信有限公司 Application program display method, application program display device and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN109753425A (en) * 2017-11-06 2019-05-14 腾讯科技(深圳)有限公司 Pop-up processing method and processing device
CN107861857A (en) * 2017-11-09 2018-03-30 上海触乐信息科技有限公司 Screen virtual shade control method, device and terminal device in a kind of terminal device
CN107797841A (en) * 2017-11-21 2018-03-13 广东欧珀移动通信有限公司 Window control method, apparatus, terminal device and storage medium
CN107885309A (en) * 2017-11-30 2018-04-06 河南浩德科技有限公司 Application management method, device, mobile terminal and computer-readable storage medium
CN110309647A (en) * 2019-06-28 2019-10-08 北京金山安全软件有限公司 Processing method and device for application program, electronic equipment and storage medium
CN111753191A (en) * 2020-06-04 2020-10-09 珠海豹趣科技有限公司 Advertisement popup intercepting method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879896A (en) * 2022-07-08 2022-08-09 荣耀终端有限公司 Screen freezing processing method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115543500A (en) 2022-12-30
CN115543500B (en) 2023-11-03
CN113282361B (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN111191213B (en) Method for deleting security service and electronic equipment
WO2021185105A1 (en) Method for switching between sim card and esim card, and electronic device
WO2021115007A1 (en) Network switching method and electronic device
EP3089046B1 (en) Electronic device operating method and electronic device for supporting the same
WO2020015259A1 (en) Data backup method and terminal
WO2023284415A1 (en) Power key mistouch detection method and electronic device
KR20150026652A (en) Method and apparatus for offering received information to user in a electronic device
CN110543287A (en) Screen display method and electronic equipment
CN105404382A (en) Power saving mode setting method and apparatus
WO2021036898A1 (en) Application activation method for apparatus having foldable screen, and related device
CN108108604A (en) Method and device for controlling screen display
CN113138878B (en) Method for processing crash of trusted execution environment operating system and electronic equipment
CN116193419A (en) Communication method, device and equipment
CN113282361B (en) Window processing method and electronic equipment
CN114077519B (en) System service recovery method and device and electronic equipment
CN110062929A (en) A kind of method, apparatus and terminal showing data
CN115904297A (en) Screen display detection method, electronic device and storage medium
CN107808081B (en) Reminding method and related equipment
CN116684520B (en) Shutdown method, electronic equipment, storage medium and chip
CN114006698B (en) token refreshing method and device, electronic equipment and readable storage medium
CN115442474B (en) Information protection method, electronic device, computer storage medium, computer program product, and chip system
CN117724863A (en) Target signal processing method and electronic equipment
CN112866983B (en) Control method, control device and electronic equipment
CN114339966A (en) Interface control method, device, medium and electronic equipment for data transmission
CN115878500A (en) Memory recovery method and device, electronic equipment and 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