A method for constructing a blood glucose prediction model based on signal energy characteristics and pulse cycle
Through the signal quality screening method based on signal energy characteristics and pulse period, high-quality feature vectors are constructed, which solves the problem of poor PPG signal quality and improves the stability and accuracy of the non-invasive blood glucose estimation model.
Patent Information
- Application Number
- CN202310227933.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-03-10
AI Technical Summary
In the prior art, the quality of PPG signals collected by wearable devices is poor, resulting in the impact of the training efficiency and prediction accuracy of the blood sugar prediction model.
The signal quality screening method based on signal energy characteristics and pulse period is adopted. The energy characteristics of the PPG signal are extracted through the Kaiser-Teager operator and entropy method, and combined with the pulse waveform characteristics and autoregression coefficients, a high-quality feature vector is constructed to train the non-invasive blood glucose estimation model.
It improves the stability and high accuracy of the non-invasive blood glucose estimation model, reduces the calculation amount, and simplifies the signal quality screening process, making it suitable for the implementation of embedded devices.
Smart Images

Figure CN116451110B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of biomedical signal processing and relates to a method for constructing a blood sugar prediction model based on signal energy characteristics and pulse cycle. Background Art
[0002] Currently, there are two methods for measuring blood sugar: biochemical analyzer detection and rapid blood sugar meter detection. The former is mainly used in hospitals and other places, requiring a large amount of blood samples, a long detection time, and a large device size. The second is mainly used in home scenarios, and only 1-3μL of blood samples need to be collected to calculate the blood sugar concentration measurement value through a micro blood sugar meter in a short time.
[0003] Both biochemical analyzers and fingertip blood sampling are invasive measurement methods. Frequent blood glucose concentration measurements are very cumbersome and painful for patients, and are also accompanied by the risk of infection. Moreover, for home-use micro-glucose meters, the price of blood glucose test strips is also a considerable expense. In fact, most diabetic patients are unable to continuously monitor their blood glucose concentration due to the cumbersome and painful nature of blood glucose concentration testing, which makes it impossible for diabetic patients to receive appropriate treatment measures and their blood glucose concentration cannot be effectively controlled. Therefore, it is of great practical significance to realize a truly non-invasive blood glucose concentration detection method.
[0004] The non-invasive blood glucose detection technology based on PPG signals stands out because of its convenient signal acquisition. PPG signals are the reflection of blood flow in blood vessels and can be collected through the fingertips of the subject. PPG signals can not only be used to evaluate cardiovascular diseases, but also to predict blood pressure and blood sugar. Currently, many wearable devices are compatible with monitoring PPG signals. Using PPG signals to extract features and build a blood glucose prediction model is a very promising direction.
[0005] However, the signals collected by wearable devices may have poor signal quality due to improper wearing and patient movement. Screening the quality of the signal can eliminate the impact of abnormal signals on subsequent results and reduce the amount of data calculation. Some collected PPG signals may have no pulse or have a lot of distortion. The features extracted from these signals may be wrong or even completely unable to extract features, which seriously affects the training efficiency and prediction accuracy of the model. Signal quality screening is an important step for both algorithm development and actual use. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a signal quality screening method based on signal energy characteristics and pulse cycle, a simple and fast PPG signal quality screening method, to ensure the quality of the PPG signal for subsequent feature extraction, to provide high-quality PPG signals for subsequent model construction, thereby improving the stability and high precision of the non-invasive blood glucose estimation model.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] A method for constructing a blood sugar prediction model based on signal energy characteristics and pulse cycle, specifically comprising the following steps:
[0009] S1: remove high-frequency noise from the collected PPG signal;
[0010] S2: Preliminary screening of PPG signal quality: The Kaiser-Teager energy features and logarithmic energy entropy features of the PPG signal after denoising in step S1 are extracted by the Kaise-Teager operator and entropy method, and the features are input into the SVM classifier to divide the signal quality into good and bad types;
[0011] S3: accurately screening the good quality PPG signals preliminarily screened in step S2, screening out the signals whose pulse wave interval period does not meet the threshold setting, and removing them from the data set;
[0012] S4: Based on the pulse wave waveform features, autoregressive coefficient, heart rate and signal energy features selected in step S3, a total of 39 features are combined with the features of the physiological parameters of the two human bodies to form a 41-dimensional feature vector;
[0013] S5: Obtain the importance ranking of features according to the xgboost regressor, compare the features with higher importance rankings, add the features with higher importance in turn, and construct a blood glucose estimation dataset;
[0014] S6: Input the data set constructed in step S5 into the particle swarm BP neural network to construct a non-invasive blood glucose estimation model.
[0015] Furthermore, in step S2, the Kaiser-Teager energy feature extraction method is mainly used to determine the instantaneous energy distribution of the signal to indicate whether the signal is noisy or clean, which helps to determine whether the signal is retained; in the discrete domain, the energy operator only needs three adjacent values of the signal to calculate, and its computational complexity is low and the time resolution is high. The sampling rate of the PPG signal is 64Hz, and the continuous blood glucose meter collects blood glucose values every 5 minutes. The PPG signal corresponding to the blood glucose value of each blood glucose collection 30 seconds before each blood glucose collection is extracted. The PPG signal S of a segment W Contains 1920 points, divided into frames of length L frame =64 different frame signals S f (τ,n), where τ represents the different signals in each frame (τ=1,…,L frame ), n represents the frame number (n = 1, ..., 30), and the Kaiser-Teager feature KTE (τ, n) is calculated as follows:
[0016]
[0017] For each frame, KTE(τ,n)(τ=2,3,…,L frame -1), calculate the mean, variance, percentile and skewness, and combine the average values of all frames (n=1, 2, ..., 30) to obtain the Kaiser-Teager energy features of the four features.
[0018] Further, in step S2, the logarithmic energy entropy feature is a time domain entropy measure, which is calculated based on the full-band energy spectrum:
[0019]
[0020] The statistical characteristics of the logarithmic energy entropy sequence were calculated to obtain its mean, variance and percentile, and three features were obtained. The features extracted by the two methods were combined to construct seven feature vectors as the input features of the SVM signal quality preliminary screening classifier.
[0021] Further, step S3 specifically includes: obtaining the bottom of the preliminarily screened good quality PPG signal by the differential threshold method, fitting the baseline drift of the PPG signal by the cubic spline interpolation method, subtracting the baseline drift from the original signal, and obtaining the PPG signal with the baseline drift removed.
[0022] The peak and valley of the pulse wave are located by the differential threshold method, and the peak interval, valley interval, and number of peaks and valleys are calculated. The threshold is set within the heart rate range (50,140), and signals that do not meet the threshold are removed. The main steps of the differential threshold method are as follows:
[0023] (1) Obtain the differential signal of the PPG signal and set the part less than zero to 0 to obtain the PPG diff ;
[0024] (2) Obtaining PPG diff The maximum coordinates of peaks and calculate As a threshold condition for judging whether the maximum value is met;
[0025] (3) Traverse and determine the maximum coordinates peaks, corresponding to the differential signal PPG diff (peaks)>diff mean , and the difference between the current maximum coordinates peaks(i)-peaks(i-1) meets the required heart rate range, then add the current peaks(i) to the final result of the peak value to obtain the filtered maximum coordinates peaks2;
[0026] (4) There is a certain offset between the extreme value coordinate peaks2 and the peak value of the original PPG signal. According to the differential extreme value peaks2, a backward search is performed for 1 / 3 of the heart rate cycle to obtain the peak coordinate rpeaks;
[0027] (5) Remove the heavy rpeaks and finally get the peak value of the PPG signal;
[0028] (6) Search forward 1 / 2 cycle based on the peak value rpeaks, obtain the coordinates of the minimum value and get the valleys.
[0029] The above is the differential threshold method used by the present invention to obtain the peak and trough of the pulse wave, and based on the peak interval as the main judgment criterion, it is judged whether there are two or more periods in the peak interval period that do not meet the heart rate requirement range (50, 140). If it does not meet the requirements, it is marked that the signal has a large jump and the signal is discarded; if it meets the requirements, the signal is retained and the heart rate characteristics of the signal are calculated as an input feature of the subsequent model.
[0030] Further, in step S4, according to the pulse wave waveform, the pulse wave waveform features are extracted, including a total of 25 features. The method for extracting the pulse wave waveform features is: first, according to the valley sequence of the pulse wave signal obtained by the differential threshold method in step S3, the pulse wave signal is divided into signals of a single pulse wave cycle; then, the pulse wave waveform features are extracted for the signal of each pulse wave cycle, and 25 features are obtained to form a feature vector.
[0031] Further, in step S4, the method for extracting the autoregressive coefficient is implemented by an autoregressive model, specifically, the autoregressive model uses the point before the pulse wave p to predict the value of the current point, and obtains the coefficient of the autoregressive model to characterize the characteristics of the pulse wave; the autoregressive model can be described by the following formula:
[0032]
[0033] Among them, S(τ,n) represents the τth value of the PPG signal in the nth frame, e(n) represents the error between the prediction and the actual value of the autoregressive model, p represents the regression order, AR i Represents the coefficient of the autoregressive model, b represents the bias term, and here p=5 is set. With the bias term, the autoregressive coefficient has a total of 6 features.
[0034] Furthermore, the heart rate is calculated based on the average time interval of the pulse wave to obtain a feature.
[0035] Further, in step S4, the 41-dimensional feature vector includes: 4 Kaiser-Teager energy features, 3 statistical features of logarithmic energy entropy sequences, 25 pulse wave waveform features, 6 autoregressive coefficient features, 1 heart rate feature, and 2 features of gender and glycated hemoglobin.
[0036] Further, step S5 specifically includes: constructing an xgboost regressor to obtain the importance ranking of features, adding features in sequence, and checking the model indicators of the corresponding feature-constituted data set until the performance indicators of the model are no longer improved; finally, a data set of 10 features is obtained; and a non-invasive blood glucose estimation model is constructed using a PSO-BP neural network. The main steps of the feature importance ranking method and the blood glucose estimation model construction include:
[0037] S51: extracting feature vectors of 41 features from the filtered signals and constructing a data set;
[0038] S52: The data set is Z-score normalized; there may be some outliers in the features that are beyond the range of values. To avoid their influence, Z-score normalization is used, that is, the difference between the original data and the mean is divided by the variance:
[0039]
[0040] S53: Divide the standardized data into training set, validation set and test set in a ratio of 7:1:2, and obtain the feature importance score through xgboost; Xgboost is the gradient boosting tree. After the boosting tree is created, the importance score of each feature can be obtained relatively directly. The importance score measures the value of the feature in prompting the creation of the decision tree in the model. The more a feature is used to create decision trees in the model, the higher its importance is. Rank the features from high to low according to the feature importance score;
[0041] S54: According to the feature ranking obtained in S53, add the features with high rankings in turn, and then build the xgboost model to check the model accuracy of different numbers of features, and obtain the feature combination with the final optimal model accuracy.
[0042] Further, step S6 specifically includes:
[0043] S61: constructing a particle swarm BP neural network based on the data set constructed by importance ranking in step S54, firstly optimizing the weight of the BP neural network using the particle swarm algorithm, randomly selecting 5% of the data set, taking the error between the blood glucose predicted by the BP neural network and the actual blood glucose as the fitness function, and optimizing the weight of the BP neural network;
[0044] S62: Using the optimized weights as the initial weight values of the BP neural network, the remaining 95% of the data set is divided into a training set, a validation set and a test set in a ratio of 7:1:2, and the BP neural network is trained to obtain a blood glucose estimation model.
[0045] The beneficial effects of the present invention are:
[0046] 1) The present invention fully considers the energy characteristics of the pulse wave signal to perform preliminary signal quality screening, and then further screens through the pulse cycle, which can eliminate most of the useless signals, reduce the amount of calculation and greatly improve the model prediction accuracy.
[0047] 2) The energy characteristics and waveform characteristics of the pulse wave are taken into consideration during the modeling process of the method of the present invention, and most of the information of the pulse wave is extracted, making the non-invasive blood glucose estimation model more stable and accurate.
[0048] 3) The signal quality screening method of the present invention is simple to operate and has a small amount of calculation. It can realize fast calculation in embedded devices, provide a basis for pulse wave signal processing of wearable devices, and further promote the stability and applicability of blood glucose estimation models of wearable devices.
[0049] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0051] Figure 1 is a flow chart of the signal quality screening method of the present invention;
[0052] Figure 2 Schematic diagram of characteristic points of pulse wave waveform;
[0053] Figure 3 is the AUC curve of the SVM quality classifier (AUC score is 0.996);
[0054] Figure 4 These are 10 randomly intercepted original PPG signals;
[0055] Figure 5 is the PPG signal after preprocessing (i.e., denoising, filtering, and removing baseline drift);
[0056] Figure 6 It is the curve chart of model indicators with different feature quantities;
[0057] Figure 7 Rank the top 10 features of xgboost feature importance;
[0058] Figure 8 Schematic diagram of Clarke error grid analysis results of PSO-BP model;
[0059] Fig. 9 Schematic diagram of the Bland-Altman consistency analysis results of the PSO-BP model. DETAILED DESCRIPTION
[0060] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0061] See also Figures 1 to 9 The present invention provides a method for non-invasive blood glucose prediction based on pulse wave energy characteristics and pulse wave waveform characteristics. The specific flow chart is as follows: Figure 1 As shown in the figure, firstly, the high-frequency interference of PPG signal acquisition is removed by wavelet threshold denoising, and then the pulse wave energy feature is used to make a preliminary evaluation of the pulse wave signal quality, and then the pulse cycle detected by the differential threshold method is judged by threshold again. The pulse wave signal that meets the threshold is a high-quality PPG signal. Finally, the waveform characteristics of the pulse wave are extracted, as shown in Table 3, and the energy characteristics of the signal are added to form the input features of the PPG signal. In order to reduce the feature vector, each feature is compared with the invasive blood glucose value, and the 10 features with the highest correlation ranking are taken as the input features. Finally, the non-invasive blood glucose prediction model is constructed through the particle swarm BP neural network.
[0062] For portable devices, signal distortion or even signal loss often occurs. Accurately judging the quality of classified signals and eliminating invalid and low-quality signals can greatly improve the utilization rate of PPG signals and the accuracy of subsequent algorithms. For the judgment of PPG signal quality, PPG signal quality evaluation is performed based on the energy characteristics of PPG signals and the characteristics of pulse wave waveforms, which can quickly and conveniently screen out the signal quality of PPG.
[0063] This method extracts two energy features of PPG signals: one is the Kaiser-Teager energy operator used to track the instantaneous energy distribution of the signal; the other is to extract the logarithmic energy entropy feature, calculate the overall change characteristics of the signal, combine the energy features of the two, and manually construct a data set for signal quality classification. The model for preliminary classification of PPG signal quality is trained by the SVM classifier. The specific implementation steps are as follows:
[0064] (1) 324 PPG signals were manually screened out, and the PPG signal quality of the artificial standard was set as label 1 for those with clear waveform and no obvious distortion, indicating high-quality PPG signals; while those with more distortion and distortion were set as label 0, indicating low-quality PPG signals. Among them, 90 data were high-quality PPG signals and 234 data were low-quality PPG signals;
[0065] (2) Extract and filter out the energy features of the PPG signal as the input features of the SVM quality classifier, where 70% of the data is used as the training set and 30% of the data is used as the test set;
[0066] (3) Evaluate the performance of the SVM classifier in the test set. Because of the imbalance of data samples, it is necessary to evaluate multiple indicators to compare the performance of the classifier, mainly through the results of the confusion matrix (Table 1 shows the binary confusion matrix);
[0067] Table 1 Binary classification confusion matrix
[0068]
[0069] The performance index of the binary classifier is calculated by the confusion matrix, and the calculation method is shown in Table 2 below:
[0070] Table 2 Binary classifier index calculation
[0071]
[0072]
[0073] For the case of an imbalanced distribution of positive and negative samples, another evaluation method is needed: ROC curve. ROC curve can remain unchanged when there is an imbalance in the positive and negative samples. For example, when there are far more negative samples than positive samples in this method, ROC curve can well reflect the comprehensive index of sensitivity and specificity continuous variables. The calculation of ROC curve is represented by the following two variables:
[0074]
[0075]
[0076] FPR represents the proportion of all negative samples predicted as positive samples, also known as the false positive rate. TPR represents the proportion of all positive samples predicted as positive samples, also known as the true positive rate. For classification algorithms, the result of the general prediction is a probability value. A threshold can be set. If the prediction exceeds this value, it is predicted as one of the categories. If it does not exceed this threshold, it is defined as another category. Therefore, different thresholds, against different false positive rates and true positive rates, this curve is the ROC curve, and the area under the ROC curve is the AUC score. The performance indicators of the classifier are shown in Table 3, and the AUC curve is shown in Figure 3 shown.
[0077] Table 3 SVM quality classifier performance indicators
[0078]
[0079] The data set used in this example comes from the open source data set of BIG IDEAS. The participants collected PPG signals for 10 consecutive days using the wearable device Empatica E4 wristband with a sampling rate of 64Hz. The pulse wave signal was collected every 5 minutes using the Dexcom 6 continuous blood glucose monitor. First, the pulse wave data of 30 seconds before each blood glucose collection was extracted according to the time of each blood glucose collection to construct a preliminary data set, and then the algorithm described in this method was performed. The original PPG signal was collected as follows: Figure 4 Most pulse wave signals have a lot of noise, baseline drift, and distortion, and PPG signal quality judgment is required before subsequent processing.
[0080] The signal preprocessing stage includes: first, the original collected PPG signal is processed by wavelet thresholding to remove the high-frequency noise of the original signal; then the signal quality is divided by the SVM signal quality classifier, and the PPG signal classified as high-quality is retained; the pulse cycle of the PPG signal is obtained by locating the peak by the differential threshold method, and the PPG signal that meets the set threshold requirements is retained, and the others are eliminated, and finally a high-quality PPG signal is obtained, which is convenient for feature extraction and improves the accuracy of the model; finally, the trough of the PPG signal is fitted by cubic spline difference to obtain the baseline, and the baseline drift is subtracted to obtain the denoised and base drift-free PPG signal, such as Figure 5 shown.
[0081] After preprocessing the pulse wave signal, a total of 5752 PPG signals that meet the quality requirements are obtained. The differential threshold method is used to locate the trough of the PPG signal, divide it into individual pulse waves, and determine whether the length of a single pulse wave meets the set threshold requirements. If it does not meet the requirements, the corresponding pulse wave waveform features are extracted, as shown in Table 5. The energy features of the PPG signal are extracted, including Kaiser-Teager features and logarithmic entropy energy features, as shown in Table 4, to form the input feature vector, a total of 41-dimensional feature vectors.
[0082] The total extracted feature vector dimensions are large, containing 41 dimensions of data. Most features are linearly correlated or have little correlation with non-invasive blood glucose. Feature screening is required to improve the accuracy and stability of the model. This method uses xgboost to screen feature importance. The screening steps are:
[0083] (1) Standardize the extracted features and use xgboost to build a model of the full feature vector;
[0084] (2) Add features with high feature importance one by one to find the balance between model accuracy and feature quantity, and finally obtain a model with 10 features.
[0085] For the gradient boosting algorithm, after the boosting tree is created, the importance score of each attribute can be obtained relatively directly. The importance score measures the value of the feature in the model to improve the decision tree construction. The more a feature is used to build decision trees in the model, the higher the feature importance is. Using xgboost to obtain the top 10 feature vectors, such as Figure 7 As shown, the feature numbers are the same as Table 4 and Table 5.
[0086] Table 4 Pulse wave energy characteristics
[0087]
[0088] Table 5 Pulse wave characteristics
[0089]
[0090] In order to verify the specific number of feature parameters, add important features with high rankings in turn, build a model to check the effect, find the balance point where the model accuracy no longer improves after adding features, and finally get the optimal feature combination. Then, based on the data set of this feature combination, use the particle swarm BP neural network to train the model. In order to optimize the situation where the BP neural network is prone to fall into the local optimum, first select a small amount of data (5% of the data set) for the particle swarm to optimize the initial weights of the BP neural network. The remaining data set (95% of the data set) is divided into training set and test set according to 7:3; use the stochastic gradient descent method to train the BP neural network with the particle swarm initialized weights. The specific steps for training the particle swarm BP neural network are:
[0091] (1) First, the architecture of the BP neural network is determined according to the number of weights selected. The BP neural network architecture used in this method is a BP neural network with a single hidden layer and an input layer N in Related to the number of features selected, the output layer N out is 1, the hidden layer N hidden The size of N is determined by the input layer hidden =2×N in +1;
[0092] (2) Initialize particles according to the BP neural network architecture determined in step 1. The particles represent all weights of the BP neural network.
[0093] (3) Setting the fitness function as the root mean square error of the output value of the particle swarm as the BP neural network weight and the true blood glucose;
[0094] (4) Iterate the particle swarm algorithm until the error meets the requirement or the number of iterations reaches the upper limit, and obtain the BP neural network weights optimized by the particle swarm;
[0095] (5) Use the remaining data set to train the BP neural network with particle swarm optimization weights to obtain the pso-BP neural network.
[0096] The dataset after feature selection was trained on the PSO-BP model, and then the model performance indicators were evaluated from the mean absolute error (MAE), root mean square error (RMSE), and mean square error (MSE) (as shown in Table 6). The accuracy of the non-invasive blood glucose estimation model in the medical field was evaluated by combining Clarke grid error analysis, and then the consistency between the non-invasive blood glucose estimation model and the true blood glucose value was judged by Bland-Altman consistency analysis.
[0097] Table 6 PSO-BP model performance indicators
[0098]
[0099] Finally, the BP neural network optimized by particle swarm is used to build a model in the data set with selected features. Clark error grid analysis is as follows: Figure 8 As shown in the Bland-Altman consistency analysis, Fig. 9 shown.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A method for constructing a blood sugar prediction model based on signal energy characteristics and pulse cycle, characterized in that: The method specifically comprises the following steps: S1: remove high-frequency noise from the collected PPG signal; S2: Preliminary screening of PPG signal quality: The Kaiser-Teager energy features and logarithmic energy entropy features of the PPG signal after denoising in step S1 are extracted by the Kaise-Teager operator and entropy method, and the features are input into the SVM classifier to divide the signal quality into good and bad types; S3: accurately screening the good quality PPG signals preliminarily screened in step S2, screening out the signals whose pulse wave interval period does not meet the threshold setting, and removing them from the data set; S4: Based on the pulse wave waveform features, autoregressive coefficient, heart rate and signal energy features selected in step S3, a total of 39 features are combined with the features of the physiological parameters of the two human bodies to form a 41-dimensional feature vector; S5: Obtain the importance ranking of features according to the xgboost regressor, add the features with high importance in turn, and construct the blood glucose estimation dataset; S6: Input the data set constructed in step S5 into the particle swarm BP neural network to construct a non-invasive blood glucose estimation model.
2. The method for constructing a blood sugar prediction model according to claim 1, characterized in that: In step S2, the Kaiser-Teager energy feature extraction method is used to determine the instantaneous energy distribution of the signal to indicate whether the signal is noisy or clean; the sampling rate of the PPG signal is 64Hz, and the continuous blood glucose meter collects blood glucose values every 5 minutes. The PPG signal corresponding to the blood glucose value 30 seconds before each blood glucose collection is extracted, and the PPG signal S of a segment is W Contains 1920 points, divided into frames of length L frame =64 different frame signals S f (τ,n), where τ represents the different signals in each frame (τ=1,…,L frame ), n represents the frame number (n = 1, ..., 30), and the Kaiser-Teager feature KTE (τ, n) is calculated as follows: For each frame, KTE(τ,n)(τ=2,3,…,L frame -1), calculate the mean, variance, percentile and skewness, and combine the average values of all frames (n=1, 2, ..., 30) to obtain the Kaiser-Teager energy features of the four features.
3. The method for constructing a blood sugar prediction model according to claim 2, characterized in that: In step S2, the logarithmic energy entropy feature is a time domain entropy measure, which is calculated based on the full-band energy spectrum: The statistical characteristics of the logarithmic energy entropy sequence are calculated to obtain its mean, variance, and percentile, and three features are obtained.
4. The method for constructing a blood sugar prediction model according to claim 3, characterized in that: Step S3 specifically includes: obtaining the valley bottom of the preliminarily screened good quality PPG signal by the differential threshold method, fitting the baseline drift of the PPG signal by the cubic spline interpolation method, subtracting the baseline drift from the original signal, and obtaining the PPG signal with the baseline drift removed.
5. The method for constructing a blood sugar prediction model according to claim 3 or 4, characterized in that: Step S3 specifically includes: locating the peak and valley of the pulse wave by the differential value method, calculating the peak interval and valley interval as well as the number of peaks and valleys, setting the threshold within the heart rate range (50,140), and removing the signal that does not meet the threshold; the steps of the differential threshold method positioning are as follows: (1) Obtain the differential signal of the PPG signal and set the part less than zero to 0 to obtain the PPG diff ; (2) Obtaining PPG diff The maximum coordinates of peaks and calculate As a threshold condition for judging whether the maximum value is met; (3) Traverse and determine the maximum coordinates peaks, corresponding to the differential signal PPG diff (peaks)>diff mean , and the difference between the current maximum coordinates peaks(i)-peaks(i-1) meets the required heart rate range, then add the current peaks(i) to the final result of the peak value to obtain the filtered maximum coordinates peaks2; (4) There is an offset between the extreme value coordinate peaks2 and the peak value of the original PPG signal. Based on the differential extreme value peaks2, a backward search is performed for 1 / 3 of the heart rate cycle to obtain the peak coordinate rpeaks; (5) Remove the heavy rpeaks and finally get the peak value of the PPG signal; (6) Search forward 1 / 2 cycle based on the peak value rpeaks, obtain the coordinates of the minimum value and get the valleys.
6. The method for constructing a blood sugar prediction model according to claim 5, characterized in that: In step S4, the method for extracting the pulse wave waveform features is: first, according to the valley sequence of the pulse wave signal obtained by the differential threshold method in step S3, the pulse wave signal is divided into signals of a single pulse wave cycle; then, the pulse wave waveform features are extracted for the signal of each pulse wave cycle, and 25 features are obtained to form a feature vector.
7. The method for constructing a blood sugar prediction model according to claim 1, characterized in that: In step S4, the method for extracting the autoregressive coefficient is implemented through an autoregressive model. Specifically, the autoregressive model uses the point before the pulse wave p to predict the value of the current point, and obtains the coefficient of the autoregressive model to characterize the characteristics of the pulse wave; the autoregressive model is described by the following formula: Among them, S(τ,n) represents the τth value of the PPG signal of the nth frame, e(n) represents the error between the prediction and the actual value of the autoregressive model, p represents the regression order, AR i represents the coefficient of the autoregressive model, and b represents the bias term.
8. The method for constructing a blood sugar prediction model according to claim 1, characterized in that: In step S4, the 41-dimensional feature vector includes: 4 Kaiser-Teager energy features, 3 statistical features of logarithmic energy entropy sequences, 25 pulse wave waveform features, 6 autoregressive coefficient features, 1 heart rate feature, and 2 features of gender and glycated hemoglobin.
9. The method for constructing a blood sugar prediction model according to claim 8, characterized in that: Step S5 specifically includes: constructing an xgboost regressor to obtain the importance ranking of features, adding features in sequence, and checking the model indicators of the corresponding feature-constituting data sets until the performance indicators of the model are no longer improved; finally, a data set of 10 features is obtained; the steps of the feature importance ranking method include: S51: extracting feature vectors of 41 features from the filtered signals and constructing a data set; S52: Dataset is Z-score normalized; S53: Divide the standardized data into training set, validation set and test set in a ratio of 7:1:2, and obtain feature importance scores through xgboost; rank the features from high to low according to the feature importance scores; S54: According to the feature ranking obtained in S53, add the features with high rankings in turn, and then build the xgboost model to check the model accuracy of different numbers of features, and obtain the feature combination with the final optimal model accuracy.
10. The method for constructing a blood sugar prediction model according to claim 9, characterized in that: Step S6 specifically includes: S61: constructing a particle swarm BP neural network based on the data set constructed by importance ranking in step S54, firstly optimizing the weight of the BP neural network using the particle swarm algorithm, randomly selecting 5% of the data set, taking the error between the blood glucose predicted by the BP neural network and the actual blood glucose as the fitness function, and optimizing the weight of the BP neural network; S62: Using the optimized weights as the initial weight values of the BP neural network, the remaining 95% of the data set is divided into a training set, a validation set and a test set in a ratio of 7:1:2, and the BP neural network is trained to obtain a blood glucose estimation model.