Blood glucose prediction method and device, electronic equipment and storage medium
Through screening, fusion and updating blood sugar characteristics processing, and combining historical and current information to predict blood sugar, the problem of inaccurate prediction caused by blood sugar value mutations is solved, and the accuracy of blood sugar prediction is improved.
Patent Information
- Application Number
- CN202310874389.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-14
AI Technical Summary
The existing blood sugar prediction methods cannot effectively respond to mutations in blood sugar values under the influence of the environment, resulting in inaccurate predictions.
By calling the feature reset parameter of the second preset time, the blood glucose characteristics of the first preset time are screened, the blood glucose information of the second preset time is fused, and the feature update parameters are used to selectively update the fused blood glucose characteristics. Blood glucose prediction is performed based on the updated fusion blood glucose characteristics.
Combining historical and current blood sugar information effectively fights mutations in blood sugar values, improving the accuracy of blood sugar prediction.
Smart Images

Figure CN119314663A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a blood sugar prediction method, device, electronic device and storage medium. Background Art
[0002] Blood sugar prediction is crucial for the prevention and treatment of diabetes. Current blood sugar prediction methods include minimally invasive continuous blood sugar testing technology and non-invasive near-infrared detection technology. For example, near-infrared detection technology can be used to detect the near-infrared spectrum information of the patient's blood in real time, and the current near-infrared spectrum information can be identified using a neural network to predict the patient's future blood sugar value.
[0003] However, due to environmental influences, the patient's blood sugar level may suddenly change. The above blood sugar prediction method cannot cope with the situation of sudden change in blood sugar level, which may easily lead to inaccurate blood sugar prediction.
[0004] Therefore, the current blood sugar prediction technology has the problem of low accuracy. Summary of the invention
[0005] Based on this, it is necessary to provide a blood glucose prediction method, device, electronic device, computer-readable storage medium and computer program product that can improve accuracy in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for predicting blood sugar. The method comprises:
[0007] Calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0008] fusing the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0009] Calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time;
[0010] Blood glucose prediction processing is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0011] In a second aspect, the present application also provides a blood sugar prediction device. The device comprises:
[0012] A screening module, used for calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0013] a fusion module, configured to fuse the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0014] an updating module, configured to call the feature update parameter of the second preset time, and selectively update the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time to obtain an updated fused blood glucose feature of the second preset time;
[0015] A prediction module is used to perform blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0016] In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0017] Calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0018] fusing the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0019] Calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time;
[0020] Blood glucose prediction processing is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0022] Calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0023] fusing the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0024] Calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time;
[0025] Blood glucose prediction processing is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0026] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0027] Calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0028] fusing the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0029] Calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time;
[0030] Blood glucose prediction processing is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0031] The above-mentioned blood glucose prediction method, device, electronic device, storage medium and computer program product, by calling the feature reset parameter of the second preset time, screens the blood glucose characteristics of the first preset time adjacent to the second preset time to obtain the effective blood glucose characteristics of the first preset time, fuses the effective blood glucose characteristics with the blood glucose information of the second preset time to obtain the fused blood glucose characteristics of the second preset time, calls the feature update parameter of the second preset time, selectively updates the fused blood glucose characteristics of the second preset time and the blood glucose characteristics of the first preset time to obtain the updated fused blood glucose characteristics of the second preset time, performs blood glucose prediction processing based on the updated fused blood glucose characteristics to obtain blood glucose prediction data of the third preset time adjacent to the second preset time; historical and current blood glucose information can be combined to predict future blood glucose values, and because the impact of the environment on the blood glucose value will not change suddenly in an instant, historical and current blood glucose information can be used to effectively combat the sudden change of blood glucose values, thereby improving the accuracy of blood glucose prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a blood sugar prediction method according to an embodiment;
[0033] Figure 2 is a schematic diagram of a blood sugar prediction network in one embodiment;
[0034] Figure 3 A schematic diagram of a gated recurrent unit of a blood glucose prediction network in one embodiment;
[0035] Figure 4 A schematic diagram of a blood glucose prediction network in another embodiment;
[0036] Figure 5 is a flow chart of a blood sugar prediction method in another embodiment;
[0037] Figure 6 is a structural block diagram of a blood sugar prediction device in one embodiment;
[0038] Figure 7 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction 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.
[0040] In one embodiment, Figure 1 As shown, a blood sugar prediction method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0041] Step S110, calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time.
[0042] The second preset time may be the current time point or the current time period, and the first preset time may be the time point before the current time point or the time period before the current time period.
[0043] The characteristic reset parameter may be a parameter determined in advance based on the blood sugar characteristic at the first preset time and the blood sugar information at the second preset time.
[0044] The blood sugar feature may be a hidden state of blood sugar information, such as the insulin level in the body, whether hungry, thirsty, etc. The blood sugar information may include at least one of blood sugar data, meal information, insulin information and glucagon information, wherein the blood sugar data may be a blood sugar value, the meal information may be the most recent meal time and meal amount, the insulin information may be the most recent insulin injection time and injection amount, and the glucagon information may be the most recent glucagon injection time and injection amount.
[0045] In a specific implementation, the characteristic reset parameters of the second preset time can be determined in advance based on the blood sugar characteristics of the first preset time and the blood sugar information of the second preset time. The characteristic reset parameters of the second preset time are used to perform a product operation on the blood sugar characteristics of the first preset time, and the effective blood sugar characteristics are screened out from the blood sugar characteristics of the first preset time.
[0046] For example, a first preset time t-1 and a second preset time t are set, t-1 and t are adjacent, and a characteristic reset parameter r of time t is predetermined. t , and obtain the hidden state h of blood sugar information at time t-1 t-1 , h t-1 Determined as the blood glucose characteristic at time t-1, according to the formula For h t-1 Screening is performed to obtain the effective blood sugar characteristics at time t-1 Among them, ⊙ represents the Hadamard Product operation, which means that h t-1 With r t Multiply corresponding elements in .
[0047] Step S120, fusing the effective blood glucose feature with the blood glucose information of the second preset time to obtain a fused blood glucose feature of the second preset time; wherein the blood glucose information includes at least one of the blood glucose data, meal information, insulin information and glucagon information of the target object within the second preset time; the blood glucose feature is used to indicate a hidden state corresponding to the blood glucose information.
[0048] In a specific implementation, blood glucose information of the second preset time may be collected, the effective blood glucose characteristics may be spliced with the blood glucose information of the second preset time, and the spliced data may be linearly transformed and scaled to obtain a fused blood glucose characteristic of the second preset time.
[0049] For example, blood glucose data, meal information, insulin information, and glucagon information at time t are collected in real time to obtain blood glucose information x at time t. t , the effective blood glucose characteristic With blood sugar information x t The spliced data is then scaled to the interval [-1, 1] using a tanh activation function to obtain the fused blood glucose feature at time t. The specific formula can be
[0050]
[0051] Among them, w h and b h For The associated parameter matrix.
[0052] Step S130, calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time.
[0053] The characteristic update parameter may be a parameter determined in advance based on the blood sugar characteristic at the first preset time and the blood sugar information at the second preset time.
[0054] In a specific implementation, it is also possible to pre-determine a feature update parameter for the second preset time based on the blood sugar characteristics of the first preset time and the blood sugar information of the second preset time, determine a weight for selectively updating the fused blood sugar characteristics of the second preset time and the blood sugar characteristics of the first preset time based on the feature update parameter, selectively update the fused blood sugar characteristics of the second preset time and the blood sugar characteristics of the first preset time based on the weight, and obtain an updated fused blood sugar characteristic of the second preset time.
[0055] For example, the feature update parameter z at time t is predetermined t , and then the fusion blood glucose characteristics at time t can be determined The weight for selective update is zt , for the blood glucose characteristic h at time t-1 t-1 The weight for selective update is 1-z t , thereby selectively updating the fused blood glucose feature at time t and the blood glucose feature at time t-1 to obtain the updated fused blood glucose feature at time t
[0056]
[0057] Step S140, performing blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0058] The third preset time may be a time point after the current time point, or a time period after the current time period.
[0059] In a specific implementation, the updated fused blood glucose feature can be input into the fully connected layer, and the fully connected layer determines the probabilities corresponding to different blood glucose values according to the updated fused blood glucose feature, and determines the blood glucose value with the highest probability as the blood glucose prediction data for the third preset time, and outputs it.
[0060] For example, the fused blood glucose feature h will be updated t Input to the fully connected layer to obtain the predicted probabilities corresponding to multiple blood sugar values, select the maximum value from the predicted probabilities, and after numerical conversion, obtain the blood sugar predicted value yt at time t+1 +1 .
[0061] It should be noted that the updated fused blood sugar feature of the second preset time can also be used as the blood sugar feature of the second preset time. After the blood sugar prediction data of the third preset time is determined, the blood sugar prediction data of the fourth preset time is determined according to the blood sugar feature of the second preset time and the actual blood sugar information of the third preset time. In this way, the blood sugar prediction data of each preset time can be obtained. For example, the h calculated in step S130 is t As the blood sugar feature at time t, and obtain the blood sugar information x at time t+1 t+1 , according to h t and x t+1 Determine the predicted blood sugar value y at time t+2 t+2 , and so on, to obtain the predicted blood sugar value y at each subsequent time t+3 , yt +4 ,…….
[0062] The above-mentioned blood glucose prediction method, by calling the feature reset parameter of the second preset time, screens the blood glucose characteristics of the first preset time adjacent to the second preset time, obtains the effective blood glucose characteristics of the first preset time, fuses the effective blood glucose characteristics with the blood glucose information of the second preset time, obtains the fused blood glucose characteristics of the second preset time, calls the feature update parameter of the second preset time, selectively updates the fused blood glucose characteristics of the second preset time and the blood glucose characteristics of the first preset time, obtains the updated fused blood glucose characteristics of the second preset time, performs blood glucose prediction processing based on the updated fused blood glucose characteristics, and obtains blood glucose prediction data of the third preset time adjacent to the second preset time; historical and current blood glucose information can be combined to predict future blood glucose values, and because the impact of the environment on the blood glucose value will not change suddenly in an instant, historical and current blood glucose information can be used to effectively combat the sudden change of blood glucose values, thereby improving the accuracy of blood glucose prediction.
[0063] In one embodiment, the above-mentioned blood glucose prediction method may further specifically include: splicing the blood glucose characteristics of the first preset time with the blood glucose information of the second preset time to obtain first splicing information; performing linear transformation processing on the first splicing information according to a preset reset matrix and an update matrix to obtain original reset parameters and original update parameters; performing threshold transformation processing on the original reset parameters and the original update parameters to obtain feature reset parameters and feature update parameters of the second preset time.
[0064] In a specific implementation, a reset matrix and an update matrix can be set in advance, and the blood glucose characteristics of the first preset time are spliced with the blood glucose information of the second preset time to obtain first spliced information. The first spliced information is linearly transformed according to the reset matrix to obtain original reset parameters, and the original reset parameters are threshold-transformed using an activation function to obtain feature reset parameters for the second preset time. The first spliced information is linearly transformed according to the update matrix to obtain original update parameters, and the original update parameters are threshold-transformed using an activation function to obtain feature update parameters for the second preset time.
[0065] In practical applications, the reset matrix W can be pre-set r 、b r and update the matrix W z 、b z , the blood glucose characteristic h of the first preset time t-1 The blood sugar information x at the second preset time t Perform splicing to obtain the first splicing information According to the reset matrix W r 、b r First splicing information Perform a linear transformation to obtain the original reset parameters Use the sigmoid (S-shaped) activation function to perform threshold transformation and reset the original parameters Transform to the interval [0,1] to obtain the characteristic reset parameters of the second preset time Among them, σ represents the sigmoid activation function. Similarly, according to the update matrix W z 、b z First splicing information Perform a linear transformation to obtain the original update parameters Use the sigmoid activation function to perform threshold transformation and update the original parameters Transform to the interval [0,1] to obtain the feature update parameter of the second preset time
[0066] In this embodiment, the blood glucose characteristics of the first preset time are spliced with the blood glucose information of the second preset time to obtain the first spliced information; the first spliced information is linearly transformed according to the preset reset matrix and update matrix to obtain the original reset parameters and the original update parameters; the original reset parameters and the original update parameters are threshold transformed to obtain the feature reset parameters and the feature update parameters of the second preset time. The feature reset parameters and the feature update parameters can be determined in advance, which facilitates the direct use of the feature reset parameters and the feature update parameters for blood glucose prediction, thereby improving the efficiency of blood glucose prediction.
[0067] In one embodiment, the step of splicing the blood sugar characteristics of the first preset time with the blood sugar information of the second preset time to obtain the first spliced information may specifically include: when the blood sugar characteristics of the first preset time do not match the blood sugar information of the second preset time, correcting the blood sugar characteristics of the first preset time according to the blood sugar information of the second preset time to obtain a corrected blood sugar characteristic; and splicing the corrected blood sugar characteristics with the blood sugar information of the second preset time to obtain the first spliced information.
[0068] In a specific implementation, before splicing the blood sugar characteristics of the first preset time and the blood sugar information of the second preset time, it can be determined whether the two match. If the blood sugar characteristics of the first preset time and the blood sugar information of the second preset time match, they can be directly spliced. Otherwise, if the blood sugar characteristics of the first preset time and the blood sugar information of the second preset time do not match, the blood sugar characteristics of the first preset time can be corrected according to the blood sugar information of the second preset time, including but not limited to setting to zero, adding or deleting, etc., to obtain the corrected blood sugar characteristics of the first preset time, and the corrected blood sugar characteristics of the first preset time are spliced with the blood sugar information of the second preset time to obtain the first spliced information.
[0069] For example, if the blood sugar characteristic h of the first preset time t-1It is two-dimensional data, including blood sugar value characteristics and meal characteristics. The blood sugar information x at the second preset time t is one-dimensional data, containing only blood glucose values, h t-1 and x t If the dimensions are different, then we can use x t For h t-1 Make corrections and change h t-1 The dining features in are set to 0, and then x t and h t-1 Make splicing.
[0070] In this embodiment, when the blood sugar characteristic at the first preset time does not match the blood sugar information at the second preset time, the blood sugar characteristic at the first preset time is corrected according to the blood sugar information at the second preset time to obtain the corrected blood sugar characteristic; the corrected blood sugar characteristic is spliced with the blood sugar information at the second preset time to obtain the first spliced information, which can ensure that the blood sugar information and the blood sugar characteristic are spliced when they match, thereby ensuring the reliability of the blood sugar prediction result.
[0071] In one embodiment, the above step S130 may specifically include: determining the update weights of the fused blood glucose characteristics of the second preset time and the blood glucose characteristics of the first preset time respectively according to the characteristic update parameters of the second preset time; and performing weighted summation of the fused blood glucose characteristics of the second preset time and the blood glucose characteristics of the first preset time according to the update weights to obtain the updated fused blood glucose characteristics of the second preset time.
[0072] In a specific implementation, a feature update parameter for the second preset time can be determined in advance, and the feature update parameter can be determined as the update weight of the fused blood glucose feature for the second preset time. The difference between the preset value (for example, 1) and the feature update parameter can be determined as the update weight of the blood glucose feature for the first preset time. The fused blood glucose feature for the second preset time and the blood glucose feature for the first preset time are weightedly summed according to the update weight to obtain an updated fused blood glucose feature for the second preset time.
[0073] In practical applications, the feature update parameter z at time t is predetermined t , z t Determined as the fused blood glucose profile at time t The update weight is 1-z t Determined as the blood glucose characteristic h at time t-1 t-1 The update weights are based on z t and 1-z t right and h t-1 Perform selective update to obtain the updated fusion blood glucose feature at time t
[0074]
[0075] In this embodiment, by updating the parameter according to the feature of the second preset time, the update weights of the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time are determined respectively; according to the update weight, the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time are weightedly summed to obtain the updated fused blood glucose feature of the second preset time, and the blood glucose feature of the first preset time can be selectively forgotten while the fused blood glucose feature of the second preset time is selectively memorized, so that the updated fused blood glucose feature reasonably includes the blood glucose feature of the first preset time and the fused blood glucose feature of the second preset time, thereby improving the accuracy of blood glucose prediction.
[0076] In one embodiment, the above step S140 may specifically include: performing probability calculation on the updated fused blood glucose features based on the fully connected layer to obtain a prediction probability matrix corresponding to the updated fused blood glucose features; selecting a column of updated fused blood glucose features with the largest probability from the prediction probability matrix as an output feature; and converting the output feature into blood glucose prediction data for a third preset time adjacent to the second preset time.
[0077] The prediction probability matrix may be a matrix composed of prediction probability values.
[0078] In a specific implementation, the updated fused blood glucose features can be input into the fully connected layer. The fully connected layer calculates the prediction probabilities corresponding to different blood glucose values based on the updated fused blood glucose features to form a prediction probability matrix. Each column vector in the prediction probability matrix corresponds to a different prediction probability. The column vector corresponding to the maximum prediction probability is selected as the output feature. After the output feature is numerically converted, the blood glucose prediction data for the third preset time is obtained.
[0079] For example, after obtaining the updated fusion blood glucose features h at time t and t+1 respectively t 、h t+1 After that, h t 、h t+1 Input to the fully connected layer and use the softmax function to determine h t 、h t+1 The corresponding prediction probability matrix Select the column vector with the largest probability After numerical conversion, the blood sugar prediction data at time t+2 and t+3 are obtained.
[0080] In this embodiment, the probability of the updated fused blood glucose features is calculated based on the fully connected layer to obtain a prediction probability matrix corresponding to the updated fused blood glucose features; a column of updated fused blood glucose features with the largest probability is selected from the prediction probability matrix as the output feature; the output feature is converted into blood glucose prediction data for a third preset time adjacent to the second preset time. The blood glucose features can be processed during the prediction process, and then the blood glucose features are converted into blood glucose prediction data to improve the efficiency of blood glucose prediction.
[0081] In one embodiment, the above step S120 may specifically include: splicing the effective blood glucose feature with the blood glucose information of the second preset time to obtain second splicing information; performing threshold transformation processing on the second splicing information to obtain the fused blood glucose feature of the second preset time.
[0082] In a specific implementation, the effective blood glucose characteristics of the first preset time can be spliced with the blood glucose information of the second preset time to obtain second spliced information, and the second spliced information can be scaled to a specified interval through threshold transformation to obtain a fused blood glucose characteristic of the second preset time.
[0083] For example, the effective blood glucose characteristic With blood sugar information x t The spliced data is then scaled to the interval [-1, 1] using a tanh activation function to obtain the fused blood glucose feature at time t. The specific formula can be
[0084]
[0085] Among them, w h and b h For The associated parameter matrix.
[0086] In this embodiment, the second spliced information is obtained by splicing the effective blood sugar characteristics with the blood sugar information of the second preset time; the second spliced information is threshold transformed to obtain the fused blood sugar characteristics of the second preset time. The historical blood sugar characteristics and the current blood sugar information can be fused to improve the accuracy of blood sugar prediction.
[0087] In one embodiment, after the above step S140, it may also specifically include: using the blood glucose characteristics of the second preset time as the blood glucose characteristics of the first preset time, and using the blood glucose prediction data of the third preset time as the blood glucose information of the second preset time; returning to calling the characteristic reset parameters of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the valid blood glucose characteristics of the first preset time, so as to obtain the blood glucose prediction data of the fourth preset time adjacent to the third preset time.
[0088] The fourth preset time may be a later time point or a later time period of the third preset time.
[0089] In a specific implementation, after completing the above step S140 and obtaining the blood glucose prediction data for the third preset time, the blood glucose characteristics of the second preset time can be used as the blood glucose characteristics of the first preset time, and the blood glucose prediction data of the third preset time can be used as the blood glucose information of the second preset time, and the process returns to step S110, and steps S110-S140 are executed again to obtain the blood glucose prediction data for the fourth preset time.
[0090] For example, when calculating y t+1 After that, h t As the blood glucose characteristic h at time t t-1 , y t+1 As the blood sugar information x at time t+1 t , and returns to step S110, and by executing steps S110-S140, a new y is obtained. t+1 , the new y t+1 As the blood sugar prediction data y at time t+2 t+2 , and so on, to obtain the predicted blood sugar value y at each subsequent time t+3 ,y t+4 ,…….
[0091] In this embodiment, the blood sugar characteristics of the second preset time are used as the blood sugar characteristics of the first preset time, and the blood sugar prediction data of the third preset time are used as the blood sugar information of the second preset time; the step of returning to call the characteristic reset parameter of the second preset time, screening and processing the blood sugar characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood sugar characteristics of the first preset time, so as to obtain the blood sugar prediction data of the fourth preset time adjacent to the third preset time, the blood sugar prediction values of the subsequent times can be obtained through one measurement, without measuring the blood sugar information each time, thereby improving the efficiency of blood sugar prediction.
[0092] In order to facilitate those skilled in the art to have a deeper understanding of the embodiments of the present application, a specific example will be described below.
[0093] In order to improve the accuracy of blood sugar prediction, the present application proposes a blood sugar prediction method based on deep learning of recurrent neural networks. According to the high dependence of blood sugar on time, meals, insulin injections and other information, the method sequentially inputs blood sugar information of time series at different historical moments (blood sugar measurement data, meal information and insulin injection information, etc.) into the recurrent neural network, and utilizes the reset gate and update gate characteristics of GRU (Gated Recurrent Unit) to combine the input information at the current moment with several input information in a preset time period before the current moment and adjacent to the current moment, and predict the blood sugar value in a preset time period after the current moment and adjacent to the current moment, that is, the blood sugar information at the current moment and the blood sugar information in the historical time period (several moments before the current moment) are used to predict the blood sugar change curve of the next time period, or to predict the blood sugar value at the next moment.
[0094] Figure 2 A schematic diagram of a blood glucose prediction network 100 is provided. 101 represents the input data X at time t t , including but not limited to blood sugar value, meal information, insulin injection information, glucagon injection information, etc., wherein the blood sugar value can be an electrical signal from a CGM (continuous glucose monitoring system), an absorption spectrum signal of near-infrared imaging, or a scattering spectrum signal of Raman imaging, X t Can be a number, vector or matrix. t When is a matrix, the rows of the matrix can correspond to multiple time points, and the columns of the matrix can correspond to blood glucose values, meal information, insulin injection information, and glucagon injection information; the gated recurrent unit 102 processes the current time input data and the hidden state result of the previous time at the same time, obtains the hidden state of the current time, and passes it to the current output and the next node, corresponding to links 1021 and 1022 respectively, and then under the action of the fully connected layer 103, the probability of generating different concentrations of blood glucose values is calculated, so as to predict the blood glucose value Y at the next time. t+1 , corresponding to 104, specifically, the softmax function can be used, but is not limited to, to perform probability calculation on different blood glucose features in the current hidden state, select a column of blood glucose features with the largest probability, and convert it into a blood glucose value for a preset time period after the current time and adjacent to the current time. For example, the hidden state at the current moment is a 5*5 matrix, and after probability screening, it is determined that the probability of the second column vector is the largest, then all elements of the second column vector are output, and after conversion, a number of blood glucose values within a period of time are obtained.
[0095] Wherein, t represents the current time point or the current time period, t-1 represents the previous time point or the previous time period of t, and t+1 represents the next time point or the next time period of t. The time period includes multiple time points, and the time interval between each time point can be less than 15 minutes. When t-1 represents the previous time period, the hidden state of the previous time can be a vector formed in chronological order by a number of blood sugar features in a preset time period adjacent to the current moment and before the current moment. Optionally, back propagation can optimize the loss function of the neural network based on a gradient descent algorithm.
[0096] Figure 3 A schematic diagram of a blood glucose prediction network gated loop unit 200 is provided. Figure 3 , X t is the blood sugar value at the current moment, for example, the blood sugar value at 1:10; Y t is a plurality of blood glucose values adjacent to the current moment and within a preset time period after the current moment, or a blood glucose value adjacent to the current moment and after a preset time period after the current moment. GRU combines the current input X t and the hidden state h passed down from the previous node t-1 , get the output h of the current hidden node t and the hidden state h passed to the next node t GRU mainly contains two gating states, namely reset gating r and update gating z. Among them, 201 is a sigmoid activation function, which is used as a gating signal to transform the data into a range of 0 to 1. The closer the gating signal is to 1, the more data is remembered, and the closer it is to 0, the more data is forgotten. Reset gate r t With the current input X t and the hidden state h of the previous node t-1 The calculation formula is
[0097]
[0098] Among them, w r and b r is the reset gate r t The associated parameter matrix.
[0099] 202 is another sigmoid activation function, which is another gating signal used to obtain the update gate z t , the calculation formula is
[0100]
[0101] Among them, w z and b z is and reset gate z tRelated parameter matrix. Obviously, both the reset gate and the update gate incorporate historical blood glucose features and current blood glucose information.
[0102] After getting the gate signal, first use the reset gate r t And multiplier 203 obtains the previous node hidden state after reset The calculation formula is
[0103]
[0104] In this way, effective blood glucose features can be screened out from historical blood glucose features based on the reset gate, thereby improving the accuracy of blood glucose prediction while reducing the amount of calculation.
[0105] Then The spliced data is concatenated with the input and the concatenated data is activated by the tanh activation function 204. Scale to the range of -1 to 1. The specific formula is:
[0106]
[0107] Among them, w h and b h For Related parameter matrix. By splicing the current blood sugar information and the historical effective blood sugar characteristics, the future blood sugar characteristics are obtained, which improves the accuracy of blood sugar prediction.
[0108] Finally, the obtained signal is used to update the memory, and the hidden state h of the current node is obtained through multipliers 206 and 207 and adder 208. t , that is, using the same update gate z t , and at the same time realize the hidden state h of the previous node t-1 Selective forgetting of the current node The specific formula is
[0109]
[0110] Subsequently, the hidden state of the current node is passed to the current output node and the next node.
[0111] Figure 4 A schematic diagram of another blood glucose prediction network 300 is provided. Figure 4 , in the X t Before inputting into GRU, X t Preprocessing is performed, including but not limited to data standardization, data enhancement, filtering and other processing processes. Moreover, the fully connected layer can be repeated multiple times according to different output requirements.
[0112] The above blood sugar prediction method introduces a recurrent neural network based on the characteristic that human blood sugar will not change suddenly in an instant, and combines the blood sugar value at the previous moment, meal information and insulin injection information to make a better prediction of the current blood sugar. Compared with LSTM, which needs to transmit both hidden state and cell state, GRU only contains hidden state and can directly pass the hidden state to the next unit. It has a simple structure and low complexity. Moreover, for LSTM, GRU has one less gate inside and the parameters are greatly reduced, but its function is equivalent to LSTM. It reduces the amount of calculation while maintaining good performance, which greatly increases the practicality of the algorithm.
[0113] In one embodiment, Figure 5 As shown, a blood sugar prediction method is provided, which is described by taking the method applied to a terminal as an example, and includes the following steps:
[0114] Step S501, when the blood sugar characteristic at the first preset time does not match the blood sugar information at the second preset time, the blood sugar characteristic at the first preset time is corrected according to the blood sugar information at the second preset time to obtain a corrected blood sugar characteristic; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar characteristic is used to indicate a hidden state corresponding to the blood sugar information;
[0115] Step S502, splicing the corrected blood sugar characteristic with the blood sugar information at the second preset time to obtain first spliced information;
[0116] Step S503, performing linear transformation processing on the first splicing information according to a preset reset matrix and an update matrix, respectively, to obtain an original reset parameter and an original update parameter;
[0117] Step S504, performing threshold transformation processing on the original reset parameters and the original update parameters respectively to obtain the feature reset parameters and feature update parameters of the second preset time;
[0118] Step S505, calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time;
[0119] Step S506, fusing the effective blood sugar feature with the blood sugar information at the second preset time to obtain a fused blood sugar feature at the second preset time;
[0120] Step S507, calling the feature update parameter of the second preset time, performing selective update processing on the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time;
[0121] Step S508, performing blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time;
[0122] Step S509, using the blood sugar characteristics at the second preset time as the blood sugar characteristics at the first preset time, and using the blood sugar prediction data at the third preset time as the blood sugar information at the second preset time;
[0123] Step S510, returning to step S501 to obtain blood sugar prediction data of a fourth preset time adjacent to the third preset time.
[0124] In a specific implementation, it can be determined whether the blood sugar characteristics at the first preset time match the blood sugar information at the second preset time. If the blood sugar characteristics at the first preset time do not match the blood sugar information at the second preset time, the blood sugar characteristics at the first preset time are corrected according to the blood sugar information at the second preset time to obtain the corrected blood sugar characteristics. The corrected blood sugar characteristics are spliced with the blood sugar information at the second preset time, and the first spliced information is linearly transformed according to the preset reset matrix and update matrix to obtain the original reset parameters and the original update parameters, respectively. After threshold transformation, the feature reset parameters and the feature update parameters of the second preset time are obtained. The feature reset parameters are obtained from the first preset time according to the feature reset parameters. Filter out effective blood glucose features from the blood glucose features, fuse the effective blood glucose features of the first preset time with the blood glucose information of the second preset time to obtain the fused blood glucose features of the second preset time, perform weighted summation on the fused blood glucose features of the second preset time and the blood glucose features of the first preset time according to the feature update parameter to obtain the updated fused blood glucose features of the second preset time, and determine the blood glucose prediction data of the third preset time based on the updated fused blood glucose features, and then use the blood glucose features of the second preset time as the blood glucose features of the first preset time, and use the blood glucose prediction data of the third preset time as the blood glucose information of the second preset time, repeat the above process to obtain the blood glucose prediction data of the fourth preset time.
[0125] The above-mentioned blood sugar prediction method, when the blood sugar characteristic at the first preset time does not match the blood sugar information at the second preset time, corrects the blood sugar characteristic at the first preset time according to the blood sugar information at the second preset time to obtain the corrected blood sugar characteristic, splices the corrected blood sugar characteristic with the blood sugar information at the second preset time to obtain the first spliced information, performs linear transformation processing on the first spliced information according to the preset reset matrix and update matrix respectively to obtain the original reset parameter and the original update parameter, performs threshold transformation processing on the original reset parameter and the original update parameter respectively to obtain the feature reset parameter and the feature update parameter of the second preset time, calls the feature reset parameter of the second preset time, screens the blood sugar characteristic of the first preset time adjacent to the second preset time to obtain the effective blood sugar characteristic of the first preset time, and compares the effective blood sugar characteristic with the second preset time. The blood glucose information of the preset time is fused to obtain the fused blood glucose feature of the second preset time, the feature update parameter of the second preset time is called, the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time are selectively updated to obtain the updated fused blood glucose feature of the second preset time, blood glucose prediction is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data of a third preset time adjacent to the second preset time, the blood glucose feature of the second preset time is used as the blood glucose feature of the first preset time, the blood glucose prediction data of the third preset time is used as the blood glucose information of the second preset time, and the above process is repeated. The historical and current blood glucose information can be combined to predict the future blood glucose value. Since the impact of the environment on the blood glucose value will not change suddenly in an instant, the historical and current blood glucose information can be used to effectively combat the sudden change of the blood glucose value, thereby improving the accuracy of blood glucose prediction.
[0126] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages 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 to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0127] Based on the same inventive concept, the embodiment of the present application also provides a blood sugar prediction device for implementing the blood sugar prediction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more blood sugar prediction device embodiments provided below can refer to the limitations of the blood sugar prediction method above, and will not be repeated here.
[0128] In one embodiment, Figure 6 As shown, a blood glucose prediction device is provided, comprising: a screening module 610, a fusion module 620, an updating module 630 and a prediction module 640, wherein:
[0129] A screening module 610 is used to call the characteristic reset parameter of the second preset time, and screen the blood glucose characteristics of the first preset time adjacent to the second preset time to obtain the effective blood glucose characteristics of the first preset time;
[0130] A fusion module 620 is used to fuse the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information;
[0131] An updating module 630 is used to call the feature update parameter of the second preset time, and selectively update the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time to obtain an updated fused blood glucose feature of the second preset time;
[0132] The prediction module 640 is used to perform blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
[0133] In one embodiment, the blood sugar prediction device further includes:
[0134] A data splicing module, used for splicing the blood sugar characteristics of the first preset time with the blood sugar information of the second preset time to obtain first splicing information;
[0135] A linear transformation module, used to perform linear transformation processing on the first splicing information according to a preset reset matrix and an update matrix, respectively, to obtain an original reset parameter and an original update parameter;
[0136] The threshold conversion module is used to perform threshold conversion processing on the original reset parameter and the original update parameter respectively to obtain the characteristic reset parameter and the characteristic update parameter of the second preset time.
[0137] In one embodiment, the above-mentioned data splicing module is also used to correct the blood sugar characteristics of the first preset time according to the blood sugar information of the second preset time to obtain the corrected blood sugar characteristics when the blood sugar characteristics of the first preset time do not match the blood sugar information of the second preset time; and splice the corrected blood sugar characteristics with the blood sugar information of the second preset time to obtain the first splicing information.
[0138] In one embodiment, the screening module 610 is further used to determine the update weights of the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time respectively according to the characteristic update parameter of the second preset time; and according to the update weight, perform weighted summation of the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time to obtain the updated fused blood glucose feature of the second preset time.
[0139] In one embodiment, the above-mentioned prediction module 640 is also used to perform probability calculation on the updated fused blood glucose features based on the fully connected layer to obtain a prediction probability matrix corresponding to the updated fused blood glucose features; select a column of updated fused blood glucose features with the largest probability from the prediction probability matrix as an output feature; and convert the output feature into blood glucose prediction data for a third preset time adjacent to the second preset time.
[0140] In one embodiment, the fusion module 620 is further used to splice the effective blood glucose feature with the blood glucose information of the second preset time to obtain second spliced information; and perform threshold transformation processing on the second spliced information to obtain the fused blood glucose feature of the second preset time.
[0141] In one embodiment, the blood sugar prediction device further includes:
[0142] an iterative fusion module, configured to use the blood glucose characteristics at the second preset time as the blood glucose characteristics at the first preset time, and use the blood glucose prediction data at the third preset time as the blood glucose information at the second preset time;
[0143] An iterative prediction module is used to return to the feature reset parameter of calling the second preset time, screen the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtain the effective blood glucose characteristics of the first preset time, so as to obtain the blood glucose prediction data of the fourth preset time adjacent to the third preset time.
[0144] Each module in the above-mentioned blood sugar prediction device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0145] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a blood sugar prediction method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0146] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0149] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0151] 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the 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 memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access 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 and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A blood sugar prediction method, characterized in that: The method comprises: Calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time; fusing the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information; Calling the feature update parameter of the second preset time, selectively updating the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, to obtain an updated fused blood glucose feature of the second preset time; Blood glucose prediction processing is performed based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
2. The method according to claim 1, characterized in that The method further comprises: splicing the blood sugar characteristic at the first preset time with the blood sugar information at the second preset time to obtain first splicing information; According to a preset reset matrix and an update matrix, the first splicing information is subjected to a linear transformation process to obtain an original reset parameter and an original update parameter; Threshold transformation processing is performed on the original reset parameter and the original update parameter respectively to obtain the feature reset parameter and feature update parameter of the second preset time.
3. The method according to claim 2, characterized in that The step of splicing the blood sugar characteristic at the first preset time with the blood sugar information at the second preset time to obtain first spliced information includes: In the case where the blood sugar characteristic at the first preset time does not match the blood sugar information at the second preset time, correcting the blood sugar characteristic at the first preset time according to the blood sugar information at the second preset time to obtain a corrected blood sugar characteristic; The corrected blood sugar characteristic is spliced with the blood sugar information of the second preset time to obtain the first spliced information.
4. The method according to claim 1, characterized in that: The calling of the feature update parameter of the second preset time, performing selective updating processing on the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time, and obtaining the updated fused blood glucose feature of the second preset time, includes: According to the feature update parameter of the second preset time, respectively determining the update weights of the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time; According to the updated weight, a weighted sum is performed on the fused blood glucose characteristic of the second preset time and the blood glucose characteristic of the first preset time to obtain an updated fused blood glucose characteristic of the second preset time.
5. The method according to claim 4, characterized in that The performing blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time includes: Perform probability calculation on the updated fused blood glucose feature based on a fully connected layer to obtain a prediction probability matrix corresponding to the updated fused blood glucose feature; Select a column with the largest probability from the prediction probability matrix to update the fused blood glucose feature as the output feature; The output feature is converted into blood glucose prediction data for a third preset time adjacent to the second preset time.
6. The method according to claim 1, characterized in that The fusing the effective blood sugar feature with the blood sugar information at the second preset time to obtain the fused blood sugar feature at the second preset time includes: splicing the effective blood sugar feature with the blood sugar information at the second preset time to obtain second splicing information; The second splicing information is subjected to a threshold transformation process to obtain a fused blood glucose feature at the second preset time.
7. The method according to claim 1, characterized in that After performing blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time, the method further includes: Using the blood sugar characteristics at the second preset time as the blood sugar characteristics at the first preset time, and using the blood sugar prediction data at the third preset time as the blood sugar information at the second preset time; Return to the step of calling the feature reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time, so as to obtain the blood glucose prediction data of the fourth preset time adjacent to the third preset time.
8. A blood sugar prediction device, characterized in that: The device comprises: A screening module, used for calling the characteristic reset parameter of the second preset time, screening the blood glucose characteristics of the first preset time adjacent to the second preset time, and obtaining the effective blood glucose characteristics of the first preset time; a fusion module, configured to fuse the effective blood sugar feature with the blood sugar information of the second preset time to obtain a fused blood sugar feature of the second preset time; wherein the blood sugar information includes at least one of the blood sugar data, meal information, insulin information and glucagon information of the target object within the second preset time; and the blood sugar feature is used to indicate a hidden state corresponding to the blood sugar information; an updating module, configured to call the feature update parameter of the second preset time, and selectively update the fused blood glucose feature of the second preset time and the blood glucose feature of the first preset time to obtain an updated fused blood glucose feature of the second preset time; A prediction module is used to perform blood glucose prediction processing based on the updated fused blood glucose feature to obtain blood glucose prediction data for a third preset time adjacent to the second preset time.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.