A Blood Glucose Concentration Prediction Method Based on ELM-BiLSTM-attention

Through the ELM-BiLSTM-attention model combined with attention mechanism, the problem of low accuracy of the blood glucose concentration prediction model and insufficient utilization of time characteristic information is solved, and more accurate and stable blood glucose monitoring is achieved, which is suitable for real-time treatment support for diabetic patients.

CN118557187BActive Publication Date: 2025-01-10NANTONG NINGJING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410684758.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2025-01-10
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

The existing blood glucose concentration prediction models have low accuracy and have failed to make full use of the temporal feature information in the spectral data.

Method used

Using an ELM-BiLSTM-attention-based method, the ELM-BiLSTM-attention model was constructed by acquiring and pre-treating blood glucose and spectral data of diabetic patients, and combined with attention mechanism, the model was trained and optimized to achieve accurate prediction of blood glucose concentration.

Benefits of technology

It improves the accuracy and stability of blood sugar concentration prediction, can capture important characteristics and time information in Raman spectral data, and is suitable for real-time monitoring of blood sugar levels in diabetic patients, reduces the risk of hyperglycemia or hypoglycemia, and improves patients' quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118557187B_ABST
    Figure CN118557187B_ABST
Patent Text Reader

Abstract

The present application discloses a method for predicting blood glucose concentration based on ELM-BiLSTM-attention, including: obtaining blood glucose data and spectral data of multiple diabetic patients at different periods and preprocessing them; constructing an ELM-BiLSTM-attention model; training the ELM-BiLSTM-attention model and optimizing model parameters; predicting and evaluating non-invasive blood glucose concentration. The present application combines ELM-BiLSTM with the attention mechanism to better capture important feature vectors and time information in Raman spectral data. Unlike LSTM, which only uses past information of time series data, the BiLSTM model consists of two independent LSTMs, which can be used to capture historical and future information in time series data to establish long-term dependencies between forward and backward LSTM layers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of non-invasive blood glucose prediction, and specifically relates to a blood glucose concentration prediction method based on ELM-BiLSTM-attention. Background Art

[0002] Diabetes is a serious chronic disease characterized by impaired insulin synthesis, release or action. The disease can cause various complications, including retinopathy, kidney disease, cardiovascular disease and digestive system diseases. Although diabetes cannot be completely cured, regular monitoring of blood glucose levels can help diagnose, prevent and treat diabetes. Traditional measurement techniques can provide accurate detection of blood glucose concentrations, but frequent acupuncture can cause pain, infection and other problems. Therefore, it is of great significance to construct a fast, efficient and non-invasive method for detecting blood glucose levels in diabetic patients. In recent years, spectral detection technology has been widely used in component detection due to its advantages such as fast measurement speed, high accuracy and low sample requirements. Compared with other spectral techniques, Raman spectroscopy is a new type of non-invasive spectral technology.

[0003] In recent years, many researchers have devoted themselves to clarifying the complex relationship between blood glucose concentration and various components through machine learning models. These models include partial least squares regression (PLSR), extreme learning machine (ELM) and support vector machine (SVM). Among them, ELM is a single hidden layer feedforward neural network learning algorithm, which consists of an input layer, a hidden layer and an output layer. It runs faster and has high prediction accuracy when establishing nonlinear relationships in data, but the algorithm has problems such as unstable prediction results and insufficient accuracy of local prediction results. In order to improve the accuracy and reliability of these models, key features must be extracted during the training process. Deep learning models such as recurrent neural network (RNN), long short-term memory neural network (LSTM), and bidirectional long short-term memory neural network (BiLSTM) can automatically extract complex features through multi-layer network structures during training. However, recurrent neural networks include disadvantages such as gradient disappearance or explosion, and cannot handle data with long time series well. LSTM can only use information at historical moments, and does not consider information at future moments. It cannot establish the connection between information in the two directions of data before and after, resulting in poor model prediction accuracy. Summary of the invention

[0004] The present application provides a blood glucose concentration prediction method based on ELM-BiLSTM-attention to solve the technical problems of low accuracy of blood glucose concentration prediction model and insufficient utilization of time feature information in spectral data in the prior art.

[0005] In order to solve the above technical problems, a technical solution adopted in this application is: a blood glucose concentration prediction method based on ELM-BiLSTM-attention, comprising:

[0006] Obtain blood glucose data and spectral data of multiple diabetic patients at different times and perform preprocessing;

[0007] Based on the attention mechanism, the ELM-Bi LSTM-attent i on model is constructed;

[0008] Train the ELM-Bi LSTM-attent i on model, optimize the model parameters, and obtain the ELM-Bi LSTM-attent i on pre-trained model;

[0009] Based on the ELM-Bi LSTM-attention pre-training model, non-invasive blood glucose concentration is predicted and evaluated.

[0010] Furthermore, the method of obtaining spectral data of multiple diabetic patients at different periods and performing preprocessing includes:

[0011] A 30-day analysis period was selected based on multiple patients with stratum corneum thickness no greater than 206 μm, with multiple blood glucose concentration measurements per day; wherein each blood glucose concentration measurement consisted of two measurement subsegments;

[0012] Performing weighted combination of the spectral data of the two acquisition sub-segments according to the measurement time ratio to obtain first spectral data;

[0013] Removing data whose noise exceeds a preset threshold from the first spectral data to obtain second spectral data;

[0014] The spectrum data with a blood glucose concentration exceeding 30 mmol / L in the second spectrum data is deleted to obtain the third spectrum data;

[0015] Performing smoothing, baseline correction, and denoising on the third spectral data to obtain fourth spectral data;

[0016] Performing vector normalization on the fourth spectrum data to obtain preprocessed data;

[0017] The preprocessed data is divided into training set and test set according to the preset ratio.

[0018] Furthermore, based on the attention mechanism, a method for constructing an ELM-Bi LSTM-attent i on model includes:

[0019] Based on the neuron output value of ELM and RELU activation function, the final activation value is obtained;

[0020] Reshape the final activation value and give the data a time dimension to obtain a temporary variable;

[0021] Based on temporary variables, build the forget gate of LSTM;

[0022] Based on the forget gate of LSTM, construct the input gate of LSTM;

[0023] Based on the input gate of LSTM, obtain the output threshold of the next hidden state in LSTM and the corresponding unit output value;

[0024] Based on the unit output values ​​of the forward LSTM and backward LSTM, obtain the unit output value of the BiLSTM;

[0025] Based on the unit output values ​​of BiLSTM and the constructed model attention layer, the ELM-BiLSTM-attention model is obtained.

[0026] Furthermore, based on the neuron output value of ELM and the RELU activation function, the method for obtaining the final activation value is:

[0027] Build multiple hidden layers of ELM, each hidden layer contains multiple neurons, and obtain the output values ​​of neurons in the hidden layer;

[0028] Based on the RELU activation function, obtain the activation value of the neuron output value;

[0029] Repeat the above steps three times to obtain the final activation value.

[0030] Further, the method of training the ELM-Bi LSTM-attent i on model and optimizing the model parameters to obtain the ELM-Bi LSTM-attent i on pre-trained model includes:

[0031] The spectral data in the training set is input into the ELM-Bi LSTM-attent i on model; after each training segment, the output layer of the ELM-Bi LSTM-attent i on model will output the predicted value and accuracy;

[0032] Based on the loss function of the ELM-BiLSTM-attent i on model, update the model parameters of the ELM-Bi LSTM-attent i on model;

[0033] In response to the number of training times of each training segment reaching a preset number of times, the model parameters of the training segment with the highest output accuracy are selected as the optimal model parameters of the ELM-BiLSTM-attention model, and the ELM-BiLSTM-attention pre-training model is obtained.

[0034] Furthermore, the method for obtaining the loss function of the ELM-BiLSTM-attent ion model includes:

[0035] Based on formula (1), the loss between the output value of the ELM-Bi LSTM-attention model and the true value is obtained; where formula (1) is:

[0036]

[0037] in, represents the predicted value of the blood glucose concentration of the i-th sample, y i represents the true value of the blood glucose concentration of the ith sample, and N represents the total number of samples.

[0038] Furthermore, the method for predicting and evaluating the non-invasive blood glucose concentration by using the ELM-BiLSTM-attent ion pre-training model includes:

[0039] Based on the ELM-BiLSTM-attent ion pre-training model, the blood glucose concentration and the corresponding spectral data in the test set are input into the ELM-BiLSTM-attent ion pre-training model to obtain the predicted value of the blood glucose concentration of the samples in the test set;

[0040] Calculate the error index RMSE between the predicted value of blood glucose concentration and the true value of blood glucose concentration;

[0041] Draw a model diagram of the predicted blood glucose concentration and the actual blood glucose concentration to evaluate the stability of the ELM-BiLSTM-attent ion pre-training model;

[0042] Slightly perturb the input data in the test set to evaluate the robustness of the ELM-BiLSTM-attent ion pre-trained model.

[0043] The beneficial effects of the present application are as follows: the present application combines ELM-BiLSTM with the attention mechanism, which can better capture the important feature vectors and time information in the Raman spectral data. Unlike the LSTM that only uses the past information of the time series data, the BiLSTM model consists of two independent LSTMs, which can be used to capture the historical information and future information in the time series data to establish the long-term dependency relationship between the forward and backward LSTM layers. The multi-neural network combination method adopted in the present application can quickly and accurately realize the prediction of blood glucose concentration, and can be applied to the treatment of any diabetic patients who need to provide blood glucose concentration in real time, provide technical support for diabetic patients to monitor blood glucose concentration, timely avoid the risk of hyperglycemia or hypoglycemia in diabetic patients, and improve the quality of life of diabetic patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flow chart of an embodiment of a method for predicting blood glucose concentration based on ELM-BiLSTM-attention of the present application;

[0045] Figure 2 yes Figure 1 A schematic flow chart of an embodiment of step S1 in FIG.

[0046] Figure 3 yes Figure 1 A schematic flow chart of an embodiment of step S2 in FIG.

[0047] Figure 4 yes Figure 1 A schematic diagram of a network structure of an embodiment of step S2 in FIG.

[0048] Figure 5 yes Figure 3 A schematic flow chart of an embodiment of step S21 in FIG.

[0049] Figure 6 yes Figure 3 A schematic diagram of a BiLSTM memory unit in an embodiment of step S21;

[0050] Figure 7 yes Figure 1 A schematic flow chart of an embodiment of step S3 in FIG.

[0051] Figure 8 yes Figure 1 A schematic flow chart of an embodiment of step S4 in FIG.

[0052] Fig. 9 This is a comparison chart of model prediction effects of an embodiment of a blood glucose concentration prediction method based on ELM-BiLSTM-attention of the present application. DETAILED DESCRIPTION

[0053] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with specific embodiments.

[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways than those described herein. Therefore, the present invention is not limited to the specific embodiments of the following disclosure.

[0055] See also Figure 1 , Figure 1 : is a flow chart of an embodiment of a method for predicting blood glucose concentration based on ELM-BiLSTM-attention of the present application. The method comprises the following steps:

[0056] Step S1. Obtain blood glucose data and spectral data of multiple diabetic patients at different periods and perform preprocessing.

[0057] For details, see Figure 2 , Figure 2 yes Figure 1 A flow chart of an embodiment of step S1 in FIG. 1 is a flow chart of an embodiment of step S1 in FIG. 1 . Step S1 includes:

[0058] Step S11. Based on multiple patients whose stratum corneum thickness is not greater than 206 um, a 30-day analysis period is selected, and blood glucose concentration is measured multiple times a day; wherein each blood glucose concentration measurement consists of two measurement sub-segments.

[0059] Specifically, several diabetic patients aged 20 to 60 years were recruited from the Department of Endocrinology at Odense University Hospital in Denmark. The stratum corneum thickness of all patients was measured using correlative tomography technology, and patients with a stratum corneum thickness greater than 206um were excluded. Each diabetic patient was asked to choose a 30-day analysis period within a 60-day window period, and appropriate blood glucose concentration measurements were performed multiple times a day during the analysis period. Each blood glucose concentration measurement consisted of two acquisition subsegments, lasting 2 minutes and 1 minute respectively.

[0060] Step S12: weightedly combine the spectral data of the two acquisition sub-segments according to the measurement time ratio to obtain first spectral data.

[0061] Step S13: remove the data with noise exceeding a preset threshold in the first spectral data to obtain second spectral data.

[0062] Specifically, a preset threshold for noise evaluation is set, the first spectrum data with noise exceeding the preset threshold is removed, and the second spectrum data is acquired.

[0063] Step S14: Delete the spectral data with blood glucose concentration exceeding 30 mmol / L in the second spectral data to obtain the third spectral data.

[0064] Specifically, the spectral data with a blood glucose concentration exceeding 30 mmol / L in the second spectral data is deleted to obtain the cleaned third spectral data.

[0065] Step S15: performing smoothing, baseline correction and denoising on the third spectral data to obtain fourth spectral data.

[0066] Specifically, a Savitzky-Gol ay filter (second order, 11 points) is used to smooth the third spectral data, and then multiple scattering correction (MSC) is used to eliminate the interference of background noise and baseline drift of the spectral data to obtain the fourth spectral data.

[0067] Step S16: Perform vector normalization on the fourth spectrum data to obtain preprocessed data.

[0068] Step S17: Divide the preprocessed data into a training set and a test set according to a preset ratio.

[0069] Specifically, the preprocessed data is divided into a training set and a test set in a ratio of 8:2.

[0070] Step S2. Based on the attention mechanism, construct the ELM-Bi LSTM-attention model.

[0071] For details, see Figure 3-4 , Figure 3 yes Figure 1 A schematic flow chart of an embodiment of step S2 in FIG. Figure 4 yes Figure 1 A schematic diagram of a network structure of an embodiment of step S2 in FIG. Step S2 includes the following steps:

[0072] Step S21. Obtain the final activation value based on the neuron output value of ELM and the RELU activation function.

[0073] Specific, specific, see Figure 5-6 , Figure 5 yes Figure 3 A schematic flow chart of an embodiment of step S21 in FIG. Figure 6 yes Figure 3 Schematic diagram of a Bi LSTM memory unit of an embodiment of step S21 in FIG.

[0074] Step S21 includes:

[0075] Step S211. Build multiple hidden layers of ELM, each hidden layer contains multiple neurons, and obtain the output values ​​of the neurons in the hidden layer.

[0076] Specifically, we build L hidden layers of ELM, each of which contains m i neurons, where i = 1, 2, ..., L.

[0077] For the i-th hidden layer of ELM, it represents the output g ij The formula (2) is:

[0078] g ij =W i *g i,j-1 +b i (2);

[0079] Among them, g ij represents the output of the jth neuron in the ith hidden layer, W irepresents the weight matrix of the i-th hidden layer, b i is the bias vector of the i-th hidden layer.

[0080] Step S212: Based on the RELU activation function, obtain the activation value of the neuron output value.

[0081] Specifically, based on formula (3), the activation value of the neuron output value; wherein formula (3) is:

[0082] a ij =max(0,g ij ) (3);

[0083] Among them, a ij Indicates g ij The activation value of .

[0084] Step S213: Repeat the above steps three times to obtain the final activation value.

[0085] Specifically, the iteration is repeated three times in sequence to obtain the final activation value.

[0086] Step S22: reshape the final activation value and give the data a time dimension to obtain a temporary variable.

[0087] Specifically, reshape a ij And give the data time dimension to get the temporary variable x t .

[0088] Step S23. Based on the temporary variables, construct a forget gate of the long short-term memory network (LSTM).

[0089] Specifically, based on formula (4), the forget gate of LSTM is constructed; wherein formula (4) is:

[0090] f t =Sigmoid(W f *[h t-1 ,x t ]+b f ) (4);

[0091] Among them, f t represents the forgetting threshold, W f represents the weight matrix of the forget gate, h t-1 represents the unit output at the previous moment, b f Represents the bias of the forget gate.

[0092] Step S24: Based on the forget gate of LSTM, construct the input gate of LSTM.

[0093] Based on formulas (5)-(7), the input gate of LSTM is constructed; where formulas (5)-(7) are:

[0094] i t =Sigmoid(W i *[h t-1 ,x t ]+b i ) (5);

[0095] K t =tanh(W k *[h t-1 ,x t ]+b k ) (6);

[0096] C t =f t *C t-1 +i t *K t (7);

[0097] Among them, i t represents the input threshold, W i and W k Represent the weight matrices of the input gate and memory unit, respectively, and b i and b k They represent the input gate and memory unit bias, respectively, and C t Indicates the state of memory cells after updating.

[0098] Step S25. Based on the input gate of LSTM, obtain the output threshold of the next hidden state in LSTM and the corresponding unit output value.

[0099] Based on formulas (8)-(9), determine the output threshold of the next hidden state and the corresponding unit output value; where formulas (8)-(9) are:

[0100] O t =Sigmoid(W o *[h t-1 ,x t ]+b o ) (8);

[0101] h t =O t *tanh(C t ) (9);

[0102] Among them, O t Represents the output threshold, W o represents the output gate weight matrix, b o represents the output gate bias, h t Represents the current unit output.

[0103] Step S26. Based on the unit output values ​​of the forward LSTM and the backward LSTM, obtain the unit output value of the BiLSTM.

[0104] Based on formulas (10)-(12), the unit output value of Bi LSTM is calculated through the output of forward LSTM and backward LSTM; wherein formulas (10)-(12) are:

[0105]

[0106]

[0107]

[0108] in, and Represent the values ​​of the forward and backward hidden states, Y t Represents the final hidden state of the BiLSTM model.

[0109] Step S27. Based on the unit output value of the Bi LSTM and the constructed model attentive layer, obtain the ELM-BiLSTM-attentive model.

[0110] Based on formulas (13)-(15), the model attentiveness layer is constructed to obtain the ELM-BiLSTM-attentiveness model; wherein formulas (13)-(15) are:

[0111] μ t =tanh(W s P t +b s ) (13);

[0112]

[0113] v=∑α t P t (15);

[0114] Among them, P t represents the output feature vector of the BiLSTM layer at time step t, W s represents the weight matrix, b s Represents the bias vector, μ t YesP t Representation through the hidden layer of the neural network. s represents the randomly initialized context vector, α t is μ t The importance weight normalized by the Softmax function, v represents the model prediction value.

[0115] Step S3: Train the ELM-BiLSTM-attent ion model and optimize the model parameters to obtain the ELM-BiLSTM-attent ion pre-trained model.

[0116] For details, see Fig. 9 , Fig. 9 yes Figure 1 A flow chart of an embodiment of step S3 in FIG. 1 is a flow chart of an embodiment of step S3 in FIG. 1 . Step S3 includes:

[0117] Step S31. Input the spectral data in the training set into the ELM-BiLSTM-attent ion model; after each training segment, the output layer of the ELM-BiLSTM-attent ion model will output the predicted value and accuracy.

[0118] Step S32. Based on the loss function of the ELM-Bi LSTM-attent ion model, update the model parameters of the ELM-Bi LSTM-attent ion model.

[0119] Specifically, based on formula (1), the loss between the output value of the ELM-BiLSTM-attent ion model and the true value is obtained; wherein formula (1) is:

[0120]

[0121] in, represents the predicted value of the blood glucose concentration of the i-th sample, y i represents the true value of the blood glucose concentration of the ith sample, and N represents the total number of samples.

[0122] Optimize the loss function of the ELM-Bi LSTM-attention model, and use the back-propagation algorithm to adjust the model parameters according to the optimization gradient.

[0123] Step S33. In response to the number of training times of each training segment reaching a preset number of times, the model parameters of the training segment with the highest output accuracy are selected as the optimal model parameters of the ELM-Bi LSTM-attent i on model, and the ELM-Bi LSTM-attent i on pre-trained model is obtained.

[0124] Specifically, when the number of training times of each training segment reaches a preset number of times, the output accuracy and model parameters of each training segment are obtained; among which, the model parameters of the training segment with the largest output accuracy are selected as the optimal model parameters of the ELM-Bi LSTM-attent i on model, thereby obtaining the trained ELM-Bi LSTM-attent i on pre-trained model.

[0125] Step S4. Based on the ELM-Bi LSTM-attention pre-training model, predict and evaluate the non-invasive blood glucose concentration.

[0126] For details, see Figure 8 , Figure 8 yes Figure 1 A flow chart of an embodiment of step S4 in FIG. 4 includes:

[0127] Step S41. Based on the ELM-BiLSTM-attent ion pre-training model, the blood glucose concentration and the corresponding spectral data in the test set are input into the ELM-BiLSTM-attent ion pre-training model to obtain the predicted value of the blood glucose concentration of the samples in the test set.

[0128] Step S42: Calculate the error indicator RMSE between the predicted value of blood glucose concentration and the true value of blood glucose concentration.

[0129] Specifically, the performance of the trained model is evaluated using the test set data, and the error index RMSE between the predicted value of the blood glucose concentration obtained above and the true value is calculated.

[0130] Step S43. Draw a model diagram of the predicted blood glucose concentration and the actual blood glucose concentration to evaluate the stability of the ELM-BiLSTM-attent ion pre-training model.

[0131] Specifically, draw a scatter plot or curve graph of the predicted value and the true value to intuitively observe the performance of the LM-BiLSTM-attention pre-training model.

[0132] Step S44. Slightly perturb the input data in the test set to evaluate the robustness of the ELM-BiLSTM-attent ion pre-training model.

[0133] Specifically, the stability of the model and its robustness to changes in input data are evaluated by running the model multiple times on the test set or making small perturbations to the input data.

[0134] See also Fig. 9 , a comparison chart of the model prediction effect of an embodiment of a method for predicting blood glucose concentration based on ELM-BiLSTM-attent ion. In one embodiment, in order to verify the effectiveness of the implementation of the present invention, MATLAB is used for numerical simulation verification. This embodiment obtains Raman spectral data and corresponding blood glucose concentrations of 30 diabetic patients at three time periods every day for 60 days from a public database.

[0135] Based on the above data, the comparison results of the ELM-BiLSTM-attent ion model proposed in this invention and the feedforward neural network (FFNN) and extreme learning machine (ELM) model are as follows: Fig. 9 As shown in Figure 2. When the number of model iterations reaches 400, the RMSE of the three models gradually converges and tends to be stable. Fig. 9 It can be clearly seen that the RMSE of the ELM-BiLSTM-attention model is significantly lower than that of FFNN and ELM, indicating that the prediction of the ELM-BiLSTM-attention model is accurate under the same data set.

[0136] This application combines the attention mechanism to build an ELM-BiLSTM-attention model, which solves the problem of ignoring time series information in the data in the current blood glucose concentration prediction method. The fusion attention mechanism assigns weights to each feature to enhance important features, further improving the model's ability to perceive important features.

[0137] This application combines ELM-BiLSTM with the attention mechanism to better capture important feature vectors and time information in Raman spectroscopy data. Unlike LSTM that only uses past information of time series data, the BiLSTM model consists of two independent LSTMs, which can be used to capture historical and future information in time series data to establish long-term dependencies between the forward and backward LSTM layers.

[0138] In addition, the multi-neural network combination method used in this application can quickly and accurately predict blood glucose concentration, and can be applied to the treatment of any diabetic patients who need to provide real-time blood glucose concentration, providing technical support for diabetic patients to monitor blood glucose concentration, timely avoiding the risk of hyperglycemia or hypoglycemia in diabetic patients, and improving the quality of life of diabetic patients.

[0139] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A blood glucose concentration prediction method based on ELM-BiLSTM-attention, characterized in that: The following steps are involved: Obtain blood glucose data and spectral data of multiple diabetic patients at different times and perform preprocessing; Based on the attention mechanism, the ELM-BiLSTM-attention model is constructed; Train the ELM-BiLSTM-attention model and optimize model parameters to obtain an ELM-BiLSTM-attention pre-trained model; Based on the ELM-BiLSTM-attention pre-training model, non-invasive blood glucose concentration is predicted and evaluated.

2. The method according to claim 1, characterized in that The method for obtaining spectral data of multiple diabetic patients at different periods and performing preprocessing includes: A 30-day analysis period was selected based on multiple patients whose stratum corneum thickness was no greater than 206 μm, and blood glucose concentration was measured multiple times a day; wherein each blood glucose concentration measurement consisted of two measurement sub-segments; Performing weighted combination of the spectral data of the two measurement sub-segments according to the measurement time ratio to obtain first spectral data; Removing data whose noise exceeds a preset threshold from the first spectral data to obtain second spectral data; Deleting the spectral data with blood glucose concentration exceeding 30 mmol / L in the second spectral data to obtain third spectral data; Performing smoothing, baseline correction and denoising on the third spectral data to obtain fourth spectral data; Performing vector normalization on the fourth spectral data to obtain preprocessed data; The preprocessed data is divided into a training set and a test set according to a preset ratio.

3. The method according to claim 1, characterized in that The method for constructing the ELM-BiLSTM-attention model based on the attention mechanism includes: Based on the neuron output value of ELM and RELU activation function, the final activation value is obtained; Reshape the final activation value and give it a data time dimension to obtain a temporary variable; Based on the temporary variables, construct a forget gate of LSTM; Based on the forget gate of the LSTM, construct the input gate of the LSTM; Based on the input gate of the LSTM, obtaining the output threshold of the next hidden state in the LSTM and the corresponding unit output value; Based on the unit output values ​​of the forward LSTM and backward LSTM, obtain the unit output value of the BiLSTM; Based on the unit output value of the BiLSTM and the constructed model attention layer, the ELM-BiLSTM-attention model is obtained.

4. The method according to claim 3, characterized in that: The method for obtaining the final activation value based on the neuron output value of ELM and RELU activation function is as follows: Building multiple hidden layers of ELM, each hidden layer including multiple neurons, and obtaining output values ​​of neurons in the hidden layer; Based on the RELU activation function, obtain the activation value of the neuron output value; Repeat the above steps three times to obtain the final activation value.

5. The method according to claim 2, characterized in that: The method of training the ELM-BiLSTM-attention model, optimizing model parameters, and obtaining the ELM-BiLSTM-attention pre-trained model includes: Input the spectral data in the training set into the ELM-BiLSTM-attention model; wherein after each training segment, the output layer of the ELM-BiLSTM-attention model outputs the predicted value and accuracy; Based on the loss function of the ELM-BiLSTM-attention model, updating the model parameters of the ELM-BiLSTM-attention model; In response to the number of training times of each of the training segments reaching a preset number of times, the model parameters of the training segment with the highest output accuracy are selected as the optimal model parameters of the ELM-BiLSTM-attention model, and the ELM-BiLSTM-attention pre-training model is obtained.

6. The method according to claim 5, characterized in that The method for obtaining the loss function of the ELM-BiLSTM-attention model includes: Based on formula (1), the loss between the output value and the true value of the ELM-BiLSTM-attention model is obtained; wherein the formula (1) is: in, represents the predicted value of the blood glucose concentration of the i-th sample, y i represents the true value of the blood glucose concentration of the ith sample, and N represents the total number of samples.

7. The method according to claim 5, characterized in that The method for predicting and evaluating non-invasive blood glucose concentration based on the ELM-BiLSTM-attention pre-training model includes: Based on the ELM-BiLSTM-attention pre-training model, the blood glucose concentration and the corresponding spectral data in the test set are input into the ELM-BiLSTM-attention pre-training model to obtain the predicted value of the blood glucose concentration of the samples in the test set; Calculate the error index RMSE between the predicted value of blood glucose concentration and the true value of blood glucose concentration; Draw a model diagram of the predicted blood glucose concentration value and the true blood glucose concentration value to evaluate the stability of the ELM-BiLSTM-attention pre-training model; The input data in the test set is slightly perturbed to evaluate the robustness of the ELM-BiLSTM-attention pre-trained model.

Citation Information

Patent Citations

  • Method of optical waveguide enhancement mechanism and Raman spectrometer

    CN102967593A

  • Composite Raman spectrum data analysis method and system for glucose component in blood

    CN116559143A