Timer management method and device, electronic equipment and storage medium
Through the timer management method, timers insensitive to triggering time in the background application are identified and stopped, which solves the problem of increased system power consumption caused by frequent timers triggering and improves the battery life of electronic devices.
Patent Information
- Application Number
- CN202310980732.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-14
AI Technical Summary
With the increase of applications in electronic devices, the trigger frequency of timers increases, resulting in the system being continuously awakened, increasing system power consumption and affecting the battery life of electronic devices.
A timer management method is provided to determine a target timer that meets the preset conditions (i.e., a timer that is insensitive to the trigger time) by obtaining a timer associated with an application running in the background, and stopping its triggering.
By stopping the triggering of a timer that is insensitive to the trigger time, the number of times the system is awakened is reduced, the system power consumption is reduced, and the battery life of electronic devices is enhanced.
Smart Images

Figure CN119440215A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of device power consumption, and in particular to a timer management method, device, electronic device and storage medium. Background Art
[0002] In order to process business at a certain time, many applications will set a timer to trigger when it arrives. With the increase of applications installed in electronic devices, more and more timers are triggered. Each time a timer is triggered, the system of the electronic device will be awakened, causing the system to be awakened continuously, resulting in increased system power consumption and affecting the battery life of the electronic device. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a timer management method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a timer management method is provided, the method comprising:
[0005] Acquire at least one timer associated with a first application, where the first application is an application running in the background;
[0006] Determine at least one target timer among the at least one timer that satisfies a preset condition, where the preset condition is a condition for characterizing that the timer is insensitive to a trigger time;
[0007] Stop triggering the at least one target timer.
[0008] In some embodiments, the determining at least one target timer among the at least one timer that satisfies a preset condition comprises:
[0009] Respectively obtain the type of the setting interface called by each timer;
[0010] Based on the type of the setting interface called by each of the timers, a timer that meets the preset condition is determined as the target timer.
[0011] In some embodiments, determining the timer that meets the preset condition as the target timer based on the type of the setting interface called by each timer includes:
[0012] When the setting interface called by the timer belongs to the first type or the second type, the timer is determined to be a target timer that meets the preset conditions, wherein the first type of setting interface is applied to a single-triggered timer, and the second type of setting interface is applied to a periodically triggered timer.
[0013] In some embodiments, the determining, based on the type of the setting interface called by each of the timers, a timer that meets the preset condition as the target timer further includes:
[0014] When the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, the timer is determined to be a target timer that meets the preset conditions, and the third type of setting interface is applied to the timer that is triggered on time based on the preset time point.
[0015] In some embodiments, the determining at least one target timer among the at least one timer that satisfies a preset condition comprises:
[0016] When the application type of the first application is a preset application type, it is determined that the at least one timer is a target timer that meets a preset condition, and the application program of the preset application type is not perceptible to the user when running in the background.
[0017] In some embodiments, the determining at least one target timer among the at least one timer that satisfies a preset condition comprises:
[0018] For each of the timers, when a triggering event of the timer belongs to a preset event type, the timer is determined to be a target timer that meets the preset condition, and the triggering event of the preset event type is an event that is not perceptible to the user.
[0019] In some embodiments, the method further comprises:
[0020] Determine the time sensitivity of each of the at least one timer, where the time sensitivity of the timer is used to indicate whether the timer is sensitive to a trigger time;
[0021] Determining a resource usage status of the first application, where the resource usage status is used to indicate whether an operation performed by the first application is an operation perceivable by a user;
[0022] The determining at least one target timer among the at least one timer that satisfies a preset condition includes:
[0023] The target timer that meets the preset condition among the at least one timer is determined according to the time sensitivity of each timer and the resource usage status of the first application.
[0024] In some embodiments, the determining at least one target timer among the at least one timer that satisfies a preset condition comprises:
[0025] When the state of the first application is a controlled state, the step of determining the target timer among the at least one timer that meets the preset condition is performed, and the controlled state is a state that allows the timer associated with the application to stop being triggered.
[0026] In some embodiments, after stopping triggering the at least one target timer, the method further includes:
[0027] When the state of the first application is a control-released state, the target timer is triggered based on the triggering time of the target timer, and the control-released state is a state that allows the timer associated with the application to be triggered.
[0028] In some embodiments, the method further comprises:
[0029] When the first application does not create a wake-up lock, determining that the state of the first application is the managed state;
[0030] When the first application creates the wake-up lock, it is determined that the state of the first application is the released control state.
[0031] In some embodiments, the stopping triggering the at least one target timer comprises:
[0032] Move the event information of at least one target timer from the first timer queue to the second timer queue, the first timer queue is used to store the event information of the timer to be triggered, and the second timer queue is used to store the event information of the timer that is not triggered, and the event information of the timer includes the trigger time, trigger application and trigger event corresponding to the timer.
[0033] In some embodiments, after stopping triggering the at least one target timer, the method further includes:
[0034] When the timer associated with the first application is allowed to be triggered, determining whether the target timer in the second timer queue reaches a trigger time;
[0035] When the target timer reaches the trigger time, sending the trigger event of the target timer to the first application; or,
[0036] When the target timer does not reach the trigger time, the event information of the target timer is moved from the second timer queue to the first timer queue.
[0037] In some embodiments, the method further comprises:
[0038] When the system of the electronic device is in a dormant state, waking up the system to put the system in an awake state;
[0039] The sending the triggering event of the target timer to the first application includes:
[0040] When the system is in the awake state, a trigger event of the target timer is sent to the first application.
[0041] According to a second aspect of an embodiment of the present disclosure, a timer management device is provided, the device comprising:
[0042] A timer acquisition module is configured to acquire at least one timer associated with a first application, where the first application is an application running in the background;
[0043] A timer management module, configured to determine at least one target timer among the at least one timer that satisfies a preset condition, wherein the preset condition is a condition for characterizing that the timer is insensitive to a trigger time;
[0044] The timer management module is further configured to stop triggering the at least one target timer.
[0045] In some embodiments, the timer management module is configured to:
[0046] Respectively obtain the type of the setting interface called by each timer;
[0047] Based on the type of the setting interface called by each of the timers, a timer that meets the preset condition is determined as the target timer.
[0048] In some embodiments, the timer management module is configured to:
[0049] When the setting interface called by the timer belongs to the first type or the second type, the timer is determined to be a target timer that meets the preset conditions, wherein the first type of setting interface is applied to a single-triggered timer, and the second type of setting interface is applied to a periodically triggered timer.
[0050] In some embodiments, the timer management module is configured to:
[0051] When the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, the timer is determined to be a target timer that meets the preset conditions, and the third type of setting interface is applied to the timer that is triggered on time based on the preset time point.
[0052] In some embodiments, the timer management module is configured to:
[0053] When the application type of the first application is a preset application type, it is determined that the at least one timer is a target timer that meets a preset condition, and the application program of the preset application type is not perceptible to the user when running in the background.
[0054] In some embodiments, the timer management module is configured to:
[0055] For each of the timers, when a triggering event of the timer belongs to a preset event type, the timer is determined to be a target timer that meets the preset condition, and the triggering event of the preset event type is an event that is not perceptible to the user.
[0056] In some embodiments, the apparatus further comprises:
[0057] A state detection module is configured to determine the time sensitivity of each of the at least one timer, wherein the time sensitivity of the timer is used to indicate whether the timer is sensitive to a trigger time;
[0058] The state detection module is further configured to determine a resource usage state of the first application, wherein the resource usage state is used to indicate whether an operation performed by the first application is an operation perceivable by a user;
[0059] The timer management module is configured as follows:
[0060] The target timer that meets the preset condition among the at least one timer is determined according to the time sensitivity of each timer and the resource usage status of the first application.
[0061] In some embodiments, the timer management module is configured to:
[0062] When the state of the first application is a controlled state, the step of determining the target timer among the at least one timer that meets the preset condition is performed, and the controlled state is a state that allows the timer associated with the application to stop being triggered.
[0063] In some embodiments, the timer management module is further configured to:
[0064] When the state of the first application is a control-released state, the target timer is triggered based on the triggering time of the target timer, and the control-released state is a state that allows the timer associated with the application to be triggered.
[0065] In some embodiments, the apparatus further comprises:
[0066] a state determination module, configured to determine that the state of the first application is the managed state when the first application does not create a wake-up lock;
[0067] The state determination module is further configured to determine that the state of the first application is the released control state when the first application creates the wake-up lock.
[0068] In some embodiments, the timer management module is further configured to:
[0069] Move the event information of at least one target timer from the first timer queue to the second timer queue, the first timer queue is used to store the event information of the timer to be triggered, and the second timer queue is used to store the event information of the timer that is not triggered, and the event information of the timer includes the trigger time, trigger application and trigger event corresponding to the timer.
[0070] In some embodiments, the timer management module is further configured to:
[0071] When the timer associated with the first application is allowed to be triggered, determining whether the target timer in the second timer queue reaches a trigger time;
[0072] When the target timer reaches the trigger time, sending the trigger event of the target timer to the first application; or,
[0073] When the target timer does not reach the trigger time, the event information of the target timer is moved from the second timer queue to the first timer queue.
[0074] In some embodiments, the apparatus further comprises:
[0075] A system awakening module, configured to awaken the system when the system of the electronic device is in a dormant state, so that the system is in an awake state;
[0076] The timer management module is further configured to:
[0077] When the system is in the awake state, a trigger event of the target timer is sent to the first application.
[0078] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0079] processor;
[0080] a memory for storing processor-executable instructions;
[0081] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0082] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.
[0083] The above method of the present disclosure has the following beneficial effects:
[0084] The method provided by the embodiment of the present disclosure determines at least one target timer that meets a preset condition from at least one timer associated with the first application, the preset condition being a condition used to characterize that the timer is not sensitive to the trigger time, and then stops triggering the target timer. By stopping triggering the timer that is not sensitive to the trigger time, the number of times the system is awakened is reduced without affecting the service of the first application, thereby reducing system power consumption and enhancing the battery life of the electronic device.
[0085] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0087] Figure 1 is a flow chart showing a timer management method according to an exemplary embodiment;
[0088] Figure 2 is a flow chart showing another timer management method according to an exemplary embodiment;
[0089] Figure 3 is a flow chart showing another timer management method according to an exemplary embodiment;
[0090] Figure 4 is a flow chart showing another timer management method according to an exemplary embodiment;
[0091] Figure 5 is a flow chart showing another timer management method according to an exemplary embodiment;
[0092] Figure 6 is a schematic diagram showing a timer management framework according to an exemplary embodiment;
[0093] Figure 7 is a block diagram of a timer management device according to an exemplary embodiment;
[0094] Figure 8It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0095] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0096] In order to process business at a certain time point, many applications will set a timer to trigger when it arrives. Timer types include non-wake-up type and wake-up type. The non-wake-up type means that when the system is not in sleep mode, the application can be triggered to process business when the timer trigger time is reached. After the system is in sleep mode, if the system is still in sleep mode when the timer trigger time is reached, the application will not be triggered to process business. The wake-up type means that the timer is set in the chip, and the system is awakened by the chip when the timer trigger time is reached, ensuring that the system is awakened at the trigger time. Even if the system is in sleep mode, it can be interrupted by the timer to wake up the system, so that the application can process business at the trigger time.
[0097] As more and more applications are installed in electronic devices, more and more timers are triggered. Due to the business needs or keep-alive needs of applications, the triggering times of multiple timers of different applications are distributed at multiple time points, causing the system to be constantly woken up, thereby increasing system power consumption and affecting the battery life of electronic devices.
[0098] In the related art, in order to reduce the number of system wake-up times, multiple timers with close triggering times are triggered at the same time point. However, when the triggering time of the timer is large and the distribution is relatively scattered, this method only reduces the number of system wake-up times to a certain extent, and the system power consumption is still large.
[0099] The method provided by the embodiment of the present disclosure takes into account that some timers are not sensitive to trigger time, that is, even if some timers are not triggered after the trigger time is reached, it has no impact on the business of the application or the user experience. Therefore, by stopping the triggering of timers that are not sensitive to trigger time, the number of times the system is awakened is greatly reduced without affecting the business of the application, the system power consumption is reduced, and the battery life of the electronic device is enhanced.
[0100] The method provided in the embodiments of the present disclosure can be applied in a variety of scenarios:
[0101] For example, it is applied to the scenario where the application synchronizes the application server content too regularly. In order to meet business needs, the application synchronizes with the application server every once in a while to update the latest content. When the application is running in the foreground, timely synchronization of the latest content is a necessary requirement for users and applications. However, when the application is running in the background, the application is not perceptible to the user, and the user experience is not strong, so there is no need to update the content in time. In this case, synchronizing and updating the latest content will consume system power and occupy device resources. For the timer associated with this application and used to synchronize the application server content, it can be determined that the timer is not a time-insensitive timer. For this scenario, in order to reduce system power consumption, the method provided by the embodiment of the present disclosure can be used. When the application is running in the background, the timer is suspended. When the application is restored to the foreground, the timer is released to resume the function of the timer. When the trigger time is reached, the timer is triggered to update the latest content.
[0102] Another example is applied to the scenario where an application triggers a timer to keep the application alive. When the application is running in the background, it faces the problem of being closed due to system memory pressure, but the application hopes to be able to run in the background all the time. Therefore, the application sets a timer, and sets the next timer when the timer is triggered. That is, when the application is closed, when the timer reaches the trigger time, the system will start the application to process the trigger event of the timer, thereby ensuring that the application can always run in the background. For this scenario, in order to reduce system power consumption, the method provided in the embodiment of the present disclosure can be adopted. When the application is running in the background, the timer associated with the application is suspended, so that the timer will only be triggered when the application is running in the foreground.
[0103] The method provided in the embodiment of the present disclosure is executed by an electronic device, which may be a mobile phone, a tablet computer, a laptop computer, a wearable device, a smart home device, a vehicle-mounted terminal, or other electronic device on which an application program can be installed.
[0104] Figure 1 is a flowchart of a timer management method according to an exemplary embodiment, which is executed by an electronic device, see Figure 1 , the method comprises the following steps:
[0105] Step S101, obtaining at least one timer associated with a first application, where the first application is an application running in the background.
[0106] When an application is running in the foreground, the user can see the content related to the application through the display interface. In this case, if some timers associated with the application are stopped from being triggered, the user can clearly perceive it, which affects the user's experience. When the application is running in the background, for most applications, the user cannot see the content related to the application through the display interface. Therefore, the embodiment of the present disclosure manages the timers associated with the applications running in the background. The first application is any application installed in the electronic device and running in the background.
[0107] The at least one timer associated with the first application refers to: a timer set for the first application. The type of the timer may be a non-awakening type or an awakening type.
[0108] Step S102: determining at least one target timer that satisfies a preset condition among at least one timer, where the preset condition is a condition for indicating that the timer is insensitive to the trigger time.
[0109] In order to reduce the number of timers that are triggered on time and the number of system wake-ups, a target timer that meets a preset condition is selected from at least one timer. The preset condition is a condition used to characterize that the timer is not sensitive to the trigger time. That is, a target timer that is not sensitive to the trigger time is selected from at least one timer. Among them, being not sensitive to the trigger time means that even if the timer is not triggered at the corresponding trigger time, it will not affect the user's use.
[0110] Step S103: stop triggering at least one target timer.
[0111] For a determined target timer, stop triggering at least one target timer, that is, suspend at least one target timer so that the target timer does not trigger after reaching the corresponding trigger time, thereby reducing the number of triggered timers and reducing the number of times the system is awakened.
[0112] The method provided by the embodiment of the present disclosure determines at least one target timer that meets a preset condition from at least one timer associated with the first application, the preset condition being a condition used to characterize that the timer is not sensitive to the trigger time, and then stops triggering the target timer. By stopping the triggering of the timer that is not sensitive to the trigger time, the number of times the system is awakened is reduced without affecting the business of the first application, thereby reducing the system power consumption and enhancing the endurance of the electronic device. In addition, the probability of the use of the CPU (Central Processing Unit) by the application running in the background can also be reduced.
[0113] In some embodiments, the target timer is determined according to the type of the timer setting interface. Figure 2The embodiment shown illustrates this:
[0114] Figure 2 is a flowchart of another timer management method according to an exemplary embodiment, which is executed by an electronic device, see Figure 2 , the method comprises the following steps:
[0115] Step S201: Acquire at least one timer associated with a first application.
[0116] The first application is an application program running in the background. At least one timer associated with the first application is a set timer, and obtaining the timer associated with the first application means: determining the set timer associated with the first application.
[0117] In some embodiments, at least one timer associated with the first application is stored in a first timer queue, and the first timer queue is used to store event information of the timer to be triggered. The event information of the timer includes the trigger time corresponding to the timer, the trigger application and the trigger event. The trigger time can be a specific time point or the time when the timing corresponding to the timer ends. The trigger application is the application associated with the timer, and the trigger event is the operation to be executed by the trigger application. The event information of different timers is different.
[0118] In some embodiments, a setting interface is used to set a timer, and the types of the setting interface include a first type, a second type, and a third type, wherein the first type of setting interface is applied to a single-trigger timer, that is, the trigger time of the timer using the first type of setting interface is a fixed time point, the second type of setting interface is applied to a periodically triggered timer, that is, the trigger time of the timer using the second type of setting interface is a periodic multiple time points, and the third type of setting interface is applied to a timer that is triggered on time based on a preset time point, that is, the trigger time of the timer using the third type of setting interface is a preset time point, and the preset time point can be one time point or multiple time points. For example, the timer using the first type of setting interface is: a timer for reminding to perform an operation at a certain time point, etc.; the timer using the second type of setting interface is: a timer for periodically synchronizing the content of the application server, a timer for indicating the periodic display of notification information; the timer using the third type of setting interface is: a timer for reminding to play an alarm at a certain time point, a timer for keeping a third-party application alive, etc.
[0119] Step S202: Obtain the type of the setting interface of each timer respectively.
[0120] Step S203: Based on the type of the setting interface called by each timer, a timer that meets a preset condition is determined as a target timer.
[0121] In the embodiment of the present disclosure, taking into account the different types of setting interfaces, the set timers have different sensitivities to time, wherein the timer using the third type of setting interface is expected to be triggered on time, while the timer using the first type of setting interface and the timer using the second type of setting interface do not have high requirements for the punctuality of the triggering time. Therefore, the type of the setting interface called by each timer is obtained respectively, and based on the type of the setting interface called by each timer, the timer that meets the preset conditions is determined as the target timer.
[0122] In some embodiments, the electronic device records information about the type of the setting interface of each timer, and obtains the type of the setting interface called by each timer from the recorded information.
[0123] In some embodiments, when the setting interface called by the timer belongs to the first type or the second type, the timer is determined to be a target timer that meets the preset condition. Since the timers using the first type and the second type of setting interface do not have high requirements for the punctuality of the trigger time, that is, the timers using the first type and the second type of setting interface are not sensitive to the trigger time, even if the timer is not triggered after the trigger time is reached, it will not affect the user, so such a timer is determined as a target timer. In this case, the preset condition is that the setting interface called by the timer belongs to the first type or the second type.
[0124] In some embodiments, when the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, the timer is determined to be a target timer that meets the preset conditions. Although the timer using the third type of setting interface has a higher requirement for the punctuality of time, if a relatively large number of timers with the same function are set using the third type of setting interface, the timer will be triggered multiple times, and the power consumed by triggering the timer will also be relatively large. At this time, it can be considered that the third type of setting interface is abused. Therefore, such a timer is determined to be a target timer that meets the preset conditions. In this case, the preset condition is that the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power.
[0125] Among them, the power consumed by triggering the timer refers to: the sum of the power consumed by triggering the timer with the same function within the preset duration; the preset power is the pre-set power; when the power consumed by triggering the timer is greater than the preset power, it can be considered that more power is currently consumed due to the timer triggering, and it is necessary to stop triggering the timer to save power.
[0126] Step S204: stop triggering at least one target timer.
[0127] For a determined target timer, stop triggering the target timer, that is, suspend the target timer so that the target timer does not trigger after reaching the corresponding trigger time.
[0128] The method provided in the embodiment of the present disclosure determines at least one target timer that meets a preset condition from at least one timer associated with the first application according to the type of the setting interface called by the timer, and then stops triggering the target timer. By stopping triggering timers that are not sensitive to the trigger time, the number of times the system is awakened is reduced without affecting the service of the first application, thereby reducing system power consumption and enhancing the battery life of the electronic device.
[0129] In some embodiments, other implementations may be used to determine the target timer. The process of determining the target timer using other implementations is described below:
[0130] In some embodiments, the target timer is determined according to the application type. When the application type of the first application is a preset application type, it is determined that at least one timer is a target timer that meets the preset conditions. Among them, the application of the preset application type is not perceptible to the user when it is running in the background. For example, the application of the preset application type is a browser, a video playback application, a payment application, etc. When the application type of the first application is a preset application type, the user is not perceptible when the first application is running in the background. Then, when the first application is running in the background, even if the timer associated with the first application is not triggered, it does not affect the user's experience. Therefore, the timer associated with the first application can be determined as the target timer.
[0131] Optionally, the target timer is determined based on the application type and whether there is a user-required function when the application is running in the background. When the application type of the first application is a preset application type and there is no user-required function when the first application is running in the background, it is determined that at least one timer is a target timer that meets the preset conditions. The user-required function may be an audio playback function, a navigation function, etc., while a news browsing function, a video playback function, a payment function, etc. are not user-required functions.
[0132] In some embodiments, the target timer is determined according to the event type to which the triggering event of the timer belongs. For each timer, when the triggering event of the timer belongs to a preset event type, the timer is determined to be a target timer that meets the preset conditions. The triggering event of the preset event type is an event that is not perceptible to the user, for example, the triggering event is synchronization of content from an application server or other events that are not perceptible to the user.
[0133] In some embodiments, the time sensitivity of each timer in at least one timer is determined, the resource usage status of the first application is determined, and the target timer in at least one timer that meets the preset conditions is determined according to the time sensitivity of each timer and the resource usage status of the first application. The time sensitivity of the timer is used to characterize whether the timer is sensitive to the trigger time, and the resource usage status is used to characterize whether the operation performed by the first application is a user-perceivable operation. For example, when the first application uses audio resources and navigation resources, the resource usage status characterizes that the operation performed by the first application is a user-perceivable operation.
[0134] When the time sensitivity of the timer indicates that the timer is not sensitive to the trigger time, and the resource usage status indicates that the operation performed by the first application is not perceptible to the user, the timer is determined to be a target timer; and when the time sensitivity of the timer indicates that the timer is sensitive to the trigger time, and / or the resource usage status indicates that the operation performed by the first application is perceptible to the user, the timer is not determined to be a target timer.
[0135] Optionally, determining the time sensitivity of the timer includes: determining the time sensitivity according to the type of the setting interface of the timer, that is, when the setting interface called by the timer belongs to the first type or the second type, and the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, determining that the timer is insensitive to the triggering time.
[0136] Optionally, determining the resource usage status of the first application includes: determining the resource usage status according to the application type of the first application, that is, when the application type of the first application is a preset application type, determining that the operation performed by the first application is not perceptible to the user. It should be noted that the resource usage status refers to the resource usage status of the application when it is running in the background.
[0137] It should be noted that the above-mentioned implementation methods for determining the target timer can be combined with each other.
[0138] In some embodiments, timers are managed by storing timers that can be triggered and timers that cannot be triggered in different timer queues. Figure 3 The illustrated embodiment illustrates this.
[0139] Figure 3 is a flowchart of another timer management method according to an exemplary embodiment, which is executed by an electronic device, see Figure 3 , the method comprises the following steps:
[0140] Step S301: Acquire at least one timer associated with a first application.
[0141] The implementation of step S301 refers to the above step S201 and will not be described in detail here.
[0142] Step S302: determining at least one target timer that meets a preset condition among at least one timer.
[0143] The implementation method of determining the target timer in step S302 refers to the above implementation method and will not be described in detail here.
[0144] Step S303: Move event information of at least one target timer from the first timer queue to the second timer queue.
[0145] In the disclosed embodiment, the first timer queue is used to store the event information of the timer to be triggered, and the timer stored in the first timer queue will be triggered after reaching the trigger time, and the second timer queue is used to store the event information of the timer not to be triggered, and the timer stored in the second timer queue will not be triggered after reaching the trigger time. Therefore, by moving the event information of the target timer from the first timer queue to the second timer queue, the triggering of the target timer is stopped.
[0146] Step S304: when the timer associated with the first application is allowed to be triggered, it is determined whether the target timer in the second timer queue reaches the trigger time.
[0147] The target timer stored in the second timer queue is not allowed to be triggered, and when the timer associated with the first application is allowed to be triggered, the condition of allowing the timer associated with the first application to be triggered is given priority, that is, the target timer in the second timer queue can be triggered.
[0148] In the disclosed embodiment, corresponding operations are performed according to whether the target timer reaches the trigger time. When the target timer reaches the trigger time, step S305 is performed; when the target timer does not reach the trigger time, step S306 is performed.
[0149] Step S305: When the target timer reaches the trigger time, a trigger event of the target timer is sent to the first application.
[0150] When the target timer reaches the trigger time, the target timer needs to be triggered, that is, a trigger event of the target timer is sent to the first application, so that the first application executes an operation corresponding to the trigger event.
[0151] In some embodiments, the trigger timer needs to be executed when the system of the electronic device is in an awake state. Therefore, when the system of the electronic device is in a sleep state, the system is woken up to put the system in an awake state; then when the system is in an awake state, a trigger event of the target timer is sent to the first application to ensure that the trigger event of the target timer can be executed normally.
[0152] It should be noted that if the target timer is triggered again after a period of time after being triggered this time, then while sending the trigger event of the target timer to the first application, the event information of the target timer needs to be saved in the first timer queue so that the target timer can be triggered the next time the target timer reaches the trigger time.
[0153] Step S306: When the target timer has not reached the trigger time, the event information of the target timer is moved from the second timer queue to the first timer queue.
[0154] When the target timer has not reached the trigger time, it is not necessary to trigger the target timer temporarily. However, after reaching the trigger time, the target timer needs to be triggered. Therefore, the event information of the target timer is moved from the second timer queue to the first timer queue.
[0155] It should be noted that, after the event information of the target timer is moved from the second timer queue to the first timer queue, it can continue to be managed based on the implementation method of the above steps S302-S306, that is, the above steps can be repeatedly executed for the timers saved in the first timer queue. Optionally, it is periodically determined whether the event information of the timer in the first timer queue needs to be moved to the second timer queue.
[0156] The method provided by the embodiment of the present disclosure determines at least one target timer that meets the preset conditions from at least one timer associated with the first application, and then stops triggering the target timer. By stopping the triggering of timers that are not sensitive to the triggering time, the number of times the system is awakened is reduced without affecting the business of the first application, thereby reducing system power consumption and enhancing the battery life of the electronic device. Moreover, when the timer associated with the first application is allowed to be triggered, the target timer can also be triggered again, and the timer can be managed according to actual needs, so that when the timer needs to be triggered, it can be triggered normally, and when it does not need to be triggered, it can stop triggering. It has good flexibility and can better meet user needs while reducing system power consumption and enhancing the battery life of electronic devices.
[0157] In some embodiments, it can be determined whether the timer associated with the application needs to be managed according to the state of the application. Figure 4 The embodiment shown illustrates this:
[0158] Figure 4 is a flowchart of another timer management method according to an exemplary embodiment, which is executed by an electronic device, see Figure 4 , the method comprises the following steps:
[0159] Step S401: Acquire at least one timer associated with a first application.
[0160] The implementation of step S401 refers to the above step S201 and will not be described in detail here.
[0161] Step S402: When the state of the first application is a managed state, determine a target timer that meets a preset condition among at least one timer.
[0162] In the disclosed embodiment, in order not to affect the user experience when managing the timer, it is determined whether to manage the timer associated with the application according to the state of the application, that is, when the state of the first application is a controlled state, the target timer that meets the preset conditions in at least one timer is determined. The state of the application can be divided into a controlled state and a decontrolled state, wherein the controlled state is a state that allows the timer associated with the application to stop triggering, and the decontrolled state is a state that allows the timer associated with the application to be triggered. Optionally, the decontrolled state can be called an active state.
[0163] In some embodiments, the state of the application is determined based on whether the application has created a wake-up lock. When the first application has not created a wake-up lock, the state of the first application is determined to be a controlled state. When the first application has created a wake-up lock, the state of the first application is determined to be a released control state.
[0164] In some embodiments, the state of the application is determined according to whether the application is running in the foreground or in the background. When the first application is running in the background, the state of the first application is determined to be a controlled state. When the first application is running in the background, the state of the first application is determined to be a released control state.
[0165] Step S403: stop triggering at least one target timer.
[0166] The implementation of step S403 refers to the above-mentioned step S204 and step S303, which will not be described in detail here.
[0167] Step S404: When the state of the first application is the control-released state, trigger the target timer based on the trigger time of the target timer.
[0168] If the first application is always in a controlled state, the target timer cannot be triggered after the target timer is stopped from being triggered, until the state of the first application changes to a released control state, and then the target timer is triggered based on the triggering time of the target timer.
[0169] The method provided by the embodiment of the present disclosure determines a target timer that meets a preset condition from the timers associated with the first application when the state of the first application is a controlled state, and then stops triggering the target timer until the state of the first application changes to a released control state, and then triggers the target timer based on the trigger time of the target timer. Managing the timer according to the state of the application can reduce system power consumption and enhance the endurance of the electronic device without affecting the user experience.
[0170] It should be noted that in the above implementation, only the triggering of the target timer is explained. In another embodiment, for the timer that is not determined as the target timer, that is, for the timer in the first timer queue, multiple timers with relatively close triggering times can still be triggered at the same time point to reduce the number of times the timer in the first timer queue wakes up the system.
[0171] In some embodiments, the above embodiments may be combined as follows: Figure 5 The examples shown illustrate the combined implementation methods:
[0172] Figure 5 is a flowchart of another timer management method according to an exemplary embodiment, which is executed by an electronic device, see Figure 5 , the method comprises the following steps:
[0173] Step 1: Detect that the first application switches to background operation.
[0174] Step 2, determine whether there is a timer associated with the first application. If there is a timer associated with the first application, execute step 3. If there is no timer associated with the first application, terminate the execution.
[0175] Step 3, determine whether the first application is controlled. If the first application is controlled, execute step 4; if the first application is not controlled, terminate the execution.
[0176] The first application being controlled means that the state of the first application is a controlled state.
[0177] Step 4, determining whether the timer associated with the first application is sensitive to the trigger time, if the timer is sensitive to the trigger time, executing step 5, if the timer is not sensitive to the trigger time, ending the execution.
[0178] Step 5, suspend the target timer that is sensitive to the trigger time.
[0179] Step 6: Detect that the first application is released from control.
[0180] Step 7, determine whether the target timer reaches the corresponding trigger time, if it reaches the corresponding trigger time, execute step 8, if it does not reach the corresponding trigger time, execute step S9.
[0181] Step 8: Send a trigger event of the target timer to the first application.
[0182] Step 9: Return the target timer to the system timer queue list.
[0183] The system timer queue list is the first timer queue mentioned above.
[0184] In some embodiments, see Figure 6 The schematic diagram of the timer management framework shown in FIG. 1 includes an application layer, an application framework layer and a kernel layer.
[0185] The application layer includes applications installed on electronic devices. Figure 6 Take application A and application B as examples.
[0186] The application framework layer includes an application status detection module, an application control / decontrol module, and a timer module.
[0187] The application status detection module is used to detect the time sensitivity of the timer associated with the application, the foreground visibility of the application and the resource usage status. The foreground visibility is used to indicate whether the application is running in the foreground. The application status detection module is used to support the application control / de-control module.
[0188] The application control / decontrol module is used to control the resources of the application, and the resources of the application can be wake-up lock resources. Of course, the application control / decontrol module can also be used to manage other resources. In addition, the application control / decontrol module is also used to manage timers, and the timer management is managed through the timer module.
[0189] The timer module includes a timer control cache queue (second timer queue), a timer waiting queue (first timer queue), a timer policy management module, a timer sending module and a timer setting module. Among them, the timer setting module is used to set the timer associated with the application, the timer sending module is used to send the trigger time of the timer to the corresponding application, and the timer policy management module is used to manage the triggering method of the timer in the timer waiting queue. For example, according to multiple alignment time points, the timers in the timer waiting queue are aligned, that is, according to the trigger time of the timer, the timer is triggered at the alignment time point closest to the trigger time.
[0190] The kernel layer includes a timer module and a system power management module. The timer module in the kernel layer is different from the timer module in the application framework layer. The timer module in the kernel layer is used to set a to-be-triggered time to ensure that the system can be awakened after hibernation. The to-be-triggered time is the earliest time point among multiple aligned time points determined by the timer policy management module. The timer module in the kernel layer is also used to interrupt and wake up the system power management module to wake up the system. Then, the timer module in the kernel layer sends an indication to the timer module in the application framework layer so that the timer sending module can send the trigger time corresponding to the timer reaching the trigger time to the corresponding application for processing.
[0191] Figure 7 is a block diagram of a timer management device according to an exemplary embodiment, which is configured in an electronic device, see Figure 7 , the device comprises:
[0192] The timer acquisition module 701 is configured to acquire at least one timer associated with a first application, where the first application is an application running in the background;
[0193] The timer management module 702 is configured to determine at least one target timer that satisfies a preset condition among the at least one timer, where the preset condition is a condition for indicating that the timer is insensitive to the trigger time;
[0194] The timer management module 702 is further configured to stop triggering at least one target timer.
[0195] The device provided by the embodiment of the present disclosure determines at least one target timer that meets a preset condition from at least one timer associated with the first application, the preset condition being a condition for characterizing that the timer is not sensitive to the trigger time, and then stops triggering the target timer. By stopping triggering the timer that is not sensitive to the trigger time, the number of times the system is awakened is reduced without affecting the service of the first application, thereby reducing system power consumption and enhancing the endurance of the electronic device.
[0196] In some embodiments, the timer management module 702 is configured to:
[0197] Get the type of the setting interface called by each timer respectively;
[0198] Based on the type of the setting interface called by each timer, a timer that meets the preset conditions is determined as a target timer.
[0199] In some embodiments, the timer management module 702 is configured to:
[0200] When the setting interface called by the timer belongs to the first type or the second type, the timer is determined to be a target timer that meets the preset conditions, wherein the first type of setting interface is applied to a single-trigger timer, and the second type of setting interface is applied to a periodically triggered timer.
[0201] In some embodiments, the timer management module 702 is configured to:
[0202] When the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, the timer is determined to be a target timer that meets the preset conditions, and the third type of setting interface is applied to the timer that is triggered on time based on the preset time point.
[0203] In some embodiments, the timer management module 702 is configured to:
[0204] When the application type of the first application is a preset application type, it is determined that at least one timer is a target timer that meets a preset condition, and the user cannot perceive when the application program of the preset application type runs in the background.
[0205] In some embodiments, the timer management module 702 is configured to:
[0206] For each timer, when a triggering event of the timer belongs to a preset event type, the timer is determined to be a target timer that meets a preset condition, and the triggering event of the preset event type is an event that is not perceptible to the user.
[0207] In some embodiments, the apparatus further comprises:
[0208] A state detection module is configured to determine the time sensitivity of each timer of at least one timer, where the time sensitivity of the timer is used to indicate whether the timer is sensitive to the trigger time;
[0209] The state detection module is further configured to determine a resource usage state of the first application, where the resource usage state is used to characterize whether an operation performed by the first application is an operation perceivable by a user;
[0210] The timer management module 702 is configured to:
[0211] According to the time sensitivity of each timer and the resource usage status of the first application, a target timer that meets a preset condition in at least one timer is determined.
[0212] In some embodiments, the timer management module 702 is configured to:
[0213] When the state of the first application is a controlled state, a step of determining a target timer that meets a preset condition among at least one timer is performed, and the controlled state is a state that allows the timer associated with the application to stop being triggered.
[0214] In some embodiments, the timer management module 702 is further configured to:
[0215] When the state of the first application is a control-released state, the target timer is triggered based on the triggering time of the target timer. The control-released state is a state that allows the timer associated with the application to be triggered.
[0216] In some embodiments, the apparatus further comprises:
[0217] A state determination module, configured to determine that the state of the first application is a managed state when the first application does not create a wake-up lock;
[0218] The state determination module is further configured to determine that the state of the first application is a released control state when the first application creates a wake-up lock.
[0219] In some embodiments, the timer management module 702 is further configured to:
[0220] Move the event information of at least one target timer from the first timer queue to the second timer queue. The first timer queue is used to store the event information of the timer to be triggered, and the second timer queue is used to store the event information of the timer that is not triggered. The event information of the timer includes the trigger time, trigger application and trigger event corresponding to the timer.
[0221] In some embodiments, the timer management module 702 is further configured to:
[0222] When the timer associated with the first application is allowed to trigger, determining whether a target timer in the second timer queue reaches a trigger time;
[0223] When the target timer reaches the trigger time, sending the trigger event of the target timer to the first application; or,
[0224] When the target timer does not reach the trigger time, the event information of the target timer is moved from the second timer queue to the first timer queue.
[0225] In some embodiments, the apparatus further comprises:
[0226] The system awakening module is configured to awaken the system when the system of the electronic device is in a dormant state, so that the system is in an awake state;
[0227] The timer management module 702 is further configured to:
[0228] When the system is in the awake state, a trigger event of the target timer is sent to the first application.
[0229] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0230] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the timer management method in the above embodiment.
[0231] Figure 8 is a block diagram of an electronic device 800 according to an exemplary embodiment.
[0232] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0233] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0234] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0235] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0236] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0237] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0238] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0239] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0240] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0241] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0242] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0243] The embodiments of the present disclosure also provide a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the timer management method in the above embodiment.
[0244] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0245] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A timer management method, characterized in that: The method comprises: Acquire at least one timer associated with a first application, where the first application is an application running in the background; Determine at least one target timer among the at least one timer that satisfies a preset condition, where the preset condition is a condition for characterizing that the timer is insensitive to a trigger time; Stop triggering the at least one target timer.
2. The method according to claim 1, characterized in that The determining at least one target timer among the at least one timer that satisfies a preset condition includes: Respectively obtain the type of the setting interface called by each timer; Based on the type of the setting interface called by each of the timers, a timer that meets the preset condition is determined as the target timer.
3. The method according to claim 2, characterized in that The determining, based on the type of the setting interface called by each of the timers, a timer that meets the preset condition as the target timer includes: When the setting interface called by the timer belongs to the first type or the second type, the timer is determined to be a target timer that meets the preset conditions, wherein the first type of setting interface is applied to a single-triggered timer, and the second type of setting interface is applied to a periodically triggered timer.
4. The method according to claim 2, characterized in that: The determining, based on the type of the setting interface called by each of the timers, a timer that meets the preset condition as the target timer further includes: When the setting interface called by the timer belongs to the third type, and the power consumed by triggering the timer is greater than the preset power, the timer is determined to be a target timer that meets the preset conditions, and the third type of setting interface is applied to the timer that is triggered on time based on the preset time point.
5. The method according to claim 1, characterized in that: The determining at least one target timer among the at least one timer that satisfies a preset condition includes: When the application type of the first application is a preset application type, it is determined that the at least one timer is a target timer that meets a preset condition, and the application program of the preset application type is not perceptible to the user when running in the background.
6. The method according to claim 1, characterized in that The determining at least one target timer among the at least one timer that satisfies a preset condition includes: For each of the timers, when a triggering event of the timer belongs to a preset event type, the timer is determined to be a target timer that meets the preset condition, and the triggering event of the preset event type is an event that is not perceptible to the user.
7. The method according to claim 1, characterized in that The method further comprises: Determine the time sensitivity of each of the at least one timer, where the time sensitivity of the timer is used to indicate whether the timer is sensitive to a trigger time; Determining a resource usage status of the first application, where the resource usage status is used to indicate whether an operation performed by the first application is an operation perceivable by a user; The determining at least one target timer among the at least one timer that satisfies a preset condition includes: The target timer that meets the preset condition among the at least one timer is determined according to the time sensitivity of each timer and the resource usage status of the first application.
8. The method according to claim 1, characterized in that The determining at least one target timer among the at least one timer that satisfies a preset condition includes: When the state of the first application is a controlled state, the step of determining the target timer among the at least one timer that meets the preset condition is performed, and the controlled state is a state that allows the timer associated with the application to stop being triggered.
9. The method according to claim 8, characterized in that After stopping triggering the at least one target timer, the method further includes: When the state of the first application is a control-released state, the target timer is triggered based on the triggering time of the target timer, and the control-released state is a state that allows the timer associated with the application to be triggered.
10. The method according to claim 9, characterized in that The method further comprises: When the first application does not create a wake-up lock, determining that the state of the first application is the managed state; When the first application creates the wake-up lock, it is determined that the state of the first application is the released control state.
11. The method according to claim 1, characterized in that: The stopping triggering of the at least one target timer comprises: Move the event information of at least one target timer from the first timer queue to the second timer queue, the first timer queue is used to store the event information of the timer to be triggered, and the second timer queue is used to store the event information of the timer that is not triggered, and the event information of the timer includes the trigger time, trigger application and trigger event corresponding to the timer.
12. The method according to claim 11, characterized in that After stopping triggering the at least one target timer, the method further includes: When the timer associated with the first application is allowed to be triggered, determining whether the target timer in the second timer queue reaches a trigger time; When the target timer reaches the trigger time, sending the trigger event of the target timer to the first application; or, When the target timer does not reach the trigger time, the event information of the target timer is moved from the second timer queue to the first timer queue.
13. The method according to claim 12, characterized in that The method further comprises: When the system of the electronic device is in a dormant state, waking up the system to put the system in an awake state; The sending the triggering event of the target timer to the first application includes: When the system is in the awake state, a trigger event of the target timer is sent to the first application.
14. A timer management device, characterized in that: The device comprises: A timer acquisition module is configured to acquire at least one timer associated with a first application, where the first application is an application running in the background; A timer management module, configured to determine at least one target timer among the at least one timer that satisfies a preset condition, wherein the preset condition is a condition for characterizing that the timer is insensitive to a trigger time; The timer management module is further configured to stop triggering the at least one target timer.
15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 13.
16. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 13.
Citation Information
Patent Citations
Timer awakening control method and electronic equipment
CN105824391A
Power supply management method and system
CN106774792A
APP self-starting and stopping power-saving method, system, terminal device and storage medium
CN109343690A
Wake-up management method, timer management method, and terminal device
CN111226186A
Timer control method and device and communication equipment
CN115604536A