Bioelectrical impedance spectroscopy noninvasive blood glucose detection method
By integrating sample expansion, balancing, and feature selection through baseline correction and Optuna hyperparameter optimization algorithms, a high-precision and robust non-invasive blood glucose detection model based on bioelectrical impedance spectroscopy was established. This model solves the problems of insufficient sample quantity for both high and low blood glucose levels and large inter-individual errors, thus achieving high-precision non-invasive blood glucose detection.
Patent Information
- Application Number
- CN202411479240.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-10
AI Technical Summary
Existing non-invasive blood glucose detection technology based on bioelectrical impedance spectroscopy suffers from large estimation biases when the number of hyperglycemia and hypoglycemia samples is insufficient. Inappropriate feature selection leads to overfitting, and there are large inter-individual errors and weak generalization ability.
A baseline correction method was used to reduce inter-individual variability. The Optuna hyperparameter optimization algorithm was combined with sample expansion, balancing, frequency and feature selection and XGBoost regression model to establish a robust blood glucose estimation model.
It improves the model's generalization ability and estimation accuracy, reduces inter-individual errors, avoids overfitting, and achieves high-precision non-invasive blood glucose detection.
Smart Images

Figure CN119279574A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of non-invasive blood sugar detection, and specifically relates to a non-invasive blood sugar detection method using a bioelectrical impedance spectroscopy method. Background Art
[0002] Accurately obtaining the patient's blood sugar level is a crucial part of diabetes management. The traditional blood sugar testing method requires using a needle to prick the finger to obtain blood to measure the blood sugar level. However, according to the recommendations of the World Health Organization, patients need to measure their blood sugar levels several times a day. This means that patients need to prick their fingers frequently every day, which not only brings physical pain to patients, but may also cause fear and affect the effective management of diabetes. Therefore, there is an urgent need for a non-invasive blood sugar testing technology that is both economical and has high measurement accuracy.
[0003] Currently, researchers are exploring a variety of non-invasive blood glucose detection technologies, including optical methods, radio frequency methods, body fluid methods, and bioelectrical impedance spectroscopy. Among these technologies, bioelectrical impedance spectroscopy has received widespread attention in the field of non-invasive blood glucose detection due to its easy access, low cost, and ability to continuously monitor. Fluctuations in blood glucose levels can affect the dielectric properties of red blood cell membranes. Changes in plasma glucose concentration trigger changes in sodium and potassium ion concentrations, which in turn lead to changes in red blood cell membrane conductivity. Given that red blood cells occupy approximately 45% of the blood volume, the macroscopic electrical impedance of biological tissues will also change accordingly. Therefore, we use bioelectrical impedance spectroscopy technology to capture the dielectric properties of cells by applying weak alternating currents of different frequencies to tissues, thereby achieving non-invasive detection of blood glucose.
[0004] However, there are three main problems with existing research. First, since the number of hyperglycemia and hypoglycemia samples is usually much smaller than that of normal blood sugar samples, the estimation results of the model in these two extreme cases may have large deviations. Second, in order to obtain as much useful information as possible, the bioelectrical impedance spectrum needs to be measured over a wide frequency range to obtain a large number of features. However, too many features may lead to overfitting. Therefore, how to effectively select the optimal frequency and features is a problem that has not yet been fully solved. Third, the error of non-invasive blood glucose level estimation between different individuals or different sessions is large, resulting in its weak generalization ability. In addition, improving a single influencing factor of the modeling process may lead to a local optimal situation, and it is necessary to establish a joint optimization of multiple factors. Summary of the invention
[0005] In view of the above problems, the present invention provides a non-invasive blood glucose detection method using bioimpedance spectroscopy. First, a bioimpedance sensor is used to obtain the bioimpedance spectrum of the human forearm, and then the proposed baseline correction method is used to reduce the difference in bioimpedance between different subjects and sessions. Finally, based on the Optuna hyperparameter optimization algorithm, sample expansion and balance, frequency and feature selection, and regression model establishment are integrated into one evaluation index to achieve overall optimization of hyperparameters. Finally, a blood glucose level estimation model with lower estimation error and stronger generalization ability is obtained. The present invention comprises the following steps:
[0006] Step 1: obtain different concentrations of human blood glucose values through a glucose tolerance test, and collect the bioelectrical impedance spectrum of the inner side of the human forearm;
[0007] Step 2: Calculate the real part, imaginary part, amplitude and phase of the bioimpedance at each frequency according to the bioimpedance spectrum, and merge the features of the same frequency point into a group of features;
[0008] Step 3: Perform baseline correction on the data, divide it into training set and test set, and perform standardization;
[0009] Step 4: Use sample expansion and balancing algorithms to expand the sample size and balance the sample distribution;
[0010] Step 5: Use the sparse group least absolute shrinkage and selection operator (sgLASSO) with weighted proportional threshold to select frequencies and features simultaneously;
[0011] Step 6: Use XGBoost ensemble learning algorithm to establish a regression model between bioelectrical impedance spectroscopy and blood glucose level;
[0012] Step 7: Use the Optuna hyperparameter optimization method to optimize the hyperparameters of the sample expansion and balancing algorithm, frequency and feature selection algorithm, and XGBoost algorithm to obtain the optimal regression model;
[0013] Step 8: Use the regression model to test and verify the bioelectrical impedance spectrum of the test set to obtain an estimated value, which is then added to the fasting blood glucose value to finally obtain an estimated value of the blood glucose level.
[0014] The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy provided by the present invention has at least the following beneficial effects:
[0015] 1. The baseline correction method was used to reduce the differences in bioelectrical impedance spectra between different subjects and sessions, and improve the generalization ability of the model.
[0016] 2. A data generation method that combines KNN-based data generation and Clarke error grid evaluation indicators is used to expand the sample size. At the same time, a density-weighted method is used to focus on increasing the proportion of hyperglycemia and hypoglycemia according to the sample density distribution. This solves the problems of small sample size and unbalanced sample distribution in blood glucose data and improves the accuracy of the estimation results.
[0017] 3. The sparse group minimum absolute shrinkage and selection operator with a weighted ratio threshold is used to simultaneously select frequencies and features, which fully utilizes the structural prior information of the bioelectrical impedance spectrum, avoids the problem of model overfitting caused by too many features, and improves the interpretability of the model.
[0018] 4. The Optuna hyperparameter optimization algorithm is used to integrate the sample expansion and balancing algorithm, frequency and feature selection algorithm, and the establishment of the XGBoost regression model into one evaluation index to achieve overall optimization of the hyperparameters and improve the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram of the process of the method of the present invention.
[0020] Figure 2 It is a Clarke error grid diagram of the blood glucose value estimation result and the reference blood glucose value described in the present invention. DETAILED DESCRIPTION
[0021] In order to more clearly introduce the details and advantages of the present invention, the specific implementation of the present invention is further described in detail below with reference to the accompanying drawings.
[0022] In the step one, the subject is required to fast for 8 hours, first collect the bioelectrical impedance spectrum and blood sugar value under the fasting state, then drink the aqueous solution containing 120 grams of glucose to carry out the glucose tolerance test, and then collect the bioelectrical impedance spectrum and blood sugar value every 5 minutes within three hours. Each subject carries out the same experiment twice within a week, and each experiment is called a session, and each session collects 37 samples in total, including a fasting sample. The bioelectrical impedance sensor used is MAX30009EVKIT (Maxim Integrated, the United States). The bioelectrical impedance spectrum is collected using the four-electrode method, and the electrode uses a wet Ag / AgCl gel electrode, which is placed on the inner forearm of the subject at a fixed distance, and the current is set to 64μA, and all filters are set to bypass, and the current frequency range is set to 1-875kHz.
[0023] The original bioelectrical impedance spectrum obtained in step 2 only contains the real part and the imaginary part, and the amplitude and phase are obtained according to the following calculation formula:
[0024]
[0025] Among them, I, Q, Mag, and Pha are the real part, imaginary part, amplitude, and phase of the bioimpedance, respectively.
[0026] In step 3, the baseline correction method is to subtract the samples in the fasting state from all samples in one session, and the calculation expression is:
[0027]
[0028] y j =y j -y fasting (4)
[0029] Among them, i is the number of features, j is the number of samples, P is the feature dimension of a single sample, N is the total number of samples, C∈R 1×P is a fasting sample, y∈R N×1 is the sample label, y fasting Indicates the label value of the fasting sample.
[0030] The calculation formula used for data normalization is as follows:
[0031]
[0032] Where mean(S j ) and std(S j ) represent the mean and standard deviation respectively, X=(x1,x2,…,x N ) T ∈R N×P Represents the bioelectrical impedance spectroscopy feature sample matrix. The training set and test set are divided into 80% and 20%.
[0033] In step 4, the sample expansion and balancing algorithm uses K nearest neighbor combined with Clarke error grid evaluation index and sample density weighting to generate new data. The specific implementation steps are as follows:
[0034] (1) The sample weight is calculated according to the sample distribution density of the training set. The calculation expression is:
[0035]
[0036] Among them, ε is a positive real-valued constant, α is a weight intensity control factor, and the weight of the sample can be changed by changing α. p'(y) is defined as:
[0037]
[0038] Where p(y) is defined as:
[0039]
[0040] Where k is the kernel function, h is the bandwidth, and the kernel function used in the present invention is a Gaussian kernel. In this way, the sample weight y weights , and then normalize it as follows:
[0041]
[0042] weights is the final weight of each sample.
[0043] (2) Table 1 is the pseudo code of the proposed sample expansion and balancing algorithm. When searching for the second seed sample by considering the label value space of the first seed sample, since the error required by the Clark error grid A zone is 20% of the reference blood glucose value, we set the label value of the second seed sample to be 20% higher or lower than the label value of the first seed sample; when searching for the second seed sample by considering the feature value space of the first seed sample, the number of nearest neighbor samples included in the sample subset is determined by setting the nearest neighbor parameter K. Thus, the final sample set used to train the regression model is obtained.
[0044] Table 1 Pseudocode of the algorithm used to expand the sample size and balance the sample distribution
[0045]
[0046] In step 5, the frequency and feature selection can be performed simultaneously because the bioelectrical impedance spectrum data has a group structure, and the bioelectrical impedance features at the same frequency include the real part, the imaginary part, the amplitude and the phase. The calculation formula of sgLASSO is as follows:
[0047]
[0048] The feature weight w is calculated according to the penalty parameters λ1 and λ2, and then the frequencies and features with a weight of 0 are excluded according to w. Then, the weight mean within the group is used to represent the importance of the frequency, which is then sorted and normalized. Finally, the cumulative sum of the frequency importance is calculated in order and the frequency with the highest importance ratio is selected according to the threshold t. The calculation process is shown in Table 2.
[0049] Table 2 Pseudocode of the computational steps used for frequency and feature selection.
[0050]
[0051] Table 3 Hyperparameters and their search ranges
[0052]
[0053] In step 7, Optuna is used to simultaneously optimize the sample expansion and balance algorithm, the frequency and feature selection algorithm, and the XGBoost ensemble learning regression algorithm, and the hyperparameters and optimization ranges involved are shown in Table 3. The number of iterations of Optuna is N=100, the sampler is set to TPESampler, the iteration evaluation index is set to mean absolute error (MAE), and 5-fold cross validation is used to evaluate the performance of the model.
[0054] In step eight, after obtaining the output value of the model, it is also necessary to add the baseline blood glucose value of the current test session to obtain the final estimated blood glucose value.
[0055] The use of the present invention for non-invasive blood glucose testing can achieve higher estimation accuracy. The mean absolute relative difference (MARD) of the test results is 8.93%, the root mean square error (RMSE) is 14.97 mg / dl, the mean absolute error (MAE) is 12.05 mg / dl, and the Clark error grid analysis is shown in the figure. Area A accounts for 91.49%.
[0056] Therefore, the present invention can obtain better performance by adopting the above-mentioned bioelectrical impedance spectroscopy non-invasive blood glucose detection method. Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limiting. Although the present invention is described in detail with reference to the preferred embodiments, ordinary technicians in the field 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 of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A non-invasive blood glucose detection method using bioelectrical impedance spectroscopy, characterized in that: The following steps are involved: S1: Use a bioimpedance sensor to obtain the bioimpedance spectrum of the inner forearm of different subjects at different times, and use an invasive method to obtain the blood glucose level of the subjects; S2: Calculate the real part, imaginary part, amplitude and phase of the bioimpedance at each frequency based on the bioimpedance spectrum data, and merge them into a set of features at one frequency point; S3: Perform baseline correction on the bioelectrical impedance spectrum, then divide the data into a training set and a test set, and perform standardization on the training set and the test set; S4: Use sample expansion and balancing algorithms to simultaneously expand the sample size and balance the sample distribution. S5: Simultaneous selection of frequencies and features of bioelectrical impedance spectra using sparse group least absolute shrinkage and selection operator with weighted proportional threshold; S6: using XGBoost algorithm to establish a regression model between the bioelectrical impedance spectrum of the training set and the blood glucose value; S7: Use the Optuna hyperparameter optimization algorithm to simultaneously optimize the hyperparameters of the sample expansion and balancing algorithms, the frequency and feature selection algorithms, and the regression model. S8: Use the established model to identify the bioelectrical impedance spectrum of the test set and output the estimated blood glucose value.
2. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: The bioelectrical impedance sensor uses a four-electrode method to measure the bioelectrical impedance spectrum, the electrodes are arranged at a fixed distance on the inner side of the forearm, the current frequency range is 1kHz-875kHz, and the step length is 5kHz.
3. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: Blood glucose was raised by oral glucose tolerance test (OGTT). Fasting blood glucose level and bioelectrical impedance spectrum were collected before each test. Bioelectrical impedance spectrum and blood glucose value were collected every 5 minutes within three hours thereafter. Each subject performed the same experiment twice within one week.
4. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: The baseline correction method is to subtract the samples in the fasting state from all samples in one experiment, and the calculation expression is: and j =and j -and fasting Among them, i is the number of features, j is the number of samples, P is the feature dimension of a single sample, N is the total number of samples, C∈R 1×P is a fasting sample, y∈R N×1 is the sample label, y fasting Indicates the label value of the fasting sample.
5. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: The sample expansion and balancing algorithm uses K nearest neighbors combined with Clarke error grid evaluation index and sample density weighting to generate new data. The algorithm includes a weight control factor α and a parameter K that controls the number of neighbors. Specifically, the sample weight is first calculated based on the sample distribution density of the training set, and its calculation expression is: Where ε is a positive real-valued constant and p'(y) is defined as: Where p(y) is defined as: Among them, k is the kernel function and h is the bandwidth. Then, the first seed sample for synthesizing the new sample is randomly selected according to the sample weight. Subsequently, the selection of the second seed sample first considers the 20% neighborhood to the left or right of the label value, and then considers the K neighboring samples in the feature space. Finally, based on the two selected seed samples, the new sample is generated using the interpolation method, and the label value takes the weighted average of the Euclidean distance from the new sample to the two seed samples.
6. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: The sparse group minimum absolute shrinkage and selection operator with weight ratio threshold uses the sparsity of its norm penalty term, calculates the feature weight w according to the penalty parameters λ1 and λ2, and then excludes the frequencies and features with a weight of 0 according to w. Then, the weight mean in the group is used to represent the importance of the frequency, which is then sorted and normalized, and finally the cumulative sum of the frequency importance is calculated in order and the frequency with the highest importance ratio is selected according to the threshold t.
7. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: When setting up an Optuna hyperparameter optimization task, three methods are included: They are sample expansion and balance, frequency and feature selection, and the establishment of XGBoost regression model, while optimizing the hyperparameters of the three methods. The evaluation indicator of Optuna is set to mean absolute error.
8. The non-invasive blood glucose detection method using bioelectrical impedance spectroscopy according to claim 1, characterized in that: When outputting the estimated blood glucose value, the baseline blood glucose value from the testing session needs to be added.
Citation Information
Cited By
Breast BIS sensor based on partition detection, detection device and detection method
CN120130987A
Dynamic calibration method and system based on multi-frequency bioimpedance spectroscopy blood glucose monitoring
CN122208135A