WO2020224658A1 - 待机优化方法、装置、计算机设备和存储介质 - Google Patents

待机优化方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020224658A1
WO2020224658A1 PCT/CN2020/089352 CN2020089352W WO2020224658A1 WO 2020224658 A1 WO2020224658 A1 WO 2020224658A1 CN 2020089352 W CN2020089352 W CN 2020089352W WO 2020224658 A1 WO2020224658 A1 WO 2020224658A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
screen
time
preset
data
Prior art date
Application number
PCT/CN2020/089352
Other languages
English (en)
French (fr)
Inventor
范揚杰
Original Assignee
深圳市万普拉斯科技有限公司
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 深圳市万普拉斯科技有限公司 filed Critical 深圳市万普拉斯科技有限公司
Publication of WO2020224658A1 publication Critical patent/WO2020224658A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0254Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity detecting a user operation or a tactile contact or a motion of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0258Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • This application relates to the field of communication technology, and in particular to a standby optimization method, device, computer equipment and storage medium.
  • intelligent terminals such as mobile phones
  • the more unexpected troubles for example, when the user is in sleep time, because the mobile phone is in the idle state at this time, if the APP in the mobile phone is running, it will consume power and disturb the user's sleep.
  • the power-saving mode mentioned above has too many functions, and although the low-power-consumption mode limit is loose, it cannot meet the requirements of power saving and non-disturbance. Therefore, how to achieve the requirements of power saving and non-disturbance without restricting individual applications of users Demand has become an urgent problem to be solved.
  • an embodiment of the present application provides a standby optimization method, and the method includes:
  • the preset power-saving conditions include the current time Whether it is in the sleep time of the terminal device;
  • the best power saving mode is turned on; the best power saving mode is used to instruct the terminal device to stop running the preset application.
  • the preset power saving condition further includes:
  • the terminal device is in a low power consumption mode, and the terminal device is not running a playback application.
  • the method before the determining whether the terminal device meets a preset power saving condition, the method includes:
  • the sleep time includes the start time and duration of the terminal device entering the sleep state.
  • the acquiring historical dormancy data of the terminal device includes:
  • the method before the recording the data between the off-screen time and the corresponding on-screen time that meets the preset interval condition as historical sleep data, the method further includes:
  • the determining the sleep time of the terminal device according to the historical sleep data includes:
  • a preset algorithm is used to calculate the sleep time of the terminal device.
  • the method further includes:
  • an embodiment of the present application provides a standby optimization device, the device including:
  • the detection module is configured to detect the screen status of the terminal device
  • the judging module is configured to judge whether the terminal device meets the preset power-saving conditions when the screen state is the screen-off state and the duration of the screen-off exceeds a preset time; the preset power-saving conditions include the current Whether the time is in the sleep time of the terminal device;
  • the power-on module is configured to enable the best power-saving mode if the terminal device meets a preset power-saving condition; the best power-saving mode is used to instruct the terminal device to stop running a preset application.
  • an embodiment of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any method in the above-mentioned embodiment of the first aspect when the computer program is executed .
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any method in the above-mentioned embodiment of the first aspect.
  • the standby optimization method, device, computer equipment, and storage medium provided by this application detect the screen state through the terminal device, and start to judge the current state of the terminal device when the screen state is the off-screen state and the duration of the off-screen state exceeds the preset duration Whether the preset power-saving condition is met, when it is determined that the preset power-saving condition is satisfied, the optimal power-saving mode is turned on, where the preset power-saving condition includes whether it is in the sleep time of the terminal device at the current moment.
  • the terminal device turns on the best power saving mode, it is automatically judged and turned on according to preset conditions.
  • the judgment conditions for turning on the best power saving mode can be set by yourself.
  • Mode-restricted applications can also be restricted according to user needs. In this way, the user's sleep time not only meets the power saving and non-disturbance requirements, but does not limit the user's individual application requirements, thereby greatly improving the user experience.
  • FIG. 1 is an application environment diagram of a standby optimization method in an embodiment
  • FIG. 2 is a schematic flowchart of a standby optimization method provided by an embodiment
  • FIG. 3 is a schematic flowchart of a standby optimization method provided by an embodiment
  • FIG. 4 is a schematic flowchart of a standby optimization method provided by an embodiment
  • FIG. 5 is a schematic flowchart of a standby optimization method provided by an embodiment
  • Figure 5.1 is a flow chart of providing historical dormancy data recording according to an embodiment
  • FIG. 6 is a schematic flowchart of a standby optimization method provided by an embodiment
  • Figure 6.1 is a schematic diagram of the coordinate format of off-screen data provided by an embodiment
  • Figure 6.2 is a schematic diagram of normalized screen-off data provided by an embodiment
  • Figure 6.3 is a schematic diagram of determining the largest data group provided by an embodiment
  • Figure 6.4 is a schematic diagram of determining the sleep time provided by an embodiment
  • FIG. 7 is a structural block diagram of a standby optimization device provided by an embodiment
  • FIG. 8 is a structural block diagram of a standby optimization device provided by an embodiment
  • FIG. 9 is a structural block diagram of a standby optimization device provided by an embodiment
  • Fig. 10 is a structural block diagram of a standby optimization device provided by an embodiment.
  • the standby optimization method provided by the present application can be applied to the application environment as shown in FIG. 1.
  • the terminal device may be a server, and the terminal device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the terminal device is used to provide calculation and control capabilities.
  • the memory of the terminal device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the terminal device is used to store the data of the standby optimization method.
  • the network interface of the terminal device is used to communicate with other external devices through a network connection.
  • the computer program is executed by the processor to realize a standby optimization method.
  • the embodiments of the present application provide a standby optimization method, device, computer equipment, and storage medium, aiming to solve the technical problem of how to achieve power saving and non-disturbance requirements without limiting the user's individual application requirements.
  • the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through the embodiments and the accompanying drawings.
  • the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
  • the execution subject of the standby optimization method provided by this application is a terminal device, wherein the execution subject may also be a computer device, or a standby optimization device, wherein the device can be implemented through software, hardware, or software and hardware.
  • the way of combining is realized as part or all of the data analysis terminal.
  • FIG. 2 provides a standby optimization method. This embodiment relates to the preset duration that the terminal device reaches when the screen is off, and it is determined that its current state meets the preset power saving conditions. , Turn on the best power-saving mode to meet the needs of power saving and non-disturbance without restricting the specific process of users using individual applications. As shown in Figure 2, the method includes:
  • the screen state of the terminal device can be either the on-screen state or the off-screen state.
  • the way the terminal device detects its screen state can be determined by detecting the parameters of the screen, for example, detecting the parameter of the screen brightness. If the screen brightness is 0, then The screen state is the off-screen state. If the screen brightness is above 0, the screen state is the on-screen state. For example, the terminal device detects the parameters of the screen brightness and determines that the screen state is the off-screen state when the screen brightness is 0.
  • S102 When the screen state is an off-screen state, and the duration of the off-screen state exceeds a preset time period, determine whether the terminal device meets a preset power-saving condition; the preset power-saving condition includes Whether the current moment is in the sleep time of the terminal device.
  • the terminal device detects how long the screen is in the off-screen state, and the way to detect the off-screen time of the screen can be to calculate the screen The length of the interval from the moment the screen starts to go off to the current moment.
  • the terminal device starts to judge whether the current state meets the preset power-saving conditions, where the preset power-saving conditions include the current time Whether it is in the sleep time of the terminal device.
  • the preset duration is a duration set by the user according to the actual situation, for example, 75 minutes, which is used to indicate whether the terminal device starts to determine whether the current state meets the preset power saving condition.
  • the preset power-saving condition is also a condition formulated by the user according to actual needs.
  • the power-saving condition can be to determine whether the current terminal state is in a sleep time, or to determine whether the current power of the terminal device is insufficient, etc. This embodiment does not specifically limit the specific content of the power saving condition.
  • the sleep time represents the state time of the terminal device when the user is sleeping.
  • the sleep time can be a fixed time period per day set by the user, or a fixed time period per day that the terminal device infers from the user’s historical sleep time.
  • the embodiment does not limit the specific way of determining the sleep time. For example, taking the preset duration of 75 minutes and the preset power-saving condition as entering sleep time as an example, the terminal device judges after the screen state of the terminal device is in the off-screen state for 75 minutes (the preset duration) The current state enters the sleep time, and if it is, it is determined that the current state of the terminal device meets the preset power saving condition.
  • the terminal device When the current state of the terminal device determined in the above S102 satisfies the preset power saving condition, the terminal device starts to turn on the best power saving mode, where the best power saving mode is used to instruct the terminal device to stop running the preset application mode , Which means that when the terminal device turns on the best power-saving mode, it can be turned on by stopping the preset application.
  • the preset application can include network sharing, network usage, three-party application lock, and three-party application standard alarm , Notification light cycle and brightness, sensors, Bluetooth and Bluetooth scanning applications, in which network sharing or use restrictions, notification light cycle and brightness, sensors, Bluetooth and Bluetooth scanning applications can be restricted by the entire system.
  • the three-party application holding lock and the standard alarm for the three-party application may be only for the three-party application without limiting the system application, and the specific content of the preset application is not limited in this implementation. Specifically, after determining that the current state meets the preset power saving condition, the terminal device turns on the best power saving mode for the terminal device by restricting the preset application.
  • the standby optimization method provided by this embodiment detects the screen state through the terminal device.
  • the screen state is the off-screen state, and the duration of the off-screen state exceeds the preset duration, it starts to determine whether the current state of the terminal device meets the preset
  • the power-saving condition when it is determined that the preset power-saving condition is satisfied, the optimal power-saving mode is activated, wherein the preset power-saving condition includes whether it is in the sleep time of the terminal device at the current moment.
  • the terminal device turns on the best power saving mode, it is automatically judged and turned on according to preset conditions.
  • the judgment conditions for turning on the best power saving mode can be set by yourself.
  • Mode-restricted applications can also be restricted according to user needs. In this way, the user’s sleep time not only meets the power saving and non-disturbance requirements, but also does not limit the user’s individual application requirements, thereby greatly improving the user experience.
  • the preset power saving condition further includes: the terminal device is in a low power consumption mode, and the terminal device is not running a playback application.
  • the low power consumption mode of the terminal device indicates a mode that the terminal device comes with, and the built-in mode may be a mode in which the native system of the terminal device automatically turns on according to the use state of the terminal device.
  • the terminal device is not running the playback application, which means that the terminal device is not in a state where the playback application is not running.
  • the terminal device determines whether the current terminal device is in Doze Mode mode, and whether it is playing music, etc., for example, the preset power saving condition is to enter the low power consumption mode, Take sleep time and not playing music applications as an example. After the screen state of the terminal device is in the off-screen state for a preset duration, the terminal device determines whether the current state has entered the low power consumption mode and the sleep time without playing music at the same time If it is applied, it is determined that the current state of the terminal device meets the preset power saving condition.
  • the determination of the sleep time will be specifically described below through several embodiments.
  • FIG. 3 provides a standby optimization method. This embodiment relates to a specific process in which a terminal device determines a sleep time according to historical sleep data so as to use the sleep time to set preset power saving conditions. As shown in Figure 3, the method further includes:
  • S201 Acquire historical dormancy data of the terminal device.
  • the historical sleep data acquired by the terminal device represents all the data of the terminal device in the user's historical sleep time.
  • the method for the terminal device to obtain the historical sleep data may be directly from the database of the terminal device. It may also be obtained in other ways, for example, obtained from the user's cloud account, which is not limited in this embodiment.
  • S202 Determine a sleep time of the terminal device according to the historical sleep data; the sleep time includes the start time and duration of the terminal device entering the sleep state.
  • the sleep time of the terminal device is determined according to the historical sleep data, where the sleep time includes the start time and duration of the terminal device's next sleep state, where the terminal
  • the way for the device to determine the sleep time can be from the historical sleep data and synthesize it according to the searched rules to get the start time and duration of the next sleep state, that is, the sleep time of the terminal device is determined, of course. It can be in other ways, for example: the terminal device directly adopts a piece of sleep data with the most recent time, and determines the start time and duration of the sleep state in the sleep data as the sleep time of the terminal device.
  • the terminal device is based on the historical sleep data in this embodiment.
  • the way to determine the sleep time is not limited.
  • an implementable manner of the above step S201 may include:
  • the terminal device when it first obtains the screen-off time and the corresponding screen-on time each time, it may obtain the screen-off time and the corresponding screen-on time at the same time.
  • the off-screen moment represents the moment when the screen state of the terminal device is in the off-screen state
  • the corresponding on-screen moment is the moment when the screen state of the terminal device changes from the current off-screen state to the on-screen state. It should be noted that, Every time when the screen is turned off and the corresponding time when the screen is turned on, the terminal device will record, and you can directly obtain it when using. The terminal device directly records each time when the screen is turned off and the corresponding time when the screen is turned on.
  • the terminal device Based on each acquired screen-off moment and corresponding screen-on moment, acquires the time interval between each screen-off moment and the corresponding screen-on moment, that is, the time interval between the two moments.
  • S302 Record the data between the screen-off time and the corresponding screen-on time that meet the preset interval condition as historical sleep data, and increase the total amount of the historical sleep data.
  • the terminal device Based on the time interval between the screen-off time and the corresponding screen-on time recorded in S301, the terminal device first determines whether the time interval between the screen-off time and the corresponding screen-on time meets the preset interval condition , Where the preset interval condition represents the preset interval duration, which can be set according to the actual needs of the user, when it is determined that the time interval between the off-screen moment and the corresponding on-screen moment meets the preset interval condition , Record the data between the current screen-off time and the corresponding screen-on time as historical dormancy data, and at the same time, increase the total number of historical dormant data that the terminal device has stored in order to use the total number for the next judgment The record is in the latest state. It can be understood that if several pieces of dormant data are stored, the total number will increase by several pieces of dormant data correspondingly to ensure that the total number of historical dormant data stored by the terminal device is the latest and most correct.
  • the preset interval condition represents the preset
  • a maximum value can be set for the total amount of historical sleep data, that is, a threshold value is preset to ensure that the total number of all stored sleep data will not be too much.
  • the present application provides a standby optimization method.
  • the methods include:
  • S401 Determine whether the total amount of the historical sleep data is greater than or equal to a preset threshold.
  • the terminal device judges whether the total amount of historical sleep data is greater than or equal to the preset threshold, where the total number of historical sleep data represents the total number of each off-screen time and corresponding on-screen time recorded by the terminal device, and the preset Threshold
  • the critical value of the total number indicates that the total number of the terminal device storing each off-screen time and the corresponding on-screen time cannot exceed the critical value.
  • the specific size can be set according to the actual needs of the user.
  • the preset interval condition is set to 5-15 hours (indicating that the time interval between the off-screen moment and the corresponding on-screen moment is greater than or equal to 5 hours and less than or equal to 15 hours), the preset threshold for the total quantity If the number is 60, then in this step, the terminal device determines whether the time interval is within 5-15 hours according to the obtained screen-off time and the corresponding screen-on time. When it is determined to be within 5-15 hours, the terminal device is determined Whether the total number of stored screen-off moments and corresponding screen-on moments is greater than or equal to 60, then execute the next step according to the judgment result.
  • the terminal device based on the size between the total number of historical sleep data determined by the terminal device in S401 and the preset threshold, if the total number is greater than or equal to the preset threshold, the terminal device first removes the earliest sleep data in the history record, and then Record the data between the screen-off time and the corresponding screen-on time that currently meet the preset interval condition. In this way, the terminal device adopts a certain amount of historical sleep data in the latest time of the user to obtain the user's latest usage habits in real time, so that the sleep time determined by the terminal device according to the historical sleep data is more in line with the user's needs, and storage space can also be saved.
  • the standby optimization method provided by this embodiment is to obtain the historical sleep data of the terminal device, and then determine the sleep time of the terminal device according to the historical sleep data. Because in this embodiment, the historical sleep data obtained by the terminal device is updated in real time. When the historical sleep data record reaches the threshold, the earliest sleep data is removed every time a new record is added, ensuring that the historical sleep data is always in the latest state, and because the terminal device is determining the next sleep time based on the historical sleep data The time is automatically calculated by the algorithm, which further ensures the scientificity of the calculated next sleep time, and is more in line with the real-time needs of users.
  • an optional manner of the foregoing step S202 may include:
  • S401 Convert the data format of the historical sleep data into a two-dimensional coordinate format to obtain coordinate data corresponding to the historical sleep data; the abscissa of the two-dimensional coordinate is the moment when the screen is turned off, and the ordinate is the duration of the off screen. .
  • the terminal device converts the above-obtained historical sleep data into a two-dimensional coordinate format, as shown in Figure 6.1. Take 7 groups as an example, use the abscissa as the off-screen start time and the ordinate as the off-screen start time. When the screen lasts for a long time, after converting the format of the historical sleep data, the coordinate data corresponding to the above historical sleep data is obtained.
  • S402 Calculate the sleep time of the terminal device according to the coordinate data using a preset algorithm.
  • the terminal device uses a preset algorithm to calculate the sleep time of the terminal device according to the coordinate data corresponding to the above-mentioned converted historical sleep data, and according to the coordinate data, the preset algorithm indicates that the terminal device calculates the sleep time according to the coordinate data.
  • the algorithm used in time such as the K-means clustering algorithm, of course, can also be other algorithms, which is not limited in this embodiment.
  • the terminal device first normalizes the coordinate data corresponding to the historical sleep data into the coordinate system, that is, the above Figure 6.1
  • the 7 sets of coordinate data in Figure 6.2 are normalized to the coordinate system of Figure 6.2, and then the clusters are divided according to the coordinate points of each set of data, and the largest cluster is determined to be the largest cluster, that is, cluster 2 in Figure 6.3 is the largest cluster, and finally, the largest cluster
  • the coordinate point corresponding to the geometric center of the cluster is determined as the data of the sleep time of the terminal device, that is, the geometric center in cluster 2 in Figure 6.4.
  • the terminal device using this algorithm automatically calculates the next sleep time based on the latest historical show sleep data, which greatly ensures that the calculated sleep time is closest to the user's real-time needs.
  • the above-provided embodiment illustrates a method for the terminal device to turn on the best power-saving mode for the user after meeting the preset power-saving conditions in the current state.
  • the best power-saving mode can be used when the user is in a sleep state.
  • the method after the optimal power saving mode is turned on, the method also It includes: switching from the optimal power saving mode to the working mode when the terminal device is on the screen or when the preset time arrives before the end of the sleep time.
  • the optimal power saving mode is switched to the working mode, wherein the bright screen of the terminal device indicates that the user wakes up at a time
  • the terminal device detects that the screen state has switched to the bright screen state, and the terminal device automatically releases the best session.
  • the electric mode that is, the restriction on each preset application is lifted, and the terminal device is switched to the working mode.
  • the preset time arrives before the end of the sleep time, it means that the user's wake-up time is near or after the end of the sleep time, and the terminal device detects that the preset time before the end of the sleep time has arrived (for example: end time In the first half hour), the best power saving mode is automatically released for the terminal device, and the terminal device is switched to the working mode.
  • the preset time is set by the user according to requirements, and it can be half an hour or one hour, which is not limited in this embodiment. In this way, no matter if the user wakes up early or late, the terminal device can automatically release the best power saving mode for the user and switch the terminal device to the working mode, which greatly facilitates the user to continue using the terminal device when waking up.
  • an embodiment of the present application also provides a standby optimization device, which is used to implement the standby optimization method provided in the foregoing embodiment.
  • a standby optimization device including: a detection module 10, a judgment module 11, and an activation module 12, wherein:
  • the detection module 10 is configured to detect the screen state of the terminal device
  • the judging module 11 is configured to judge whether the terminal device meets the preset power-saving conditions when the screen state is the off-screen state and the off-screen duration exceeds a preset time period; the preset power-saving conditions include Whether the current moment is in the sleep time of the terminal device;
  • the turning-on module 12 is configured to turn on the best power-saving mode if the terminal device meets the preset power-saving conditions; the best power-saving mode is used to instruct the terminal device to stop running the preset application.
  • the preset power saving condition further includes: the terminal device is in a low power consumption mode, and the terminal device is not running a playback application.
  • a standby optimization device is provided, and the device further includes: an acquisition module 13 and a determination module 14, wherein:
  • the obtaining module 13 is configured to obtain historical dormancy data of the terminal device
  • the determining module 14 is configured to determine the sleep time of the terminal device according to the historical sleep data; the sleep time includes the start time and the duration of the terminal device entering the sleep state.
  • the above-mentioned obtaining module 13 includes: an obtaining unit 131 and a recording unit 132, wherein:
  • the acquiring unit 131 is configured to acquire the time interval between the screen-off time and the corresponding screen-on time of the terminal device each time;
  • the recording unit 132 is configured to record data between the screen-off time and the corresponding screen-on time that meet the preset interval condition as historical sleep data, and increase the total amount of the historical sleep data.
  • the above-mentioned acquisition module 13 further includes a removing unit configured to determine whether the total amount of the historical sleep data is greater than or equal to a preset threshold; if so, remove the oldest recorded time in the historical sleep data Sleep data.
  • the determination module 14 includes: a conversion unit 141 and a calculation unit 142, wherein:
  • the conversion unit 141 is configured to convert the data format of the historical sleep data into a two-dimensional coordinate format to obtain the coordinate data corresponding to the historical sleep data; the abscissa of the two-dimensional coordinate is the moment when the screen is turned off, and the ordinate is Duration of screen off;
  • the calculation unit 142 is configured to calculate the sleep time of the terminal device by using a preset algorithm according to the coordinate data.
  • the device is specifically further configured to switch from the optimal power saving mode to the working mode when the terminal device is on the screen or when the preset time arrives before the end of the sleep time.
  • each module in the above-mentioned standby optimization device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a terminal, and an internal structure diagram of the computer device may be referred to as shown in FIG. 1 above.
  • the computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a standby optimization method.
  • the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, a trackball or a touchpad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
  • FIG. 1 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
  • the preset power-saving conditions include the current time Whether it is in the sleep time of the terminal device;
  • the best power saving mode is turned on; the best power saving mode is used to instruct the terminal device to stop running the preset application.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the preset power-saving conditions include the current time Whether it is in the sleep time of the terminal device;
  • the best power saving mode is turned on; the best power saving mode is used to instruct the terminal device to stop running the preset application.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Sources (AREA)

Abstract

本申请涉及一种待机优化方法、装置、计算机设备和存储介质,通过终端设备检测屏幕状态,在屏幕状态为灭屏状态,且灭屏状态的持续时间超过预设时长时,开始判断终端设备当前状态是否满足预设的节电条件,在确定满足预设的节电条件时,则开启最佳节电模式,其中预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间。由于该方法中,终端设备开启最佳节电模式时是通过自动根据预设的条件判断并开启的,其中开启最佳节电模式的判断的条件是可以自行设定,在开启最佳节电模式限制的应用也可以根据用户的需求进行限制,这样,用户的睡眠时间既达到省电和免打扰需求,又不限制用户的个别应用需求,从而大大提高了用户体验。

Description

待机优化方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请基于申请号为201910385635.0、申请日为2019年05月09日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及通信技术领域,特别是涉及一种待机优化方法、装置、计算机设备和存储介质。
背景技术
随着通信技术的发展,由于智能终端(例如:手机)在沟通与生活方面为人们带来了极大的便利,已经成为日常工作生活中不可或缺的设备,但渐渐地也出现了越来越多意想不到的麻烦,例如,在用户处于睡眠时间时,由于此时手机处于空闲状态,如果手机中的APP均在运行状态时既耗电又会打扰到用户睡眠。
目前,很多智能终端均有内置模式来实现省电或者免打扰的功能,例如:有些手机具有节电模式(Battery Saver),可以降低装置效能、限制定位服务及大部份背景数据传输,且可以停用非系统的同步功能,以延长电池续航力;或低电耗模式(Doze Mode),在设备长时间处于闲置状态时,会阻止应用访问网络并推迟其作业、并同步和标准闹铃。
但是上述节电模式限制的功能太多,而低电耗模式限制虽然较宽松,却无法符合省电和免打扰的需求,因此,如何达到省电和免打扰需求,又不限制用户的个别应用需求,成为亟待解决的问题。
发明内容
基于此,有必要针对上述如何达到省电和免打扰需求,又不限制用户的个别应用需求的技术问题,提供一种待机优化方法、装置、计算机设备和存储介质。
第一方面,本申请实施例提供一种待机优化方法,所述方法包括:
检测终端设备的屏幕状态;
在所述屏幕状态为灭屏状态,且所述灭屏状态的持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
若是,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
在其中一个实施例中,所述预设的节电条件还包括:
所述终端设备为低电耗模式、且所述终端设备未运行播放应用。
在其中一个实施例中,在所述判断所述终端设备是否满足预设的节电条件之前,所述方法包括:
获取所述终端设备的历史休眠数据;
根据所述历史休眠数据,确定所述终端设备的休眠时间;所述休眠时间包括所述终端设备进入休眠状态的开始时间和持续时长。
在其中一个实施例中,所述获取所述终端设备的历史休眠数据,包括:
获取所述终端设备每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔;
将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据,并增加所述历史休眠数据的总数量。
在其中一个实施例中,在所述将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据之前,所述方法还包括:
判断所述历史休眠数据的总数量是否大于或等于预设阈值;
若是,则移除所述历史休眠数据中记录时间最早的休眠数据。
在其中一个实施例中,所述根据所述历史休眠数据,确定所述终端设备的休眠时间,包括:
将所述历史休眠数据的数据格式转换为二维坐标格式,得到所述历史休眠数据对应的坐标数据;所述二维坐标的横坐标为灭屏开始时刻,纵坐标为灭屏持续时长;
根据所述坐标数据,采用预设的算法计算所述终端设备的休眠时间。
在其中一个实施例中,在所述开启最佳节电模式之后,所述方法还包括:
在所述终端设备亮屏时或者在所述休眠时间结束前的预设时刻到达时,从所述最佳节电模式切换至工作模式。
第二方面,本申请实施例提供一种待机优化装置,所述装置包括:
检测模块,配置为检测终端设备的屏幕状态;
判断模块,配置为在所述屏幕状态为灭屏状态,且灭屏持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
开启模块,配置为若所述终端设备满足预设的节电条件,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
第二方面,本申请实施例提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述第一方面实施例任一方法的步骤。
第三方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面实施例任一方法的步骤。
本申请提供的待机优化方法、装置、计算机设备和存储介质,通过终端设备检测屏幕状态,在屏幕状态为灭屏状态,且灭屏状态的持续时间超过预设时长时,开始判断终端设备当前状态是否满足预设的节电条件,在确定满足预设的节电条件时,则开启最佳节电模式,其中预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间。由于该方法中,终端设备开启最佳节电模式时是通过自动根据预设的条件判断并开启的,其中开启最佳节电模式的判断的条件是可以自行设定,在开启最佳节电模式限制的应用也可以根据用户的需求进行限制,这样,在用户的睡眠时间既达到省电和免打扰需求,又不限制用户的个别应用需求,从而大大提高了用户体验。
附图说明
图1为一个实施例中待机优化方法的应用环境图;
图2为一个实施例提供的待机优化方法的流程示意图;
图3为一个实施例提供的待机优化方法的流程示意图;
图4为一个实施例提供的待机优化方法的流程示意图;
图5为一个实施例提供的待机优化方法的流程示意图;
图5.1为一个实施例提供历史休眠数据记录流程图;
图6为一个实施例提供的待机优化方法的流程示意图;
图6.1为一个实施例提供的灭屏数据坐标格式示意图;
图6.2为一个实施例提供的正规化灭屏数据示意图;
图6.3为一个实施例提供的确定最大数据群示意图;
图6.4为一个实施例提供的确定休眠时间示意图;
图7为一个实施例提供的待机优化装置的结构框图;
图8为一个实施例提供的待机优化装置的结构框图;
图9为一个实施例提供的待机优化装置的结构框图;
图10为一个实施例提供的待机优化装置的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的一种待机优化方法,可以应用于如图1所示的应用环境中,该终端设备可以是服务器,该终端设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该终端设备的处理器用于提供计算和控制能力。该终端设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该终端设备的数据库用于存储待机优化方法的数据。该终端设备的网络接口用于与外部的其他设备通过网络连接通信。该计算机程序被处理器执行时以实现一种待机优化方法。
本申请的实施例提供一种待机优化方法、装置、计算机设备和存储介质,旨在解决如何达到省电和免打扰需求,又不限制用户的个别应用需求的技术问题。下面将通过实施例并结合附图具体地对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。需要说明的是,本申请提供的一种待机优化方法,其执行主体为终端设备,其中,该执行主体还可以为计算机设备,或者是待机优化装置,其中该装置可以通过软件、硬件或者软硬件结合的方式实现成为数据分析终端的部分或者全部。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描 述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。
在一个实施例中,图2提供了一种待机优化方法,本实施例涉及的是终端设备在屏幕的灭屏时间达到的预设时长,且确定其当前的状态满足预设的节电条件时,开启最佳节电模式,以达到既省电、免打扰的需求,又不限制用户使用个别应用的具体过程。如图2所示,该方法包括:
S101,检测终端设备的屏幕状态。
其中,终端设备的屏幕状态可以是亮屏状态或者灭屏状态,终端设备检测其屏幕状态的方式可以是通过检测屏幕的参数进行确定,例如检测该屏幕亮度的参数,如果屏幕亮度为0,则该屏幕状态为灭屏状态,如果屏幕亮度的0以上,则该屏幕状态为亮屏状态,示例地,终端设备检测屏幕亮度的参数,在屏幕亮度为0时确定该屏幕状态为灭屏状态。
S102,在所述屏幕状态为灭屏状态,且所述灭屏状态的持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间。
本步骤中,基于上述S101中终端设备检测到屏幕状态为灭屏状态时,然后,终端设备检测该屏幕处于灭屏状态的持续时间有多长,该屏幕灭屏时间的检测方式可以是计算屏幕开始灭屏的时刻到当前时刻的间隔时长,在该持续时间超过了预设时长时,终端设备再开始判断当前的状态是否满足预设的节电条件,其中预设的节电条件包括当前时刻是否处于终端设备的休眠时间。
其中,预设时长为用户根据实际情况设定的时长,例如:75分钟,用于指示终端设备是否开始判断当前状态是否满足预设的节电条件。其中该预设的节电条件也为用户根据实际需求制定的条件,例如:该节电条件可以是判断当前终端的状态是否处于休眠时间,还可以是判断该终端设备当前的电量是否不足等,本实施例对该节电条件的具体内容不做具体限定。 其中,休眠时间表示用户处于睡眠时终端设备的状态时间,其中该休眠时间可以是用户设置的每天的固定时间段,也可以是终端设备根据用户历史睡眠时间推测出的每天的固定时间段,本实施例对该休眠时间的具体确定方式不做限定。示例地,以预设时长为75分钟,预设的节电条件为进入休眠时间为例,在终端设备的屏幕状态处于灭屏状态的持续时长达到75分钟(预设时长)后,终端设备判断当前状态进入休眠时间,如果是,则确定终端设备的当前状态满足预设的节电条件。
S103,若所述终端设备满足预设的节电条件,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
基于上述S102中判断的终端设备当前状态满足预设的节电条件时,终端设备开始开启最佳节电模式,其中,该最佳节电模式用于指示该终端设备停止运行预设应用的模式,即表示,终端设备开启最佳节电模式时可以是通过停止运行预设的应用来开启,例如:该预设的应用可以包括网络分享、网络使用、三方应用持锁、三方应用标准闹铃、通知灯周期与亮度、感测器、蓝牙及蓝牙扫描等应用,其中网络分享或使用的限制、通知灯周期与亮度、感测器、蓝牙及蓝牙扫描这些应用可以是整个系统都进行限制,但三方应用持锁、三方应用标准闹铃可以是只针对三方应用,不限制系统应用,其中本实施对预设应用具体包括内容不做限定。具体地,终端设备在确定当前状态满足预设的节电条件后,通过限制预设的应用为终端设备开启最佳的节电模式。
本实施例提供的一种待机优化方法,通过终端设备检测屏幕状态,在屏幕状态为灭屏状态,且灭屏状态的持续时间超过预设时长时,开始判断终端设备当前状态是否满足预设的节电条件,在确定满足预设的节电条件时,则开启最佳节电模式,其中预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间。由于该方法中,终端设备开启最佳节电模式时是 通过自动根据预设的条件判断并开启的,其中开启最佳节电模式的判断的条件是可以自行设定,在开启最佳节电模式限制的应用也可以根据用户的需求进行限制,这样,用户的睡眠时间既达到省电和免打扰需求,又不限制用户的个别应用需求,从而大大提高了用户体验。
基于上述实施例,可选地,所述预设的节电条件还包括:所述终端设备为低电耗模式、且所述终端设备未运行播放应用。其中,终端设备为低电耗模式表示该终端设备自带的一种模式,该自带的模式可以是终端设备原生系统根据终端设备的使用状态自动开启的模式。其中,终端设备未运行播放应用表示的终端设备没有处于未运行播放音频应用的状态。则在实际应用中,终端设备判断当前终端设备的状态是否为低电耗模式(Doze Mode)模式,同时是否有在播放音乐等,示例地,预设的节电条件为进入低电耗模式、休眠时间和没有播放音乐应用为例,在终端设备的屏幕状态处于灭屏状态的持续时长达到预设时长后,终端设备判断当前状态是否同时既进入了低电耗模式和休眠时间又没有播放音乐应用,如果是,则确定终端设备的当前状态满足预设的节电条件。
下面通过几个实施例对休眠时间的确定进行具体说明。
在一个实施例中,图3提供了一种待机优化方法,本实施例涉及的是终端设备根据历史休眠数据确定休眠时间,以便使用该休眠时间设定预设的节电条件的具体过程。如图3所示,该方法还包括:
S201,获取所述终端设备的历史休眠数据。
在本实施例中,终端设备获取的历史休眠数据表示该终端设备在用户的历史睡眠时间中的所有数据,其中,终端设备获取该历史休眠数据的方式可以是从终端设备的数据库中直接获取,也可以是通过其他方式获取,例如从用户的云端账户中获取,本实施例对此不做限定。
S202,根据所述历史休眠数据,确定所述终端设备的休眠时间;所述 休眠时间包括所述终端设备进入休眠状态的开始时间和持续时长。
本步骤中,基于上述S201中终端设备获取的历史休眠数据,根据该历史休眠数据确定终端设备的休眠时间,其中,休眠时间包括终端设备下次进入休眠状态的开始时间和持续时长,其中,终端设备确定休眠时间的方式可以是从历史休眠数据中规律,并根据寻找的规律进行综合后得出下次进入休眠状态的开始时间和持续时长,即,确定了该终端设备的休眠时间,当然也可以是其他方式,例如:终端设备直接采用时间最近的一条休眠数据,将该休眠数据中的休眠状态开始时间和持续时长确定为终端设备的休眠时间,其中本实施例对终端设备根据历史休眠数据确定休眠时间的方式不做限定。
可选地,如图4提供的一种待机优化方法,上述S201步骤的一种可实现方式可以包括:
S301,获取所述终端设备每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔。
其中,终端设备先获取每一次的灭屏时刻和对应的亮屏时刻时,可以是同时获取灭屏时刻和对应的亮屏时刻的。其中,该灭屏时刻表示终端设备的屏幕状态为灭屏状态的时刻,其对应的亮屏时刻为该终端设备的屏幕状态从当前灭屏状态转换为亮屏状态的时刻,需要说明的是,每一次的灭屏时刻和对应的亮屏时刻终端设备都会进行记录,使用时直接获取即可。终端设备直接记录每一次的灭屏时刻和对应的亮屏时刻,例如,记录的格式可以是:<item localStart="2018-05-28 12:00:00"localEnd="2018-05-2900:00:00"duration="PT12H"/>。基于获取的每一次的灭屏时刻和对应的亮屏时刻,终端设备获取每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔,即两个时刻时间的间隔时长。
S302,将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据 记录为历史休眠数据,并增加所述历史休眠数据的总数量。
基于上述S301中记录的每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔,终端设备先确定该灭屏时刻和对应的亮屏时刻之间的时间间隔是否满足预设的间隔条件,其中,预设的间隔条件表示的是预设的间隔时长,其可根据用户实际需求进行设定,在确定灭屏时刻和对应的亮屏时刻之间的时间间隔满足预设的间隔条件时,将当前次的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据,同时,将该终端设备已经存储的历史休眠数据的总数量增加,以便下次判断时使用的总数量记录处于最新状态,可以理解的是存储了几条休眠数据,则总数量相应增加几条休眠数据,以保证终端设备存储的历史休眠数据的总数量为最新的,最正确的。
考虑到终端设备的内存,可以对历史休眠数据的总数量设定一个最大值,即预设一个阈值,以保证存储的所有休眠数据的总数量不会太多。
则可选地,如图5所示,本申请提供了一种待机优化方法,在将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据之前,所述方法包括:
S401,判断所述历史休眠数据的总数量是否大于或等于预设阈值。
终端设备判断历史休眠数据的总数量是否大于等于该预设阈值的,其中,历史休眠数据的总数量表示的终端设备记录的每一次的灭屏时刻和对应的亮屏时刻的总数量,预设阈值该总数量的临界值,表示终端设备存储该每一次的灭屏时刻和对应的亮屏时刻的总数量不能超过该临界值,其具体大小可根据用户实际需求进行设定,示例地,如图5.1所示,设定预设的间隔条件为5-15小时(表示灭屏时刻和对应的亮屏时刻之间的时间间隔大于等于5小时且小于等于15小时),总数量的预设阈值为60条,则本步骤中,终端设备根据获取的灭屏时刻和对应的亮屏时刻,确定该时间间隔是否在5-15小时以内,在确定处于5-15小时以内时,再判断终端设备目前已 经存储的灭屏时刻和对应的亮屏时刻记录的总数量是否大于等于60条,然后根据判断结果执行下一步。
S402,若是,则移除所述历史休眠数据中记录时间最早的休眠数据。
其中,基于S401中终端设备判断的历史休眠数据的总数量与预设阈值之间的大小,若总数量大于等于预设阈值,终端设备先移除该历史记录中的时间最早的休眠数据,然后将当前满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录进去。这样,终端设备采用用户最新的时间内的一定数量的历史休眠数据,可以实时获取用户最新的使用习惯,使得终端设备根据历史休眠数据确定的休眠时间更加符合用户的需求,也可以节省存储空间。
本实施例提供的一种待机优化方法,通过获取终端设备的历史休眠数据,再根据该历史休眠数据,确定终端设备的休眠时间,由于本实施例中,终端设备获取的历史休眠数据是实时更新的,在历史休眠数据记录达到阈值时,每增加新的记录就移除最早的休眠数据,保证了历史休眠数据一直处于最新状态,又因为,终端设备在根据该历史休眠数据确定下次休眠时间时采用的是算法自动计算的,进一步保证了计算的下次休眠时间的科学性,更加符合用户的实时需求。
可选地,如图6提供的一种待机优化方法,上述步骤S202的一种可选方式可以为包括:
S401,将所述历史休眠数据的数据格式转换为二维坐标格式,得到所述历史休眠数据对应的坐标数据;所述二维坐标的横坐标为灭屏开始时刻,纵坐标为灭屏持续时长。
其中,终端设备将上述获取的历史休眠数据,将这些休眠数据转化为二维坐标的格式,如图6.1所示,取其中7组为例,将横坐标使用灭屏开始时刻,纵坐标使用灭屏持续时长,将历史休眠数据转换格式后,即得到上 述历史休眠数据对应的坐标数据。
S402,根据所述坐标数据,采用预设的算法计算所述终端设备的休眠时间。
本步骤中,终端设备根据上述转换后的历史休眠数据对应的坐标数据,根据该坐标数据,采用预设的算法计算终端设备的休眠时间,其中,预设的算法表示终端设备根据坐标数据计算休眠时间使用的算法,例如:K均值聚类算法,当然还可以是其他的算法,本实施例对此不做限定。示例地,以预设的算法为K均值聚类算法为例,如图6.1-图6.4所示,终端设备先将历史休眠数据对应的坐标数据正规化到坐标系中,即,将上述图6.1中的7组坐标数据正规化为图6.2的坐标系,然后根据各组数据的坐标点划分群体,确定坐标点最多的为最大群,即,图6.3中群2为最大群,最后,将最大群的几何中心所对应的坐标点确定为终端设备的休眠时间的数据,即,图6.4中的群2中的几何中心。这样,采用该算法终端设备自动根据最新的历史秀休眠数据计算下次休眠时间,大大保证了计算的休眠时间最接近用户的实时需求。
可以理解的是,上述提供的实施例说明的是终端设备在当前状态满足预设的节电条件后为用户开启最佳节电模式的方法,该最佳节电模式可以使用在用户处于睡眠状态的环境下,考虑到用户在睡醒时使用终端设备时,还要对终端设备进行模式切换带来的麻烦,在一个实施例中,在所述开启最佳节电模式之后,所述方法还包括:在所述终端设备亮屏时或者在所述休眠时间结束前的预设时刻到达时,从所述最佳节电模式切换至工作模式。
本实施例中,在终端设备亮屏时或者在休眠时间结束前的预设时刻到达时,从所述最佳节电模式切换至工作模式,其中,终端设备亮屏表示的用户起床的时间处于休眠时间内且距休眠时间的结束时间比较远时,用户自己主动打开终端设备的情况,这种情况下,终端设备检测到屏幕状态切 换为亮屏状态了,则为终端设备自动解除最佳节电模式,即,解除对各预设应用的限制,将终端设备切换为工作模式。另外的在休眠时间结束前的预设时刻到达时,表示的是用户的起床时间在休眠时间结束时刻的附近或者之后,终端设备检测到休眠时间结束时刻前的预设时刻到达(例如:结束时刻的前半小时),自动为终端设备解除最佳节电模式,将终端设备切换为工作模式。其中,预设时刻为用户根据需求设定,可以是半小时,也可以是一小时,本实施例对此不做限定。这样,不管用户起床比较早或者起床比较晚,终端设备均可自动的为用户解除最佳节电模式,将终端设备切换为工作模式,大大方便了用户在睡醒时继续使用终端设备。
应该理解的是,虽然图2-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
另外,本申请实施例还提供一种待机优化装置,用于实现上述实施例提供的一种待机优化方法。在一个实施例中,如图7所示,提供了一种待机优化装置,包括:检测模块10、判断模块11和开启模块12,其中:
检测模块10,配置为检测终端设备的屏幕状态;
判断模块11,配置为在所述屏幕状态为灭屏状态,且灭屏持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
开启模块12,配置为若所述终端设备满足预设的节电条件,则开启最 佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,所述预设的节电条件还包括:所述终端设备为低电耗模式、且所述终端设备未运行播放应用。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,如图8所示,提供了一种待机优化装置,该装置还包括:获取模块13、确定模块14,其中:
获取模块13,配置为获取所述终端设备的历史休眠数据;
确定模块14,配置为根据所述历史休眠数据,确定所述终端设备的休眠时间;所述休眠时间包括所述终端设备进入休眠状态的开始时间和持续时长。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,如图9所示,提供了一种待机优化装置,上述获取模块13包括:获取单元131、记录单元132,其中:
获取单元131,配置为获取所述终端设备每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔;
记录单元132,配置为将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据,并增加所述历史休眠数据的总数量。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,上述获取模块13还包括移除单元,配置为判断 所述历史休眠数据的总数量是否大于或等于预设阈值;若是,则移除所述历史休眠数据中记录时间最早的休眠数据。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,如图10所示,提供了一种待机优化装置,上述确定模块14包括:转换单元141、计算单元142,其中:
转换单元141,配置为将所述历史休眠数据的数据格式转换为二维坐标格式,得到所述历史休眠数据对应的坐标数据;所述二维坐标的横坐标为灭屏开始时刻,纵坐标为灭屏持续时长;
计算单元142,配置为根据所述坐标数据,采用预设的算法计算所述终端设备的休眠时间。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在其中一个实施例中,所述装置具体还用于在所述终端设备亮屏时或者在所述休眠时间结束前的预设时刻到达时,从所述最佳节电模式切换至工作模式。
上述实施例提供的一种待机优化装置,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
关于待机优化装置的具体限定可以参见上文中对于待机优化方法的限定,在此不再赘述。上述待机优化装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以参见上述图1所示。该计算机设备包括通过系统总线连 接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种待机优化方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:
检测终端设备的屏幕状态;
在所述屏幕状态为灭屏状态,且所述灭屏状态的持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
若是,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
上述实施例提供的一种计算机设备,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
检测终端设备的屏幕状态;
在所述屏幕状态为灭屏状态,且所述灭屏状态的持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
若是,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
上述实施例提供的一种计算机可读存储介质,其实现原理和技术效果与上述方法实施例类似,在此不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种待机优化方法,所述方法包括:
    检测终端设备的屏幕状态;
    在所述屏幕状态为灭屏状态,且所述灭屏状态的持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;所述预设的节电条件包括当前时刻是否处于所述终端设备的休眠时间;
    若是,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
  2. 根据权利要求1所述的方法,其中,所述预设的节电条件还包括:
    所述终端设备为低电耗模式、且所述终端设备未运行播放应用。
  3. 根据权利要求1或2所述的方法,其中,在所述判断所述终端设备是否满足预设的节电条件之前,所述方法包括:
    获取所述终端设备的历史休眠数据;
    根据所述历史休眠数据,确定所述终端设备的休眠时间;所述休眠时间包括所述终端设备进入休眠状态的开始时间和持续时长。
  4. 根据权利要求3所述的方法,其中,所述获取所述终端设备的历史休眠数据,包括:
    获取所述终端设备每一次的灭屏时刻和对应的亮屏时刻之间的时间间隔;
    将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据,并增加所述历史休眠数据的总数量。
  5. 根据权利要求4所述的方法,其中,在所述将满足预设间隔条件的灭屏时刻和对应的亮屏时刻之间的数据记录为历史休眠数据之前,所述方法包括:
    判断所述历史休眠数据的总数量是否大于或等于预设阈值;
    若是,则移除所述历史休眠数据中记录时间最早的休眠数据。
  6. 根据权利要求3所述的方法,其中,所述根据所述历史休眠数据,确定所述终端设备的休眠时间,包括:
    将所述历史休眠数据的数据格式转换为二维坐标格式,得到所述历史休眠数据对应的坐标数据;所述二维坐标的横坐标为灭屏开始时刻,纵坐标为灭屏持续时长;
    根据所述坐标数据,采用预设的算法计算所述终端设备的休眠时间。
  7. 根据权利要求1所述的方法,其中,在所述开启最佳节电模式之后,所述方法还包括:
    在所述终端设备亮屏时或者在所述休眠时间结束前的预设时刻到达时,从所述最佳节电模式切换至工作模式。
  8. 一种待机优化装置,所述装置包括:
    检测模块,配置为检测终端设备的屏幕状态;
    判断模块,配置为在所述屏幕状态为灭屏状态,且灭屏持续时间超过预设时长时,判断所述终端设备是否满足预设的节电条件;
    开启模块,配置为若所述终端设备满足预设的节电条件,则开启最佳节电模式;所述最佳节电模式用于指示所述终端设备停止运行预设的应用。
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。
  10. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。
PCT/CN2020/089352 2019-05-09 2020-05-09 待机优化方法、装置、计算机设备和存储介质 WO2020224658A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910385635.0 2019-05-09
CN201910385635.0A CN110198558B (zh) 2019-05-09 2019-05-09 待机优化方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2020224658A1 true WO2020224658A1 (zh) 2020-11-12

Family

ID=67752484

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/089352 WO2020224658A1 (zh) 2019-05-09 2020-05-09 待机优化方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN110198558B (zh)
WO (1) WO2020224658A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904993A (zh) * 2021-03-16 2021-06-04 北京小米移动软件有限公司 屏幕控制方法、装置及存储介质
CN114326427A (zh) * 2021-12-29 2022-04-12 Tcl家用电器(合肥)有限公司 一种智能设备的控制方法、装置、智能设备及存储介质
CN114630404A (zh) * 2022-03-15 2022-06-14 北京小米移动软件有限公司 终端设备控制方法、装置、存储介质以及终端设备
CN117692998A (zh) * 2023-07-27 2024-03-12 荣耀终端有限公司 休眠异常情况下的数据获取方法和电子设备

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198558B (zh) * 2019-05-09 2022-07-12 深圳市万普拉斯科技有限公司 待机优化方法、装置、计算机设备和存储介质
CN111221633A (zh) * 2019-10-31 2020-06-02 RealMe重庆移动通信有限公司 终端控制方法、装置、移动终端及存储介质
CN111050388B (zh) * 2019-12-03 2023-01-06 Oppo广东移动通信有限公司 Doze模式控制方法、装置、移动终端及存储介质
CN113038580A (zh) * 2021-02-26 2021-06-25 北京小米松果电子有限公司 省电模式控制方法、装置、设备及存储介质
CN113747346B (zh) * 2021-05-10 2023-10-03 荣耀终端有限公司 终端设备的待机方法和终端设备
CN113747552B (zh) * 2021-06-18 2024-03-19 荣耀终端有限公司 一种功耗优化方法和电子设备
CN113342407B (zh) * 2021-06-25 2023-01-24 歌尔科技有限公司 一种屏幕控制方法、装置、电子设备及可读存储介质
CN116795196B (zh) * 2023-08-25 2023-11-17 深圳市德航智能技术有限公司 一种加固手持平板电脑超长待机的实现方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095059A (zh) * 2016-06-08 2016-11-09 维沃移动通信有限公司 一种降低移动终端功耗的方法及移动终端
CN107277255A (zh) * 2017-06-28 2017-10-20 维沃移动通信有限公司 一种闹钟控制方法及移动终端
CN107708187A (zh) * 2017-09-12 2018-02-16 北京小米移动软件有限公司 睡眠模式的控制方法及装置
WO2018171236A1 (zh) * 2017-03-22 2018-09-27 中兴通讯股份有限公司 一种显示方法和终端
CN110198558A (zh) * 2019-05-09 2019-09-03 深圳市万普拉斯科技有限公司 待机优化方法、装置、计算机设备和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102050945B1 (ko) * 2015-04-14 2019-12-02 후아웨이 테크놀러지 컴퍼니 리미티드 단말기 제어 방법 및 장치, 그리고 단말기
CN106502371A (zh) * 2016-11-08 2017-03-15 珠海市魅族科技有限公司 一种省电控制方法以及装置
CN108536269A (zh) * 2018-03-26 2018-09-14 上海康斐信息技术有限公司 一种降低终端待机功耗的方法及其系统
CN109222950B (zh) * 2018-10-19 2021-08-06 深圳和而泰数据资源与云技术有限公司 数据处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095059A (zh) * 2016-06-08 2016-11-09 维沃移动通信有限公司 一种降低移动终端功耗的方法及移动终端
WO2018171236A1 (zh) * 2017-03-22 2018-09-27 中兴通讯股份有限公司 一种显示方法和终端
CN107277255A (zh) * 2017-06-28 2017-10-20 维沃移动通信有限公司 一种闹钟控制方法及移动终端
CN107708187A (zh) * 2017-09-12 2018-02-16 北京小米移动软件有限公司 睡眠模式的控制方法及装置
CN110198558A (zh) * 2019-05-09 2019-09-03 深圳市万普拉斯科技有限公司 待机优化方法、装置、计算机设备和存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904993A (zh) * 2021-03-16 2021-06-04 北京小米移动软件有限公司 屏幕控制方法、装置及存储介质
CN114326427A (zh) * 2021-12-29 2022-04-12 Tcl家用电器(合肥)有限公司 一种智能设备的控制方法、装置、智能设备及存储介质
CN114630404A (zh) * 2022-03-15 2022-06-14 北京小米移动软件有限公司 终端设备控制方法、装置、存储介质以及终端设备
CN117692998A (zh) * 2023-07-27 2024-03-12 荣耀终端有限公司 休眠异常情况下的数据获取方法和电子设备

Also Published As

Publication number Publication date
CN110198558B (zh) 2022-07-12
CN110198558A (zh) 2019-09-03

Similar Documents

Publication Publication Date Title
WO2020224658A1 (zh) 待机优化方法、装置、计算机设备和存储介质
JP5734505B2 (ja) ポータブルコンピューティングデバイスのマルチコアプロセッサにおける複数のコアへの電力を動的に制御するための方法およびシステム
JP5834366B2 (ja) 節電方法、装置および通信端末
WO2016041468A1 (zh) 一种唤醒方法、装置及终端
JP2015525047A (ja) 省電力を制御する方法及びデバイス
CN103345415B (zh) 管理定时器的终端节能方法和装置
WO2016095353A1 (zh) 终端功耗的控制方法及装置、终端
CN107491160A (zh) 一种双操作系统的使用方法、存储设备及智能终端
WO2017101362A1 (zh) 一种智能终端的功耗管控方法及系统
CN110032266B (zh) 信息处理方法、装置、计算机设备和计算机可读存储介质
WO2019047924A1 (zh) 终端及其耗电控制方法、装置、计算机可读存储介质
CN103338312A (zh) 一种智能手机睡眠节电系统及方法
WO2014190619A1 (zh) 一种移动终端功耗的管控装置及方法、移动终端
CN112235742A (zh) NB-IoT通讯模组内嵌程序的燃气表及数据处理方法
WO2016045525A1 (zh) 终端状态的处理方法及装置
CN104023147A (zh) 一种可使移动终端稳定休眠的方法及系统
CN103338300B (zh) 一种快速进入与退出休眠模式的方法及移动终端
US20160071480A1 (en) Low-power operation method and associated electronic device
CN110543333B (zh) 针对处理器的休眠处理方法、装置、移动终端和存储介质
CN110602772A (zh) WiFi模块控制方法、控制装置、电子装置及存储介质
CN110018885B (zh) 应用程序冻结方法、装置、存储介质和终端
CN107402626A (zh) 应用周期同步管理方法、装置、存储介质及电子设备
WO2016110056A1 (zh) 一种终端及终端省电的方法
CN103257894A (zh) 一种管理程序的方法及电子终端
WO2018137383A1 (zh) 屏幕显示方法及装置、终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20803036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20803036

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20803036

Country of ref document: EP

Kind code of ref document: A1