CN111290565A - Doze mode control method, device, terminal and storage medium - Google Patents

Doze mode control method, device, terminal and storage medium Download PDF

Info

Publication number
CN111290565A
CN111290565A CN202010031757.2A CN202010031757A CN111290565A CN 111290565 A CN111290565 A CN 111290565A CN 202010031757 A CN202010031757 A CN 202010031757A CN 111290565 A CN111290565 A CN 111290565A
Authority
CN
China
Prior art keywords
doze mode
terminal
current
preset
doze
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010031757.2A
Other languages
Chinese (zh)
Inventor
高龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010031757.2A priority Critical patent/CN111290565A/en
Publication of CN111290565A publication Critical patent/CN111290565A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Abstract

The embodiment of the application discloses a method, a device, a terminal and a storage medium for controlling a Doze mode, and belongs to the technical field of terminals. The method comprises the following steps: acquiring current scene information of a current use scene; in response to the current scene information indicating that the current usage scene supports the Doze mode, turning on the Doze mode, the Doze mode being in a turned-off state by default; and entering the Doze mode in response to the terminal state meeting a mode entering condition. By adopting the method provided by the embodiment of the application, whether the current use scene supports the Doze mode or not is judged by acquiring the current scene information, the Doze mode is controlled to be started only when the current use scene supports the Doze mode, and the Doze mode is entered when the terminal state meets the mode entering condition, so that the power consumption of the terminal is reduced, and the blockage caused by the fact that the terminal enters the Doze mode under certain use scenes which have higher performance requirements but the user does not operate the terminal is avoided.

Description

Doze mode control method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a method and a device for controlling a Doze mode, a terminal and a storage medium.
Background
In the process of using the terminal, after interacting with the foreground running application, the user may temporarily stop using the terminal, but the currently running foreground application is not closed, and if the terminal always maintains the system performance when the foreground application runs, a large amount of power consumption is caused.
In the related art, a terminal is generally provided with a Doze (Doze) mode, and when the terminal does not detect a user operation for a continuous period of time, the frequency of a Central Processing Unit (CPU) is lowered, network access is suspended, and the like, thereby reducing power consumption of the terminal.
However, by using the method for reducing power consumption in the related art, the terminal directly enters the Doze mode when the terminal does not detect the user operation within the predetermined time, which may cause some foreground applications with higher requirements on system performance during running to be stuck.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal and a storage medium for controlling a Doze mode.
The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for controlling a Doze mode, where the method includes:
acquiring current scene information of a current use scene;
in response to the current scene information indicating that the current usage scene supports the Doze mode, turning on the Doze mode, the Doze mode being in an off state by default;
and entering the Doze mode in response to the terminal state meeting a mode entering condition.
In another aspect, an embodiment of the present application provides a Doze mode control apparatus, including:
the first acquisition module is used for acquiring current scene information of a current use scene;
a first starting module, configured to start the Doze mode in response to the current scene information indicating that the current usage scene supports the Doze mode, where the Doze mode is in a closed state by default;
and the mode entering module is used for responding to the condition that the terminal state meets the mode entering condition and entering the Doze mode.
In another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory; the memory stores at least one instruction for execution by the processor to implement the Doze mode control method of the above aspect.
In another aspect, the present application provides a computer-readable storage medium, where at least one instruction is stored, and the at least one instruction is used for being executed by a processor to implement the Doze mode control method according to the above aspect.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the embodiment of the application, the Doze mode of the terminal is in a closed state by default, the current scene information of the current use scene is acquired, whether the current use scene supports the Doze mode is judged, the Doze mode is controlled to be started only when the current use scene supports the Doze mode, and the Doze mode is entered when the terminal state meets the mode entering condition, so that the power consumption of the terminal is reduced, and the blockage caused by the fact that the terminal enters the Doze mode under certain use scenes which have higher performance requirements but do not operate the terminal by users is avoided.
Drawings
FIG. 1 is a flow chart of a method of controlling the Doze mode provided by an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method of controlling the Doze mode provided by another exemplary embodiment of the present application;
fig. 3 is a schematic diagram of preset scene information provided in an exemplary embodiment of the present application;
fig. 4 is a schematic diagram of preset scene information provided in another exemplary embodiment of the present application;
FIG. 5 is a flow chart of a method of controlling the Doze mode provided by another exemplary embodiment of the present application;
fig. 6 is a block diagram of a Doze mode control apparatus according to an exemplary embodiment of the present application;
fig. 7 is a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
For the sake of easy understanding, the terms referred to in the embodiments of the present application will be briefly described below.
Doze mode: in a doze mode of an Android system, a terminal enters a low power consumption state in the doze mode, wherein the low power consumption state comprises the steps of reducing CPU frequency, suspending network access, stopping Wireless Fidelity (Wi-Fi) scanning and the like, so that the purpose of reducing the power consumption of the terminal is achieved.
In the related art, a Doze mode is turned on by default by a terminal, when the terminal does not detect user operation within a preset time period, the operating frequency of a CPU is set to a low frequency, activities such as network access and Wi-Fi scanning are suspended, and when the terminal detects interactive operation and charging behavior or a state change is detected by a sensor or a Global Positioning System (GPS), the CPU frequency and the network activities of the terminal are restored to an active state.
However, in the related art, the Doze mode is turned on by default, and the user does not perform an operation within a certain period of time, that is, enters a low frequency state, however, in some usage scenarios, although the user does not perform an operation for a long time, the terminal does not have a reduced demand for system performance, such as camera recording, video call, receiving video barrage, and the like, and at this time, if the Doze mode is entered, the application may be stuck.
In order to solve the problems in the related art, embodiments of the present application provide a method for controlling a Doze mode. The method for controlling the Doze mode provided by each embodiment of the application is used for a terminal provided with the Doze mode, and the terminal can be a smart phone, a tablet computer, an e-book reader, a personal portable computer and the like. According to the Doze mode control method provided by the embodiment of the application, the terminal can automatically control the Doze mode to be turned on and turned off according to the current use scene, so that the power consumption of the terminal is reduced, and the blockage of the scene with high system performance requirements is avoided.
Referring to fig. 1, a flowchart of a method for controlling the Doze mode according to an embodiment of the present application is shown. In this embodiment, a method for controlling a Doze mode is described as an example, where the method includes:
step 101, obtaining current scene information of a current usage scene.
The current use scene comprises at least one of an application scene of the current running application of the terminal and a real environment where the terminal is located, and the terminal acquires current scene information of the current use scene so as to judge whether the Doze mode needs to be started or not.
Optionally, the terminal acquires the current scene information when detecting that the usage scene changes, or acquires the current scene information at predetermined time intervals.
And 102, in response to the current scene information indicating that the current usage scene supports the Doze mode, starting the Doze mode, and setting the Doze mode in a closed state by default.
If the terminal is always in the Doze mode and enters the Doze mode to reduce the power consumption of the terminal when a certain condition is met, and the user may still need to use the terminal at the moment, that is, the requirement of the terminal on the system performance is not reduced, the terminal cannot update data in time, so that the corresponding application is blocked, and the user needs to execute corresponding operation to enable the terminal to exit the Doze mode and restore the normal active state.
In order to avoid that the terminal starts the Doze mode in the default state, and the terminal automatically enters the low power consumption state of the Doze mode in the using process of the user, in a possible implementation manner, the terminal is provided with a starting condition of the Doze mode, and the starting condition is that the current using scene of the terminal belongs to the using scene supporting the Doze mode. The Doze mode of the terminal is in a closed state by default, and when the current scene information acquired at a certain moment indicates that the current usage scene supports the Doze mode, the terminal starts the Doze mode.
And 103, responding to the terminal state meeting the mode entering condition, and entering the Doze mode.
The terminal state refers to an operating state of the terminal, such as a charging and discharging state, a motion state, and lighting and extinguishing of a screen, the mode entering condition refers to a condition that the terminal enters the Doze mode, the terminal meets the mode entering condition, which indicates that the user does not need to use the terminal in a short time, and the power consumption of the terminal can be reduced without affecting the normal use of the user when entering the Doze mode.
In a possible implementation manner, the terminal is preset with a mode entering condition, the terminal does not directly reduce the running frequency of the CPU and stop the network activity from entering the low power consumption state after the terminal starts the Doze mode, but starts monitoring the terminal state in real time, and when the terminal state meets the mode entering condition, the terminal enters the Doze mode.
Optionally, the mode entering condition includes that the terminal does not detect the interactive operation within a predetermined time, the terminal screen is turned off, the charging behavior is not detected, the sensor and the GPS do not detect the data change, and the like.
To sum up, in this embodiment of the application, the Doze mode of the terminal is in a default closed state, and through obtaining the current scene information of the current usage scene, whether the current usage scene supports the Doze mode is judged, and the Doze mode is controlled to be opened only when the current usage scene supports the Doze mode, and enters the Doze mode when the terminal state satisfies the mode entering condition, so that while the power consumption of the terminal is reduced, the blockage caused by the terminal entering the Doze mode under some usage scenes that the performance requirement is high but the user does not operate the terminal is avoided.
Referring to fig. 2, a flowchart of a method for controlling the Doze mode according to another embodiment of the present application is shown. In this embodiment, a method for controlling a Doze mode is described as an example, where the method includes:
step 201, obtaining current scene information of a current usage scene.
The step 101 may be referred to in the implementation manner of the step 201, and this embodiment is not described herein again.
Step 202, obtaining a configuration file, wherein the configuration file comprises preset scene information of a preset use scene supporting the Doze mode.
The configuration file is a file for storing configuration parameters and initial settings of an application program in a terminal system, the configuration file contains a preset use scene supporting a Doze mode, and the preset use scene is a reference basis for judging whether the Doze mode is started or not and when the Doze mode is entered after the Doze mode is started.
In a possible implementation manner, developers uniformly set configuration files in a terminal system based on feedback results of power consumption tests, application scenario tests and the like of various application programs.
Optionally, the terminal sends data in the Doze mode to the server on the premise that the terminal is authorized by the user, for example, duration of the Doze mode corresponding to various usage scenarios, power consumption change of the terminal before and after entering the Doze mode, and the like. And the terminal receives the updated configuration file sent by the server and replaces the original configuration file.
And step 203, responding to the matching of the current scene information and the preset scene information, and starting the Doze mode.
If the current scene information is matched with the preset scene information in the configuration file, it is indicated that the current usage scene supports the Doze mode, and at this time, the terminal starts the Doze mode.
In one possible embodiment, step 203 comprises the steps of:
the current scene information comprises foreground application identification of a foreground application program, and preset application identification in a configuration file is obtained, wherein the preset application identification belongs to preset scene information of a preset use scene.
In a possible implementation manner, if the usage scenario is an application scenario corresponding to an application running in the foreground of the terminal, the current scenario information includes a foreground application identifier of the foreground application, where the foreground application identifier may be an application name, an application package name, and the like of the foreground application, and this is not limited in this application embodiment.
In actual use, an application program supporting the Doze mode exists, but for an application program which may not need user operation for a long time in the normal operation process, the Doze mode is not supported, and a preset application identifier corresponding to the application supporting the Doze mode is stored in the configuration file.
Illustratively, the applications supporting the Doze mode include a browser application, a shopping application, a payment application, a game application, and the like, and the applications supporting the Doze mode are characterized in that a corresponding command needs to be executed according to a user operation, that is, when the user does not operate the application for a period of time, it is predicted that the user may not need to use the application for a future period of time, and the application is an application running in the foreground, so that the user may not need to use the terminal.
The applications that do not support the Doze mode may include an instant messaging application, a live broadcast application, a camera application, or a short video social application, and the like, and the applications that do not support the Doze mode may be characterized in that there is no user operation for a long period of time, but some functions are still in an on state, and the performance requirement on the terminal system is not reduced. For example, a camera application program may be held in a hand or placed at a certain fixed position for a long time and does not perform other operations when a user uses the camera application program to record video, and if the user enters the Doze mode, the camera may be automatically turned off or the screen may be turned off, and the like, and the user needs to manually turn on the camera; for instant messaging application programs, if the terminal enters the Doze mode in the foreground operation process, the user may not receive the message in time; for an application program with a function of receiving real-time comments such as a popup, if the application program enters a Doze mode in the video playing process, the real-time comments cannot be loaded in time, and when the application program exits the Doze mode after user operation is received, the application program can be jammed in a short time.
And secondly, responding to the matching of the foreground application identification and the preset application identification, and starting the Doze mode.
And if the foreground application identifier in the current use scene belongs to the preset application identifier in the configuration file, the current use scene supports the Doze mode, and the terminal starts the Doze mode.
In a possible implementation manner, the usage scenario acquired by the terminal includes an application scenario running in the foreground and a real environment where the terminal is located, and after the first step to the second step, the step 203 further includes the third step to the fourth step:
and thirdly, the current scene information also comprises current time-space information, the current time-space information comprises at least one of current time and current geographic position, preset time-space information corresponding to the foreground application identification in the configuration file is acquired in response to the matching of the foreground application identification and the preset application identification, the preset time-space information belongs to preset scene information of a preset use scene, and the preset time-space information comprises at least one of a preset time period and a preset geographic position.
In practical application, the frequency of using each application program by a user changes along with time and geographic position, for example, night is usually rest time, the frequency of using a terminal is low, and the frequency of using in the day is high; in addition, some users may have a habit of listening to books before sleeping or falling asleep along with music, and the terminal may not perform any operation after starting a corresponding application program before sleeping, and may determine whether a previous usage scene supports the Doze mode according to the usage habit of the user.
In a possible implementation manner, the terminal acquires and periodically updates application data of the user, where the application data includes running time and running frequency of each application program, interactive operation frequency of the user, and the like, and uploads the application data to the server under the condition authorized by the user, and the developer updates a preset time period corresponding to each preset application identifier in the configuration file based on the application data. The terminal firstly determines that the foreground application identifier is matched with the preset application identifier, and then judges whether the current time belongs to the preset time period corresponding to the foreground application identifier and whether the current geographic position of the terminal belongs to the preset geographic position (such as a residential area).
Referring to fig. 3, a table of relationship between preset application identifiers and corresponding preset time periods is schematically shown, where the preset application identifiers are names of preset applications, the preset time periods for supporting the Doze mode are 01:00:00-06:00:00 for the preset application a, 22:00: 24:00 and 00:00:00-08:00 for the preset application B, and the preset time periods for supporting the Doze mode are 00:00-10:00 for the preset application C.
Optionally, a part of preset application identifiers may be stored in the configuration file, and the corresponding application always supports the Doze mode, so that the terminal does not need to obtain the time-space information.
And fourthly, responding to the matching of the current space-time information and the preset space-time information, and starting the Doze mode.
If the foreground application identifier in the current usage scene belongs to the preset application identifier in the configuration file, the current time belongs to the preset time period corresponding to the foreground application, and the current geographic position is matched with the preset geographic position, the current usage scene supports the Doze mode, and the terminal starts the Doze mode.
In the above embodiment, the description is given by taking an example that the current scene information includes a foreground running application and current spatio-temporal information, and the conditions that the terminal starts the Doze mode are that the foreground application identifier matches the preset application identifier and the current spatio-temporal information matches the preset spatio-temporal information. Optionally, whether the Doze mode is turned on by the terminal may be determined only by whether the foreground application identifier is matched with the preset application identifier, or only by whether the current temporal-spatial information is matched with the preset temporal-spatial information.
Illustratively, the terminal acquires the use habit of the user, sets a fixed time period (e.g., sleep time) in which the frequency of using the terminal by the user is low as a Doze mode time period, and when the terminal detects that the current time belongs to the Doze mode time period, the Doze mode is started without determining whether the foreground running application belongs to the preset application.
Optionally, the configuration file stores a minimum power standard, the current scene information includes a current remaining power, and when the terminal detects that the current remaining power is smaller than the minimum power standard, the Doze mode is turned on.
And 204, acquiring the target timer duration corresponding to the current scene information in the configuration file.
In a possible implementation manner, after the terminal starts the Doze mode, it needs to determine whether to enter the Doze mode according to whether the terminal state satisfies the mode entry condition, and the preference and the usage habit of the user using each application program are different, so that the mode entry conditions corresponding to each application program may be different.
Optionally, timer durations corresponding to the preset applications are stored in the configuration file, and the terminal obtains corresponding target timer durations according to foreground running applications in the current usage scene.
Fig. 4 is a schematic diagram showing a preset time period and a timer duration corresponding to each preset application identifier in a configuration file, where the timer duration corresponding to a preset application a is 5 minutes, the timer duration corresponding to a preset application B is 4 minutes, and the timer duration corresponding to a preset application C is 1 minute, where a frequency of using an application a by a user is high, and thus the timer duration is long, and a frequency of using the application C by the user is low, and thus the timer duration is short.
Step 205, responding to the terminal being in the screen-off and uncharged state, starting a Doze monitoring timer according to the duration of the target timer, wherein the Doze monitoring timer is used for monitoring the duration of the terminal being in the screen-off and uncharged state.
In one possible embodiment, the mode entry condition includes that the terminal is always in the off-screen and uncharged state for the target timer duration, since the Doze mode needs to be entered in case the user may not use the terminal for a period of time in the future, thereby reducing power consumption without affecting the user's use. And after the terminal starts the Doze mode, monitoring the state of the terminal in real time, and starting the Doze monitoring timer according to the duration of the target timer when the terminal is off the screen and is not charged.
And step 206, responding to the Doze monitoring timer reaching the target timer duration, and acquiring a terminal state, wherein the terminal state comprises at least one of a motion state, a sensor state and a positioning state.
Optionally, the mode entering condition further includes that at least one of the motion state, the sensor state and the positioning state of the terminal is not changed within the target timer duration. When the motion state changes, the terminal may be changed from the holding state to the holding state for the user, that is, the user may need to use the terminal; when the state of the sensor changes, the possibility that the user uses the terminal also exists, for example, when the temperature of the temperature sensor is changed from low to high, the user can pick up the terminal; when the positioning state changes, the terminal may be in the process of moving, and the user may need to use an application program of the terminal, or need to perform Wi-Fi scanning, etc.
In a possible implementation manner, when the terminal detects that the terminal is in a screen-off and uncharged state, the Doze monitoring timer is started, and when the Doze monitoring timer detects that at least one of the screen is bright, the screen is charged, or at least one of the motion state, the sensor state and the positioning state changes before the Doze monitoring timer reaches the duration of the target timer, the Doze monitoring timer restarts timing.
Step 207, obtaining the target configuration parameters corresponding to the current usage scenario from the configuration file.
And when the terminal state meets the mode entering condition, entering a Doze mode, and at the moment, reconfiguring all parameters in the terminal to reduce the power consumption of the terminal. Different usage scenarios have different requirements on system performance, and therefore the configuration parameters may be different.
In a possible implementation manner, the configuration file stores configuration parameters of each usage scenario, and when the terminal enters the Doze mode, the terminal acquires a target configuration parameter corresponding to a current usage scenario from the configuration file.
And step 208, setting the working frequency of the CPU to be a first working frequency according to the target configuration parameters, wherein the first working frequency is less than a second working frequency of the CPU when the Doze mode is closed.
In a possible implementation manner, the target configuration parameter includes a first operating frequency of the CPU, where the first operating frequency is an operating frequency after the terminal enters the Doze mode and is smaller than a second operating frequency of the CPU when the Doze mode is turned off (i.e., the CPU is limited in frequency), and the first operating frequency corresponding to different usage scenarios may be different.
Illustratively, when the Doze mode is closed, the second working frequency of the CPU is 1500MHz, if the Doze mode is supported by the current usage scenario, the application program a is run in the foreground, the current time is 10:00:00, and the current geographical location is company, then after the terminal enters the Doze mode, the first working frequency of the CPU is 1000 MHz; if the current usage scene supports the Doze mode, the foreground runs the application program B, the current time is 23:00:00, and the current geographic position is the residential area, the first working frequency of the CPU is 500MHz after the terminal enters the Doze mode.
Optionally, when the terminal opens the Doze mode but does not enter the Doze mode, the CPU operating frequency is the second operating frequency.
Optionally, after the terminal enters the Doze mode, the terminal is not always in the low frequency state, and at preset time intervals, the CPU briefly (for example, 5 seconds) restores the operating frequency to the second operating frequency, and performs activities such as network access and Wi-Fi scanning, so that the terminal data is updated in time, thereby preventing the user from having serious jamming or data delay in the next use.
In one possible implementation, the Doze mode is restored to the off state in response to a change in the usage scenario. The terminal defaults to close the Doze mode, and opens the Doze mode only when the current use scene supports the Doze mode, so that the use scene changes, for example, a user switches or closes foreground running application, the current time does not belong to a preset time period or the current geographic position does not belong to a preset geographic position, and the like, the terminal automatically closes the Doze mode, and judges whether to open the Doze mode again according to the scene information of the current use scene.
In the embodiment of the application, the configuration file stores preset scene information supporting a Doze mode, timer durations, configuration parameters and the like corresponding to various preset scene information, the terminal acquires the configuration file and detects whether a current use scene is matched with the preset use scene, so as to judge whether the Doze mode is started, and after the Doze mode is started, the access time of the Doze mode and the CPU working frequency after the Doze mode is entered are further controlled according to the target timer duration and the configuration parameters of the current use scene; the terminal sets certain conditions for opening and entering the Doze mode, conditions and parameters can be adjusted according to the use habits of the user, the power consumption of the terminal can be reduced on the premise that the normal use of the user is not influenced, and the cruising ability of the terminal is improved.
In connection with the above embodiments, in an illustrative example, the flow of the terminal Doze mode is shown in fig. 5.
Step 501, scene information of a current usage scene is acquired.
Step 502, determine whether to turn on the Doze mode. If the current usage scenario does not support the Doze mode, step 503 is executed, and if the current usage scenario supports the Doze mode, the Doze mode is started, and step 504 is executed.
In step 503, the operating state is unchanged.
And step 504, starting a Doze monitoring timer according to the duration of the target timer.
And step 505, judging whether to enter the Doze mode. If the terminal status satisfies the mode entry condition, go to step 506, otherwise go to step 503.
Step 506, invoke the configuration parameters. The operating frequency of the CPU is set to a first operating frequency.
Referring to fig. 6, a block diagram of a Doze mode control apparatus according to an exemplary embodiment of the present application is shown. The apparatus may be implemented as all or a portion of the terminal in software, hardware, or a combination of both. The device includes:
a first obtaining module 601, configured to obtain current scene information of a current usage scene;
a first starting module 602, configured to, in response to the current scene information indicating that the current usage scene supports the Doze mode, start the Doze mode, where the Doze mode is in an off state by default;
a mode entering module 603, configured to enter the Doze mode in response to a terminal state satisfying a mode entering condition.
Optionally, the first starting module 602 includes:
a first obtaining unit, configured to obtain a configuration file, where the configuration file includes preset scene information of a preset usage scene supporting the Doze mode;
and the starting unit is used for responding to the matching of the current scene information and the preset scene information and starting the Doze mode.
Optionally, the current context information includes a foreground application identifier of a foreground application;
the starting unit is further configured to:
acquiring a preset application identifier in the configuration file, wherein the preset application identifier belongs to the preset scene information of the preset use scene;
and responding to the matching of the foreground application identifier and the preset application identifier, and starting the Doze mode.
Optionally, the current context information further includes current spatiotemporal information, the current spatiotemporal information including at least one of a current time and a current geographic location;
the starting unit is further configured to:
responding to the matching of the foreground application identifier and the preset application identifier, and acquiring preset time-space information corresponding to the foreground application identifier in the configuration file, wherein the preset time-space information belongs to the preset scene information of the preset usage scene, and the preset time-space information comprises at least one of a preset time period and a preset geographic position;
in response to the current spatiotemporal information matching the preset spatiotemporal information, turning on the Doze mode.
Optionally, the configuration file further includes a timer duration corresponding to a preset usage scenario;
the device further comprises:
a second obtaining module, configured to obtain a target timer duration corresponding to the current scene information in the configuration file;
the second starting module is used for responding to the situation that the terminal is in the screen-off and uncharged state, starting a Doze monitoring timer according to the duration of the target timer, wherein the Doze monitoring timer is used for monitoring the duration of the terminal in the screen-off and uncharged state;
and the third obtaining module is used for responding to the time length of the Doze monitoring timer reaching the target timer, and obtaining the terminal state, wherein the terminal state comprises at least one of a motion state, a sensor state and a positioning state.
Optionally, the mode entering module 603 includes:
a second obtaining unit, configured to obtain, from the configuration file, a target configuration parameter corresponding to the current usage scenario;
and the setting unit is used for setting the working frequency of a Central Processing Unit (CPU) to be a first working frequency according to the target configuration parameters, wherein the first working frequency is less than a second working frequency of the CPU when the Doze mode is closed.
Optionally, the apparatus further comprises:
and the mode recovery module is used for responding to the change of the use scene and recovering the Doze mode to be in a closed state.
Referring to fig. 7, a block diagram of a terminal 700 according to an exemplary embodiment of the present application is shown. The terminal 700 may be an electronic device installed and running an application, such as a smart phone, a tablet computer, an electronic book, a portable personal computer, or the like. The terminal 700 in the present application may include one or more of the following components: a processor 710, a memory 720, and a screen 730.
Processor 710 may include one or more processing cores. The processor 710 connects various parts within the overall terminal 700 using various interfaces and lines, performs various functions of the terminal 700 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 720 and calling data stored in the memory 720. Alternatively, the processor 710 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 710 may integrate one or a combination of a CPU, a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is responsible for rendering and drawing the content to be displayed by the screen 730; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 710, but may be implemented by a communication chip.
The Memory 720 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable medium. The memory 720 may be used to store instructions, programs, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above method embodiments, and the like, and the operating system may be an Android system (including a system based on Android system depth development), an IOS system developed by apple, including a system based on IOS system depth development), or other systems. The storage data area may also store data created by the terminal 700 during use (e.g., phone book, audio-video data, chat log data), etc.
The screen 730 may be a capacitive touch display screen for receiving a touch operation of a user on or near the screen using a finger, a stylus, or any other suitable object, and displaying a user interface of various applications. The touch display screen is generally provided at a front panel of the terminal 700. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configuration of terminal 700 depicted in the above-described figures is not meant to be limiting with respect to terminal 700, and that terminal may include more or less components than those shown, or some components may be combined, or a different arrangement of components. For example, the terminal 700 further includes a radio frequency circuit, a camera module, a sensor, an audio circuit, a Wi-Fi module, a power supply, a bluetooth module, and other components, which are not described herein again.
The present application further provides a computer-readable storage medium, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement the Doze mode control method according to the above embodiments.
The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the Doze mode control method according to the above embodiments.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of controlling a Doze mode, the method comprising:
acquiring current scene information of a current use scene;
in response to the current scene information indicating that the current usage scene supports the Doze mode, turning on the Doze mode, the Doze mode being in an off state by default;
and entering the Doze mode in response to the terminal state meeting a mode entering condition.
2. The method according to claim 1, wherein said turning on the Doze mode in response to the current scene information indicating that the current usage scene supports the Doze mode comprises:
acquiring a configuration file, wherein the configuration file comprises preset scene information of a preset use scene supporting the Doze mode;
and responding to the matching of the current scene information and the preset scene information, and starting the Doze mode.
3. The method of claim 2, wherein the current context information comprises a foreground application identification of a foreground application;
the responding to the matching of the current scene information and the preset scene information, starting the Doze mode, including:
acquiring a preset application identifier in the configuration file, wherein the preset application identifier belongs to the preset scene information of the preset use scene;
and responding to the matching of the foreground application identifier and the preset application identifier, and starting the Doze mode.
4. The method of claim 3, wherein the current context information further comprises current spatiotemporal information, the current spatiotemporal information comprising at least one of a current time and a current geographic location;
the responding to the match between the foreground application identifier and the preset application identifier, starting the Doze mode, including:
responding to the matching of the foreground application identifier and the preset application identifier, and acquiring preset time-space information corresponding to the foreground application identifier in the configuration file, wherein the preset time-space information belongs to the preset scene information of the preset usage scene, and the preset time-space information comprises at least one of a preset time period and a preset geographic position;
in response to the current spatiotemporal information matching the preset spatiotemporal information, turning on the Doze mode.
5. The method according to any one of claims 2 to 4, wherein the configuration file further includes a timer duration corresponding to a preset usage scenario;
after the turning on the Doze mode, the method further comprises:
acquiring the target timer duration corresponding to the current scene information in the configuration file;
responding to the situation that the terminal is in the screen-off and uncharged state, starting a Doze monitoring timer according to the duration of the target timer, wherein the Doze monitoring timer is used for monitoring the duration of the terminal in the screen-off and uncharged state;
and responding to the Doze monitoring timer reaching the target timer duration, and acquiring the terminal state, wherein the terminal state comprises at least one of a motion state, a sensor state and a positioning state.
6. The method according to any one of claims 2 to 4, wherein said entering the Doze mode in response to the terminal status satisfying a mode entry condition comprises:
acquiring target configuration parameters corresponding to the current use scene from the configuration file;
and setting the working frequency of a Central Processing Unit (CPU) as a first working frequency according to the target configuration parameters, wherein the first working frequency is less than a second working frequency of the CPU when the Doze mode is closed.
7. The method of any of claims 1 to 4, further comprising:
and restoring the Doze mode to the off state in response to the usage scene changing.
8. A Doze mode control apparatus, comprising:
the first acquisition module is used for acquiring current scene information of a current use scene;
a first starting module, configured to start the Doze mode in response to the current scene information indicating that the current usage scene supports the Doze mode, where the Doze mode is in a closed state by default;
and the mode entering module is used for responding to the condition that the terminal state meets the mode entering condition and entering the Doze mode.
9. A terminal, characterized in that it comprises a processor and a memory, in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the Doze mode control method according to any one of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement a Doze mode control method as claimed in any one of claims 1 to 7.
CN202010031757.2A 2020-01-13 2020-01-13 Doze mode control method, device, terminal and storage medium Pending CN111290565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010031757.2A CN111290565A (en) 2020-01-13 2020-01-13 Doze mode control method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010031757.2A CN111290565A (en) 2020-01-13 2020-01-13 Doze mode control method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN111290565A true CN111290565A (en) 2020-06-16

Family

ID=71028349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010031757.2A Pending CN111290565A (en) 2020-01-13 2020-01-13 Doze mode control method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111290565A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817426A (en) * 2021-01-22 2021-05-18 Oppo(重庆)智能科技有限公司 Terminal control method in doze mode, terminal and storage medium
CN116382786A (en) * 2023-06-07 2023-07-04 荣耀终端有限公司 Method for entering long standby mode, electronic device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105549718A (en) * 2015-12-09 2016-05-04 北京金山安全软件有限公司 Method and device for optimizing power consumption of application program and electronic equipment
CN107145214A (en) * 2017-04-28 2017-09-08 努比亚技术有限公司 The method and mobile terminal of application program power consumption management
CN107831885A (en) * 2017-10-27 2018-03-23 深圳市万普拉斯科技有限公司 Doze mode switching methods, device, mobile terminal and readable storage medium storing program for executing
US20180146428A1 (en) * 2008-02-01 2018-05-24 Maarten Menzo Wentink Scheduled peer power save mode
CN108509017A (en) * 2018-03-22 2018-09-07 上海爱优威软件开发有限公司 A kind of control method and system of terminal applies
CN108647048A (en) * 2018-05-17 2018-10-12 Oppo(重庆)智能科技有限公司 Doze mode regulating methods, device, mobile terminal and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180146428A1 (en) * 2008-02-01 2018-05-24 Maarten Menzo Wentink Scheduled peer power save mode
CN105549718A (en) * 2015-12-09 2016-05-04 北京金山安全软件有限公司 Method and device for optimizing power consumption of application program and electronic equipment
CN107145214A (en) * 2017-04-28 2017-09-08 努比亚技术有限公司 The method and mobile terminal of application program power consumption management
CN107831885A (en) * 2017-10-27 2018-03-23 深圳市万普拉斯科技有限公司 Doze mode switching methods, device, mobile terminal and readable storage medium storing program for executing
CN108509017A (en) * 2018-03-22 2018-09-07 上海爱优威软件开发有限公司 A kind of control method and system of terminal applies
CN108647048A (en) * 2018-05-17 2018-10-12 Oppo(重庆)智能科技有限公司 Doze mode regulating methods, device, mobile terminal and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817426A (en) * 2021-01-22 2021-05-18 Oppo(重庆)智能科技有限公司 Terminal control method in doze mode, terminal and storage medium
CN116382786A (en) * 2023-06-07 2023-07-04 荣耀终端有限公司 Method for entering long standby mode, electronic device and readable storage medium
CN116382786B (en) * 2023-06-07 2023-09-01 荣耀终端有限公司 Method for entering long standby mode, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN108363593B (en) Application program preloading method and device, storage medium and terminal
KR101641174B1 (en) Method for enabling shutdown alarm clock and mobile terminal, and program, and recording medium for enabling shutdown alarm clock
US9058128B1 (en) Power management for electronic devices
CN108062190B (en) Application running state control method and mobile terminal
CN107809542B (en) Application program control method and device, storage medium and electronic equipment
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
CN106507445B (en) Wireless fidelity Wi-Fi scanning method and mobile terminal
CN113055530B (en) Mode switching method and device
WO2019024642A1 (en) Process control method and apparatus, storage medium, and electronic device
CN107851050B (en) Device with watchdog timer and method for operating watchdog timer
US20200174823A1 (en) State management method and apparatus for virtual machine, and smart terminal thereof
EP3133466B1 (en) Method and device for reminding in shutdown state
CN110554762A (en) Method and terminal for controlling application program
CN107479953B (en) Process management method, device, storage medium and electronic equipment
CN107844341B (en) Process starting control method and device, storage medium and mobile terminal
CN107943269B (en) Scheduling job control method, device, terminal equipment and storage medium
US11507244B2 (en) Window adjustment method, window adjustment device and mobile terminal
CN111290565A (en) Doze mode control method, device, terminal and storage medium
CN108229920B (en) Affair reminding method and mobile terminal
CN111163504A (en) Power-saving processing method, mobile terminal and computer storage medium
CN107479700B (en) Black screen gesture control method and device, storage medium and mobile terminal
CN111050388A (en) Doze mode control method, device, mobile terminal and storage medium
CN107343100B (en) Information prompting method and device, storage medium and electronic equipment
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN107943268B (en) Scheduling job control method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200616

RJ01 Rejection of invention patent application after publication