Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "comprises" and "comprising," along with any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application discloses a power consumption control method of a wearable device, the wearable device and a storage medium, which can save the non-perceived power consumption caused by the background execution service of a third party application and improve the battery endurance capacity of the wearable device. The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a first embodiment of a power consumption control method of a wearable device according to an embodiment of the present application. The wearable device may include a smart phone watch and other wearable electronic devices that may be provided with third party applications, which are not limited by the embodiments of the present application. As shown in fig. 1, the power consumption control method of the wearable device may include the steps of:
101. After a certain first application of the wearable device is switched from the foreground to the background, judging whether the wearable device is in a non-charging state, the first application does not belong to a system application and the first application is not in a preset white list, wherein the white list is used for recording applications allowing business logic to be executed in the background, if so, executing step 102 if the wearable device is in the non-charging state, the first application does not belong to the system application and the first application is not in the preset white list, otherwise, executing step 103.
In the embodiment of the present application, the first application may be any application running in the foreground of the wearable device, for example, any third party application, any system application, and the embodiment of the present application is not limited.
As an alternative embodiment, the wearable device may further perform the following steps before performing step 101:
the wearable device detects whether a wearer of the wearable device enters a sleep state, and if the wearer of the wearable device enters the sleep state, the first application which controls the foreground of the wearable device to currently run is switched to the background, so that the power consumption control of the wearable device can be automatically triggered when the wearer of the wearable device enters the sleep state, and the battery endurance of the wearable device can be improved.
Furthermore, after the wearable device detects that the wearer of the wearable device enters the sleep state, the wearable device can also detect the battery available time length of the wearable device, judge whether the average user sleep time length of the wearer of the wearable device exceeds the battery available time length of the wearable device, and if so, control the first application currently operated by the foreground of the wearable device to switch to the background, so that the power consumption control of the wearable device can be automatically triggered when the wearer of the wearable device enters the sleep state, the battery endurance capacity of the wearable device is improved, and the occurrence of the situation that the user wakes up to find that the wearable device is dead can be reduced.
Further, if it is determined that the average sleeping time length of the user of the wearable device does not exceed the available time length of the battery of the wearable device, the wearable device can identify whether the power consumption speed of the first application exceeds the specified speed threshold, and if so, the first application currently running in the foreground of the wearable device is controlled to switch to the background, so that the user can be provided with as much available electric quantity as possible after awakening.
For example, the wearable device may have both a heart rate sensor and an attitude sensor built in, and accordingly, the wearable device may detect heart rate data of the wearer through the heart rate sensor, and when determining that the wearer is in a sleep state by analyzing the heart rate data, the wearable device may further detect whether the amount of movement of the wearer has not changed for a specified period of time (e.g., 15 minutes) through the attitude sensor, and if so, determine that the wearer is in the sleep state. Obviously, such an embodiment may significantly improve the accuracy of determining that the user wearing the wearable device is in a sleep state.
As another alternative embodiment, the wearable device may also perform the following steps before performing step 101:
when the wearable device detects that a login account (such as a social account) of a first application currently running in a foreground of the wearable device is logged in the same application of other devices, the first application currently running in the foreground of the wearable device is controlled to be switched to a background, so that power consumption control of the wearable device can be automatically triggered when the login account of the first application is logged in the same application of the other devices, and battery cruising ability of the wearable device can be improved.
Furthermore, when the wearable device detects that the login account (such as a social account) of the first application currently running in the foreground is logged in on the same application of the other devices, the wearable device can further detect whether the login account is set with information synchronization, and if the login account is not set with information synchronization, the first application currently running in the foreground of the wearable device is controlled to be switched to the background.
102. The wearable device prohibits the first application from executing the service in the background and ends the process.
For example, the wearable device may prohibit the first application from holding a CPU lock in the background, prohibit the first application from accessing a network in the background, GPS, WIFI, bluetooth, sensor, audio, camera, etc., devices, and the like.
103. The wearable device allows the first application to execute the service in the background and ends the process.
For example, if the wearable device is in a charging state and/or the first application belongs to a system application and/or the first application is in a preset white list, the wearable device allows the first application to execute a service in the background, so that the core service function is not affected, such as system update, background download of a system update package and the like, that is, normal use of the core service function is not affected while power is saved, and therefore the embodiment of the application is more humanized and has higher feasibility.
In the method described in fig. 1, the purpose of saving power is achieved by prohibiting the first application from executing the service in the background, that is, the background application is prohibited from holding a CPU lock, prohibiting access to a network, GPS, WIFI, bluetooth, sensor, audio, camera and other devices, so that the purpose of saving power consumption caused by executing the service after the application is switched to the background is achieved, and the purpose of saving power and improving the battery endurance of the wearable device is achieved.
In addition, by means of not limiting system application and setting a white list, the method and the device for realizing the core application execution service in the background are realized, and the influence on the core function is avoided, so that the method and the device are more humanized and have higher feasibility.
Referring to fig. 2, fig. 2 is a flowchart of a second embodiment of a power consumption control method of a wearable device according to an embodiment of the present application. The wearable device may include a smart phone watch and other wearable electronic devices that may be provided with third party applications, which are not limited by the embodiments of the present application. As shown in fig. 2, the power consumption control method of the wearable device may include the steps of:
201. after a certain first application of the wearable device is switched from a foreground to a background, judging whether the wearable device is in a non-charging state, the first application does not belong to a system application and the first application is not in a preset white list, wherein the white list is used for recording applications allowing service execution in the background, if so, executing a step 202 if the wearable device is in the non-charging state, the first application does not belong to the system application and the first application is not in the preset white list, otherwise, executing a step 203.
202. The wearable device prohibits the first application from executing the service in the background and performs step 204.
203. The wearable device allows the first application to perform the business in the background and performs step 204.
For example, if the wearable device is in a charging state and/or the first application belongs to a system application and/or the first application is in a preset white list, the wearable device allows the first application to execute a service in the background, so that the core service function is not affected, such as system update, background download of a system update package and the like, that is, normal use of the core service function is not affected while power is saved, and therefore the embodiment of the application is more humanized and has higher feasibility.
204. After a certain second application of the wearable device is switched from the background to the foreground, the wearable device judges whether the second application is forbidden to execute the service in the background, if not, the wearable device ends the process, and if so, step 205 is executed.
In the embodiment of the present application, the second application may be any application running in the background of the wearable device, for example, any third party application, any system application, and the embodiment of the present application is not limited.
205. The wearable device resumes the function of the second application execution service.
For example, the wearable device may allow the second application to hold a CPU lock, allow the second application to access a network in the background, GPS, WIFI, bluetooth, sensor, audio, camera, etc., devices, and so on.
In the method described in fig. 2, the purpose of saving power is achieved by prohibiting the first application from executing the service in the background, that is, the background application is prohibited from holding a CPU lock, prohibiting access to a network, GPS, WIFI, bluetooth, sensor, audio, camera and other devices, so that the purpose of saving power consumption caused by executing the service after the application is switched to the background is achieved, and the purpose of saving power and improving the battery endurance of the wearable device is achieved.
In addition, by means of not limiting system application and setting a white list, the method and the device for realizing the core application execution service in the background are realized, and the influence on the core function is avoided, so that the method and the device are more humanized and have higher feasibility.
In addition, after the application is switched from the background to the foreground, the function of executing the service by the application can be recovered, so that the method and the device are more humanized and the user experience is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a third embodiment of a power consumption control method of a wearable device according to an embodiment of the present application. The wearable device may include a smart phone watch and other wearable electronic devices that may be provided with third party applications, which are not limited by the embodiments of the present application. As shown in fig. 3, the power consumption control method of the wearable device may include the steps of:
301. After a certain first application of the wearable device is switched from a foreground to a background, judging whether the wearable device is in a non-charging state, the first application does not belong to a system application and the first application is not in a preset white list, wherein the white list is used for recording applications allowing service execution in the background, if the wearable device is in the non-charging state, the first application does not belong to the system application and the first application is not in the preset white list, executing steps 302-303, otherwise, executing step 307.
302. The wearable device outputs prompt information and starts timing, wherein the prompt information comprises a prompt field and an optional item, the prompt field is used for prompting that the first application is forbidden to execute the service in the background when the timing time reaches the designated time, and the optional item is used for triggering and allowing the first application to execute the service in the background.
303. The wearable device detects whether the selectable item is selected in the process that the time length of the timer does not reach the designated time length, if the selectable item is not selected in the process that the time length of the timer does not reach the designated time length, step 306 is executed, and if the selectable item is selected in the process that the time length of the timer does not reach the designated time length, steps 304-305 are executed.
304. The wearable device prompts for information to be verified.
305. The wearable device checks whether the input information to be verified is matched with legal unlocking information bound with the first application, if not, step 306 is executed when the timed duration reaches the specified duration, and if so, step 307 is executed.
The implementation of steps 302 to 303 may improve the accuracy of prohibiting the first application from executing the service in the background or allowing the first application to execute the service in the background, so as to prevent the illegal user from intentionally prohibiting the first application from executing the service in the background or from intentionally allowing the first application to execute the service in the background.
As an alternative embodiment, the wearable device may further perform the following steps after performing step 304:
The wearable device determines a social application associated with a first application, and determines a group associated with the first application from the social application;
the wearable device outputs a facing content interface of the group, the facing content interface including conversational speech published by a plurality of different social users;
The wearable equipment detects any two sections of dialogue voices selected by a wearer from dialogue voices released by a plurality of different social users, and splices the selected any two sections of dialogue voices into a voice sentence, wherein the voice sentence is used as input information to be verified;
accordingly, the implementation manner of the step 305 may be:
The wearable device checks whether the user to which any two sections of dialogue voices belong is the same as a legal user pair included in legal unlocking information bound by the first application, if so, the content of the voice sentences is checked to be the same as the content of dialogue combined voices of the legal user included in the legal unlocking information bound by the first application, if so, the wearable device determines that the input information to be verified is matched with the legal unlocking information bound by the first application, otherwise, the wearable device determines that the input information to be verified is not matched with the legal unlocking information bound by the first application.
306. The wearable device prohibits the first application from executing the service in the background and performs step 308.
307. The wearable device allows the first application to perform the business in the background and performs step 308.
For example, if the wearable device is in a charging state and/or the first application belongs to a system application and/or the first application is in a preset white list, the wearable device allows the first application to execute a service in the background, so that the core service function is not affected, such as system update, background download of a system update package and the like, that is, normal use of the core service function is not affected while power is saved, and therefore the embodiment of the application is more humanized and has higher feasibility.
308. After a certain second application of the wearable device is switched from the background to the foreground, the wearable device judges whether the second application is forbidden to execute the service in the background, if not, the wearable device ends the process, and if so, the wearable device executes step 309.
In the embodiment of the present application, the second application may be any application running in the background of the wearable device, for example, any third party application, any system application, and the embodiment of the present application is not limited.
309. The wearable device resumes the function of the second application execution service.
For example, the wearable device may allow the second application to hold a CPU lock, allow the second application to access a network in the background, GPS, WIFI, bluetooth, sensor, audio, camera, etc., devices, and so on.
In the method described in fig. 3, the purpose of saving power is achieved by prohibiting the first application from executing the service in the background, that is, the background application is prohibited from holding a CPU lock, prohibiting access to a network, GPS, WIFI, bluetooth, sensor, audio, camera and other devices, so that the purpose of saving power consumption caused by executing the service after the application is switched to the background is achieved, and the purpose of saving power and improving the battery endurance of the wearable device is achieved.
In addition, by means of not limiting system application and setting a white list, the method and the device for realizing the core application execution service in the background are realized, and the influence on the core function is avoided, so that the method and the device are more humanized and have higher feasibility.
In addition, after the application is switched from the background to the foreground, the function of executing the service by the application can be recovered, so that the method and the device are more humanized and the user experience is improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a first embodiment of a wearable device according to an embodiment of the present application. The wearable device may include a smart phone watch and other wearable electronic devices that may be provided with third party applications, which are not limited by the embodiments of the present application. As shown in fig. 4, the wearable device may include:
a first judging unit 401, configured to judge whether the wearable device is in a non-charging state after a certain first application of the wearable device is switched from a foreground to a background, where the first application does not belong to a system application and the first application is not in a preset whitelist;
The control unit 402 is configured to prohibit the first application from executing the service in the background when the first determining unit 401 determines that the wearable device is in the non-charging state and the first application does not belong to the system application and the first application is not in the preset whitelist.
As an alternative embodiment, the wearable device shown in fig. 4 may further include:
a second determining unit 403, configured to determine, after a certain second application of the wearable device is switched from the background to the foreground, whether the second application is prohibited from executing the service in the background;
Accordingly, the control unit 402 is further configured to resume the function of the second application to execute the service when the second judging unit 403 judges that the second application is prohibited from executing the service in the background.
In the wearable device described in fig. 4, the purpose of saving power is achieved by prohibiting the first application from executing the service in the background, that is, the background application is prohibited from holding the CPU lock, prohibiting access to the network, GPS, WIFI, bluetooth, sensor, audio, camera and other devices, so that the perceived power consumption caused by executing the service after the application is switched to the background is saved, and the purpose of saving power and improving the battery endurance of the wearable device is achieved.
In addition, by means of not limiting system application and setting a white list, the method and the device for realizing the core application execution service in the background are realized, and the influence on the core function is avoided, so that the method and the device are more humanized and have higher feasibility.
In addition, after the application is switched from the background to the foreground, the function of executing the service by the application can be recovered, so that the method and the device are more humanized and the user experience is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a second embodiment of a wearable device according to an embodiment of the present application. The wearable device shown in fig. 5 is optimized by the wearable device shown in fig. 4. The wearable device shown in fig. 5 may further include, as compared to the wearable device shown in fig. 4:
The output timing unit 404 is configured to output a prompt message and start timing after the first judging unit 401 judges that the wearable device is in a non-charging state and the first application is not in a system application and the first application is not in a preset white list, where the prompt message includes a prompt field and an optional item, the prompt field is used to prompt that the first application is prohibited from executing a service in the background when the time length of the timing reaches a specified time length;
A detecting unit 405, configured to detect whether the selectable item is selected during the period when the counted period does not reach the specified period, and if the selectable item is not selected during the period when the counted period does not reach the specified period, trigger the control unit 402 to execute an operation of prohibiting the first application from executing the service in the background when the counted period reaches the specified period.
As an alternative embodiment, the wearable device shown in fig. 5 may further include:
A prompting unit 406, configured to prompt for inputting information to be verified when the detecting unit 405 detects that the selectable item is selected in the process that the counted time length does not reach the specified time length;
The verification unit 407 is configured to verify whether the input information to be verified matches with legal unlocking information bound to the first application, and if not, trigger the control unit 402 to execute an operation of prohibiting the first application from executing a service in the background when the counted time length reaches the specified time length.
Correspondingly, the control unit 402 is further configured to allow the first application to execute the service in the background when the verification unit 407 verifies that the information to be verified matches with the legal unlocking information bound by the first application.
In the wearable device described in fig. 5, the purpose of saving power is achieved by prohibiting the first application from executing the service in the background, that is, the background application is prohibited from holding a CPU lock, prohibiting access to devices such as a network, GPS, WIFI, bluetooth, sensor, audio, camera and the like, so that the purpose of saving power and improving the battery endurance of the wearable device is achieved by saving the perceived power consumption caused by executing the service after the application is switched to the background.
In addition, by means of not limiting system application and setting a white list, the method and the device for realizing the core application execution service in the background are realized, and the influence on the core function is avoided, so that the method and the device are more humanized and have higher feasibility.
In addition, after the application is switched from the background to the foreground, the function of executing the service by the application can be recovered, so that the method and the device are more humanized and the user experience is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a third embodiment of a wearable device according to an embodiment of the present application. As shown in fig. 6, may include:
memory 601 storing executable program code
A processor 602 coupled to the memory;
Wherein the processor 602 invokes executable program code stored in the memory 601 to perform all or part of the steps of the power consumption control method of the wearable device described above.
It should be noted that, in the embodiment of the present application, the wearable device shown in fig. 6 may further include components that are not shown, such as a speaker module, a display screen, a battery module, a wireless communication module (e.g., a mobile communication module, a WIFI module, a bluetooth module, etc.), a sensor module (e.g., a proximity sensor, etc.), an input module (e.g., a microphone, a key), and a user interface module (e.g., a charging interface, an external power supply interface, a card slot, a wired earphone interface, etc.).
The embodiment of the invention discloses a computer readable storage medium, which stores computer instructions, wherein the computer instructions, when running, cause a computer to execute all or part of the steps of a power consumption control method of a wearable device.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the above embodiments may be implemented by a program that instructs associated hardware, the program may be stored in a computer readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disk Memory, magnetic disk Memory, tape Memory, or any other medium that can be used for carrying or storing data.
The foregoing describes the power consumption control method of the wearable device, the wearable device and the storage medium in detail, and specific examples are applied to illustrate the principles and implementation manners of the invention, and the description of the foregoing examples is only for helping to understand the method and core ideas of the invention.