Wearable device system low-power-consumption operation method
By introducing a voting mechanism and dynamically adjusting the interrupt cycle of RTC in the wearable device system, the problem of untimely or inaccurate operation mode switching when reducing power consumption is solved, dynamic adjustment of MCU operation mode and dynamic optimization of system power consumption are achieved, and the battery life of the device is extended.
Patent Information
- Application Number
- CN202411698534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
When reducing power consumption in existing wearable device systems, there are problems such as untimely or inaccurate switching of operating modes, resulting in the inability to effectively reduce power consumption and the battery life time cannot meet expectations.
By introducing a voting mechanism in the wearable device system, business tasks voting allows voting to determine the operating mode of the MCU, and dynamically adjust the interrupt cycle of the RTC in combination with the second task to achieve dynamic adjustment of the MCU operation mode and dynamic optimization of system power consumption.
Dynamic adjustment of the MCU operation mode is realized, the timeliness and accuracy of sleep power consumption control is improved, the overall operating power consumption of the wearable device system is reduced, and the device battery life is extended.
Smart Images

Figure CN119620845A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-power operation of wearable devices, and in particular to a method for low-power operation of a wearable device system. Background Art
[0002] The contents in this section merely provide background information related to the present invention and may not constitute prior art.
[0003] At present, for wearable devices that use IoT embedded systems, their own wearable device systems are generally required to have high low-power performance to improve the battery life of the wearable device, the service life of the wearable device battery, reduce the consumption of public power, and prevent excessive heat generation.
[0004] In the technology of related wearable devices, the power consumption of the actual operation of the wearable device system is generally reduced by setting the operating mode of the MCU in the wearable device system to working mode, sleep mode and standby mode, and by allowing the MCU to continuously switch between different operating modes.
[0005] In the current wearable device system, the way to make the MCU switch between different operating modes is usually to preset the mode switching time of the MCU based on experience. For example, the time required to execute the task with the longest execution time in the wearable device system is used as the mode switching time of the MCU. During this time period, if the wearable device system has no tasks being executed, the MCU switches the operating mode, such as switching from working mode to sleep mode. In this way, it is very likely that no tasks are executed during the preset mode switching time, while the MCU is running in a high-power operating mode. Therefore, this method still has problems such as high operating power consumption and the wearable device's battery life cannot meet expectations. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a low-power operation method for a wearable device system. By adding a voting mechanism, the method can realize dynamic adjustment of the MCU operation mode, thereby helping to further reduce the operating power consumption of the wearable device system and improve the battery life of the wearable device system.
[0007] The purpose of the present invention is achieved through the following technical solutions:
[0008] The present invention discloses a low-power operation method for a wearable device system, wherein the wearable device system comprises an MCU;
[0009] The method comprises:
[0010] Create executable tasks for the wearable device system, the executable tasks include idle tasks, business tasks and second tasks; the idle task is configured to be able to control the operating mode of the main chip of the MCU, the business task is configured to be able to cast a vote to the idle task for determining the operating mode of the main chip, and the second task is configured to be responsible for the periodic action task of the wearable device system;
[0011] Executing the idle task and triggering a voting mechanism, wherein the idle task obtains a voting result according to the obtained votes; wherein, after the idle task is executed, the idle task can set the main chip to enter a target operation mode according to the voting result;
[0012] The business task can provide a corresponding event flag for the second task, and the second task is further configured to dynamically adjust the interrupt period of the RTC according to the event flag.
[0013] Further, the target operation mode includes a sleep mode and a standby mode;
[0014] The ballot includes a first ballot and a second ballot, the first ballot is used to determine whether the main chip enters the sleep mode, and the second ballot is used to determine whether the main chip enters the standby mode;
[0015] Among them, when each of the business tasks casts the first vote to the idle task, then after the idle task is executed, the idle task sets the main chip to enter the sleep mode; when each of the business tasks casts the second vote to the idle task, then after the idle task is executed, the idle task sets the main chip to enter the standby mode.
[0016] Furthermore, in the scenario where the main chip is voted to enter the sleep mode, the related devices in the wearable device system continue to work to achieve the goal of data pulling or action complete execution;
[0017] After each of the targets is executed, the business task votes again to eliminate the flag of the current interrupt type; when the flags of all interrupt types are cleared, the main chip autonomously enters the standby mode.
[0018] Furthermore, the execution of the idle task and the business task both need to compete for the right to use the main chip, and the priority of the idle task is lower than that of the business task;
[0019] When the business task competes for the right to use the main chip, it triggers the idle task to wait and casts the vote to the idle task.
[0020] Furthermore, during the execution of the idle task, the business task can compete for the right to use the main chip;
[0021] Furthermore, after a certain business task competes for the right to use the main chip, if the idle task has been triggered, the idle task will not be triggered repeatedly.
[0022] Furthermore, the operation of the second task depends on an event, and both the business task and the RTC interruption can trigger the second task;
[0023] The types of events include second task cycle running events and RTC interrupt cycle modification events.
[0024] Furthermore, the logic of the event flag is built into the process of the second task, and the second task can set the parameters of the RTC chip according to the logic, thereby dynamically adjusting the interrupt period of the RTC.
[0025] The technical solution of the embodiment of the present invention has at least the following advantages and beneficial effects:
[0026] The method disclosed in the present invention creates an idle task that can control the operation mode of the main chip and grants voting rights to each business task, so that after the idle task is executed, the main chip of the MCU can enter the target operation mode according to the voting result obtained by the voting mechanism, thereby realizing dynamic adjustment of the MCU operation mode and effectively improving the timeliness and accuracy of sleep power consumption control; and by creating a second task that dynamically adjusts the interrupt cycle of the RTC according to the business tasks, the usage scenarios and environment of the wearable device, etc., it can realize dynamic adjustment of the system operation power consumption, which is beneficial to further reduce the overall operation power consumption of the wearable device system and improve the battery life of the wearable device system. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the structure of a wearable device system provided by an embodiment of the present invention;
[0028] Figure 2 A flowchart of a low-power operation method for a wearable device system provided by an embodiment of the present invention;
[0029] Figure 3 A reference diagram of the process flow during actual operation of the wearable device system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described in conjunction with specific implementation methods below. The same figure marks in the accompanying drawings represent the same components. It should be noted that the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] Compared to the embodiments shown in the drawings, feasible embodiments within the scope of the present invention may have fewer components, other components not shown in the drawings, different components, differently arranged components, or differently connected components, etc. In addition, two or more components in the drawings may be implemented in a single component, or a single component shown in the drawings may be implemented as multiple separate components.
[0032] The embodiment of the present invention discloses a low-power operation method for a wearable device system, in the hope of reducing the operating power consumption of the wearable device system and improving the battery life of the wearable device system.
[0033] In order to facilitate a detailed description of the method disclosed in this embodiment, the general structure of a typical wearable device system will be briefly described below.
[0034] like Figure 1 As shown, the typical wearable device system disclosed in this embodiment may include an MCU and peripheral devices.
[0035] Among them, MCU is mainly used for system calculation and task operation. For example, MCU can be but not limited to STC51, MSP430, STM32, APOLL, PIC and other single-chip microcomputers. Of course, MCU can also be a single-core or heterogeneous multi-core single-chip microcomputer, as long as it can have conventional computing capabilities, and there is no limitation here.
[0036] Moreover, the MCU may have a variety of different operating modes, wherein the operating mode of the MCU may also refer to the operating mode of the main chip of the MCU. For example, the main chip of the MCU in this embodiment may include at least three operating modes, namely: full-speed working mode, sleep mode and standby mode.
[0037] In full-speed working mode, the main chip of the MCU runs at the maximum speed, and all peripherals of the MCU work normally. At this time, the power consumption of the wearable device system is the highest and the response speed is the fastest; in sleep mode, the main chip of the MCU is in sleep state, and the main chip maintains the normal operation of the basic peripherals. At this time, the power consumption of the wearable device system is medium, and any interrupt can wake up the main chip to quickly enter the full-speed working mode; in standby mode, the main chip and peripherals of the MCU are stopped, and only the core works at a low frequency. At this time, the power consumption of the wearable device system is the lowest. In this mode, only specific interrupts can wake up the main chip to put it into full-speed working mode.
[0038] For example, in sleep mode, any interrupt that can wake up the main chip may include IO interrupt, RTC interrupt, task interrupt, timer interrupt, serial port interrupt, etc.; in standby mode, only IO interrupt and RTC interrupt can wake up the main chip.
[0039] Continue to refer to Figure 1 The peripheral devices of the wearable device system may include a battery power module, a charging management module, a button knob module, a clock module, an LCD module, a PA / MIC / buzzer module, a BT / WIFI module, and a sensor module.
[0040] The battery power module is mainly used to power the entire system. For example, the battery in the battery power module can provide a voltage of 4.3V, and the power module in the battery power module can convert the 4.3V voltage into three voltage levels of 3.3V, 1.8V, and 1.2V and supply them to the system.
[0041] The charging management module is coupled to the battery power module and is mainly used for battery charging and power management.
[0042] The key knob module is mainly used to provide an operation interface for the system. The keys in the key knob module can be used for various menu selections and confirmations, and the knobs in the key knob module can be used for fast menu switching; and the key knob module has hardware functions such as forced system power on and off.
[0043] The clock module is mainly used to provide the system with a high-precision clock, including second and minute pulses. The clock module can include functions such as providing time accurate to the second level and alarm setting. During system operation, the clock module periodically synchronizes the precise time to the system every second or every minute. In addition, the second pulse and periodic pulse provided by the clock module to the system realize the system's periodic switching task control.
[0044] The LCD module is mainly used to realize the UI human-computer interaction of the system. Among them, the LCD module can include functions such as menu display, data display, touch interaction, parameter setting, function selection, etc.
[0045] The BT / WIFI module is mainly used for slow and fast communication of the system. Among them, the BT / WIFI module can include functions such as external transmission of internal system data, data interaction between APP and system, parameter setting, system update, file reading and writing, etc. Among them, WIFI is a pluggable module, and the BT part can include two communication protocols: BT and BLE.
[0046] The sensor module is mainly used for system perception. Among them, the sensor module can include four types of sensors, such as PPG, ECG, ACC, and temperature. PPG and ECG are mainly used to collect user physiological indicators, ACC is used for wearing and shaking inspection, and the temperature sensor is used to read the ambient temperature. The system can perform logical actions and message notifications based on these sensor data.
[0047] The following will focus on the low-power operation method of the wearable device system disclosed in this embodiment. Specifically, the method may include the following steps:
[0048] Step S1. After the wearable device system is turned on, the wearable device system is first initialized, including: initialization of the MCU main chip and related peripheral devices, such as initialization of the clock module, initialization of GPIO, initialization of BT / WIFI module, initialization of protocol, initialization of sensor, etc.
[0049] After the initialization of the wearable device system is completed, the real-time operating system of the wearable device system is started, and executable tasks of the wearable device system are created. Among them, executable tasks can include idle tasks and business tasks. In addition, after the creation of various executable tasks, they are set to the suspended waiting trigger state. At this time, the peripherals of the MCU and the peripheral devices of the system are set to the lowest energy consumption state.
[0050] The idle task is an empty task, which is mainly responsible for the transaction processing during the idle period of the MCU's main chip and the control of the main chip's operating mode. Among them, the priority of the idle task is the lowest compared to other tasks, that is, when there are no other business tasks to be executed, the idle task can compete for the right to use the main chip so that it can be executed. At the same time, during the execution of the idle task, other business tasks that need to be executed can compete for the right to use the main chip, that is, they can seize the right to use the main chip from the idle task. At this time, the idle task will be suspended and waiting.
[0051] Business tasks are tasks for daily operations of the wearable device system, and are mainly responsible for processing related sensors and actions. Among them, each business task in the wearable device system is executed according to the set priority, and each business task needs to compete for the right to use the main chip before it can be executed. When each business task is executed, the main chip is in full-speed working mode.
[0052] After each business task competes for the right to use the main chip, it will trigger the idle task to wait, so that when the business task is completed and there are no other tasks to be executed, the idle task will be executed. After a business task competes for the right to use the main chip, if the idle task has been triggered, it means that the wearable device system has a delayed action being executed, and the idle task will not be triggered repeatedly.
[0053] In addition, each business task has the right to vote for the main chip operation mode. Specifically, each business task can cast a vote to the idle task for the main chip operation mode. For example, after competing for the right to use the main chip, each business task can cast a vote to the idle task for the main chip operation mode.
[0054] Step S2. When all business tasks are not executed, the idle task is executed and the voting mechanism is triggered. At this time, the idle task can obtain the voting result based on the votes obtained from each business task; wherein, when the idle task is executed, the idle task can set the main chip to enter the target operation mode according to the voting result.
[0055] Specifically, the target operation mode mentioned above may include a sleep mode and a standby mode. At this time, the ballots cast by each business task may include a first ballot and a second ballot, the first ballot is used to determine whether the main chip enters the sleep mode, and the second ballot is used to determine whether the main chip enters the standby mode.
[0056] Moreover, the voting mechanism adopted in this embodiment is a one-vote veto voting mechanism, that is, only when each business task casts the first vote to the idle task, it indicates that the main chip needs to enter the sleep mode. Then, after the idle task is executed, the idle task can set the main chip to enter the sleep mode, otherwise, the main chip will continue to be in full-speed working mode; correspondingly, only when each business task casts the second vote to the idle task, it indicates that the main chip needs to enter the standby mode. Then, after the idle task is executed, the idle task can set the main chip to enter the standby mode, otherwise, the main chip will continue to be in full-speed working mode.
[0057] For example, assume that the business tasks include Task 1 and Task 2, where Task 1 and Task 2 will both cast votes to the idle task to determine the operating mode of the main chip after competing for the right to use the main chip. If both Task 1 and Task 2 cast the first vote to the idle task, then after the idle task is executed, the idle task can set the main chip to enter sleep mode; similarly, if both Task 1 and Task 2 cast the second vote to the idle task, then after the idle task is executed, the idle task can set the main chip to enter standby mode. On the contrary, if Task 1 casts the first vote to the idle task and Task 2 casts the second vote to the idle task, or Task 1 casts the second vote to the idle task and Task 2 casts the first vote to the idle task, then after the idle task is executed, the main chip continues to be in full-speed working mode.
[0058] It can be seen that the method disclosed in this embodiment, by creating an idle task that can control the operating mode of the main chip and granting voting rights to each business task, enables the main chip of the MCU to enter the target operating mode according to the voting results obtained by the voting mechanism after the idle task is executed, thereby realizing dynamic adjustment of the MCU operating mode and effectively improving the timeliness and accuracy of sleep power consumption control.
[0059] Generally, in the scenario where the voting main chip enters sleep mode, related devices in the wearable device system such as sensor modules and MCU peripherals need to continue to work to achieve the goal of data extraction or complete action execution. Among them, after each goal is completed, the business task needs to vote again to eliminate the interrupt type flag. When all interrupt type flags are cleared, the main chip can enter standby mode autonomously.
[0060] In some embodiments of the present invention, executing an idle task for a first unit of 10 ms can release the waiting time of the main chip, so as to reduce the sleep and wake-up frequency of the main chip, thereby further reducing power consumption.
[0061] In some embodiments of the present invention, the executable tasks described in step S1 also include second tasks. Second tasks are mainly responsible for periodic action tasks of the wearable device system, such as time update per second, periodic sensor data collection, periodic UI refresh, periodic service update, etc.
[0062] The operation of the second task depends on events, and the business task and RTC interrupt of the wearable device system can trigger the second task. For example, during the execution of the business task, the business task can send a semaphore to the second task to trigger the second task. Specifically, after receiving the event, the second task will determine the type of event to perform different actions. Among them, the event type can include the second task periodic operation event and the RTC interrupt period modification event.
[0063] Among them, different business tasks in the wearable device system can also provide corresponding event flags for the second task. During the execution of the second task, the second task can dynamically adjust the RTC interrupt cycle according to the event flag.
[0064] For example, the business tasks of the wearable device system may include wearing tasks, sleeping tasks, lighting tasks, and exercise tasks. Among them, the wearing task is responsible for detecting whether the user is wearing the wearable device, the sleeping task is responsible for detecting whether the user wearing the wearable device is sleeping, the lighting task is responsible for detecting the light intensity of the environment where the wearable device is located, and the exercise task is responsible for detecting whether the user wearing the wearable device is exercising.
[0065] During the execution of the wearing task, the wearing task can provide the second task with a wearing status flag by sending a semaphore to the second task, so that the second task can dynamically adjust the RTC interrupt cycle according to the wearing status flag. Specifically, when the wearing flag is pulled high, it means that the user has worn and is using the wearable device, and the second task can adjust the RTC interrupt cycle to 1 second, so as to be able to respond to the user's actions in a timely manner; correspondingly, when the wearing status flag is pulled low, it means that the user is not using the wearable device. If the wearing status flag is in a low state for a long time range (for example, three minutes or longer), the second task can adjust the RTC interrupt cycle to 1 minute to reduce the power consumption of the wearable device system. At the same time, the MCU of the wearable device system can turn off power-consuming peripherals such as algorithm modules and BT / WIFI modules to further reduce the operating power consumption of the wearable device system. Among them, when the second task adjusts the RTC interrupt cycle to 1 minute, the user can change and load the RTC interrupt cycle by himself to readjust the RTC interrupt cycle to 1 second.
[0066] In particular, if the wearing task detects that the wearable device has not been worn for more than the first non-wearing time threshold, the second task can also trigger the wearable device system to enter super power saving mode, in which the wearable device system will shut down all peripheral devices except the button knob module; on this basis, if the wearing task detects that the wearable device has not been worn for more than the second non-wearing time threshold, the second task can also trigger the wearable device system to automatically shut down. The second non-wearing time threshold is greater than the first non-wearing time threshold, for example, the first non-wearing time threshold can be 48 hours, and the second non-wearing time threshold can be 96 hours.
[0067] During the execution of the sleep task, the sleep task can provide the second task with a sleep state flag by sending a semaphore to the second task, so that the second task can dynamically adjust the RTC interrupt cycle according to the sleep state flag. Specifically, when the sleep state flag is pulled high, it means that the user wearing the wearable device is sleeping, and the second task can adjust the RTC interrupt cycle to 1 minute to reduce the power consumption of the wearable device system; correspondingly, when the sleep state flag is pulled low, it means that the user wearing the wearable device has stopped sleeping, and the second task can adjust the RTC interrupt cycle to 1 second, so as to be able to respond to the user's actions in a timely manner.
[0068] During the execution of the illumination task, the illumination task can provide the second task with an illumination status flag by sending a semaphore to the second task, so that the second task can dynamically adjust the RTC interrupt cycle according to the illumination status flag. Specifically, when the illumination status flag is pulled high, it means that the wearable device is in a dark environment. The second task can adjust the RTC interrupt cycle to 1 minute to reduce the power consumption of the wearable device system; correspondingly, if the wearable device is in a strong light environment, the illumination status flag can be updated, and the update method includes but is not limited to the two triggering methods of button and shaking. At this time, the second task can adjust the RTC interrupt cycle to 1 second so as to be able to respond to the user's actions in a timely manner.
[0069] During the execution of the motion task, the motion task can provide the second task with a motion status flag by sending a semaphore to the second task, so that the second task can dynamically adjust the RTC interrupt cycle according to the motion status flag. Specifically, when the motion status flag is pulled high, it means that the user wearing the wearable device is exercising, and the second task can adjust the RTC interrupt cycle to 1 second so as to respond to the user's actions in a timely manner.
[0070] Among them, the logic of the four event flags listed above provided by different business tasks can be built into the process of the second task. The second task can set the parameters of the RTC chip (that is, the real-time clock chip in the clock module) according to the above logic, thereby dynamically adjusting the RTC interrupt cycle.
[0071] Of course, the wearable device system can also directly set the parameters of the RTC chip in the wearable device system according to the progress of the relevant business tasks to adjust the RTC interruption period, thereby realizing the corresponding process action. Among them, the business tasks that can directly set the parameters of the RTC chip to adjust the RTC interruption period can include: timely refresh tasks of the interface, timely update tasks of the time, message reminder tasks, sensor data collection tasks, periodic business update tasks, etc.
[0072] It is worth mentioning that the method disclosed in this embodiment can achieve dynamic adjustment of system operating power consumption by creating a second task that can dynamically adjust the RTC interrupt period according to business tasks, usage scenarios and environments of wearable devices, etc., thereby helping to further reduce the overall operating power consumption of the wearable device system and improve the battery life of the wearable device system.
[0073] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A low-power operation method for a wearable device system, the wearable device system comprising an MCU, characterized in that: The method comprises: Create executable tasks for the wearable device system, the executable tasks include idle tasks, business tasks and second tasks; the idle task is configured to be able to control the operating mode of the main chip of the MCU, the business task is configured to be able to cast a vote to the idle task for determining the operating mode of the main chip, and the second task is configured to be responsible for the periodic action task of the wearable device system; Executing the idle task and triggering a voting mechanism, wherein the idle task obtains a voting result according to the obtained votes; wherein, after the idle task is executed, the idle task can set the main chip to enter a target operation mode according to the voting result; The business task can provide a corresponding event flag for the second task, and the second task is also configured to dynamically adjust the interrupt period of the RTC according to the event flag.
2. The low-power operation method of the wearable device system according to claim 1, characterized in that: The target operation mode includes a sleep mode and a standby mode; The ballot includes a first ballot and a second ballot, the first ballot is used to determine whether the main chip enters the sleep mode, and the second ballot is used to determine whether the main chip enters the standby mode; Among them, when each of the business tasks casts the first vote to the idle task, then after the idle task is executed, the idle task sets the main chip to enter the sleep mode; when each of the business tasks casts the second vote to the idle task, then after the idle task is executed, the idle task sets the main chip to enter the standby mode.
3. The low-power operation method of the wearable device system according to claim 2, characterized in that: In the scenario where the main chip is voted to enter the sleep mode, the related devices in the wearable device system continue to work to achieve the goal of data pulling or action complete execution; After each of the targets is executed, the business task votes again to eliminate the flag of the current interrupt type; when the flags of all interrupt types are cleared, the main chip autonomously enters the standby mode.
4. The low-power operation method of the wearable device system according to claim 1, characterized in that: The execution of the idle task and the business task both need to compete for the right to use the main chip, and the priority of the idle task is lower than that of the business task; When the business task competes for the right to use the main chip, it triggers the idle task to wait and casts the vote to the idle task.
5. The low-power operation method of the wearable device system according to claim 4, characterized in that: During the execution of the idle task, the business task can compete for the right to use the main chip; Furthermore, after a certain business task competes for the right to use the main chip, if the idle task has been triggered, the idle task will not be triggered repeatedly.
6. The low-power operation method of a wearable device system according to claim 1, characterized in that: The operation of the second task depends on events, and both the business task and the RTC interrupt can trigger the second task; The types of events include second task cycle running events and RTC interrupt cycle modification events.
7. The low-power operation method of a wearable device system according to claim 1, characterized in that: The logic of the event flag is built into the process of the second task, and the second task can set the parameters of the RTC chip according to the logic, thereby dynamically adjusting the interrupt cycle of the RTC.
Citation Information
Cited By
5G base station intelligent dormancy and wake-up energy saving method based on edge computing
CN120075974A
5G Base Station Intelligent Sleep and Wake-up Energy Saving Method Based on Edge Computing
CN120075974B