Method for starting power saving mode and electronic equipment
By detecting the duration of the power saving trigger state of the terminal device and automatically starting the power saving mode, the problem of power exhaustion without the user's awareness of power saving is solved, extending the device's usage time and improving the user experience.
Patent Information
- Application Number
- CN202310581616.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2024-11-22
AI Technical Summary
Without the awareness of power saving, the power of the terminal equipment is exhausted by long-term air running, resulting in a rapid reduction in power. The existing technology is difficult to effectively solve this problem.
By detecting the duration of the power saving trigger state, including the user's no operation state, the screen highlight state and the no-gaze state, if the duration is greater than the time threshold, the power saving mode will be automatically activated to avoid power exhaustion.
It effectively avoids the power exhaustion caused by the application running for a long time without power saving, extends the device's usage time, and improves the user experience.
Smart Images

Figure CN119002675A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method and electronic device for starting a power saving mode. Background Art
[0002] With the rapid development of smart terminals (hereinafter referred to as terminals), the functions of terminals have become more and more. In real life, the time and frequency of users using terminals (such as mobile phones) have also increased. Correspondingly, the power consumption of terminals has also increased significantly. In the prior art, when the power of the terminal is lower than a threshold (for example, 20%), a power saving mode will be triggered. For example, the terminal background operating system will limit the operation of certain applications, reduce the screen brightness, etc.
[0003] However, in some scenarios, users do not realize that the applications on the terminal are running idle for a long time, causing the terminal to quickly run out of power and shut down. For example, a user falls asleep while watching a video on his phone in bed at night, and the phone is still playing the video until the phone runs out of power and shuts down. Another example is that when a user is using a phone, he is interrupted by other things and throws the phone aside with the screen on, eventually causing the phone to run out of power.
[0004] Therefore, how to solve the problem of terminal power being exhausted due to idle running when users have no awareness of power saving is an issue that needs to be solved urgently. Summary of the invention
[0005] The present application provides a method for starting a power saving mode and an electronic device, which solves the problem that the power of the electronic device is exhausted due to running idle when the user is not aware of power saving.
[0006] In order to solve the above problems, this application adopts the following technical solutions:
[0007] In the first aspect, a method for starting a power saving mode is provided, which can be executed by an electronic device, or by a module (such as a processor, a chip, or a chip system, etc.) applied to the electronic device, or by a logic node, a logic module, or software that can realize all or part of the functions of the electronic device. The method includes: detecting the duration of a power saving trigger state, the power saving trigger state is used to trigger the electronic device to enter the power saving mode, and the power saving trigger state includes at least one of the following states: user no operation state, screen highlight state, no gaze state, sleep state; when the duration is greater than a time threshold, start the electronic device to enter the power saving mode; or, when the duration is less than or equal to the time threshold, continue to detect the duration and determine that the electronic device does not enter the power saving mode.
[0008] Usually, when users are not aware of power saving, electronic devices may waste power. Therefore, the method identifies the power saving trigger state and determines whether to start the electronic device to enter the power saving mode based on the relationship between the duration of the power saving trigger state and the time threshold. For example, when the duration is less than or equal to the time threshold, the duration continues to be detected and the electronic device is not started to enter the power saving mode; when the duration is greater than the time threshold, the electronic device is started to enter the power saving mode in time to avoid the situation where the electronic device wastes power due to the application running idle for a long time when the user is not aware of power saving.
[0009] In an optional implementation, the power saving trigger state includes a user no operation state, and detecting the duration of the power saving trigger state includes: when a user operation event is detected, starting a first timer; and detecting the duration of the user no operation state by the first timer.
[0010] The electronic device determines whether to start the power saving mode by identifying the user's inactivity state and recording the duration of the user's inactivity state, thereby avoiding starting the power saving mode when the user is using the electronic device, thereby improving the user experience.
[0011] In an optional embodiment, the power saving trigger state includes a screen highlight state, and the screen highlight state is a state in which the brightness value of the screen is greater than a brightness threshold; detecting the duration of the power saving trigger state includes: when the screen highlight state is detected, starting a second timer; detecting the duration of the screen highlight state by the second timer.
[0012] The electronic device determines whether to start the power saving mode by identifying the screen highlight state and recording the duration of the screen highlight state, which can avoid starting the power saving mode when the user is using the electronic device, thereby improving the user experience.
[0013] In an optional embodiment, the power saving trigger state includes a no-gaze state, which refers to a state in which the user's eyes are away from the screen; detecting the duration of the power saving trigger state includes: when the no-gaze state is detected, starting a third timer; and detecting the duration of the no-gaze state by the third timer.
[0014] By identifying the no-gaze state and recording the duration of the no-gaze state, the electronic device determines whether to start the power saving mode, thereby avoiding starting the power saving mode when the user uses the electronic device, thereby improving the user experience.
[0015] In an optional embodiment, the power saving trigger state includes a sleep state, and detecting the duration of the power saving trigger state includes: when the sleep state is detected and the screen is in a bright state, starting a fourth timer; and detecting the duration of the sleep state by the fourth timer.
[0016] By identifying the sleep state and recording the duration of the sleep state, the electronic device can determine whether to start the power saving mode, thereby avoiding starting the power saving mode when the user uses the electronic device, thereby improving the user experience.
[0017] In an optional embodiment, when the duration is greater than a time threshold, the method further includes: displaying a countdown interface with a preset transparency on the screen of the electronic device, the countdown interface including a first option and a second option, the first option indicating agreement to start the power saving mode, and the second option being used to indicate disagreement to start the power saving mode.
[0018] By displaying a countdown interface with preset transparency on the screen, the electronic device can remind the user that the electronic device is about to enter the power saving mode, giving the user choice space. The user can determine whether to enter the power saving mode before the countdown ends according to their own needs, thereby improving the user experience.
[0019] In an optional embodiment, when the duration is greater than a time threshold, the electronic device is started to enter a power saving mode, including: when the duration is greater than the time threshold and it is detected that the user selects the first option on the countdown interface, the electronic device is started to enter a power saving mode.
[0020] The electronic device determines to start the electronic device into the power saving mode according to the first option selected by the user on the countdown interface, rather than directly entering the power saving mode, which can improve the user experience.
[0021] In an optional embodiment, when the duration is greater than a time threshold, the electronic device is started to enter a power saving mode, including: when the duration is greater than the time threshold, and at the end of the countdown on the countdown interface, no user selection of the first option or the second option of the countdown interface is detected, then the electronic device is started to enter a power saving mode.
[0022] If the electronic device does not detect the user's selection operation before the countdown ends, the electronic device starts to enter the power saving mode to avoid the situation where the application runs idle for a long time and causes the electronic device to run out of power.
[0023] In an optional embodiment, when starting the electronic device to enter the power saving mode, the method also includes: detecting whether the current application is an authorized application, an authorized application refers to an application that has obtained power saving management authorization; when the current application is an authorized application, performing power saving management on the current application; when the current application is not an authorized application, determining not to perform power saving management on the current application.
[0024] Users can set up authorization for power saving management of the current application in advance based on their usage needs for the current application; the electronic device determines whether to perform power saving management on the current application by detecting whether the current application is an authorized application; this method can support users to customize whether the application program enters the power saving management range according to their own habits or preferences, with flexible settings and improved user experience.
[0025] In a second aspect, an electronic device is provided, the electronic device comprising a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, so that the electronic device executes any one of the methods in the first aspect.
[0026] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes any one of the methods in the first aspect.
[0027] In a fourth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed by an electronic device, the electronic device executes any one of the methods in the first aspect.
[0028] In a fifth aspect, a chip system is provided, the chip system comprising a memory and a processor, the processor being configured to execute a computer program stored in the memory to implement any one of the methods in the first aspect.
[0029] The beneficial effects of the technical solutions in the second, third, fourth and fifth aspects of the present application are the same as the beneficial effects of the technical solution in the first aspect and will not be repeated herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of the software structure of an electronic device 100 provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of a method for starting a power saving mode provided in an embodiment of the present application;
[0033] Figure 4A schematic diagram of an interface for a method of starting a power saving mode provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of an interface for another method of starting a power saving mode provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of an interface for another method of starting a power saving mode provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0038] Figure 1 A structural schematic diagram of an electronic device 100 applicable to the above method (ie, a method for starting a power saving mode) is shown.
[0039] The electronic device 100 may include at least one of a mobile phone, a foldable electronic device, a tablet computer, 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) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, or a smart city device. The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device 100.
[0040] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, an indicator 191, a subscriber identification module (SIM) card interface 192, a camera 193, and a display screen 194, etc.
[0041] It is to be understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 1 More or fewer components, or combining some components, or splitting some components, or different arrangements of components. Figure 1 The components in the present invention may be implemented in hardware, software, or a combination of software and hardware.
[0042] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0043] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0044] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. The memory may store instructions or data that have been used or are frequently used by the processor 110. If the processor 110 needs to use the instruction or data, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0045] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 110 may be connected to a touch sensor, an audio module, a wireless communication module, a display (screen), a camera module, and the like through at least one of the above interfaces.
[0046] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0047] The USB interface 130 is an interface that complies with the USB standard specification and can be used to connect the electronic device 100 and peripheral devices. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to enable the charger to charge the electronic device 100, and can also be used to connect other electronic devices to transmit data between the electronic device 100 and other electronic devices. It can also be used to connect headphones to output audio stored in the electronic device through the headphones. The interface can also be used to connect other electronic devices, such as VR devices. In some embodiments, the standard specifications of the universal serial bus can be USB1.x, USB2.0, USB3.x and USB4.
[0048] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0049] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display screen 194 and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0050] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0051] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0052] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0053] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0054] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), bluetooth low energy (BLE), ultra wide band (UWB), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0055] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other electronic devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0056] The electronic device 100 can realize the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0057] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card. Or files such as music and videos are transferred from the electronic device to the external memory card.
[0058] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (e.g., a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (e.g., audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0059] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0060] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0061] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or output an audio signal for a hands-free call through the speaker 170A.
[0062] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0063] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0064] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0065] The sensor 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, a sleep monitoring sensor, etc., which are used to convert various signals from the outside world into electrical signals or other required forms of information output.
[0066] The key 190 may include a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0067] Indicator 191 may be an indicator light, which may be used to indicate charging status, power changes, missed calls, notifications, etc.
[0068] The SIM card interface 192 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 192 or pulling it out from the SIM card interface 192. The electronic device 100 can support one or more SIM card interfaces 192. The SIM card interface 192 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 192 at the same time. The types of multiple cards can be the same or different. The SIM card interface 192 can also be compatible with different types of SIM cards. The SIM card interface 192 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0069] The electronic device 100 can realize the camera function through the camera 193, ISP, video codec, GPU, display screen 194, application processor AP, neural network processor NPU, etc.
[0070] The camera 193 can be used to collect color image data of the photographed object (for example, the user's facial image, so that the electronic device 100 can detect from the facial image whether the human eye is looking at the camera, and then infer whether the user's line of sight has left the display screen 194) and depth data. The ISP can be used to process the color image data collected by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the photosensitive element of the camera through the lens. The light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0071] In some embodiments, the camera 193 may be composed of a color camera module and a 3D sensing module.
[0072] In some embodiments, the photosensitive element of the camera of the color camera module can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
[0073] In some embodiments, the 3D sensing module may be a time of flight (TOF) 3D sensing module or a structured light 3D sensing module. Among them, structured light 3D sensing is an active depth sensing technology, and the basic components of the structured light 3D sensing module may include an infrared emitter, an IR camera module, etc. The working principle of the structured light 3D sensing module is to first emit a light spot of a specific pattern to the object being photographed, and then receive the light spot pattern coding (light coding) on the surface of the object, and then compare the similarities and differences with the original projected light spot, and use the triangulation principle to calculate the three-dimensional coordinates of the object. The three-dimensional coordinates include the distance between the electronic device 100 and the object being photographed. Among them, TOF 3D sensing may be an active depth sensing technology, and the basic components of the TOF 3D sensing module may include an infrared emitter, an IR camera module, etc. The working principle of the TOF 3D sensing module is to calculate the distance (i.e., depth) between the TOF 3D sensing module and the object being photographed by the time when the infrared rays return to obtain a 3D depth map.
[0074] The structured light 3D sensing module can also be applied to face recognition, somatosensory game consoles, industrial machine vision inspection and other fields. The TOF 3D sensing module can also be applied to game consoles, augmented reality (AR) / virtual reality (VR) and other fields.
[0075] In other embodiments, the camera 193 may also be composed of two or more cameras. The two or more cameras may include a color camera, which can be used to collect color image data of the photographed object. The two or more cameras may use stereo vision technology to collect depth data of the photographed object. Stereo vision technology is based on the principle of human eye parallax. Under natural light, two or more cameras are used to capture images of the same object from different angles, and then triangulation and other operations are performed to obtain the distance information between the electronic device 100 and the photographed object, that is, the depth information.
[0076] In some embodiments, the electronic device 100 may include one or more cameras 193. Specifically, the electronic device 100 may include one front camera and one rear camera. The front camera may be used to collect color image data and depth data of the photographer facing the display screen 194, and the rear camera may be used to collect color image data and depth data of the subject (such as people, scenery, food, etc.) facing the photographer.
[0077] In some embodiments, the CPU or GPU or NPU in the processor 110 can process the color image data and depth data collected by the camera 193. In some embodiments, the NPU can identify the color image data collected by the camera 193 (specifically the color camera module) through a neural network algorithm based on the skeleton point recognition technology, such as a convolutional neural network algorithm (CNN), to determine the skeleton points of the photographed person. The CPU or GPU can also run a neural network algorithm to determine the skeleton points of the photographed person according to the color image data. In some embodiments, the CPU or GPU or NPU can also be used to confirm the figure of the photographed person (such as body proportions, fatness and thinness of body parts between skeleton points) according to the depth data collected by the camera 193 (which can be a 3D sensing module) and the identified skeleton points, and can further determine the body beautification parameters for the photographed person, and finally process the photographed image of the photographed person according to the body beautification parameters, so that the body shape of the photographed person in the photographed image is beautified. How to perform body beautification processing on the image of the photographed person based on the color image data and depth data collected by the camera 193 will be described in detail in subsequent embodiments, which will not be described in detail here.
[0078] The display screen 194 is used to display data such as captured images, countdown information for entering the power saving mode, and videos. For example, the display screen 194 can be used for pictures and videos taken by the camera 193. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.
[0079] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0080] Figure 2It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0081] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: application layer, application framework layer, Android runtime (ART) and native C / C++ library, hardware abstract layer (HAL) and kernel layer.
[0082] The application layer can include a series of application packages.
[0083] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0084] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0085] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, an activity manager, an input manager, and the like.
[0086] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.
[0087] Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0088] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0089] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0090] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0091] The activity manager can provide activity management services (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.
[0092] The input manager can provide input management services (IMS), which can be used to manage system input, such as touch screen input, key input, sensor input, etc. IMS takes events from input device nodes and distributes them to appropriate windows through interaction with WMS.
[0093] The Android runtime includes the core library and the Android runtime. The Android runtime is responsible for converting source code into machine code. The Android runtime mainly uses the ahead of time (AOT) compilation technology and the just in time (JIT) compilation technology.
[0094] The core library is mainly used to provide basic Java class library functions, such as basic data structures, mathematics, IO, tools, databases, networks, etc. The core library provides an API for users to develop Android applications.
[0095] The native C / C++ library can include multiple functional modules, such as surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0096] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES provides drawing and operation of 2D graphics and 3D graphics in applications. SQLite provides a lightweight relational database for applications of electronic device 100.
[0097] The hardware abstraction layer runs in user space, encapsulates kernel layer drivers, and provides a calling interface to the upper layer.
[0098] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0099] The methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure and software structure.
[0100] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 1 and Figure 2 Taking the electronic device 100 of the structure shown as an example, the method for starting the power saving mode provided by the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios. It should be understood that the electronic device to which this method is applicable is not limited to Figure 1 and Figure 2 The hardware and software structure shown in the figure can be adjusted according to the specific application scenario in actual application. Figure 1 and Figure 2 The hardware and software system architecture shown may be modified, and this application does not limit this.
[0101] The following has Figure 1 and Figure 2 Taking the mobile phone with the structure shown as an example, the method for starting the power saving mode provided by the present application is introduced. The method can be executed by an electronic device, or by a module (such as a processor, chip, or chip system, etc.) applied to the electronic device, or by a logical node, logical module or software that can realize all or part of the functions of the electronic device.
[0102] Optionally, the electronic device may be a terminal device, such as a mobile phone. In an optional implementation, the terminal device may include a power saving module, and the terminal device may control whether it (i.e., the terminal device) enters a power saving mode through the power saving module, wherein the power saving module is used to manage the operation or shutdown of at least one application; in another optional implementation, the terminal device may not include a power saving module, and the terminal device may control itself to enter a power saving mode through other units or modules alone or in combination; in actual applications, the structure of the terminal device may be designed according to actual needs, and this application does not limit this.
[0103] In the following, the electronic device is a mobile phone as an example, wherein the mobile phone includes a power saving module, and the power saving module is used to manage the running or closing of at least one application. The mobile phone can start to enter the power saving mode by itself through the power saving module; Figure 3 As shown, a method 300 for starting a power saving mode is shown, and the method 300 includes S301 and S302:
[0104] S301, the mobile phone detects the duration of the power saving trigger state, the power saving trigger state is used to trigger the mobile phone to enter the power saving mode, and the power saving trigger state includes at least one of the following states: user no operation state, screen highlight state, no gaze state, and sleep state.
[0105] Among them, the user no operation state means that the mobile phone has not detected any user operation event within a preset time period; the user operation event includes but is not limited to a click event, a sliding event, an air gesture event and a language command event, among which the click event can be a single-click event or a double-click event; the sliding event can be a sliding event to the top of the screen, a sliding event to the bottom of the screen, a sliding event to the left of the screen or a sliding event to the right of the screen; the air gesture event can be a static gesture event or a dynamic gesture event, for example, a static gesture event can be a five-finger spread gesture, an OK gesture and a fist gesture, etc., and a dynamic gesture event can be a finger drawing an M-shaped gesture, a finger drawing an L-shaped gesture, etc., and this application does not limit this; a language command event refers to a user operating an application on the mobile phone through the voice recognition command set by the mobile phone. For example, the user is currently using the mobile phone to watch a video. The user can wake up the voice recognition function of the mobile phone by shouting "***", and then shout to play the next episode. The mobile phone will switch the current episode to the next episode for playback according to the voice command of "Play the next episode" input by the user.
[0106] The screen highlight state refers to the state in which the mobile phone detects that the brightness value of the display screen 194 is greater than or equal to the brightness threshold, wherein the brightness threshold may be 90% or 95%, which is not limited in this application; for example, if the brightness value of the display screen 194 is greater than 90%, it means that the display screen 194 is in the highlight state, that is, the mobile phone is currently in the screen highlight state. Correspondingly, the non-screen highlight state refers to the state in which the mobile phone detects that the brightness value of the display screen 194 is less than the brightness threshold.
[0107] The no-gaze state refers to a state in which the mobile phone detects that the user's gaze has left the mobile phone display screen 194 ; for example, a gaze perception module in the mobile phone detects that the user's gaze has left the display screen 194 .
[0108] The sleeping state refers to the state in which the mobile phone detects that the user is currently sleeping; for example, the mobile phone determines whether the user is currently sleeping by obtaining sleep data (such as alpha wave data) collected by a wearable device worn by the user.
[0109] It should be noted that in the following different scenarios, the power saving trigger state may include at least one of the following states: user no operation state, screen highlight state, no gaze state, sleep state; the specific scenarios are as follows:
[0110] In the scenario where the screen is on and the remaining power is greater than the power threshold, an optional implementation is that the mobile phone can determine whether it is necessary to start the mobile phone to enter power saving mode by detecting whether the duration of any one of the user's no operation state, screen highlight state, no gaze state or sleep state is greater than the time threshold. Another optional implementation is that the mobile phone can determine whether it is necessary to start the mobile phone to enter power saving mode by detecting whether the duration of two or more of the user's no operation state, screen highlight state, no gaze state or sleep state is greater than the time threshold. The remaining power refers to the current remaining power of the mobile phone.
[0111] When the screen is off and the remaining battery power is greater than the battery threshold, the mobile phone can determine whether it is necessary to start the mobile phone into power saving mode by detecting whether the duration of the user's inactivity and sleep state is greater than the time threshold.
[0112] When the screen is off and the power consumption is less than or equal to the power threshold, or when the screen is on and the power consumption is less than or equal to the power threshold, the phone will start to enter power saving mode, that is, the phone will enter low power consumption mode to save power and extend the usage time of the phone.
[0113] It should be noted that the above power threshold may be a preset power value, for example, 20% or 10%, and this application does not limit this.
[0114] S302, when the duration is greater than the time threshold, start the mobile phone to enter the power saving mode; or, when the duration is less than or equal to the time threshold, continue to detect the duration and determine that the mobile phone does not enter the power saving mode.
[0115] Optionally, the mobile phone can manage the operation or shutdown of at least one application through the power saving module, so that the mobile phone enters the power saving mode or low power consumption mode, that is, the mobile phone can start to enter the power saving mode by itself through the power saving module. For example, if the mobile phone detects that the duration of the power saving trigger state is greater than the time threshold, the power saving module is triggered to work, so that the mobile phone enters the power saving mode; at this time, the power saving module can close the currently running application or limit some functions of the currently running application. For example, the mobile phone is currently running applications A and B. When the power saving module is triggered, the power saving module can close applications A and B, or only close application A and limit some functions of application B, so that the mobile phone enters the power saving mode. For detailed descriptions, please refer to the embodiments below, which will not be repeated here.
[0116] The time threshold refers to a preset duration, for example, the time threshold is 1 hour or 0.5 hour, etc. When the duration is greater than 1 hour (or 0.5 hour), the mobile phone starts the power saving module to make the mobile phone enter the power saving mode; otherwise, the power saving module is not started, that is, the power saving mode is not entered.
[0117] It should be noted that after the mobile phone starts the power saving module, the mobile phone will enter the power saving mode or low power consumption mode.
[0118] The mobile phone detects the duration of the power saving trigger state through a timer. When the duration is greater than the event threshold, the mobile phone will start the power saving module. At this time, the power saving module will close the currently running application, or limit some functions of the running application (for example, some high-power consumption functions), so that the mobile phone enters power saving mode or low power consumption mode, thereby extending the usage time of the mobile phone.
[0119] It can be seen that, usually when users are not aware of power saving, the mobile phone may waste power. Therefore, this method identifies the power saving trigger state and determines whether to start the mobile phone into power saving mode based on the relationship between the duration of the power saving trigger state and the time threshold. For example, when the duration is less than or equal to the time threshold, the duration continues to be detected and the mobile phone is not started into power saving mode; when the duration is greater than the time threshold, the mobile phone is started into power saving mode in time to avoid the situation where the mobile phone wastes power due to the application running idle for a long time when the user is not aware of power saving.
[0120] In different scenarios, the method 300 has different implementation modes; the method of starting the power saving mode is described below in combination with different scenarios.
[0121] Scenario 1: The screen is on and the remaining battery power is greater than the battery threshold
[0122] In an optional implementation, the power saving triggering state includes a user no operation state, and S301 specifically includes: when a user operation event is detected, starting a first timer; and detecting the duration of the user no operation state by using the first timer.
[0123] The first timer is used to record the duration of the user's inactivity.
[0124] For example, the user operation event is a click event, and the user is currently using a mobile phone to watch a video. During the video viewing process, the user will play the video by clicking the play button, the selection button, the volume button, the fast-forward button, etc.; when the user clicks the play button of the video application on the display screen 194, the mobile phone starts the first timer to start timing, and uses the first timer to detect the duration of the user's inactivity; when the duration of the user's inactivity is greater than the time threshold, it means that the user may have fallen asleep, or may have left the mobile phone to do other things. At this time, the mobile phone will generate a prompt message to remind the user that it is about to enter the power saving mode or the low power consumption mode; the user can choose whether to let the mobile phone enter the power saving mode or the low power consumption mode according to the prompt message; if the user chooses to enter the power saving mode or the user does not make any choice within a preset time (for example, before the end of the countdown below), the mobile phone starts the power saving module; at this time, the power saving module will close the video application, so that the mobile phone enters the power saving mode or the low power consumption mode, so as to avoid the situation where the video application keeps playing until the battery is exhausted and shuts down when the user is not aware of power saving. On the contrary, if the user chooses not to enter the power saving mode, the mobile phone determines not to start the power saving module and continues to play the video.
[0125] It should be noted that the state where the user is not aware of power saving means that the user is not aware that the application on the mobile phone continues to run when the user is not using it. The prompt information can be a countdown information or a message reminder information. This application does not limit this. Please refer to the relevant embodiments of the interface display below, which will not be repeated here.
[0126] In this embodiment, the mobile phone determines whether to start the power saving mode by identifying the user's inactivity and recording the duration of the user's inactivity, thereby avoiding starting the power saving mode while the user is using the mobile phone, thereby improving the user experience.
[0127] In another optional implementation, the power saving trigger state includes a screen highlight state, where the screen highlight state is a state where the screen brightness value is greater than a brightness threshold; S301 specifically includes: when the screen highlight state is detected, starting a second timer; and detecting the duration of the screen highlight state by the second timer. The second timer is used to record the duration of the screen highlight state.
[0128] It should be noted that the screen brightness is proportional to the power consumption. The longer the display screen 194 is in the high-brightness state, the greater the power consumption of the mobile phone.
[0129] For example, a user uses a mobile phone to watch a short video and adjusts the screen brightness of the display screen 194 to a highlighted state; when the mobile phone detects that the user has adjusted the screen brightness to a highlighted state, the mobile phone starts a second timer to start timing, and uses the second timer to detect how long the screen remains in the highlighted state; when the duration of the highlighted state is greater than a time threshold, in order to avoid the user putting down the mobile phone to do other things and forgetting to turn off the short video playback, the mobile phone will generate a prompt message to remind the user that it is about to enter a power saving mode or a low power consumption mode; the user can choose whether to let the mobile phone enter a power saving mode or a low power consumption mode according to the prompt message; if the user chooses to enter the power saving mode or the user does not make any choice within a preset time (for example, before the end of the countdown below), the mobile phone starts the power saving module; at this time, the power saving module will close the video application, causing the mobile phone to enter a power saving mode or a low power consumption mode, so as to avoid the user playing a short video on the mobile phone until the battery is exhausted without watching it.
[0130] It can be seen that the mobile phone determines whether to start the power saving mode by identifying the screen highlight state and recording the duration of the screen highlight state, which can avoid starting the power saving mode while the user is using the mobile phone, thereby improving the user experience.
[0131] In another optional implementation, the power saving trigger state includes a no-gaze state, which refers to a state in which the user's eyes are away from the screen; S301 specifically includes: when the no-gaze state is detected, the mobile phone starts a third timer; and the duration of the no-gaze state is detected by the third timer.
[0132] For example, when a user uses a mobile phone to read an e-book, the user may turn pages, slide the reading interface up and down, etc. during the process of reading the e-book; when the mobile phone detects that the user's eyes leave the display screen 194 (that is, the mobile phone detects a no-gaze state), the mobile phone starts a third timer to start timing, and detects the duration of the no-gaze state through the third timer; when the duration of the no-gaze state is greater than the time threshold, the mobile phone will generate a prompt message to remind the user that it is about to enter a power saving mode or a low power consumption mode; the user can choose whether to let the mobile phone enter the power saving mode or the low power consumption mode according to the prompt message; if the user chooses to enter the power saving mode or the user does not make any choice within a preset time (for example, before the end of the countdown below), the mobile phone starts the power saving module; at this time, the power saving module will close the e-book, so that the mobile phone enters the power saving mode or the low power consumption mode, so as to avoid the situation where the e-book keeps running when the user is not reading and the mobile phone battery is exhausted.
[0133] In this embodiment, the mobile phone determines whether to start the power saving mode by identifying the no-gaze state and recording the duration of the no-gaze state, which can avoid starting the power saving mode when the user uses the mobile phone, thereby improving the user experience.
[0134] In an optional embodiment, the power saving trigger state includes a sleep state, and detecting the duration of the power saving trigger state includes: when the sleep state is detected and the screen is in a bright state, starting a fourth timer; and detecting the duration of the sleep state by the fourth timer.
[0135] It should be noted that the mobile phone can obtain relevant data on whether the user is in a sleep state through the smart wearable device worn by the user (such as a smart watch, a smart bracelet, etc.). For example, if the mobile phone determines that the user is in a sleep state based on the relevant data, the mobile phone starts the power saving module to make the mobile phone enter the power saving mode; if the mobile phone determines that the user is not in a sleep state based on the relevant data, the mobile phone determines not to start the power saving mode.
[0136] For example, a user wears a smart bracelet on his wrist, which can monitor the user's sleep state and communicate with a mobile phone; when the user uses a mobile phone to browse a shopping website, the mobile phone will obtain relevant data reflecting whether the user is asleep from the smart bracelet at intervals of a period of time (the period of time can be a preset time, for example, 1 minute or 5 minutes, etc.), and judge whether the user is in a sleeping state based on the relevant data; when the mobile phone detects that the user is in a sleeping state, the mobile phone starts a fourth timer to start timing, and detects the duration of the sleeping state through the fourth timer; when the duration of the sleeping state is greater than the time threshold, the mobile phone will generate a prompt message to remind the user that it is about to enter a power saving mode or a low power consumption mode; the user can determine whether to let the mobile phone enter a power saving mode or a low power consumption mode based on the prompt message; if the user chooses to enter the power saving mode or the user does not make any choice within a preset time (for example, before the end of the countdown below), the mobile phone starts the power saving module; at this time, the power saving module will close the shopping website, so that the mobile phone enters a power saving mode or a low power consumption mode to extend the use time of the mobile phone.
[0137] It can be seen that by identifying the sleep state and recording the duration of the sleep state, the mobile phone determines whether to start the power saving mode, which can avoid starting the power saving mode while the user is using the mobile phone, thereby improving the user experience.
[0138] It should be noted that when the mobile phone detects that the user has been in a state of no operation for a long time, or the screen has been highlighted for a long time, or the user has not been looking at the screen for a long time, or the sleep state for a long time is less than or equal to the time threshold, the mobile phone will continue to detect the duration of these four states and determine not to start the power saving module.
[0139] It should also be noted that when the mobile phone detects the duration of the power saving trigger state through a timer (such as a first timer, a second timer, etc.), when the power saving trigger state is interrupted, the timer will restart the timing. Among them, the trigger state being interrupted can be understood as follows:
[0140] 1) When the mobile phone detects a user operation event, the mobile phone starts the first timer to start recording the duration of the user's inactivity; during the timing of the first timer, when the duration of the user's inactivity recorded by the first timer is less than or equal to the time threshold, if the mobile phone detects a user operation event again, the first timer will interrupt the currently recorded duration of the user's inactivity and restart a new timing.
[0141] 2) When the mobile phone detects that the display screen 194 is in the screen highlight state, the mobile phone starts the second timer to start recording the duration of the screen highlight state; during the timing of the second timer, when the duration of the screen highlight state recorded by the second timer is less than or equal to the time threshold, if the mobile phone detects that the display screen 194 is in the non-screen highlight state, the second timer will interrupt the currently recorded duration of the screen highlight state and restart a new timing.
[0142] 3) When the mobile phone detects that the user is in a non-attention state, the mobile phone starts a third timer to record the duration of the non-attention state; during the timing of the third timer, when the duration of the non-attention state recorded by the third timer is less than or equal to the time threshold, if the mobile phone detects the user's attention state, the third timer will interrupt the current recording of the duration of the non-attention state and restart a new timing. The user's attention state refers to the state where the user's line of sight returns to the display screen 194.
[0143] 4) When the mobile phone detects that the user is in a sleeping state, the mobile phone starts the fourth timer to record the duration of the sleeping state; during the timing of the fourth timer, when the duration of the sleeping state recorded by the fourth timer is less than or equal to the time threshold, if the mobile phone detects that the user is in a non-sleeping state, the fourth timer will interrupt the currently recorded duration of the sleeping state and start a new timing.
[0144] In another optional implementation, the mobile phone can determine whether it is necessary to start the power saving module by detecting whether the duration of two or more of the user's no-operation state, screen highlight state, no-attention state or sleep state is greater than a time threshold.
[0145] For example, the mobile phone determines whether to start the power saving module by monitoring the duration of the user's inactivity and the duration of the sleep state; when the user uses the mobile phone for video learning, the mobile phone will obtain relevant data reflecting whether the user is asleep from the smart meter at intervals (for example, 5 minutes), and determine whether the user is in a sleep state based on the relevant data; when the mobile phone detects that the user is in a sleep state, and when the mobile phone detects that the duration of the user's inactivity is greater than the first time threshold, and the duration of the sleep state is greater than the second time threshold, the mobile phone will generate a prompt message to remind the user that it is about to enter the power saving mode or the low power consumption mode; the user can determine whether to let the mobile phone enter the power saving mode or the low power consumption mode based on the prompt message; if the user chooses to enter the power saving mode or the user does not make any choice within the preset time (for example, before the end of the countdown below), the mobile phone starts the power saving module; at this time, the power saving module will turn off the video, causing the mobile phone to enter the power saving mode or the low power consumption mode. It should be noted that the first time threshold and the second time threshold may be the same or different, and this application does not limit this; for the relevant description of the first time threshold and the second time threshold, please refer to the relevant description of the time threshold above, which will not be repeated here.
[0146] It should be understood that the mobile phone can also determine whether to start the power saving module by the duration of the screen highlight state, the duration of the no-attention state and the duration of the sleep state; please refer to the above description of the mobile phone determining whether to start the power saving mode by monitoring the duration of the user's no-operation state and the duration of the sleep state, which will not be repeated here.
[0147] Scenario 2: The screen is off and the remaining battery power is greater than the battery threshold
[0148] The mobile phone can determine whether it is necessary to start the mobile phone into power saving mode by detecting whether the duration of the user's no-operation state and sleep state is greater than a time threshold.
[0149] In an optional implementation, when a user uses a mobile phone to listen to audio, the mobile phone is in a screen-off state, and the remaining power is greater than a power threshold, the mobile phone can determine whether to start the power saving module by detecting the relationship between the duration of the user's inactivity or the duration of the sleep state and the time threshold, so that the mobile phone enters a power saving mode. For example, a user turns on a music player to listen to music and sets the mobile phone to a screen-off state as a user operation event. When the mobile phone detects the user operation event, it starts a first timer to record the duration of the user's inactivity. If the mobile phone detects a user operation event during the timing, the first timer is interrupted and restarted. When the duration of the user's inactivity recorded by the first timer is greater than the time threshold, the mobile phone will generate a prompt message on the display screen 194 to remind the user that it is about to enter a power saving mode or a low power consumption mode; the user can choose whether to let the mobile phone enter a power saving mode or a low power consumption mode according to the prompt message.
[0150] In another optional implementation, when a user uses a mobile phone to listen to audio, the mobile phone is in a screen-off state, and the remaining power is greater than the power threshold, the mobile phone can also determine whether to start the power saving module by detecting the relationship between the duration of the user's no-operation state and the duration of the sleep state and the time threshold. For details, please refer to the above embodiment, in which the mobile phone determines whether to start the power saving module by detecting whether the duration of two or more of the user's no-operation state, screen highlight state, no-attention state, or sleep state is greater than the time threshold, which is not repeated here.
[0151] Combine the following Figures 4 to 6 The display interface of the display screen 194 shown further introduces the method of starting the power saving mode.
[0152] In an optional implementation, when the duration is greater than the time threshold, the mobile phone can display a prompt message to the user through the display screen 194 to remind the user that the power saving mode is about to be entered, so that the user can choose whether to enter the power saving mode. As can be seen from the above description, the prompt message can be a countdown message or a message reminder message (for example, a voice reminder, a pop-up box reminder, etc.).
[0153] In an optional implementation, the prompt information is countdown information, and the countdown information is displayed to the user through a countdown interface with a preset transparency. For example, when the duration is greater than the time threshold, the method 300 further includes: displaying a countdown interface with a preset transparency on the screen of the mobile phone (i.e., the display screen 194), the countdown interface including a first option and a second option, the first option indicating agreement to start the power saving mode, and the second option for indicating disagreement to start the power saving mode.
[0154] The countdown interface is used to display countdown information to the user, and the countdown information can be a preset duration, such as 15 seconds, 10 seconds, etc. The mobile phone can display the countdown information through the countdown interface with a preset transparency (for example, the transparency is 50%), so that when notifying the user that the mobile phone is about to enter the power saving mode, it will not affect the user's normal use of the mobile phone (for example, using the mobile phone to watch videos, etc.).
[0155] When the duration is greater than the time threshold, it means that the user may not be in front of the mobile phone. The mobile phone will display a countdown interface with preset transparency to the user through the display screen 194 to remind the user whether to enter the power saving mode; when the user selects the first option of the countdown interface, the mobile phone starts the power saving module and enters the power saving mode according to the first option detected by the user; when the user selects the second option of the countdown interface, the mobile phone determines not to start the power saving module and determines not to enter the power saving mode according to the second option detected by the user.
[0156] As an example, Figure 4 As shown in Figure (a), the user is watching a video on a mobile phone. When the mobile phone determines that the power saving module needs to be activated based on the duration of the power saving trigger state, the mobile phone will generate a countdown interface with a preset transparency (for example, the transparency is 60%) on the video interface, and display a countdown message of 15 seconds with a preset transparency (for example, the transparency is 60%) on the countdown interface to remind the user to choose whether to enter the power saving mode.
[0157] As another example, Figure 5 As shown in Figure (a), the user is watching a video on a mobile phone. When the mobile phone determines that the power saving module needs to be started based on the duration of the power saving trigger state, the mobile phone will generate a power saving reminder window on the video interface. Optionally, the power saving reminder window can also be a message pop-up box with preset transparency, which is not limited in this application; the user can choose whether to start the power saving mode in the power saving reminder window. When the user selects the option to start immediately on the power saving reminder window, the mobile phone starts the power saving module and enters the power saving mode; when the user selects the option not to start temporarily on the power saving reminder window, the mobile phone determines not to start the power saving module and determines not to enter the power saving mode.
[0158] In this embodiment, the mobile phone can remind the user that the mobile phone is about to enter the power saving mode by displaying prompt information (e.g., countdown information) on the screen (i.e., display screen 194), giving the user choice space. The user can determine whether to enter the power saving mode before the countdown ends according to their own needs, thereby improving the user experience.
[0159] In another optional implementation, when the duration is greater than a time threshold, the mobile phone is started to enter power saving mode, including: when the duration is greater than the time threshold and it is detected that the user selects the first option on the countdown interface, the mobile phone is started to enter power saving mode.
[0160] Optionally, the mobile phone determines whether to start the power saving module according to the user's selection on the countdown interface to determine whether to enter the power saving mode.
[0161] As an example, Figure 4 As shown in FIG. 1 , a user is watching a video on a mobile phone. When the mobile phone determines that the power saving module needs to be activated according to the duration of the power saving trigger state, the mobile phone generates a countdown interface with a preset transparency (for example, the transparency is 50%) on the video interface, and displays a 15-second countdown information on the countdown interface, as shown in FIG. Figure 4 As shown in 401 of Figure (a), the user can choose whether to enter the power saving mode by clicking the "Cancel" option (i.e., the second option in the countdown interface above) or the "Confirm" option (i.e., the first option in the countdown interface above) below the countdown information. When the user selects the "Confirm" option, as shown in Figure 4 As shown in 402 of the middle (b) figure, the countdown interface disappears from the video interface, and the mobile phone starts the power saving module according to the user's selection result; at this time, the power saving module will close the video application, and the mobile phone calls the screen-off lock screen interface to make the mobile phone enter the lock screen standby interface, such as Figure 4 As shown in Figure (c), the mobile phone enters the power saving mode; when the user selects the "Cancel" option, the countdown interface disappears from the video interface, and the mobile phone determines not to start the power saving module and continues to play the video for the user. Figure 4 As shown in Figure (d).
[0162] In this embodiment, the mobile phone determines whether to start the mobile phone into power saving mode according to the first option or the second option selected by the user on the countdown interface, rather than directly entering the power saving mode, which can improve user experience.
[0163] In an optional embodiment, when the duration is greater than a time threshold, the mobile phone is started to enter power saving mode, including: when the duration is greater than the time threshold, and at the end of the countdown on the countdown interface, it is not detected that the user selects the first option or the second option of the countdown interface, then the mobile phone is started to enter power saving mode.
[0164] Among them, if the mobile phone does not detect the user's selection operation on the countdown interface (or power saving reminder window) before the countdown ends (that is, within the preset time period), the mobile phone starts the power saving module and enters the power saving mode. Among them, the preset time period refers to a preset period of time, such as 10 seconds, 15 seconds, etc., and the preset period of time can be the length of a countdown. The selection operation includes a first operation and a second operation, wherein the first operation is used to instruct the user to select the mobile phone to enter the power saving mode. When the mobile phone detects the first operation, it will start the power saving module and enter the power saving mode; the second operation is used to instruct the user to select the mobile phone not to enter the power saving mode. When the mobile phone detects the second operation, it is determined that the power saving module will not be started and it is determined not to enter the power saving mode. Among them, the first operation is the operation of the first option selected by the user on the countdown interface, and the second operation is the operation of the second option selected by the user on the countdown interface.
[0165] For example, Figure 4 As shown in Figure (a), when the countdown on the countdown interface ends, if the mobile phone does not detect the first option or the second option selected by the user on the countdown interface, the mobile phone will start the power saving module and enter the power saving mode. In other words, when the user does not make any selection on the countdown interface, the mobile phone will start the power saving module after the 15-second countdown ends, close the video application, and enter the lock screen standby interface, that is, the mobile phone enters the power saving mode.
[0166] As another example, Figure 5 As shown in FIG. 1 , a user is watching a video on a mobile phone. When the mobile phone determines that the power saving mode needs to be activated based on the duration of the power saving trigger state, the mobile phone will pop up a power saving reminder window on the video interface, such as Figure 5 As shown in 501 of Figure (a), the user can choose whether to enter the power saving mode by selecting the "turn on immediately" or "do not turn on temporarily" option. Figure 5 As shown in 502 of the middle (b) figure, the power saving reminder window disappears from the video interface, and the mobile phone starts the power saving module according to the result of the user's selection of immediate start; at this time, the power saving module will close the video application, and the mobile phone calls the screen off lock screen interface to make the mobile phone enter the lock screen standby interface, such as Figure 5 As shown in Figure (c), the phone enters power saving mode; when the user selects the "Do not turn on" option, Figure 5 As shown in 503 of FIG. (b), the power saving reminder window disappears from the video interface, and the mobile phone determines not to start the power saving module and continues to play the video for the user. Figure 5 As shown in the middle (d) figure. If the user does not make any selection in the power saving reminder window, the phone will start the power saving module after 10 seconds, close the video application, and enter the lock screen standby interface, that is, the phone enters the power saving mode.
[0167] In this embodiment, if the mobile phone does not detect the user's selection operation before the countdown ends, the mobile phone enters the power saving mode by starting the power saving module to avoid the situation where the application runs idle for a long time and the mobile phone battery is exhausted.
[0168] In an optional implementation, when starting the mobile phone to enter power saving mode, method 300 also includes: the mobile phone detects whether the current application is an authorized application, an authorized application refers to an application that has obtained power saving management authorization; when the current application is an authorized application, the mobile phone performs power saving management on the current application; when the current application is not an authorized application, the mobile phone determines not to perform power saving management on the current application.
[0169] As an example, the mobile phone can detect whether the current application is an authorized application through the power saving module. The authorized application refers to an application that has obtained power saving management authorization; when the current application is an authorized application, the mobile phone performs power saving management on the current application through the power saving module; when the current application is not an authorized application, the mobile phone determines not to perform power saving management on the current application through the power saving module.
[0170] For example, in some scenarios, the user may not want the phone to close some applications through the power saving module. Therefore, the user can set which applications need to be managed by the power saving module on the power saving management setting interface.
[0171] like Figure 6 As shown in Figure (a), the power saving management setting interface has set a switch button for all applications on the mobile phone. The user can decide whether the application enters the management scope of the power saving module by selecting on or off; for example, the user can turn on the setting switch of 002 application, 003 application, 005 application, 006 application and 007 application on the power saving management setting interface, so that 002 application, 003 application, 005 application, 006 application and 007 application are authorized applications authorized by power saving management; when the mobile phone starts the power saving module, the authorized application will be managed by the power saving module, for example, when the current application is an authorized application, the power saving module will close the current application, or limit some functions of the current application, so that the mobile phone enters the lock screen standby interface, that is, the mobile phone enters the power saving mode to save the power consumption of the mobile phone. For other applications that are not set as authorized applications (for example, 001 application), for example, when the current application is not an authorized application, after the mobile phone starts the power saving module, the current application is not controlled by the power saving module and continues to run normally.
[0172] For example, after the user has set up the authorized application on the power saving management setting interface, Figure 6As shown in Figure (a); for example, the user is chatting on the mobile phone using the 002 application software. When the mobile phone determines that the power saving module needs to be activated according to the duration of the power saving trigger state, the mobile phone will generate a countdown interface with a preset transparency on the chat interface and display a 15-second countdown information on the countdown interface, such as Figure 6 As shown in 601 of Figure (b); the user can choose whether to enter the power saving mode by clicking the "Cancel" or "Confirm" option below the countdown information. When the user selects the "Confirm" option, the countdown interface disappears from the chat interface, and the mobile phone starts the power saving module according to the result of the user's selection and confirmation; at this time, the power saving module will determine whether the 002 application is an authorized application based on the authorized application set by the user on the power saving management setting interface. When the 002 application is an authorized application, the power saving module will close the 002 application, or limit some functions of the 002 application, so that the mobile phone enters the power saving mode to save the power consumption of the mobile phone. When the user selects the "Cancel" option, the countdown interface disappears from the chat interface, and the mobile phone determines not to start the power saving module. The user can continue to use the 002 software to chat.
[0173] For another example, a user is using the 004 application software on a mobile phone to attend a meeting. When the mobile phone determines that the power saving module needs to be activated based on the duration of the power saving trigger state, the mobile phone will generate a countdown interface with a preset transparency on the meeting interface and display a 15-second countdown information on the countdown interface, such as Figure 6 As shown in 602 of Figure (c); the user can choose whether to enter the power saving mode by clicking the "Cancel" or "Confirm" option below the countdown information. When the user selects the "Confirm" option, the countdown interface disappears from the conference interface, and the mobile phone starts the power saving module according to the result of the user's selection and confirmation; at this time, the power saving module will determine whether the 004 application is an authorized application based on the authorized application set by the user on the power saving management setting interface. When the 004 application is an unauthorized application, the power saving module will not close the 004 application, nor will it limit some functions of the 004 application, and the user can continue to use the 004 software for the meeting. When the user selects the "Cancel" option, the countdown information disappears from the conference interface, and the mobile phone determines not to start the power saving module, and the user can continue to use the 004 software for the meeting.
[0174] For another example, when the user is in the screen-off state (i.e., the display screen 194 is black), and is using the 005 application software on the mobile phone to listen to music, the user can click the power button to wake up the mobile phone from the screen-off interface to the lock screen standby interface, and the relevant information of the 005 application playing music will be displayed on the lock screen standby interface; when the mobile phone determines that the power saving module needs to be started according to the duration of the power saving trigger state, the mobile phone will generate a countdown interface with a preset transparency on the lock screen standby interface, and display a 15-second countdown information on the countdown interface, such as Figure 6As shown in 603 of Figure (d); the user can choose whether to enter the power saving mode by clicking the "Cancel" or "Confirm" option below the countdown information. When the user selects the "Confirm" option, the countdown information disappears from the lock screen standby interface, and the mobile phone starts the power saving module according to the result of the user's selection and confirmation; at this time, the power saving module will determine whether the 005 application is an authorized application based on the authorized applications set by the user on the power saving management setting interface. When the 005 application is an authorized application, the power saving module will close the 005 application or limit some functions of the 005 application. When the user selects the "Cancel" option, the countdown interface disappears from the lock screen standby interface, and the mobile phone determines not to start the power saving module. The user can continue to use the 005 application to listen to music.
[0175] In this embodiment, the user can set up authorization for power saving management of the current application in advance according to his or her usage requirements for the current application; the mobile phone determines whether to perform power saving management on the current application by detecting whether the current application is an authorized application; this method can support users to customize whether the application program enters the management scope of the power saving module according to their own habits or preferences, and the settings are flexible, which improves the user experience.
[0176] The above describes in detail an example of a method for starting a power saving mode provided by the present application. It is understandable that, in order to implement the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0177] The present application can divide the method of starting the power saving mode into functional units according to the above method example. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0178] Figure 7 A schematic structural diagram of an electronic device provided by the present application is shown. Figure 7 The dotted line in the figure indicates that the unit or the module is optional. The electronic device 700 can be used to implement the method described in the above method embodiment. The electronic device 700 can be a terminal device or a chip (system).
[0179] The electronic device 700 includes one or more processors 701, which can support the electronic device 700 to implement Figure 3 The method in the corresponding method embodiment. The processor 701 can be a general-purpose processor or a special-purpose processor. For example, the processor 701 can be a central processing unit (CPU). The CPU can be used to control the electronic device 700, execute software programs, and process data of software programs. The electronic device 700 can also include a communication unit 705 to realize the input (reception) and output (transmission) of signals.
[0180] The electronic device 700 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above embodiments.
[0181] The communication unit 705 may be an input and / or output circuit of the chip (system), or the communication unit 705 may be a communication interface of the chip (system), and the chip (system) may be a component of the electronic device 700 .
[0182] For another example, the communication unit 705 may be a transceiver of the electronic device 700 , or the communication unit 705 may be a transceiver circuit of the electronic device 700 .
[0183] The electronic device 700 may include one or more memories 702, on which a program 704 is stored. The program 704 can be executed by the processor 701 to generate instructions 703, so that the processor 701 performs the method described in the above method embodiment according to the instructions 703. Optionally, data may also be stored in the memory 702. Optionally, the processor 701 may also read the data stored in the memory 702, and the data may be stored at the same storage address as the program 704, or the data may be stored at a different storage address from the program 704.
[0184] The processor 701 and the memory 702 may be provided separately or integrated together, for example, integrated on a system on chip (System On Chip, SOC) of the electronic device.
[0185] The specific manner in which the processor 701 executes the method for starting the power saving mode may refer to the relevant description in the method embodiment.
[0186] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in the processor 701. The processor 701 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.
[0187] The present application also provides a computer program product, which, when executed by the processor 701, implements the method of any method embodiment in the present application.
[0188] The computer program product may be stored in the memory 702 , for example, a program 704 , which is converted into an executable target file that can be executed by the processor 701 after preprocessing, compiling, assembling, and linking.
[0189] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.
[0190] The computer-readable storage medium is, for example, a memory 702. The memory 702 may be a volatile memory or a nonvolatile memory, or the memory 702 may include both a volatile memory and a nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
[0191] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.
[0192] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the splitting of the units is only a logical function splitting. There may be other splitting methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.
[0193] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
[0194] Finally, the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for starting a power saving mode, characterized in that: Applied to electronic equipment, the method comprises: Detecting the duration of a power saving trigger state, wherein the power saving trigger state is used to trigger the electronic device to enter a power saving mode, and the power saving trigger state includes at least one of the following states: a user no operation state, a screen highlight state, a no gaze state, and a sleep state; When the duration is longer than a time threshold, starting the electronic device to enter a power saving mode; Alternatively, when the duration is less than or equal to the time threshold, the duration continues to be detected and it is determined that the electronic device does not enter the power saving mode.
2. The method according to claim 1, characterized in that The power saving trigger state includes the user no operation state, and the duration of the power saving trigger state detection includes: When a user operation event is detected, starting a first timer; The first timer is used to detect the duration of the user's inactivity state.
3. The method according to claim 1 or 2, characterized in that: The power saving trigger state includes the screen highlight state, and the screen highlight state is a state where the brightness value of the screen is greater than a brightness threshold; The duration of detecting the power saving trigger state includes: When the screen is in a highlighted state, starting a second timer; The duration of the screen highlight state is detected by the second timer.
4. The method according to any one of claims 1 to 3, characterized in that The power saving trigger state includes the no-attention state, where the no-attention state refers to a state where the user's sight is away from the screen; The duration of detecting the power saving trigger state includes: When the no-gaze state is detected, starting a third timer; The duration of the no-attention state is detected by the third timer.
5. The method according to any one of claims 1 to 4, characterized in that The power saving trigger state includes a sleep state, and the duration of the power saving trigger state is detected, including: When the sleep state is detected and the screen is in a light-on state, starting a fourth timer; The duration of the sleep state is detected by the fourth timer.
6. The method according to any one of claims 1 to 5, characterized in that When the duration is greater than a time threshold, the method further includes: A countdown interface of preset transparency is displayed on the screen of the electronic device, wherein the countdown interface includes a first option and a second option, wherein the first option indicates agreement to start a power saving mode of the electronic device, and the second option is used to indicate disagreement to start a power saving mode of the electronic device.
7. The method according to claim 6, characterized in that When the duration is greater than a time threshold, starting the electronic device to enter the power saving mode includes: When the duration is greater than a time threshold and it is detected that a user selects a first option on the countdown interface, the electronic device is started to enter the power saving mode.
8. The method according to claim 6, characterized in that When the duration is greater than a time threshold, starting the electronic device to enter the power saving mode includes: When the duration is greater than the time threshold and when the countdown on the countdown interface ends, it is not detected that the user selects the first option or the second option on the countdown interface, the electronic device is started to enter the power saving mode.
9. The method according to any one of claims 1 to 8, characterized in that When starting the electronic device to enter the power saving mode, the method further includes: Detecting whether the current application is an authorized application, wherein the authorized application refers to an application that has obtained power saving management authorization; When the current application is the authorized application, performing power saving management on the current application; When the current application is not the authorized application, it is determined not to perform power saving management on the current application.
10. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the electronic device executes the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 9.
12. A computer program product, characterized in that The computer program product is configured to enable the electronic device to perform the method according to any one of claims 1 to 9 when the computer program product is run on the electronic device.
13. A chip system, characterized in that: The chip system includes a memory and a processor, and the processor is configured to execute a computer program stored in the memory to implement the method according to any one of claims 1 to 9.
