An early signal decay correction system and method for continuous glucose monitoring
Patent Information
- Application Number
- CN202610685390.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]本申请提供了一种用于连续葡萄糖监测的早期信号衰减校正方法,旨在解决现有早期信号衰减校正普遍采用单一固定补偿曲线,仅能拟合平均人群的通用衰减规律,无法适配不同用户的生理差异以及同一用户不同生理状态下的动态变化,极易出现过补偿或欠补偿的问题
[0016]本申请通过预补偿、全局补偿和后补偿三阶段协同策略,精准匹配传感器植入初期快速衰减、中期缓慢衰减、后期非线性衰减的不同特性,解决了现有技术仅能校正初期衰减的核心痛点,将有效校正周期覆盖传感器完整使用周期。采用指数加权移动平均的动态基线更新方法,能够实时跟踪基线的缓慢漂移,相比传统固定窗口方法显著提升基线估计准确性,为补偿计算提供可靠的参考基准。通过批次边界渐进式小步长调整补偿幅度,彻底消除了补偿参数切换时产生的阶跃噪声,保证血糖信号的连续性和平滑性,大幅提升系统稳定性。通过加权合成各阶段补偿量的方式,能够根据传感器当前所处阶段动态调整各补偿分量的贡献度,有效适配不同用户的生理差异和动态变化,显著降低过补偿和欠补偿的发生概率。
Smart Images

Figure CN122604361A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of biomedical signal processing technology, and in particular to an early signal attenuation correction system and method for continuous glucose monitoring. Background Technology
[0002] This invention relates to the field of biomedical signal processing technology, and more particularly to signal correction technology for continuous glucose monitoring devices. Continuous glucose monitoring is a core technology for diabetes management. It uses a subcutaneously implanted glucose sensor to collect electrical signals generated by changes in interstitial fluid glucose concentration in real time, providing users with continuous and comprehensive blood glucose information, offering significant advantages over traditional finger-prick blood sampling. Currently, most mainstream continuous glucose monitoring systems are based on enzyme electrode technology, calculating glucose concentration by detecting the current signal generated by glucose oxidation.
[0003] Throughout the entire lifespan of a sensor implanted in the human body, early signal attenuation is a common phenomenon. This means that the sensor's output signal strength gradually weakens over time, leading to lower measurement results and decreased accuracy. This phenomenon is caused by a combination of physiological factors, including tissue damage, inflammatory response, and biofilm formation, and exhibits significant individual differences among users. Furthermore, it displays completely different attenuation characteristics in the early, middle, and late stages of sensor implantation.
[0004] Meanwhile, existing early signal attenuation correction generally uses a single fixed compensation curve, which can only fit the general attenuation pattern of the average population and cannot adapt to the physiological differences of different users and the dynamic changes of the same user under different physiological states, which is very easy to cause overcompensation or undercompensation problems. Summary of the Invention
[0005] This application provides an early signal attenuation correction method for continuous glucose monitoring, which aims to solve the problem that existing early signal attenuation correction methods generally use a single fixed compensation curve, which can only fit the general attenuation pattern of the average population and cannot adapt to the physiological differences of different users and the dynamic changes of the same user under different physiological states, and is prone to overcompensation or undercompensation.
[0006] In a first aspect, embodiments of this application provide an early signal attenuation correction method for continuous glucose monitoring, the method comprising: The raw signal from the continuous glucose monitoring sensor is acquired, and the local and global mean values of the raw signal are calculated. An exponentially weighted moving average is used to dynamically update the baseline level of the raw signal frame by frame using the local mean. The original signal is divided into preset batches for processing. At the boundary of each batch, the current signal status is evaluated and the trend of compensation demand is judged. The compensation amplitude is gradually adjusted in small steps within the preset progressive window. Based on the sensor implantation duration, pre-compensation, global compensation, or post-compensation stages are selected accordingly. Using a fusion of Weibull functions and multi-segment Weibull functions, the compensation offsets corresponding to the pre-compensation, global compensation, and post-compensation stages are calculated respectively. The time-varying characteristics of signal attenuation are reflected by adjusting the degree of compensation of the signal by the Weibull function. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.
[0007] In some embodiments, acquiring the raw signal from the continuous glucose monitoring sensor includes: acquiring the raw current signal output by the sensor, performing power frequency interference filtering and random noise removal processing on the raw current signal, converting the denoised current signal into an interstitial fluid glucose concentration signal, and using the converted glucose concentration signal as the raw signal for subsequent processing.
[0008] In some embodiments, calculating the local mean and global mean of the original signal includes: extracting the most recent preset number of continuous data points from the original signal, calculating the arithmetic mean of all extracted data points to obtain the local mean; and calculating the arithmetic mean of all collected data points in the original signal to obtain the global mean.
[0009] In some embodiments, the method of using an exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using the local mean includes: using the value of the first frame of the original signal as the initial baseline level; for each newly acquired frame of the original signal, reading the baseline level stored in the previous frame; and calculating the baseline level of the previous frame and the local mean of the current frame by weighting according to a preset baseline update coefficient to obtain the baseline level of the current frame and overwriting the stored baseline level of the previous frame.
[0010] In some embodiments, the step of dividing the original signal into preset batches includes: dividing the original signal into multiple consecutive data batches according to a preset fixed batch interval and storing them in chronological order.
[0011] In some embodiments, the step of evaluating the current signal state and determining the compensation demand trend at the boundary of each batch includes: extracting the baseline mean and the original signal mean of all data points in the current data batch; calculating the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch; calculating the second difference between the original signal mean of the current data batch and the original signal mean of the previous data batch; and determining the trend and degree of signal attenuation and the direction of change in compensation demand based on the sign and magnitude of the first and second differences.
[0012] In some embodiments, the step of gradually adjusting the compensation amplitude in small steps within a preset progressive window includes: determining the total adjustment amount of the compensation amplitude based on the direction and degree of change in the compensation requirement; distributing the total adjustment amount evenly to all data frames within the preset progressive window; and gradually adjusting the compensation amplitude according to the allocated single-frame adjustment amount during the processing of each frame of data within the progressive window until the total adjustment amount is completed.
[0013] In some embodiments, the step of selecting a pre-compensation, global compensation, or post-compensation stage based on the sensor implantation duration, and using a fusion of Weibull functions and multi-segment Weibull functions to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively, and adjusting the degree of compensation of the signal by the Weibull function to reflect the time-varying characteristics of signal attenuation, includes: preset implantation duration thresholds corresponding to the pre-compensation stage, global compensation stage, and post-compensation stage; comparing the current implantation duration of the sensor with the thresholds of each stage to determine the current compensation stage; calling the preset Weibull function attenuation characteristic parameters for the current compensation stage; calculating the compensation offset for the corresponding stage based on the Weibull function attenuation characteristic parameters; and performing a nonlinear transformation on the calculated compensation offset to map the compensation offset to a preset reasonable value range.
[0014] In some embodiments, the step of fusing and calculating each compensation offset and outputting the final correction signal after overshoot protection to complete the early signal attenuation correction for continuous glucose monitoring includes: dynamically setting the weighting coefficients corresponding to the compensation offsets of each stage according to the current compensation stage of the sensor; multiplying the compensation offsets of each stage by the corresponding weighting coefficients and summing them to obtain the total compensation amount; performing Sigmoid transformation on the total compensation amount to avoid overcompensation and undercompensation; and superimposing the total compensation amount after Sigmoid transformation onto the original signal to obtain the final correction signal and output it.
[0015] Secondly, this application provides an early signal attenuation correction system for continuous glucose monitoring, the system comprising: The signal acquisition unit is used to acquire the raw signal from the continuous glucose monitoring sensor, calculate the local mean and global mean of the raw signal, and use the exponentially weighted moving average method to dynamically update the baseline level of the raw signal frame by frame using the local mean. The segmentation processing unit is used to divide the original signal into preset batches for processing. At the boundary of each batch, the current signal state is evaluated and the trend of compensation demand is determined. The compensation amplitude is gradually adjusted in small steps within a preset progressive window. The attenuation correction unit is used to select the pre-compensation, global compensation, or post-compensation stage according to the sensor implantation time. It uses a Weibull function and a multi-segment Weibull function fusion method to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively. By adjusting the Weibull function to compensate the signal, it reflects the time-varying characteristics of signal attenuation. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.
[0016] This application employs a three-stage collaborative strategy of pre-compensation, global compensation, and post-compensation to accurately match the different characteristics of rapid attenuation in the early stage of sensor implantation, slow attenuation in the middle stage, and nonlinear attenuation in the later stage. This addresses the core pain point of existing technologies, which can only correct initial attenuation, extending the effective correction period to cover the entire sensor lifespan. The application utilizes a dynamic baseline update method based on exponentially weighted moving averages, which can track the slow drift of the baseline in real time. Compared to traditional fixed-window methods, this significantly improves the accuracy of baseline estimation, providing a reliable reference benchmark for compensation calculations. By progressively adjusting the compensation amplitude in small steps at batch boundaries, the application completely eliminates step noise generated during compensation parameter switching, ensuring the continuity and smoothness of the blood glucose signal and significantly improving system stability. Through weighted synthesis of compensation amounts at each stage, the application can dynamically adjust the contribution of each compensation component according to the current stage of the sensor, effectively adapting to the physiological differences and dynamic changes of different users and significantly reducing the probability of overcompensation and undercompensation.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are 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 This is a schematic flowchart illustrating the steps of an early signal attenuation correction method for continuous glucose monitoring provided in an embodiment of this application; Figure 2 This is an overall architecture diagram of an ESA calibration system provided in one embodiment of this application; Figure 3 This is a flowchart of an ESA correction method provided in an embodiment of this application; Figure 4 This is a flowchart of a multi-stage compensation process provided in an embodiment of this application; Figure 5This is a schematic block diagram of an early signal attenuation correction system for continuous glucose monitoring provided in one embodiment of this application; Figure 6 This is a schematic block diagram of the structure of a continuous glucose monitoring device provided in one embodiment of this application.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0023] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0024] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0025] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0026] All parameter values, time window lengths, threshold ranges, and coefficient values cited in this specification are illustrative and intended to aid in understanding the technical solutions of this application. They do not constitute any limitation on the scope of protection of this application. Those skilled in the art can reasonably adjust the above parameters according to actual application scenarios without departing from the principles of this application.
[0027] This invention relates to the field of biomedical signal processing technology, and more particularly to signal correction technology for continuous glucose monitoring devices. Continuous glucose monitoring is a core technology for diabetes management. It uses a subcutaneously implanted glucose sensor to collect electrical signals generated by changes in interstitial fluid glucose concentration in real time, providing users with continuous and comprehensive blood glucose information, offering significant advantages over traditional finger-prick blood sampling. Currently, most mainstream continuous glucose monitoring systems are based on enzyme electrode technology, calculating glucose concentration by detecting the current signal generated by glucose oxidation.
[0028] Throughout the entire lifespan of a sensor implanted in the human body, early signal attenuation is a common phenomenon. This means that the sensor's output signal strength gradually weakens over time, leading to lower measurement results and decreased accuracy. This phenomenon is caused by a combination of physiological factors, including tissue damage, inflammatory response, and biofilm formation, and exhibits significant individual differences among users. Furthermore, it displays completely different attenuation characteristics in the early, middle, and late stages of sensor implantation.
[0029] Existing early signal attenuation correction techniques have the following insurmountable drawbacks: The common use of a single fixed compensation curve can only fit the general attenuation pattern of the average population and cannot adapt to the physiological differences of different users or the dynamic changes of the same user under different physiological states. It is very easy to have overcompensation or undercompensation problems.
[0030] Lacking a multi-stage collaborative correction mechanism, most solutions only compensate for the rapid attenuation in the early stages of sensor implantation in a single stage, completely ignoring the characteristics of slow attenuation in the middle stage and nonlinear attenuation in the later stage, resulting in a sharp decline in correction accuracy in the middle and later stages of sensor use.
[0031] The compensation parameter adjustment adopts a step-by-step switching method. When the parameter is updated, it will introduce obvious sudden noise into the blood glucose signal, which will disrupt the signal continuity and seriously affect the system stability and user experience.
[0032] Baseline estimation often uses a fixed-window moving average method, which cannot track the slow drift of the baseline in real time. The baseline estimation error will be directly added to the final correction result, further reducing the measurement accuracy.
[0033] To solve the above problem, please refer to Figure 1 This application provides an early signal attenuation correction method for continuous glucose monitoring, applied to a continuous glucose monitoring device. The continuous glucose monitoring device includes a glucose sensor and a controller. The glucose sensor is implanted subcutaneously in the human body to collect electrical signals corresponding to the glucose concentration in interstitial fluid. The controller is electrically connected to the glucose sensor and is used to execute the early signal attenuation correction method.
[0034] The controller can be implemented in hardware such as an embedded microcontroller, microprocessor, digital signal processor (DSP), application-specific integrated circuit (ASIC), or field-programmable gate array (FPGA) and integrated inside the continuous glucose monitoring device; or it can be deployed in a handheld terminal, smartphone, smartwatch, or cloud server that is communicatively connected to the continuous glucose monitoring device, and execute the calibration method by receiving the raw signal sent by the glucose sensor.
[0035] The provided method for early signal attenuation correction in continuous glucose monitoring includes steps S101 to S103. Details are as follows: Step S101. Acquire the raw signal from the continuous glucose monitoring sensor, calculate the local mean and global mean of the raw signal; use the exponentially weighted moving average method to dynamically update the baseline level of the raw signal frame by frame using the local mean.
[0036] Specifically, this invention provides an early signal attenuation correction method for continuous glucose monitoring. By organically combining dynamic baseline estimation, progressive compensation adjustment, and multi-stage collaborative compensation, it achieves high-precision and high-stability early signal attenuation correction throughout the sensor's entire lifecycle, solving the technical problems of low correction accuracy, poor adaptability, inability to cover the entire lifecycle, and easy generation of step noise in the prior art.
[0037] This step is the foundation of the correction method, completing the acquisition of the original signal, calculation of basic statistics, and real-time dynamic tracking of the baseline, providing a reliable reference benchmark for subsequent compensation calculations.
[0038] First, the raw signal output from the continuous glucose monitoring sensor is acquired, reflecting changes in glucose concentration in the subcutaneous interstitial fluid. Based on the acquired raw signal, local and global means are calculated for each corresponding time window. The local mean reflects short-term trends, while the global mean reflects long-term overall signal levels. An exponentially weighted moving average is used to dynamically update the baseline level of the raw signal frame-by-frame using the calculated local mean. This method, by assigning higher weights to recent data, can more sensitively track slow baseline drift while maintaining sufficient smoothness to avoid drastic baseline fluctuations.
[0039] Step S102. Divide the original signal into preset batches for processing. At the boundary of each batch, evaluate the current signal state and determine the trend of compensation demand. Within the preset progressive window, gradually adjust the compensation amplitude in small steps.
[0040] Specifically, this step is a key control step in the calibration method. By batch processing the signal data, the signal attenuation status is evaluated at the batch boundary, and a gradual adjustment method is adopted to avoid step noise when switching compensation parameters.
[0041] By dividing the raw signal into multiple consecutive data batches according to preset rules, each batch contains a fixed or dynamic number of consecutive data frames, it is convenient to periodically evaluate the signal status.
[0042] At the boundary of each data batch, extract the signal feature data of the current batch and the previous batch, evaluate the attenuation state of the current signal, and then determine the changing trend of compensation requirements, including whether the compensation amplitude needs to be increased, decreased, or kept unchanged.
[0043] Based on the determined trend of compensation demand changes, the compensation range is gradually adjusted in fixed small steps within a preset progressive window until the target compensation range is reached. This progressive adjustment process ensures a smooth transition of the compensation amount and completely eliminates the signal abruptness problem caused by step adjustments.
[0044] Step S103. Based on the sensor implantation duration, select the corresponding pre-compensation, global compensation, or post-compensation stage. Use the Weibull function and multi-segment Weibull function fusion method to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively. Adjust the Weibull function to reflect the time-varying characteristics of signal attenuation by adjusting the degree of signal compensation. Perform fusion calculation on each compensation offset, and output the final correction signal after overshoot protection processing to complete the early signal attenuation correction for continuous glucose monitoring.
[0045] Specifically, this step is the core execution link of the calibration method. Different compensation strategies are adopted according to the stage of sensor use, and the final calibration signal is obtained through fusion calculation and anti-overshoot processing.
[0046] By monitoring the implantation time of the sensor in real time, the entire life cycle of the sensor is divided into a pre-compensation stage, a global compensation stage, and a post-compensation stage according to a preset time threshold, which correspond to different attenuation characteristics in the early, middle and late stages of sensor implantation, respectively.
[0047] The compensation offsets for the pre-compensation stage, the global compensation stage, and the post-compensation stage are calculated separately. The compensation offset for each stage is calculated based on the Weibull function attenuation characteristic parameter unique to that stage.
[0048] The calculated compensation offsets from the three stages are fused to obtain the total compensation. After overshoot protection, the total compensation is superimposed on the original signal to output the final corrected signal, thus completing the early signal attenuation correction for continuous glucose monitoring.
[0049] In some embodiments, acquiring the raw signal from the continuous glucose monitoring sensor includes: acquiring the raw current signal output by the sensor, performing power frequency interference filtering and random noise removal processing on the raw current signal, converting the denoised current signal into an interstitial fluid glucose concentration signal, and using the converted glucose concentration signal as the raw signal for subsequent processing.
[0050] The raw current signal output by the sensor is acquired through the signal acquisition interface of the continuous glucose monitoring system at a preset sampling frequency. The sampling frequency can be set to once every 1 minute, 2 minutes, 5 minutes or 10 minutes. In this embodiment, it is preferred to be once every 5 minutes. This sampling frequency is consistent with the output frequency of mainstream continuous glucose monitoring sensors.
[0051] The acquired raw current signal is processed to filter out power frequency interference. A digital notch filter with a center frequency of 50 Hz is used to filter out the periodic interference signal brought by the power grid frequency. For areas using a 60 Hz power frequency, a digital notch filter with a center frequency of 60 Hz is used.
[0052] Random noise removal processing is performed on the current signal after filtering out power frequency interference. A moving average filter with a window length of 3 is used to remove random high-frequency noise caused by sensor electronic components and physiological noise.
[0053] Based on the pre-calibrated current-glucose concentration conversion coefficient, the denoised current signal is converted into the corresponding interstitial fluid glucose concentration signal. The conversion coefficient is determined by the standard solution calibration experiment before the sensor leaves the factory.
[0054] The converted interstitial fluid glucose concentration signal is stored in the system's cache unit as the raw signal for all subsequent processing steps.
[0055] In some embodiments, calculating the local mean and global mean of the original signal includes: extracting the most recent preset number of continuous data points from the original signal, calculating the arithmetic mean of all extracted data points to obtain the local mean; and calculating the arithmetic mean of all collected data points in the original signal to obtain the global mean.
[0056] The length of the preset local mean calculation window is 5, 10, 15 or 20 consecutive data points. In this embodiment, it is preferred to have 10, that is, to extract the 10 consecutive data points in the original signal that are closest to the current time as local calculation samples.
[0057] The arithmetic mean of the 10 consecutive data points is calculated, and the result is used as the local mean at the current time. This local mean is then stored in the system cache for use in subsequent baseline updates.
[0058] The total number of all raw signal data points that have been collected and preprocessed since the sensor was implanted is counted, and all collected data points are extracted as global calculation samples.
[0059] The arithmetic mean of all collected data points is calculated, and the result is used as the global mean at the current moment. This global mean is then stored in the system cache for use in subsequent compensation state analysis.
[0060] Each time a new frame of raw signal is acquired and preprocessed, steps 1 to 4 above are repeated to update the local mean and global mean at the current time.
[0061] In some embodiments, the method of using an exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using the local mean includes: using the value of the first frame of the original signal as the initial baseline level; for each newly acquired frame of the original signal, reading the baseline level stored in the previous frame; and calculating the baseline level of the previous frame and the local mean of the current frame by weighting according to a preset baseline update coefficient to obtain the baseline level of the current frame and overwriting the stored baseline level of the previous frame.
[0062] This embodiment specifically illustrates the technical content and implementation method of "using an exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using the local mean" in step S101: When the sensor is first implanted and acquires the first frame of raw signal, the value of the first frame of raw signal is used as the initial baseline level and stored in the system's non-volatile storage unit.
[0063] The preset baseline update coefficient is 0.05, 0.1, 0.15 or 0.2. In this embodiment, 0.1 is preferred. This coefficient is determined through optimization based on a large amount of clinical trial data and can achieve the best balance between baseline tracking sensitivity and smoothness.
[0064] Each time a new frame of raw signal is acquired and the local mean of the current frame is calculated, the baseline level of the previous frame is read from the non-volatile storage unit.
[0065] According to the preset baseline update coefficient, the baseline level of the previous frame is multiplied by 0.9, the local mean of the current frame is multiplied by 0.1, and then the two products are added together to obtain the baseline level of the current frame.
[0066] The calculated baseline level of the current frame is used to overwrite the baseline level of the previous frame in the non-volatile memory cell to complete the baseline update. The process is repeated after the next frame signal arrives.
[0067] In some embodiments, the step of dividing the original signal into preset batches includes: dividing the original signal into multiple consecutive data batches according to a preset fixed batch interval and storing them in chronological order.
[0068] By presetting a fixed batch interval of 1 hour, 2 hours, 4 hours, or 8 hours, this embodiment preferably uses 2 hours, meaning that every 12 consecutive raw signal data points constitute a data batch. The system receives raw signal data points in real time, and automatically generates a new data batch when the preset number of data points are accumulated, assigning a unique timestamp to each batch. All data batches are stored in the system's non-volatile storage unit in the order of their generation, for use in subsequent batch boundary evaluation and compensation adjustments. This fixed batch division method has low computational complexity, is easy to implement in embedded systems, and ensures the timeliness and stability of compensation adjustments, avoiding the system instability and wasted computing resources that may result from dynamically adjusting the batch interval.
[0069] In some embodiments, the process of dividing the original signal into preset batches includes: real-time monitoring of the implantation time of the sensor and the fluctuation level of the original signal; shortening the batch duration when the fluctuation level of the original signal exceeds a preset threshold; extending the batch duration when the fluctuation level of the original signal is below a preset threshold; and dividing the original signal into multiple consecutive data batches and storing them in chronological order according to the adjusted batch duration.
[0070] The default batch time length is preset to 30 minutes, 1 hour, 2 hours or 4 hours. In this embodiment, 1 hour is preferred, that is, each data batch contains 12 consecutive raw signal data points (corresponding to a 5-minute sampling frequency).
[0071] The implantation time of the sensor and the fluctuation of the original signal are monitored in real time. The fluctuation of the original signal is obtained by calculating the standard deviation of the original signal in the current hour.
[0072] The high threshold for signal fluctuation is preset to be 0.3, 0.4, 0.5, or 0.6 mmol / L, and the low threshold is preset to be 0.1, 0.15, 0.2, or 0.25 mmol / L. In this embodiment, the high threshold is preferably 0.5 mmol / L and the low threshold is preferably 0.2 mmol / L. When the calculated original signal fluctuation exceeds the high threshold, it indicates that the user's blood glucose is fluctuating drastically, and the batch time is shortened to 30 minutes; when the original signal fluctuation is below the low threshold, it indicates that the user's blood glucose is stable, and the batch time is extended to 2 hours.
[0073] Based on the adjusted batch time length, the original signal is divided into multiple consecutive data batches, and the data points of each batch are numbered in chronological order and stored in the system cache.
[0074] Once the data collection for one batch is completed, the collection process for the next batch will automatically begin, while simultaneously triggering the signal status assessment process at the batch boundary.
[0075] In some embodiments, the step of evaluating the current signal state and determining the compensation demand trend at the boundary of each batch includes: extracting the baseline mean and the original signal mean of all data points in the current data batch; calculating the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch; calculating the second difference between the original signal mean of the current data batch and the original signal mean of the previous data batch; and determining the trend and degree of signal attenuation and the direction of change in compensation demand based on the sign and magnitude of the first and second differences.
[0076] Once a data batch is collected, the baseline level corresponding to all data points in that data batch is extracted, and the baseline mean of that data batch is calculated. At the same time, all raw signal data points in that data batch are extracted, and the raw signal mean of that data batch is calculated.
[0077] Read the baseline mean and raw signal mean of the previous data batch from the system cache.
[0078] Calculate the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch. This difference reflects the trend of the baseline.
[0079] Calculate the second difference between the mean of the original signal in the current data batch and the mean of the original signal in the previous data batch. This difference reflects the changing trend of the original signal.
[0080] When the first difference is negative and the second difference is negative, and the absolute values of both differences exceed the preset judgment threshold, the judgment signal is in a state of attenuation, and the compensation demand trend is to increase the compensation amplitude; when the first difference is positive and the second difference is positive, and the absolute values of both differences exceed the preset judgment threshold, the judgment signal is in a state of overcompensation, and the compensation demand trend is to decrease the compensation amplitude; in other cases, the judgment signal state is normal, and the compensation amplitude remains unchanged.
[0081] In some embodiments, the step of gradually adjusting the compensation amplitude in small steps within a preset progressive window includes: determining the total adjustment amount of the compensation amplitude based on the direction and degree of change in the compensation requirement; distributing the total adjustment amount evenly to all data frames within the preset progressive window; and gradually adjusting the compensation amplitude according to the allocated single-frame adjustment amount during the processing of each frame of data within the progressive window until the total adjustment amount is completed.
[0082] The length of the preset progressive window is 5, 8, 10, 12 or 15 consecutive data frames. In this embodiment, it is preferably 10, that is, the total adjustment of the compensation amplitude will be completed gradually within 10 data frames.
[0083] Based on the determined direction and degree of change in compensation demand, the total adjustment amount for compensation is determined. For example, when the signal attenuation is determined to be slight, the total adjustment amount is set to 0.1 mmol / L; for moderate attenuation, the total adjustment amount is set to 0.3 mmol / L; and for severe attenuation, the total adjustment amount is set to 0.5 mmol / L.
[0084] The determined total adjustment amount is evenly distributed across 10 data frames within a preset progressive window to obtain the single-frame adjustment amount for each data frame. For example, when the total adjustment amount is 0.3 mmol / L, the single-frame adjustment amount is 0.03 mmol / L.
[0085] During the processing of each frame of data within the progressive window, the current compensation magnitude is gradually adjusted according to the single-frame adjustment amount. If the compensation demand trend is increasing, the single-frame adjustment amount is added to the current compensation magnitude; if the compensation demand trend is decreasing, the single-frame adjustment amount is subtracted from the current compensation magnitude.
[0086] Once all 10 data frames within the progressive window have been processed, the compensation magnitude reaches the target value, the progressive adjustment process stops, and the compensation magnitude is maintained until the signal state assessment at the next batch boundary.
[0087] In some embodiments, the step of selecting a pre-compensation, global compensation, or post-compensation stage based on the sensor implantation duration, and using a fusion of Weibull functions and multi-segment Weibull functions to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively, and adjusting the degree of compensation of the signal by the Weibull function to reflect the time-varying characteristics of signal attenuation, includes: preset implantation duration thresholds corresponding to the pre-compensation stage, global compensation stage, and post-compensation stage; comparing the current implantation duration of the sensor with the thresholds of each stage to determine the current compensation stage; calling the preset Weibull function attenuation characteristic parameters for the current compensation stage; calculating the compensation offset for the corresponding stage based on the Weibull function attenuation characteristic parameters; and performing a nonlinear transformation on the calculated compensation offset to map the compensation offset to a preset reasonable value range.
[0088] The system employs three preset implantation duration thresholds for compensation stages: a pre-compensation stage (0-24 hours after sensor implantation), a global compensation stage (24-168 hours), and a post-compensation stage (168-336 hours). The current implantation duration is acquired in real-time and compared with the thresholds for each stage to determine the current compensation stage. The system retrieves preset Weibull function attenuation characteristic parameters for each stage from its parameter storage unit. These parameters are derived from extensive clinical trial data and accurately describe the signal attenuation pattern of that stage. Based on the retrieved Weibull function attenuation characteristic parameters and the current implantation duration, the initial compensation offset for the corresponding stage is calculated. For cross-stage time points, a multi-segment Weibull function fusion approach is used for smooth transition, preventing abrupt changes in compensation. By adjusting the shape and scale parameters of the Weibull function, the system accurately reflects the time-varying signal attenuation characteristics of different individuals and implantation sites. A nonlinear transformation is applied to the calculated initial compensation offset to map it to a preset reasonable value range, preventing excessively large or small compensation amounts. The nonlinear transformation employs a monotonically increasing sigmoid function to ensure that the compensation amount increases smoothly with the degree of attenuation. The above steps are repeated to calculate the final compensation offset for the pre-compensation stage, the global compensation stage, and the post-compensation stage, respectively.
[0089] In some embodiments, the step of fusing and calculating each compensation offset and outputting the final correction signal after overshoot protection to complete the early signal attenuation correction for continuous glucose monitoring includes: dynamically setting the weighting coefficients corresponding to the compensation offsets of each stage according to the current compensation stage of the sensor; multiplying the compensation offsets of each stage by the corresponding weighting coefficients and summing them to obtain the total compensation amount; performing Sigmoid transformation on the total compensation amount to avoid overcompensation and undercompensation; and superimposing the total compensation amount after Sigmoid transformation onto the original signal to obtain the final correction signal and output it.
[0090] The weighting coefficients for the compensation offsets in the three stages are dynamically set based on the current compensation stage of the sensor. For example, in the pre-compensation stage, the weighting coefficient for the pre-compensation offset is set to 0.8, the weighting coefficient for the global compensation offset is set to 0.15, and the weighting coefficient for the post-compensation offset is set to 0.05; in the global compensation stage, the weighting coefficient for the global compensation offset is set to 0.7, the weighting coefficient for the pre-compensation offset is set to 0.2, and the weighting coefficient for the post-compensation offset is set to 0.1; and in the post-compensation stage, the weighting coefficient for the post-compensation offset is set to 0.8, the weighting coefficient for the global compensation offset is set to 0.15, and the weighting coefficient for the pre-compensation offset is set to 0.05. This dynamic weighting mechanism ensures that the compensation characteristics of the current stage dominate, while also taking into account the attenuation trends of other stages, achieving a smooth transition.
[0091] Multiply the pre-compensation offset, global compensation offset, and post-compensation offset by their respective weighting coefficients, and then add the three products together to obtain the total compensation amount.
[0092] The calculated total compensation amount is subjected to a moving average smoothing filter. The length of the moving average window is set to 2, 3, 4 or 5 data points. In this embodiment, 5 points are preferred to further eliminate high-frequency noise in the total compensation amount.
[0093] The total compensation amount after smoothing filtering is processed by a Sigmoid transform. This transform can limit the total compensation amount to a preset upper and lower limit range, while maintaining an approximately linear transform characteristic in the intermediate region. This effectively avoids overcompensation caused by excessive compensation amount and undercompensation caused by insufficient compensation amount. The parameters of the Sigmoid transform are pre-calibrated based on clinical trial data and can adapt to different levels of signal attenuation.
[0094] The total compensation amount after Sigmoid transformation is superimposed on the original signal of the current frame to obtain the correction signal of the current frame.
[0095] The correction signal is output to the display and storage units of the continuous glucose monitoring system for user viewing and subsequent data analysis, thus completing the early signal attenuation correction process.
[0096] In some embodiments, combined with Figure 2This application provides a detailed description of the composition, functions of each module, and data interaction relationships between the continuous glucose monitoring device of the present invention. The continuous glucose monitoring device provided in this embodiment includes a glucose sensor and an early signal attenuation correction system. The early signal attenuation correction system operates in the embedded microcontroller of the continuous glucose monitoring device. The microcontroller uses an ARM Cortex-M4 core with a main frequency of 48MHz, is equipped with 128KB of random access memory for real-time data caching, and 512KB of flash memory for storing program code and preset parameters.
[0097] This system is electrically connected to a continuous glucose monitoring sensor. It consists of a signal acquisition module, a baseline estimation module, a compensation state analysis module, a multi-stage compensation module, and a compensation quantity synthesis module, all connected sequentially. Data transmission between these modules occurs via an internal bus. The specific implementation method is as follows: The input terminal of the signal acquisition module is electrically connected to the output terminal of the continuous glucose monitoring sensor, and the output terminal is connected to the input terminal of the baseline estimation module and the first input terminal of the multi-stage compensation module, respectively. The signal acquisition module has a built-in 16-bit analog-to-digital converter, and the sampling frequency is set to once every 5 minutes, consistent with the output frequency of the continuous glucose monitoring sensor. The signal acquisition module first converts the analog current signal output by the sensor into a digital signal through the analog-to-digital converter, and then performs the aforementioned power frequency interference filtering, random noise removal, and current-to-glucose concentration conversion operations to obtain the interstitial fluid glucose concentration signal. This signal is sent as the raw signal to the baseline estimation module and the multi-stage compensation module, and the raw signal is stored in the raw signal buffer of the random access memory.
[0098] The input of the baseline estimation module is connected to the output of the signal acquisition module, and its output is connected to the first input of the compensation state analysis module and the second input of the multi-stage compensation module. After acquiring the raw signal from the signal acquisition module, the baseline estimation module performs the local mean and global mean calculation operations, and then performs the exponentially weighted moving average baseline update operation to obtain the dynamic baseline level of the current frame. The baseline estimation module sends the calculated dynamic baseline level to the compensation state analysis module and the multi-stage compensation module, and simultaneously stores the baseline level of each frame in the baseline history storage area of the flash memory, with the storage period consistent with the sensor's usage period.
[0099] The input of the compensation state analysis module is connected to the output of the baseline estimation module, and its output is connected to the third input of the multi-stage compensation module. After obtaining the dynamic baseline level from the baseline estimation module, the compensation state analysis module performs the dynamic batch division operation, dividing the original signal into multiple consecutive data batches. At the boundary of each data batch, the compensation state analysis module performs the signal state assessment and compensation demand trend judgment operations to obtain the direction and degree of change in compensation demand. Then, it performs the progressive compensation amplitude adjustment operation to calculate the compensation adjustment amplitude for the current frame and sends this adjustment amplitude to the multi-stage compensation module.
[0100] The first input of the multi-stage compensation module is connected to the output of the signal acquisition module, the second input to the output of the baseline estimation module, the third input to the output of the compensation state analysis module, and the output to the input of the compensation quantity synthesis module. The multi-stage compensation module incorporates a pre-compensation unit, a global compensation unit, and a post-compensation unit, all operating in parallel. The multi-stage compensation module acquires the sensor implantation duration in real time, determines the current compensation stage based on a preset duration threshold, and calls the corresponding unit to perform compensation offset calculations, obtaining the pre-compensation offset, global compensation offset, and post-compensation offset. The multi-stage compensation module simultaneously sends the compensation offsets from all three stages to the compensation quantity synthesis module.
[0101] The input of the compensation quantity synthesis module is connected to the output of the multi-stage compensation module, and the output is connected to the display unit and storage unit of the continuous glucose monitoring device. The compensation quantity synthesis module performs the aforementioned compensation quantity weighted synthesis, moving average smoothing filtering, and signal superposition operations to obtain the final corrected signal. The compensation quantity synthesis module outputs the corrected signal to the display unit for real-time viewing by the user, and simultaneously stores the corrected signal in the correction signal history storage area of the flash memory for subsequent data analysis and backtracking.
[0102] In some embodiments, combined with Figure 3 This document provides a detailed description of the complete execution flow of the method of the present invention, from sensor implantation to output of the correction signal. This process is automatically executed after the sensor is implanted in the human body and powered on, continuing until the end of the sensor's lifespan. After implantation and power-on, the microcontroller first performs system initialization operations, including initializing the analog-to-digital converter, digital filter, timer, and storage unit. Preset system parameters are read from the flash memory, including sampling frequency, baseline update coefficient, default batch time length, signal fluctuation threshold, asymptotic window length, duration thresholds for each compensation stage, attenuation characteristic parameters for each stage, and a weighting coefficient table. The timer is then started to begin timing the sensor implantation duration.
[0103] A timer triggers a sampling interrupt, and the signal acquisition module acquires the raw current signal output by the sensor via an analog-to-digital converter. The raw current signal is then subjected to a 50Hz power frequency notch filter and a moving average filter with a window length of 3 to remove power frequency interference and random noise. Based on the factory-calibrated current-to-glucose concentration conversion coefficient, the denoised current signal is converted into an interstitial fluid glucose concentration signal, yielding the raw signal, which is then stored in the raw signal buffer. The most recent 10 consecutive data points from the raw signal are extracted to calculate the local mean, and the global mean of all data points acquired since sensor implantation is calculated. Both the local and global mean are then stored in the buffer.
[0104] If the current signal is the first frame of the original signal, its value is used as the initial baseline level and stored in the non-volatile memory. If the current signal is not the first frame of the original signal, the baseline level of the previous frame is read from the non-volatile memory. The baseline level of the previous frame is multiplied by 0.9 according to a preset baseline update factor of 0.1, and the local mean of the current frame is multiplied by 0.1. The two products are then added together to obtain the baseline level of the current frame. The baseline level of the current frame is used to overwrite the baseline level of the previous frame stored in the non-volatile memory, completing the baseline update.
[0105] The standard deviation of the original signal within the current hour is calculated in real time to obtain the fluctuation level of the original signal. This fluctuation level is compared with preset high thresholds of 0.5 mmol / L and low thresholds of 0.2 mmol / L, and the batch duration is dynamically adjusted. Based on the adjusted batch duration, the original signal is divided into multiple consecutive data batches. After a data batch is acquired, the baseline mean of the current batch and the previous batch is extracted and compared with the original signal mean. The first difference between the baseline means of the two batches and the second difference between the original signal mean are calculated. Based on the sign and magnitude of the first and second differences, the signal attenuation state and compensation demand trend are determined. The total adjustment amount is determined based on the direction and degree of change in compensation demand, and the total adjustment amount is evenly distributed within a 10-frame progressive window. The compensation amplitude is gradually adjusted frame by frame within the progressive window.
[0106] The current sensor implantation duration, recorded by a timer, is read and compared with preset thresholds for the pre-compensation stage (24 hours), the global compensation stage (168 hours), and the post-compensation stage (336 hours) to determine the current compensation stage. The attenuation characteristic parameters corresponding to the current compensation stage are retrieved from flash memory, and the pre-compensation offset, global compensation offset, and post-compensation offset are calculated respectively. An S-shaped nonlinear transformation is applied to each compensation offset to map it to a preset reasonable value range. Based on the current compensation stage, the weighting coefficients corresponding to the compensation offsets of the three stages are read from the weighting coefficient table. The pre-compensation offset, global compensation offset, and post-compensation offset are multiplied by their respective weighting coefficients and then summed to obtain the total compensation amount. A moving average smoothing filter with a window length of 5 is applied to the total compensation amount to remove high-frequency noise components.
[0107] The total compensation amount after smoothing and filtering is superimposed on the original signal of the current frame to obtain the final corrected signal. The corrected signal is output to the display unit of the continuous glucose monitoring device for real-time display, and simultaneously stored in the historical data storage area of the flash memory. The above steps are repeated until the sensor's lifespan ends, at which point the system automatically stops operating.
[0108] In some embodiments, this embodiment combines Figure 4 This document provides a detailed description of the specific execution flow of the multi-stage collaborative compensation method of this invention. This flow is automatically executed during the processing of each frame of the original signal and is the core component of the correction method of this invention. When entering the multi-stage ESA compensation calculation flow, all compensation-related parameters are first retrieved from the system's parameter storage unit, including: the implantation duration threshold corresponding to each compensation stage, the attenuation characteristic parameters of the pre-compensation stage, the attenuation characteristic parameters of the global compensation stage, the attenuation characteristic parameters of the post-compensation stage, the upper and lower limit parameters of the S-shaped nonlinear transform, and the compensation amplitude adjustment step size parameters. Simultaneously, the current implantation duration of the sensor is retrieved from the timer, and the compensation adjustment amplitude of the current frame is retrieved from the compensation state analysis module.
[0109] The current implantation duration of the sensor is compared with the thresholds for each stage: if the current implantation duration is less than or equal to 24 hours, it is determined that the current stage is in the pre-compensation stage; if the current implantation duration is greater than 24 hours but less than or equal to 168 hours, it is determined that the current stage is in the global compensation stage; if the current implantation duration is greater than 168 hours but less than or equal to 336 hours, it is determined that the current stage is in the post-compensation stage. Based on the determination result, the corresponding compensation calculation branch is entered.
[0110] The phased compensation calculation includes: 1. Pre-compensation Calculation Branch: This branch calls upon the attenuation characteristic parameters of the pre-compensation phase. These parameters are obtained by fitting data from over 1000 clinical implantation cases in the initial stage and accurately describe the rapid signal attenuation pattern within 0 to 24 hours after sensor implantation. Based on the current implantation duration and the attenuation characteristic parameters of the pre-compensation phase, the initial compensation offset for the pre-compensation phase is calculated. The compensation adjustment magnitude output from the compensation status analysis module is then superimposed on the initial compensation offset to obtain the intermediate compensation offset for the pre-compensation phase.
[0111] 2. Global Compensation Calculation Branch: This branch calls upon the attenuation characteristic parameters of the global compensation phase, which accurately describe the slow, linear attenuation pattern within 24 to 168 hours after sensor implantation. Following the same method as the pre-compensation calculation, the intermediate compensation offset for the global compensation phase is calculated.
[0112] 3. Post-compensation calculation branch: This branch calls upon the attenuation characteristic parameters of the post-compensation stage, which accurately describe the nonlinear accelerated attenuation pattern within 168 to 336 hours after sensor implantation. Following the same method as the pre-compensation calculation, the intermediate compensation offset for the post-compensation stage is calculated.
[0113] An S-shaped nonlinear transformation is performed on the intermediate compensation offsets in the pre-compensation, global compensation, and post-compensation stages. This transformation is a monotonically increasing function that can map any input value to a preset range from 0 to the maximum compensation amount, where the maximum compensation amount is set to 2, 2.5, 3, 3.5, or 4 millimoles per liter; in this embodiment, 3 millimoles per liter is preferred. When the intermediate compensation offset is less than 0, the transformation result is 0; when the intermediate compensation offset is greater than 3 millimoles per liter, the transformation result is 3 millimoles per liter; when the intermediate compensation offset is between 0 and 3 millimoles per liter, the transformation result increases smoothly with the increase of the input value. This transformation effectively avoids overcompensation or undercompensation problems.
[0114] For the three compensation offsets after the S-shaped nonlinear transformation, attenuation characteristics based on the Weibull distribution are calculated. This calculation adjusts the magnitude of the compensation offset according to the current implantation duration of the sensor and the corresponding attenuation shape and scale parameters, ensuring precise matching of the signal attenuation rate at different stages. For example, in the pre-compensation stage, the scale parameter is small, corresponding to rapid initial attenuation, and the compensation offset increases rapidly with implantation duration; in the later compensation stage, the shape parameter is greater than 1, corresponding to accelerated attenuation in the later stages, and the compensation offset increases exponentially with implantation duration.
[0115] The pre-compensation offset, global compensation offset, and post-compensation offset, calculated based on attenuation characteristics, are simultaneously output to the compensation amount synthesis module for subsequent weighted synthesis. This concludes the multi-stage ESA compensation calculation process.
[0116] In some embodiments, the early signal attenuation correction method for continuous glucose monitoring according to the present invention can also be executed sequentially according to steps S1 to S5: Step S1: Signal Preprocessing: The technical purpose of this step is to acquire the raw signal and calculate the basic statistics to provide input data for subsequent baseline estimation and compensation calculations. The raw signal sequence output by the continuous glucose monitoring sensor is acquired, denoted as S, where S[N] represents the value of the raw signal in the Nth frame, and N is the index of the current frame, incrementing sequentially from 1.
[0117] The local mean μ_L of the original signal is calculated using the following formula: μ_L=mean(S[NL:N]); In the formula, L is the length of the local mean calculation window, ranging from 5 to 20, and preferably 10 in this embodiment. This formula represents the calculation of the arithmetic mean of the L consecutive data points closest to the current time in the original signal. The local mean reflects the short-term trend of the signal and is used for subsequent baseline dynamic updates.
[0118] The global mean μ_0 of the original signal is calculated using the following formula: μ_0 = mean(S[1:N]); This formula represents the global mean obtained by calculating the arithmetic mean of all N raw signal data points collected since the sensor was implanted. The global mean reflects the long-term overall level of the signal and is used for subsequent compensation state analysis.
[0119] The calculated local mean μ_L and global mean μ_0 are stored in the system cache for use in subsequent steps. This step is repeated whenever a new frame of raw signal is acquired, updating the local and global means.
[0120] Step S2: Dynamic Baseline Estimation: The technical objective of this step is to dynamically estimate the signal baseline using an exponentially weighted moving average method, tracking the slow drift of the baseline in real time and improving the accuracy of baseline estimation. When the sensor is first implanted and acquires the first frame of raw signal, the value of the first frame of raw signal is used as the initial baseline level, denoted as B_1.
[0121] For the original signal of the nth frame (n≥2), the baseline level B_n of the current frame is calculated using the exponentially weighted moving average method, and the calculation formula is as follows: B_n=B_{n-1}×(1-λ)+μ_L×λ; In the formula, B_{n-1} is the baseline level of the (n-1)th frame; λ is the baseline update coefficient, which ranges from 0.05 to 0.2, and is preferably 0.1 in this embodiment.
[0122] This formula, by assigning higher weights to recent data, can more sensitively track slow changes in the baseline while maintaining its smoothness. Compared to the traditional fixed-window moving average method, this method effectively avoids baseline lag issues and improves the real-time performance and accuracy of baseline estimation. The calculated current frame baseline level B_n overwrites the stored baseline level B_{n-1} of the previous frame, completing this baseline update.
[0123] Step S3: Compensation State Analysis and Progressive Adjustment: The technical purpose of this step is to evaluate the signal attenuation state at the batch boundary and to use a progressive adjustment method to avoid step noise when switching compensation parameters.
[0124] The original signal is divided into preset batches for processing. Each batch contains a fixed number of consecutive data frames. In this embodiment, each batch contains 12 data frames by default (corresponding to a 5-minute sampling frequency, i.e., one batch per hour).
[0125] At the boundary of each data batch, extract the signal feature data of the current batch and the previous batch, evaluate the attenuation state of the current signal, determine the changing trend of compensation requirements, and determine the total adjustment amount ΔA_a of the compensation amplitude.
[0126] The compensation magnitude is adjusted using a gradual adjustment strategy, and the calculation formula is as follows: A_a'=A_a±ΔA_a; In the formula, A_a is the compensation range before adjustment; A_a' is the target compensation range after adjustment; ΔA_a is the total adjustment amount of the compensation range, and its positive or negative sign is determined by the trend of compensation demand. When it is necessary to increase the compensation range, a positive sign is taken, and when it is necessary to decrease the compensation range, a negative sign is taken.
[0127] The total adjustment amount ΔA_a is evenly distributed across all data frames within a preset progressive window. In this embodiment, the progressive window length is set to 10 data frames. During the processing of each frame within the progressive window, the compensation amplitude is gradually adjusted according to the allocated single-frame adjustment amount until the target compensation amplitude A_a' is reached. This method ensures a smooth transition of the compensation amount and completely eliminates the signal abruptness problem caused by step adjustments.
[0128] Step S4: Multi-stage ESA Compensation Calculation: The technical objective of this step is to calculate the compensation offset for each stage by employing differentiated compensation strategies based on the attenuation characteristics of the sensor at different usage stages. This step combines the Weibull attenuation function and the Sigmoid transform function, which can accurately describe the time-varying characteristics of early signal attenuation and map the compensation amplitude to a reasonable range.
[0129] Based on the duration of sensor implantation, the entire lifecycle of the sensor is divided into a pre-compensation stage, a global compensation stage, and a post-compensation stage, corresponding to the initial, middle, and late stages of sensor implantation, respectively.
[0130] The time-varying characteristics of early signal attenuation in each stage are described using a Weibull-type attenuation function. The initial compensation offset for each stage is calculated. The formula for the Weibull-type attenuation function is as follows: g(N,A,k,λ)=-A×(N / λ)^(k-1)×e^(-(N / λ)^k); In the formula, N is the frame index corresponding to the current implantation duration of the sensor; A is the attenuation amplitude parameter, which determines the maximum degree of signal attenuation; k is the shape parameter, which determines the shape of the attenuation curve; and λ is the scale parameter, which determines the rate of attenuation.
[0131] Different Weibull parameters are used for different compensation stages: Pre-compensation stage (0 to 24 hours): A is relatively large, λ is relatively small, corresponding to the rapid attenuation characteristics in the early stage of sensor implantation; Global compensation stage (24 to 168 hours): A and λ are moderate, corresponding to the slow linear attenuation characteristics in the middle stage of sensor implantation; Post-compensation stage (168 to 336 hours): k is greater than 1, corresponding to the nonlinear accelerated attenuation characteristics in the later stage of sensor implantation. A Sigmoid transformation is applied to the calculated initial compensation offset to map the compensation amplitude to a preset reasonable value range, avoiding overcompensation or undercompensation. The formula for calculating the Sigmoid transformation function is: f(x,m,n,s)=m / (1+e^(-(xn) / s)); In the formula, m is the maximum value after transformation; n is the midpoint value of the transformation; and s is the slope parameter of the transformation. The above formula is a translation and scaling form of the standard Sigmoid function, which can achieve a smooth nonlinear mapping from the input value to the preset output range and avoid abrupt changes in the compensation amount. In this embodiment, m is set to 3 millimoles per liter, that is, the maximum compensation amount does not exceed 3 millimoles per liter.
[0132] Calculate the final compensation offset after Sigmoid transformation in the pre-compensation stage, global compensation stage, and post-compensation stage, respectively.
[0133] Step S5: Compensation Quantity Synthesis and Output: The technical purpose of this step is to weight and synthesize the compensation quantities from each stage, and output the final correction signal after smoothing and filtering.
[0134] The general formula for calculating the total compensation is: C=fs(Aa)×(O1×C1+O2×C2+O3×C3); Where C is the total compensation amount of the final output, in millimoles per liter; fs(·): Defined as a sigmoid nonlinear transformation function, used to map the compensation adjustment range to a preset reasonable numerical range to avoid overcompensation or undercompensation. Its maximum output value can be set to 2, 2.5, 3, 3.5 or 4 mmol / L, and in this embodiment, 3 mmol / L is preferred. Aa: The compensation adjustment range of the current frame output by the compensation state analysis module, which is calculated frame by frame by the progressive compensation range adjustment process; O1, O2, and O3 are the dynamic weighting coefficients corresponding to the compensation offsets in the pre-compensation stage, global compensation stage, and post-compensation stage, respectively, and the sum of the three is always equal to 1. C1, C2, and C3: These are the compensation offsets calculated during the pre-compensation stage, the global compensation stage, and the post-compensation stage, respectively.
[0135] The calculation process is executed by the controller of the continuous glucose monitoring device, which integrates the multi-stage global attenuation compensation results with the real-time local compensation adjustment range to generate a total compensation amount that accurately matches the current signal attenuation state.
[0136] Based on the current compensation stage of the sensor, the weighting coefficients corresponding to the compensation offsets at each stage are dynamically set. For example, when in the pre-compensation stage, the weighting coefficient for the pre-compensation offset is set to 0.8, the weighting coefficient for the global compensation offset is set to 0.15, and the weighting coefficient for the post-compensation offset is set to 0.05; when in the global compensation stage, the weighting coefficient for the global compensation offset is set to 0.7, the weighting coefficient for the pre-compensation offset is set to 0.2, and the weighting coefficient for the post-compensation offset is set to 0.1; when in the post-compensation stage, the weighting coefficient for the post-compensation offset is set to 0.8, the weighting coefficient for the global compensation offset is set to 0.15, and the weighting coefficient for the pre-compensation offset is set to 0.05.
[0137] The total compensation amount is obtained by multiplying the compensation offset of each stage by the corresponding weighting coefficient and then summing the results. A moving average smoothing filter is then applied to the total compensation amount. The length of the moving average window is set to 2, 3, 4, 5, or 6 data points; in this embodiment, 5 points are preferred to further eliminate high-frequency noise in the total compensation amount. The smoothed total compensation amount is then superimposed on the original signal to obtain the final corrected signal, which is then output.
[0138] The weighting coefficients for each compensation offset are dynamically set based on the current compensation stage of the sensor. For example, when in the pre-compensation stage, the weighting coefficient for the pre-compensation offset is set to 0.8, the weighting coefficient for the global compensation offset is set to 0.15, and the weighting coefficient for the post-compensation offset is set to 0.05.
[0139] The total compensation amount is obtained by multiplying the compensation offset of each stage by the corresponding weighting coefficient and then summing the results. A moving average smoothing filter is then applied to the total compensation amount, with the moving average window length set to 5 data points to further eliminate high-frequency noise. The smoothed total compensation amount is then superimposed onto the original signal to obtain the final corrected signal, which is then output.
[0140] Please see Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an early signal attenuation correction system 200 for continuous glucose monitoring provided in this application embodiment. The early signal attenuation correction system 200 for continuous glucose monitoring is used to perform the steps of the early signal attenuation correction method for continuous glucose monitoring shown in the above embodiments. The early signal attenuation correction system 200 for continuous glucose monitoring can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, laptop computer, wearable device, or robot.
[0141] like Figure 5 As shown, the early signal attenuation correction system 200 for continuous glucose monitoring includes: The signal acquisition unit 201 is used to acquire the raw signal from the continuous glucose monitoring sensor, calculate the local mean and global mean of the raw signal, and use the exponentially weighted moving average method to dynamically update the baseline level of the raw signal frame by frame using the local mean. The segmentation processing unit 202 is used to segment the original signal into preset batches for processing, evaluate the current signal state and determine the compensation demand trend at the boundary of each batch, and gradually adjust the compensation amplitude in small steps within a preset progressive window. The attenuation correction unit 203 is used to select the pre-compensation, global compensation, or post-compensation stage according to the sensor implantation time. It uses the Weibull function and multi-segment Weibull function fusion to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively. By adjusting the Weibull function to compensate the signal, it reflects the time-varying characteristics of signal attenuation. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.
[0142] In some embodiments, acquiring the raw signal from the continuous glucose monitoring sensor includes: acquiring the raw current signal output by the sensor, performing power frequency interference filtering and random noise removal processing on the raw current signal, converting the denoised current signal into an interstitial fluid glucose concentration signal, and using the converted glucose concentration signal as the raw signal for subsequent processing.
[0143] In some embodiments, calculating the local mean and global mean of the original signal includes: extracting the most recent preset number of continuous data points from the original signal, calculating the arithmetic mean of all extracted data points to obtain the local mean; and calculating the arithmetic mean of all collected data points in the original signal to obtain the global mean.
[0144] In some embodiments, the method of using an exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using the local mean includes: using the value of the first frame of the original signal as the initial baseline level; for each newly acquired frame of the original signal, reading the baseline level stored in the previous frame; and calculating the baseline level of the previous frame and the local mean of the current frame by weighting according to a preset baseline update coefficient to obtain the baseline level of the current frame and overwriting the stored baseline level of the previous frame.
[0145] In some embodiments, the step of dividing the original signal into preset batches includes: dividing the original signal into multiple consecutive data batches according to a preset fixed batch interval and storing them in chronological order.
[0146] In some embodiments, the step of evaluating the current signal state and determining the compensation demand trend at the boundary of each batch includes: extracting the baseline mean and the original signal mean of all data points in the current data batch; calculating the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch; calculating the second difference between the original signal mean of the current data batch and the original signal mean of the previous data batch; and determining the trend and degree of signal attenuation and the direction of change in compensation demand based on the sign and magnitude of the first and second differences.
[0147] In some embodiments, the step of gradually adjusting the compensation amplitude in small steps within a preset progressive window includes: determining the total adjustment amount of the compensation amplitude based on the direction and degree of change in the compensation requirement; distributing the total adjustment amount evenly to all data frames within the preset progressive window; and gradually adjusting the compensation amplitude according to the allocated single-frame adjustment amount during the processing of each frame of data within the progressive window until the total adjustment amount is completed.
[0148] In some embodiments, the step of selecting a pre-compensation, global compensation, or post-compensation stage based on the sensor implantation duration, and using a fusion of Weibull functions and multi-segment Weibull functions to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively, and adjusting the degree of compensation of the signal by the Weibull function to reflect the time-varying characteristics of signal attenuation, includes: preset implantation duration thresholds corresponding to the pre-compensation stage, global compensation stage, and post-compensation stage; comparing the current implantation duration of the sensor with the thresholds of each stage to determine the current compensation stage; calling the preset Weibull function attenuation characteristic parameters for the current compensation stage; calculating the compensation offset for the corresponding stage based on the Weibull function attenuation characteristic parameters; and performing a nonlinear transformation on the calculated compensation offset to map the compensation offset to a preset reasonable value range.
[0149] In some embodiments, the step of fusing and calculating each compensation offset and outputting the final correction signal after overshoot protection to complete the early signal attenuation correction for continuous glucose monitoring includes: dynamically setting the weighting coefficients corresponding to the compensation offsets of each stage according to the current compensation stage of the sensor; multiplying the compensation offsets of each stage by the corresponding weighting coefficients and summing them to obtain the total compensation amount; performing Sigmoid transformation on the total compensation amount to avoid overcompensation and undercompensation; and superimposing the total compensation amount after Sigmoid transformation onto the original signal to obtain the final correction signal and output it.
[0150] It should be noted that those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the early signal attenuation correction system and its modules for continuous glucose monitoring described above can be referred to the corresponding content in the various embodiments of the early signal attenuation correction method for continuous glucose monitoring, and will not be repeated here.
[0151] The aforementioned early signal attenuation correction method for continuous glucose monitoring can be implemented as a computer program, which can be used in, for example... Figure 5 It runs on the device shown.
[0152] Please see Figure 6 , Figure 6 This is a schematic block diagram of the continuous glucose monitoring device provided in an embodiment of this application. The continuous glucose monitoring device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.
[0153] The storage medium may store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any early signal attenuation correction method for continuous glucose monitoring.
[0154] The processor provides computing and control capabilities to support the operation of the entire continuous glucose monitoring system.
[0155] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When executed by a processor, the computer program enables the processor to perform any early signal attenuation correction method for continuous glucose monitoring.
[0156] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific continuous glucose monitoring devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0157] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0158] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: The raw signal from the continuous glucose monitoring sensor is acquired, and the local and global mean values of the raw signal are calculated. An exponentially weighted moving average is used to dynamically update the baseline level of the raw signal frame by frame using the local mean. The original signal is divided into preset batches for processing. At the boundary of each batch, the current signal status is evaluated and the trend of compensation demand is judged. The compensation amplitude is gradually adjusted in small steps within the preset progressive window. Based on the sensor implantation duration, pre-compensation, global compensation, or post-compensation stages are selected accordingly. Using a fusion of Weibull functions and multi-segment Weibull functions, the compensation offsets corresponding to the pre-compensation, global compensation, and post-compensation stages are calculated respectively. The time-varying characteristics of signal attenuation are reflected by adjusting the degree of compensation of the signal by the Weibull function. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.
[0159] In some embodiments, acquiring the raw signal from the continuous glucose monitoring sensor includes: acquiring the raw current signal output by the sensor, performing power frequency interference filtering and random noise removal processing on the raw current signal, converting the denoised current signal into an interstitial fluid glucose concentration signal, and using the converted glucose concentration signal as the raw signal for subsequent processing.
[0160] In some embodiments, calculating the local mean and global mean of the original signal includes: extracting the most recent preset number of continuous data points from the original signal, calculating the arithmetic mean of all extracted data points to obtain the local mean; and calculating the arithmetic mean of all collected data points in the original signal to obtain the global mean.
[0161] In some embodiments, the method of using an exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using the local mean includes: using the value of the first frame of the original signal as the initial baseline level; for each newly acquired frame of the original signal, reading the baseline level stored in the previous frame; and calculating the baseline level of the previous frame and the local mean of the current frame by weighting according to a preset baseline update coefficient to obtain the baseline level of the current frame and overwriting the stored baseline level of the previous frame.
[0162] In some embodiments, the step of dividing the original signal into preset batches includes: dividing the original signal into multiple consecutive data batches according to a preset fixed batch interval and storing them in chronological order.
[0163] In some embodiments, the step of evaluating the current signal state and determining the compensation demand trend at the boundary of each batch includes: extracting the baseline mean and the original signal mean of all data points in the current data batch; calculating the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch; calculating the second difference between the original signal mean of the current data batch and the original signal mean of the previous data batch; and determining the trend and degree of signal attenuation and the direction of change in compensation demand based on the sign and magnitude of the first and second differences.
[0164] In some embodiments, the step of gradually adjusting the compensation amplitude in small steps within a preset progressive window includes: determining the total adjustment amount of the compensation amplitude based on the direction and degree of change in the compensation requirement; distributing the total adjustment amount evenly to all data frames within the preset progressive window; and gradually adjusting the compensation amplitude according to the allocated single-frame adjustment amount during the processing of each frame of data within the progressive window until the total adjustment amount is completed.
[0165] In some embodiments, the step of selecting a pre-compensation, global compensation, or post-compensation stage based on the sensor implantation duration, and using a fusion of Weibull functions and multi-segment Weibull functions to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively, and adjusting the degree of compensation of the signal by the Weibull function to reflect the time-varying characteristics of signal attenuation, includes: preset implantation duration thresholds corresponding to the pre-compensation stage, global compensation stage, and post-compensation stage; comparing the current implantation duration of the sensor with the thresholds of each stage to determine the current compensation stage; calling the preset Weibull function attenuation characteristic parameters for the current compensation stage; calculating the compensation offset for the corresponding stage based on the Weibull function attenuation characteristic parameters; and performing a nonlinear transformation on the calculated compensation offset to map the compensation offset to a preset reasonable value range.
[0166] In some embodiments, the step of fusing and calculating each compensation offset and outputting the final correction signal after overshoot protection to complete the early signal attenuation correction for continuous glucose monitoring includes: dynamically setting the weighting coefficients corresponding to the compensation offsets of each stage according to the current compensation stage of the sensor; multiplying the compensation offsets of each stage by the corresponding weighting coefficients and summing them to obtain the total compensation amount; performing Sigmoid transformation on the total compensation amount to avoid overcompensation and undercompensation; and superimposing the total compensation amount after Sigmoid transformation onto the original signal to obtain the final correction signal and output it.
[0167] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the early signal attenuation correction method for continuous glucose monitoring as provided in any embodiment of this application.
[0168] The computer-readable storage medium can be an internal storage unit of the continuous glucose monitoring device described in the foregoing embodiments, such as the hard drive or memory of the continuous glucose monitoring device. Alternatively, the computer-readable storage medium can be an external storage device of the continuous glucose monitoring device, such as a plug-in hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard equipped on the continuous glucose monitoring device.
[0169] When the computer program is executed by the processor, the processor acts as the controller of the continuous glucose monitoring device, and works with the glucose sensor to execute the above-mentioned early signal attenuation correction method, process the original signal collected by the glucose sensor and output the corrected blood glucose concentration signal.
[0170] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for early signal attenuation correction in continuous glucose monitoring, characterized in that, include: The raw signal from the continuous glucose monitoring sensor is acquired, and the local and global mean values of the raw signal are calculated. An exponentially weighted moving average is used to dynamically update the baseline level of the raw signal frame by frame using the local mean. The original signal is divided into preset batches for processing. At the boundary of each batch, the current signal status is evaluated and the trend of compensation demand is judged. The compensation amplitude is gradually adjusted in small steps within the preset progressive window. Based on the sensor implantation duration, pre-compensation, global compensation, or post-compensation stages are selected accordingly. Using a fusion of Weibull functions and multi-segment Weibull functions, the compensation offsets corresponding to the pre-compensation, global compensation, and post-compensation stages are calculated respectively. The time-varying characteristics of signal attenuation are reflected by adjusting the degree of compensation of the signal by the Weibull function. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.
2. The method according to claim 1, characterized in that, The acquisition of the raw signal from the continuous glucose monitoring sensor includes: The raw current signal output by the sensor is acquired, and power frequency interference and random noise are filtered out. The denoised current signal is then converted into an interstitial fluid glucose concentration signal, which is used as the raw signal for subsequent processing.
3. The method according to claim 2, characterized in that, The calculation of the local and global mean of the original signal includes: Extract the most recent preset number of continuous data points from the original signal, and calculate the arithmetic mean of all extracted data points to obtain the local mean; calculate the arithmetic mean of all collected data points in the original signal to obtain the global mean.
4. The method according to claim 1, characterized in that, The method of using exponentially weighted moving average to dynamically update the baseline level of the original signal frame by frame using local mean includes: The value of the first frame of raw signal is used as the initial baseline level. For each newly acquired frame of raw signal, the baseline level stored in the previous frame is read. According to the preset baseline update coefficient, the baseline level of the previous frame is weighted and calculated with the local mean of the current frame to obtain the baseline level of the current frame and overwrite the stored baseline level of the previous frame.
5. The method according to claim 1, characterized in that, The process of dividing the original signal into preset batches includes: The original signal is divided into multiple consecutive data batches according to a preset fixed batch interval and stored in chronological order.
6. The method according to claim 5, characterized in that, The step of evaluating the current signal state and determining the compensation demand trend at the boundary of each batch includes: Extract the baseline mean and original signal mean of all data points in the current data batch; calculate the first difference between the baseline mean of the current data batch and the baseline mean of the previous data batch; calculate the second difference between the original signal mean of the current data batch and the original signal mean of the previous data batch; based on the sign and magnitude of the first and second differences, determine the trend and degree of signal attenuation, and determine the direction of change in compensation requirements.
7. The method according to claim 6, characterized in that, The step of gradually adjusting the compensation amplitude in small increments within a preset progressive window includes: Based on the direction and extent of the change in compensation demand, determine the total adjustment amount of the compensation range; distribute the total adjustment amount evenly to all data frames within the preset progressive window; when processing each frame of data within the progressive window, gradually adjust the compensation range according to the allocated single-frame adjustment amount until the total adjustment amount is completed.
8. The method according to claim 1, characterized in that, The process involves selecting pre-compensation, global compensation, or post-compensation stages based on the sensor implantation duration. A fusion of Weibull functions and multi-segment Weibull functions is used to calculate the compensation offset for each stage. Adjusting the Weibull function to compensate for the signal reflects the time-varying characteristics of signal attenuation. This includes: Preset implantation duration thresholds for the pre-compensation phase, global compensation phase, and post-compensation phase; The current implantation time of the sensor is compared with the threshold of each stage to determine the current compensation stage; the preset Weibull function attenuation characteristic parameters of the current compensation stage are called. The compensation offset for the corresponding stage is calculated based on the attenuation characteristic parameters of the Weibull function; the calculated compensation offset is then subjected to a nonlinear transformation to map the compensation offset to a preset reasonable value range.
9. The method according to claim 1, characterized in that, The process of fusing and calculating each compensation offset, and then outputting the final correction signal after overshoot protection, to complete the early signal attenuation correction for continuous glucose monitoring, includes: Based on the current compensation stage of the sensor, dynamically set the weighting coefficients corresponding to the compensation offset of each stage; The total compensation amount is obtained by multiplying the compensation offset of each stage by the corresponding weighting coefficient and then summing the results. The total compensation amount is processed by Sigmoid transformation to avoid overcompensation and undercompensation. The total compensation amount after Sigmoid transformation is superimposed on the original signal to obtain the final corrected signal, which is then output.
10. An early signal attenuation correction system for continuous glucose monitoring, applied to the method as described in any one of claims 1-9; characterized in that, include: The signal acquisition unit is used to acquire the raw signal from the continuous glucose monitoring sensor, calculate the local mean and global mean of the raw signal, and use the exponentially weighted moving average method to dynamically update the baseline level of the raw signal frame by frame using the local mean. The segmentation processing unit is used to divide the original signal into preset batches for processing. At the boundary of each batch, the current signal state is evaluated and the trend of compensation demand is determined. The compensation amplitude is gradually adjusted in small steps within a preset progressive window. The attenuation correction unit is used to select the pre-compensation, global compensation, or post-compensation stage according to the sensor implantation time. It uses a Weibull function and a multi-segment Weibull function fusion method to calculate the compensation offset corresponding to the pre-compensation, global compensation, and post-compensation stages respectively. By adjusting the Weibull function to compensate the signal, it reflects the time-varying characteristics of signal attenuation. Each compensation offset is fused and calculated, and after overshoot protection processing, the final correction signal is output to complete the early signal attenuation correction for continuous glucose monitoring.