Method for data sampling and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请实施例提供了一种数据采样的方法及电子设备,以至少解决由于连续分析物监测设备的分析物值的输出频率与加速度计的采样频率不匹配,相关技术为了降低功耗将加速度计固定为低频采样,导致在运动场景下监测精度低下的技术问题
[0010] In this embodiment, a dynamic state switching method for the accelerometer sampling frequency is adopted. By detecting the motion state of the target object in the first state, and switching the continuous analysis object monitoring device from the first state to the second state to collect acceleration data at a high frequency when the motion state meets the preset change conditions, the target sampling data is determined based on the acceleration data and the analysis object value at the time of analysis object value generation. This achieves the goal of balancing low power consumption and monitoring accuracy in motion scenarios, thereby improving the technical effect of continuous analysis object monitoring in motion scenarios. It also solves the technical problem of low monitoring accuracy in motion scenarios caused by the mismatch between the output frequency of the analysis object value of the continuous analysis object monitoring device and the sampling frequency of the accelerometer, which leads to the related technology fixing the accelerometer to low frequency sampling in order to reduce power consumption.
Smart Images

Figure CN122545844A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a data sampling method and electronic device. Background Technology
[0002] When integrating an accelerometer into a continuous analyte monitoring device (such as continuous glucose monitoring, CGM) to identify motion artifacts, the output frequency of the analyte value in the continuous analyte monitoring device does not match the sampling frequency of the accelerometer. If the accelerometer is allowed to continuously run at full speed with high-frequency sampling, although the complete motion waveform can be obtained, it will lead to a sharp increase in system power consumption. In order to reduce power consumption, related technologies fix the accelerometer to low-frequency sampling, resulting in low accuracy of analyte monitoring in motion scenarios.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a data sampling method and electronic device to at least solve the technical problem of low monitoring accuracy in motion scenarios caused by the mismatch between the output frequency of the analyte value of the continuous analyte monitoring device and the sampling frequency of the accelerometer, and the related technology fixing the accelerometer to low frequency sampling in order to reduce power consumption.
[0005] According to one aspect of the embodiments of this application, a data sampling method is provided, comprising: detecting the motion state of a target object when a continuous analyte monitoring device is in a first state, wherein an accelerometer in the continuous analyte monitoring device corresponds to a first sampling frequency in the first state; switching the continuous analyte monitoring device from the first state to a second state when the motion state meets preset change conditions, wherein a second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency; collecting acceleration data of the target object in the motion state according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of the motion state on the change of the analyte value; and determining the target sampling data of the continuous analyte monitoring device based on the acceleration data and the analyte value at the time when the analyte value is generated by the continuous analyte monitoring device.
[0006] According to another aspect of the embodiments of this application, a data sampling apparatus is also provided, comprising: a detection module, configured to detect the motion state of a target object when the continuous analyte monitoring device is in a first state, wherein the accelerometer in the continuous analyte monitoring device corresponds to a first sampling frequency in the first state; a switching module, configured to switch the continuous analyte monitoring device from the first state to a second state when the motion state meets preset change conditions, wherein the second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency; an acquisition module, configured to acquire acceleration data of the target object in the motion state according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of the motion state on the change of the analyte value; and a determination module, configured to determine the target sampling data of the continuous analyte monitoring device based on the acceleration data and the analyte value at the time when the analyte value of the continuous analyte monitoring device is generated.
[0007] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and used to execute the above-described data sampling method.
[0008] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described data sampling method by running the computer program.
[0009] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described data sampling method.
[0010] In this embodiment, a dynamic state switching method for the accelerometer sampling frequency is adopted. By detecting the motion state of the target object in the first state, and switching the continuous analysis object monitoring device from the first state to the second state to collect acceleration data at a high frequency when the motion state meets the preset change conditions, the target sampling data is determined based on the acceleration data and the analysis object value at the time of analysis object value generation. This achieves the goal of balancing low power consumption and monitoring accuracy in motion scenarios, thereby improving the technical effect of continuous analysis object monitoring in motion scenarios. It also solves the technical problem of low monitoring accuracy in motion scenarios caused by the mismatch between the output frequency of the analysis object value of the continuous analysis object monitoring device and the sampling frequency of the accelerometer, which leads to the related technology fixing the accelerometer to low frequency sampling in order to reduce power consumption. Attached Figure Description
[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0012] Figure 1 This is a hardware structure block diagram of a computer terminal for a data sampling method according to an embodiment of this application;
[0013] Figure 2 This is a flowchart of a data sampling method according to an embodiment of this application;
[0014] Figure 3 This is a system architecture diagram of a data sampling method according to an embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the state transition of a state machine model of a data sampling method according to an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of a sliding time window for a data sampling method according to an embodiment of this application;
[0017] Figure 6 This is a schematic diagram of a data sampling device according to an embodiment of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:
[0021] Continuous Glucose Monitoring (CGM) is a technology that uses a micro-sensor implanted under the skin to monitor the glucose concentration in the interstitial fluid in real time. It can continuously and dynamically reflect the trend of blood glucose changes. In the embodiments of this application, as a type of continuous analyte monitoring device, the CGM device outputs calibrated blood glucose values at intervals of 1 minute (60 seconds) as the basis data for fusion with acceleration data.
[0022] Accelerometer: A sensor that can measure the acceleration of an object. It quantifies the intensity and pattern of motion by detecting the motion state of the object in three-dimensional space. In the embodiments of this application, the accelerometer is used to collect motion data of the target object and capture motion details in a preset sampling mode. The collected data is used to identify motion artifacts in continuous analysis of object monitoring.
[0023] Motion artifact: This refers to the phenomenon that causes the monitoring signal to be distorted or the data to be abnormal due to poor contact between the sensor and the skin or disturbance of interstitial fluid caused by human movement. In the embodiments of this application, motion artifact is the main interference factor that needs to be identified and compensated for by the continuous analyte monitoring device in motion scenarios. Accelerometer data is used to assist in the identification of this artifact.
[0024] Table-Driven State Machine: A software design pattern that implements state transitions through table lookup. The state transition table contains elements such as the current state, triggering event, execution action, and next state. In this embodiment, the table-driven state machine is used to model the sampling control process of a continuous analysis object monitoring device, thereby achieving fine-grained management and power consumption control of the accelerometer sampling state.
[0025] Silent listening: The system operates in an ultra-low power mode, maintaining only basic monitoring functions and waiting for external triggers. In this embodiment, silent listening is the default state (i.e., the first state) of the state machine model. At this time, the accelerometer operates in a 1Hz ultra-low power mode, and the MCU is in Deep Sleep mode.
[0026] Motion wake-up: The system is activated from a low-power state by a motion detection signal and enters a transitional state to prepare for higher frequency data acquisition. In this embodiment, the motion wake-up state (i.e., the third state) is triggered by the accelerometer's activity detection hardware interrupt and is used to determine the duration of motion and decide whether to switch to the high-speed acquisition state.
[0027] High-speed acquisition: The system continuously acquires sensor data at a high sampling frequency. In this embodiment, the accelerometer operates in a 50Hz high-frequency sampling mode in the high-speed acquisition state (i.e., the second state) and opens the internal FIFO buffer to fully capture motion details.
[0028] Feature fusion: The process of integrating feature information from different sensors or data sources to form a unified feature vector. In this embodiment, the feature fusion state (i.e., the fourth state) is triggered when the analytical value of the continuous analytical monitoring device is generated. The motion feature vector within the time-aligned sliding window is bound to the analytical value to form a fused data pair.
[0029] With the development of continuous analyte monitoring (CGM) technology, in order to improve the monitoring accuracy in motion scenarios, it is necessary to integrate accelerometers for motion artifact recognition, etc. Taking CGM devices as an example, CGM devices typically output calibrated blood glucose values at 1-minute (60-second) intervals, while in order to accurately capture motion details, accelerometers often need to sample at a high frequency of 50Hz (i.e., 50 times per second).
[0030] In related technologies, addressing this contradiction between "high-frequency sampling" and "low-frequency output" typically faces the following technical bottlenecks:
[0031] (1) The design trade-off between power consumption and accuracy fails: If the accelerometer is allowed to run at full speed of 50Hz continuously, although it can obtain the complete motion waveform, it will cause the system power consumption to increase sharply. For CGM transmitters that rely on micro button batteries and need to be worn continuously for more than 15 days, this will cause the battery life to be shortened to an unacceptable level (such as from 15 days to 3 days), which violates the long battery life requirement of wearable devices.
[0032] (2) Distortion of data fusion: If the accelerometer is fixed to low frequency sampling (e.g., 1Hz) in order to save power, the high frequency components in the motion signal (e.g., impact peak, vibration frequency) will be lost. This makes it impossible for the upper-level algorithm to effectively distinguish different motion modes and to accurately compensate for low-frequency blood glucose values using high-frequency data, which seriously affects the monitoring accuracy in motion scenarios.
[0033] To address the aforementioned technical problems, this application provides corresponding solutions, which are detailed below.
[0034] The data sampling method embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a data sampling method is shown. Figure 1As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0035] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data sampling method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned data sampling method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0037] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.
[0038] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.
[0039] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.
[0040] In the above operating environment, this application provides a data sampling method embodiment. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.
[0041] Figure 2 This is a flowchart of a data sampling method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0042] Step S202: When the continuous analyzer monitoring device is in the first state, the motion state of the target object is detected, wherein the accelerometer in the continuous analyzer monitoring device corresponds to the first sampling frequency in the first state.
[0043] In step S202 above, the continuous analyte monitoring device is an implantable, patch-on, or wearable micro-medical electronic system. It uses biosensors to collect physical or chemical signals of target analytes (including but not limited to glucose, ketone bodies (trihydroxybutyric acid), lactic acid, uric acid, ethanol, electrolytes, blood gases, hormones, proteins, and drug concentrations) in a specific physiological environment within a target object (such as the human body) in real time, continuously, or at high frequency. It then uses a built-in algorithm to periodically or continuously convert the raw sensor signals into quantitative concentration values of the analyte. Finally, it transmits these values to a display terminal or cloud platform via a wireless communication module to achieve all-weather tracking of the dynamic changes in the target analyte. The continuous analyte monitoring device integrates an accelerometer to assist in identifying motion artifacts in motion scenarios.
[0044] For ease of understanding, the following embodiments use a continuous glucose monitoring (CGM) device as an example. It should be understood that the application scenarios of the data sampling method used in this application are not limited to this, and the sampling and monitoring of blood glucose values can also be applied to other analytes. The CGM device refers to a wearable medical device that monitors the glucose concentration in subcutaneous interstitial fluid in real time through a micro-sensor implanted under the skin, and can output calibrated blood glucose values at fixed time intervals.
[0045] The first state refers to the low-power operating state of the accelerometer in the continuous analyte monitoring device, which operates at a lower sampling frequency, such as the silent listening state. At this time, the accelerometer operates in an ultra-low power mode at the first sampling frequency (such as 1 Hz), the microcontroller is in a deep sleep mode, and the overall power consumption of the system is extremely low to ensure the long-term battery life of the device.
[0046] It should be noted that motion artifacts are caused by human movement leading to poor contact between the sensor and the skin or disturbance of interstitial fluid, resulting in distortion or abnormal data in the monitoring signal of analyte values (such as blood glucose levels). Motion artifacts are the main interference factors that need to be identified and compensated for in motion scenarios for continuous analyte monitoring equipment. Accelerometer data can be used to help distinguish between changes in actual analyte values and signal noise caused by motion.
[0047] In some embodiments of this application, an event-driven table-driven state machine model can be constructed and embedded into the continuous analysis object monitoring device. When the state machine model is in the first state by default (such as the resting listening state), the accelerometer operates in an ultra-low power mode at the first sampling frequency, and the microcontroller (MCU) is in a deep sleep mode. The system uses the accelerometer's internal activity detection hardware interrupt mechanism to detect the motion state of the target object. The accelerometer continuously monitors the motion mode at the first sampling frequency. When a preset motion state change is detected, an interrupt signal is sent to the microcontroller through the hardware interrupt pin, thereby completing the detection of the target object's motion state in the first state.
[0048] In some other embodiments of this application, the accelerometer periodically collects triaxial acceleration data at a first sampling frequency. The microcontroller is woken up by a timer interrupt every certain time interval, reads the latest data in the accelerometer cache, performs vector magnitude calculation on the read acceleration data, and compares the calculation result with a preset motion detection threshold. If the vector magnitude exceeds the threshold multiple times in a row, it is determined that the target object is in motion, thus completing the detection of the target object's motion state in the first state.
[0049] It should be noted that the entire sampling control process can be modeled as an event-driven, table-driven state machine. This model aims to achieve fine-grained management of system power consumption through discrete state transitions and hardware interrupts, ensuring high controllability and high reliability of the system in complex and ever-changing operating environments.
[0050] Specifically, within the state machine model, multiple states are defined, including silent listening, motion wake-up, high-speed acquisition, and feature fusion. In the main controller firmware of the continuous analysis object monitoring device, the state machine is implemented using a table-driven method. For example, a state transition table is defined, where each row contains: current state, triggering event, executed action, and next state. State transitions are determined by looking up the table, improving the maintainability and flexibility of the code.
[0051] In some embodiments of this application, the state transitions of the state machine model can be triggered by specific events. Taking a CGM device as an example, these include, but are not limited to:
[0052] (1) Timed events (events generated by the system timer according to a preset time period), for example, the feature fusion state is triggered once every 60-second CGM output cycle. For example, the CGM device outputs calibrated blood glucose values at fixed intervals of 60 seconds. When each output cycle is reached, the timer triggers an event, driving the state machine to enter the feature fusion state, binding and fusing the motion feature vector in the current sliding window with the newly generated blood glucose value.
[0053] (2) Hardware interrupt events (interrupt signals generated by the internal hardware circuitry of the accelerometer), such as accelerometer activity detection interrupts. For example, when the accelerometer's activity detection mechanism detects a preset change in motion state, it sends an interrupt signal to the microcontroller through the hardware interrupt pin, directly triggering the state machine to perform a state transition, such as from the resting listening state to the motion wake-up state. This event does not rely on software polling, has a fast response speed, and the microcontroller only sets the status flag in the interrupt service routine without performing complex calculations, ensuring real-time performance.
[0054] (3) Data events (events triggered by data ready signals such as CGM analog-to-digital conversion completion), for example, CGM analog-to-digital conversion completion. For example, when the CGM sensor completes the analog-to-digital conversion of subcutaneous interstitial fluid glucose concentration and generates a digital signal, a data ready event is generated, triggering the state machine to enter the corresponding processing state, such as feature fusion state or data transmission state.
[0055] The three event types mentioned above together constitute the event-driven foundation of the state machine model. Through discrete event triggering and hardware interrupt collaboration, fine-grained management of system power consumption is achieved, ensuring that CGM devices have high controllability and high reliability in complex and ever-changing operating environments.
[0056] In some embodiments of this application, to achieve precise control as defined by the state machine and meet the real-time and low-power requirements of the continuous analyte monitoring device, interrupt service context processing and non-blocking main loop scheduling can be used to invoke the above steps in the continuous analyte monitoring device. Specifically, for hardware interrupt contexts: accelerometer activity detection interrupts and timer interrupts directly trigger state machine transitions. In the interrupt service routine (ISR), only status flags are set, and no complex calculations are performed to ensure the real-time nature of the interrupt response.
[0057] For the main loop's non-blocking scheduling: subsequent feature calculations (such as RMS and entropy values) are executed asynchronously as low-priority tasks within the main loop, triggered by "feature calculation events." The main loop employs cooperative scheduling, processing events in the queue sequentially in a non-blocking manner. Once all events are processed, the system kernel immediately enters a low-power sleep mode, waiting for the next interrupt to wake it up.
[0058] It should be noted that interrupt service context handling refers to the execution method where hardware interrupts directly drive state machine transitions. Accelerometer activity detection interrupts and timer interrupts serve as hardware interrupt sources; when these interrupts occur, they directly trigger state transitions in the state machine. Non-blocking main loop scheduling refers to a mechanism where the main program loop does not use blocking or waiting methods, but instead employs a cooperative task processing mechanism through event queues. Once all events are processed, the system kernel immediately enters a low-power sleep mode, waiting for the next hardware interrupt to wake it up, thereby minimizing power consumption during idle periods.
[0059] Step S204: When the motion state meets the preset change conditions, the continuous analyte monitoring device is switched from the first state to the second state, wherein the second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency.
[0060] In step S204 above, the preset change condition refers to the judgment condition that triggers the continuous analyte monitoring device to switch from the first state to the second state. This includes, but is not limited to, the motion duration exceeding a preset threshold and the motion intensity reaching a preset level. This is used to ensure that high-frequency sampling is triggered only when there is a genuine need for continuous motion, thus avoiding invalid power consumption caused by instantaneous vibration.
[0061] The second state refers to the state in which the accelerometer in the continuous analyte monitoring equipment operates at a higher sampling frequency, such as the high-speed acquisition state. In this state, the accelerometer operates at the second sampling frequency (such as 50 Hz), and the microcontroller exits the deep sleep mode and enters the full-speed operation mode to fully capture motion details to support motion artifact recognition and analysis of changes in analyte values.
[0062] In some embodiments of this application, the continuous analyte monitoring device can be switched from a first state to a second state in the following manner: when the motion state meets a preset change condition, the continuous analyte monitoring device can be switched from the first state to the second state, including: when the motion state changes, determining the first duration of the changed first target motion state; when the first duration is longer than the first preset duration, the continuous analyte monitoring device can be switched from the first state to the second state.
[0063] Specifically, when the state machine model is in the first state by default, the accelerometer operates in an ultra-low power mode of 1Hz, and the MCU is in Deep Sleep mode. When an activity change is detected, the accelerometer's internal ActivityDetection hardware interrupt mechanism is used to continuously monitor the motion pattern. Only when a preset motion state change (such as from stationary to walking) is detected will the MCU be woken up via a hardware interrupt pin. Subsequently, the MCU or the accelerometer's built-in algorithm quickly determines the duration of the motion. If the duration of the motion exceeds a preset threshold (such as 5 seconds), the state machine transitions to the second state. The MCU dynamically configures the accelerometer to a 50Hz high-frequency sampling mode and enables its internal FIFO buffer. It should be noted that if the motion is fleeting, the system directly returns to the first state.
[0064] In some embodiments of this application, the preset duration (including the first preset duration mentioned above and the second preset duration below) can be determined in the following ways: obtaining the remaining power value of the continuous analyte monitoring device and the motion intensity corresponding to the motion state; when the remaining power value is greater than the first preset power value and the motion intensity is greater than the preset intensity, decreasing the first preset duration and / or the second preset duration; when the remaining power value is less than the second preset power value, or when the occurrence time of the motion state is within a preset time interval, increasing the first preset duration and / or the second preset duration, wherein the second preset power value is less than the first preset power value.
[0065] Specifically, the system maintains a power consumption and motion intensity decision matrix to intelligently select the optimal power consumption strategy. In aggressive wake-up mode, when the remaining power value is greater than a first preset power value and the motion intensity is greater than a preset intensity, a high-sensitivity sub-strategy is adopted to reduce the preset duration, such as shortening the preset duration from 5 seconds to 3 seconds, to ensure that no motion details are missed. In conservative power-saving mode, when the remaining power value is less than a second preset power value, or when the motion occurs within a preset time interval (such as at night), the system automatically increases the preset duration, such as extending the preset duration from 5 seconds to 10 seconds, maintaining high-frequency sampling only when continuous large-amplitude body movement is clearly detected, thereby maximizing the battery life of the continuous analysis monitoring device.
[0066] The above embodiments adopt a method of dynamically adjusting the preset duration based on the remaining power value and the intensity of exercise. By reducing the preset duration when the power is sufficient and the exercise is vigorous, the feature granularity is improved, and the preset duration is increased when the power is insufficient or during periods of low activity, the power consumption is reduced. This achieves the goal of adaptively balancing feature extraction accuracy and device battery life under different operating conditions, thereby avoiding the power consumption waste or feature loss caused by a fixed preset duration.
[0067] In some embodiments of this application, in addition to adjusting the preset duration, the activity detection trigger threshold can also be adjusted. It should be noted that the activity detection trigger threshold refers to the acceleration amplitude judgment standard used in the accelerometer's internal activity detection mechanism to determine whether the motion state has changed. That is, when the acceleration signal detected by the accelerometer exceeds this threshold, it is determined that the target object has undergone a change in motion state, and the microcontroller is then woken up via a hardware interrupt pin.
[0068] Furthermore, when the battery is sufficiently charged and vigorous movement is detected, a high-sensitivity sub-strategy is adopted to reduce the threshold or minimum duration requirement for activity detection triggering (e.g., from 5 seconds to 3 seconds); at night or when the battery is below 20%, the system automatically increases the trigger threshold and significantly extends the minimum movement duration required to enter the second state from 5 seconds (e.g., to 30 seconds).
[0069] In some embodiments of this application, the following steps may also be performed: when the motion state meets preset change conditions, the continuous analyte monitoring device is switched from a first state to a second state, including: when the motion state changes, the continuous analyte monitoring device is switched from a first state to a third state, wherein the third sampling frequency of the accelerometer corresponding to the third state is not less than the first sampling frequency and less than the second sampling frequency; in the third state, the second duration of the changed second target motion state is determined, and when the second duration is greater than the second preset duration, the continuous analyte monitoring device is switched from the third state to the second state.
[0070] It should be noted that the third state refers to the transitional state in the continuous analysis monitoring device where the accelerometer operates at an intermediate sampling frequency, such as the motion wake-up state. In this state, the accelerometer operates at the third sampling frequency, and the microcontroller exits deep sleep mode but has not yet entered full-speed operation mode. This is used to quickly determine the continuity of motion and avoid invalid high-frequency sampling caused by instantaneous vibrations. Moving from the first state to the third state allows for verification of whether the motion state has truly reached the target state using a relatively low sampling frequency. Compared to directly moving from the first state to the second state, this is more energy-efficient and provides higher state recognition accuracy.
[0071] Specifically, when the state machine model is in the first state by default (e.g., the resting listening state), the accelerometer operates in an ultra-low power mode at the first sampling frequency, and the microcontroller is in a deep sleep mode. When an activity change is detected, the accelerometer's internal activity detection hardware interrupt mechanism identifies a preset motion state change (e.g., from stationary to walking), wakes up the microcontroller via a hardware interrupt pin, and the state machine model switches the continuous analysis monitoring device from the first state to the third state (e.g., the motion wake-up state). At this time, the microcontroller configures the accelerometer to operate at the third sampling frequency, which is not less than the first sampling frequency and less than the second sampling frequency, for quickly determining the continuity of motion, rather than directly entering full-speed operation.
[0072] Furthermore, in the third state (such as the motion wake-up state), the system uses the built-in algorithm of the microcontroller or accelerometer to quickly determine the duration of motion. The microcontroller collects acceleration data at a third sampling frequency and continuously monitors whether the motion is maintained by calculating characteristic values such as the root mean square value or peak value. When the comparison result indicates that the duration is longer than the preset duration (such as 5 seconds), the state machine switches the continuous analysis monitoring device from the third state to the second state (such as the high-speed acquisition state). The microcontroller dynamically configures the accelerometer to the second sampling frequency and opens its internal first-in-first-out buffer to fully capture motion details. If the motion is fleeting and the duration does not exceed the preset duration, the system directly returns to the first state.
[0073] The above embodiment has a transition mechanism that switches to the third state to determine the duration of motion when the motion state changes. By running at an intermediate sampling frequency in the third state and switching to the second state after the duration exceeds the preset duration, the purpose of avoiding invalid high-frequency sampling caused by instantaneous vibration is achieved, thereby realizing progressive power consumption management and improved motion detection reliability.
[0074] Step S206: Acceleration data of the target object in motion state is collected according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of the motion state on the change of the analysis value.
[0075] In step S206 above, acceleration data refers to the raw triaxial acceleration data or processed characteristic data (such as root mean square value, peak value, entropy value, etc.) collected by the accelerometer at the second sampling frequency. Analytical value change refers to the dynamic change process of the concentration of analyte in the target object over time. It should be noted that, taking blood glucose as an example, blood glucose changes are significantly affected by exercise state, and high-intensity exercise can lead to an increased rate of blood glucose decrease.
[0076] In some embodiments of this application, in the second state (such as the high-speed acquisition state), the accelerometer operates at a second sampling frequency. The system acquires the acceleration data of the target object in motion state according to the second sampling frequency. Further, the system divides the window into multiple sub-windows (such as 12) according to a preset duration. At the end of each sub-window, the system immediately performs real-time feature extraction on the original acceleration data in the sub-window. The calculated feature values include the root mean square value, peak value, and entropy value used to measure the complexity of the motion mode. Only these feature values are stored. The system maintains a fixed-length circular buffer in memory to store the feature values of the 12 most recent sub-windows. When a new sub-window feature value is generated, the oldest sub-window feature value is automatically overwritten. Further, the system uses a high-precision real-time clock to timestamp each sub-window feature value. During aggregation, the system performs precise filtering and weighting based on the timestamp to ensure the real-time performance and effectiveness of the fused features.
[0077] Step S208: At the moment when the analytical value of the continuous analytical monitoring device is generated, the target sampling data of the continuous analytical monitoring device is determined based on the acceleration data and the analytical value.
[0078] In step S208 above, the analyte value generation time refers to the point in time when the continuous analyte monitoring device generates the calibrated analyte value according to a fixed output cycle. For example, taking blood glucose value as an example, this cycle can be 60 seconds. The blood glucose value generation time is the precise reference point for time alignment between acceleration feature data and blood glucose value, and it is also the timing event source for the state machine to trigger the feature fusion state. It should be noted that the blood glucose value refers to the interstitial fluid glucose concentration value output by the CGM device after real-time monitoring by a micro-sensor implanted under the skin and processing by a calibration algorithm, reflecting the blood glucose level of the target object at the generation time.
[0079] Target sampling data refers to structured data determined by fusing acceleration data and analytical values at the time the analytical values are generated. In some embodiments of this application, target sampling data may also include fused data pairs and intermediate estimates generated based on interpolation compensation, which are sent to the host device to support display, prediction and warning.
[0080] In some embodiments of this application, the target sampling data can be determined through the following steps: determining a sliding time window based on the generation time of the analytical object, wherein the length of the sliding time window is determined based on the generation frequency of the analytical object; determining the historical acceleration data corresponding to the sliding time window from the acceleration data, wherein the historical acceleration data is the acceleration data before the generation time of the analytical object; determining the motion feature vector corresponding to the historical acceleration data at the generation time of the analytical object; and binding the motion feature vector to the analytical object to obtain the target sampling data.
[0081] Specifically, at the moment when the blood glucose value is generated by the CGM device, the target sampling data of the CGM device can be determined in the following ways: a sliding time window is determined based on the moment when the blood glucose value is generated, wherein the length of the sliding time window is determined based on the generation frequency of the blood glucose value; historical acceleration data corresponding to the sliding time window is determined from the acceleration data, wherein the historical acceleration data is the acceleration data before the moment when the blood glucose value is generated; at the moment when the blood glucose value is generated, the motion feature vector corresponding to the historical acceleration data is determined; the motion feature vector is bound to the blood glucose value to obtain the target sampling data.
[0082] It should be noted that the sliding time window refers to a time interval that traces back along historical timelines with the blood glucose value generation time as the alignment reference. Its length is determined based on the generation frequency of blood glucose values and is used to define the time range of historical acceleration data involved in feature calculations. The generation frequency refers to the time interval at which the CGM device outputs calibrated blood glucose values. For example, if the generation frequency is once every 60 seconds (i.e., once per minute), the length of the sliding time window can be determined to be 60 seconds.
[0083] Motion feature vectors refer to a set of features formed by extracting and aggregating features from historical acceleration data. In some embodiments of this application, motion feature vectors are formed by aggregating features such as root mean square value, peak value, and entropy value of each sub-window within a sliding time window, and are used to characterize the degree of influence of motion state on blood glucose changes.
[0084] Specifically, the system maintains a 60-second sliding time window, using the current blood glucose level generation time as the precise alignment point. The window range is defined as the time from 60 seconds back to the generation time, ensuring that the window precisely covers the complete time interval between the previous blood glucose level generation and the current generation time each time a blood glucose level is generated. It should be noted that the system can also employ an adaptive sliding time window length strategy, dynamically adjusting the window length based on the blood glucose level generation frequency and the current exercise state. For example, with a generation frequency of 60 seconds, if a drastic change in exercise intensity is detected, the system shortens the sliding time window to 30 seconds to highlight recent exercise characteristics; if the exercise state is stable, the 60-second window length is maintained.
[0085] Furthermore, at the moment the analysis value is generated, the motion feature vector corresponding to the historical acceleration data can be determined in the following way: when the continuous analysis object monitoring device is in the second state, the sliding time window is divided into multiple sub-windows; features are extracted from the sub-historical acceleration data corresponding to each sub-window to obtain sub-feature values, where the sub-feature values are used to quantify the motion intensity or motion pattern complexity of the target object, and the sub-historical acceleration data corresponding to multiple sub-windows together constitute the historical acceleration data; at the moment the analysis value is generated, the motion feature vector is determined based on the sub-feature values corresponding to multiple sub-windows.
[0086] It should be noted that a sub-window refers to a time segment further divided into sub-windows of a preset duration. For example, if the preset duration of a sub-window is 5 seconds, a 60-second sliding time window would be divided into 12 sub-windows, each corresponding to an independent acceleration data acquisition interval. Sub-feature values refer to the quantitative indicators obtained after feature extraction from the historical acceleration data within each sub-window. These may include root mean square (RMS) values, peak values, and entropy values. Motion intensity can be quantified using the RMS value; a larger RMS value indicates higher motion intensity. The complexity of the motion pattern can be quantified using the entropy value; a higher entropy value indicates a more complex and irregular motion pattern.
[0087] Specifically, when the continuous analysis monitoring device is in the second state (such as high-speed acquisition state), the accelerometer operates at the second sampling frequency. The system collects the acceleration data of the target object in motion state according to the second sampling frequency. The system divides the 60-second sliding time window into multiple sub-windows according to the preset duration, such as 5 seconds, resulting in 12 sub-windows. Each sub-window corresponds to an independent acceleration data acquisition interval.
[0088] Furthermore, the system performs real-time feature extraction on the corresponding historical acceleration data within each sub-window. At the end of each sub-window, the system immediately performs feature calculation on the raw acceleration data within that sub-window. The calculated sub-feature values include the root mean square value, the peak value, and the entropy value used to measure the complexity of the motion pattern. The root mean square value is used to quantify the motion intensity, the peak value is used to capture the instantaneous amplitude of impact-type motion, and the entropy value is used to measure the complexity of the motion pattern.
[0089] Furthermore, at the moment the analysis value is generated, the state machine enters the feature fusion state triggered by a timed event. The system aggregates all currently valid sub-feature values in the circular buffer, and performs precise filtering and weighting based on the timestamp of a high-precision real-time clock to ensure that only valid sub-window feature values are used in the aggregation. The aggregation operation can employ methods such as concatenation or statistical methods based on weighted averages and standard deviations. For example, the weighted average and standard deviation of the root mean square values of the 12 sub-windows are calculated and used as indicators of sustained motion intensity and motion intensity variability, respectively, together forming the motion feature vector.
[0090] The above embodiment adopts the method of dividing the sliding time window into multiple sub-windows and performing real-time feature extraction in the second state. By aggregating multiple sub-feature values at the time of analysis of object value generation to form a motion feature vector, the purpose of preserving motion detail information while reducing data storage pressure is achieved, thereby realizing time alignment and efficient fusion of heterogeneous data.
[0091] In some embodiments of this application, at the time of generating the analytical value, the continuous analytical monitoring device is switched from the second state to the fourth state, wherein the fourth state is used to send the target sampling data to the host device.
[0092] It should be noted that the fourth state, or feature fusion state, is where the microcontroller controls the communication module to send the target sampling data to the host device. After the transmission is complete, the system can return to a low-power state to save power. The host device refers to the upper-level device that establishes a communication connection with the continuous analyte monitoring equipment, such as a smartphone or a dedicated receiver.
[0093] Specifically, at the moment the analytical value is generated, the timed event trigger state machine of the continuous analytical monitoring device switches the system from the second state (such as the high-speed acquisition state) to the fourth state (such as the feature fusion state). The system immediately binds the motion feature vector within the current sliding time window with the newly generated analytical value to form a fused data pair as the target sampling data and sends it to the host device. After the transmission is completed, the state machine exits the fourth state according to the system schedule and returns to the first state or maintains the fourth state to wait for the next transmission instruction.
[0094] To facilitate understanding of the time-aligned sliding window feature mapping mechanism described above, the following explanation uses specific embodiments. Specifically, the time-aligned sliding window (TASW) mechanism is as follows:
[0095] (1) Time alignment mechanism: Figure 5 This is a schematic diagram of a sliding time window for a data sampling method according to an embodiment of this application, as shown below. Figure 5 As shown, the current CGM blood glucose value is generated at the time of generation. To ensure precise alignment, the system maintains a sliding window with a length of 60 seconds, the window range of which is defined as follows: That is, at the time when the CGM value is output, the historical acceleration data within 60 seconds prior to that time is used for feature calculation.
[0096] (2) Data storage optimization: Considering the capacity limitation of the hardware FIFO (which can usually only store tens to hundreds of sampling points), it is far from sufficient to store 3000 raw data points of 50Hz generated within 60 seconds. A real-time feature extraction and segmented circular storage strategy can be adopted:
[0097] Specifically, real-time feature calculation includes: in high-speed acquisition mode, the system divides the 60-second window into multiple sub-windows according to a preset duration (e.g., 5 seconds). The MCU does not store the original acceleration data, but immediately performs real-time feature extraction on the original data in the sub-window at the end of each sub-window. In some embodiments of this application, the calculated feature values include, but are not limited to: RMS (root mean square value, used to quantify motion intensity), peak value, and entropy value used to measure the complexity of motion patterns. Only these feature values are stored.
[0098] Circular buffer management includes: the system maintains a fixed-length circular buffer in memory to store the feature values of the most recent 12 (corresponding to 60 seconds / 5 seconds) sub-windows. It should be noted that when a new sub-window feature value is generated, it will automatically overwrite the oldest sub-window feature value.
[0099] Feature aggregation includes: when a CGM's timed event is triggered, in When generating blood glucose values, the system aggregates all currently valid sub-window feature values (f1, f2, ..., f12) in the circular buffer to form the final motion feature vector for fusion.
[0100] For example, the system can use a high-precision RTC (such as a 32.768kHz crystal oscillator) to timestamp the feature values of each sub-window, avoiding situations where the buffer is not full during the initial device wake-up and some sub-windows are marked as invalid due to FIFO overflow. During aggregation, precise filtering and weighting can be performed based on the timestamps to ensure the real-time performance and effectiveness of the fused features, accurately reflecting the motion state over the past 60 seconds. The aggregation operation can be concatenation or based on statistical methods such as weighted averages and standard deviations; no limitation is made here. For example, the weighted average and standard deviation of the RMS values of 12 sub-windows can be calculated as indicators of "continuous motion intensity" and "motion intensity variability," respectively, jointly forming the feature vector. .
[0101] It should be noted that when the CGM blood glucose level is 1 minute... During generation, the state machine must enter the feature fusion state and immediately bind the feature vectors within that window. To form a fused data pair (i.e., target sampling data) is sent to the host device.
[0102] In some embodiments of this application, the following steps may also be performed: obtaining the target motion feature vector corresponding to the intermediate time between two consecutive analytical value generation times; converting the target motion feature vector into the estimated analytical value change rate using a mapping model, wherein the mapping model is used to quantify the nonlinear influence of motion intensity on the analytical value change trend; determining the analytical value estimate at the intermediate time based on the estimated analytical value change rate; and generating the analytical value change curve between two consecutive analytical value generation times based on the analytical value estimate.
[0103] It should be noted that the two consecutive analyte generation times refer to the time points corresponding to two adjacent analyte values continuously output by the continuous analyte monitoring device at a fixed generation frequency. For example, the time interval between two consecutive blood glucose value generation times is 60 seconds, serving as the time boundary for interpolation compensation. The intermediate time refers to the time point located between the two consecutive analyte value generation times, used for interpolation compensation calculations to fill the time gap between two continuous analyte monitoring device samplings, providing higher temporal density data support for the analyte value change curve.
[0104] The target motion feature vector refers to the motion feature vector determined based on historical acceleration data within the sliding time window corresponding to the intermediate moment. The mapping model refers to the dynamic mapping function from the motion feature vector to the rate of change of the analyzed object value, which can be, for example, a nonlinear model that considers the user's historical data and the current motion pattern, or an online updated lookup table.
[0105] Specifically, taking blood glucose values as an example, the system maintains a fixed-length circular buffer to store the feature values of the most recent sub-windows. Between two consecutive blood glucose value generation times, the system uses the midpoint as the alignment point and, based on the timestamp of a high-precision real-time clock, filters out the historical acceleration data within the sliding time window ending at the midpoint from the circular buffer, aggregates all currently valid sub-window feature values within that window, and forms the target motion feature vector corresponding to the midpoint.
[0106] Furthermore, the system establishes a dynamic mapping model from exercise features to blood glucose change rate. This mapping model is a predefined mapping function. When the mapping model determines that the current exercise is high-intensity based on the target exercise feature vector, the estimated blood glucose decrease rate increases accordingly, thereby converting the target exercise feature vector into the estimated blood glucose change rate and quantifying the nonlinear effect of exercise intensity on blood glucose rate change.
[0107] Furthermore, based on the blood glucose measurement value and the estimated rate of change of blood glucose at the previous blood glucose value generation time, the system determines the estimated blood glucose value at intermediate time points through linear integration or difference calculation. For example, starting from the blood glucose value at the previous time point, using the estimated rate of change of blood glucose as the slope, the system calculates the blood glucose concentration at intermediate time points according to the time step, generating intermediate estimated values that conform to physiological reality. Subsequently, based on the blood glucose estimated values at each intermediate time point, the system performs interpolation fitting between two consecutive blood glucose value generation times to generate a smooth and continuous blood glucose change curve.
[0108] It should be noted that the above interpolation compensation does not change the original measurement value of the continuous analyte monitoring equipment, but is only used to generate an intermediate estimate between two samplings of the continuous analyte monitoring equipment, so that the measurement value Gt of the continuous analyte monitoring equipment remains unchanged. The interpolation result is only used for: (1) displaying a smoother and more continuous analyte change curve on terminals such as mobile APP; (2) providing higher time density input data for prediction algorithms; and (3) providing more timely analyte trend warnings in motion scenarios.
[0109] In addition, RMS (root mean square value) can be chosen as a quantitative indicator of exercise intensity. RMS can effectively reflect the energy of acceleration signals and has better sensitivity to impulsive movements (such as running and jumping). Compared with a simple average value, RMS can capture the instantaneous changes in exercise intensity, which is more in line with the nonlinear characteristics of the effect of exercise on blood sugar in physiology.
[0110] For example, the system establishes a dynamic mapping model from motion characteristics to blood glucose change rate:
[0111] Rate = Map( )
[0112] Where Map(·) is a predefined mapping function, which can be a non-linear model that considers user historical data and current movement patterns, or an online update lookup table. When the model is based on When the current activity is determined to be high-intensity exercise, the estimated rate of blood glucose decrease (Rate) will be increased accordingly. This will generate a blood glucose change curve that is more in line with the actual physiological situation between two CGM samplings, which can effectively compensate for the physiological delay of CGM and improve the monitoring accuracy in exercise scenarios.
[0113] In some embodiments of this application, the following steps may also be performed: obtaining the motion pattern of the target object, wherein the motion pattern is used to characterize the periodic motion law of the target object; predicting the trigger time of the motion event of the target object based on the motion pattern; and switching the continuous analyte monitoring device from a first state to a second state before the trigger time of the motion event.
[0114] It should be noted that the motion pattern refers to a set of regular motion characteristics formed by analyzing and learning from the historical motion data of the target object, including features such as the distribution of the time of motion occurrence, duration, and intensity level. The motion event trigger time refers to the specific time point predicted based on the motion pattern when the next motion will occur. It serves as the basis for the system to switch the sampling state in advance, ensuring that high-frequency sampling preparations are completed before the motion begins.
[0115] Specifically, the system learns and stores users' periodic movement habits to obtain the target object's movement patterns. For example, the system continuously records the target object's acceleration data from 18:00 to 19:00 every day, analyzes the root mean square value, duration, frequency, and other characteristics of the acceleration data during this period, summarizes them into a movement pattern that characterizes the user's periodic movement pattern, and stores this movement pattern in non-volatile storage space for subsequent prediction and retrieval.
[0116] Furthermore, based on the acquired movement patterns, the system analyzes the temporal distribution characteristics of the target object's movement habits. For example, if the movement pattern indicates that the target object starts running at 18:00 every day, the system predicts at 17:59 that a movement event is about to be triggered based on this periodicity, thus determining the trigger time of the movement event as 18:00. When the movement is predicted to occur based on the movement pattern, such as at 17:59, the system switches the accelerometer to 50Hz mode in advance before the trigger time of the movement event, switches the continuous analysis monitoring device from the first state (such as resting listening state) to the second state (such as high-speed acquisition state), and preloads the typical compensation parameters of the user in this movement mode.
[0117] It should be noted that typical compensation parameters refer to the parameters of the personalized analytical value change compensation model established by the system after learning the user's historical exercise data for a specific exercise mode. These parameters include the mapping relationship between the user's exercise intensity and the rate of change of analytical values under a specific exercise mode, such as the estimated blood glucose decrease rate corresponding to high-intensity exercise and the coefficient of the dynamic mapping function from exercise feature vector to blood glucose change rate.
[0118] The above embodiments adopt the method of acquiring motion patterns and predicting the triggering time of motion events. By switching the continuous analyte monitoring device from the first state to the second state before the triggering time of the motion event, the purpose of preparing high-frequency sampling and preloading compensation parameters in advance is achieved, thereby realizing the technological leap from passive response to active prediction.
[0119] Through steps S202 to S208, a dynamic state switching method is adopted for the accelerometer sampling frequency. In the first state, the motion state of the target object is detected, and when the motion state meets the preset change conditions, the continuous analysis object monitoring device is switched from the first state to the second state to collect acceleration data at a high frequency. At the time of analysis value generation, the target sampling data is determined based on the acceleration data and the analysis value. This achieves the goal of balancing low power consumption and monitoring accuracy in motion scenarios, thereby improving the technical effect of continuous analysis object monitoring in motion scenarios. It also solves the technical problem of low monitoring accuracy in motion scenarios caused by the mismatch between the output frequency of the analysis value of the continuous analysis object monitoring device and the sampling frequency of the accelerometer, which leads to the related technology fixing the accelerometer to low frequency sampling in order to reduce power consumption.
[0120] Figure 3 This is a system architecture diagram of a data sampling method according to an embodiment of this application, such as... Figure 3 As shown, the system includes a continuous analyte monitoring device 302 and a main unit device 304, wherein:
[0121] The continuous analyte monitoring device 302, connected to the host device 304, is used to detect the motion state of the target object when the continuous analyte monitoring device is in a first state, wherein the accelerometer in the continuous analyte monitoring device corresponds to a first sampling frequency in the first state; when the motion state meets preset change conditions, the continuous analyte monitoring device is switched from the first state to a second state, wherein the second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency; acceleration data of the target object in motion state is collected according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of the motion state on the change of the analyte value; at the time when the analyte value is generated by the continuous analyte monitoring device, the target sampling data of the continuous analyte monitoring device is determined based on the acceleration data and the analyte value.
[0122] The host device 304 is connected to the continuous analyte monitoring device 302 and is used to receive target sampling data.
[0123] In some embodiments of this application, taking a CGM device as an example, the CGM device includes a sensor 302a, used to monitor the glucose concentration in the subcutaneous interstitial fluid of the target object in real time, and convert the monitored physiological signal into an electrical signal output to support the CGM device to output calibrated blood glucose values at fixed time intervals; a transmitter 302b, used to establish a communication connection with the host device. It should be noted that the transmitter integrates a microcontroller (MCU), which is used to run a state machine model and firmware program, execute state switching logic, feature extraction and data fusion algorithms, control the sampling timing and power consumption mode of the sensor and accelerometer, and send the target sampling data to the host device; and an accelerometer 302c, used to collect the acceleration data of the target object in three-dimensional space, detect changes in motion state, and provide data support for motion feature extraction and blood glucose rate of change estimation.
[0124] It should be noted that, Figure 3 The system shown is used to execute Figure 2 The data sampling method shown, therefore Figure 2 The relevant explanations and descriptions in the data sampling methods also apply to... Figure 3 The system shown will not be described in detail here.
[0125] Figure 4 This is a schematic diagram of the state transition of a state machine model according to an embodiment of the data sampling method of this application, as shown below. Figure 4 As shown, the state machine model includes a silent listening state 402, a motion wake-up state 404, a high-speed acquisition state 406, and a feature fusion state 408. The states are switched in an orderly manner through specific event triggers.
[0126] In some embodiments of this application, the state machine model is in a silent listening state 402 (i.e., the first state) by default. In silent listening state 402, the accelerometer operates in an ultra-low power mode at a first sampling frequency (e.g., 1 Hz), the microcontroller is in deep sleep mode, and the overall system power consumption is extremely low to ensure the device's long-term battery life. When the accelerometer's internal activity detection mechanism detects a preset change in motion state, a hardware interrupt event is generated, waking the microcontroller via a hardware interrupt pin. The state machine model then switches from silent listening state 402 to motion wake-up state 404 (i.e., the third state).
[0127] Furthermore, in motion wake-up state 404, the system uses the microcontroller or accelerometer's built-in algorithm to quickly determine the duration of motion. If the motion duration exceeds a preset threshold (e.g., 5 seconds), the state machine model switches from motion wake-up state 404 to high-speed acquisition state 406 (i.e., the second state). At this time, the microcontroller dynamically configures the accelerometer to a high-frequency sampling mode with a second sampling frequency (e.g., 50 Hz) and activates its internal first-in-first-out buffer to fully capture motion details. It should be noted that if the motion is fleeting, i.e., the motion duration does not exceed the preset threshold, the system directly returns to rest listening state 402 to avoid invalid high-frequency sampling and power waste caused by momentary vibrations.
[0128] Furthermore, in high-speed acquisition state 406, the system continuously acquires acceleration data of the target object in motion according to the second sampling frequency, and divides the 60-second sliding time window into multiple sub-windows according to a preset duration. Real-time feature extraction is performed on the sub-historical acceleration data within each sub-window to obtain sub-feature values, which are stored only in a fixed-length circular buffer. When a timed event is triggered, such as when the blood glucose value is generated every 60 seconds of the CGM output cycle, the state machine model switches from high-speed acquisition state 406 to feature fusion state 408 (i.e., the fourth state). In feature fusion state 408, the system aggregates the currently valid sub-window feature values in the circular buffer, performs precise filtering and weighting based on the timestamp of a high-precision real-time clock, forms a motion feature vector, and binds this motion feature vector to the currently generated analyte value to obtain the target sampling data, which is then sent to the host device. After transmission, the system can return to resting listening state 402 or high-speed acquisition state 406, waiting for the next event trigger.
[0129] In addition to the switching modes mentioned above, the state machine model also includes, but is not limited to, the following state switching paths and modes:
[0130] (1) Returning from motion wake-up state to rest listening state: When the state machine model is in motion wake-up state 404 (i.e., the third state), if the microcontroller or accelerometer built-in algorithm quickly determines the duration of motion and the duration of motion does not exceed the preset threshold, it is determined that the motion is fleeting. At this time, the state machine model directly switches from motion wake-up state 404 back to rest listening state 402 (i.e., the first state) instead of entering high-speed acquisition state 406. This switching path avoids unnecessary high-frequency sampling caused by instantaneous vibration or brief interference, effectively reducing system power consumption.
[0131] (2) Return from high-speed acquisition state to resting listening state: When the state machine model is in high-speed acquisition state 406 (i.e., the second state), if the motion state of the target object ends or the motion intensity decreases significantly, and the system detects that the acceleration data is continuously lower than the preset static threshold, the state machine model directly switches from high-speed acquisition state 406 back to resting listening state 402 (i.e., the first state). This switching path quickly restores low-power operation after the motion ends, avoids the continuous idling of the high-frequency sampling mode, and further extends the device's battery life.
[0132] (3) Return from feature fusion state to resting listening state or high-speed acquisition state: When the state machine model is in feature fusion state 408 (i.e., the fourth state), after the target sampling data is sent, the system selects different return paths according to the subsequent event triggering situation. If there is no current motion activity and the timed event has been processed, the state machine model returns from feature fusion state 408 to resting listening state 402, and the system kernel enters low-power sleep mode. If the motion is still ongoing and the timed event has been processed, the state machine model returns from feature fusion state 408 to high-speed acquisition state 406, continues to acquire acceleration data at the second sampling frequency, and returns to resting listening state 402 after the motion ends.
[0133] (4) Forced state rollback based on battery level and time: When the remaining battery level is lower than the second preset battery level (e.g., 20%), regardless of the current state, the state machine model is forcibly switched to the silent monitoring state 402 and locked in the conservative power-saving mode until the battery level is restored. Alternatively, when the occurrence time of the motion state is within a preset time interval (e.g., nighttime sleep period), the state machine model is forcibly rolled back from the high-speed acquisition state 406 or the motion wake-up state 404 to the silent monitoring state 402 in order to maximize the battery life of the continuous analysis monitoring equipment.
[0134] This application embodiment, through 1Hz silent monitoring combined with a hardware activity detection interrupt wake-up mechanism and dynamic mode switching, reduces the average power consumption of the accelerometer while ensuring the accuracy of motion feature extraction, effectively resolving the contradiction between performance and battery life in continuous analyte monitoring equipment. Furthermore, time-aligned sliding window feature mapping ensures that the output value of the continuous analyte monitoring equipment always has a corresponding motion feature, meeting the requirements of real-time data transmission and providing a reliable foundation for upper-layer algorithm recognition. In addition, through historical pattern learning and feedforward compensation mechanisms, the system progresses from passively responding to motion changes to actively predicting and preloading compensation parameters, improving long-term monitoring accuracy and user experience in motion scenarios.
[0135] Figure 6 This is a structural diagram of a data sampling device according to an embodiment of this application, such as... Figure 6 As shown, the device includes:
[0136] Detection module 602 is used to detect the motion state of the target object when the continuous analyte monitoring device is in the first state, wherein the accelerometer in the continuous analyte monitoring device corresponds to the first sampling frequency in the first state;
[0137] The switching module 604 is used to switch the continuous analyte monitoring device from a first state to a second state when the motion state meets the preset change conditions, wherein the second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency.
[0138] The acquisition module 606 is used to acquire acceleration data of the target object in motion state according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of motion state on the change of analytical value;
[0139] The determination module 608 is used to determine the target sampling data of the continuous analytical monitoring equipment based on the acceleration data and the analytical value at the time when the analytical value of the continuous analytical monitoring equipment is generated.
[0140] It should be noted that, Figure 6 The data sampling device shown is used to perform Figure 2 The data sampling method shown, therefore Figure 2 The relevant explanations and descriptions in the data sampling methods also apply to... Figure 6 The data sampling device shown will not be described in detail here.
[0141] This application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of the data sampling method implemented in the various embodiments of this application.
[0142] This application also provides a non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the steps of the data sampling method in various embodiments of this application by running the computer program.
[0143] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the data sampling method in various embodiments of this application.
[0144] This application also provides a computer program that, when executed by a processor, implements the steps of the data sampling method in various embodiments of this application.
[0145] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0146] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0148] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] 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.
[0150] 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 a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0151] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method of data sampling, characterized by, include: The motion state of the target object is detected when the continuous analyte monitoring device is in a first state, wherein the accelerometer in the continuous analyte monitoring device corresponds to a first sampling frequency in the first state; When the motion state meets the preset change conditions, the continuous analyte monitoring device is switched from the first state to the second state, wherein the second sampling frequency of the accelerometer corresponding to the second state is greater than the first sampling frequency; Acceleration data of the target object under the motion state are collected according to the second sampling frequency, wherein the acceleration data is used to characterize the degree of influence of the motion state on the change of the analytical value; At the moment when the analytical value of the continuous analytical monitoring device is generated, the target sampling data of the continuous analytical monitoring device is determined based on the acceleration data and the analytical value.
2. The method of claim 1, wherein, When the motion state meets preset change conditions, switching the continuous analyte monitoring device from the first state to the second state includes: When the motion state changes, determine the first duration of the changed first target motion state; When the first duration exceeds the first preset duration, the continuous analyte monitoring device is switched from the first state to the second state.
3. The method of claim 1, wherein, When the motion state meets preset change conditions, switching the continuous analyte monitoring device from the first state to the second state includes: When the motion state changes, the continuous analyte monitoring device is switched from the first state to the third state, wherein the third sampling frequency of the accelerometer corresponding to the third state is not less than the first sampling frequency and is less than the second sampling frequency; In the third state, a second duration of the changed second target motion state is determined. When the second duration is longer than a second preset duration, the continuous analyte monitoring device is switched from the third state to the second state.
4. The method of claim 1, wherein, At the time the analyte value is generated by the continuous analyte monitoring device, the target sampling data of the continuous analyte monitoring device is determined based on the acceleration data and the analyte value, including: A sliding time window is determined based on the generation time of the analytical value, wherein the length of the sliding time window is determined based on the generation frequency of the analytical value; Determine the historical acceleration data corresponding to the sliding time window from the acceleration data, wherein the historical acceleration data is the acceleration data before the time when the analysis value is generated; At the moment when the analysis value is generated, determine the motion feature vector corresponding to the historical acceleration data; The motion feature vector is bound to the analysis value to obtain the target sampling data.
5. The method of claim 4, wherein, At the time when the analytical data is generated, the motion feature vector corresponding to the historical acceleration data is determined, including: When the continuous analyte monitoring device is in the second state, the sliding time window is divided into multiple sub-windows; Feature extraction is performed on the sub-historical acceleration data corresponding to each sub-window to obtain sub-feature values, wherein the sub-feature values are used to quantify the motion intensity or motion pattern complexity of the target object, and the sub-historical acceleration data corresponding to the multiple sub-windows together constitute the historical acceleration data; At the time when the analysis value is generated, the motion feature vector is determined based on the sub-feature values corresponding to the multiple sub-windows.
6. The method according to claim 4, characterized in that, The method further includes: at the time the analyte value is generated, switching the continuous analyte monitoring device from the second state to the fourth state, wherein the fourth state is used to send the target sampling data to the host device.
7. The method of claim 2 or 3, wherein, The preset duration is determined in the following way: Obtain the remaining battery power of the continuous analyte monitoring device and the motion intensity corresponding to the motion state; If the remaining battery power is greater than a first preset battery power, and the exercise intensity is greater than a preset intensity, the preset duration is reduced. If the remaining battery power is less than the second preset battery power, or if the occurrence of the movement is within a preset time interval, the preset duration is increased, wherein the second preset battery power is less than the first preset battery power.
8. The method of claim 1, wherein, The method further includes: Obtain the target motion feature vector corresponding to the intermediate time between the generation times of two consecutive analytical material values; A mapping model is used to convert the target motion feature vector into an estimated rate of change of the analyzed material value. The mapping model is used to quantify the nonlinear influence of motion intensity on the trend of change of the analyzed material value. The estimated value of the analyte at the intermediate time point is determined based on the predicted rate of change of the analyte value. Based on the estimated values of the analytes, a curve showing the change in analyte values between the two consecutive times when the analyte values were generated is generated.
9. The method of claim 1, wherein, The method further includes: Obtain the motion pattern of the target object, wherein the motion pattern is used to characterize the periodic motion law of the target object; Predict the trigger time of the motion event of the target object based on the motion pattern; Before the moment the motion event is triggered, the continuous analyte monitoring device is switched from the first state to the second state.
10. An electronic device, comprising: include: A memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and used to execute the data sampling method according to any one of claims 1 to 9.