A method for establishing a relationship model between human body electrical impedance and blood glucose based on improved weighted least squares support vector machine

By improving the weighted least squares support vector machine and the butterfly optimization algorithm to optimize the kernel parameters and penalty factors, the problems of unbalanced and noisy data in non-invasive blood glucose detection are solved, improving the robustness and accuracy of the model, and making it suitable for predicting blood glucose using human electrical impedance tomography.

CN119943341BActive Publication Date: 2025-11-04GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510013042.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-11-04
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

Existing non-invasive blood glucose testing technologies suffer from decreased fitting performance and unrobust models when dealing with imbalanced and noisy data, resulting in low detection accuracy.

Method used

An improved weighted least squares support vector machine was used. By introducing adaptive weighting factors and the butterfly optimization algorithm to optimize kernel parameters and penalty factors, sample weights were dynamically adjusted and model parameters were optimized to establish a model of the relationship between human electrical impedance and blood glucose.

Benefits of technology

It improves the robustness and noise resistance of the model, enhances the accuracy and stability of blood glucose prediction, and is suitable for applications that may contain non-Gaussian errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943341B_ABST
    Figure CN119943341B_ABST
Patent Text Reader

Abstract

The application discloses a human body electric impedance and blood glucose relationship model establishment method based on an improved weighted least squares support vector machine, and comprises the following steps: step 1, obtaining an original data set containing human body electric impedance data and blood glucose data, dividing the data set into a training set, a verification set and a test set, and performing the same Butterworth filtering and standardization processing on the human body electric impedance data of each set; step 2, introducing an adaptive weight factor into a target optimization function of the weighted least squares support vector machine; step 3, training based on the training set data, establishing a human body electric impedance and blood glucose relationship model based on the weighted least squares support vector machine, and optimizing the kernel parameter and the penalty factor of the model by using a butterfly optimization algorithm; and step 4, training based on the optimized kernel parameter and the penalty factor, and obtaining the human body electric impedance and blood glucose relationship model based on the improved weighted least squares support vector machine, so that the modeling efficiency and the blood glucose prediction accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blood glucose prediction models, and in particular to a method for establishing a human body electrical impedance and blood glucose relationship model based on an improved weighted least squares support vector machine. BACKGROUND

[0002] Diabetes has become a major global public health problem. With the changes in lifestyle and the intensification of population aging, the incidence and prevalence of diabetes continue to rise worldwide. According to the data released by the International Diabetes Federation, as of 2021, the number of global diabetes patients has exceeded 500 million, and it is expected that this number will further grow in the future. At present, the prevention and management of diabetes mainly rely on a healthy lifestyle, early screening and regular monitoring of blood glucose levels.

[0003] Traditional blood glucose detection methods mainly rely on invasive detection, which has the risk of pain and infection and is not suitable for long-term continuous detection. Therefore, in recent years, various non-invasive blood glucose detection technologies have emerged, however, the existing non-invasive detection technologies still face challenges in terms of accuracy and stability. For example, in the modeling process, the actual data set usually has more healthy people samples and relatively few high blood sugar samples, resulting in an imbalance problem in the data set, and the existing technologies are prone to problems such as decreased fitting performance or non-robust models when dealing with imbalanced data and noise data. SUMMARY

[0004] In order to solve the problem of decreased fitting performance and non-robust models caused by imbalanced data and noise data in the existing non-invasive blood glucose detection technology, the present application provides a method for establishing a human body electrical impedance and blood glucose relationship model based on an improved weighted least squares support vector machine.

[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0006] Step 1, obtaining an original data set containing human body electrical impedance data Z and blood glucose data G Divide into training set, validation set and test set according to 7:1.5:1.5, use Butterworth filter for the same filtering processing of human body electrical impedance data in each set, the parameter setting is: the cutoff frequency is 0.1MHz, the sampling frequency is 1.0MHz, and the filter order is 5, and the standardized processing is performed on the filtered human body electrical impedance data in the training set, and the standardization formula is:

[0007]

[0008] Wherein, is the filtered human body electrical impedance data in the training set, is the mean value of the filtered human body electrical impedance data in the training set, It is the standard deviation of the human body electrical impedance data after filtering in the training set.

[0009] Use the mean μ of the training set Z and standard deviation σ Z The filtered human electrical impedance data from the validation and test sets are standardized to obtain the standardized validation set. and test set

[0010] Step 2: Introduce an adaptive weight factor v into the objective function of the weighted least squares support vector machine. i Based on the sample residuals ξ i The mean residual μ is dynamically adjusted and calculated using the following formula:

[0011]

[0012] Where, ξ i Let ξ be the residual of sample i, and μ be the residual ξ. i The mean value, k1 = 1.31, is a parameter used to control the range of influence of the error. It is the residual ξ i The degree of deviation from a Gaussian distribution is expressed as:

[0013]

[0014] In the formula, IQR is ξ i The interquartile range of the distribution is the difference between the upper quartile and the lower quartile.

[0015] A model of the relationship between human electrical impedance and blood glucose is established based on weighted least squares support vector machine, given a training set. The goal is to find the optimal function G(Z) by minimizing the weighted objective function, which is expressed as:

[0016] G(Z) = w T φ(Z)+b(4)

[0017] Where G(Z) is the output blood glucose value, w is the weight vector, Z is the input human electrical impedance data, b is the bias term, and φ(Z) is a nonlinear mapping that maps the input space to a high-dimensional feature space using the RBF kernel function, the expression of which is:

[0018]

[0019] Where K is the kernel function, These are the input sample points, ||·|| represents the Euclidean distance between two sample points, and σ is the kernel parameter.

[0020] The objective optimization function during training is as follows:

[0021]

[0022] where w is the weight vector, b is the bias term, γ is the penalty factor, is the residual of sample i, G i and are the true value and predicted value of the i-th sample in the training set respectively.

[0023] Step 3, use the butterfly optimization algorithm to optimize the kernel parameters and penalty factor of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine, including steps 3.1-3.6:

[0024] Step 3.1, set the optimization parameter range: kernel parameter σ∈[0.01,0.3] and penalty factor γ∈[300,1500], set the total number of butterflies N=20 and the maximum number of iterations max_iter=100, define the parameter combination of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine as the butterfly position, randomly generate the initial position h k =(σ k ,γ k ) for each butterfly individual k, and initialize the butterfly population H={h1,h2,...,h N}.

[0025] Step 3.2, fitness function calculation, use the position h k of the butterfly individual to train the training set data, and take the mean square error of the validation set as the fitness of the butterfly individual, and the fitness function expression is:

[0026]

[0027] where f(h k ) is the fitness of butterfly individual k at position h k , p is the total number of samples in the validation set, G j and are the true blood glucose value and predicted value of the j-th sample in the validation set respectively.

[0028] Step 3.3, calculate the flower fragrance intensity of the butterfly individual according to the fitness value, and the formula for calculating the flower fragrance intensity of the butterfly individual is:

[0029]

[0030] where and f(h k ) are the fitness of butterfly individual k at position h kthe flower intensity and fitness, c = 0.3 is the perception shape, ε = 10 -4 is a very small positive number, and α = 2.5 is the power index.

[0031] Step 3.4: Determine the position of the butterfly individual with the strongest flower intensity as the global optimal position h of the current butterfly population * , initialize the switching probability p = 0.5, and generate a random number r between 0 and 1 for each butterfly individual k , if r k > p, the butterfly individual is attracted to the butterfly individual with the strongest flower intensity, and the position is updated using formula (9), if r k < p, the butterfly individual is attracted to the neighboring individual, and the position is updated using formula (10), the position updating formula of the butterfly individual is as follows:

[0032]

[0033]

[0034] wherein, are the positions of the i, j, and kth butterfly individuals at the tth iteration, h * is the global optimal position, is the flower intensity of the kth butterfly individual at the position h k .

[0035] Step 3.5: Calculate the fitness and flower intensity of the butterfly individual according to the new position If the flower intensity of the new position is greater than that of the original position , update the position of the individual to If the flower intensity of the new position is greater than h * , update the global optimal position to Update the corresponding flower intensity

[0036] Step 3.6: Repeat steps 3.2 to 3.5 to continuously update the positions and flower intensities of the butterfly individuals until the maximum number of iterations is reached, and output the optimal position h * = (σ * , γ * ).

[0037] Step 4: Use the optimized kernel parameter σ * and the penalty factor γ * to train the model, obtain the human electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine, and use the test set to evaluate the performance of the model.

[0038] Compared with the prior art, the present application has the following advantages:

[0039] The present application designs an adaptive weight factor, by dynamically adjusting the weight of the sample, according to the sample residual error i and the deviation of the residual mean value μ is given different weight values, effectively reducing the influence of abnormal values or noise data on model training, making the model have better robustness and noise resistance on unbalanced data sets, thereby improving the accuracy of blood glucose prediction, when the sample residual error i deviates from the mean value μ, the denominator increases, and the weight v i becomes smaller, so the weight of the sample point with larger residual error is smaller, if the error deviates more from the Gaussian distribution, i.e. the value is larger, the sensitivity of the weight v i to the deviation is reduced, so that when the error does not satisfy the Gaussian distribution assumption, the weighted least squares support vector machine can be more tolerant to large error samples, and is more suitable for application in the scene of predicting blood glucose based on electrical impedance that may contain non-Gaussian error, the introduction of the parameter k1 provides flexibility for the control of the error influence range, by adjusting the value of k1, the threshold range of the error deviation from the mean value μ can be controlled, it is determined how large the range of error is considered acceptable, and the suppression effect of abnormal values is balanced.

[0040] The present application adopts the butterfly optimization algorithm to optimize the kernel parameter σ and the penalty factor γ of the weighted least squares support vector machine, which can effectively reduce the time and complexity of manual parameter adjustment, improve the parameter adjustment efficiency, quickly find the suitable data parameter combination, make the model have better generalization ability, and improve the prediction stability in practical application. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below, and obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0042] Figure 1 is the overall framework diagram of the method for establishing the relationship model between human body electrical impedance and blood glucose based on the improved weighted least squares support vector machine of the present application.

[0043] Figure 2 is the flowchart of optimizing the weighted least squares support vector machine model by using the butterfly optimization algorithm in the present application. DETAILED DESCRIPTION

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] To illustrate the technical solution described in this invention, specific embodiments are described below.

[0046] like Figure 1 The diagram shows the overall framework of a method for establishing a human body electrical impedance and blood glucose relationship model based on an improved weighted least squares support vector machine. The method includes: S101 acquiring the dataset; S102 designing adaptive weight factors; S103 establishing a human body electrical impedance and blood glucose relationship model based on a weighted least squares support vector machine, optimizing the kernel parameters and penalty factors of the model using the butterfly optimization algorithm; and S104 training the model using the optimized kernel parameters and penalty factors to obtain the human body electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine.

[0047] S101 acquires the dataset, the original dataset. The dataset consists of human electrical impedance data Z and blood glucose data G, divided into training, validation, and test sets in a 7:1.5:1.5 ratio. A Butterworth filter is used to filter the human electrical impedance data with the following parameters: cutoff frequency of 0.1MHz, sampling frequency of 1.0MHz, and filter order of 5. The filtered human electrical impedance data in the training set is then standardized using the following formula:

[0048]

[0049] in, It is the human electrical impedance data after filtering in the training set. It is the mean of the human body electrical impedance data after filtering in the training set. It is the standard deviation of the human body electrical impedance data after filtering in the training set.

[0050] Use the mean μ of the training set Z and standard deviation σ Z The filtered human electrical impedance data from the validation and test sets are standardized to obtain the standardized validation set. and test set

[0051] The adaptive weighting factor designed in S102 is expressed as follows:

[0052]

[0053] wherein ξ i is the residual of sample i, μ is the mean of residuals ξ i , k1 = 1.31 is a parameter used to control the influence range of error, is the degree of deviation of residual ξ i from Gaussian distribution, and its expression is:

[0054]

[0055] wherein IQR is the interquartile range of ξ i distribution, i.e. the difference between upper quartile and lower quartile.

[0056] The S103 establishes a human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine, and the training set The objective is to find the optimal function G(Z) by minimizing the weighted objective function, and its expression is:

[0057] G(Z) = w T φ(Z) + b (4)

[0058] wherein G(Z) is the output blood glucose value, w is the weight vector, Z is the input human body electrical impedance data, b is the bias term, and φ(Z) is the nonlinear mapping, which maps the input space to the high-dimensional feature space, and uses the RBF kernel function, and its expression is:

[0059]

[0060] wherein K is the kernel function, is the input sample point, ||·|| represents the Euclidean distance between two sample points, and σ is the kernel parameter.

[0061] The objective optimization function during training is as follows:

[0062]

[0063] wherein w is the weight vector, b is the bias term, γ is the penalty factor, is the residual of sample i, G i and y are the true value and the predicted value of the i-th sample in the training set , respectively.

[0064] In the S103, the kernel parameter and the penalty factor of the model are optimized by using the butterfly optimization algorithm, and the flow steps are as shown in Figure 2 .

[0065] In combination Figure 2As shown, the kernel parameters and penalty factor of the human body electrical impedance to blood glucose relationship model based on weighted least squares support vector machine are optimized using the butterfly optimization algorithm, including the following steps S201-S209:

[0066] S201: Parameter setting and population initialization. The optimization parameter range is set as follows: kernel parameter σ∈[0.01,0.3] and penalty factor γ∈[300,1500]. The total number of butterfly individuals N=20 and the maximum number of iterations max_iter=100. The parameter combination of the human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine is defined as the butterfly position. An initial position h is randomly generated for each butterfly individual k. k =(σ k ,γ k Initialize the butterfly population H = {h1, h2, ..., h}. N}

[0067] S202: Fitness function calculation, using the butterfly individual's position h k For the training set The data is used for training, and the validation set is used. The mean squared error is used as the fitness of an individual butterfly, and the fitness function is expressed as:

[0068]

[0069] In the formula, f(h) k ) is the position h of individual butterfly k. k The fitness of G, where p is the total number of samples in the validation set, and G is the number of samples in the validation set. j and These are the actual blood glucose value and the predicted value of the j-th sample in the validation set, respectively.

[0070] S203: Calculate the fragrance intensity of individual butterflies based on their fitness. The formula for calculating the fragrance intensity of individual butterflies is as follows:

[0071]

[0072] In the formula, and f(h) k () are the positions of individual butterfly k and h respectively. k The intensity and adaptability of floral fragrance, c=0.3 is the perceptual morphology, ε=10 -4 It is a very small positive number, and α = 2.5 is the power index.

[0073] S204: Determine the position of the butterfly with the strongest fragrance intensity as the global optimum position h of the current butterfly population. * The initial switching probability is p = 0.5, and each butterfly individual generates a random number r between [0, 1]. k .

[0074] S205: If r k is the strongest, the butterfly individual is attracted to the butterfly individual with the strongest flower fragrance, and the position is updated using formula (8). If r k is less than p, the butterfly individual is attracted to the neighboring individual, and the position is updated using formula (9). The position updating formula of the butterfly individual is as follows:

[0075]

[0076]

[0077] wherein, are the parameter combinations of the human body electrical impedance and blood glucose relationship model of the i-th, j-th and k-th butterfly at the t-th iteration, h * is the global optimal parameter combination, is the flower fragrance intensity of the k-th butterfly at h k parameter combination.

[0078] S208: Calculate the fitness of the butterfly individual according to the new position and the flower fragrance intensity If the flower fragrance intensity of the new position is greater than that of the original position , the position of the individual is updated to If the flower fragrance intensity of the new position is greater than that of h * , the global optimal position is updated to The corresponding flower fragrance intensity is updated Repeat steps S202 to S205 to continuously update the position and flower fragrance intensity of the butterfly individual until the maximum number of iterations is reached.

[0079] S209: Output the optimal position h * =(σ * ,γ * ), use the optimized kernel parameter σ * and the penalty factor γ * to train the model, obtain the S104 human body electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine, and use the test set to evaluate the performance of the model.

[0080] The human body electrical impedance and blood glucose relationship model based on the improved weighted least squares support vector machine provided by the present application overcomes the problems of insufficient model robustness and limited parameter optimization ability in the prior art, and improves the modeling efficiency and prediction accuracy.

[0081] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims

1. A method for establishing a human body electrical impedance and blood glucose relationship model based on improved weighted least squares support vector machine, characterized in that, The method comprises the following steps: Step 1, obtain the original data set containing human body electrical impedance data Z and blood glucose data G Divide into training set, validation set and test set according to 7:1.5:1.5, use Butterworth filter for human body electrical impedance data in each set, and use the same standardization processing for the filtered data, obtain the training set after filtering and standardization processing Validation set And test set Step 2: Introducing adaptive weight factor v in the objective optimization function of weighted least squares support vector machine i ; Step 3, with training set data As input, by minimizing the weighted objective function, the optimal function G(Z) is found, thereby establishing a human body electrical impedance and blood glucose relationship model based on weighted least squares support vector machine, which is expressed as: G(Z) = w T φ(Z) + b (1) Wherein G(Z) is the output blood glucose value, w is the weight vector, Z is the input human body impedance data, b is the bias term, and phi(Z) is a nonlinear mapping that maps the input space to a high-dimensional feature space, using an RBF kernel function, the expression of which is: where K is a kernel function, is the input sample point, ||·|| represents the Euclidean distance between two sample points, and σ is a kernel parameter; The target optimization function during training is as follows: where w is a weight vector, b is a bias term, and γ is a penalty factor, is the residual of sample i, G i and sub are the true value and predicted value of the i-th sample in the training set v i is an adaptive weight factor; The kernel parameters and the penalty factor of the model are optimized by using a butterfly optimization algorithm; Step 4, using the optimized nuclear parameters and penalty factor training, the human body electrical impedance and blood glucose relationship model based on improved weighted least squares support vector machine is obtained, and the test set is used Performance evaluation is carried out.

2. The method according to claim 1, wherein the method is characterized by, In the step 1, the Butterworth filter is a low-pass filter, and the parameters are set as follows: a cutoff frequency of 0.1 MHz, a sampling frequency of 1.0 MHz, and a filter order of 5; The filtered human body impedance data is subjected to the same standardization processing, first, the filtered human body impedance data in the training set is subjected to standardization processing, and the standardization formula is: wherein, is the filtered human electrical impedance data in the training set, is the mean of the filtered human electrical impedance data in the training set, is the standard deviation of the filtered human electrical impedance data in the training set, using the mean μ Z and the standard deviation σ Z standardizing the filtered human electrical impedance data in the validation set and the test set, to obtain the standardized validation set and the test set The training set For model parameter training, the validation set For calculating fitness value when using butterfly algorithm for optimization, the test set For performance evaluation of human electrical impedance and blood glucose relationship model based on improved weighted least squares support vector machine.

3. The method according to claim 1, wherein, In step 2, the adaptive weight factor is dynamically adjusted according to the residual ξ i and the residual mean μ, and the calculation formula is: wherein ξ i is the residual of the sample i, μ is the mean of the residuals ξ i , k1 = 1.31 is a parameter used to control the range of influence of the error, is the degree to which the residual ξ i deviates from the Gaussian distribution, which is expressed as: where IQR is ξ i the interquartile range of the distribution, i.e. the difference between the upper quartile and the lower quartile.

4. The method of claim 1, wherein the method is characterized by: In the step 3, the kernel parameters and the penalty factor of the model are optimized by using a butterfly optimization algorithm, comprising steps S1-S6: Step S1, set the optimization parameter range: the kernel parameter σ ∈ [0.01, 0.3] and the penalty factor γ ∈ [300, 1500], set the total number of butterfly individuals N = 20 and the maximum number of iterations max_iter = 100, define the parameter combination of the human body electrical impedance and blood glucose relationship model based on the weighted least squares support vector machine as the butterfly position, randomly generate the initial position h for each butterfly individual k k = (σ k , γ k ), initialize the butterfly population H = {h1, h2, …, h N}; Step S2, fitness function calculation, using the position h of the butterfly individual k For the training set Train the data, and take the mean square error of the validation set as the fitness of the butterfly individual, and the fitness function expression is: where f(h k ) is the fitness of the butterfly individual at position h k , p is the total number of samples in the validation set, G j and are the true and predicted blood glucose values of the jth sample in the validation set, respectively. In step S3, the flower fragrance intensity of the butterfly individual is calculated according to the fitness, and the flower fragrance intensity calculation formula of the butterfly individual is: where, and f(h k ) are the flower scent intensity and fitness of butterfly individual k at location h k , respectively, c = 0.3 is the perception modality, ε = 10 -4 is a very small positive number, and a = 2.5 is the power exponent; Step S4, the position of the butterfly individual with the strongest flower fragrance is determined as the global optimal position h of the current butterfly population * , the switching probability p is initialized as 0.5, and each butterfly individual generates a random number r between 0 and 1 k , if r k >p, the butterfly individual is attracted by the butterfly individual with the strongest flower fragrance, and the position is updated by using formula (9), if r k <p, the butterfly individual is attracted by the neighboring individual, and the position is updated by using formula (10), and the position updating formula of the butterfly individual is as follows: wherein, respectively the position of the i, j, k butterfly individual at the tth iteration, h * is the global optimum position, is the flower scent intensity of the butterfly individual k at position h k at the tth iteration. Step S5: Calculate the fitness of the butterfly individual according to the new position and the flower intensity If the flower intensity of the new position is greater than the flower intensity of the original position then update the position of the individual to If the flower intensity of the new position is greater than h * then update the global optimal position to Update the corresponding flower intensity Step S6: repeat steps S2 to S5, constantly update the position of the butterfly individual and the intensity of the flower fragrance, until the maximum number of iterations is reached, output the optimal position h * = (σ * ,γ * ).

Citation Information

Patent Citations

  • Vehicle-mounted network fault diagnosis method based on machine learning

    CN115700593A

  • Composite fault diagnosis method based on improved distributed butterfly optimization algorithm

    CN117688479A