A blood glucose monitoring method based on improved residual network and multi-expert model
By improving the combination of residual network and multi-expert model, the problems of insufficient feature extraction and low algorithm integration in blood glucose monitoring are solved, and high accuracy and reliability of blood glucose prediction are achieved, which is suitable for health monitoring and management of diabetic patients.
Patent Information
- Application Number
- CN202410901670.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The existing blood glucose monitoring methods have problems such as insufficient feature extraction, limited fusion methods and low algorithm integration, resulting in insufficient accuracy and reliability of blood glucose monitoring.
The blood glucose monitoring method based on improved residual network and multi-expert model is adopted, and the ECG signal is preprocessed and feature extraction is performed, combined with the space-pass convolution module of the channel reconstruction unit and the channel reconstruction unit, the features related to blood glucose levels are automatically extracted, and the stability and accuracy of prediction are improved through the fusion of multi-expert model.
Highly accurate and reliable blood sugar prediction is achieved, effectively reducing signal redundancy and improving the perception of blood sugar extreme points. The experimental results show that they perform well in the root mean square error and average absolute relative difference indicators.
Smart Images

Figure CN118749995B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blood sugar monitoring, and in particular to a blood sugar monitoring method based on an improved residual network and a multi-expert model. Background Art
[0002] Diabetes is a chronic metabolic disease that is becoming increasingly serious worldwide. Its pathogenesis is mainly due to insufficient secretion and defective action of insulin, which results in the body's inability to effectively regulate blood sugar levels. Long-term high blood sugar levels not only increase the risk of cardiovascular disease, but also damage organs such as the kidneys and eyes, while low blood sugar levels may lead to serious health problems. According to the International Diabetes Federation (IDF), the global prevalence of diabetes continues to rise, and it is estimated that by 2045, nearly 800 million people will be troubled by this disease. This trend not only brings a huge burden to patients' families, but also puts tremendous pressure on global health resources and economic development.
[0003] Blood glucose monitoring plays a vital role in diabetes management. Traditional blood glucose monitoring methods, such as finger-pricking blood sampling, are accurate but invasive and uncomfortable, and can only provide discrete blood glucose data points. In recent years, the emergence of continuous glucose monitors (CGMs) has provided a new means for diabetes management. This device can monitor blood glucose levels in real time and provide more comprehensive and continuous blood glucose data, which helps to optimize treatment plans and improve management effectiveness. However, the high cost, limited service life, and accuracy of CGMs that are affected by multiple factors limit their widespread application. Therefore, the development of a low-cost, convenient, and accurate non-invasive blood glucose monitoring method is of urgent and important significance for improving diabetes management effectiveness and improving the quality of life of patients.
[0004] In the prior art, such as the multi-mode fusion blood glucose monitoring method based on ECG and PPG disclosed in patent application No. 202211039536.5, researchers have tried to use electrocardiogram (ECG) signals and photoplethysmogram (PPG) signals for non-invasive blood glucose monitoring. There is a close correlation between ECG signals and blood glucose levels, because blood glucose fluctuations stimulate the autonomic nervous system, which in turn affects the physiological activity of the heart, causing changes in ECG waveform characteristics. The PPG signal reflects changes in blood volume and can also indirectly reflect blood glucose levels. The feature extraction and analysis of these signals have become the key to achieving non-invasive blood glucose monitoring. However, the accuracy of blood glucose monitoring using only ECG signals or PPG signals is low, and there are problems of noise interference and redundant information in the feature extraction process.
[0005] Some studies have proposed methods based on multimodal fusion to monitor blood glucose by combining ECG and PPG signals. These methods improve the accuracy of blood glucose monitoring by extracting time series statistical features and spatial morphological features and performing multi-level fusion at the data level, feature level, and decision level. However, the existing methods still have the following shortcomings:
[0006] Insufficient feature extraction: Existing methods fail to fully eliminate the redundant information of the signal during the feature extraction process, which affects the accuracy of feature extraction.
[0007] Limited fusion methods: Most methods only perform fusion at the data level or feature level, failing to fully exploit the advantages of multimodal signals.
[0008] The algorithm integration is not high: Existing methods usually use a single algorithm for blood glucose prediction and lack the comprehensive use of multiple algorithm results, which affects the stability and accuracy of the prediction.
[0009] Therefore, the field of blood glucose monitoring technology urgently needs a new technical solution to provide a more accurate, reliable and non-invasive blood glucose monitoring method to effectively address the above technical challenges and improve the health management of diabetic patients. Summary of the invention
[0010] The purpose of the present invention is to provide a blood glucose monitoring method based on an improved residual network and a multi-expert model, aiming to achieve more accurate and effective blood glucose monitoring.
[0011] To achieve the above object, the present invention provides the following technical solution: a blood glucose monitoring method based on an improved residual network and a multi-expert model, comprising the following steps:
[0012] S1. Preprocessing the original electrocardiogram signal, performing noise reduction and segmentation on the original electrocardiogram signal by wavelet transform, and extracting the effective electrocardiogram signal from the signal;
[0013] S2. inputting the processed effective electrocardiogram signal into an improved residual network model, wherein the improved residual network model includes a space-pass convolution module that introduces a space reconstruction unit and a channel reconstruction unit to automatically extract features related to blood glucose levels;
[0014] S3. Divide the data set into different blood sugar categories according to the blood sugar value, and train expert models for feature extraction for the blood sugar categories respectively to capture the changing rules of the effective electrocardiogram signal under different blood sugar levels. The specific steps include:
[0015] S301. Acquire a large number of data sets containing the valid electrocardiogram signals and corresponding blood glucose values;
[0016] S302. According to the range of the blood glucose value, the data set is divided into three blood glucose categories: hypoglycemia, normal blood glucose and hyperglycemia;
[0017] S303. For each of the blood sugar category data sets, an expert model for the blood sugar category is trained respectively. The expert model is a feature extraction model based on deep learning, which can automatically learn and extract the effective electrocardiogram signal features under the category, and optimize the model parameters through the back propagation algorithm, so that it can accurately capture the change law of the effective electrocardiogram signal under the blood sugar category;
[0018] S4. After preprocessing, the real-time effective electrocardiogram signal of the subject is input into the expert models of different blood glucose categories respectively, and the features extracted by each expert model are obtained respectively; the features extracted by multiple different expert models are fused to form a comprehensive feature vector through feature combination method; the comprehensive feature vector is input into the random forest model for regression prediction to obtain the blood glucose monitoring result.
[0019] Preferably, the spatial reconstruction unit in the improved residual network model is used to separate and reconstruct the spatial features of the effective electrocardiogram signal to eliminate spatial redundancy; the channel reconstruction unit in the improved residual network model is used to segment, convert and fuse the channel features of the effective electrocardiogram signal to eliminate channel redundancy.
[0020] Preferably, the step of preprocessing the original electrocardiogram signal specifically includes: reconstructing the original electrocardiogram signal by discrete wavelet transform by setting a threshold of wavelet transform, decomposing the original electrocardiogram signal into nine levels, extracting time statistical features from different dimensions and scales, separating noise components from the effective electrocardiogram signal, and the specific discrete wavelet transform reconstruction formula is:
[0021]
[0022] Among them, cA1[n] is the first-level approximation coefficient, which represents the low-frequency component of the signal; cD1[n] is the first-level detail coefficient, which represents the high-frequency component of the signal; n is the index of the wavelet coefficient, indicating that the current calculation is the nth wavelet coefficient; in x[2n-k], x represents the original ECG signal; 2n represents the decimation of the original signal, 2 represents the decimation factor, and the decimation operation will cause the signal to be downsampled by half, and k represents the index of the filter coefficient; g[k] is the coefficient of the low-pass filter, which is used to extract the low-frequency component of the signal; h[k] is the coefficient of the high-pass filter, which is used to extract the high-frequency component of the signal; K represents the length of the filter, and K-1 represents the index of the last coefficient of the filter.
[0023] Preferably, the separation operation of the spatial reconstruction unit specifically includes: using the scaling factor of the group normalization GN layer to evaluate the effective electrocardiogram signal of different feature maps, specifically, given an intermediate feature map X, the output feature Xout standardized by subtracting the mean value μ and dividing by the standard deviation σ, the calculation formula is as follows:
[0024]
[0025] Among them, GN is group normalization, X is the intermediate feature map input feature, μ is the mean, σ is the standard deviation, ε is a small positive constant added to ensure the stability of division, γ is the adjustment of the feature after normalization, allowing the model to flexibly adjust the scale of the feature on the basis of normalization; β is the adjustment of the feature after normalization, allowing the model to flexibly adjust the offset of the feature on the basis of normalization.
[0026] Preferably, the reconstruction operation of the spatial reconstruction unit adopts a cross reconstruction operation to deeply fuse the information features of the two different effective electrocardiogram signals after weighted processing, thereby strengthening the information flow between them, and then the two feature maps X obtained by the cross reconstruction are w1 and X w2 Splice to generate a spatial fine feature map X w .
[0027] Preferably, for the intermediate feature map X processed by each bottleneck residual block in the improved residual network model, the specific processing process includes:
[0028] Processing the intermediate feature map X by the spatial reconstruction unit, the spatial reconstruction unit identifies and distinguishes the feature map of the effective electrocardiogram signal and eliminates spatial redundancy by refined processing;
[0029] The spatial fine feature map X w The information is sent to the channel reconstruction unit for processing, wherein the channel reconstruction unit adopts a segmentation-conversion-fusion method and adaptively merges information from different channels.
[0030] Preferably, the reconstruction operation of the channel reconstruction unit in the improved residual network model includes the following steps:
[0031] Performing global context extraction on each channel of the input valid electrocardiogram signal, and obtaining global context information through a global average pooling operation;
[0032] Perform point-by-point convolution on the extracted global context information to generate channel weights;
[0033] Performing weighted processing on each channel of the input valid electrocardiogram signal by adaptive weighting to enhance information interaction and fusion between different channels;
[0034] The weighted channel feature maps are fused to generate the reconstructed effective electrocardiogram signal.
[0035] Preferably, the expert model includes the improved residual network model, convolutional neural network model, long short-term memory network model and / or support vector machine.
[0036] Preferably, the step of fusing the features extracted by the multiple different expert models to form a comprehensive feature vector by a feature combination method specifically includes:
[0037] Calculating the prediction error of each of the expert models in the data set, the error indicators including mean square error, mean absolute error and mean absolute percentage error;
[0038] According to the error performance of each expert model on the data set, the weight of each expert model is calculated using the inverse error weighting method. The specific formula is:
[0039]
[0040] All weights are then normalized to ensure that the sum of the weights is 1;
[0041] Multiplying the output feature of each of the expert models by a corresponding weight to obtain a weighted feature vector;
[0042] All the weighted feature vectors are added together to form a final comprehensive feature vector.
[0043] Preferably, the operation of the random forest model comprises the following steps:
[0044] The fused comprehensive feature vector is input into the random forest model;
[0045] During the training process, the random forest model is trained using the data set, wherein the random forest model is composed of a plurality of decision trees, and each decision tree is trained using a different feature subset and sample subset;
[0046] During the prediction process, the comprehensive feature vector of the subject is input into the trained random forest model, and the prediction results of all the decision trees are voted or averaged to obtain the final blood glucose prediction value.
[0047] Beneficial effects: The present invention proposes a blood glucose monitoring method based on an improved residual network and a multi-expert model, which realizes blood glucose prediction with high accuracy and reliability through electrocardiogram signals. In order to solve the problem of insufficient feature extraction of electrocardiogram signals, a space-pass convolution module including a spatial reconstruction unit and a channel reconstruction unit is designed to effectively reduce signal redundancy. The spatial reconstruction unit suppresses spatial redundancy through separation reconstruction, and the channel reconstruction unit eliminates channel redundancy through split transformation fusion. The space-pass convolution module enhances the ability to capture key features from complex electrocardiogram signals and improves the robustness of the model in a changing physiological environment. The multi-expert model takes advantage of multi-mode signals and fuses multiple expert models to capture the complex relationship between electrocardiogram signals and blood glucose levels, thereby improving the perception of blood glucose extreme points. The experimental results show that this method performs well in terms of root mean square error and mean absolute relative difference indicators, proving its effectiveness in the field of blood glucose monitoring and providing precise support for health monitoring and management of diabetic patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a schematic diagram of the structure of the blood glucose monitoring method according to an embodiment of the present invention;
[0049] Figure 2 This is a flow chart of a blood glucose monitoring method according to an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of electrocardiogram signal denoising based on wavelet transform according to an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram of an improved residual network model according to an embodiment of the present invention;
[0052] Figure 5 This is a schematic diagram of a space reconstruction unit according to an embodiment of the present invention;
[0053] Figure 6 This is a schematic diagram of a channel reconstruction unit according to an embodiment of the present invention;
[0054] Figure 7 This is a schematic diagram of a blood glucose monitoring model based on random forest according to an embodiment of the present invention;
[0055] Figure 8 A line comparison chart of the blood sugar monitoring effect according to an embodiment of the present invention;
[0056] Fig. 9 This is a comparison diagram of the CEGA error grid analysis described in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] See also Figures 1 to 7 The present invention provides a blood glucose monitoring method based on an improved residual network and a multi-expert model, comprising the following steps:
[0059] S1. Preprocessing the original electrocardiogram (ECG) signal, performing noise reduction and segmentation on the original electrocardiogram signal by wavelet transform, and extracting the effective electrocardiogram signal from the signal;
[0060] Reference Figure 3 , which is a schematic diagram of electrocardiogram signal denoising based on wavelet transform provided by the present invention, comprising:
[0061] During the acquisition process of the original electrocardiogram signal, the original electrocardiogram signal is often mixed with a large amount of noise components due to physiological motion artifacts (such as body movement and breathing), noise pollution in the surrounding environment, and noise generated by the data acquisition equipment (such as electrodes and cables) itself. These noises not only distort the waveform characteristics of the electrocardiogram signal, but also reduce the signal-to-noise ratio of the signal, which has an adverse effect on the subsequent cardiac electrical activity analysis and clinical diagnosis. In order to eliminate these noise interferences, the present invention first uses a finite impulse response low-pass filter with a cutoff frequency of 40Hz and a high-pass filter with a cutoff frequency of 0.5Hz to pre-process the original electrocardiogram signal. The main purpose of this step is to eliminate baseline drift, power line interference and motion artifact noise, and provide a relatively pure signal basis for subsequent wavelet transform denoising.
[0062] Next, the present invention uses wavelet transform to denoise the original electrocardiogram signal after preprocessing. When selecting the wavelet basis function, considering the characteristics of the original electrocardiogram signal and the characteristics of the noise, sym4 is selected as the mother wavelet function. The sym4 wavelet function can more effectively extract the characteristic information in the original electrocardiogram signal due to its good symmetry and regularity, while suppressing the interference of noise. By setting a suitable threshold, the threshold is set to 0.2, which can achieve the best separation of noise and signal.
[0063] The step of preprocessing the original electrocardiogram signal specifically includes: reconstructing the original electrocardiogram signal by discrete wavelet transform by setting the threshold of wavelet transform, decomposing the original electrocardiogram signal into nine levels, and reconstructing the signal by discrete wavelet transform (DWT) using different detail coefficients from CD1 to CD9 to obtain a denoised pure electrocardiogram signal; extracting time statistical features from different dimensions and scales, separating the noise component from the effective electrocardiogram signal, and the specific discrete wavelet transform reconstruction formula is:
[0064]
[0065] Among them, cA1[n] is the first-level approximation coefficient, which represents the low-frequency component of the signal; cD1[n] is the first-level detail coefficient, which represents the high-frequency component of the signal; n is the index of the wavelet coefficient, indicating that the current calculation is the nth wavelet coefficient; in x[2n-k], x represents the original ECG signal; 2n represents the decimation of the original signal, 2 represents the decimation factor, and the decimation operation will cause the signal to be downsampled by half, and k represents the index of the filter coefficient; g[k] is the coefficient of the low-pass filter, which is used to extract the low-frequency component of the signal; h[k] is the coefficient of the high-pass filter, which is used to extract the high-frequency component of the signal; K represents the length of the filter, and K-1 represents the index of the last coefficient of the filter.
[0066] S2. Inputting the processed effective electrocardiogram signal into an improved residual network model SC_Resnet, wherein the improved residual network model includes a space-pass convolution module SCConv that introduces a space reconstruction unit and a channel reconstruction unit to automatically extract features related to blood glucose levels;
[0067] Reference Figure 4 The residual network model SC_Resnet architecture comprehensively optimizes the feature extraction process of the electrocardiogram signal by fusing the spatial reconstruction unit (SRU) and the channel reconstruction unit (CRU) in a sequential manner and effectively combining them with the residual network Resnet. In the residual network model SC_Resnet, the residual network Resnet, as the basic architecture, provides powerful feature extraction capabilities. In particular, its deep structure enables the network to learn the deep features of the electrocardiogram signal, while the residual connection effectively alleviates the gradient vanishing problem and ensures the training stability of the network.
[0068] The introduction of the spatial reconstruction unit SRU and the channel reconstruction unit CRU is an important innovation of the present invention. For the intermediate feature map X processed by each bottleneck residual block in the residual network Resnet, it is first processed by the spatial reconstruction unit SRU. The spatial reconstruction unit SRU can distinguish between feature maps with rich information and feature maps with less information in spatial content, eliminate spatial redundancy through refined processing, and highlight key spatial details. This step is crucial for capturing tiny waveform, frequency or amplitude changes in electrocardiogram signals, which helps the model to more accurately identify features related to blood sugar levels.
[0069] Then, the spatial fine feature map X w The signals are sent to the channel reconstruction unit CRU for further processing. The channel reconstruction unit CRU adopts the segmentation-conversion-fusion method to effectively eliminate channel redundancy and adaptively merge information from different channels. This step enhances the model's understanding of the correlation and complementarity between different channels in the electrocardiogram signal, and further improves the discriminability of the features.
[0070] The design of the space-pass convolution module cleverly integrates the information of the spatial dimension and the channel dimension, allowing the network to focus on both the local details and the global pattern of the ECG signal. This feature enables the space-pass convolution module to more effectively extract key information closely related to blood sugar levels, thereby improving the performance of the model.
[0071] The design of the space-pass convolution module in the present invention is an innovative convolution structure design, which can be used in combination with the space reconstruction unit and the channel reconstruction unit to enhance the analysis of electrocardiogram (ECG) signals.
[0072] The space-pass convolution module, by combining the functions of the spatial reconstruction unit and the channel reconstruction unit, can achieve in-depth analysis of the ECG signal in the network, focusing on both local and global features. The design of the space-pass convolution module enables it to identify and extract key information features in the ECG signal that are related to changes in blood glucose levels, such as heart rate variability or other physiological indicators. By extracting this key information more effectively, the space-pass convolution module helps to improve the accuracy and reliability of the model in predicting or monitoring blood glucose levels.
[0073] By combining the deep structure of the residual network, the spatial refinement capability of the spatial reconstruction unit, and the channel refinement capability of the channel reconstruction unit, the space-pass convolution module architecture can more comprehensively understand the complex information in the ECG signal and accurately capture the subtle changes related to blood sugar levels. This design not only improves the performance of the model, but also provides strong support for its practical application in medical fields such as blood sugar level monitoring.
[0074] Reference Figure 5In order to effectively eliminate the spatial redundancy of features, the spatial reconstruction unit SRU is introduced, such as Figure 3 As shown, the core of the spatial reconstruction unit is to implement separation and reconstruction operations. The purpose of the separation operation is to separate the feature map with rich information from the feature map with less information corresponding to the spatial content. The separation operation of the spatial reconstruction unit specifically includes: using the scale factor of the group normalization GN layer to evaluate the effective ECG signal of different feature maps, specifically, given an intermediate feature map X, the output feature Xout is standardized by subtracting the mean value μ and dividing by the standard deviation σ, and the calculation formula is as follows:
[0075]
[0076] Among them, GN is group normalization, X is the intermediate feature map input feature, μ is the mean, σ is the standard deviation, ε is a small positive constant added to ensure the stability of division, γ is the adjustment of the feature after normalization, allowing the model to flexibly adjust the scale of the feature on the basis of normalization; β is the adjustment of the feature after normalization, allowing the model to flexibly adjust the offset of the feature on the basis of normalization.
[0077] The trainable parameters γ∈R in the GN layer C Used to evaluate the spatial pixel variance of each batch and channel. When the spatial information is richer, it means that the spatial pixels change more dramatically, which usually leads to a larger value of γ. In order to quantify the importance of different feature maps, the normalized correlation weight W is introduced γ ∈R C , obtained by the following formula:
[0078]
[0079] Next, for the W γ The re-weighted feature maps are further processed. Specifically, these weights are mapped to the (0,1) range through the sigmoid function, and a threshold is introduced to perform the gating mechanism. When the weight exceeds this threshold, it is set to 1 to obtain the informative weight W1; when the weight is below the threshold, it is set to 0 to obtain the non-informative weight W2. In the experiment, the threshold is set to 0.5 to balance the weight distribution of informative and non-informative features. The whole process of obtaining W can be expressed by the following formula "
[0080] W=Gate(Sigmoid(W γ (GN(X))))
[0081] Finally, the input feature X is multiplied by W1 and W2 respectively to obtain two feature maps with different weights: and Specifically, It gathers the original features with large amounts of information and strong expressiveness, which is closely related to the subsequent feature extraction and model performance. It contains features with less information and weaker expressiveness, which are largely considered redundant and contribute less to the model. Through such processing, the input feature X is successfully divided into two parts with different information content, which provides strong support for subsequent feature reconstruction and model optimization.
[0082] The reconstruction operation is a key step in the spatial reconstruction unit, which aims to combine features with rich information with features with less information to generate a feature map containing richer information. The reconstruction operation of the spatial reconstruction unit adopts a cross reconstruction operation to deeply fuse the information features of the two different effective electrocardiogram signals after weighted processing, thereby strengthening the information flow between them, and then the two feature maps X obtained by the cross reconstruction are combined. w1 and X w2 Splice to generate a spatial fine feature map X w This process not only retains the important information in the original features, but also further improves the richness and expressiveness of the features through cross-reconstruction, laying a solid foundation for subsequent feature extraction and model performance improvement. The entire reconstruction operation is expressed as follows:
[0083]
[0084] S3. Divide the data set into different blood sugar categories according to the blood sugar value, and train expert models for feature extraction for the blood sugar categories respectively to capture the changing rules of the effective electrocardiogram signal under different blood sugar levels. The specific steps include:
[0085] S301. Acquire a large number of data sets containing the valid electrocardiogram signals and corresponding blood glucose values;
[0086] S302. According to the range of the blood glucose value, the data set is divided into three blood glucose categories: hypoglycemia, normal blood glucose and hyperglycemia;
[0087] S303. For each of the blood sugar category data sets, an expert model for the blood sugar category is trained respectively. The expert model is a feature extraction model based on deep learning, which can automatically learn and extract the effective electrocardiogram signal features under the category, and optimize the model parameters through the back propagation algorithm, so that it can accurately capture the change law of the effective electrocardiogram signal under the blood sugar category;
[0088] S4. After preprocessing, the real-time effective electrocardiogram signal of the subject is input into the expert models of different blood glucose categories respectively, and the features extracted by each expert model are obtained respectively; the features extracted by multiple different expert models are fused to form a comprehensive feature vector through feature combination method; the comprehensive feature vector is input into the random forest model for regression prediction to obtain the blood glucose monitoring result.
[0089] Preferably, the spatial reconstruction unit in the improved residual network model is used to separate and reconstruct the spatial features of the effective electrocardiogram signal to eliminate spatial redundancy; the channel reconstruction unit in the improved residual network model is used to segment, convert and fuse the channel features of the effective electrocardiogram signal to eliminate channel redundancy.
[0090] Preferably, for the intermediate feature map X processed by each bottleneck residual block in the improved residual network model, the specific processing process includes:
[0091] Processing the intermediate feature map X by the spatial reconstruction unit, the spatial reconstruction unit identifies and distinguishes the feature map of the effective electrocardiogram signal and eliminates spatial redundancy by refined processing;
[0092] The spatial fine feature map X w The information is sent to the channel reconstruction unit for processing, wherein the channel reconstruction unit adopts a segmentation-conversion-fusion method and adaptively merges information from different channels.
[0093] Reference Figure 6 In order to eliminate the channel redundancy of features and improve the representation ability of the model, the channel reconstruction unit CRU is introduced. The channel reconstruction unit adopts a unique segmentation-conversion-fusion method, such as Figure 6 As shown, in the segmentation operation, the input space is first refined into features X w It is divided into two complementary parts: one part contains αC channels, and the other part contains the remaining (1-α)C channels. α is a hyperparameter and 0≤α≤1, which allows flexible adjustment of channel allocation according to task requirements. Next, the number of channels of the two sets of features is compressed using a 1*1 convolution kernel to obtain the compressed feature map X up and X low , which helps to reduce the computational burden of the model while retaining key information.
[0094] In the conversion operation, the input X up As the input of "Rich Feature Extraction", rich context information is extracted by applying global context (GWC) and point-wise convolution (PWC), and then the results of these two operations are added to obtain the output Y1.low As a supplementary input for “rich feature extraction”, it is processed only by PWC, and the result is combined with the original input to obtain Y2.
[0095] Finally, in the fusion operation, Y1 and Y2 are merged in an adaptive manner. Specifically, first, the global average pooling technique is used to extract the global spatial information and channel statistics of Y1 and Y2 to obtain pooled S1 and S2. Then Softmax is performed on S1 and S2 to obtain feature weight vectors β1 and β2. These weight vectors reflect the importance of different feature maps in the final output. Finally, the feature weight vector is used to perform a weighted summation of Y1 and Y2 to obtain the output Y=β1Y1+β2Y2, where Y is the channel-refined feature. This output Y is the channel-refined feature, which fuses the information of different channels and eliminates redundancy, thereby improving the expressiveness and performance of the model.
[0096] The reconstruction operation of the channel reconstruction unit in the improved residual network model includes the following steps:
[0097] Performing global context extraction on each channel of the input valid electrocardiogram signal, and obtaining global context information through a global average pooling operation;
[0098] Perform point-by-point convolution on the extracted global context information to generate channel weights;
[0099] Performing weighted processing on each channel of the input valid electrocardiogram signal by adaptive weighting to enhance information interaction and fusion between different channels;
[0100] The weighted channel feature maps are fused to generate the reconstructed effective electrocardiogram signal.
[0101] Preferably, the expert model includes the improved residual network model, convolutional neural network model, long short-term memory network model and / or support vector machine.
[0102] Preferably, the step of fusing the features extracted by the multiple different expert models to form a comprehensive feature vector by a feature combination method specifically includes:
[0103] Calculating the prediction error of each of the expert models in the data set, the error indicators including mean square error, mean absolute error and mean absolute percentage error;
[0104] According to the error performance of each expert model on the data set, the weight of each expert model is calculated using the inverse error weighting method. The specific formula is:
[0105]
[0106] All weights are then normalized to ensure that the sum of the weights is 1;
[0107] Multiplying the output feature of each of the expert models by a corresponding weight to obtain a weighted feature vector;
[0108] All the weighted feature vectors are added together to form a final comprehensive feature vector.
[0109] Preferably, the operation of the random forest model comprises the following steps:
[0110] The fused comprehensive feature vector is input into the random forest model;
[0111] During the training process, the random forest model is trained using the data set, wherein the random forest model is composed of a plurality of decision trees, and each decision tree is trained using a different feature subset and sample subset;
[0112] During the prediction process, the comprehensive feature vector of the subject is input into the trained random forest model, and the prediction results of all the decision trees are voted or averaged to obtain the final blood glucose prediction value.
[0113] Reference Figure 7 As an integrated learning algorithm, random forest improves the performance of blood glucose monitoring by constructing multiple decision trees and combining their outputs. The core idea of this model is to use the bagging strategy to form multiple different sub-datasets by randomly sampling the original data set. A decision tree model is built on each sub-dataset. This strategy not only enhances the generalization ability of the model, but also effectively reduces the overfitting phenomenon, thereby improving the stability and reliability of blood glucose monitoring. In the process of model construction, two important randomness principles are followed: data randomness and feature randomness. Data randomness is achieved through random sampling with replacement, ensuring that each decision tree model is trained based on a different data subset, improving the diversity of the model. Feature randomness is to randomly select a part of the features in each sub-dataset for modeling, so that each feature has the potential to become a key feature, further enhancing the generalization ability of the model.
[0114] In the medical field, especially in the analysis of ECG signals, the model of the present invention has shown significant advantages. By using random forests to classify and regress ECG signals, different types of arrhythmias can be accurately identified, and blood sugar levels can be accurately predicted based on the characteristics of ECG signals. This regression prediction method not only helps to detect abnormal blood sugar fluctuations in a timely manner, but also provides strong support for personalized treatment plans for diabetic patients.
[0115] In the present invention, the individual blood glucose values are firstly classified into three different categories: L, M, and H. This step helps to better understand and analyze the data distribution and feature performance under different blood glucose states, and provides a strong basis for subsequent analysis and prediction. Subsequently, based on the coarse classification, the random forest algorithm is further applied to perform regression prediction for the data of each category. By making full use of the advantages of the random forest algorithm in processing a large number of features and nonlinear relationships, the complex pattern of blood glucose changes can be captured more accurately, and a robust prediction model can be constructed accordingly.
[0116] Experimental verification example:
[0117] In order to verify and compare the performance of the random forest-based blood glucose monitoring model proposed in the present invention, the D1NAMO data set is used for experimental verification. The following are the specific implementation steps and processes.
[0118] 1. Dataset introduction and selection
[0119] In recent years, with the rapid development of science and technology, wearable devices have been increasingly used in the field of healthcare, especially in the management of chronic diseases. Among them, diabetes, as a common chronic disease, has always been a hot topic of research for its monitoring and control. Although wearable sensors are usually not comparable to medical-grade devices in terms of data quality, their real-time and convenience under non-clinical conditions give them unique advantages in practical applications. The D1NAMO dataset is a publicly available multimodal dataset that truly reflects the physiological state of patients under non-clinical conditions, including multiple physiological parameters such as electrocardiogram (ECG) signals, respiratory signals, and accelerometer outputs, as well as glucose level information and annotated food images. The D1NAMO dataset was selected as the source of experimental data, mainly based on its importance and applicability in blood glucose monitoring research. In addition, the D1NAMO dataset is divided into two subsets, which are used to collect data from healthy people and diabetic patients respectively. The first subset covers the data of 20 healthy people, providing a reference standard under normal physiological conditions; while the second subset contains the data of 9 diabetic patients, providing valuable data support for a deep understanding of the physiological characteristics and disease changes of diabetic patients.
[0120] 2. Dataset construction and classification
[0121] Key ECG signals and corresponding blood glucose values were extracted from the D1NAMO dataset as experimental data. Specifically, data from 11 subjects were selected from 29 subjects, including data from 5 diabetic patients and 5 healthy individuals as training sets to ensure that the model can fully learn the ECG signal characteristics under different blood glucose states. The data of another diabetic patient was used as a test set to evaluate the performance of the model. In order to better understand and analyze the data distribution and feature performance under different blood glucose states, the experimental data were classified according to blood glucose values. The specific classification criteria are shown in Table 1. Individuals with blood glucose values less than 6.0mmol / L are classified as low blood glucose levels (L), individuals with blood glucose values between 6.0 and 11.1mmol / L are classified as medium blood glucose levels (M), and individuals with blood glucose values greater than 11.1mmol / L are classified as high blood glucose levels (H).
[0122] Table 1 Blood sugar classification standards
[0123]
[0124] According to this classification standard, the experimental data are divided into three categories, which provides a strong basis for subsequent analysis and prediction.
[0125] 3. Visualization of blood glucose monitoring results
[0126] In order to more intuitively demonstrate the actual effect of the method proposed in the present invention on blood glucose monitoring, visualization processing is performed, and corresponding line graphs and CEGA error grid analysis graphs are drawn. The following are specific implementation steps and result analysis.
[0127] First, focus on Figure 8 Line chart analysis. Figure 8 (a) shows the comparison between blood glucose prediction and true value when the multi-expert concept is not adopted. It can be observed that the blue line can fit the red curve more closely in most cases, which reflects that the overall performance of the model in blood glucose prediction is relatively ideal. The blue points represent the blood glucose values predicted by the model, while the red points represent the actual blood glucose values. However, it is noted that in the case of some extreme blood glucose values, the blue curve does not completely fit the red curve, which indicates that the model's prediction ability in dealing with extreme blood glucose values still needs to be improved. In order to overcome this limitation, the multi-expert concept is further introduced, and Figure 8 The corresponding results are shown in (b). Through comparative analysis, it can be clearly seen that after the introduction of the multi-expert idea, the fitting effect of the blue line with the red curve at the extreme point has been significantly improved. This improvement not only proves the effectiveness of the multi-expert idea in improving blood glucose monitoring performance, but also provides a more reliable and accurate blood glucose prediction method.
[0128] Steering Fig. 9CEGA error grid analysis comparison chart. This chart evaluates the accuracy of blood glucose prediction by dividing it into different areas. Zone A represents the safe zone, that is, the deviation between the predicted blood glucose value and the actual blood glucose value is within an acceptable range and no additional clinical intervention is required. Zone B represents the clinically acceptable zone. Although there is a certain deviation between the predicted value and the actual value, these deviations will not lead to serious clinical consequences. By comparing Fig. 9 In a and b, it can be found that after the introduction of multi-expert thinking, the blood glucose prediction values are more distributed on the diagonal line in area A. This change not only shows that the prediction results are more accurate, but also further confirms the advantages of multi-expert thinking in improving blood glucose monitoring performance.
[0129] 4. Comparative Experiment
[0130] To verify the performance of the blood glucose monitoring model of the present invention, the effects are compared with the following five baseline methods: 1) CDA, i.e., Convolutional Denoising Autoencoder;
[0131] 2) ResNets, or Residual Networks;
[0132] 3) CNN-RNN, which is a method combining convolutional neural networks and recurrent neural networks (Convolutional Neural Networks and Recurrent Neural Networks);
[0133] 4) CNN-MFVW, i.e. Convolutional Neural Networks with Multisegment Fusion and Varied-Weight;
[0134] 5) SFF-WCIM, namely Spatiotemporal Features Fusion and Weight-based Choquet Integral Multi-Model.
[0135] According to the data comparison in Table 2, it can be clearly seen that the model proposed in the present invention shows obvious advantages in the experimental results, and its performance is superior to that of the other five network models. Among them, RMSE and MARD, as important evaluation indicators for measuring prediction accuracy in regression algorithms, both show that the error between the predicted value and the true value of the model of the present invention is smaller. Specifically, compared with the unimproved ResNets model, the SC_Resnet model of the present invention is reduced by 0.31mmol / L in RMSE and 3.96% in MARD, proving that this improvement effectively improves the accuracy of blood sugar prediction. In addition, in order to evaluate the performance of the model more comprehensively and in depth, the CEGA error grid analysis diagram is further adopted, and the distribution of blood sugar prediction values is evaluated by carefully analyzing the proportions of Zone A, Zone B and Zone A+B. Among them, Zone A is a safe zone, and its proportion directly indicates the reliability of the model in predicting blood sugar status. Compared with the unimproved ResNets model, the model of the present invention has increased the proportion of Zone A by 14.78%. This significant increase in proportion not only proves the superiority of the model of the present invention in blood glucose monitoring, but also further reflects its powerful ability to deal with extreme blood glucose values. In addition, compared with SFF-WCIM, which also extracts deep ECG features and inputs them into the machine learning model, the SC_Resnet model of the present invention also shows obvious advantages. In terms of RMSE, the model of the present invention reduced by 0.24mmol / L, and in terms of MARD, it reduced by 2.16%. In terms of the proportion of Zone A, the model of the present invention increased by 9.87% compared with SFF-WCIM. This comparison result not only highlights the advantages of the model of the present invention in feature extraction, but also further proves the effectiveness of the multi-expert idea in improving model performance. Through the idea of multiple experts, the model can capture and analyze ECG features more comprehensively, thereby improving the accuracy of blood glucose prediction.
[0136] Table 2 Comparative experiment
[0137]
[0138] 5. Ablation Experiment
[0139] In order to further verify the performance of each module of the model and comprehensively evaluate the impact of different modules and methods on blood glucose prediction, the present invention conducted detailed ablation experiments to ensure the accuracy and reliability of the model in blood glucose monitoring.
[0140] 1) RF: Only the random forest algorithm (RF) is used to perform regression training on the denoised ECG signals to predict the corresponding blood glucose values.
[0141] 2) Res+RF: First, the Resnet model is used to extract the features of the ECG signal, and then these features are input into the random forest model for regression prediction.
[0142] 3) S_Res+RF: Combine the spatial reconstruction unit (SRU) with the Resnet model, and then use the improved model to extract ECG features and input them into random forest for regression prediction.
[0143] 4) C_Res+RF: Combine the channel reconstruction unit (CRU) with the Resnet model, and then use the improved model to extract ECG features and input them into random forest for regression prediction.
[0144] 5) SC_Res+RF: Combine the empty convolution module (SCConv) with the Resnet model, and further use the improved model to extract ECG features and input them into random forest for regression prediction.
[0145] 6) M+SC_Res+RF: Based on SC_Res+RF, the idea of multiple experts is introduced. After extracting multiple expert features, they are input into the random forest model for regression prediction.
[0146] Based on the experimental data shown in Table 3, the impact of different methods on blood glucose prediction performance was deeply analyzed, and a series of important conclusions were drawn. First, compared with the method that relies solely on the random forest algorithm for blood glucose prediction, it is observed that the prediction performance can be effectively improved by introducing the Resnet model algorithm to extract deep ECG features and then inputting these features into the random forest for regression prediction. Specifically, RMSE was reduced by 0.15mmol / L, MARD was reduced by 1.54%, and the proportion of Zone A increased by 3.43%. This result shows that the Resnet model has significant advantages in extracting ECG features, and can more effectively capture key information in ECG signals, thereby improving the accuracy of blood glucose prediction.
[0147] Furthermore, the Resnet model was improved, and the performance differences before and after the improvement were compared. Experimental data show that whether the spatial reconstruction unit SRU or the channel reconstruction unit CRU, or the combination of the two SCConv, the improved model has improved performance. Specifically, compared with the Res model before the improvement, the S_Res, C_Res and SC_Res models reduced RMSE by 0.05mmol / L, 0.03mmol / L and 0.14mmol / L, respectively, and MARD by 0.34%, 0.09% and 1.11%, respectively, while the proportion of Zone A increased by 0.93%, 1.28% and 4.21%, respectively. These results fully prove that the optimization measures for the Resnet model are effective and can further improve the extraction effect of ECG features and the accuracy of blood glucose prediction.
[0148] Finally, the idea of multiple experts was introduced and applied to the SC_Res+RF model. Experimental results show that compared with the SC_Res+RF model, the M+SC_Res+RF model after introducing the idea of multiple experts has significantly improved in performance. Specifically, MSE was reduced by 0.19mmol / L, MARD was reduced by 1.45%, and the proportion of Zone A was increased by 1.39%. This result fully verifies the effectiveness of the idea of multiple experts in blood glucose monitoring. By integrating the knowledge and experience of multiple experts, expert features can be comprehensively utilized to further improve the accuracy and reliability of blood glucose prediction. In summary, the model and optimization measures proposed in the present invention show significant advantages and potential in blood glucose prediction, and provide more accurate and reliable technical support for the monitoring and control of chronic diseases such as diabetes.
[0149] Table 3 Ablation experiment
[0150]
[0151] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A blood glucose monitoring method based on improved residual network and multi-expert model, characterized in that: The following steps are involved: S1. Preprocessing the original electrocardiogram signal, reducing noise and segmenting the original electrocardiogram signal by wavelet transform, and extracting the effective electrocardiogram signal from the signal; S2. Inputting the processed effective electrocardiogram signal into an improved residual network model, wherein the improved residual network model includes a space-pass convolution module that introduces a spatial reconstruction unit and a channel reconstruction unit, automatically extracting features related to blood glucose levels to obtain a reconstructed effective electrocardiogram signal, wherein the spatial reconstruction unit in the improved residual network model is used to separate and reconstruct the spatial features of the effective electrocardiogram signal to eliminate spatial redundancy; The channel reconstruction unit in the improved residual network model is used to segment, transform and fuse the channel features of the effective electrocardiogram signal to eliminate channel redundancy; the improved residual network model optimizes the feature extraction process of the electrocardiogram signal by fusing the spatial reconstruction unit and the channel reconstruction unit in a sequential manner and combining them with the residual network; S3. Divide the data set into different blood sugar categories according to the blood sugar value, and train expert models for feature extraction for the blood sugar categories respectively to capture the changing rules of the effective electrocardiogram signal under different blood sugar levels. The specific steps include: S301. Acquire a large number of data sets containing the valid electrocardiogram signals and corresponding blood glucose values; S302. According to the range of the blood glucose value, the data set is divided into three blood glucose categories: hypoglycemia, normal blood glucose and hyperglycemia; S303. For each of the blood sugar category data sets, an expert model for the blood sugar category is trained respectively. The expert model is a feature extraction model based on deep learning, which can automatically learn and extract the effective electrocardiogram signal features under the category, and optimize the model parameters through the back propagation algorithm, so that it can accurately capture the change law of the effective electrocardiogram signal under the blood sugar category; S4. Input the real-time effective electrocardiogram signal of the subject into the improved residual network model to obtain a reconstructed effective electrocardiogram signal, and input them into the expert models of different blood glucose categories respectively to obtain the features extracted by each expert model; fuse the features extracted by multiple different expert models to form a comprehensive feature vector through feature combination method; input the comprehensive feature vector into the random forest model for regression prediction to obtain the blood glucose monitoring result.
2. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 1, characterized in that: The step of preprocessing the original electrocardiogram signal specifically includes: reconstructing the original electrocardiogram signal by discrete wavelet transform by setting the threshold of wavelet transform, decomposing the original electrocardiogram signal into nine levels, extracting time statistical features from different dimensions and scales, separating noise components from the effective electrocardiogram signal, and the specific discrete wavelet transform reconstruction formula is: Among them, cA1[n] is the first-level approximation coefficient, which represents the low-frequency component of the signal; cD1[n] is the first-level detail coefficient, which represents the high-frequency component of the signal; n is the index of the wavelet coefficient, indicating that the current calculation is the nth wavelet coefficient; in x[2n-k], x represents the original ECG signal; 2n represents the decimation of the original signal, 2 represents the decimation factor, and the decimation operation will cause the signal to be downsampled by half, and k represents the index of the filter coefficient; g[k] is the coefficient of the low-pass filter, which is used to extract the low-frequency component of the signal; h[k] is the coefficient of the high-pass filter, which is used to extract the high-frequency component of the signal; K represents the length of the filter, and K-1 represents the index of the last coefficient of the filter.
3. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 1, characterized in that: The separation operation of the spatial reconstruction unit specifically includes: using the scale factor of the group normalization GN layer to evaluate the effective electrocardiogram signal of different feature maps, specifically, given an intermediate feature map X, the output feature Xout is standardized by subtracting the mean value μ and dividing by the standard deviation σ, and the calculation formula is as follows: Among them, GN is group normalization, X is the intermediate feature map input feature, μ is the mean, σ is the standard deviation, ε is a small positive constant added to ensure the stability of division, γ is the adjustment of the feature after normalization, allowing the model to flexibly adjust the scale of the feature on the basis of normalization; β is the adjustment of the feature after normalization, allowing the model to flexibly adjust the offset of the feature on the basis of normalization.
4. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 3 is characterized in that: The reconstruction operation of the spatial reconstruction unit adopts a cross reconstruction operation to deeply fuse the information features of the two different effective electrocardiogram signals after weighted processing, thereby strengthening the information flow between them, and then the two feature maps X obtained by the cross reconstruction are w1 and X w2 Splice to generate a spatial fine feature map X w .
5. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 4, characterized in that: For the intermediate feature map X processed by each bottleneck residual block in the improved residual network model, the specific processing process includes: Processing the intermediate feature map X by the spatial reconstruction unit, the spatial reconstruction unit identifies and distinguishes the feature map of the effective electrocardiogram signal and eliminates spatial redundancy by refined processing; The spatial fine feature map X w The information is sent to the channel reconstruction unit for processing, wherein the channel reconstruction unit adopts a segmentation-conversion-fusion method and adaptively merges information from different channels.
6. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 1, characterized in that: The reconstruction operation of the channel reconstruction unit in the improved residual network model includes the following steps: Performing global context extraction on each channel of the input valid electrocardiogram signal, and obtaining global context information through a global average pooling operation; Perform point-by-point convolution on the extracted global context information to generate channel weights; Performing weighted processing on each channel of the input valid electrocardiogram signal by adaptive weighting to enhance information interaction and fusion between different channels; The weighted channel feature maps are fused to generate the reconstructed effective electrocardiogram signal.
7. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 1, characterized in that: The expert model includes the improved residual network model, convolutional neural network model, long short-term memory network model and / or support vector machine.
8. The blood glucose monitoring method based on improved residual network and multi-expert model according to claim 7, characterized in that: The step of fusing the features extracted by the multiple different expert models to form a comprehensive feature vector by a feature combination method specifically includes: Calculating the prediction error of each of the expert models in the data set, the prediction error indicators including mean square error, mean absolute error and mean absolute percentage error; According to the prediction error performance of each expert model on the data set, the weight of each expert model is calculated using the inverse error weighting method. The specific formula is: All weights are then normalized to ensure that the sum of the weights is 1; Multiplying the output feature of each of the expert models by a corresponding weight to obtain a weighted feature vector; All the weighted feature vectors are added together to form a final comprehensive feature vector.
9. The blood glucose monitoring method based on improved residual network and multi-expert model according to any one of claims 1 to 8, characterized in that: The operation of the random forest model includes the following steps: The fused comprehensive feature vector is input into the random forest model; During the training process, the random forest model is trained using the data set, wherein the random forest model is composed of a plurality of decision trees, and each decision tree is trained using a different feature subset and sample subset; During the prediction process, the comprehensive feature vector of the subject is input into the trained random forest model, and the prediction results of all the decision trees are voted or averaged to obtain the final blood glucose prediction value.
Citation Information
Patent Citations
Multi-mode fusion blood glucose monitoring method based on ECG and PPG
CN115251913A
Multi-image fusion electrocardiogram five-classification method, system, medium, equipment and terminal
CN116616789A
System and method of determining a risk score for triage
US20140257122A1