CN115543500B - Window processing method and electronic equipment - Google Patents

Window processing method and electronic equipment Download PDF

Info

Publication number
CN115543500B
CN115543500B CN202211085269.5A CN202211085269A CN115543500B CN 115543500 B CN115543500 B CN 115543500B CN 202211085269 A CN202211085269 A CN 202211085269A CN 115543500 B CN115543500 B CN 115543500B
Authority
CN
China
Prior art keywords
window
preset
electronic device
application
transparent window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211085269.5A
Other languages
Chinese (zh)
Other versions
CN115543500A (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
Publication of CN115543500A publication Critical patent/CN115543500A/en
Application granted granted Critical
Publication of CN115543500B publication Critical patent/CN115543500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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 responds 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 off-screen, the electronic equipment acquires a first instruction of a first application, wherein the first instruction is used for indicating the electronic equipment to create a preset window. The electronic device may then obtain attribute information of the preset window, where the attribute information of the preset window includes a pixel size and/or 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. And then, if the preset window is a transparent window, the electronic equipment executes the first type event or the second type event. The first type of event is to prohibit the creation of a preset window, and the second type of event is to remove the created preset window.

Description

Window processing method and electronic equipment
The present application is a divisional application, the application number of which is 202110432625.5, the application date of which is 2021, 04, 21, the entire contents of which are incorporated herein by reference.
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, electronic devices (such as mobile phones, tablet computers or smart watches) can search and kill processes running in the background and using application programs with lower priorities, so as to reduce power consumption of the electronic devices.
In the conventional technology, in order to keep running in the background of the electronic device, the application program can create a transparent window when the electronic device extinguishes the screen, so as to improve the use priority of the application program and avoid the process of the electronic device to check and kill the application program. The transparent window is displayed in an invisible mode on an upper layer of an interface displayed by the electronic equipment, and when the electronic equipment receives an operation acting on the transparent window, no event is executed.
However, when the user inputs an operation (e.g., an operation of answering a call) at an interface displayed on the electronic device; since the transparent window is at the top of the interface displayed by the electronic device. In this way, after the electronic device receives the operation input by the user, the electronic device cannot implement the corresponding function (such as 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 responds 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 method for processing a window, where the method may be applied to an electronic device running in the background with at least one application, where the at least one application includes a first application.
In the method, when the electronic equipment is off-screen, the electronic equipment acquires a first instruction of a first application, wherein the first instruction is used for indicating the electronic equipment to create a preset window. The electronic device may then obtain attribute information of a preset window, where the attribute information of the preset window includes a pixel size and/or transparency of the preset window, and the pixel size is used to indicate a distribution situation of pixels 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 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 deactivated. And then, if the preset window is a transparent window, the electronic equipment executes the first type event or the second type event. The first type of event is to prohibit the creation of a preset window, and the second type of event is to remove the created preset window.
It will be appreciated that transparent windows are typically windows that are more transparent and/or have smaller pixel sizes. 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. Thus, the transparent window is not located at the 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 can determine that the preset window is a transparent window.
It will be appreciated that a transparent window is typically a window in which the pixel size of the window is small. When the pixel size of the preset window is smaller than the preset pixel threshold, the electronic device can determine that the preset window is a transparent window.
In combination with 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 degree 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 typically a window that is more transparent to the window. When the transparency of the preset window is smaller than the preset transparency threshold, the transparency degree of the preset window is higher, 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 electronic device stores at least one preset identifier, and each preset identifier in the at least one preset identifier is used for identifying a transparent window that is created in the electronic device. Before the electronic device obtains the attribute information of the preset window, the electronic device may obtain the 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. If the identifier of the preset window is different from each preset identifier in the at least one preset identifier, the electronic device acquires attribute information of the preset window.
That is, the electronic device may compare the identification of the preset window with the stored preset identification. When the mark of the preset window is different from each preset mark, the preset window is not a transparent window or is created for the first time. The electronic device may acquire attribute information of the preset window, and determine whether the preset window is a transparent window.
In combination with 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 event type or the second event type, and the preset window is a transparent window.
It will be appreciated that each preset identifier is used to identify one transparent window that was created in the electronic device. When the identification of the preset window is the same as any preset identification, the preset window is created, and the preset window is a transparent window. Thus, the electronic device may execute the first type of event or the second type of event. Thus, the transparent window is not located at the 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.
And the electronic equipment checks whether the preset window is a transparent window or not through the stored preset mark, so that the complexity of the electronic equipment for detecting whether the preset window is the transparent window or not can be reduced. In this way, the power consumption of the electronic device can be reduced.
In combination with the first aspect, in another possible design manner, the electronic device stores the number of times of creation of the transparent window corresponding to each preset identifier. If the identifier of the preset window is the same as any one of the at least one preset identifier, and the creation times of the preset window is greater than the preset times threshold, the electronic device executes the first type event or the second type event.
It will be appreciated that when the number of times the preset window is created is greater than the preset number of times threshold, it indicates that the preset window is created a plurality of times and is determined to be a transparent window a plurality of times. Therefore, when the creation times of the preset window is larger than the preset times threshold, the electronic equipment executes the preset event, so that the probability of the electronic equipment processing the non-transparent window can be reduced, and the accuracy of the electronic equipment processing the transparent window is improved.
With reference to the first aspect, in another possible design manner, after the electronic device lights up the preset duration of the screen, if the preset window is a transparent window, the electronic device executes the second type of event.
It can be appreciated that the electronic device processes the preset window after the preset duration of the bright screen, so that the first application can be guaranteed to have enough time to process the preset window. If the first application does not process the preset window, the electronic device can remove the preset window, so that abnormal situations such as frozen screen and the like of the electronic device are avoided, 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, the display screen being coupled to the processors; 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, cause the electronic device to perform the method as described in the first aspect and any one of its possible designs.
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 wire. The interface circuit is for receiving a signal from a memory of the electronic device and transmitting the signal to the processor, the signal including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any one 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 of the first aspect and any one of its possible designs.
In a fifth aspect, the present application provides a computer program product which, when run on a computer, causes the computer to perform the method according to the first aspect and any one of its possible designs.
It may be appreciated that the electronic device according to the second aspect and any of the possible designs thereof, 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 advantages as in the first aspect and any of the possible designs thereof, and are not described herein.
Drawings
FIG. 1 is a schematic diagram of an example of a transparent window according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for processing a window according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an example of a transparent window according to an embodiment of the present application;
FIG. 5A is a schematic diagram of another embodiment of a transparent window according to the present application;
FIG. 5B is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 6A is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 6B is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 6C is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 7 is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 8A is a flowchart of another window processing method according to an embodiment of the present application;
FIG. 8B is a flowchart of another window processing method according to an embodiment of the present application;
fig. 9 is a schematic diagram of a window processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the present application, the character "/" generally indicates that the front and rear associated objects are in an "or" relationship. For example, A/B may be understood as A or B.
The terms "first," "second," and the like, 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 defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
Furthermore, references to the terms "comprising" and "having" and any variations thereof in the description of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may 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 "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "e.g." should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present concepts in a concrete fashion.
In order to facilitate understanding of the technical solution of the present application, before describing in detail the window processing method provided in the embodiment of the present application, description is made of terms mentioned in the embodiment of the present application.
1. A transparent window.
A transparent window is a window whose window properties are transparent and/or whose window pixels are smaller than a preset pixel (e.g., 4 pixels). The transparent window is created by an application running in the background of the electronic device (which may be referred to simply as a background application). 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 top layer, the transparent window does not obstruct 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 therein. 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. As such, applications associated with the display interface are not responsive to user actions.
Illustratively, as shown in fig. 1, the electronic device displays an incoming call alert interface 101, and the incoming call alert interface 101 includes: an "accept" button for triggering the electronic device to answer an incoming call, and a "reject" button for triggering the electronic device to reject the incoming call. A transparent window 102 (the transparent window 102 is actually invisible in the incoming call alert interface 101, and the transparent window 102 is shown in dotted lines for convenience of explanation) is on top of the incoming call alert interface 101. If the user picks up a call via the electronic device, the operation a may be entered at the "accept" button (e.g., slide right, click, etc.). 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 device cannot answer the incoming call in response to operation a.
That is, under the condition that a transparent window exists at the upper layer of the display interface of the electronic device, the electronic device may not realize the corresponding function, and the use experience of the user using the electronic device is seriously affected. And the transparent window improves the use priority of the background application, so that the electronic equipment cannot search and kill the process of the background application, and the power consumption of the electronic equipment is higher.
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 can prohibit the background application from creating the window, or the electronic device can remove the window. Thus, the window is not at the top 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.
And, since the window created by the background application is not at the upper layer of the display interface of the electronic device, the use priority of the background application is lower. Thus, the electronic device can check and kill the process of the background application so as to reduce the power consumption of the electronic device.
The application (e.g., the first application and the second application) in the embodiment of the present application may be an embedded application program installed in the electronic device (i.e., a system application of the electronic device) or a downloadable application program. Wherein the embedded application is an application provided as part of an electronic device (e.g., a cell phone) implementation. The downloadable application is an application that can provide its own internet protocol multimedia subsystem (Internet Protocol Multimedia Subsystem, IMS) connection, which can 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 also be downloadable applications. The first application may be a social application and the second application may be a multimedia application.
The electronic device in the embodiment of the present application may be a tablet computer, a mobile phone, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) \virtual reality (VR) device, a vehicle-mounted device, or the like, and the embodiment of the present application is not limited in particular to 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 can also be a central processing unit (Central Processing Unit, CPU) of the electronic equipment or a control module for processing windows in the electronic equipment. In the embodiment of the application, the processing method of the window provided by the embodiment of the application is described by taking the processing method of the execution window of the electronic equipment as an example.
Referring to fig. 2, the electronic device is taken as an example of the mobile phone 200 shown in fig. 2, and the electronic device provided by the present application is described herein. Wherein the handset 200 shown in fig. 2 is only one example of an electronic device, and the handset 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 mobile phone 200 may include: processor 210, external memory interface 220, internal memory 221, universal serial bus (universal serial bus, USB) interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headset interface 270D, sensor module 280, keys 290, motor 291, indicator 292, camera 293, display 294, and subscriber identity module (subscriber identification module, SIM) card interface 295, among others.
The sensor module 280 may include, among other things, pressure sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and the like.
Processor 210 may include one or more processing units such as, for example: processor 210 may include a modem processor, a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the cell phone 200. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the 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 the processor 210 has just used or recycled.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The charge management module 240 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 240 may also provide power to the electronic device through the power management module 241 while charging the battery 242.
The power management module 241 is used for connecting the battery 242, and the charge 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 and provides power to the processor 210, the internal memory 221, the wireless communication module 260, and the like. In some embodiments, the power management module 241 and the charge management module 240 may also be provided in the same device.
The wireless communication function of the mobile phone 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. In some embodiments, antenna 1 and mobile communication module 250 of handset 200 are coupled, and antenna 2 and wireless communication module 260 are coupled, so that handset 200 may communicate with a network and other devices through wireless communication techniques.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, etc. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., (wireless fidelity, wi-Fi) network), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the handset 200. For example, in an embodiment of the present application, the handset 200 may access a Wi-Fi network through the wireless communication module 260.
The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. For example, in embodiments of the present application, the display 294 may be used to display a lock screen interface, a main interface, and the like.
The mobile phone 200 may implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like. 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, the cell phone 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 memory capabilities of the cell phone 200.
Internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the cellular phone 200 and data processing by executing instructions stored in the internal memory 221.
The handset 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, an application processor, and the like. Such as music playing, recording, etc.
Keys 290 include a power on key, a volume key, etc. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc. The SIM card interface 295 is for interfacing with a SIM card.
Although not shown in fig. 2, the mobile phone 200 may also be a flash, a micro-projection device, a near field communication (Near Field Communication, NFC) device, etc., which will not be described herein.
It should be understood that the structure illustrated in this embodiment is not limited to the specific configuration of the mobile phone 200. In other embodiments, the handset 200 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements 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-described hardware structure and the above-described system architecture.
In the embodiment of the application, when the electronic equipment extinguishes the screen of the electronic equipment, the background application of the electronic equipment can create the preset window at the upper layer of the display interface of the electronic equipment. Then, the electronic device can detect whether the preset window is a transparent window, 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, where the method for processing a window may include S301-S304.
S301, the electronic device acquires a first application first instruction.
The background of the electronic equipment is provided with at least one application program, and the first application is any application program in the at least one application program running in the background of the electronic equipment. The first instruction is used for instructing the electronic device to create a preset window.
In one possible implementation, when the electronic device extinguishes the screen of the electronic device, the first application of the electronic device may issue a first instruction to instruct the electronic device to create the preset window. An electronic device is taken as an example of a mobile phone. The handset may extinguish the screen in response to user operation of the power key (or the handset has received user operation for a long period of time). When the mobile phone extinguishes the SCREEN, the operating system of the mobile phone may broadcast an OFF-SCREEN message (e.g., SCREEN_OFF), which is used to indicate that the mobile phone has extinguished the SCREEN, and an application running in the background of the mobile phone (e.g., the first application) may monitor the OFF-SCREEN message. And then, the first application can receive the off-screen message and send out a first instruction to instruct the electronic equipment to create a preset window. (see-through window 102 as shown in fig. 1).
It can be appreciated that the first application may increase the priority of use of the first application after the preset window is created by the display interface of the electronic device. Therefore, the probability of searching and killing the first application by the electronic equipment can be reduced, and the first application is ensured to continue to run in the background of the electronic equipment.
S302, the electronic device detects whether the preset window is a transparent window.
The transparent window is a window displayed on the upper layer of the display interface of the electronic device in an invisible mode and is used for keeping an application program corresponding to the transparent window alive after the electronic device is off-screen (namely, an application program for sending an instruction to create the transparent window).
In the embodiment of the application, the electronic equipment can acquire the attribute information of the preset window. The electronic device may then 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 according to the embodiment of the present application will be described below by taking an example in which 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 the preset window, and compare the pixel size to 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, the electronic device determines that the preset window is a transparent window. For example, if the preset pixel threshold is 10 pixels. Referring to fig. 4, 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 window created by the application will contain some content information and 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 judging the transparent window by the electronic equipment can be improved.
If the pixel size is greater than the preset pixel threshold, the electronic device determines that the preset window is a non-transparent window. Wherein, the non-transparent window is other windows besides transparent window, such as short message window, update message window, etc. For example, if the first pixel size of the preset window (e.g., the update message window) is 1000 pixels and the second pixel size is 505 pixels, the preset pixel threshold is 10 pixels. The first pixel size and the second pixel size of the preset window are both greater 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), wherein 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, according to the transparency of the preset window, whether the preset window is a transparent window.
It should be noted that, the range of transparency values is not limited in the embodiment of the present application. For example, the transparency can 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 transparency value is, the higher the transparency degree of the preset window is; the larger the transparency value is, the lower the transparency degree of the preset window is. Illustratively, if the transparency has a value between 0 and 100. When the transparency of the preset window is 0, the preset window may be a transparent window 102 as shown in fig. 1, that is, the transparent window 102 has no cover to the underlying incoming call reminding interface 101. That is, the user can see the "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, where the window 501 covers the underlying incoming call reminding interface 101. That is, the user cannot see the "accept" button or the like at the lower layer of the window 501 through the electronic device.
In one possible implementation, the electronic device may obtain a transparency of the preset window, and compare the transparency with a preset transparency threshold. The embodiment of the application does not limit the preset transparent threshold. 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 greater 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 user viewing 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 judging the transparent window by the electronic equipment can be improved.
In some embodiments, the attribute information of the preset window may include a window style. The electronic device may determine, according to a window style of a preset window, whether the preset window is a transparent window. Specifically, the electronic device may obtain a window style of a preset window. If the window style is a preset style (e.g., transparent style), the electronic device determines that the preset window is a transparent window. If the window style is not transparent, 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 judging the transparent window by the electronic equipment 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 specific descriptions of the preset conditions corresponding to the respective 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 a preset window. Then, the mobile phone can respectively judge whether the pixel size of the window is smaller than a preset pixel threshold value, whether the transparency of the preset window is smaller than a preset transparency threshold value, and whether the window style of the preset window is transparent, and determine whether the preset window is transparent. 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 value is 10 pixels; the transparency of the preset window is 0, and the preset transparency threshold value 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 a preset condition, the electronic device can divide the window into transparent windows to the greatest extent, so that the window is processed, and normal operation of the electronic device is ensured.
In other embodiments, the attribute information of the preset window may include at least two of the following: pixel size, transparency, window style. If all the attribute information of the preset window meets the preset conditions, the electronic device can determine that the preset window is a transparent window. For specific descriptions of the preset conditions corresponding to the respective 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 processing of the non-transparent window can be avoided, and the use experience of a user is guaranteed.
In some embodiments, the electronic device may determine whether the first application created the preset window before the electronic device detects whether the preset window is a transparent window. If the first application creates the preset window, the electronic device executes S302.
In the embodiment of the present application, if the preset window is a non-transparent window, the electronic device may execute S303. If the preset window is a transparent window, the electronic device may execute S304.
S303, the electronic equipment displays a preset window on the upper layer of the display interface.
For example, 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 at an upper layer of the main interface. And, after the electronic device extinguishes the screen, the electronic device may display a screen lock interface, which may be on an upper layer of the preset window.
S304, the electronic equipment executes a preset event.
The electronic device executing the preset event may cause an upper layer of the display interface to not include the preset window. The preset event may include a first type event and a second type 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, the manner of removing the preset window by the electronic device is not limited in the embodiment of the present application. For example, the electronic device may obtain the identifier of the preset window, and remove the preset window by using Finish method or default method. For another example, the electronic device may remove the task corresponding to the preset window from the window task stack, where the task corresponding to each window displayed by the electronic device is stored in the window task stack. For another example, the electronic device may obtain a process number of the first application, call a cleaning interface (e.g., kills a process of the first application. For another example, the electronic device may create a new display interface (e.g., a main interface) that is on top of the preset window.
It can be appreciated 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 user input operations to cause the electronic device to respond. Therefore, abnormal conditions such as frozen screen and the like of the electronic equipment can be avoided, and the use experience of a user is guaranteed.
In the embodiment of the application, under the condition that the preset event is the first type event, the electronic device can execute the first type event in the process of creating the preset window by the first application. For example, the first application may create a preset window when the electronic device extinguishes 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 did not successfully create the preset window. Thus, a transparent window does not exist on the upper layer of the display interface of the electronic device. Therefore, abnormal conditions such as frozen screen and the like of the electronic equipment can be avoided. And, because the preset window created by the first application is not at the upper layer of the display interface of the electronic device, the use priority of the first application is lower. Thus, the electronic device can check and kill the process of the background application so as to reduce the power consumption of the electronic device.
It should be noted that, since the second type of event is used to indicate removal of the preset window. That is, in the embodiment of the present application, when the electronic device executes the second type of event, the first application has completed creating the preset window. That is, the electronic device may perform the second type of event after performing S303.
In some embodiments, when the preset event is a second type event, the electronic device may perform the second type event in response to a user's screen-lighting operation. For example, as shown in fig. 6A, when the mobile phone is off-screen, after the first application monitors the off-screen message, a first instruction may be issued. 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. If the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on, the mobile phone can detect whether the background application creates a window when the screen is off. If the handset has created a window, the handset can detect if the window (e.g., a preset 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 the transparent window, the mobile phone does not process the window.
The mobile phone marks the window and is used for indicating the record of the transparent window created when the mobile phone is stored in the screen-off state. For example, the handset may save window creation information that includes an identification of the window. Thus, when the mobile phone is on, the mobile phone can determine whether the electronic device creates a window when the screen is off according to the creation information.
It should be noted that, in general, when the electronic device is on screen, the operating system of the electronic device may broadcast a screen-on message (e.g., CREEN_OFF, USER_PRESENT, etc.). The first application may remove the preset window after receiving the bright screen message. However, the first application may not remove the preset window when the electronic device is on-screen due to some factors (e.g., the first application does not receive the on-screen message), which causes the preset window to be displayed at an upper layer of the display interface of the electronic device.
In some embodiments, when the preset event is the second type event, the electronic device may detect whether a window exists at an upper layer of the display interface before the electronic device detects whether the preset window is a transparent window. For example, as shown in fig. 6B, the processing method of the window may include S601 before S302.
S601, the electronic equipment detects whether a window exists on the upper layer of the display interface.
In one possible design, if a window exists at an upper layer of the display interface (e.g., the window includes a preset window created by the first application), the electronic device executes S302. If no window exists at the upper layer of the display interface, the background application is indicated to remove the created window.
It can be appreciated that if there is no window on the upper layer of the display interface, the electronic device does not need to detect whether the window is a transparent window or not and process the window.
It should be noted that, after receiving the bright screen message, the first application may remove the preset window. However, there may be some factors (e.g., the first application does not receive the screen-lighting message), and when the electronic device is on the screen, the first application has a delay in removing the preset window (e.g., the preset window is removed after 0.8 seconds of screen-lighting), so that the electronic device detects that a transparent window exists at the upper layer of the display interface when the electronic device is on the 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 the preset window. And then, the electronic equipment is on a screen, and a transparent window (such as a first preset window) exists on the upper layer of the display interface. Then, the electronic device may detect whether a preset window exists on the upper layer of the display interface again after the preset duration (for example, 1 second) of the screen is on, and if the electronic device detects that the preset window exists on the upper layer of the display interface, it detects whether the preset window is a transparent window. In the case where 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 off-screen, after the first application monitors the off-screen message, the mobile phone may be instructed to create a 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. If the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on, the mobile phone can detect whether a window is created when the screen is off. If the mobile phone creates a window, the mobile phone can detect whether a transparent window exists on the upper layer of the display interface. If a transparent window exists on the upper layer of the display interface, the mobile phone can detect whether the transparent window exists on the upper layer of the display interface again after N seconds (for example, 1.1 seconds). If a 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, the process of removing the preset window after the preset duration of the electronic device is 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, wherein the preset task is used for indicating that after a preset duration, the transparent window is removed when the transparent window is detected. After a preset duration of the electronic device's bright screen, the preset thread may perform a preset task.
It can be appreciated that the electronic device processes the preset window after the preset duration of the bright screen, so that the first application can be guaranteed to have enough time to process the preset window. If the first application does not process the preset window, the electronic device can remove the preset window, so that abnormal situations such as frozen screen and the like of the electronic device are avoided, 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 embodiment of the application does not limit the identification of the window. For example, the identification may be a window name, a window identification number (Identity document, ID), or the like.
In some embodiments, the electronic device may store an abnormal window list in which at least one preset identifier is stored, where 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 can determine whether the preset window is a transparent window according to the identification of the preset window and the abnormal window list. As shown in fig. 7, the processing method of the window further includes S701-S703 before S302.
S701, the electronic equipment acquires the identification of the preset window.
S702, the electronic device detects whether the identification of the preset window is identical to any preset identification in at least one preset identification.
For example, please refer to table 1, which illustrates an identifier (i.e., a preset identifier) of a window saved by the electronic device as a transparent window.
TABLE 1
Preset mark
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 identifiers of the at least one window.
In one possible design, if the identifier of the preset window is the same as any one of the at least one preset identifier, the electronic device executes S703. If the preset window identifier 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 save 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 identification of the preset window, and the complexity of detecting whether the preset window is the transparent window or not 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 process of creating the preset window by the first application. For example, the first application may create a preset window when the electronic device extinguishes 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 the same identifier as the preset window identifier, and the electronic device can 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 creates the completion preset window. For example, the first application may complete creating the preset window when the electronic device extinguishes the screen. When the electronic device lights up the screen, the electronic device detects that the at least one preset identifier is the same as the identifier of the preset window, and the electronic device can remove the preset window.
It can be understood that the complexity of the electronic device for detecting whether the preset window is a transparent window can be reduced by checking whether the preset window is a transparent window or not through the stored preset identifier. In this way, the power consumption of the electronic device can be reduced.
In some embodiments, the abnormal window list stored in the electronic device may further include the number of times of creation of the transparent window corresponding to each preset identifier, where a correspondence (may be simply referred to as a first correspondence) exists between the number of times of creation of the transparent window corresponding to each preset identifier and each preset identifier. Under the condition that the preset window is a transparent window, the electronic device can determine whether to execute the preset event according to the creation times corresponding to the identification of the preset window. As shown in fig. 8A, S703 may include S801 to S802.
S801, the electronic device judges whether the creation times of the preset window are larger than a preset time threshold.
In one possible implementation manner, when the electronic device stores the identifier of the preset window, after the electronic device obtains the identifier of the preset window, the number of times of creation of the preset window may be determined according to the identifier of the preset window and the first correspondence. The electronic device may then compare the number of times the preset window was created to a preset number of times threshold.
In one possible design, if the number of times the preset window is created is greater than the preset number of times threshold, the electronic device may execute S802.
For example, referring to table 2 in combination with table 1, a relationship between the number of times of creation of the transparent window corresponding to each preset identifier and the preset identifier is shown.
TABLE 2
Preset mark Number of creation times
A01 5
A11 1
A15 10
That is, the number of times of creation of the transparent window identified as a01 is 5, the number of times of creation of the transparent window identified as a11 is 1, and the number of times of creation of the transparent window identified as a15 is 10. If the preset number of times threshold is 3. When the preset window is identified as a01, the electronic device executes S802.
S802, the electronic equipment executes a preset event.
It will be appreciated that when the number of times the preset window is created is greater than the preset number of times threshold, it indicates that the preset window is created a plurality of times and is determined to be a transparent window a plurality of times. Therefore, when the creation times of the preset window is larger than the preset times threshold, the electronic equipment executes the preset event, so that the probability of the electronic equipment processing the non-transparent window can be reduced, and the accuracy of the electronic equipment processing the transparent window is improved.
Optionally, if the number of times of creation of the preset window is greater than the preset number of times threshold, the electronic device may update the number of times of creation of the preset window. For example, if the preset number of times threshold is 3. In combination with table 2, when the identifier of the preset window is a01, the electronic device may update the creation number corresponding to a01 to 6.
Note 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 are not repeated herein.
Optionally, in S801, if the number of times of creation of the preset window is smaller than the preset number of times threshold, the electronic device may execute S803.
S803, the electronic device updates the creation times of the preset window.
For example, if the preset number of times threshold is 3. In combination with table 2, when the identifier of the preset window is a11, the electronic device may update the creation number corresponding to a01 to 2. Therefore, the method and the device can facilitate the electronic equipment to update the times of creating the transparent window in real time, ensure that the electronic equipment can process the transparent window with higher creation times, and ensure that the electronic equipment can normally operate.
S801 to S803 will be described below with reference to fig. 8B. Taking the electronic equipment as an example of a mobile phone, when the mobile phone is off-screen, the first application can send out a first instruction after monitoring the off-screen message. Then, the mobile phone can determine that the creation times of the preset window are larger than the preset times threshold according to the abnormal window list. If the creation times of the preset window are larger than the preset times threshold, the mobile phone prohibits the creation of the preset window. If the creation times of the preset window are smaller than the preset times threshold, the electronic equipment detects whether the preset window is a transparent window or not. If the preset window is a transparent window, the mobile phone can mark the preset window and create the preset window. If the preset window is not the transparent window, the mobile phone creates the preset window. When the mobile phone is on screen, the first application monitors the screen-on message and can destroy the preset window. If the first application destroys the preset window, the mobile phone detects whether the preset window is a transparent window or not. If the preset window is a transparent window, the mobile phone updates the creation 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 larger than a preset time threshold according to the abnormal window list. If the creation times of the preset window are larger than the preset times threshold, the mobile phone removes the preset window. If the creation times of the preset window is smaller than the preset times threshold, the mobile phone detects whether the preset window is a transparent window or not. 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 abnormal window information to the cloud server. The abnormal window information may include: the identification or the first corresponding relation is preset. Optionally, the abnormal window information may further include: package name of application for creating transparent window, process ID of application for creating transparent window, version of application for creating transparent window, attribute information of transparent window, etc. The embodiment of the application does not limit the abnormal 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 may be executed. Optionally, the cloud server may send the abnormal window information to other electronic devices.
It can be understood that the electronic device shares the abnormal window information to the cloud server, so that other electronic devices can also acquire the abnormal window information. Therefore, other electronic equipment can be ensured to accurately identify and process the preset transparent window, and further the electronic equipment can be ensured to normally operate.
The scheme provided by the embodiment of the application is mainly described from the perspective of the electronic equipment. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those skilled in the art will readily appreciate that the various illustrative steps of a method of processing a window described in connection with the disclosed embodiments of the application may be implemented as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or electronic device software driven hardware 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.
The embodiment of the application can divide the functional modules or functional units of the window processing device according to the method example, for example, each functional module or functional unit can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware, or in software functional modules or functional units. The division of the modules or units in the embodiment of the present application is schematic, which is merely a logic function division, and other division manners may be implemented in practice.
Fig. 9 is a schematic diagram of a window processing apparatus according to an embodiment of the application. The processing device of the window may be a functional module in the electronic device (such as the mobile phone 200) for implementing the method of the embodiment of the present application. As shown in fig. 9, the processing device of the window may include: an acquisition module 901, a processing module 902 and an abnormal window management module 903.
The acquiring module 901 is configured to support the mobile phone 200 to perform: data (e.g., identification of windows, attribute information, etc.) in the handset 200 is obtained. For example, the acquisition module 901 is configured to support the handset 200 to perform S701 in the method embodiments described above, and/or other processes for the techniques described herein.
The processing module 902 is configured to support the mobile phone 200 to perform: checking the data information, determining an event performed by the electronic device, and performing the event. For example, the processing module 902 is configured to support the handset 200 to perform S302, S304, S601, S702, S703, S801, and/or other processes for the techniques described herein in the method embodiments described above.
The abnormal window management module 903 is configured to support the mobile phone 200 to perform: and managing information of the transparent window, and interacting data with the cloud server. For example, the abnormal window management module 903 is configured to support the mobile phone 200 to execute S803 in the above method embodiment, upload abnormal window information in the mobile phone 200 to the cloud server, receive abnormal window information and a preset event from the cloud server, and/or use other processes for the technology described herein.
Other embodiments of the present application provide an electronic device (such as the mobile phone 200 shown in fig. 2) in which a plurality of preset applications are installed. The electronic device may include: a memory and one or more processors. The memory is coupled to the processor. The electronic device may also include a camera. Alternatively, the electronic device may be externally connected to a camera. The memory is for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform the 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 mobile phone 200 shown in fig. 2.
The embodiment of the present application also provides a chip system, as shown in fig. 10, which 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, interface circuit 1002 may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, interface circuit 1002 may be used to send signals to other devices (e.g., processor 1001). The interface circuit 1002 may, for example, read instructions stored in a 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 handset 200 shown in fig. 2) to perform the steps of the above-described embodiments. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The embodiment of the present application also provides a computer storage medium, where the computer storage medium includes computer instructions, where the computer instructions, when executed on the electronic device (such as the mobile phone 200 shown in fig. 2), cause the electronic device to perform the functions or steps performed by the mobile phone in the foregoing method embodiment.
The embodiment of the application also provides a computer program product which, when run on a computer, causes the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments 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 application 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 (10)

1. A method for processing a window, the method being applied to an electronic device, the method comprising:
starting a first application at a first moment;
responding to an application switching operation of a user, switching the first application to background operation, and displaying a first display interface;
when receiving the screen locking operation of the user at the second moment, applying for creating a first window on the upper layer of the preset area of the first display interface through the first application, wherein the first window is a transparent window;
at a third moment, responding to the unlocking operation of the user on the electronic equipment, and displaying the first display interface;
responding to the operation of the user in the preset area;
wherein between the first time and the third time, the electronic device activates the first application; after the second time, the first application does not apply for destroying the first window.
2. The method of claim 1, wherein after the third time, the method further comprises:
when receiving a screen locking operation from the user, applying for creating a second window on the upper layer of the first display interface through the first application, wherein the second window is the transparent window;
and searching and killing the first application.
3. The method according to claim 1 or 2, wherein the transparent window is used for improving the use priority of the first application, reducing the probability of the electronic device to kill the first application, and ensuring that the first application continues to run in the background of the electronic device.
4. A method according to claim 1 or 2, wherein the attribute information of the transparent window comprises a pixel size, the pixel size being used to indicate a distribution of pixels comprised by the transparent window;
the transparent window is a window with the pixel size smaller than a preset pixel threshold value.
5. The method according to claim 1 or 2, wherein the attribute information of the transparent window includes transparency, and the transparent window is a window in which the transparency is smaller than a preset transparency threshold.
6. The method according to claim 1 or 2, wherein the electronic device holds at least one preset identifier, each of the at least one preset identifier being used for identifying a transparent window that was created in the electronic device;
the identification of the first window is the same as any preset identification in the at least one preset identification.
7. The method of claim 6, wherein the electronic device stores the number of times of creation of the transparent window corresponding to each preset identifier;
the identification of the first window is the same as any preset identification in the at least one preset identification, and the creation times of the first window are larger than a preset time threshold.
8. An electronic device, the electronic device comprising: a memory, a display screen, and one or more processors; the memory, the display screen, and the processor are coupled, the memory is for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to:
Starting a first application at a first moment;
responding to an application switching operation of a user, switching the first application to background operation, and displaying a first display interface;
when receiving the screen locking operation of the user at the second moment, applying for creating a first window on the upper layer of the preset area of the first display interface through the first application, wherein the first window is a transparent window;
at a third moment, responding to the unlocking operation of the user on the electronic equipment, and displaying the first display interface;
responding to the operation of the user in the preset area;
wherein between the first time and the third time, the electronic device activates the first application; after the second time, the first application does not apply for destroying the first window.
9. The electronic device of claim 8, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the steps of:
after the third moment, when receiving a screen locking operation from the user, applying for creating a second window on the upper layer of the first display interface through the first application, wherein the second window is the transparent window;
And searching and killing the first application.
10. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-7.
CN202211085269.5A 2021-04-21 2021-04-21 Window processing method and electronic equipment Active CN115543500B (en)

Priority Applications (1)

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

Applications Claiming Priority (2)

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

Related Parent Applications (1)

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

Publications (2)

Publication Number Publication Date
CN115543500A CN115543500A (en) 2022-12-30
CN115543500B true CN115543500B (en) 2023-11-03

Family

ID=77277114

Family Applications (2)

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

Family Applications After (1)

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

Country Status (1)

Country Link
CN (2) CN115543500B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879896B (en) * 2022-07-08 2023-05-12 荣耀终端有限公司 Frozen screen processing method, electronic equipment and storage medium

Citations (3)

* 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
CN107885309A (en) * 2017-11-30 2018-04-06 河南浩德科技有限公司 Application management method, device, mobile terminal and computer-readable storage medium
CN109240791A (en) * 2018-09-25 2019-01-18 Oppo广东移动通信有限公司 A kind of application program display methods, application program display device and mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753425B (en) * 2017-11-06 2021-04-02 腾讯科技(深圳)有限公司 Popup window processing method and device
CN107861857B (en) * 2017-11-09 2021-04-13 上海触乐信息科技有限公司 Screen virtual shade control method and device in terminal equipment and terminal equipment
CN107797841B (en) * 2017-11-21 2021-11-05 Oppo广东移动通信有限公司 Window control method and device, terminal equipment and storage medium
CN110309647B (en) * 2019-06-28 2022-02-25 北京乐蜜科技有限责任公司 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

Patent Citations (3)

* 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
CN107885309A (en) * 2017-11-30 2018-04-06 河南浩德科技有限公司 Application management method, device, mobile terminal and computer-readable storage medium
CN109240791A (en) * 2018-09-25 2019-01-18 Oppo广东移动通信有限公司 A kind of application program display methods, application program display device and mobile terminal

Also Published As

Publication number Publication date
CN113282361B (en) 2022-09-23
CN113282361A (en) 2021-08-20
CN115543500A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
WO2021115007A1 (en) Network switching method and electronic device
CN111191213B (en) Method for deleting security service and electronic equipment
WO2023284415A1 (en) Power key mistouch detection method and electronic device
EP3089046B1 (en) Electronic device operating method and electronic device for supporting the same
CN113138878B (en) Method for processing crash of trusted execution environment operating system and electronic equipment
CN113220385A (en) Automatic setting method for horizontal and vertical screens of mobile terminal
WO2022037725A1 (en) System service recovery method and apparatus, and electronic device
CN115543500B (en) Window processing method and electronic equipment
CN111381996B (en) Memory exception handling method and device
CN114339966A (en) Interface control method, device, medium and electronic equipment for data transmission
CN115904297A (en) Screen display detection method, electronic device and storage medium
CN115878500A (en) Memory recovery method and device, electronic equipment and readable storage medium
CN115083400A (en) Voice assistant awakening method and device
CN116684520B (en) Shutdown method, electronic equipment, storage medium and chip
CN116048831B (en) Target signal processing method and electronic equipment
CN115495716B (en) Local authentication method and electronic equipment
CN112770002B (en) Heartbeat control method and electronic equipment
CN114945176B (en) Clipboard access control method, electronic equipment and storage medium
CN115016666B (en) Touch processing method, terminal equipment and storage medium
CN117082419B (en) Speaker control method, system, device, apparatus and storage medium
CN116048829B (en) Interface calling method, device and storage medium
EP4296839A1 (en) Screenshot method, electronic device, and storage medium
CN116028966A (en) Application display method, electronic equipment and storage medium
CN115396922A (en) Network anomaly optimization method and related product
CN117784990A (en) Method and related device for displaying icons of application programs in task bar

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