A method, device and storage medium for low-power data acquisition
Patent Information
- Application Number
- CN202610631253.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]然而,逐次唤醒的同步采集方法会使控制器被高频中断频繁激活,导致休眠状态被反复打断
本申请通过第一唤醒中断信号和第二唤醒中断信号分别由对应传感器根据各自缓存区的预设缓存阈值触发,而非随采样频率逐次产生,使得退出休眠模式的次数大幅减少,有效延长了单次连续深睡时长。接着,响应唤醒中断信号后,根据唤醒中断信号的来源执行数据读取流程,读取触发唤醒的传感器对应缓存区内的第一样本数据,同时获取另一传感器在对应时间段内采集的数据样本,使得单次唤醒即可完成对两类传感器数据的批量获取,避免了各传感器独立唤醒所造成的重复唤醒开销与电流尖峰累积,使控制器平均功耗下降,延长了微型穿戴设备的续航能力。
Smart Images

Figure CN122802811A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wearable devices, and more particularly to a method, apparatus, and storage medium for data acquisition under low power consumption. Background Technology
[0002] With the popularization of health monitoring technology, miniature wearable devices such as smart rings are gradually entering people's lives. These devices need to continuously monitor heart rate and activity status around the clock, but due to size limitations, their built-in battery capacity is extremely limited. Among the various components of the device, the controller is the second largest power consumer after the sensor, and its power consumption level directly determines the device's battery life. Therefore, how to significantly reduce the average power consumption of the controller while ensuring the integrity of the monitoring function has become a key area of continuous research and development in the industry.
[0003] To achieve continuous acquisition and processing of physiological signals under low power consumption constraints, existing technologies employ a synchronous acquisition method with successive wake-up. This method involves a sensor continuously generating sampling data at a fixed frequency. Each time new data is generated, a wake-up interrupt request is sent to the controller in sleep mode via hardware connection. Upon wake-up, the controller reads the single data entry, performs simple calculations, and then immediately returns to sleep mode to await the next wake-up.
[0004] However, the synchronous acquisition method of successive wake-up causes the controller to be frequently activated by high-frequency interrupts, resulting in repeated interruptions to the sleep state. Although each wake-up is brief, the high frequency of wake-ups accumulates large current spikes and active-state power consumption, causing the controller's actual average power consumption to be much higher than its nominal value in deep sleep mode. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method, apparatus, and storage medium for data acquisition under low power consumption.
[0006] The technical solution provided in this application is described below:
[0007] A first aspect of this application provides a method for data acquisition under low power consumption, the method comprising: In sleep mode, respond to a wake-up interrupt signal and exit the sleep mode. The wake-up interrupt signal comes from at least one of a first wake-up interrupt signal emitted by a first sensor and a second wake-up interrupt signal emitted by a second sensor. The first wake-up interrupt signal is triggered when the amount of data in the first buffer of the first sensor reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the amount of data in the second buffer of the second sensor reaches a second preset buffer threshold. If the wake-up interrupt signal is triggered by a single sensor wake-up, then the first sample data in the buffer corresponding to the sensor that triggered the wake-up is read, and the data sample collected by another sensor during the acquisition time of the first sample data is obtained.
[0008] Optionally, reading the first sample data in the buffer corresponding to the sensor that triggered the wake-up, and obtaining data samples collected by another sensor during the collection time period of the first sample data, includes: If the sensor that triggers the wake-up is the second sensor, then the data sample in the second buffer is read to obtain the first sample data; Based on the running status of the first sample data, the first sample data is cached in the temporary storage area; Determine whether the data samples in the first cache area have reached the first preset cache threshold; If so, read the data samples in the first cache area, and extract the data samples in the temporary storage area according to the corresponding time period of the data samples in the first cache area.
[0009] Optionally, after determining whether the data samples in the first cache have reached the first preset cache threshold, the method further includes: If not, determine whether the accumulated duration corresponding to the first sample data that has been read has reached the interrupt period corresponding to the first buffer. If so, read the data samples in the first buffer area, and extract the data samples in the temporary storage area according to the collection time period of the data samples in the first buffer area. If not, it will re-enter hibernation mode and wait for the next wake-up.
[0010] Optionally, caching the first sample data to a temporary storage area based on the running status of the first sample data includes: Perform state detection on the first sample data to obtain the state detection result; If the state detection result is a motion state, then motion feature extraction is performed on the first sample data to obtain feature sample data; The feature sample data and the motion state information are cached in the temporary storage area, and the first sample data is discarded; If the state detection result is a deep static state, then the first sample data is cached in the temporary storage area, and the data sample collection frequency of the second cache area is reduced. If the state detection result is a static state, then the first sample data is cached in the temporary storage area.
[0011] Optionally, before reading the data sample in the second buffer if the sensor triggering the wake-up is the second sensor, the method further includes: If the sensor that triggered the wake-up is the first sensor, then check whether an overflow event has occurred in the first buffer. If not, then read the data sample in the first buffer area to obtain the first sample data; Based on the corresponding time period of the first sample data, extract data samples from the temporary storage area.
[0012] Optionally, after checking whether an overflow event has occurred in the first buffer, the method further includes: If so, then read the data sample in the first buffer area to obtain the first sample data; Based on the corresponding time period of the first sample data, extract the data samples from the temporary storage area; Determine whether the overflow event continuously reaches a preset value; If so, then lower the first preset cache threshold.
[0013] Optionally, before the step of reading the data sample in the buffer corresponding to the sensor that triggered the wake-up if the wake-up interrupt signal is a single sensor wake-up, obtaining the first data sample, and obtaining the data sample collected by another sensor during the data acquisition time period of the first sample, the method further includes: If the sensor that triggers the wake-up is a dual-sensor wake-up, then according to the interrupt priority policy, the data sample in the first buffer is read. The interrupt priority policy indicates that the first buffer of the first sensor is read in a priority order than the second buffer of the second sensor. Read data samples from the second buffer.
[0014] A second aspect of this application provides a device for data acquisition under low power consumption, the device comprising: A response unit is configured to respond to a wake-up interrupt signal and exit the sleep mode in a sleep mode. The wake-up interrupt signal is from at least one of a first wake-up interrupt signal emitted by a first sensor and a second wake-up interrupt signal emitted by a second sensor. The first wake-up interrupt signal is triggered when the amount of data in the first buffer of the first sensor reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the amount of data in the second buffer of the second sensor reaches a second preset buffer threshold. The first reading unit is used to read the first data sample in the buffer corresponding to the sensor that triggered the wake-up if the triggering type of the wake-up interrupt signal is single sensor wake-up, and to obtain the data sample collected by another sensor during the acquisition time period of the first sample data.
[0015] A third aspect of this application provides a device for data acquisition under low power consumption, the device comprising: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to execute the first aspect and any one of the optional methods in the first aspect.
[0016] A fourth aspect of this application provides a computer-readable storage medium on which a program is stored, which, when executed on a computer, performs the methods of the first aspect and any one of the first aspects.
[0017] As can be seen from the above technical solutions, this application has the following beneficial effects: This application utilizes a first wake-up interrupt signal and a second wake-up interrupt signal, each triggered by a corresponding sensor according to a preset buffer threshold in its respective buffer, rather than being generated sequentially with the sampling frequency. This significantly reduces the number of times the device exits sleep mode, effectively extending the duration of a single continuous deep sleep. Following the wake-up interrupt signal, a data reading process is executed based on the source of the interrupt signal. The first sample data from the buffer corresponding to the sensor that triggered the wake-up is read, and simultaneously, data samples collected by the other sensor within the corresponding time period are acquired. This allows for batch acquisition of data from both types of sensors in a single wake-up, avoiding the overhead of repeated wake-ups and current spikes caused by independent sensor wake-ups. This reduces the average power consumption of the controller and extends the battery life of the micro-wearable device. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of an embodiment of the low-power data acquisition method provided in this application; Figure 2 A schematic flowchart of an embodiment of the low-power data acquisition method provided in this application for reading data from the second sensor; Figure 3 A schematic flowchart of an embodiment of the operation status detection in the low-power data acquisition method provided in this application; Figure 4A schematic flowchart of an embodiment of the first sensor data reading process in the low-power data acquisition method provided in this application; Figure 5 A schematic flowchart of an embodiment of the low-power data acquisition device provided in this application; Figure 6 This is a schematic flowchart of another embodiment of the low-power data acquisition device provided in this application. Detailed Implementation
[0020] It should be noted that in the low-power data acquisition method of this application, the execution entity performing the low-power data acquisition can be a microcontroller, microprocessor, digital signal processor, system-on-a-chip, or other integrated circuit module with data processing and interrupt response capabilities. For ease of description, the term "controller" is used as a general term for the execution entity in the embodiments of this application, but it does not constitute a limitation on the specific implementation method of the execution entity. Any hardware or software module that can implement the control logic described in this application should fall within the protection scope of this application.
[0021] The low-power data acquisition method provided in this application can be widely used in various micro wearable devices, especially those requiring multi-sensor collaborative operation and high battery life. For example, in devices such as smart rings, smart bracelets, and smartwatches, it is typically necessary to simultaneously acquire photoplethysmography (PPG) signals and acceleration signals to achieve functions such as heart rate monitoring, motion state recognition, and sleep analysis. Due to the small size of these devices and their extremely limited built-in battery capacity, frequent wake-ups of the controller by various sensors for data processing will lead to a sharp increase in power consumption, severely impacting the actual usage time of the device. The method in this application effectively solves the aforementioned power bottleneck by using a cache threshold-triggered interrupt, batch reading of dual-sensor data during a single wake-up, and a state-based adaptive caching strategy. This allows wearable devices to maintain multi-sensor collaborative monitoring capabilities while achieving long-term continuous operation.
[0022] Furthermore, the method of this application is also applicable to other embedded system scenarios requiring low-power multi-sensor data acquisition, such as wireless body area network nodes, portable medical monitoring terminals, animal tracking collars, and industrial wireless sensor nodes. In these scenarios, devices are typically battery-powered and require long-term unattended operation, placing stringent requirements on average power consumption and battery life. By employing the wake-up mechanism and data acquisition strategy described in this application, the controller can remain in a deep sleep state most of the time, only being woken up and processed in batches when cached data accumulates to a preset threshold. This significantly extends the single-use cycle of the device, reduces maintenance costs, and improves deployment flexibility.
[0023] Please see Figure 1This application first provides an embodiment of a method for data acquisition under low power consumption, which includes: S101. In sleep mode, respond to wake-up interrupt signal and exit sleep mode. The wake-up interrupt signal comes from at least one of the first wake-up interrupt signal emitted by the first sensor and the second wake-up interrupt signal emitted by the second sensor. The first wake-up interrupt signal is triggered when the data amount of the first sensor in its first buffer reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the data amount of the second sensor in its second buffer reaches a second preset buffer threshold. In this embodiment, to reduce system power consumption during normal operation of the micro wearable device, the controller enters sleep mode when there is no data reading task. At this time, the CPU stops running, only maintaining power to the RAM and interrupt wake-up circuit, reducing power consumption to the microampere level. Simultaneously, the first and second sensors operate independently, continuously collecting data at their respective sampling frequencies and sequentially writing the collected data samples into their respective first and second buffers. When the accumulated data in the first buffer reaches a first preset buffer threshold, the first sensor automatically triggers a first wake-up interrupt signal. Similarly, when the accumulated data in the second buffer reaches a second preset buffer threshold, the second sensor automatically triggers a second wake-up interrupt signal. Then, any one or more of the first and second wake-up interrupt signals arrive at the controller's interrupt input pin. Next, the controller responds to the wake-up interrupt signal, exits sleep mode, enters working state, and prepares to perform subsequent data reading and processing operations.
[0024] S102. If the wake-up interrupt signal is triggered by a single sensor wake-up, then read the first sample data in the buffer corresponding to the sensor that triggered the wake-up, and obtain the data sample collected by the other sensor during the time period of the first sample data collection. In this embodiment, after the controller exits the sleep mode, if it is determined that only one sensor has triggered the interrupt, i.e., when a single sensor wakes up, the controller will execute the corresponding data reading and acquisition process according to the type of sensor that triggered the wake-up.
[0025] Specifically, when the sensor triggering the wake-up is the second sensor, the controller first reads all data samples in the second buffer as the first sample data and performs state caching processing on this first sample data. Subsequently, the controller queries the data accumulation status of the first buffer. If the first buffer is ready, it reads the first sensor data along with it and extracts the second sensor data corresponding to the acquisition time period of the first sensor data from the temporary storage area. If the first buffer is not yet ready, it decides whether to actively read the data from the first buffer or return to sleep mode based on the accumulated second sensor data duration.
[0026] Specifically, when the sensor triggering the wake-up is the first sensor, the controller first checks whether an overflow event has occurred in the first buffer. Then, it reads all data samples in the first buffer as the first sample data, and extracts the corresponding time period data pre-cached by the second sensor from the temporary storage area based on the acquisition time period of the first sample data. Subsequently, it checks whether an overflow event has occurred in the first buffer. If so, it records the overflow event and the number of consecutive overflows while reading the data. Next, it determines whether the first preset buffer threshold set in the first buffer needs to be adjusted based on the number of consecutive overflows.
[0027] S103. If the sensor that triggers the wake-up is a dual-sensor wake-up, then according to the interrupt priority policy, read the data sample in the first buffer. The interrupt priority policy indicates that the reading order of the first buffer of the first sensor is priority over the second buffer of the second sensor; execute step S104. In this embodiment, after the controller exits sleep mode, if the controller determines that the trigger type of the current wake-up interrupt signal is dual-sensor wake-up (i.e., the first wake-up interrupt signal of the first sensor and the second wake-up interrupt signal of the second sensor arrive simultaneously or almost simultaneously), then a preset interrupt priority strategy is invoked. This interrupt priority strategy indicates that when processing the buffer data of the two sensors, the reading order of the first buffer of the first sensor takes precedence over the reading order of the second buffer of the second sensor. Then, according to this priority strategy, the controller first performs a reading operation on the first buffer, reading out all data samples accumulated in the first buffer that have reached a first preset buffer threshold, thus completing the data acquisition from the first sensor.
[0028] S104. Read data samples from the second buffer.
[0029] In this embodiment, the controller then performs a read operation on the second buffer. At this time, the controller directly reads all the currently accumulated data samples in the second buffer. Subsequently, the controller collects and integrates the data samples from the first buffer and the second buffer read during this wake-up, marks them as dual-sensor data of the same batch, sets the data ready flag, and finally clears the interrupt flags of both sensors.
[0030] In this embodiment, the first and second wake-up interrupt signals are triggered by the corresponding sensors according to their respective preset buffer thresholds, rather than being generated sequentially with the sampling frequency. This significantly reduces the number of times the device exits sleep mode, effectively extending the duration of a single continuous deep sleep. Next, upon responding to the wake-up interrupt signal, a data reading process is executed based on the source of the interrupt signal. The first sample data from the buffer corresponding to the sensor that triggered the wake-up is read, and simultaneously, data samples collected by the other sensor within the corresponding time period are acquired. This allows for batch acquisition of data from both types of sensors in a single wake-up, avoiding the overhead of repeated wake-ups and current spikes caused by independent wake-ups of each sensor. This reduces the average power consumption of the controller and extends the battery life of the micro-wearable device.
[0031] In step S102 above, if the wake-up interrupt signal is triggered by a single sensor wake-up, the specific implementation of reading the first sample data in the buffer corresponding to the sensor that triggered the wake-up, and obtaining the data sample collected by another sensor during the acquisition time of the first sample data, can be found in [reference needed]. Figure 2 As shown, Figure 2 An embodiment of the second sensor data reading in the low-power data acquisition method provided in this application includes: S201. If the sensor that triggers the wake-up is the second sensor, then read the data sample in the second buffer to obtain the first sample data. In this embodiment, when the wake-up interrupt signal is determined to be triggered by a single sensor wake-up, if the sensor triggered for wake-up is the second sensor, a read operation is first performed on the second buffer. At this time, the amount of data samples accumulated in the second buffer has reached the second preset buffer threshold. The controller reads all the data samples currently stored in the second buffer at once through the communication interface in a batch read manner. Then, the controller marks these data samples read from the second buffer as the first sample data, completing the data acquisition of the sensor that triggered the wake-up.
[0032] S202. Based on the running status of the first sample data, cache the first sample data in the temporary storage area; In this embodiment, after acquiring the first sample data, since the interrupt cycle of the second sensor is much shorter than that of the first sensor, when the second sensor triggers wake-up, the buffer of the first sensor often has not reached the threshold, causing the two sets of data to be out of sync. If the second sensor data is processed completely at this time, it will cause the controller to frequently exit sleep mode and prolong the single active time, thereby increasing the number of interrupt responses and power consumption. Therefore, it is necessary to first perform state detection on the first sample data. By analyzing the amplitude changes, frequency distribution and other characteristics of the data samples, the current state of the device is determined. Then, the controller determines the caching method of the first sample data according to the detected current state. If it is determined to be a motion state, motion features are extracted from the first sample data, the extracted feature information is stored in the temporary storage area, and the original first sample data is discarded. If it is determined to be a deep static state or a static state, the first sample data is directly stored in the temporary storage area. After completing the classification caching operation, the temporary storage area saves the content of the data sample corresponding to the current state.
[0033] S203. Determine whether the data samples in the first cache area have reached the first preset cache threshold; In this embodiment, after completing the reading and caching of data samples in the second buffer of the second sensor data, the controller does not immediately return to sleep mode. Instead, it queries the amount of data samples in the first buffer through the communication interface. Then, the controller compares the current amount of data samples with a preset first cache threshold to determine whether the first buffer has reached the condition for being readable. If the amount of data samples in the first buffer has reached or exceeded the first preset cache threshold, the process proceeds to step S204; if the amount of data samples in the first buffer has not yet reached the threshold, the process proceeds to step S205.
[0034] S204. Read the data samples in the first buffer area, and extract the data samples in the temporary storage area according to the corresponding time period of the data samples in the first buffer area. In this embodiment, when the number of data samples in the first buffer reaches or exceeds a first preset buffer threshold, the controller first reads all accumulated data samples in the first buffer in batch mode. Then, the controller determines the collection time period of this batch of data samples based on the timestamp information carried by the read data samples in the first buffer. Subsequently, the controller uses this collection time period as an index to search for and extract data samples or feature information that match this time period in the temporary storage area. This allows the controller to merge the data samples extracted from the temporary storage area with the first sample data, and perform centralized processing operations such as cardiac impaction signal filtering, peak detection, heart rate calculation, photoplethysmography data processing, and heart rate variability updates on the merged dataset.
[0035] S205. Determine whether the accumulated duration corresponding to the first sample data that has been read has reached the interrupt cycle corresponding to the first buffer. In this embodiment, when the data samples in the first buffer have not yet reached the first preset buffer threshold, the controller will not immediately abandon the wake-up opportunity. Instead, it will calculate the total duration corresponding to the data samples of the second sensor that have been accumulated since the last reading of the first buffer. Then, the controller compares the accumulated duration with the interrupt period corresponding to the first buffer. If the accumulated duration has reached or exceeded the interrupt period, it proceeds to step S206; if the accumulated duration has not yet reached the threshold, it proceeds to step S207. The interrupt period corresponding to the first buffer refers to the fixed time interval required for the first sensor to start collecting data from an empty buffer until it reaches the first preset buffer threshold. It should be noted that the specific duration of the interrupt period corresponding to the first buffer can be flexibly set according to the actual application scenario of the device, the sensor sampling rate, and the buffer threshold, and is not specifically limited here.
[0036] S206. Read the data samples in the first buffer area, and extract the data samples in the temporary storage area according to the collection time period of the data samples in the first buffer area. In this embodiment, when the accumulated duration reaches the interrupt cycle corresponding to the first buffer, it indicates that although the first sensor has not actively triggered an interrupt, its buffer has theoretically accumulated data samples equivalent to a complete cycle. At this time, the controller first actively initiates a read operation on the first buffer, reading out all the currently stored data samples at once. Then, the controller determines the time range based on the acquisition time period of this batch of data samples. Next, the controller uses this acquisition time period as a matching basis to search for and extract data samples or feature information corresponding to this time period in the temporary storage area. This allows the controller to subsequently merge the data samples extracted from the temporary storage area with the first sample data, and perform centralized processing operations such as cardiac impaction signal filtering, peak detection, heart rate calculation, photoplethysmography data processing, and heart rate variability updates on the merged dataset.
[0037] S207. Re-enter hibernation mode and wait for the next wake-up.
[0038] In this embodiment, when the accumulated time has not yet reached the interrupt cycle corresponding to the first buffer, it indicates that the amount of data in the first sensor buffer is indeed insufficient to constitute a complete processing batch, and the data from the second sensor has not yet accumulated to the duration required for forced processing. At this time, the controller determines that all executable operations have been completed in this wake-up and no longer waits. Then, it saves the current running state and accumulated time count so that it can continue to accumulate during the next wake-up. Next, the controller clears the interrupt flag of this wake-up, re-enters sleep mode, and waits for the next wake-up interrupt signal from the first or second sensor to arrive, at which time it will continue to execute the data acquisition and processing process.
[0039] In this embodiment, when the sensor triggering the wake-up is the second sensor, the controller first reads data samples from the second buffer to obtain first sample data. Based on the state of the first sample data, it caches it in a temporary storage area instead of directly performing complete data processing. This avoids the overhead and increased power consumption caused by frequent wake-ups of the controller due to the short interrupt cycle of the second sensor. Next, by determining whether the data samples in the first buffer have reached a first preset buffer threshold, the ready state of the first sensor data is actively probed. If the first buffer has reached the threshold, the data samples in the first buffer are directly read, and matching data is extracted from the temporary storage area based on the corresponding time period of the data samples. This completes the time alignment and merging of the two sensor data in a single wake-up. If the first buffer has not reached the threshold, the accumulated duration is further compared with the interrupt cycle corresponding to the first buffer. Only when the accumulated duration meets the condition is the data in the first buffer actively read and merged with the data in the temporary storage area; otherwise, it re-enters sleep mode to wait for the next wake-up. This mechanism enables the controller to complete the synchronous collection of dual sensor data as much as possible during each wake-up opportunity in the context of high-frequency interruption of the second sensor, and to terminate the operation and return to sleep in time when the data is insufficient. This effectively reduces the number of invalid wake-ups and active time while ensuring data integrity and time alignment accuracy, and significantly reduces the average power consumption of the controller.
[0040] For a detailed implementation of step S202 above, which involves caching the first sample data to a temporary storage area based on the running status of the first sample data, please refer to [link to relevant documentation]. Figure 3 As shown, Figure 3 An embodiment of the operation state detection in the low-power data acquisition method provided in this application includes: S301. Perform state detection on the first sample data to obtain the state detection result; In this embodiment, during state detection, the controller first calculates the signal amplitude vector of the sampled values in the first sample data. By calculating the square root of the sum of squares of the multi-axis signals, a synthetic amplitude sequence reflecting the overall motion intensity is obtained. Then, this synthetic amplitude sequence is compared segment by segment with preset motion and stillness thresholds. Based on the amplitude level and duration, motion, stillness, and deep stillness states are distinguished. The motion state represents a work scenario where the device wearer is engaged in physical activity, such as walking or swinging their arms. In this case, the signal amplitude collected by the second sensor is significantly increased and fluctuates frequently. The stillness state represents a work scenario where the device wearer is awake but not making significant physical movements, such as sitting or standing. In this case, the signal collected by the second sensor contains only minor physiological vibrations or environmental noise, and the amplitude is below the motion threshold but has not entered the deep stillness range of sustained low energy. The deep stillness state represents a work scenario where the device wearer is asleep or completely still. In this case, the signal amplitude collected by the second sensor is extremely low and does not fluctuate significantly for a long time. Subsequently, a state detection result is generated based on the comparison results to determine the current state type. It should be noted that the motion determination threshold and the stationary determination threshold are fixed parameters pre-configured during the system initialization phase based on the sensor's noise characteristics, the motion intensity of typical application scenarios, and power consumption strategies. They are used to distinguish the boundaries between motion and stationary, and between stationary and deep stationary, respectively.
[0041] S302. If the state detection result is a motion state, then perform motion feature extraction on the first sample data to obtain feature sample data; proceed to step S303. In this embodiment, when the state detection result determines that the current state is in motion, the effective information density of the original sampled data is low due to the drastic and frequent signal changes during motion. Directly storing the complete waveform would not only occupy a large amount of temporary storage space, but also result in limited contribution of the original waveform during motion to the calculation of core indicators such as heart rate during subsequent time alignment and fusion analysis with the first sensor data. Therefore, the controller first needs to extract parameters reflecting motion intensity, such as the average amplitude and peak value range, from the first sample data. Then, these parameters are combined into structured feature sample data to summarize the core motion information in the original sampled data. Subsequently, the controller completes feature extraction from all the first sample data. Next, the extracted feature sample data is temporarily stored in an internal buffer before step S303 is executed.
[0042] S303. Cache the feature sample data and motion state information in the temporary storage area and discard the first sample data; In this embodiment, after obtaining the feature sample data, the controller needs to append a state identifier indicating the current motion state to the feature sample data, so that the batch of data can be clearly identified as feature information generated in the motion state in the temporary storage area. Then, the feature sample data with the appended state identifier is written to the temporary storage area, completing the caching operation. Next, after confirming that the feature sample data has been safely stored in the temporary storage area, the first sample data retained in the second cache area is discarded, releasing the storage space occupied by the second cache area and avoiding the continuous accumulation of original data.
[0043] S304. If the state detection result is a deep static state, then the first sample data is cached in the temporary storage area, and the data sample collection frequency of the second buffer area is reduced. In this embodiment, when the state detection result determines that the device is currently in a deep still state, it indicates that the device wearer may be in a sleeping or completely still work scenario. Because the signal amplitude is extremely low and does not fluctuate significantly for a long time in the deep still state, the sensor can completely capture occasional weak physiological signals without high-frequency sampling. Therefore, the controller needs to first write the first sample data completely into the temporary storage area in its original format to preserve complete information for subsequent time alignment with the first sensor data and signal analysis. Then, based on the determination result, a configuration command is sent to the second sensor to reduce its data acquisition frequency. Next, after receiving the command, the second sensor adjusts its sampling rate from the current value to a preset lower frequency, extending the interrupt trigger interval and reducing the number of controller wake-ups. Finally, after confirming the configuration is complete, the temporary storage area has completely saved the deep still state data, and the second sensor officially enters the low-frequency sampling mode.
[0044] S305. If the state detection result is a static state, then the first sample data is cached in the temporary storage area.
[0045] In this embodiment, when the state detection result determines that the user is currently stationary, it indicates that the user is awake but not making any significant physical movement. At this time, the controller writes the first sample data completely into the temporary storage area in its original format, preserving the original accuracy and complete timing information of the data, in preparation for time alignment and extraction / merging after the first sensor data sample is ready to be read. Simultaneously, after data caching is completed, the current sampling frequency and cache threshold of the second sensor remain unchanged, and the acquisition frequency of the second sensor is not adjusted.
[0046] This embodiment introduces a state-based caching and processing mechanism based on state detection results, enabling the controller to adaptively select the optimal data caching and processing strategy according to the current motion state, stationary state, or deep stationary state of the device wearer after acquiring the first sample data.
[0047] Specifically, when the state detection result indicates a motion state, motion features are extracted from the first sample data. The simplified feature sample data and motion state information are cached in the temporary storage area, and the original first sample data is discarded. This effectively reduces the storage occupation of the temporary storage area when the motion signal fluctuates violently and the original data information density is low, while retaining the key context information during the motion for subsequent data merging and analysis. When the state detection result indicates a deep static state, the first sample data is cached completely in its original format in the temporary storage area, and the data sample acquisition frequency of the second buffer area is reduced simultaneously. This ensures the complete capture of weak physiological signals during deep static states and reduces unnecessary frequent wake-ups and data transmission overhead by reducing the frequency, further reducing the power consumption of the controller. When the state detection result indicates a static state, the first sample data is directly cached in the temporary storage area while keeping the sensor parameters unchanged. This ensures data integrity while avoiding unnecessary parameter adjustment operations and achieves fine differentiation of data processing and storage strategies under different motion scenarios, balancing data fidelity and power consumption.
[0048] In step S102 above, if the wake-up interrupt signal is triggered by a single sensor wake-up, the specific implementation of reading the first sample data in the buffer corresponding to the sensor that triggered the wake-up, and obtaining the data sample collected by another sensor during the acquisition time of the first sample data, can be found in [reference needed]. Figure 4 As shown, Figure 4 An embodiment of the first sensor data reading in the low-power data acquisition method provided in this application includes: S401. If the sensor that triggered the wake-up is the first sensor, then check whether an overflow event has occurred in the first buffer. In this embodiment, when the controller confirms that the sensor triggered for this wake-up is the first sensor, it first checks whether an overflow event has occurred in the first buffer. To detect overflow events, the first sensor has a two-level interrupt mechanism: a half-full interrupt is triggered when the buffer data reaches a first preset buffer threshold, and a full interrupt is triggered when the buffer is completely filled. If the controller fails to respond to the half-full interrupt in time due to other task blocking, the first sensor will continue to collect data and write it to the first buffer until the first buffer is completely filled and a full interrupt is triggered. Then, the controller queries the interrupt status register of the first sensor to determine whether this wake-up was triggered by a full interrupt; if it is a half-full interrupt, it indicates that no overflow has occurred, and step S402 is executed; if it is a full interrupt, it indicates that an overflow event has occurred, and the controller records this overflow event, increments the overflow count, and executes step S404.
[0049] It should be noted that an overflow event occurs when the first sensor reaches the first preset buffer threshold and triggers an interrupt signal, but the controller fails to respond to the interrupt and read the buffer data in time due to other task blocking or other reasons. As a result, the first sensor continues to write newly collected data samples into the buffer until the buffer is completely filled. At this time, the earliest data samples stored in the buffer may be overwritten by the new data and permanently lost. This phenomenon is called an overflow event.
[0050] S402. Read the data sample in the first buffer to obtain the first sample data; execute step S403; In this embodiment, when it is determined that the wake-up was triggered by a half-full interrupt, it indicates that an overflow event has occurred. The controller will first read out the data samples accumulated in the first buffer to the first preset buffer threshold in a batch manner through the communication interface. Then, the controller marks the batch of data samples read from the first buffer as the first sample data, clears the half-full interrupt flag of the first sensor, confirms that the interrupt has been responded to normally, and executes step S403.
[0051] S403. Extract data samples from the temporary storage area according to the corresponding time period of the first sample data; In this embodiment, after obtaining the first sample data, the controller first parses the timestamps of the first and last sampling points in the first sample data to determine the precise acquisition time range of the batch of data. Then, using this time range as an index, it searches and matches in the temporary storage area. Since the second sensor has cached its data samples or motion features in the temporary storage area in chronological order during previous wake-ups, data content belonging to the same time period as the first sample data can be filtered out based on the time range. Next, the filtered data can be extracted from the temporary storage area so that the controller can merge the data samples extracted from the temporary storage area with the first sample data, and perform centralized processing operations such as cardiac impaction signal filtering, peak detection, heart rate calculation, photoplethysmography data processing, and heart rate variability updates on the merged dataset.
[0052] S404. Read the data sample in the first buffer to obtain the first sample data; execute step S405; In this embodiment, when it is confirmed that the wake-up is triggered by a memory full interrupt in the first buffer, it indicates that an overflow event has occurred. At this time, the controller reads all the data samples currently stored in the first buffer at once using a batch read method. Then, this batch of data is marked as the first sample data. Next, the full interrupt flag of the first sensor is cleared, and the relevant information of this overflow event is written to the diagnostic log, including the time of the overflow and the number of consecutive overflows, and step S405 is executed.
[0053] S405. Extract data samples from the temporary storage area according to the corresponding time period of the first sample data; In this embodiment, after completing the reading of the first sample data, the controller first parses the timestamp range of the actual retained data in the first sample data read after the full interrupt trigger. Since overflow may cause the loss of some earlier data, the starting point of this time range may be later than the actual start time of the first sensor's data acquisition. Then, using this actual time range as an index, the controller searches in the temporary storage area to filter out the second sensor data samples or motion feature data that match the time range. This allows the controller to merge the data samples extracted from the temporary storage area with the first sample data, and then perform centralized processing operations on the merged dataset, such as cardiac impaction signal filtering, peak detection, heart rate calculation, photoplethysmography data processing, and heart rate variability updates.
[0054] S406. Determine whether the overflow event has continuously reached the preset value; In this embodiment, after completing the reading of the first sample data of the overflow event and the extraction of data samples from the temporary storage area, the controller reads the currently recorded number of consecutive overflows. The number of consecutive overflows refers to the cumulative number of overflow events that occur consecutively when the controller is woken up by the first sensor multiple times; that is, the cumulative count of each wake-up being triggered by a full interrupt and not interrupted by a half-full interrupt. Then, the controller compares the current number of consecutive overflows with a preset value. It should be noted that the preset value can be set according to specific circumstances and is not specifically limited here. If the number of consecutive overflows reaches the preset value, step S407 is executed; if the number of consecutive overflows has not yet reached the preset value, the normal data reading process is returned, and the current first preset cache threshold is used again.
[0055] S407, Reduce the first preset cache threshold.
[0056] In this embodiment, when the number of consecutive overflows reaches a preset value, it indicates that the current first preset buffer threshold setting is no longer suitable for the current data acquisition rhythm. The controller needs to adjust the first preset buffer threshold from its current value to a smaller level according to a preset adjustment strategy. Then, a configuration command is sent to the first sensor via the communication interface to write the new first preset buffer threshold into the corresponding register of the first sensor. Subsequently, after receiving the command, the first sensor updates its interrupt trigger threshold, and thereafter will trigger interrupts based on the new threshold. Then, the consecutive overflow counter is cleared to zero and counting restarts.
[0057] In this embodiment, when the sensor triggering wake-up is the first sensor, the system first checks whether an overflow event has occurred in the first buffer, thereby identifying the risk of data loss before data reading. If no overflow occurs, the controller reads the data sample in the first buffer as the first sample data and extracts the pre-buffered data sample from the temporary storage area based on the acquisition time period of the first sample data, ensuring accurate time alignment of the dual-sensor data. If an overflow occurs, the controller promptly reads all currently retained data samples in the first buffer and extracts the corresponding data from the temporary storage area based on their acquisition time period, maximizing the recovery of usable dual-sensor data when some data may have been overwritten or lost. Next, by determining whether the overflow event continuously reaches a preset value, the controller's processing capability is dynamically evaluated. Furthermore, when the number of consecutive overflows reaches a preset value, the first preset buffer threshold is automatically reduced, shortening the interruption trigger interval of the first sensor and reducing the amount of data per transaction. This increases the time margin between each controller processing, reduces the risk of overflow events recurring, and balances the integrity of data acquisition with the ability to self-recover from anomalies.
[0058] Please see Figure 5 This application provides a device for data acquisition under low power consumption, comprising: The response unit 501 is used to respond to a wake-up interrupt signal and exit the sleep mode in the sleep mode. The wake-up interrupt signal comes from at least one of a first wake-up interrupt signal emitted by the first sensor and a second wake-up interrupt signal emitted by the second sensor. The first wake-up interrupt signal is triggered when the amount of data in the first buffer of the first sensor reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the amount of data in the second buffer of the second sensor reaches a second preset buffer threshold. The first reading unit 502 is used to read the first data sample in the buffer corresponding to the sensor that triggered the wake-up if the triggering type of the wake-up interrupt signal is single sensor wake-up, and to obtain the data sample collected by another sensor during the acquisition time period of the first sample data.
[0059] Optionally, the first reading unit 502 is specifically used for: If the sensor that triggers the wake-up is the second sensor, then the data sample in the second buffer is read to obtain the first sample data; Based on the running status of the first sample data, cache the first sample data in the temporary storage area; Determine whether the data samples in the first cache area have reached the first preset cache threshold; If so, read the data samples in the first buffer and extract the data samples in the temporary storage area according to the corresponding time period of the data samples in the first buffer.
[0060] Optionally, the first reading unit 502 is also specifically used for: If not, determine whether the accumulated duration corresponding to the first sample data that has been read has reached the interrupt cycle corresponding to the first buffer. If so, read the data samples in the first buffer area, and extract the data samples in the temporary storage area according to the collection time period of the data samples in the first buffer area. If not, it will re-enter hibernation mode and wait for the next wake-up.
[0061] Optionally, the first reading unit 502 is also specifically used for: Perform state detection on the first sample data to obtain the state detection results; If the state detection result is a motion state, then motion feature extraction is performed on the first sample data to obtain feature sample data; The feature sample data and motion state information are cached in the temporary storage area, and the first sample data is discarded. If the state detection result is a deep static state, the first sample data is cached in the temporary storage area, and the data sample collection frequency of the second buffer area is reduced. If the state detection result is a static state, the first sample data is cached in the temporary storage area.
[0062] Optionally, the first reading unit 502 is also specifically used for: If the sensor that triggered the wake-up is the first sensor, then check whether an overflow event has occurred in the first buffer. If not, read the data sample in the first buffer to obtain the first sample data; Extract data samples from the temporary storage area based on the corresponding time period of the first sample data.
[0063] Optionally, the first reading unit 502 is also specifically used for: If so, then read the data sample in the first buffer to obtain the first sample data; Extract data samples from the temporary storage area based on the corresponding time period of the first sample data; Determine if the overflow event continuously reaches a preset value; If so, then lower the first preset cache threshold.
[0064] Optionally, a second reading unit 503 is also included, specifically for: If the sensor that triggers the wake-up is a dual-sensor wake-up, then according to the interrupt priority policy, the data sample in the first buffer is read. The interrupt priority policy indicates that the reading order of the first buffer of the first sensor takes precedence over the second buffer of the second sensor. Read data samples from the second buffer.
[0065] Please see Figure 6 This application also provides a device for data acquisition under low power consumption, comprising: Processor 601, memory 602, input / output unit 603, bus 604; The processor 601 is connected to the memory 602, the input / output unit 603, and the bus 604; The memory 602 stores a program, and the processor 601 calls the program to execute any of the methods described above.
[0066] This application also relates to a computer-readable storage medium on which a program is stored, which, when run on a computer, causes the computer to perform any of the methods described above.
[0067] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0068] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0069] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0070] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0071] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A low-power data acquisition method, characterized in that, The method includes: In sleep mode, respond to a wake-up interrupt signal and exit the sleep mode. The wake-up interrupt signal comes from at least one of a first wake-up interrupt signal emitted by a first sensor and a second wake-up interrupt signal emitted by a second sensor. The first wake-up interrupt signal is triggered when the amount of data in the first buffer of the first sensor reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the amount of data in the second buffer of the second sensor reaches a second preset buffer threshold. If the wake-up interrupt signal is triggered by a single sensor wake-up, then the first sample data in the buffer corresponding to the sensor that triggered the wake-up is read, and the data sample collected by another sensor during the acquisition time of the first sample data is obtained.
2. The method according to claim 1, characterized in that, The process of reading the first sample data in the buffer corresponding to the sensor that triggered the wake-up, and obtaining data samples collected by another sensor during the acquisition time period of the first sample data, includes: If the sensor that triggers the wake-up is the second sensor, then the data sample in the second buffer is read to obtain the first sample data; Based on the running status of the first sample data, the first sample data is cached in the temporary storage area; Determine whether the data samples in the first cache area have reached the first preset cache threshold; If so, read the data samples in the first cache area, and extract the data samples in the temporary storage area according to the corresponding time period of the data samples in the first cache area.
3. The method according to claim 2, characterized in that, After determining whether the data samples in the first cache area have reached the first preset cache threshold, the method further includes: If not, determine whether the accumulated duration corresponding to the first sample data that has been read has reached the interrupt period corresponding to the first buffer. If so, read the data samples in the first buffer area, and extract the data samples in the temporary storage area according to the collection time period of the data samples in the first buffer area. If not, it will re-enter hibernation mode and wait for the next wake-up.
4. The method according to claim 2, characterized in that, The step of caching the first sample data to a temporary storage area based on the running status of the first sample data includes: Perform state detection on the first sample data to obtain the state detection result; If the state detection result is a motion state, then motion feature extraction is performed on the first sample data to obtain feature sample data; The feature sample data and the motion state information are cached in the temporary storage area, and the first sample data is discarded; If the state detection result is a deep static state, then the first sample data is cached in the temporary storage area, and the data sample collection frequency of the second cache area is reduced. If the state detection result is a static state, then the first sample data is cached in the temporary storage area.
5. The method according to claim 2, characterized in that, Before reading the data sample in the second buffer if the sensor that triggers the wake-up is the second sensor, the method further includes: If the sensor that triggered the wake-up is the first sensor, then check whether an overflow event has occurred in the first buffer. If not, then read the data sample in the first buffer area to obtain the first sample data; Based on the corresponding time period of the first sample data, extract data samples from the temporary storage area.
6. The method according to claim 5, characterized in that, After checking whether an overflow event has occurred in the first buffer, the method further includes: If so, then read the data sample in the first buffer area to obtain the first sample data; Based on the corresponding time period of the first sample data, extract the data samples from the temporary storage area; Determine whether the overflow event continuously reaches a preset value; If so, then lower the first preset cache threshold.
7. The method according to any one of claims 1 to 6, characterized in that, Before reading the data sample in the buffer corresponding to the sensor that triggered the wake-up if the wake-up interrupt signal is a single sensor wake-up, to obtain the first data sample, and before obtaining the data sample collected by another sensor during the data acquisition time period of the first sample, the method further includes: If the sensor that triggers the wake-up is a dual-sensor wake-up, then according to the interrupt priority policy, the data sample in the first buffer is read. The interrupt priority policy indicates that the first buffer of the first sensor is read in a priority order than the second buffer of the second sensor. Read data samples from the second buffer.
8. A device for data acquisition under low power consumption, characterized in that, The device includes: A response unit is configured to respond to a wake-up interrupt signal and exit the sleep mode in a sleep mode. The wake-up interrupt signal is from at least one of a first wake-up interrupt signal emitted by a first sensor and a second wake-up interrupt signal emitted by a second sensor. The first wake-up interrupt signal is triggered when the amount of data in the first buffer of the first sensor reaches a first preset buffer threshold, and the second wake-up interrupt signal is triggered when the amount of data in the second buffer of the second sensor reaches a second preset buffer threshold. The first reading unit is used to read the first data sample in the buffer corresponding to the sensor that triggered the wake-up if the triggering type of the wake-up interrupt signal is single sensor wake-up, and to obtain the data sample collected by another sensor during the acquisition time period of the first sample data.
9. A device for data acquisition under low power consumption, characterized in that, The device includes: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed on a computer, performs the method as described in any one of claims 1 to 7.