Insulin infusion device, storage medium and program product
By combining personalized physiological metabolic models with deep learning models, the problem of unreasonable insulin dosage in traditional treatment plans is solved, the accuracy of insulin infusion dosage and the precision of blood sugar prediction are achieved, adapting to individual differences and improving blood sugar control effects.
Patent Information
- Application Number
- CN202410469360.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-10-24
AI Technical Summary
Traditional diabetes treatment plans fail to effectively consider patients' actual lives, resulting in irrational insulin dosage and affecting blood sugar control. Existing blood sugar prediction models have low accuracy and large individual differences, making it difficult to build personalized models.
By building a personalized physiological metabolic model, combining the patient's historical blood glucose data and physiological metabolic parameters, a deep learning model is used to predict blood glucose and optimize insulin infusion dosage.
It improves the accuracy and rationality of insulin infusion dosage, adapts to individual differences, and improves the accuracy of blood glucose prediction and the adaptability of the model.
Smart Images

Figure CN120827653A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the medical technical field, and in particular to an insulin infusion device, a storage medium and a computer program product. BACKGROUND
[0002] Diabetes is a chronic disease that affects the body's ability to regulate blood sugar. When the pancreas does not work properly or does not secrete enough insulin, the blood sugar level in the blood will continue to rise, leading to the occurrence of diabetes.
[0003] The traditional diabetes treatment plan is to measure according to the doctor's prescription, and the patient uses the device to inject insulin. The traditional treatment plan does not consider the actual life of the patient, which can easily lead to unreasonable insulin dose and make the blood sugar control effect not obvious, and the high incidence of diabetes complications. With the development of technology, the blood glucose monitoring technology and the insulin dose infusion system are combined by the technical personnel, and the artificial pancreas blood glucose control technology is proposed. The artificial pancreas blood glucose control technology adjusts the infusion of insulin in real time by the patient wearing an insulin infusion device with a blood glucose control algorithm. In the blood glucose control algorithm, the blood glucose prediction result will directly affect the blood glucose control scheme. SUMMARY
[0004] Therefore, it is necessary to provide an insulin infusion device, a computer readable storage medium and a computer program product to solve the technical problem of unreasonable insulin dose.
[0005] In a first aspect, the present application provides an insulin infusion device. The device comprises at least one memory and at least one processor, the memory is connected with the processor, the memory stores control instructions, and the processor is used to execute the control instructions to realize the method of determining the insulin infusion dose of the insulin infusion device, the method comprises:
[0006] Obtaining historical blood glucose data and blood glucose monitoring data of a patient;
[0007] Obtaining a physiological metabolism model associated with the patient; obtaining physiological metabolism parameters corresponding to the patient according to the physiological metabolism model and the blood glucose monitoring data;
[0008] Determining the infusion dose of the insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
[0009] In one embodiment, the historical blood glucose data is obtained based on a fixed time interval; the processor executes the control instructions to perform the following steps:
[0010] According to the time interval, detecting the missing condition of the blood glucose value in the historical blood glucose data;
[0011] In a case where it is detected that there is a missing blood glucose value in the historical blood glucose data, the missing blood glucose value is interpolated to obtain processed blood glucose data;
[0012] According to the physiological metabolism parameter and the processed blood glucose data, a delivery dose of the insulin delivery device is determined.
[0013] In one of the embodiments, the processor executes the control instructions to perform the following steps:
[0014] A blood glucose value at a first time point and a blood glucose value at an n-th time point in the historical blood glucose data are determined; the time point corresponding to the missing blood glucose value is between the first time point and the n-th time point;
[0015] According to the blood glucose value at the first time point, the blood glucose value at the n-th time point, the first time point, the n-th time point, and the time point corresponding to the missing blood glucose value, a supplementary blood glucose value for the missing blood glucose value is determined; the supplementary blood glucose value and the historical blood glucose data constitute the processed blood glucose data.
[0016] In one of the embodiments, the processor executes the control instructions to perform the following steps:
[0017] The physiological metabolism parameter and the historical blood glucose data are input into a blood glucose prediction model constructed for the patient to obtain predicted blood glucose data of the patient;
[0018] According to the predicted blood glucose data, a delivery dose of the insulin delivery device is determined.
[0019] In one of the embodiments, the processor executes the control instructions to perform the following steps:
[0020] A sample data set is obtained; the sample data set contains training data of a plurality of different sample objects, and the training data of each sample object contains a physiological metabolism parameter and historical blood glucose data;
[0021] A blood glucose prediction model to be trained is trained through the sample data set to obtain a trained basic blood glucose prediction model;
[0022] In a case where new sample data of the patient is detected, the trained basic blood glucose prediction model is updated and trained through the sample data set and the new sample data to obtain a blood glucose prediction model for the patient.
[0023] In one of the embodiments, the processor executes the control instructions to perform the following steps:
[0024] The physiological metabolism features corresponding to the physiological metabolism parameters and the blood glucose value features corresponding to the historical blood glucose data are combined in various combinations to obtain a plurality of feature combinations;
[0025] The blood glucose prediction model to be trained is trained respectively through each feature combination to obtain a trained blood glucose prediction model corresponding to each feature combination;
[0026] Based on the prediction effect of the trained blood glucose prediction model corresponding to each feature combination, a target blood glucose prediction model is determined from the trained blood glucose prediction models corresponding to each feature combination as a trained basic blood glucose prediction model.
[0027] In one of the embodiments, the processor device executes the control instructions to perform the following steps:
[0028] The sample data set is divided into a training data set and a test data set;
[0029] The training data set and the test data set are normalized by the maximum and minimum values of each feature of the physiological metabolism features corresponding to the physiological metabolism parameters and the historical blood glucose data in the training data set, to obtain a normalized training data set and a normalized test data set;
[0030] The blood glucose prediction model to be trained is trained by the normalized training data set and tested by the normalized test data set to obtain a trained basic blood glucose prediction model.
[0031] In one of the embodiments, the training data of each sample object in the sample data set includes data of multiple time points; the processor device executes the control instructions to perform the following steps:
[0032] The training data of each sample object in the normalized training data set is divided into a plurality of time series matrices;
[0033] In each training process, the blood glucose prediction model to be trained is trained by taking the time series matrix as an input variable and taking the blood glucose value at a prediction time point as an output variable.
[0034] In a second aspect, the present application also provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:
[0035] Obtaining historical blood glucose data and blood glucose monitoring data of a patient;
[0036] obtaining physiological metabolism parameters of the patient according to the physiological metabolism model and the blood glucose monitoring data;
[0037] determining the insulin infusion dose of the insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
[0038] In a third aspect, the present application further provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:
[0039] obtaining historical blood glucose data and blood glucose monitoring data of a patient;
[0040] obtaining physiological metabolism parameters of the patient according to the physiological metabolism model and the blood glucose monitoring data;
[0041] determining the insulin infusion dose of the insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
[0042] The insulin infusion device, the storage medium and the computer program product described above, when determining the insulin infusion dose, jointly determine the insulin infusion dose of the patient by combining the blood glucose monitoring data and the historical blood glucose data of the patient, which can ensure the accuracy of the determined insulin infusion dose. At the same time, when using the blood glucose monitoring data of the patient, the blood glucose monitoring data is processed by the physiological metabolism model to generate physiological metabolism parameters, and the physiological metabolism parameters are used to determine the infusion dose, which realizes the optimized processing of the blood glucose monitoring data. The physiological metabolism parameters can better reflect the changes of insulin in the patient's body, so as to further improve the accuracy and rationality of the insulin infusion dose determined based on the physiological metabolism parameters. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 FIG. 1 is a schematic diagram of the internal structure of the insulin infusion device in one embodiment;
[0044] Figure 2 FIG. 4 is a flowchart of steps for controlling the insulin infusion dose in one embodiment;
[0045] Figure 3 FIG. 7 is a schematic diagram of the change of the remaining insulin amount in the body after a large dose of insulin B is taken in one embodiment;
[0046] Figure 4 FIG. 10 is a schematic diagram of the change of the consumption speed of insulin B after being taken in one embodiment;
[0047] Figure 5 FIG. 13 is a flowchart of the training steps of the blood glucose prediction model in one embodiment;
[0048] Figure 6 A change graph of blood glucose prediction with blood glucose, IOB, and Activity as input features in one embodiment;
[0049] Figure 7 A change graph of blood glucose prediction with blood glucose, IOB, and Activity as input features in another embodiment;
[0050] Figure 8 A schematic diagram of training a blood glucose prediction model through a cloud in one embodiment;
[0051] Figure 9 A schematic diagram of a deployment process of a cloud-based blood glucose prediction model in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0054] With the development of artificial intelligence technology, there are currently many methods for blood glucose prediction based on deep learning models, in which the main feature value used is blood glucose data, and the future blood glucose value is predicted through the historical blood glucose data of the patient. However, there are many factors that affect the change of blood glucose, and the prediction accuracy is low only according to the historical blood glucose data. Therefore, it is easy to lead to unreasonable infusion dose of insulin infusion device. Moreover, since there are many factors affecting the change of blood glucose, the model established according to these features is also more complex, and the model parameters are also more, which brings challenges to the training and deployment of deep learning model to embedded device. At the same time, the individual differences of each person are also relatively large, how to construct the model according to the physiological conditions of each person and adjust the model in time to make more accurate blood glucose prediction will have higher requirements.
[0055] In response to the above problems, this application proposes an insulin infusion device that can control the insulin infusion dosage. By using insulin and the patient's life information, a physiological metabolic model based on different individuals is constructed in advance. The calculated physiological metabolic parameters and the collected historical blood glucose data are then used as the input of the deep learning model. After training and testing, predictions are made, which effectively improves the prediction effect, thereby improving the rationality and accuracy of the insulin infusion dosage.
[0056] refer to Figure 1 , is a schematic diagram of the internal structure of an insulin infusion device provided in one embodiment. Figure 1 As shown, the insulin infusion device includes a processor, a memory, and a network interface connected via a system bus. The processor of the insulin infusion device is used to provide computing and control capabilities. The memory of the insulin infusion device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the insulin infusion device is used to store data involved in the process of determining the insulin infusion dose. The network interface of the insulin infusion device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for determining the insulin infusion dose is implemented.
[0057] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the insulin infusion device to which the present application scheme is applied. The specific insulin infusion device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0058] Figure 1 The insulin infusion device includes at least one processor and at least one memory, the processor and the memory are connected, wherein the memory stores control instructions, and the processor is used to execute the control instructions to implement the method for determining the insulin infusion dose of the insulin infusion device;
[0059] Insulin infusion equipment is used to infuse the corresponding dose of insulin into the patient's body according to the determined insulin infusion dose.
[0060] Among them, Figure 2 As shown, the method for determining the insulin infusion dose implemented by the processor when executing the control instruction specifically includes the following steps:
[0061] Step S210: Acquire the patient's historical blood glucose data and blood glucose monitoring data.
[0062] The blood glucose data is data representing a blood glucose level of the patient, and the historical blood glucose data is blood glucose data of the patient at historical time points. The historical blood glucose data is sampled based on a fixed time interval, and the historical blood glucose data can include blood glucose data of multiple historical time points.
[0063] The blood glucose monitoring data is data that can affect the blood glucose of the patient, such as meal data, exercise data, body weight, and the like of the patient.
[0064] In a specific implementation, the historical blood glucose data of the patient can be collected by a blood glucose monitoring sensor such as a CGM (continuous glucose monitoring) sensor in a time manner, and the blood glucose monitoring data of the patient is recorded at the same time, so as to facilitate subsequent insulin infusion control. In addition, the historical blood glucose data and the blood glucose monitoring data have a time correspondence relationship, that is, the blood glucose data is collected at each historical time point, and the blood glucose monitoring data is correspondingly collected once, so that the record of the physiological metabolism parameter of the patient determined by the blood glucose monitoring data corresponds to the record of the historical blood glucose data.
[0065] In step S220, a physiological metabolism model associated with the patient is obtained; and a physiological metabolism parameter corresponding to the patient is obtained according to the physiological metabolism model and the blood glucose monitoring data.
[0066] The physiological metabolism model is a mathematical model used to describe the metabolism of the human body, and includes a set of equations for describing the metabolic changes of substances in the patient's body.
[0067] It can be understood that the physiological metabolism model is personalized for each user and can include information indicating the correlation between food intake information and the change of biological information over time. The food intake information can be the type and amount of food taken by the user, the food intake time, and the like. In actual applications, the physiological metabolism model can be personalized by modeling various factors of individual users related to internal absorption or distribution of substances, metabolism of organs (such as liver and stomach), consumption, and the like.
[0068] The physiological metabolism parameter includes total insulin amount (IOB(t)) of the patient, consumption rate (R(t)) of all bolus insulin, , residual carbohydrates (COB(t)) in the body that have not been consumed, and a time parameter (TOD). The total insulin amount represents the sum of all insulin amounts in the user's body that have not been completely metabolized, and the total insulin includes basal rate and additional injected insulin. The basal rate IOB is the amount of insulin in the body that has not been completely metabolized generated by the basal insulin infusion rate.
[0069] In a specific implementation, the blood glucose monitoring data can be input into a physiological metabolism model to obtain physiological metabolism parameters of the patient. More specifically, through the physiological metabolism model and the blood glucose monitoring data, the process of calculating the physiological metabolism parameters corresponding to the patient is as follows:
[0070] (1) Calculation of the consumption rate of all large doses of insulin (S(t)).
[0071] Let t be the interval time after injection of a large dose, in min; is the peak time of insulin, in min; is the active time of insulin, in min; according to and three parameter variables are constructed, and the calculation formula is as follows:
[0072]
[0073]
[0074]
[0075] wherein, , a and S are intermediate variables constructed for the convenience of calculating the consumption rate of insulin by the patient.
[0076] Let be the consumption rate of insulin B after t minutes, in U / min, and B is a large dose of insulin, so that:
[0077]
[0078] Let be the consumption rate of all large doses of insulin after t minutes, in U / min; so that:
[0079]
[0080] (2) Calculation of the total insulin amount (IOB(t)).
[0081] Let be the amount of insulin remaining in the body after intake of a large dose B; is the time after which the sum calculation of is started, which can be set to 1 min by default, in min; when summing t, t takes a value of 0, , , …, , in min; so that:
[0082]
[0083] make For all large doses of active insulin, there are:
[0084]
[0085] For example: When setting , , calculate the single large dose B is 10U, its and The change curves of Figure 3 and Figure 4 As shown in the figure, it can be seen that after taking a large dose of insulin B, the amount of insulin remaining in the body shows a trend of gradually decreasing, and the consumption rate ( ) As time changes, it first increases and then decreases, and gradually approaches 0.
[0086] Base rate The calculation is to calculate the temporary base rate at fixed time intervals [min] is divided into calculations, The temporary basal rate insulin injection amount for [min] time is:
[0087]
[0088] Where, yes [min] The amount of insulin in a time period, equivalent to a relatively small large dose, unit U; is the temporary basal rate, in U / h; is the standard basal rate, in U / h; D is the duration of TBR.
[0089] When injecting a basal rate, .
[0090] Total insulin dose (IOB(t)), including bolus and base rate ,but:
[0091]
[0092] (3) Calculation of unconsumed carbohydrates (COB(t)) in the body.
[0093] make yes Blood sugar changes over time, in mg / dL, i.e. current blood sugar value and the previous blood sugar value Difference:
[0094]
[0095] Calculate the absorption value of the in-vivo carbohydrate:
[0096]
[0097]
[0098] wherein D is the difference between the actual recent glycemic change and the expected insulin impact, in mg / dL; represents the actual recent glycemic change, represents the recent time period of carbohydrate absorption; ISF (insulin sensitivity factor) is the insulin sensitivity factor, in mg / dL / U; CR (Carbohydate-to-insulin Ratio) represents the carbohydrate-to-insulin ratio.
[0099] wherein the insulin sensitivity factor can be determined according to the weight of the patient, specifically, the total daily dose of insulin (TDD) can be estimated according to the weight of the patient, and then the insulin sensitivity factor can be determined according to the total daily dose of insulin.
[0100] Let C represent the ingested carbohydrate, in g, then:
[0101]
[0102] (4) Calculation of the time parameter (TOD, Time of the day).
[0103] Let be the time of the blood glucose record, taking the hour and minute bits, and then converting them into minutes, which is equivalent to how many minutes have passed since 0 o'clock on the current day, then:
[0104]
[0105] wherein d is to reduce the size of the input interval by compressing the 1440 minutes of a day into a smaller interval, facilitating deep learning training.
[0106] It can be understood that since the blood glucose data is collected once at each historical time point, the blood glucose monitoring data is correspondingly collected once, therefore, if the historical blood glucose data includes N blood glucose values, there are N sets of blood glucose monitoring data, and correspondingly, the physiological metabolism model needs to be called N times for N times of calculation to obtain N sets of physiological metabolism parameters of the patient.
[0107] Step S230, determining the infusion dose of the insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
[0108] In a specific implementation, after obtaining the physiological metabolism parameter and the historical blood glucose data of the patient, the physiological metabolism parameter and the historical blood glucose data can be input into the blood glucose prediction model constructed for the patient to obtain the predicted blood glucose data of the patient, and the infusion dose of the insulin infusion device can be determined according to the predicted blood glucose data.
[0109] Further, after determining the infusion dose of the insulin infusion device, the corresponding dose of insulin can be infused into the patient.
[0110] In the above insulin infusion device, when determining the insulin infusion dose, the blood glucose monitoring data and the historical blood glucose data of the patient are combined to determine the insulin infusion dose for the patient, which can ensure the accuracy of the determined insulin infusion dose. Meanwhile, when using the blood glucose monitoring data of the patient, the physiological metabolism parameter is generated by processing the blood glucose monitoring data through the physiological metabolism model, and the physiological metabolism parameter is used to determine the infusion dose, which realizes the optimized processing of the blood glucose monitoring data. The physiological metabolism parameter can better reflect the change of the insulin in the patient's body, thereby further improving the accuracy and rationality of the insulin infusion dose determined based on the physiological metabolism parameter.
[0111] In an exemplary embodiment, the historical blood glucose data is obtained based on fixed time intervals; and when determining the insulin infusion dose for the patient according to the physiological metabolism parameter and the historical blood glucose data in step S230, the processor is further configured to implement the following steps:
[0112] In step S231, the missing condition of the blood glucose value in the historical blood glucose data is detected according to the time interval;
[0113] In step S232, when it is detected that there is a missing blood glucose value in the historical blood glucose data, the missing blood glucose value is processed by interpolation to obtain processed blood glucose data;
[0114] In step S233, the infusion dose of the insulin infusion device is determined according to the physiological metabolism parameter and the processed blood glucose data.
[0115] It can be understood that the historical blood glucose data is generally uniformly sampled by a blood glucose monitoring sensor such as CGM. However, the blood glucose monitoring sensor is not necessarily stable when collecting blood glucose data or connecting with the insulin infusion device, and data dropouts are prone to occur, which leads to discontinuous recorded historical blood glucose data and affects the blood glucose prediction result. Therefore, when determining the insulin infusion dose for the patient based on the physiological metabolism parameter and the historical blood glucose data, preprocessing is required to ensure the continuity of the processed blood glucose data.
[0116] In a specific implementation, when the blood glucose monitoring sensor collects historical blood glucose data, it will also record the time point of collection. Therefore, based on the time interval of the blood glucose monitor sampling, it is possible to detect whether there are missing or disconnected blood glucose values in the historical blood glucose data. If there are missing blood glucose values, the time point corresponding to the missing blood glucose value can also be determined. Then, based on the time point corresponding to the missing blood glucose value, as well as the blood glucose values before and after the time point, the historical blood glucose data can be interpolated to supplement the missing blood glucose value and obtain the processed blood glucose data. The infusion dose of the insulin infusion device is then determined based on the processed blood glucose data and physiological metabolic parameters.
[0117] In this embodiment, the time interval of blood glucose monitor sampling is used to detect whether there are missing blood glucose values in the historical blood glucose data, and if there are missing blood glucose values, the missing blood glucose values are supplemented through interpolation processing, thereby ensuring the continuity of the processed blood glucose data and improving the accuracy of the insulin infusion dose determined based on the processed blood glucose data.
[0118] Furthermore, in an exemplary embodiment, when the processor performs the interpolation processing on the missing blood glucose value in the above-mentioned step S232, it is specifically used to implement the following steps: determining the blood glucose value at the first time point and the blood glucose value at the n-th time point in the historical blood glucose data; the time point corresponding to the missing blood glucose value is between the first time point and the n-th time point; determining a supplementary blood glucose value for the missing blood glucose value based on the blood glucose value at the first time point, the blood glucose value at the n-th time point, the first time point, the n-th time point, and the time point corresponding to the missing blood glucose value; and combining the supplementary blood glucose value and the historical blood glucose data to form the processed blood glucose data.
[0119] In a specific implementation, a linear interpolation method can be used to calculate the difference in historical blood glucose data. The blood glucose value at the first non-missing time point and the blood glucose value at the nth time point after the missing blood glucose value are first determined. A supplementary blood glucose value is determined based on the blood glucose value at the first time point, the blood glucose value at the nth time point, the first time point, the nth time point, and the time point corresponding to the missing blood glucose value. The supplementary blood glucose value and the historical blood glucose data before the supplementation are combined to form the processed blood glucose data.
[0120] More specifically, assuming This is the first blood glucose data that has been collected without interruption. After disconnection, follow the fixed time interval Calculate the nth blood sugar data, The missing data is the blood glucose data that needs to be supplemented. The specific missing blood glucose data value can be expressed as follows:
[0121] ,in,
[0122] wherein, is a constant, the minimum time can be calculated as a blood glucose value, therefore, can be extrapolated as:
[0123]
[0124] In this embodiment, the missing blood glucose data is supplemented by interpolating the historical blood glucose data at the time point corresponding to the missing blood glucose value and the blood glucose values before and after the time point, to obtain processed blood glucose data, so as to ensure the quality of the processed blood glucose data.
[0125] In an example embodiment, when the processor determines the insulin infusion dose for the patient according to the physiological metabolism parameter and the historical blood glucose data in step S230, it is further configured to implement the following steps: inputting the physiological metabolism parameter and the historical blood glucose data into the blood glucose prediction model constructed for the patient to obtain the predicted blood glucose data of the patient; and determining the infusion dose of the insulin infusion device according to the predicted blood glucose data.
[0126] Specifically, the characteristics of blood glucose data and blood glucose monitoring data of different patients are different, and the individual differences are relatively large. If a unified blood glucose prediction model is used, it is difficult to ensure that the blood glucose prediction model is relatively matched for each patient. In view of this problem, the present application proposes the idea of constructing a blood glucose prediction model for each patient. When predicting the blood glucose of any patient, the physiological metabolism parameter and the historical blood glucose data of the patient are input into the blood glucose prediction model constructed for the patient for processing to obtain the predicted blood glucose data of the patient, and further determine the insulin infusion dose for the patient according to the predicted blood glucose data and the normal blood glucose range.
[0127] In this embodiment, by establishing a personalized blood glucose prediction model for different patients, the blood glucose prediction model has a very high adaptability to each patient, thereby improving the accuracy of the obtained predicted blood glucose data, and further improving the accuracy of the insulin infusion dose determined according to the predicted blood glucose data.
[0128] In an example embodiment, the processor is further configured to perform a training process of the blood glucose prediction model, as shown in Figure 5 The process specifically includes:
[0129] Step S510, obtaining a sample data set; the sample data set contains training data of a plurality of different sample objects, and the training data of each sample object contains physiological metabolism parameters and historical blood glucose data;
[0130] Step S520, training the blood glucose prediction model to be trained through the sample data set to obtain a trained basic blood glucose prediction model.
[0131] Step S530, in the case of detecting the new sample data of the patient, updating and training the trained basic blood glucose prediction model through the sample data set and the new sample data to obtain the blood glucose prediction model for the patient.
[0132] Wherein, the blood glucose prediction model can adopt LSTM (Long Short-Term Memory) neural network model, the LSTM neural network model can use a layer structure, the number of hidden layer neurons is 100, and the training preset number of times, such as 350 times of epoch training can converge, after multiple rounds of test parameter optimization, the final optimized model is selected for prediction.
[0133] In a specific implementation, training data of different sample objects can be obtained as the sample data set. The length of the physiological metabolism parameters and the historical blood glucose data and other features in the training data of each sample object in the sample data set is consistent, the physiological metabolism parameters are four, including the total insulin amount (IOB(t)) of the sample object, the consumption speed of all large-dose insulin (COB(t)) ), the residual and non-consumed carbohydrates in the body (COB(t)), and the time parameter (TOD), each blood glucose value has corresponding four physiological metabolism parameters. The idea of establishing a personalized blood glucose prediction model for different patients is that: first, a general basic blood glucose prediction model is trained through a training data set containing different sample objects, and then the trained basic blood glucose prediction model is retrained through the personalized sample data of each patient to obtain the personalized blood glucose prediction model of each patient.
[0134] In this embodiment, a general basic blood glucose prediction model is first trained through a training data set containing different sample objects, and then the basic blood glucose prediction model is retrained through the personalized sample data of each patient, thereby obtaining the personalized blood glucose prediction model of each patient, so that targeted blood glucose prediction can be performed according to the blood glucose prediction model of each patient, and the accuracy of the prediction result can be improved.
[0135] In an exemplary embodiment, the processor is further configured to execute control instructions to perform the following steps: dividing the sample data set into a training data set and a test data set; normalizing the training data set and the test data set by using the maximum and minimum values of each feature in the physiological metabolic features corresponding to the physiological metabolic parameters in the training data set and the blood glucose value features corresponding to the historical blood glucose data to obtain a normalized training data set and a normalized test data set; training the blood glucose prediction model to be trained by using the normalized training data set, and testing the model by using the normalized test data set to obtain a trained basic blood glucose prediction model.
[0136] In a specific implementation, after obtaining a sample dataset, the sample dataset can be divided into a training dataset and a test dataset. The blood glucose prediction model is trained using the training dataset, and the performance of the blood glucose prediction model is evaluated and the prediction effect of the blood glucose prediction model is verified using the test dataset. If the total number of data points in the sample dataset is n and the number of features is m, then when dividing the dataset, the training dataset and the test dataset can be expressed as: , where α is the division ratio. Assume that the length of the sample data set sequence is L, and the blood glucose value is predicted after p minutes. L is about 2 hours, then there are 2×60 / t inter The number of points, p can predict multiple time points or a single time point.
[0137] In addition, since the normal blood glucose range is 70~180mg / dL, the total insulin dose (IOB(t)) is generally below 20U, and the consumption rate of all large doses of insulin ( ) will be smaller, and if the time parameter (TOD) is calculated as 1 minute, the range is (0~1440). It can be seen that for input features of different units, the range of values is completely different. Therefore, in order to facilitate training, the sample data set needs to be normalized, such as using the maximum-minimum normalization method. At the same time, to prevent the data information of the test data set from leaking to the training set, only the normalized information of the training data set can be used to process the test data set. Specifically, the data in the training data set and the test data set are normalized using the maximum and minimum values of each feature in the physiological metabolic features corresponding to the physiological metabolic parameters in the training data set and the blood glucose value features corresponding to the historical blood glucose data. The specific normalization method can be expressed as:
[0138]
[0139]
[0140] in, and The training data sets the maximum and minimum values of the jth feature. Then, the training data set and the test data set are normalized according to the two maximum and minimum values, and the normalization formula of the two data sets can adopt the following formula:
[0141]
[0142] wherein, represents the jth feature value of the ith data point of the training data set or the test data set. The value range of i of the training data set is 0, 1, …, , and the value range of i of the test data set is 0, 1, …, .
[0143] In this embodiment, the maximum and minimum values of each feature in the training data set are used not only for normalizing the training data set, but also for normalizing the data in the test data set, which can prevent the data information of the test data set from leaking to the training set, and at the same time can ensure that the training data and the test data are processed in the same data range, avoiding unstable model training or performance degradation caused by inconsistent data ranges.
[0144] Further, in an exemplary embodiment, the processor is further configured to execute the control instructions to perform the following steps: dividing the training data of each sample object in the normalized training data set into a plurality of time sequence matrices; and in each training process, training the blood glucose prediction model to be trained by taking the time sequence matrix as an input variable and taking the blood glucose value at the prediction time point as an output variable.
[0145] It can be understood that the training data of each sample object in the sample data set includes 4 physiological metabolism parameters and 1 blood glucose value, a total of 5 features, and each feature corresponds to data at multiple time points, i.e., each feature corresponds to a time sequence. After completing the normalization processing, when training the blood glucose prediction model to be trained by using the normalized training data set, the feature values of the 5 features at multiple time points can be divided into a plurality of time sequence matrices, for example, taking the time sequence matrix constructed by the features at time points t1, t2 and t3 as an example, the 4 physiological metabolism parameters and the blood glucose value in the time range of t1-t3 form a 3x5 time sequence matrix. In each training process, a time sequence matrix is input into the blood glucose prediction model to be trained, and the predicted blood glucose value at the prediction time point (such as t4) is output, and the blood glucose prediction model to be trained is trained according to the loss between the predicted blood glucose value and the true blood glucose value, to obtain the trained basic blood glucose prediction model. After the training is completed, if a new sample data of a patient is detected afterwards, the basic blood glucose prediction model is updated and trained by using the sample data set and the new sample data, to obtain the blood glucose prediction model for the patient.
[0146] In this embodiment, the time series matrix composed of multiple features is used as an input variable to train the blood glucose prediction model, fully utilizing the correlation between the features, and the time series matrix can help extract feature information of each feature at different time steps, thereby helping to capture the time correlation and trend of the data and improving the accuracy of the prediction results.
[0147] In an exemplary embodiment, when training the model, the processor further performs the following steps: combining the physiological metabolism features corresponding to the physiological metabolism parameters and the blood glucose value features corresponding to the historical blood glucose data in multiple combinations to obtain multiple feature combinations; training the blood glucose prediction model to be trained respectively through each feature combination to obtain a trained blood glucose prediction model corresponding to each feature combination; and determining a target blood glucose prediction model from the trained blood glucose prediction models corresponding to each feature combination based on the prediction effect of the trained blood glucose prediction model corresponding to each feature combination, as a trained basic blood glucose prediction model.
[0148] In a specific implementation, there are 4 physiological metabolism parameters calculated by the physiological metabolism model, plus 5 input features including the blood glucose value features corresponding to the blood glucose data. Considering that in a small sample data set, some parameters may cause overfitting or underfitting of the model, resulting in undesirable training results, therefore, different features can be combined for experiments to screen the best feature combination.
[0149] More specifically, the 5 input features can be combined in different numbers to obtain multiple feature combinations, and then a blood glucose prediction model is trained through each feature combination. For example, as shown in Figure 6 and Figure 7 , the blood glucose prediction is combined by three features (IOB, Activity, BG), the input feature length of the prediction model is 24, and the blood glucose value of the 6th point (30 minutes in ) in the future is predicted. The prediction effect of each trained blood glucose prediction model is determined, and the prediction effect can be represented by the root mean square error (Root Mean Square Error, RMSE) between the model prediction value and the actual value, for example, the root mean square error in Figure 6 is 13.313, Figure 7 the root mean square error in is 11.898, therefore, the model trained in Figure 7 is selected. The prediction effect can also be represented by prediction accuracy, prediction accuracy, recall rate and other indicators. The target blood glucose prediction model with the best prediction effect is determined from the trained blood glucose prediction models corresponding to each feature combination, as a trained basic blood glucose prediction model, that is, as a general model of the personalized blood glucose prediction model of each patient.
[0150] In this embodiment, an optimal blood glucose prediction model is selected from blood glucose prediction models trained by different combinations of multiple features, the prediction effects of the blood glucose prediction models under different feature combinations are comprehensively considered, a blood glucose prediction model with better performance can be obtained, and the accuracy of subsequent blood glucose prediction is improved. Meanwhile, the blood glucose monitoring data is processed by the physiological metabolism model, four input features are extracted, the number of input features is reduced, the parameter amount of the blood glucose prediction model is reduced, and the trained blood glucose prediction model is more likely to be used in an embedded device with limited computing capability.
[0151] In an example embodiment, considering that each patient wears an insulin infusion device and each patient has the need to update the blood glucose prediction model, in order to reduce the computing pressure of the processor in the insulin infusion device, the new sample data of the patient can be sent to the cloud, and the blood glucose prediction model of each patient is individually updated and trained by the cloud. As shown in Figure 8 , a general model is trained by using a basic data set containing sample data of different patients, and then the training and updating interface of the model is deployed in the cloud. When new sample data of a patient is collected, the new sample data is combined with the basic data set, and then uploaded to the cloud by the processor for updating and training by using the resources of the cloud server. As shown in Figure 9 , the personalized model can be updated in the application (Application, APP) of the mobile phone, and then the model can be downloaded to the embedded device end (insulin infusion device, i.e. pump) by using Bluetooth, wifi or other wireless devices to complete the updating and deployment of the model.
[0152] Specific cloud training can be performed according to the following method: according to the number of new sample data of each patient, the training duration required by each patient is determined; for each patient, a time array of the patient is constructed according to the training duration of the patient and the target training duration; the target training duration is the maximum duration in the training duration required by each patient, and the number of data in the time array represents the training frequency of the blood glucose prediction model of the corresponding patient; sort each training duration in all time arrays to obtain a training duration sequence; in the order of increasing training duration, each data in the training duration sequence is traversed in turn, and the blood glucose prediction model of the patient corresponding to the traversed data is trained.
[0153] In a specific implementation, it is assumed that the basic sample data set is: When the patient has new sample data , i.e. new blood glucose value and physiological metabolism parameters calculated by the physiological metabolism model, the two data sets are combined to obtain a new data .
[0154] If there are multiple patient data online at this time, it is necessary to allocate computing resources for each patient data for training, and the update frequency of each patient's blood glucose prediction model can be balanced according to the computing resources and busy state. The specific balancing idea is: according to the number of new sample data of each patient, determine the required training time length of each patient, sort the required training time length of each patient from small to large sort(t_list), and obtain the sequence: , wherein the number of data is proportional to the training time, and the more data means the longer the training time under the same deep learning model framework. The maximum training time in the required training time of each patient is taken as the target training time, and for each patient, a time array of the patient is constructed according to the training time of the patient and the target training time. For example, for the training time of any patient , the multiple relationship with the target training time is calculated, and the time array of the patient is constructed according to the multiple relationship , and the process can be represented by the formula:
[0155]
[0156]
[0157] In the formula, round(number, 0) represents rounding the number number to an integer; represents the target training time , and the multiple of the training time , that is, training the blood glucose prediction model of the patient with the longest training time once, can train times the blood glucose prediction model of the patient with the training time ; therefore, the data number in the time array indicates the training frequency of the blood glucose prediction model of the corresponding patient.
[0158] Further, in order to balance the update frequency of each patient's blood glucose prediction model, the time arrays of all patients can be combined into an array list:
[0159]
[0160] Uniformly sort each training time in the array list to obtain a training time sequence, denoted as: .
[0161] Then, according to the order of training time from small to large, the training time sequence each data in the training time length sequence, and train the blood glucose prediction model of the patient corresponding to the traversed data.
[0162] In this embodiment, considering that some patients have relatively few new sample data, such as newly added patients, the training duration may be much smaller than the maximum training duration. Therefore, the training duration is determined according to the data amount of the sample data of each patient, the training duration is sorted, and the patient data with less data amount can be updated more frequently, so as to more flexibly adjust the training frequency of the blood glucose prediction model of each patient, balance the update frequency, and better utilize the computing resources.
[0163] Further, in an example embodiment, traversing each data in the training time length sequence and training the blood glucose prediction model of the patient corresponding to the traversed data further includes: determining a minimum time interval between adjacent two model training according to the required training time length of each patient; determining the current timestamp and the last training timestamp corresponding to the traversed data; if the time difference between the current timestamp and the training timestamp is greater than or equal to the minimum time interval, traversing the next data; if the time difference between the current timestamp and the training timestamp is less than the minimum time interval, determining the update mode of the blood glucose prediction model of the patient corresponding to the data according to the training information and the update information of the sample data of the blood glucose prediction model of the patient corresponding to the traversed data.
[0164] Specifically, before traversing each data in the training time length sequence in the order from small to large , it is necessary to first determine the minimum time interval between adjacent two model training to prevent the model from being frequently updated and occupying more server resources. It can be understood that as the individual data is continuously accumulated, the training duration will also be longer; if the number of patients with new sample data is detected to be less, the time for training all individual data will be shorter. Therefore, the minimum time interval for each model update can be dynamically adjusted to fully utilize the computing resources, and the adjustment formula can be represented as:
[0165]
[0166] wherein, represents the shortest duration in the training duration of the plurality of patients, represents the median duration in the training duration of the plurality of patients.
[0167] And for each patient's blood glucose prediction model, the corresponding training timestamp is recorded after each training, whether the patient is offline is recorded, and whether the blood glucose prediction model is trained before the patient is offline. For example, the training duration of different patients is sorted, and the obtained sequence is , and the sorted individual data is , record the corresponding training timestamp as , record the state label of whether the patient is offline as , record the training label of whether the personalized model has been trained before the patient is offline as .
[0168] In order from small to large, the training duration sequence is traversed in order Each data in the training duration sequence is traversed, and after traversing a data, the following conditions are determined:
[0169] Let the data currently traversed be , determine the difference between the current timestamp now and the training timestamp corresponding to the data , that is, and the minimum time interval , if , the following operations are performed, otherwise the next is directly traversed.
[0170] (i) If the state label of the patient corresponding to is offline (data collection is no longer updated), and the training label is that the training has been completed, only update the data set, and the data is no longer trained and the model is not updated.
[0171] (ii) If the state label of the patient corresponding to is offline (data collection is no longer updated), and the training label is that no training is performed, update the data , update the model according to step (iv), and is set to the training completed state, and the training timestamp is updated to the current time now.
[0172] (iii) If the state label of the patient corresponding to is online (data collection is being updated), update the data , update the model according to step (iv), and is in an online state, is set to the untrained completed state, and the training timestamp is updated to the current time now.
[0173] (iv) In the model updating of (ii)~(iii), it is necessary to be limited, if the new model the loss of the new model is less than then update the model.
[0174] In this embodiment, by comparing the time difference between the current timestamp and the training timestamp corresponding to the traversed data with the minimum time interval, it is ensured that the time difference between two trainings of the model of the same patient meets the requirement of the minimum time interval, so as to avoid waste of computing resources caused by too dense training frequency. At the same time, when the minimum time interval is met, different coping strategies are adopted for training of the model by using the state label and the training label of the patient corresponding to the traversed data when training, which can further improve the rationality of training. Further, by limiting that the model is updated only when the loss of the new model is less than that of the current model, it can be ensured that the personalized blood glucose prediction model corresponding to each patient is the optimal model.
[0175] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, there is no strict order limitation for execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages or steps or stages in other steps.
[0176] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0177] Obtain historical blood glucose data and blood glucose monitoring data of a patient;
[0178] Obtain a physiological metabolism model associated with the patient; and obtain physiological metabolism parameters corresponding to the patient according to the physiological metabolism model and the blood glucose monitoring data;
[0179] Determine an insulin infusion dose for the patient according to the physiological metabolism parameters and the historical blood glucose data.
[0180] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps in each device embodiment described above.
[0181] In one embodiment, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement the following steps:
[0182] obtain historical blood glucose data and blood glucose monitoring data of a patient;
[0183] obtain a physiological metabolism model associated with the patient; and obtain physiological metabolism parameters of the patient according to the physiological metabolism model and the blood glucose monitoring data;
[0184] determine an insulin infusion dose for the patient according to the physiological metabolism parameters and the historical blood glucose data.
[0185] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above apparatus embodiments.
[0186] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0187] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0188] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0189] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An insulin infusion device, characterized in that: The device comprises at least one memory and at least one processor, the memory is connected with the processor, the memory stores control instructions, and the processor is used to execute the control instructions to control the method for determining an insulin infusion dose of the insulin infusion device, the method comprises: obtaining historical blood glucose data and blood glucose monitoring data of a patient; obtaining a physiological metabolism model associated with the patient; and obtaining physiological metabolism parameters corresponding to the patient according to the physiological metabolism model and the blood glucose monitoring data; determining an insulin infusion dose of the insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
2. The device according to claim 1, characterized in that The historical blood glucose data is obtained based on fixed time intervals; and the processor device executes the control instructions to perform the following steps: detecting missing blood glucose values in the historical blood glucose data according to the time intervals; in the case that missing blood glucose values are detected in the historical blood glucose data, performing interpolation processing on the missing blood glucose values to obtain processed blood glucose data; determining an insulin infusion dose of the insulin infusion device according to the physiological metabolism parameters and the processed blood glucose data.
3. The apparatus of claim 2, wherein, The processor device executes the control instructions to perform the following steps: determining blood glucose values at a first time point and at an n th time point in the historical blood glucose data; the missing blood glucose value corresponds to a time point between the first time point and the n th time point; determining a supplementary blood glucose value for the missing blood glucose value according to the blood glucose value at the first time point, the blood glucose value at the n th time point, the first time point, the n th time point, and the time point corresponding to the missing blood glucose value; and combining the supplementary blood glucose value and the historical blood glucose data to obtain the processed blood glucose data.
4. The apparatus of claim 1, wherein, The processor device executes the control instructions to perform the following steps: inputting the physiological metabolism parameters and the historical blood glucose data into a blood glucose prediction model constructed for the patient to obtain predicted blood glucose data of the patient; determining an insulin infusion dose of the insulin infusion device according to the predicted blood glucose data.
5. The apparatus of claim 4, wherein, The processor device executes the control instructions to perform the following steps: obtaining a sample data set; the sample data set comprises training data of a plurality of different sample objects, and the training data of each sample object comprises physiological metabolism parameters and historical blood glucose data; training a blood glucose prediction model to be trained through the sample data set to obtain a trained basic blood glucose prediction model; in the case that new sample data of the patient is detected, updating and training the trained basic blood glucose prediction model through the sample data set and the new sample data to obtain a blood glucose prediction model for the patient.
6. The apparatus of claim 5, wherein, The processor device executes the control instructions to perform the following steps: combining physiological metabolism characteristics corresponding to the physiological metabolism parameters and blood glucose value characteristics corresponding to the historical blood glucose data through a plurality of combination modes to obtain a plurality of feature combinations; The blood glucose prediction model to be trained is trained respectively through each feature combination, and a trained blood glucose prediction model corresponding to each feature combination is obtained; A target blood glucose prediction model is determined from the trained blood glucose prediction models corresponding to each feature combination based on the prediction effect of the trained blood glucose prediction model corresponding to each feature combination, as a trained basic blood glucose prediction model.
7. The apparatus of claim 5, wherein, The processor device executes the control instructions to perform the following steps: The sample data set is divided into a training data set and a test data set; The training data set and the test data set are normalized by the maximum and minimum values of each feature of the physiological metabolism features corresponding to the physiological metabolism parameters and the blood glucose value features corresponding to the historical blood glucose data in the training data set, to obtain a normalized training data set and a normalized test data set; The blood glucose prediction model to be trained is trained through the normalized training data set, and tested through the normalized test data set, to obtain a trained basic blood glucose prediction model.
8. The apparatus of claim 7, wherein, The training data of each sample object in the sample data set includes data of multiple time points; the processor device executes the control instructions to perform the following steps: The training data of each sample object in the normalized training data set is divided into multiple time sequence matrices; In each training process, the blood glucose prediction model to be trained is trained by taking the time sequence matrix as an input variable and taking the blood glucose value at a prediction time point as an output variable.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by the processor to implement the following steps: Obtain historical blood glucose data and blood glucose monitoring data of a patient; Obtain a physiological metabolism model associated with the patient; and obtain physiological metabolism parameters corresponding to the patient according to the physiological metabolism model and the blood glucose monitoring data; Determine an infusion dose of an insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the following steps: Obtain historical blood glucose data and blood glucose monitoring data of a patient; Obtain a physiological metabolism model associated with the patient; and obtain physiological metabolism parameters corresponding to the patient according to the physiological metabolism model and the blood glucose monitoring data; Determine an infusion dose of an insulin infusion device according to the physiological metabolism parameters and the historical blood glucose data.