A method and apparatus for personalized insulin dose recommendation for diabetes patients

CN122177347APending Publication Date: 2026-06-09INSPUR ENTERPRISE CLOUD TECHNOLOGY (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR ENTERPRISE CLOUD TECHNOLOGY (SHANDONG) CO LTD
Filing Date
2026-02-26
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing insulin dosage recommendation methods cannot meet the personalized and dynamic blood glucose management needs of diabetic patients, and suffer from problems such as poor personalization, delayed dynamic response, and a disconnect between prediction and decision-making.

Method used

A method combining multi-source data preprocessing, an LSTM-GRU blood glucose prediction model, and a reinforcement learning dosage decision model is adopted. By collecting and processing real-time dynamic data and static personalized parameters, a two-layer hybrid network is constructed. Combined with a differentiated reward function and the DQN algorithm, personalized insulin dosage recommendations are achieved.

Benefits of technology

It significantly improves the accuracy and personalization of insulin dosage recommendations, enabling real-time responses to individual patient differences and dynamic changes in physiological status, and providing reliable support for precise blood glucose management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122177347A_ABST
    Figure CN122177347A_ABST
Patent Text Reader

Abstract

The application relates to the field of medical health data processing, and specifically provides a personalized insulin dose recommendation method and device for a diabetes patient, which has the following steps: S1, multi-source data preprocessing: collecting real-time dynamic data and static personalized parameters of the patient, performing outlier elimination, missing value completion, timestamp alignment and feature standardization processing on the data, and generating a time sequence matrix for input of an adaptive model; S2, constructing and training an LSTM-GRU blood glucose prediction model; S3, constructing and training a reinforcement learning dose decision model; and S4, closed-loop optimization and dose recommendation. Compared with the prior art, the application can significantly improve the accuracy and personalization degree of insulin dose recommendation, and provides reliable technical support for precise blood glucose management of the diabetes patient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical and health data processing, specifically providing a method and device for personalized insulin dosage recommendation for diabetic patients. Background Technology

[0002] Diabetes mellitus, a common chronic metabolic disease, has a core management goal of maintaining blood glucose levels within a reasonable range to prevent or delay the onset of complications such as diabetic nephropathy, retinopathy, and neuropathy. Insulin therapy is one of the important means of controlling blood glucose in diabetic patients, and the precise determination of insulin dosage is directly related to the blood glucose control effect. Insufficient dosage will lead to hyperglycemia, and long-term hyperglycemia will damage multiple organs throughout the body; excessive dosage is prone to causing hypoglycemia, which may lead to coma or even endanger life in severe cases.

[0003] Diabetes mellitus, a prevalent chronic metabolic disease worldwide, aims to maintain blood glucose levels within the target range of 70-180 mg / dL to prevent the development and progression of serious complications such as diabetic nephropathy, retinopathy, and neuropathy. Insulin therapy is a core component of diabetes mellitus blood glucose control, and the precise determination of insulin dosage directly impacts treatment efficacy and patient safety. Insufficient dosage leads to persistent hyperglycemia, causing vascular endothelial damage and multiple organ dysfunction; excessive dosage, on the other hand, can induce hypoglycemia, potentially resulting in altered consciousness, coma, or even death. Therefore, achieving personalized, dynamic, and precise insulin dosage recommendations is a critical technological requirement in the clinical management and home care of diabetes. Currently, commonly used insulin dosage recommendation methods in clinical and home settings are mainly divided into two categories: traditional experience-based and rudimentary intelligent methods. However, both have significant technical limitations and fail to meet the personalized and dynamic blood glucose management needs of patients. Traditional empirical recommendation methods are currently the most widely used approach, mainly including the empirical formula method and the fixed adjustment method. The empirical formula method typically estimates the dosage based on the patient's static physiological parameters. For example, it calculates the basal dose using the general formula "Total daily insulin requirement = weight (kg) × 0.5 - 1.0 U," and then distributes mealtime doses according to the "carbohydrate-insulin ratio." The fixed adjustment method sets uniform adjustment rules for specific scenarios of abnormal blood glucose levels, such as increasing the basal insulin by 2 U each time fasting blood glucose is above 140 mg / dL for three consecutive days. However, these methods have fundamental limitations: First, they severely ignore individual differences. Insulin sensitivity, liver and kidney function, and metabolic rate vary significantly among patients due to factors such as genetic background, disease duration, and comorbidities. For example, the insulin requirements of type 1 and type 2 diabetic patients of the same weight may differ by more than 40%, and a universal formula cannot adapt to individual physiological characteristics. Second, they lack dynamic response capabilities. Patients' blood glucose levels are affected by a variety of dynamic factors such as diet (carbohydrate intake, meal time), exercise (exercise intensity, duration), emotions, sleep, and drug interactions. Traditional methods rely only on static parameters or periodic monitoring data, which cannot capture the pattern of blood glucose fluctuations in real time, resulting in dose adjustments lagging behind changes in physiological state. Third, they lack forward-looking predictive capabilities. Decisions are made only based on current or historical blood glucose values, making it impossible to predict impending blood glucose abnormalities. For example, if a patient's blood glucose has not risen significantly 15 minutes after a meal, it is impossible to adjust the mealtime insulin dose in advance to avoid subsequent blood glucose peaks. With the expanding application of artificial intelligence technology in the medical field, some studies have attempted to optimize insulin dosage recommendations using machine learning or reinforcement learning techniques, forming preliminary intelligent solutions, but significant shortcomings remain. In the area of ​​blood glucose prediction, existing research mostly uses single LSTM or GRU models to model blood glucose time-series data. While LSTM models can capture long-term blood glucose dependence, their response accuracy to short-term dynamic changes such as postprandial blood glucose spikes and post-exercise blood glucose drops is insufficient. Although GRU models have high training efficiency, their ability to model long-term dependence, such as the pattern of blood glucose fluctuations at fixed daily times, is weak. Furthermore, both types of models only remain at the level of blood glucose prediction, failing to directly link the prediction results to dosage decisions. This still requires medical staff to manually convert the predictions into dosage plans, resulting in subjective bias and decision delays. In the field of reinforcement learning decision-making, some solutions attempt to build decision models based on current blood glucose values. However, due to the lack of accurate prediction of future blood glucose trends as input, the agent is prone to getting caught in a local optimum of "high dose to lower blood glucose → excessive blood glucose reduction leading to hypoglycemia" when exploring dosage strategies. Furthermore, it lacks adaptability to complex scenarios such as "increased carbohydrate intake and increased exercise intensity", and the decision accuracy rate can only reach about 60%. In summary, existing insulin dosage recommendation methods generally suffer from poor personalization, delayed dynamic response, and a disconnect between prediction and decision-making, failing to meet the needs of diabetic patients for precise blood glucose management.

[0004] Therefore, how to integrate blood glucose prediction and dosage decision-making capabilities to build an integrated recommendation scheme that can adapt to individual differences and dynamic physiological states has become a key issue that urgently needs to be addressed in the field of medical and health data processing and intelligent decision-making. Summary of the Invention

[0005] This invention addresses the shortcomings of the prior art by providing a highly practical method for recommending personalized insulin dosages for diabetic patients.

[0006] A further technical objective of this invention is to provide a reasonably designed, safe, and applicable personalized insulin dosage recommendation device for diabetic patients.

[0007] The technical solution adopted by this invention to solve its technical problem is: A personalized insulin dosage recommendation method for diabetic patients includes the following steps: S1. Multi-source data preprocessing: Collect real-time dynamic data and static personalized parameters of patients, perform outlier removal, missing value completion, timestamp alignment and feature standardization on the data, and generate a time series matrix that is suitable for the model input. The real-time dynamic data includes at least a certain frequency of CGM blood glucose data, insulin injection records, dietary carbohydrate intake and exercise intensity data, and the static personalized parameters include at least age, diabetes type and insulin sensitivity coefficient. S2. Construction and Training of LSTM-GRU Blood Glucose Prediction Model: Construct a two-layer LSTM-GRU hybrid network. The first layer of the hybrid network is an LSTM layer to capture long-term blood glucose dependence, and the second layer is a GRU layer to extract short-term dynamic features. The hybrid network is trained using RMSE as the loss function and Adam as the optimizer to obtain the LSTM-GRU blood glucose prediction model that outputs the predicted blood glucose value. S3. Construction and training of reinforcement learning dose decision model: Based on the blood glucose prediction value, a reinforcement learning decision framework is constructed, and the blood glucose prediction value and the patient's physiological data are integrated into a multi-dimensional state space. The discrete action space is defined according to the insulin type. The model is guided to prioritize avoiding the risks of hypoglycemia and hyperglycemia through a differentiated reward function. The reinforcement learning dose decision model is trained using the DQN algorithm. S4. Closed-loop optimization and dose recommendation: The real-time preprocessed data of the patient to be recommended is input into the LSTM-GRU blood glucose prediction model to obtain the blood glucose prediction result. Then, the blood glucose prediction result is input into the reinforcement learning dose decision model to output the personalized insulin dose recommendation value in the form of "dose value + decision basis". Simultaneously, the patient's actual blood glucose data is fed back into the LSTM-GRU blood glucose prediction model and the reinforcement learning dose decision model to achieve iterative optimization of model parameters.

[0008] Furthermore, in step S1, the outlier removal adopts a dual identification method of "3σ criterion + isolated forest": extreme blood glucose values ​​that exceed the range of [μ-3σ, μ+3σ] are removed by the 3σ criterion, where μ is the mean of blood glucose data and σ is the standard deviation of blood glucose data; The isolated forest algorithm is used to identify logically abnormal blood glucose data, including sudden spikes in fasting blood glucose without any apparent cause and no corresponding dietary records.

[0009] Furthermore, the missing value completion is differentiated according to the duration of the missing data: if the duration of missing data is less than or equal to a certain time and the data before and after are continuous, linear interpolation is used to complete the data on insulin injection dosage, dietary carbohydrate intake and exercise intensity. If the data is missing for a period of time, it is marked as a data gap and all related data for that period are removed. The standardization process includes: For numerical features, the formula is used: Standardization is carried out, among which These are the original eigenvalues. The mean of the features in the training dataset. Let the standard deviation of the feature in the training dataset be denoted as . The value is the standardized value; Categorical features are converted into numerical vectors using one-hot encoding. These categorical features include diabetes type, exercise intensity, and insulin injection type.

[0010] Furthermore, in step S2, the calculation process of the LSTM layer includes: Forget Gate Calculation: ,in, It is the sigmoid activation function. Here is the forget gate weight matrix. This is the hidden state from the previous moment. Enter the current time. To offset the forget gate; Input gate calculation: , , tanh is the hyperbolic tangent activation function. , These are the weight matrices for the input gate and cell state updates, respectively. , These are the corresponding biases; Cell status update: , Element-wise multiplication; Output gate calculation: , , This is the output gate weight matrix. This is used to bias the output gate.

[0011] Furthermore, the calculation process of the GRU layer includes: Update gate calculation: , To update the gate weight matrix, To update the gate offset; Reset Door: , To reset the gate weight matrix, To reset the door offset; Candidate hidden state: , Let be the candidate hidden state weight matrix. Bias for candidate hidden states; Hidden status update: .

[0012] Furthermore, the training process includes: The preprocessed feature data is divided into training, validation, and test sets in a 7:2:1 ratio. The initial learning rate of the Adam optimizer is set to 1e−4, and the learning rate is decayed to 0.5 every multiple epochs. When the RMSE of the validation set no longer decreases for multiple consecutive epochs, training is stopped and the model parameters are saved.

[0013] Furthermore, in step S3, the multi-dimensional state space Defined as: ; in, This is the current blood glucose level. , This is a predicted blood glucose value. This is the dose of the last insulin injection. This represents the current amount of carbohydrates in the diet. Given the current exercise intensity, Insulin sensitivity coefficient, The carbohydrate-insulin ratio, For age, For body weight.

[0014] Furthermore, the differentiated reward function Defined as: ; Discount factor for reinforcement learning Set to 0.9, and the training termination condition is that the mean of the reward function fluctuates by less than 5% for multiple consecutive iterations.

[0015] Furthermore, in step S4, the patient's real blood glucose data is added to the training set of the LSTM-GRU hybrid blood glucose prediction model, and the network weight parameters are readjusted; the actual reward value is calculated based on the real blood glucose data, and the Q-value matrix of the reinforcement learning dose decision model is updated to achieve continuous improvement in model adaptability.

[0016] A personalized insulin dose recommendation device for diabetic patients includes: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute a method for recommending personalized insulin dosages for diabetic patients.

[0017] Compared with the prior art, the personalized insulin dosage recommendation method and device for diabetic patients of the present invention have the following outstanding advantages: It effectively solves the problems of poor adaptability, low accuracy, and inability to cope with individual differences and dynamic changes in physiological state of patients in traditional insulin dosage recommendation methods. It significantly improves the accuracy and personalization of insulin dosage recommendation and provides reliable technical support for the precise blood glucose management of diabetic patients. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. 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 diagram of an algorithm for a personalized insulin dosage recommendation method for diabetic patients. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The following is a preferred embodiment: Example 1

[0022] like Figure 1 As shown in this embodiment, a method for recommending personalized insulin dosage for diabetic patients includes the following steps: S1. Multi-source data preprocessing: Collect real-time dynamic data and static personalized parameters of patients, perform outlier removal, missing value completion, timestamp alignment and feature standardization on the data, and generate a time series matrix that is suitable for the model input. The real-time dynamic data includes at least a certain frequency of CGM blood glucose data, insulin injection records, dietary carbohydrate intake and exercise intensity data, and the static personalized parameters include at least age, diabetes type and insulin sensitivity coefficient. Multi-dimensional data collection: Simultaneously acquire two types of patient data: one is real-time dynamic data, covering high-frequency blood glucose monitoring data, insulin injection records, dietary carbohydrate intake and exercise status data; the other is static personalized parameters, including demographic characteristics, diabetes type, insulin sensitivity related indicators and liver and kidney function parameters.

[0023] Data quality optimization: A combined strategy is adopted to improve data reliability: Abnormal data is removed through dual verification of statistical criteria and the isolated forest algorithm to avoid interference from extreme values ​​and logically contradictory data; a hierarchical completion strategy is implemented according to the duration of missing data, interpolation is performed to repair short-term missing data, and long-term missing data is marked and removed from related time periods to prevent error propagation; the time dimension alignment and feature integration of multi-source data are achieved based on the timestamps of core monitoring equipment. Feature standardization transformation: Adaptive processing is implemented for different types of features: numerical features are standardized to eliminate dimensional differences, and categorical features are encoded into numerical vectors; the processed features are arranged in time series to construct a multidimensional time series matrix that conforms to the model input format.

[0024] S2. Construction and Training of LSTM-GRU Blood Glucose Prediction Model: Construct a two-layer LSTM-GRU hybrid network. The first layer of the hybrid network is an LSTM layer to capture long-term blood glucose dependence, and the second layer is a GRU layer to extract short-term dynamic features. The hybrid network is trained using RMSE as the loss function and Adam as the optimizer to obtain the LSTM-GRU blood glucose prediction model that outputs the predicted blood glucose value. By combining the advantages of two recurrent neural networks, a high-precision blood glucose prediction model is constructed to achieve forward-looking prediction of blood glucose levels in future time periods. Hybrid network architecture design: A two-layer serial network architecture is adopted: The first layer is an LSTM network, which captures long-term dependencies in blood glucose data through a gating mechanism and explores periodic fluctuation patterns; the second layer is a GRU network, which enhances the response capability to short-term dynamic changes by relying on a simplified gating structure and accurately captures the characteristics of sudden rises and falls in blood glucose caused by diet and exercise; the output layer directly outputs the predicted blood glucose values ​​for the next 30 minutes and 60 minutes through a fully connected mapping.

[0025] Model training optimization strategy: Targeted training mechanism to improve prediction accuracy: The dataset is divided into training, validation and test sets for parameter learning, hyperparameter tuning and performance evaluation, respectively; Root mean square error is used as the loss function, and an adaptive optimizer is used to update parameters, with higher loss weights assigned to samples in high-risk blood glucose regions; An early stopping strategy is set to avoid model overfitting, ensuring stable prediction performance on unseen data, and ultimately controlling the prediction error within the target range.

[0026] S3. Construction and training of reinforcement learning dose decision model: Based on the blood glucose prediction value, a reinforcement learning decision framework is constructed, and the blood glucose prediction value and the patient's physiological data are integrated into a multi-dimensional state space. The discrete action space is defined according to the insulin type. The model is guided to prioritize avoiding the risks of hypoglycemia and hyperglycemia through a differentiated reward function. The reinforcement learning dose decision model is trained using the DQN algorithm. A dynamic decision-making framework is constructed based on blood glucose prediction results to learn an insulin dosing strategy that adapts to individual patient characteristics: Construction of decision-making environment elements: Define a multi-dimensional state space that integrates current blood glucose value, future blood glucose prediction results, historical treatment data, real-time physiological status, and static personalized parameters to comprehensively depict the patient's current physiological situation; design a discrete action space differentiated according to the clinical application type of insulin, covering the commonly used dose adjustment range of basal and mealtime insulin; design a differentiated reward function, with the target blood glucose range as the core, imposing severe penalties for hypoglycemia risk, moderate penalties for hyperglycemia, and positive rewards for blood glucose within the target range, guiding the model to prioritize medication safety.

[0027] Decision model training and inference: The decision model is trained using a deep Q-network algorithm. The action selection is optimized through a dynamic equilibrium strategy of exploration and utilization until the model reward value tends to stabilize and converge. In the inference stage, real-time preprocessed data is input into the trained prediction model to obtain blood glucose prediction results. The results are then concatenated to generate a state vector, which is input into the decision model. The action with the highest reward value is output as the optimal insulin dose recommendation.

[0028] S4. Closed-loop optimization and dose recommendation: The real-time preprocessed data of the patient to be recommended is input into the LSTM-GRU blood glucose prediction model to obtain the blood glucose prediction result. Then, the blood glucose prediction result is input into the reinforcement learning dose decision model to output the personalized insulin dose recommendation value in the form of "dose value + decision basis". Simultaneously, the patient's actual blood glucose data is fed back into the LSTM-GRU blood glucose prediction model and the reinforcement learning dose decision model to achieve iterative optimization of model parameters.

[0029] By feeding back real data, the model can be continuously iterated, improving its adaptability and accuracy in long-term applications: Recommended results output: The results are output in a visual format of "dosage value + decision basis", clearly presenting the recommended dosage and the underlying blood glucose prediction basis and adjustment logic, providing decision reference for clinical application or home management.

[0030] Dual-model iterative optimization: Establishing a dynamic feedback mechanism: Supplementing the prediction model training set with subsequent real blood glucose data collected from patients, readjusting network parameters, and improving the model's ability to adapt to individual blood glucose fluctuations; calculating the actual reward value based on the real blood glucose results, updating the value function matrix of the decision model, and optimizing the dosage decision strategy; setting a trigger mechanism to dynamically adjust the iteration frequency in combination with the patient's blood glucose fluctuation amplitude and disease progression, ensuring that the model continuously conforms to the patient's physiological state evolution. Example 2

[0031] This implementation case uses the following equipment to collect multi-dimensional patient data: Continuous glucose monitoring (CGM): Sampling frequency is 15 minutes / time, monitoring range is 40-400 mg / dL, used to collect patients' real-time blood glucose data. ; Smart insulin pen: Features dosage recording and Bluetooth transmission capabilities, automatically recording insulin injection time (Tins) and injection type. (At mealtime), injection dosage ; Smart bracelet: Features sports mode recognition and can record exercise time. Exercise intensity (Low / Medium / High, corresponding to walking, jogging, and running respectively), Exercise duration ; Electronic medical record system: Extracts static personalized parameters of patients, including age A=45 years, gender G=male, weight W=70kg, height H=175cm, diabetes type Typedm=Type 1, insulin sensitivity coefficient S=50mg / dL / U (determined by clinical insulin clamp test), carbohydrate-insulin ratio CR=10g / U (determined by clinical meal trial test), creatinine Cr=80μmol / L, and alanine aminotransferase ALT=35U / L.

[0032] Model training and dose recommendation calculations are based on the following software environment: Operating system: Windows 10 64-bit; Development framework: Python 3.8, TensorFlow 2.8 (for building LSTM-GRU models), OpenAI Gym 0.25 (for building reinforcement learning environments); Computing hardware: CPU is Intel Core i7-12700K, GPU is NVIDIA RTX 3090 (24GB VRAM, used to accelerate model training).

[0033] Outlier handling: using The criteria and the isolated forest algorithm identify and remove outliers in the blood glucose monitoring data (such as blood glucose greater than 210 mg / dL or less than 30 mg / dL), mark them as "missing data segments", and do not participate in the model training for that time period.

[0034] Missing value handling: If the missing value is less than 2 hours and the data before and after it is continuous (e.g., if one exercise record is missed), it is filled with linear interpolation (e.g., if the previous exercise intensity is "low" and the next is "low", the missing value in the middle is filled with "low"); if the missing value is greater than 2 hours (e.g., if the CGM equipment is powered off), it is marked as "data gap" and the data in this period is removed to prevent the spread of completion error; Timestamp alignment: Based on the CGM timestamp, insulin, diet, exercise data and blood glucose data within a 15-minute window are correlated to form a single time point feature set.

[0035] Hybrid network architecture design: Output layer: Receives the preprocessed time series matrix, with an input dimension of 23 and a time step of 24; LSTM layer (64 units): via forget gate Input gate Output gate Capture long-term blood glucose variation patterns; GRU layer (32 units): via update gate Reset door Extract short-term dynamic features.

[0036] Output layer: The fully connected layer is mapped to a 2D output ( , The linear activation function outputs the actual blood glucose unit.

[0037] Model training optimization: Dataset partitioning: Divided into training set, validation set, and test set in a 7:2:1 ratio; Training parameters: RMSE is the loss function, Adam optimizer (initial learning rate 1e-4, decaying by 50% every 50 epochs), early stopping strategy (stop if the validation set loss does not decrease for 10 consecutive epochs). Targeted optimization: Assign a 1.5 times loss weight to hypoglycemia and hyperglycemia samples to improve the accuracy of risk area prediction.

[0038] Reinforcement learning dosage decision module: Core element definition: State space: ; Motion space: Basal insulin (Adjustment range), mealtime insulin (Absolute dose); Discount factor is Reward function: Training and decision-making process: Training: DQN algorithm is used. The strategy explores the optimal action, and training stops when the average reward fluctuates by less than 5% for 15 consecutive rounds. Decision: Real-time data is preprocessed and predicted by LSTM-GRU, state vectors are concatenated, and reinforcement learning outputs the dose value corresponding to the highest reward.

[0039] Results output: Presented in the form of "dosage value + decision basis" (e.g., "Recommended 6U prandial insulin: current blood glucose 140mg / dL, predicted 185mg / dL in 60 minutes, increasing by 1U can reduce it to 170mg / dL"). Feedback iteration: After real blood glucose data is re-collected, it is supplemented into the LSTM-GRU training set to fine-tune the parameters. On the other hand, the actual reward is calculated to update the reinforcement learning Q-value matrix, so as to achieve continuous optimization of the model. Example 3

[0040] A personalized insulin dose recommendation device for diabetic patients includes: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute a method for recommending personalized insulin dosages for diabetic patients.

[0041] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recommending personalized insulin dosage for diabetic patients, characterized in that, It has the following steps: S1. Multi-source data preprocessing: Collect real-time dynamic data and static personalized parameters of patients, perform outlier removal, missing value completion, timestamp alignment and feature standardization on the data, and generate a time series matrix that is suitable for the model input. The real-time dynamic data includes at least a certain frequency of CGM blood glucose data, insulin injection records, dietary carbohydrate intake and exercise intensity data, and the static personalized parameters include at least age, diabetes type and insulin sensitivity coefficient. S2. Construction and training of LSTM-GRU blood glucose prediction model: Construct a two-layer LSTM-GRU hybrid network. The first layer of the hybrid network is an LSTM layer to capture long-term blood glucose dependence, and the second layer is a GRU layer to extract short-term dynamic features. The hybrid network was trained using RMSE as the loss function and Adam as the optimizer to obtain an LSTM-GRU blood glucose prediction model that outputs blood glucose prediction values. S3. Construction and training of reinforcement learning dose decision model: Based on the blood glucose prediction value, a reinforcement learning decision framework is constructed, and the blood glucose prediction value and the patient's physiological data are integrated into a multi-dimensional state space. The discrete action space is defined according to the insulin type. The model is guided to prioritize avoiding the risks of hypoglycemia and hyperglycemia through a differentiated reward function. The reinforcement learning dose decision model is trained using the DQN algorithm. S4. Closed-loop optimization and dose recommendation: The real-time preprocessed data of the patient to be recommended is input into the LSTM-GRU blood glucose prediction model to obtain the blood glucose prediction result. Then, the blood glucose prediction result is input into the reinforcement learning dose decision model to output the personalized insulin dose recommendation value in the form of "dose value + decision basis". Simultaneously, the patient's actual blood glucose data is fed back into the LSTM-GRU blood glucose prediction model and the reinforcement learning dose decision model to achieve iterative optimization of model parameters.

2. The method for recommending personalized insulin dosage for diabetic patients according to claim 1, characterized in that, In step S1, the outlier removal adopts a dual identification method of "3σ criterion + isolated forest": extreme blood glucose values ​​that exceed the range of [μ-3σ, μ+3σ] are removed by the 3σ criterion, where μ is the mean of blood glucose data and σ is the standard deviation of blood glucose data; The isolated forest algorithm is used to identify logically abnormal blood glucose data, including sudden spikes in fasting blood glucose without any apparent cause and no corresponding dietary records.

3. The method for recommending personalized insulin dosage for diabetic patients according to claim 1, characterized in that, The missing value completion is handled differently based on the duration of the missing data: if the duration of missing data is less than or equal to a certain time and the data before and after are continuous, linear interpolation is used to complete the data on insulin injection dosage, dietary carbohydrate intake and exercise intensity. If the data is missing for a period of time, it is marked as a data gap and all related data for that period are removed. The standardization process includes: For numerical features, the formula is used: Standardization is carried out, among which These are the original eigenvalues. The mean of the features in the training dataset. Let the standard deviation of the feature in the training dataset be denoted as . The value is the standardized value; Categorical features are converted into numerical vectors using one-hot encoding. These categorical features include diabetes type, exercise intensity, and insulin injection type.

4. The method for recommending personalized insulin dosage for diabetic patients according to claim 3, characterized in that, In step S2, the calculation process of the LSTM layer includes: Forget Gate Calculation: ,in, It is the sigmoid activation function. Here is the forget gate weight matrix. This is the hidden state from the previous moment. Enter the current time. To offset the forget gate; Input gate calculation: , , tanh is the hyperbolic tangent activation function. , These are the weight matrices for the input gate and cell state updates, respectively. , These are the corresponding biases; Cell status update: , Element-wise multiplication; Output gate calculation: , , This is the output gate weight matrix. This is used to bias the output gate.

5. The method for recommending personalized insulin dosage for diabetic patients according to claim 4, characterized in that, The calculation process of the GRU layer includes: Update gate calculation: , To update the gate weight matrix, To update the gate offset; Reset Door: , To reset the gate weight matrix, To reset the door offset; Candidate hidden state: , Let be the candidate hidden state weight matrix. Bias for candidate hidden states; Hidden status update: .

6. The method for recommending personalized insulin dosage for diabetic patients according to claim 5, characterized in that, The training process includes: The preprocessed feature data is divided into training, validation, and test sets in a 7:2:1 ratio. The initial learning rate of the Adam optimizer is set to 1e−4, and the learning rate is decayed to 0.5 every multiple epochs. When the RMSE of the validation set no longer decreases for multiple consecutive epochs, training is stopped and the model parameters are saved.

7. The method for recommending personalized insulin dosage for diabetic patients according to claim 6, characterized in that, In step S3, the multi-dimensional state space Defined as: ; in, This is the current blood glucose level. , This is a predicted blood glucose value. This is the dose of the last insulin injection. This represents the current amount of carbohydrates in the diet. Given the current exercise intensity, Insulin sensitivity coefficient, The carbohydrate-insulin ratio, For age, For body weight.

8. The method for recommending personalized insulin dosage for diabetic patients according to claim 7, characterized in that, The differentiated reward function Defined as: ; Discount factor for reinforcement learning Set to 0.9, and the training termination condition is that the mean of the reward function fluctuates by less than 5% for multiple consecutive iterations.

9. The method for recommending personalized insulin dosage for diabetic patients according to claim 8, characterized in that, In step S4, the patient's real blood glucose data is added to the training set of the LSTM-GRU hybrid blood glucose prediction model, and the network weight parameters are readjusted; the actual reward value is calculated based on the real blood glucose data, and the Q-value matrix of the reinforcement learning dose decision model is updated to achieve continuous improvement in model adaptability.

10. A personalized insulin dosage recommendation device for diabetic patients, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 8.