Insulin pump control method and system based on blood glucose data

By constructing an insulin pharmacokinetic model and a Bayesian neural network prediction model, and dynamically switching control strategies, the problem of superimposed effects caused by prediction misjudgment in insulin pump control was solved, achieving more precise and safer blood glucose control.

CN121490184APending Publication Date: 2026-02-10MENGKANG (CHONGQING) MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512004584.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing insulin pump control technology is prone to errors in prediction models, which can lead to an additive effect between the additional insulin dose and the residual insulin in the body, resulting in delayed hypoglycemia or poor hyperglycemia control.

Method used

An insulin pump control method based on blood glucose data is adopted. The residual insulin activity value in transit is calculated by constructing an insulin pharmacokinetic decay model and combining it with a Bayesian neural network prediction model to generate prediction uncertainty distribution parameters. The control strategy is dynamically switched to optimize the insulin infusion dose, including optimal dose optimization and conservative dose adjustment.

Benefits of technology

It effectively avoids the insulin additive effect, reduces the risk of delayed hypoglycemia, and improves the accuracy and safety of blood glucose control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121490184A_ABST
    Figure CN121490184A_ABST
Patent Text Reader

Abstract

The invention discloses an insulin pump control method and system based on blood glucose data, and relates to the technical field of insulin infusion control, and the method comprises the steps: obtaining real-time blood glucose sequence data and historical infusion record data, and carrying out the preprocessing; constructing an insulin pharmacokinetic attenuation model to calculate an in-transit insulin residual activity value; inputting the standardized blood glucose time series data into a Bayesian neural network prediction model to generate prediction uncertainty distribution parameters; calculating a prediction confidence index according to the prediction variance and comparing the prediction confidence index with a threshold value to obtain a confidence judgment result; selecting a dose optimization strategy or a conservative control strategy according to a confidence coefficient judgment result to calculate an insulin infusion dose; infusion is executed, and historical records are updated; the prediction uncertainty is quantified through the Bayesian neural network, the in-transit insulin activity is accurately modeled in combination with the pharmacokinetic model, and the control strategy is dynamically switched according to the confidence, so that the control error amplification caused by prediction misjudgment is effectively avoided, and the delayed hypoglycemia caused by the insulin superposition effect is prevented.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of insulin infusion control, in particular to an insulin pump control method and system based on blood glucose data. BACKGROUND

[0002] An insulin pump is a medical device for diabetes management, which continuously infuses insulin subcutaneously to mimic physiological insulin secretion pattern. To achieve more precise glycemic control, the technical development in this field is committed to building an automatic closed-loop control system linked with continuous glucose monitoring (CGM) and insulin pump.

[0003] The existing insulin pump control technology has developed from open-loop preset to hybrid closed-loop (HCL) stage, which can automatically adjust the basal insulin infusion rate according to the real-time blood glucose value. Some schemes try to introduce trend prediction based on historical data to guide the adjustment, but when the prediction model makes a directional misjudgment due to individual differences or complex physiological disturbances, the subsequent trend classification and dose adjustment based on this false prediction will systematically amplify the initial error. Moreover, there is a significant absorption and onset delay of subcutaneous insulin injection, and its activity can last for several hours. Most control algorithms fail to accurately model and compensate the activity of "in-transit insulin" that has been infused subcutaneously but has not yet taken effect as a key state variable when making current dose decisions. This leads to the additive effect of the newly added insulin dose and the residual active insulin in the body, causing delayed hypoglycemia; or due to insufficient estimation of subsequent activity, resulting in weak control intervention for hyperglycemia. SUMMARY

[0004] The purpose of the present application is to provide an insulin pump control method and system based on blood glucose data, which solves the problem that the newly added insulin dose may be misjudged by the prediction model and easily produces an additive effect with the residual active insulin in the body, thereby causing delayed hypoglycemia or weak control intervention for hyperglycemia.

[0005] To achieve the above purpose, the present application provides an insulin pump control method based on blood glucose data, comprising the following steps: Step 100, acquiring real-time blood glucose sequence data collected by a continuous glucose monitoring module and historical infusion record data of an insulin pump, and preprocessing the real-time blood glucose sequence data to obtain standardized blood glucose time series data; Step 200, constructing an insulin pharmacokinetic decay model according to the historical infusion record data, and calculating the residual activity value of in-transit insulin through the insulin pharmacokinetic decay model; Step 300, inputting the standardized blood glucose time series data into a pre-trained Bayesian neural network prediction model to generate prediction uncertainty distribution parameters at each prediction time in a preset time domain; Among them, the distribution parameters of prediction uncertainty include the blood glucose prediction mean and the blood glucose prediction variance; Step 400: Calculate the prediction confidence index based on the blood glucose prediction variance, and compare the prediction confidence index with the preset confidence threshold to obtain the confidence judgment result; If the confidence level is greater than or equal to the preset confidence threshold, then the dose optimization objective function is constructed based on the blood glucose prediction mean, the residual insulin activity value in transit and the preset target blood glucose range, and the dose optimization objective function is solved by the convex optimization algorithm to obtain the optimal insulin infusion dose. If the confidence level is less than the preset confidence threshold, the conservative adjustment coefficient is determined based on the slope of blood glucose change in the most recent preset time window in the standardized blood glucose time series data. The conservative insulin infusion dose is obtained by multiplying the basal infusion rate by the conservative adjustment coefficient. Step 500: Convert the optimal insulin infusion dose or conservative insulin infusion dose into an insulin pump control command, send the insulin pump control command to the insulin pump to perform the infusion operation, and update the infusion dose and infusion timestamp to the historical infusion record data.

[0006] Furthermore, the real-time blood glucose sequence data is preprocessed to obtain standardized blood glucose time-series data, including: The median absolute deviation method based on a sliding window is used to detect outliers in real-time blood glucose sequence data. Sampling points with a median absolute deviation that deviates from the median in the sliding window by more than a preset multiple are identified as outliers and filtered out. The cubic spline interpolation method was used to impute missing values ​​in the blood glucose sequence data after outlier filtering. A cubic polynomial curve was constructed based on the valid blood glucose data points before and after the missing point, and the imputed value at the missing position was calculated to obtain standardized blood glucose time series data with equal interval sampling.

[0007] Furthermore, the residual insulin activity in transit is calculated using an insulin pharmacokinetic decay model, including the following steps: Iterate through all infusion records within the active window time range in the historical infusion record data; For each historical infusion record, the residual activity contribution value at the current moment is calculated based on the double exponential decay function, which includes an absorption time constant and a clearance time constant. The absorption time constant reflects the rate at which insulin is absorbed from subcutaneous tissue into the blood, and the clearance time constant reflects the metabolic clearance rate of insulin in the blood. The residual activity contribution values ​​of all historical infusions are summed to obtain the in-transit residual insulin activity value at the current moment.

[0008] Furthermore, standardized blood glucose time-series data are input into a pre-trained Bayesian neural network prediction model to generate prediction uncertainty distribution parameters for each prediction time within a preset time domain, including the following steps: The network weights of the Bayesian neural network prediction model are sampled multiple times using Monte Carlo methods, and a set of network weights is obtained each time. Standardized blood glucose time-series data are forward-propagated through a network after each sampling to obtain multiple prediction outputs for each prediction time within a preset time domain; Statistical analysis is performed on multiple prediction outputs. The mean of the multiple prediction outputs is calculated as the blood glucose prediction mean at each prediction time within the preset time domain. The variance of the multiple prediction outputs relative to the blood glucose prediction mean is calculated as the blood glucose prediction variance at each prediction time within the preset time domain. The blood glucose prediction mean and blood glucose prediction variance are output as prediction uncertainty distribution parameters.

[0009] Furthermore, the formula for calculating the prediction confidence index based on the blood glucose prediction variance is as follows: ; in, This indicates the confidence level of the prediction; This represents the variance in blood glucose prediction; This represents the variance sensitivity coefficient.

[0010] Furthermore, the mathematical expression for the dose optimization objective function is as follows: ; in, This represents the value of the objective function for dose optimization. This represents the insulin infusion dose decision variable to be solved; This represents the number of prediction steps within the prediction time domain; Indicates the first The average predicted blood glucose level at each prediction time; Indicates the target blood glucose level; This indicates the insulin infusion dose in the previous control cycle; This indicates the residual insulin activity value in transit; This indicates the upper limit constraint on insulin activity in transit; , and These represent the weights for blood glucose deviation, dose smoothing, and activity constraint, respectively. This indicates the operation of retrieving the maximum value.

[0011] Furthermore, when solving the dose optimization objective function using convex optimization algorithms, the physical constraints of insulin infusion dose must also be satisfied during the solution process: ; in, This indicates the maximum permissible dose for a single infusion.

[0012] Furthermore, the step of determining the conservative adjustment coefficient based on the slope of blood glucose changes within the most recent preset time window in the standardized blood glucose time series data includes: Extract the blood glucose data sequence within the most recent preset time window from standardized blood glucose time-series data; The least squares method was used to linearly fit the blood glucose data sequence and calculate the slope of blood glucose change. The slope of blood glucose change is compared with a preset slope threshold, and the conservative adjustment coefficient is determined based on the comparison result. The calculation rules are as follows: ; in, Indicates the conservative adjustment coefficient; This represents the threshold for the slope of blood glucose changes; Indicates the regulatory gain when blood glucose rises; This indicates the regulatory gain when blood glucose levels drop.

[0013] An insulin pump control system based on blood glucose data, used to execute any of the above-described insulin pump control methods based on blood glucose data, includes: The data acquisition module is used to acquire real-time blood glucose sequence data collected by continuous glucose monitoring devices and historical infusion record data of insulin pumps, and to perform outlier filtering and missing value imputation preprocessing on the real-time blood glucose sequence data to obtain standardized blood glucose time series data. The activity calculation module is used to construct an insulin pharmacokinetic decay model based on historical infusion record data, and to calculate the residual activity value of insulin in the subcutaneous tissue that has not been fully absorbed at the current moment through the insulin pharmacokinetic decay model. The insulin pharmacokinetic decay model uses a double exponential decay function to characterize the absorption process of insulin from the subcutaneous injection point into the blood and the metabolic clearance process of insulin in the blood. The prediction module is used to input standardized blood glucose time series data into a pre-trained Bayesian neural network prediction model to generate a blood glucose prediction value sequence and corresponding prediction uncertainty distribution parameters within a preset time domain. The prediction uncertainty distribution parameters include the blood glucose prediction mean and blood glucose prediction variance. The confidence level determination module is used to calculate the prediction confidence index based on the blood glucose prediction variance, and compare the prediction confidence index with a preset confidence threshold to obtain the confidence level determination result. The dose optimization module is used to construct a dose optimization objective function if the confidence index is greater than or equal to a preset confidence threshold, and then solve the dose optimization objective function through a convex optimization algorithm to obtain the optimal insulin infusion dose. The conservative control module is used to determine the conservative adjustment coefficient based on the slope of blood glucose change if the confidence index is less than the preset confidence threshold. The conservative control module then multiplies the basal infusion rate by the conservative adjustment coefficient to obtain the conservative insulin infusion dose. The instruction execution module is used to convert the optimal insulin infusion dose or conservative insulin infusion dose into insulin pump control instructions, send the insulin pump control instructions to the insulin pump to execute the infusion operation, and update the infusion dose and infusion timestamp to the historical infusion record data.

[0014] An insulin pump control system based on blood glucose data further includes a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the insulin pump control method based on blood glucose data described above.

[0015] Therefore, the insulin pump control method and system based on blood glucose data described above have the following beneficial effects: 1. By introducing a Bayesian neural network prediction model for blood glucose trend prediction, it can simultaneously output the predicted value and the prediction uncertainty distribution parameter. Compared with traditional deterministic prediction models, it can quantify the reliability of the prediction results and provide a reliable basis for subsequent control strategy selection.

[0016] 2. By constructing an insulin pharmacokinetic decay model, the absorption and metabolism of subcutaneously injected insulin are accurately modeled using a double exponential decay function. The residual insulin activity value in transit is calculated and used as a key constraint variable in the dose optimization objective function. This effectively avoids the superposition effect of the new insulin dose and the residual active insulin in the body, and reduces the risk of delayed hypoglycemia.

[0017] 3. The control strategy is dynamically switched according to the prediction confidence index. When the prediction confidence is high, a dose optimization strategy based on model prediction control is adopted to obtain a more accurate blood glucose control effect. When the prediction confidence is low, it automatically switches to a conservative control strategy based on the slope of blood glucose change to ensure safety and effectively avoid the problem of amplified control error caused by prediction misjudgment.

[0018] 4. By introducing blood glucose deviation, dose smoothing, and in-transit insulin activity constraint terms into the dose optimization objective function, and solving it through a convex optimization algorithm, a multi-objective collaborative optimization of insulin infusion dose is achieved, which ensures blood glucose control accuracy while taking into account infusion smoothness and safety constraints.

[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0020] Figure 1 This is a flowchart of an insulin pump control method based on blood glucose data according to the present invention. Detailed Implementation

[0021] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely illustrates selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] Please see Figure 1 An insulin pump control method based on blood glucose data includes the following steps: Step 100: Obtain real-time blood glucose sequence data and historical infusion record data of insulin pump collected by continuous blood glucose monitoring module, and perform outlier filtering and missing value imputation preprocessing on real-time blood glucose sequence data to obtain standardized blood glucose time series data. It should be noted that the continuous glucose monitoring module continuously monitors the glucose concentration in tissue fluid via a subcutaneous sensor. Its sampling cycle is typically 1 to 5 minutes. The real-time blood glucose sequence data structure includes a timestamp field and a blood glucose concentration value field, with the unit of blood glucose concentration being millimoles per liter. Historical infusion records include the timestamp and infusion dose of each insulin infusion.

[0023] Specifically, the insulin pump host acquires real-time blood glucose sequence data collected by the continuous glucose monitoring module via a data interface. The length of this sequence data is a preset historical window length, which in this embodiment ranges from 30 minutes to 120 minutes. When filtering out outliers from the real-time blood glucose sequence data, a sliding window-based median absolute deviation method is used. The specific calculation formula is as follows: ; in, Indicates the first Blood glucose concentration values ​​at each sampling time. This represents the blood glucose sequence within the sliding window. This indicates the operation of taking the median. This represents the absolute deviation of the median. When the blood glucose value at a sampling point meets... If the sampling point is found to be an outlier, it will be filtered out.

[0024] When imputing missing values, a cubic spline interpolation method is used. A cubic polynomial curve is constructed based on the valid blood glucose data points before and after the missing point to calculate the imputed value at the missing position.

[0025] After outlier filtering and missing value imputation, standardized blood glucose time series data are obtained, which is a continuous blood glucose concentration sequence sampled at equal intervals.

[0026] Step 200: Construct an insulin pharmacokinetic decay model based on historical infusion record data, and calculate the residual activity value of insulin in the subcutaneous tissue that has not been fully absorbed at the current moment using the insulin pharmacokinetic decay model. The insulin pharmacokinetic decay model uses a double exponential decay function to characterize the absorption of insulin from the subcutaneous injection site into the bloodstream and the metabolic clearance of insulin from the blood. This model reflects the complete kinetic process of insulin molecules after subcutaneous injection, from diffusion and absorption from the injection site into the capillaries, into the bloodstream, exerting their hypoglycemic effect, until they are metabolically cleared by the liver and kidneys.

[0027] Specifically, the insulin pump unit constructs a double exponential decay function based on the infusion timestamps and infusion doses from historical infusion records to calculate the residual activity contribution of each historical infusion at the current moment. The formula for the double exponential decay function is: ; in, Indicates the current time The residual activity value of insulin in transit; This indicates the number of infusions in the historical infusion record data; Indicates the first The insulin dose per infusion; Indicates the first The timestamp of the next input; and The magnitude coefficients of the first and second bi-exponential models satisfy the normalization condition. In this embodiment The value range is from 1.5 to 2.5. The value range is from 0.5 to 1.5; This represents the absorption time constant, which reflects the rate at which insulin is absorbed from subcutaneous tissue into the bloodstream. In this embodiment, the value ranges from 40 minutes to 80 minutes. This represents the clearance time constant, which reflects the metabolic clearance rate of insulin in the blood. In this embodiment, the value ranges from 150 minutes to 300 minutes. Represents the unit step function, in this embodiment when When the value is 1, The value is 0 at that time.

[0028] The insulin pump unit substitutes all infusion records within the active window time range from the historical infusion record data into the calculation formula of the double exponential decay function, and accumulates them to obtain the residual active value of insulin in transit at the current moment. In this embodiment, the active window time range is set to 4 to 6 hours.

[0029] It should be noted that the parameters in the above double exponential decay function... , , and It can be personalized according to the patient's individual insulin sensitivity and metabolic characteristics.

[0030] Step 300: Input standardized blood glucose time series data into a pre-trained Bayesian neural network prediction model to generate a blood glucose prediction value sequence and corresponding prediction uncertainty distribution parameters within a preset time domain; It's important to note that Bayesian neural network prediction models are deep learning models capable of outputting prediction results while simultaneously quantifying prediction uncertainty. Unlike traditional neural networks that output deterministic point estimates, Bayesian neural networks introduce probability distributions into the network weights, enabling them to output a probability distribution of the prediction results, thereby quantifying the model's confidence in the prediction outcome. The prediction uncertainty distribution parameters include the blood glucose prediction mean and the blood glucose prediction variance. The blood glucose prediction mean represents the most likely predicted blood glucose value, while the blood glucose prediction variance represents the degree of uncertainty in the prediction result.

[0031] Specifically, the insulin pump unit feeds standardized blood glucose time-series data as input vectors into a pre-trained Bayesian neural network prediction model. This model's network structure includes an input layer, multiple hidden layers, and an output layer. The dimension of the input layer corresponds to the sequence length of the standardized blood glucose time-series data. The hidden layers employ a Long Short-Term Memory (LSTM) network structure, effectively capturing the temporal dependencies in the blood glucose time-series data. The output layer uses a probabilistic output format, outputting the predicted blood glucose value and corresponding variance for each prediction time within a preset time domain.

[0032] The Bayesian neural network prediction model estimates the prediction distribution parameters using the Monte Carlo sampling method. The specific calculation process involves: adjusting the network weights... Each random sampling yields a set of network weights. Standardized blood glucose time-series data are processed through a sampled network to obtain a prediction output. ,right The sampling results were statistically analyzed to calculate the blood glucose prediction mean and variance. The formulas for calculating the blood glucose prediction mean and variance are as follows: ; ; in, This represents the predicted mean blood glucose level, which is the predicted blood glucose concentration value at each time point in the predicted blood glucose value sequence. This represents the variance in blood glucose prediction, reflecting the degree of uncertainty in the prediction results; This indicates the number of Monte Carlo samplings, which in this embodiment ranges from 50 to 200. Indicates the first The blood glucose prediction output is obtained from the second sampling. The preset time domain length is set to 30 to 120 minutes in this embodiment.

[0033] Step 400: Calculate the prediction confidence index based on the blood glucose prediction variance, and compare the prediction confidence index with the preset confidence threshold to obtain the confidence judgment result; It should be noted that the prediction confidence index is a quantitative metric that measures the reliability of the prediction results from a Bayesian neural network. A smaller prediction variance indicates higher certainty in the model's predictions, resulting in a higher prediction confidence index. Conversely, a larger prediction variance indicates greater uncertainty in the model's predictions, leading to a lower prediction confidence index. The pre-set confidence threshold is a critical value that distinguishes between high-confidence and low-confidence predictions; it is pre-set based on clinical safety requirements and control precision needs.

[0034] Specifically, the insulin pump unit calculates the prediction confidence index based on the blood glucose prediction variance. The calculation formula is as follows: ; in, This represents the prediction confidence index, with values ​​ranging from 0 to 1. The closer the value is to 1, the higher the prediction confidence. This represents the variance in blood glucose prediction, output by a Bayesian neural network prediction model. This represents the variance sensitivity coefficient, used to adjust the degree of influence of blood glucose prediction variance on the confidence index. In this embodiment... The value ranges from 0.01 to 0.1 and can be adjusted individually according to the blood glucose fluctuation characteristics of different patient groups.

[0035] The insulin pump unit will calculate the prediction confidence index. Compared with the preset confidence threshold A comparison is made. In this embodiment, a pre-set confidence threshold is used. The value range is from 0.6 to 0.9. When the confidence level is high, it indicates that the prediction result is reliable and a prediction-based optimization control strategy can be adopted; when When the confidence level is low, it indicates that there is significant uncertainty in the prediction results, and a conservative control strategy should be adopted to ensure safety.

[0036] (1) If the confidence determination result is that the prediction confidence index is greater than or equal to the preset confidence threshold, then the dose optimization objective function is constructed based on the blood glucose prediction mean, the residual activity value of insulin in transit and the preset target blood glucose range, and the dose optimization objective function is solved by the convex optimization algorithm to obtain the optimal insulin infusion dose; It should be noted that when the confidence level is high, the insulin pump unit employs a model-based predictive control-based dose optimization strategy. The dose optimization objective function comprehensively considers three key factors: the deviation between the predicted mean blood glucose level and the target blood glucose range, the impact of the residual insulin activity during transit on future blood glucose levels, and the smoothness constraint of the insulin infusion dose. The lower and upper limits of the preset target blood glucose range are denoted as follows: and In this embodiment, the default values ​​are 3.9 to 4.4 mmol / L and 7.8 to 10.0 mmol / L, respectively.

[0037] Specifically, the insulin pump unit constructs a dose optimization objective function, the mathematical expression of which is: ; in, This represents the value of the objective function for dose optimization. This represents the insulin infusion dose decision variable to be solved; This represents the number of prediction steps within the prediction time domain; Indicates the first The predicted blood glucose value at each prediction time is derived from the sequence of predicted blood glucose values ​​output by the Bayesian neural network prediction model. This represents the target blood glucose value, calculated as the median of a preset target blood glucose range. ; This indicates the insulin infusion dose in the previous control cycle; This represents the calculated residual insulin activity value in transit; This indicates the upper limit of insulin activity in transit, used to prevent excessive insulin accumulation; , and These represent the weights for blood glucose deviation, dose smoothing, and activity constraint, respectively, in this embodiment. The value range is from 1.0 to 5.0. The value range is from 0.1 to 1.0. The value range is from 10 to 100. This indicates the operation of retrieving the maximum value.

[0038] The insulin pump unit solves the above dose optimization objective function using a convex optimization algorithm. Since the objective function is quadratic and the constraints are linear, this optimization problem belongs to the convex quadratic programming problem and can be solved using the interior-point method or the effective set method. The solution process also requires satisfying the physical constraints of the insulin infusion dose: ; in, This represents the maximum permissible dose for a single infusion. The convex optimization algorithm finds the value of the objective function through iterative calculation. The minimum insulin infusion dose is used as the optimal insulin infusion dose.

[0039] (2) If the confidence level is less than the preset confidence threshold, the conservative adjustment coefficient is determined based on the slope of blood glucose change in the most recent preset time window in the standardized blood glucose time series data, and the conservative insulin infusion dose is obtained by multiplying the basic infusion rate with the conservative adjustment coefficient. It should be noted that a low confidence level indicates significant uncertainty in the prediction results of the Bayesian neural network model, which may be due to sudden changes in the patient's physiological state, sensor noise interference, or insufficient model generalization ability. In this case, the insulin pump unit abandons the optimization control strategy based on the prediction results and instead adopts a conservative control strategy based on the current blood glucose trend to ensure control safety.

[0040] Specifically, the insulin pump unit extracts the most recent blood glucose data sequence within a preset time window from standardized blood glucose time-series data. The length of the preset time window ranges from 15 to 30 minutes. Based on the blood glucose data sequence within this time window, the least squares method is used to fit the slope of blood glucose change, and the calculation formula is as follows: ; in, This indicates the slope of blood glucose changes, expressed in millimoles per liter per minute. Indicates the number of sampling points within the preset time window; Indicates the first The relative time of each sampling point is taken as the zero point, with the start point of the time window as the zero point; Indicates the first The blood glucose concentration values ​​at each sampling point are derived from standardized blood glucose time-series data.

[0041] The insulin pump unit determines the conservative adjustment coefficient based on the slope of blood glucose changes. The specific calculation rules are as follows: ; in, This represents the conservative adjustment coefficient, which in this embodiment ranges from 0.5 to 1.5. The threshold value for the slope of blood glucose change is used to determine whether blood glucose is in a state of rapid change. In this embodiment, the value range is 0.02 to 0.05 mmol / L / min. This represents the adjustment gain when blood glucose rises; in this embodiment, the value ranges from 5 to 15. This represents the adjustment gain when blood glucose decreases. In this embodiment, the value ranges from 10 to 30, and its value is greater than... To enhance protection against the risk of hypoglycemia.

[0042] The insulin pump unit multiplies the basal infusion rate by a conservative adjustment factor to obtain the conservative insulin infusion dose. The calculation formula is as follows: ; in, Indicates the conservative insulin infusion dose; This indicates the basal infusion rate per hour, a parameter that is preset based on the patient's individualized insulin needs. This indicates the duration of the control cycle, in hours.

[0043] Step 500: Convert the optimal insulin infusion dose or conservative insulin infusion dose into an insulin pump control command, send the insulin pump control command to the insulin pump to perform the infusion operation, and update the infusion dose and infusion timestamp to the historical infusion record data.

[0044] It should be noted that insulin pump control commands are digital control signals sent from the insulin pump host to the insulin pump, containing parameters such as infusion dose, infusion rate, and infusion duration. The insulin pump host encapsulates the determined insulin infusion dose into a control command format conforming to the insulin pump communication protocol.

[0045] Specifically, the insulin pump unit first determines whether the current control cycle is executing the optimal insulin infusion dose or the conservative insulin infusion dose. If the confidence level is high, the optimal insulin infusion dose is selected; if the confidence level is low, the conservative insulin infusion dose is selected.

[0046] The insulin pump unit converts the selected insulin infusion dose into insulin pump control commands. This conversion process includes: calculating the infusion rate based on the insulin infusion dose and control cycle duration. The formula for calculating the infusion rate is: ; in, Indicates the infusion rate per hour; This indicates the insulin infusion dose, which is either the optimal insulin infusion dose or the conservative insulin infusion dose. This indicates the duration of the control cycle. The insulin pump unit encapsulates the infusion rate, infusion dose, and infusion start timestamp into a data structure for insulin pump control commands.

[0047] The insulin pump unit sends control commands to the insulin pump via a wireless communication interface. Upon receiving the commands, the insulin pump executes the corresponding insulin infusion. After confirming successful reception and execution of the control commands, the insulin pump unit updates the infusion dose and timestamp to the historical infusion record data, forming a closed-loop data update. This updated historical infusion record data will be used in the next control cycle to calculate the residual insulin activity in transit, achieving dynamic closed-loop operation of the control system.

[0048] In this embodiment of the invention, real-time blood glucose sequence data collected by a continuous blood glucose monitoring module and historical infusion record data of an insulin pump are acquired. The real-time blood glucose sequence data undergoes outlier filtering and missing value imputation preprocessing to obtain standardized blood glucose time-series data. An insulin pharmacokinetic decay model is constructed based on the historical infusion record data, and the residual active value of in-transit insulin that has not yet been fully absorbed in the subcutaneous tissue at the current moment is calculated using this model. The standardized blood glucose time-series data is input into a pre-trained Bayesian neural network prediction model to generate a blood glucose prediction value sequence within a preset time domain and corresponding prediction uncertainty distribution parameters. A prediction confidence index is calculated based on the blood glucose prediction variance, and the prediction confidence index is compared with a preset confidence threshold to obtain a confidence judgment result. Based on the confidence judgment result, an optimal control strategy or a conservative control strategy is selected to calculate the insulin infusion dose. The insulin infusion dose is converted into insulin pump control commands and the infusion operation is executed, while the historical infusion record data is updated. This invention quantifies prediction uncertainty through Bayesian neural networks, accurately models in-transit insulin activity using pharmacokinetic models, and dynamically switches control strategies based on prediction confidence. This effectively avoids the problem of amplified control errors caused by prediction misjudgments, while preventing the risk of delayed hypoglycemia caused by the cumulative effect of insulin, thus improving the safety and blood glucose control accuracy of the insulin pump automatic control system.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. An insulin pump control method based on blood glucose data, characterized in that, Includes the following steps: Step 100: Obtain real-time blood glucose sequence data and historical infusion record data from the continuous blood glucose monitoring module, and preprocess the real-time blood glucose sequence data to obtain standardized blood glucose time series data. Step 200: Construct an insulin pharmacokinetic decay model based on historical infusion record data, and calculate the residual insulin activity value in transit using the insulin pharmacokinetic decay model; Step 300: Input standardized blood glucose time series data into a pre-trained Bayesian neural network prediction model to generate prediction uncertainty distribution parameters for each prediction time within a preset time domain; Among them, the distribution parameters of prediction uncertainty include the blood glucose prediction mean and the blood glucose prediction variance; Step 400: Calculate the prediction confidence index based on the blood glucose prediction variance, and compare the prediction confidence index with the preset confidence threshold to obtain the confidence judgment result; If the confidence level is greater than or equal to the preset confidence threshold, then the dose optimization objective function is constructed based on the blood glucose prediction mean, the residual insulin activity value in transit and the preset target blood glucose range, and the dose optimization objective function is solved by the convex optimization algorithm to obtain the optimal insulin infusion dose. If the confidence level is less than the preset confidence threshold, the conservative adjustment coefficient is determined based on the slope of blood glucose change in the most recent preset time window in the standardized blood glucose time series data. The conservative insulin infusion dose is obtained by multiplying the basal infusion rate by the conservative adjustment coefficient. Step 500: Convert the optimal insulin infusion dose or conservative insulin infusion dose into an insulin pump control command, send the insulin pump control command to the insulin pump to perform the infusion operation, and update the infusion dose and infusion timestamp to the historical infusion record data.

2. The insulin pump control method based on blood glucose data according to claim 1, characterized in that, Preprocessing of real-time blood glucose sequence data yields standardized blood glucose time-series data, including: The median absolute deviation method based on a sliding window is used to detect outliers in real-time blood glucose sequence data. Sampling points with a median absolute deviation that deviates from the median in the sliding window by more than a preset multiple are identified as outliers and filtered out. The cubic spline interpolation method was used to impute missing values ​​in the blood glucose sequence data after outlier filtering. A cubic polynomial curve was constructed based on the valid blood glucose data points before and after the missing point, and the imputed value at the missing position was calculated to obtain standardized blood glucose time series data with equal interval sampling.

3. The insulin pump control method based on blood glucose data according to claim 2, characterized in that, Calculating the residual insulin activity in transit using an insulin pharmacokinetic decay model includes the following steps: Iterate through all infusion records within the active window time range in the historical infusion record data; For each historical infusion record, the residual activity contribution value at the current moment is calculated based on the double exponential decay function, which includes an absorption time constant and a clearance time constant. The absorption time constant reflects the rate at which insulin is absorbed from subcutaneous tissue into the blood, and the clearance time constant reflects the metabolic clearance rate of insulin in the blood. The residual activity contribution values ​​of all historical infusions are summed to obtain the in-transit residual insulin activity value at the current moment.

4. The insulin pump control method based on blood glucose data according to claim 3, characterized in that, Standardized blood glucose time-series data are input into a pre-trained Bayesian neural network prediction model to generate prediction uncertainty distribution parameters for each prediction time within a preset time domain, including the following steps: The network weights of the Bayesian neural network prediction model are sampled multiple times using Monte Carlo methods, and a set of network weights is obtained each time. Standardized blood glucose time-series data are forward-propagated through a network after each sampling to obtain multiple prediction outputs for each prediction time within a preset time domain; Statistical analysis is performed on multiple prediction outputs. The mean of the multiple prediction outputs is calculated as the blood glucose prediction mean at each prediction time within the preset time domain. The variance of the multiple prediction outputs relative to the blood glucose prediction mean is calculated as the blood glucose prediction variance at each prediction time within the preset time domain. The blood glucose prediction mean and blood glucose prediction variance are output as prediction uncertainty distribution parameters.

5. The insulin pump control method based on blood glucose data according to claim 4, characterized in that, The formula for calculating the prediction confidence index based on the variance of blood glucose prediction is as follows: ; in, This indicates the confidence level of the prediction; This represents the variance in blood glucose prediction; This represents the variance sensitivity coefficient.

6. The insulin pump control method based on blood glucose data according to claim 5, characterized in that, The mathematical expression for the dose optimization objective function is as follows: ; in, This represents the value of the objective function for dose optimization. This represents the insulin infusion dose decision variable to be solved; This represents the number of prediction steps within the prediction time domain; Indicates the first The average predicted blood glucose level at each prediction time; Indicates the target blood glucose level; This indicates the insulin infusion dose in the previous control cycle; This indicates the residual insulin activity value in transit; This indicates the upper limit constraint on insulin activity in transit; , and These represent the weights for blood glucose deviation, dose smoothing, and activity constraint, respectively. This indicates the operation of retrieving the maximum value.

7. The insulin pump control method based on blood glucose data according to claim 6, characterized in that, When solving the dose optimization objective function using convex optimization algorithms, the physical constraints of insulin infusion dose must also be satisfied during the solution process: ; in, This indicates the maximum permissible dose for a single infusion.

8. The insulin pump control method based on blood glucose data according to claim 7, characterized in that, The steps for determining the conservative adjustment coefficient based on the slope of blood glucose changes within the most recent preset time window in standardized blood glucose time-series data include: Extract the blood glucose data sequence within the most recent preset time window from standardized blood glucose time-series data; The least squares method was used to linearly fit the blood glucose data sequence and calculate the slope of blood glucose change. The slope of blood glucose change is compared with a preset slope threshold, and the conservative adjustment coefficient is determined based on the comparison result. The calculation rules are as follows: ; in, Indicates the conservative adjustment coefficient; This represents the threshold for the slope of blood glucose changes; Indicates the regulatory gain when blood glucose rises; This indicates the regulatory gain when blood glucose levels drop.

9. An insulin pump control system based on blood glucose data, characterized in that, It is used to perform an insulin pump control method based on blood glucose data as described in any one of claims 1-8, comprising: The data acquisition module is used to acquire real-time blood glucose sequence data collected by continuous glucose monitoring devices and historical infusion record data of insulin pumps, and to perform outlier filtering and missing value imputation preprocessing on the real-time blood glucose sequence data to obtain standardized blood glucose time series data. The activity calculation module is used to construct an insulin pharmacokinetic decay model based on historical infusion record data, and to calculate the residual activity value of insulin in the subcutaneous tissue that has not been fully absorbed at the current moment through the insulin pharmacokinetic decay model. The insulin pharmacokinetic decay model uses a double exponential decay function to characterize the absorption process of insulin from the subcutaneous injection point into the blood and the metabolic clearance process of insulin in the blood. The prediction module is used to input standardized blood glucose time series data into a pre-trained Bayesian neural network prediction model to generate a blood glucose prediction value sequence and corresponding prediction uncertainty distribution parameters within a preset time domain. The prediction uncertainty distribution parameters include the blood glucose prediction mean and blood glucose prediction variance. The confidence level determination module is used to calculate the prediction confidence index based on the blood glucose prediction variance, and compare the prediction confidence index with a preset confidence threshold to obtain the confidence level determination result. The dose optimization module is used to construct a dose optimization objective function if the confidence index is greater than or equal to a preset confidence threshold, and then solve the dose optimization objective function through a convex optimization algorithm to obtain the optimal insulin infusion dose. The conservative control module is used to determine the conservative adjustment coefficient based on the slope of blood glucose change if the confidence index is less than the preset confidence threshold. The conservative control module then multiplies the basal infusion rate by the conservative adjustment coefficient to obtain the conservative insulin infusion dose. The instruction execution module is used to convert the optimal insulin infusion dose or conservative insulin infusion dose into insulin pump control instructions, send the insulin pump control instructions to the insulin pump to execute the infusion operation, and update the infusion dose and infusion timestamp to the historical infusion record data.

10. An insulin pump control system based on blood glucose data, characterized in that, It also includes a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the insulin pump control method based on blood glucose data as described in any one of claims 1-8.