Processing method and apparatus for PPG signal-based blood glucose prediction model

By constructing a PPG signal blood glucose prediction model, the problem of poor user experience caused by invasive blood glucose observation in existing technologies has been solved, and non-invasive blood glucose prediction has been achieved, thereby increasing users' enthusiasm for self-testing.

WO2025222911A1PCT designated stage Publication Date: 2025-10-30LEPU MEDICAL TECH (BEIJING) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140883
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-26
Filing Date
2024-12-20
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

Existing blood glucose monitoring methods are mainly invasive, resulting in a poor user experience. There is a need for a non-invasive blood glucose prediction method.

Method used

A PPG signal-based blood glucose prediction model was constructed. The original dataset was built through data acquisition and data preprocessing. A neural network model containing an encoder, decoder, fully connected layer, ELU function layer, gated linear layer and residual layer was established for blood glucose prediction based on PPG signal.

Benefits of technology

It enables non-invasive blood glucose prediction, improving user experience and self-testing motivation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140883_30102025_PF_FP_ABST
    Figure CN2024140883_30102025_PF_FP_ABST
Patent Text Reader

Abstract

A processing method and apparatus for a PPG signal-based blood glucose prediction model. The processing method for a PPG signal-based blood glucose prediction model comprises: constructing a PPG signal-based blood glucose prediction model and recording same as a first prediction model; constructing a first original data set by means of data acquisition; performing data preprocessing on the first original data set to obtain a first training data set; performing model training on the first prediction model on the basis of the first training data set; and when the training is finished, performing blood glucose prediction for an arbitrary subject on the basis of the first prediction model. The present invention can improve user experience and enhance user's motivation for self-monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

A method and apparatus for processing PPG signal blood glucose prediction models

[0001] This application claims priority to Chinese Patent Application No. 202410510778.0, filed on April 26, 2024, entitled "A Processing Method and Apparatus for a PPG Signal Blood Glucose Prediction Model". Technical Field

[0002] This invention relates to the field of data processing technology, and in particular to a processing method and apparatus for a PPG signal blood glucose prediction model. Background Technology

[0003] Blood glucose levels are an important health assessment parameter. Currently, conventional blood glucose monitoring methods are mainly invasive. When conducting long-term blood glucose monitoring, these invasive methods can lead to various adverse experiences for users, such as wound pain and infection. Based on Beer-Lambert's law, we know that the absorbance of transmitted light by a solution is related to the solute concentration. Therefore, the higher the blood glucose level, the lower the light intensity transmitted through human tissue. This means that blood glucose changes can be observed by collecting photoplethysmography (PPG) signals, which reflect changes in the intensity of transmitted light in human blood. Since PPG signal acquisition is non-invasive, a technical solution based on PPG signals for blood glucose monitoring / prediction could effectively improve the user experience and increase users' willingness to self-monitor. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a method, apparatus, electronic device, and computer-readable storage medium for processing a PPG signal blood glucose prediction model. This invention constructs a PPG signal blood glucose prediction model, denoted as the first prediction model, and builds a corresponding first raw dataset through data acquisition. The first raw dataset is then preprocessed to obtain a corresponding first training dataset, and the first prediction model is trained based on the first training dataset. After model training, blood glucose prediction is performed on any subject based on the first prediction model. In this invention, the subject only needs to retain a few historical calibration records initially through optical signal acquisition and invasive blood glucose value acquisition. Subsequently, at any time, real-time blood glucose prediction can be performed based on the first prediction model provided by this invention, using the historical calibration records and real-time acquired PPG signals. The non-invasive blood glucose prediction solution provided by this invention can effectively improve user experience and increase user self-testing enthusiasm.

[0005] To achieve the above objectives, a first aspect of the present invention provides a method for processing a PPG signal blood glucose prediction model, the method comprising:

[0006] The PPG signal blood glucose prediction model is constructed and denoted as the corresponding first prediction model;

[0007] The first original dataset is constructed through data collection;

[0008] The first original dataset is preprocessed to obtain the corresponding first training dataset;

[0009] The first prediction model is trained based on the first training dataset;

[0010] After the model training is completed, blood glucose prediction is performed on any subject based on the first prediction model.

[0011] Preferably, the first prediction model corresponds to a model signal sampling duration and a model signal sampling frequency;

[0012] The first prediction model has three model input terminals and one model output terminal; the three model input terminals are respectively the first, second and third model input terminals;

[0013] The first prediction model includes a first branch network, a second branch network, a branch output splicing layer, and a terminal linear layer;

[0014] The first and second input terminals of the first branch network are connected to the corresponding first and second model input terminals, and the output terminal is connected to the first input terminal of the branch output splicing layer. The first branch network includes an encoder, a decoder, a fully connected layer, and a branch linear layer. The input terminal of the encoder is connected to the first input terminal of the first branch network, and the output terminal is connected to the first input terminal of the decoder. The second input terminal of the decoder is connected to the second input terminal of the first branch network, and the output terminal is connected to the input terminal of the fully connected layer. The output terminal of the fully connected layer is connected to the branch linear layer. The output terminal of the branch linear layer is connected to the first input terminal of the branch output splicing layer.

[0015] The input of the second branch network is connected to the corresponding input of the third model, and its output is connected to the second input of the branch output splicing layer. The second branch network includes an ELU function layer, a gated linear layer, a residual layer, and a normalization layer. The input of the ELU function layer is connected to the input of the second branch network, and its output is connected to the input of the gated linear layer. The output of the gated linear layer is connected to the input of the residual layer. The output of the residual layer is connected to the input of the normalization layer. The output of the normalization layer is connected to the second input of the branch output splicing layer.

[0016] The output end of the branch output splicing layer is connected to the input end of the terminal linear layer;

[0017] The output of the terminal linear layer is connected to the model output.

[0018] Preferably, the first prediction model is used to predict blood glucose based on the input tensors X1, X2, and X3 and output the corresponding prediction vector Y; the first, second, and third model input terminals of the first prediction model are respectively used to receive the corresponding input tensors X1, X2, and X3; the model output terminal of the first prediction model is used to output the corresponding prediction vector Y.

[0019] The input tensor X1 has a shape of B×H1×W1; the total number of batches B is an integer greater than or equal to 1; the input tensor X1 consists of B input tensors x of shape H1×W1. 1,i Composition: 1 ≤ batch index i ≤ B; tensor height H1 is a positive integer, tensor width W1 = 4 × floor(model signal sampling duration / model signal sampling frequency), floor() is the floor function;

[0020] The input tensor X2 has a shape of B×H2×W2; the input tensor X2 consists of B input tensors x of shape H2×W2. 2,i Composition; Tensor height H2 = H1 - 1, tensor width W2 = 2;

[0021] The input tensor X3 has a shape of B×W3; the input tensor X3 consists of B input vectors x with a width of W3. 3,i Composition; Vector width W3 = 7;

[0022] The prediction vector Y consists of B predicted blood glucose values ​​y i composition;

[0023] In the first branch network, the encoder and decoder are implemented based on the transformer model encoder-decoder structure, the fully connected layer is implemented based on a fully connected neural network, and the branch linear layer is implemented based on a linear neural network. The first branch network is used to perform encoding, decoding, fully connected, and linear operations on the input tensor X1 and the input tensor X2 to obtain the corresponding linear network tensor X. L The splicing layer outputs to the branch; the linear network tensor X L B vectors with width W L Linear computation vector x L,i Composition; Vector width W L =7;

[0024] In the second branch network, the gated linear layer is implemented based on the GLU model structure, and the residual layer is implemented based on one residual module or multiple sequentially connected residual modules; the second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization processing on the input tensor X3 to obtain the corresponding standardized tensor X. NM The splicing layer output is sent to the branch; the normalized tensor X NM The shape is B×W NM B vectors with a width of W NM The standardized vector x NM,i Composition; Vector width W NM =7;

[0025] The branch output splicing layer is used to process the linear network tensor X. L and the normalized tensor X NM Tensor concatenation yields the corresponding concatenated tensor X. CAT Output to the terminal linear layer; the splicing tensor X CAT The shape is B×W CAT B vectors with a width of W CAT spliced ​​vector x CAT,i Composition; Vector width W CAT =W L +W NM ;

[0026] The terminal linear layer is implemented based on a linear layer neural network; the terminal linear layer is used to adjust the splicing tensor X. CAT The various concatenated vectors x CAT,i The corresponding predicted blood glucose value y is obtained by performing linear calculation. i And from the obtained B predicted blood glucose values ​​y i The corresponding prediction vector Y is then constructed and output.

[0027] Furthermore, the first branch network is used to perform encoding operations, decoding operations, fully connected operations, and linear operations based on the input tensor X1 and the input tensor X2 to obtain the corresponding linear network tensor X. L The output of the splicing layer to the branch specifically includes:

[0028] The encoder processes each of the input tensors x of the input tensor X1. 1,i Feature encoding is performed to obtain the corresponding encoded tensor x. EN,i And from the obtained B encoded tensors x EN,i Form the corresponding encoding tensor X EN Output to the decoder; the encoded tensor X EN B shapes of shape H EN×W EN The encoded tensor x EN,i Composition; Tensor height H EN Tensor width W EN It is a positive integer;

[0029] The decoder, based on the encoded tensor X EN Each of the coded tensors x EN,i and the corresponding input tensor x in the input tensor X2 2,i Decoding is performed to obtain the corresponding decoded tensor x. DE,i And from the obtained B decoded tensors x DE,i Form the corresponding decoding tensor X DE Output to the fully connected layer; the decoded tensor X DE B shapes of shape H DE ×W DE The decoding tensor x DE,i Composition; Tensor height H DE Tensor width W DE It is a positive integer;

[0030] The decoded tensor X is processed by the fully connected layer. DE The various decoding tensors x DE,i Perform a one-dimensional vector expansion to obtain the corresponding expanded vector x. FC,i And from the obtained B expansion vectors x FC,i The shape is B×W FC Fully connected tensor X FC Output to the linear layer of the branch; the fully connected tensor X FC B vectors with width W FC The expansion vector x FC,i Composition; Vector width W FC =H DE ×W DE ;

[0031] The branch linear layer is used to determine the fully connected tensor X. FC The various expansion vectors x FC,i Perform linear calculations to obtain the corresponding linear calculation vector x. L,i And from the obtained B linear computation vectors x L,i The shape is B×W L The linear network tensor X L Output the splicing layer to the branch.

[0032] Furthermore, the second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization processing on the input tensor X3 to obtain the corresponding standardized tensor X.NM The output of the splicing layer to the branch specifically includes:

[0033] The ELU function layer converts each of the input vectors x of the input tensor X3. 3,i Substituting the values ​​into the ELU activation function and performing function operations yields the corresponding activation vector x. ELU,i And from the obtained B activation vectors x ELU,i The shape is B×W ELU Activation tensor X ELU Output to the gated linear layer; the activation tensor X ELU B vectors with width W ELU The activation vector x ELU,i Composition; Vector width W ELU It is a positive integer;

[0034] The activation tensor X is affected by the gated linear layer. ELU Each of the activation vectors x ELU,i Temporal feature extraction is performed to obtain the corresponding gating vector x. GLU,i And from the obtained B gate vectors x GLU,i The shape is B×W GLU Gated tensor X GLU Output to the residual layer; the gate tensor X GLU B vectors with width W GLU The gate vector x GLU,i Composition; Vector width W GLU It is a positive integer;

[0035] The gate tensor X is obtained by the residual layer. GLU Each of the gate vectors x GLU,i Perform residual operations to obtain the corresponding residual vector x RS,i And from the obtained B residual vectors x RS,i The shape is B×W RS residual tensor X RS Output to the normalization layer; the residual tensor X RS B vectors with width W RS The residual vector x RS,i Composition; Vector width W RS =7;

[0036] The residual tensor X is normalized by the normalization layer. RS W RS The corresponding standardized tensor X is obtained by standardizing each feature channel. NM Output the splicing layer to the branch.

[0037] Preferably, the first original dataset includes multiple first personnel datasets;

[0038] The first personnel dataset includes a first calibration data list and a first test data list;

[0039] The first calibration data list includes a first quantity N first calibration data records; the first quantity N is consistent with the tensor height H2; the first calibration data record includes a first acquisition time, a first previous meal time, a first relative time, a first A-band PPG signal, a first B-band PPG signal, a first C-band PPG signal, a first ambient light signal, a first age, a first gender, a first height, a first weight, a first body mass index, and a first blood glucose measurement value; the first relative time is the time interval between the first acquisition time and the first previous meal time; A, B, and C bands correspond to three red light bands respectively; the first A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band;

[0040] The first test data list includes multiple first test data records; the number of first test data records is greater than N;

[0041] The first test data record includes the second acquisition time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value; the second relative time is the time interval between the second acquisition time and the second previous meal time; the second A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band;

[0042] The first training dataset includes multiple second personnel datasets;

[0043] The second personnel dataset includes a second calibration data list and a second test data list;

[0044] The second calibration data list includes N second calibration data records; the second calibration data record includes a first calibration time code, a second calibration time code, a third calibration time code, a first calibration signal code vector, a second calibration signal code vector, a third calibration signal code vector, a fourth calibration signal code vector, a first calibration age code, a first calibration gender code, a first calibration height code, a first calibration weight code, a first calibration body mass index code, and a first calibration blood glucose measurement value; the vector lengths of the first, second, third, and fourth calibration signal code vectors are consistent with the tensor width W1;

[0045] The second test data list includes multiple second test data records; the second test data records include a first test time code, a second test time code, a third test time code, a first test signal code vector, a second test signal code vector, a third test signal code vector, a fourth test signal code vector, a first test age code, a first test gender code, a first test height code, a first test weight code, a first test body mass index code, and a first test blood glucose measurement value; the vector lengths of the first, second, third, and fourth test signal code vectors are consistent with the tensor width W1.

[0046] Preferably, the step of constructing the corresponding first original dataset through data collection specifically includes:

[0047] A large number of volunteers are recruited to form the first volunteer group; the first volunteer group includes multiple first volunteers; each first volunteer corresponds to a first volunteer service period, and the first volunteer service period is in days.

[0048] And each of the first volunteers is taken as the corresponding current volunteer;

[0049] And create a corresponding first personnel dataset for the current volunteer; and initialize two empty data tables in the first personnel dataset as the corresponding first calibration data list and first test data list;

[0050] The first calibration data list is populated by collecting N post-meal calibration data from the current volunteer. Specifically, N first random time points are selected within a specified period after one or more meals of the current volunteer. At each first random time point, the current volunteer's PPG signal is collected three times based on the A / B / C red light bands to generate the corresponding first A-band PPG signal, first B-band PPG signal, and first C-band PPG signal. The ambient light signal of the current PPG signal collection environment is also collected to obtain the corresponding first ambient light signal. The current volunteer's blood glucose value is measured once using a blood glucose meter to obtain the corresponding first blood glucose measurement value. The current volunteer's age, gender, height, weight, and body mass index are statistically analyzed to obtain the corresponding first age, first gender, first height, first weight, and first body mass index. The current first random time point is used as the corresponding first collection time. The volunteer's most recent meal end time is taken as the corresponding first previous meal time. The time interval between the first acquisition time and the first previous meal time is calculated to obtain the corresponding first relative time. The first acquisition time, the first previous meal time, the first relative time, the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, the first ambient light signal, the first age, the first gender, the first height, the first weight, the first body mass index, and the first blood glucose measurement value are combined to form a corresponding first calibration data record. The obtained N first calibration data records are filled into the first calibration data list. Among them, the signal acquisition duration and signal acquisition frequency of the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, and the first ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency.

[0051] The first test data list is updated by collecting multiple random test data from the current volunteer. Specifically, any moment within the first volunteer service period of the current volunteer is taken as a corresponding second random time point. At the current second random time point, PPG signals are collected from the current volunteer three times based on the A / B / C red light bands to generate corresponding second A-band PPG signals, second B-band PPG signals, and second C-band PPG signals. The ambient light signal of the current PPG signal collection environment is also collected to obtain the corresponding second ambient light signal. A blood glucose meter is used to measure the blood glucose value of the current volunteer to obtain the corresponding second blood glucose measurement value. The age, gender, height, weight, and body mass index of the current volunteer are statistically analyzed to obtain the corresponding second age, second gender, second height, second weight, and second body mass index. The current second random time point is taken as the corresponding second... The data collection time is used, and the end time of the most recent meal of the current volunteer is taken as the corresponding second previous meal time. The time interval between the second collection time and the second previous meal time is calculated to obtain the corresponding second relative time. The second collection time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value are combined to form a corresponding first test data record and added to the first calibration data list. Among them, the signal collection duration and signal collection frequency of the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, and the second ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency.

[0052] And when all the service periods of all the first volunteers of the first volunteers have expired, the first original dataset is composed of all the first personnel datasets obtained.

[0053] Preferably, the step of preprocessing the first original dataset to obtain the corresponding first training dataset specifically includes:

[0054] The total number of records of all the first calibration data records and all the first test data records in the first original dataset is counted to obtain the corresponding first total number L1;

[0055] Then, all the first / second acquisition times of the first original dataset are extracted and formed into a data vector, which is denoted as the corresponding first vector. The first vector includes L1 first vector data, and each first vector data corresponds to a first acquisition time or a second acquisition time.

[0056] Then, all the first / second previous meal times in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding second vector; the second vector includes L1 second vector data, each of which corresponds to a first previous meal time or a second previous meal time;

[0057] Then, all the first / second relative times of the first original dataset are extracted to form a data vector, which is denoted as the corresponding third vector; the third vector includes L1 third vector data, and each third vector data corresponds to a first relative time or a second relative time.

[0058] Then, all the first / second ages in the first original dataset are extracted to form a data vector, which is denoted as the corresponding fourth vector; the fourth vector includes L1 fourth vector data, and each fourth vector data corresponds to a first age or a second age;

[0059] Then, all the first / second heights in the first original dataset are extracted to form a data vector, which is denoted as the corresponding fifth vector; the fifth vector includes L1 fifth vector data, and each fifth vector data corresponds to a first height or a second height.

[0060] Then, all the first / second weights in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding sixth vector; the sixth vector includes L1 sixth vector data, and each sixth vector data corresponds to a first weight or a second weight.

[0061] Then, all the first / second body mass indexes of the first original dataset are extracted to form a data vector, which is denoted as the corresponding seventh vector; the seventh vector includes L1 seventh vector data, and each seventh vector data corresponds to a first body mass index or a second body mass index.

[0062] Then, all the first / second genders in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding eighth vector; the eighth vector includes L1 eighth vector data, and each eighth vector data corresponds to a first gender or a second gender.

[0063] All first / second A-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding first signal set. The first signal set includes L1 first signals, each of which corresponds to a first A-band PPG signal or a second A-band PPG signal.

[0064] All first / second B-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding second signal set. The second signal set includes L1 second signals, each of which corresponds to either a first B-band PPG signal or a second B-band PPG signal.

[0065] All first / second C-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding third signal set; the third signal set includes L1 third signals, each of which corresponds to a first C-band PPG signal or a second C-band PPG signal;

[0066] All first / second ambient light signals from the first original dataset are extracted to form a signal set, denoted as the corresponding fourth signal set; the fourth signal set includes L1 fourth signals, each of which corresponds to one first ambient light signal or one second ambient light signal.

[0067] The first, second, third, fourth, fifth, sixth, and seventh vectors are normalized according to the maximum and minimum normalization method to obtain the corresponding first, second, third, fourth, fifth, sixth, and seventh normalized vectors; the first, second, third, fourth, fifth, sixth, or seventh normalized vector includes L1 corresponding first, second, third, fourth, fifth, sixth, or seventh normalized data;

[0068] The eighth vector is then normalized using a one-hot encoding mechanism to obtain the corresponding eighth normalized vector; the eighth normalized vector includes L1 eighth normalized data.

[0069] The first, second, third, and fourth signals in the first, second, third, and fourth signal sets are standardized and encoded according to the Z-score standardization method to obtain the corresponding first, second, third, and fourth signal encoding vector sets; the first, second, third, or fourth signal encoding vector set includes L1 corresponding first, second, third, or fourth signal encoding vectors;

[0070] The first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data corresponding to each of the first calibration data records, along with the first, second, third, and fourth signal encoding vectors and the first blood glucose measurement value, are used as a group to form a corresponding first calibration time code, second calibration time code, third calibration time code, first calibration age code, first calibration height code, first calibration weight code, first calibration body mass index code, first calibration gender code, first calibration signal encoding vector, second calibration signal encoding vector, third calibration signal encoding vector, fourth calibration signal encoding vector, and the first calibration blood glucose measurement value to form a corresponding second calibration data record;

[0071] Each first test data record is composed of the first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data, the first, second, third, and fourth signal encoding vectors, and the first blood glucose measurement value, forming a corresponding first test time code, second test time code, third test time code, first test age code, first test height code, first test weight code, first test body mass index code, first test gender code, first test signal encoding vector, second test signal encoding vector, third test signal encoding vector, fourth test signal encoding vector, and the first test blood glucose measurement value.

[0072] A corresponding second calibration data list is formed by N second calibration data records corresponding to each of the first personnel datasets; a corresponding second test data list is formed by all the second test data records corresponding to each of the first personnel datasets; a corresponding second personnel dataset is formed by the second calibration data list and the second test data list corresponding to each of the first personnel datasets; and a corresponding first training dataset is formed by all the obtained second personnel datasets.

[0073] Furthermore, the normalization process performed on the first, second, third, fourth, fifth, sixth, and seventh vectors using the minimum-maximum normalization method to obtain the corresponding normalized vectors (first, second, third, fourth, fifth, sixth, and seventh) specifically includes:

[0074] The first, second, third, fourth, fifth, sixth, and seventh vectors are sequentially taken as the corresponding current vector A, and each vector data of the current vector A is denoted as the corresponding vector data a. k 1 ≤ data index k ≤ L1;

[0075] Then, from a plurality of preset maximum and minimum threshold pairs, the maximum and minimum threshold pair corresponding to the current vector A is selected as the current maximum and minimum threshold pair, and the maximum and minimum threshold of the current maximum and minimum threshold is extracted as the corresponding first maximum threshold a. max and the first minimum threshold a min The plurality of maximum and minimum threshold pairs include the collection time-maximum and minimum threshold pairs, meal time-maximum and minimum threshold pairs, relative time-maximum and minimum threshold pairs, age-maximum and minimum threshold pairs, height-maximum and minimum threshold pairs, weight-maximum and minimum threshold pairs, and body mass index-maximum and minimum threshold pairs, each of which consists of a pair of maximum and minimum thresholds;

[0076] And based on the first maximum threshold a max and the first minimum threshold a min For each of the aforementioned vector data a k Normalization is performed to obtain the corresponding normalized data.

[0077] And the maximum and minimum normalized data As the corresponding second maximum threshold Second minimum threshold

[0078] And based on the second maximum threshold and the second minimum threshold For each of the normalized data Normalization is performed to obtain the corresponding normalized data.

[0079] and each of the normalized data As a first, second, third, fourth, fifth, sixth, or seventh normalized data corresponding to the current vector A; and composed of all the first, second, third, fourth, fifth, sixth, or seventh normalized data obtained this time, a corresponding first, second, third, fourth, fifth, sixth, or seventh normalized vector is formed.

[0080] Furthermore, the normalization process performed on the eighth vector using the one-hot encoding mechanism to obtain the corresponding eighth normalized vector specifically includes:

[0081] The genders male and female are set as mutually exclusive 0-1 codes to obtain the corresponding male and female gender codes; the male and female gender codes can only take two values, 0 and 1, and the male and female gender codes are mutually exclusive.

[0082] For each eighth vector data that matches the gender of male or female, a corresponding eighth normalized data is set; and each eighth normalized data corresponding to the gender of male is set as the corresponding gender of male; and each eighth normalized data corresponding to the gender of female is set as the corresponding gender of female; and all the obtained eighth normalized data are combined to form a corresponding eighth normalized vector.

[0083] Furthermore, the step of standardizing and encoding each of the first, second, third, and fourth signals in the first, second, third, and fourth signal sets according to the Z-score normalization method to obtain the corresponding first, second, third, and fourth signal encoding vector sets specifically includes:

[0084] Each of the first, second, third, and fourth signals is taken as the corresponding current signal in sequence;

[0085] The current signal is then resampled according to the sampling frequency of the model signal to obtain the corresponding resampled signal;

[0086] The resampled signal segment with a front end length equal to the sampling duration of the model signal is extracted and used as the corresponding truncated signal S;

[0087] The total number of sampling points Q of the intercepted signal S is obtained by counting the total number of sampling points Q; the total number of sampling points Q matches one-quarter of the tensor width W1;

[0088] The signal data of each sampling point of the intercepted signal S is recorded as the corresponding sampling point data s. q 1 ≤ sampling point index q ≤ Q;

[0089] And the data s of each sampling point are normalized according to the Z-score method. q Standardization is performed to obtain the corresponding normalized code.

[0090] μ is the mean and σ is the standard deviation;

[0091] And by all the obtained normalized codes A corresponding normalized encoding vector is formed; and the normalized encoding vector obtained this time is used as the first, second, third or fourth signal encoding vector corresponding to the current signal;

[0092] The first signal encoding vector set is formed by all the obtained first signal encoding vectors; the second signal encoding vector set is formed by all the obtained second signal encoding vectors; the third signal encoding vector set is formed by all the obtained third signal encoding vectors; and the fourth signal encoding vector set is formed by all the obtained fourth signal encoding vectors.

[0093] Preferably, training the first prediction model based on the first training dataset specifically includes:

[0094] Step 121: Extract all the second test data records from the first training dataset to form a first record sequence; and count the total number of the second test data records in the first record sequence to obtain the corresponding first record total number; set the batch total number B of the first prediction model to an integer greater than 1 but less than or equal to the first record total number; and take the first second test data record of the first record sequence as the corresponding current starting record; and take the Bth-to-last second test data record of the first record sequence as the corresponding first ending record.

[0095] Step 122: Extract the B second test data records from the first record sequence starting from the current starting record to form a corresponding second record sequence;

[0096] Step 123 involves preparing the model input vector and model label vector based on the second record sequence to obtain the corresponding input tensor X1, input tensor X2, input tensor X3, and label vector Y. * ;

[0097] Specifically, step 1231 involves taking each of the second test data records in the second record sequence as the corresponding current data record, and taking the second calibration data list corresponding to the current data record in the first training dataset as the corresponding current calibration data list.

[0098] Step 1232 involves concatenating the first, second, third, and fourth calibration signal encoding vectors of each of the second calibration data records in the current calibration data list to obtain a calibration signal concatenation vector with a length equal to the tensor width W1; and forming a calibration signal concatenation tensor of shape N×W1=H2×W1 by the N signal concatenation vectors in the current calibration data list; concatenating the first, second, third, and fourth test signal encoding vectors of the current data record to obtain a test signal concatenation vector with a length equal to the tensor width W1; and forming an input tensor x of shape (N+1)×W1=(H2+1)×W1=H1×W1 by the calibration signal concatenation tensor and the test signal concatenation vector. 1,i ;

[0099] Step 1233, and the third calibration time code of each of the second calibration data records in the current calibration data list and the first calibration blood glucose measurement value are combined to form a calibration encoding vector whose vector width matches the tensor width W2; and the N calibration encoding vectors in the current calibration data list are combined to form an input tensor x with shape N×W2=H2×W2. 2,i ;

[0100] Steps 1, 2, 3, and 4 involve composing a corresponding input vector x from the first test time code, the third test time code, the first test age code, the first test gender code, the first test height code, the first test weight code, and the first test body mass index code recorded in the current data. 3,i ;

[0101] Step 1235, and use the first test blood glucose measurement value recorded in the current data record as the corresponding tag blood glucose value.

[0102] Step 1236, and the B input tensors x corresponding to the second record sequence. 1,i The corresponding input tensor X1 and B input tensors x are composed of... 2,i The corresponding input tensor X2 and B input tensors x are composed of... 3,i The input tensor X3 and the B labeled blood glucose values ​​are composed of the corresponding input tensor. The corresponding label vector Y is formed. * ;

[0103] Step 124: Input tensor X1, input tensor X2, and input tensor X3 are input into the first prediction model to predict blood glucose levels, resulting in B predicted blood glucose values ​​y. iThe prediction vector Y is composed of the prediction vector Y; and the prediction vector Y and the label vector Y are combined. * Input the preset model loss function Loss M The corresponding first loss value is obtained through calculation;

[0104] The model loss function Loss M for:

[0105] Step 125: Identify whether the first loss value meets the preset first loss value range; if the first loss value does not meet the first loss value range, perform a round of model parameter optimization on the first prediction model based on the preset model parameter optimization algorithm, and return to step 124 to continue training when the model parameter optimization ends; if the first loss value meets the first loss value range, identify whether the current starting record matches the first ending record; if they do not match, take the next second test data record of the first record sequence as the new current starting record and return to step 122 to continue training; if they match, stop model training and confirm that the model training has ended.

[0106] Preferably, the step of performing blood glucose prediction processing on any subject based on the first prediction model specifically includes:

[0107] The current test subject is designated as the corresponding first test subject;

[0108] Within a specified time period following one or more meals of the first subject, N third random time points are selected. At each third random time point, PPG signals are acquired three times based on the A / B / C red light bands to generate corresponding third A-band PPG signals, third B-band PPG signals, and third C-band PPG signals. The ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding third ambient light signal. A blood glucose meter is used to measure the blood glucose value of the first subject to obtain the corresponding third blood glucose measurement value. The age, gender, height, weight, and body mass index of the first subject are statistically analyzed to obtain corresponding third age, third gender, third height, third weight, and third body mass index. The current third random time point is used as the corresponding third acquisition time, and the end time of the first subject's most recent meal is used as the corresponding third previous meal time. The time interval between the third acquisition time and the third previous meal time is calculated to obtain the corresponding third relative time. A first historical calibration record is formed by the third acquisition time, the third previous meal time, the third relative time, the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal, the third ambient light signal, the third age, the third gender, the third height, the third weight, the third body mass index, and the third blood glucose measurement value. A first historical calibration list is formed by N such first historical calibration records. The signal acquisition duration and frequency of the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal, and the third ambient light signal are all the same and greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency.

[0109] At any time after saving the first historical calibration list, PPG signals are acquired three times from the first subject based on the A / B / C red light bands to generate corresponding fourth A-band PPG signals, fourth B-band PPG signals, and fourth C-band PPG signals. The ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding fourth ambient light signal. Furthermore, the age, gender, height, weight, and body mass index of the first subject are statistically analyzed to obtain corresponding fourth age, fourth gender, fourth height, fourth weight, and fourth body mass index. The current fourth random time point is taken as the corresponding fourth acquisition time. The end time of the first subject's most recent meal is taken as the corresponding fourth previous meal time. The time interval between the fourth acquisition time and the fourth previous meal time is calculated to obtain the corresponding fourth relative time. The fourth acquisition time, the fourth previous meal time, the fourth relative time, the fourth A-band PPG signal, the fourth B-band PPG signal, the fourth C-band PPG signal, the fourth ambient light signal, the fourth age, the fourth gender, the fourth height, the fourth weight, the fourth body mass index, and the fourth blood glucose measurement value are combined to form a corresponding first real-time detection record.

[0110] The total batch size B of the first prediction model is set to 1; the model input tensors X1, X2, and X3 are prepared according to the first historical calibration list and the first real-time detection record; the input tensors X1, X2, and X3 are input into the first prediction model to predict blood glucose and obtain the corresponding prediction vector Y; and the unique predicted blood glucose value y in the prediction vector Y is used as the reference. i The extracted value is used as the corresponding predicted blood glucose value for this test.

[0111] A second aspect of the present invention provides an apparatus for implementing the processing method of the PPG signal blood glucose prediction model described in the first aspect above, the apparatus comprising: a model building module, a data acquisition module, a data preprocessing module, a model training module, and a model application module;

[0112] The model building module is used to build a PPG signal blood glucose prediction model, denoted as the corresponding first prediction model;

[0113] The data acquisition module is used to construct the corresponding first raw dataset through data acquisition;

[0114] The data preprocessing module is used to preprocess the first original dataset to obtain the corresponding first training dataset.

[0115] The model training module is used to train the first prediction model based on the first training dataset.

[0116] The model application module is used to perform blood glucose prediction processing on any subject based on the first prediction model after the model training is completed.

[0117] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;

[0118] The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above;

[0119] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

[0120] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.

[0121] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing a PPG signal blood glucose prediction model. As described above, this invention constructs a PPG signal blood glucose prediction model, denoted as the first prediction model, and builds a corresponding first original dataset through data acquisition. The first original dataset is then preprocessed to obtain a corresponding first training dataset, and the first prediction model is trained based on the first training dataset. After training, blood glucose prediction is performed on any subject based on the first prediction model. In this invention's technical solution, the subject only needs to retain a few historical calibration records initially through optical signal acquisition and invasive blood glucose value acquisition. Subsequently, at any time, real-time blood glucose prediction can be performed based on the first prediction model provided by this invention, using the historical calibration records and real-time acquired PPG signals. The non-invasive blood glucose prediction solution provided by this invention effectively improves user experience and increases user self-testing enthusiasm. Attached Figure Description

[0122] Figure 1 is a schematic diagram of a processing method for a PPG signal blood glucose prediction model provided in Embodiment 1 of the present invention;

[0123] Figure 2 is a block diagram of the first prediction model provided in Embodiment 1 of the present invention;

[0124] Figure 3 is a block diagram of a processing device for a PPG signal blood glucose prediction model provided in Embodiment 2 of the present invention;

[0125] Figure 4 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0126] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0127] Embodiment 1 of the present invention provides a processing method for a PPG signal blood glucose prediction model. Figure 1 is a schematic diagram of a processing method for a PPG signal blood glucose prediction model provided in Embodiment 1 of the present invention. The method mainly includes the following steps:

[0128] Step 1: Construct a PPG signal blood glucose prediction model, denoted as the corresponding first prediction model.

[0129] Here, as shown in Figure 2, which is a module structure diagram of the first prediction model provided in Embodiment 1 of the present invention, the first prediction model of the present invention has three model input terminals and one model output terminal; the three model input terminals are respectively the first, second and third model input terminals; the first prediction model includes a first branch network, a second branch network, a branch output splicing layer and a terminal linear layer.

[0130] As shown in Figure 2, the connection relationship of each module in the first prediction model of this embodiment is as follows: 1) The first and second input terminals of the first branch network are connected to the corresponding first and second model input terminals, and the output terminal is connected to the first input terminal of the branch output splicing layer; the first branch network includes an encoder, a decoder, a fully connected layer, and a branch linear layer; the input terminal of the encoder is connected to the first input terminal of the first branch network, and the output terminal is connected to the first input terminal of the decoder; the second input terminal of the decoder is connected to the second input terminal of the first branch network, and the output terminal is connected to the input terminal of the fully connected layer; the output terminal of the fully connected layer is connected to the branch linear layer; the output terminal of the branch linear layer is connected to the first input terminal of the branch output splicing layer. 1) The second branch network is connected to the corresponding third model input, and its output is connected to the second input of the branch output splicing layer. The second branch network includes an ELU function layer, a gated linear layer, a residual layer, and a normalization layer. The input of the ELU function layer is connected to the input of the second branch network, and its output is connected to the input of the gated linear layer. The output of the gated linear layer is connected to the input of the residual layer. The output of the residual layer is connected to the input of the normalization layer. The output of the normalization layer is connected to the second input of the branch output splicing layer. 2) The input of the branch output splicing layer is connected to the input of the terminal linear layer. 3) The output of the terminal linear layer is connected to the model output.

[0131] The function of the first prediction model in this embodiment of the invention is described below: The first prediction model is used to predict blood glucose based on the input tensors X1, X2 and X3 and output the corresponding prediction vector Y;

[0132] The first, second, and third model input terminals of the first prediction model are used to receive the corresponding input tensors X1, X2, and X3, respectively; the model output terminal of the first prediction model is used to output the corresponding prediction vector Y.

[0133] The input tensor X1 has a shape of B×H1×W1; here, the total number of batches B is an integer greater than or equal to 1; the input tensor X1 consists of B input tensors x1 and x2 of shape H1×W1. 1,i Composition, 1≤batch index i≤B; tensor height H1 is a positive integer, tensor width W1=4×floor(model signal sampling duration / model signal sampling frequency), floor() is the floor function; here, the first prediction model of this embodiment corresponds to a pre-set model signal sampling duration and a pre-set model signal sampling frequency;

[0134] The input tensor X2 has a shape of B×H2×W2; the input tensor X2 consists of B input tensors x of shape H2×W2. 2,i Composition; Tensor height H2 = H1 - 1, tensor width W2 = 2;

[0135] The input tensor X3 has a shape of B×W3; the input tensor X3 consists of B input vectors x with a width of W3. 3,i Composition; Vector width W3 = 7;

[0136] The prediction vector Y consists of B predicted blood glucose values ​​y i composition.

[0137] The functions of each module in the first prediction model of this invention are described below:

[0138] 1) In the first branch network, the encoder and decoder are implemented based on the encoder-decoder structure of the transformer model, the fully connected layer is implemented based on a fully connected neural network, and the branch linear layer is implemented based on a linear neural network. The first branch network is used to perform encoding, decoding, fully connected, and linear operations on the input tensor X1 and input tensor X2 to obtain the corresponding linear network tensor X. L Output to the splicing layer of the branch output;

[0139] Among them, the linear network tensor X L B vectors with width W L Linear computation vector x L,iComposition; Vector width W L =7;

[0140] The first branch network is used to perform encoding, decoding, fully connected operations, and linear operations on the input tensors X1 and X2 to obtain the corresponding linear network tensor X. L Outputting the splicing layer to the branch output specifically includes:

[0141] Step A1, the encoder processes each input tensor x of the input tensor X1. 1,i Feature encoding is performed to obtain the corresponding encoded tensor x. EN,i And from the obtained B encoded tensors x EN,i Form the corresponding encoding tensor X EN Output to the decoder;

[0142] Among them, the encoding tensor X EN B shapes of shape H EN ×W EN The encoded tensor x EN,i Composition; Tensor height H EN Tensor width W EN It is a positive integer;

[0143] Step A2, the decoder determines the encoding tensor X. EN Each encoded tensor x EN,i and the corresponding input tensor x in input tensor X2 2,i Decoding is performed to obtain the corresponding decoded tensor x. DE,i And from the obtained B decoded tensors x DE,i Form the corresponding decoding tensor X DE Output to the fully connected layer;

[0144] Among them, the decoding tensor X DE B shapes of shape H DE ×W DE Decoding tensor x DE,i Composition; Tensor height H DE Tensor width W DE It is a positive integer;

[0145] Step A3, the fully connected layer decodes the tensor X. DE Each decoding tensor x DE,i Perform a one-dimensional vector expansion to obtain the corresponding expanded vector x. FC,i And from the obtained B expanded vectors x FC,i The shape is B×W FC Fully connected tensor X FC Output to the branch linear layer;

[0146] Among them, the fully connected tensor X FCB vectors with width W FC The expanded vector x FC,i Composition; Vector width W FC =H DE ×W DE ;

[0147] Step A4, the branch linear layer is used to calculate based on the fully connected tensor X. FC The various expansion vectors x FC,i Perform linear calculations to obtain the corresponding linear calculation vector x. L,i And from the obtained B linear computation vectors x L,i The shape is B×W L Linear network tensor X L Output to the splicing layer of the branch output;

[0148] 2) In the second branch network, the gated linear layer is implemented based on the GLU (Gated Linear Units) model structure, and the residual layer is implemented based on one residual module or multiple sequentially connected residual modules; the second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization processing on the input tensor X3 to obtain the corresponding standardized tensor X. NM Output to the splicing layer of the branch output;

[0149] Among them, the standardized tensor X NM The shape is B×W NM B vectors with a width of W NM The standardized vector x NM,i Composition; Vector width W NM =7;

[0150] The second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization on the input tensor X3 to obtain the corresponding standardized tensor X. NM Output to the splicing layer of the branch output, specifically including:

[0151] Step B1, the ELU function layer converts the input vectors x of the input tensor X3 into input vectors x. 3,i Substituting the values ​​into the ELU (Exponential Linear Units) activation function and performing function operations yields the corresponding activation vector x. ELU,i And from the obtained B activation vectors x ELU,i The shape is B×W ELU Activation tensor X ELU Output to the gated linear layer;

[0152] Among them, the activation tensor X ELU B vectors with width W ELU activation vector x ELU,iComposition; Vector width W ELU It is a positive integer;

[0153] Here, the ELU activation function can introduce non-linear processing capabilities to the second branch network. The reason for choosing the ELU function as the activation function of the second branch network instead of the conventional ReLU and Sigmoid functions is that, on the one hand, the ELU function will not have a gradient of zero for any input, unlike the ReLU or Sigmoid functions which will have a gradient of zero and thus cause gradient vanishing. On the other hand, the ELU function will not encounter the gradient explosion problem like the Sigmoid function.

[0154] Step B2, the gated linear layer applies the activation tensor X ELU Each activation vector x ELU,i Temporal feature extraction is performed to obtain the corresponding gating vector x. GLU,i And from the obtained B gate vectors x GLU,i The shape is B×W GLU Gated tensor X GLU Output to the residual layer;

[0155] Among them, the gate tensor X GLU B vectors with width W GLU The gate vector x GLU,i Composition; Vector width W GLU It is a positive integer;

[0156] Here, the expression for the gated linear layer is as follows:

[0157] Where W1, W2, b1, and b2 are the four model parameters of the GLU model. The symbol is for the Hadamard product, and Sigmoid() is the Sigmoid function. This embodiment of the invention introduces a gated linear layer to control the influence of other nonlinear features (such as acquisition time, relative time, age, gender, height, weight, and body mass index) on the predicted blood glucose.

[0158] Step B3, the gate tensor X is obtained from the residual layer. GLU Each gate vector x GLU,i Perform residual operations to obtain the corresponding residual vector x RS,i And from the obtained B residual vectors x RS,i The shape is B×W RS residual tensor X RS Output to the standardization layer;

[0159] Among them, residual tensor X RS B vectors with width WRS The residual vector x RS,i Composition; Vector width W RS =7;

[0160] Step B4, the residual tensor X is normalized by the normalized layer. RS W RS The corresponding standardized tensor X is obtained by standardizing each feature channel. NM Output to the splicing layer of the branch output;

[0161] 3) The branch output splicing layer is used to process the tensor X of the linear network. L and the standardized tensor X NM Tensor concatenation yields the corresponding concatenated tensor X. CAT Output to the end linear layer;

[0162] Among them, the splicing tensor X CAT The shape is B×W CAT B vectors with a width of W CAT spliced ​​vector x CAT,i Composition; Vector width W CAT =W L +W NM ;

[0163] 4) The terminal linear layer is implemented based on a linear layer neural network; the terminal linear layer is used to calculate the concatenated tensor X. CAT The various concatenated vectors x CAT,i Linear calculations are performed to obtain the corresponding predicted blood glucose value y. i And from the obtained B predicted blood glucose values ​​y i The corresponding prediction vector Y is constructed and output.

[0164] Step 2: Construct the corresponding first raw dataset through data collection;

[0165] The first original dataset includes multiple first-person datasets;

[0166] The first personnel dataset includes a first calibration data list and a first test data list;

[0167] The first calibration data list includes a first quantity of N first calibration data records; the first quantity N is consistent with the tensor height H2; the first calibration data record includes the first acquisition time, the first previous meal time, the first relative time, the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, the first ambient light signal, the first age, the first gender, the first height, the first weight, the first body mass index (BMI), and the first blood glucose measurement value; the first relative time is the time interval between the first acquisition time and the first previous meal time; the A, B, and C bands correspond to three red light bands, which are normally the 1050nm, 940nm, and 650nm bands, but can be set differently based on actual application requirements; the first A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band;

[0168] The first test data list includes multiple first test data records; the number of first test data records is greater than N;

[0169] The first test data record includes the second acquisition time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value; the second relative time is the time interval between the second acquisition time and the second previous meal time; the second A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band;

[0170] The current step 2 specifically includes:

[0171] Step 21: Recruit a large number of volunteers to form the first volunteer group;

[0172] The first volunteer set includes multiple first volunteers; each first volunteer corresponds to a first volunteer service period, which is in days.

[0173] Step 22, and designate each first volunteer as the corresponding current volunteer;

[0174] Step 23, and create a corresponding first personnel dataset for the current volunteer; and initialize two empty data tables in the first personnel dataset as the corresponding first calibration data list and first test data list;

[0175] Step 24, and populate the corresponding first calibration data list by collecting N post-meal calibration data from the current volunteer;

[0176] Specifically, the process involves selecting N random time points within a specified timeframe following one or more meals of the current volunteer; at each random time point, three PPG signal acquisitions are performed on the current volunteer based on the A / B / C red light bands to generate corresponding first A-band PPG signal, first B-band PPG signal, and first C-band PPG signal; the ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding first ambient light signal; and a blood glucose meter is used to measure the current volunteer's blood glucose level to obtain the corresponding first blood glucose measurement value. Furthermore, the current volunteer's age, gender, height, weight, and body mass index are statistically analyzed to obtain corresponding first age, first gender, first height, first weight, and first body mass index. The body mass index (BMI) is calculated, and the current first random time point is taken as the corresponding first collection time. The end time of the most recent meal of the current volunteer is taken as the corresponding first previous meal time. The time interval between the first collection time and the first previous meal time is calculated to obtain the corresponding first relative time. The first collection time, the first previous meal time, the first relative time, the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, the first ambient light signal, the first age, the first gender, the first height, the first weight, the first body mass index, and the first blood glucose measurement value are combined to form a corresponding first calibration data record. The obtained N first calibration data records are then filled into the first calibration data list.

[0177] Among them, the signal acquisition duration and signal acquisition frequency of the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal and the first ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and model signal sampling frequency.

[0178] Step 25, and update the corresponding first test data list by collecting multiple random test data from the current volunteer;

[0179] Specifically, the process involves: using any moment within the current volunteer's first volunteer service period as a corresponding second random time point; and at this second random time point, performing three PPG signal acquisitions on the current volunteer based on the A / B / C red light bands to generate corresponding second A-band PPG signals, second B-band PPG signals, and second C-band PPG signals. The ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding second ambient light signal. Furthermore, a blood glucose measurement is performed on the current volunteer using a blood glucose meter to obtain the corresponding second blood glucose measurement value. Finally, the current volunteer's age, gender, height, weight, and body mass index are statistically analyzed to obtain corresponding second age, second gender, and second height. The data includes the second weight, the second body mass index, and the current second random time point as the corresponding second collection time. The end time of the volunteer's most recent meal is taken as the corresponding second previous meal time. The time interval between the second collection time and the second previous meal time is calculated to obtain the corresponding second relative time. The second collection time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value are combined to form a corresponding first test data record, which is added to the first calibration data list.

[0180] Among them, the signal acquisition duration and signal acquisition frequency of the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, and the second ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and model signal sampling frequency.

[0181] Step 26, and when all the first volunteers' service time limits have expired, the obtained datasets of all first volunteers are used to form the corresponding first original dataset.

[0182] Step 3: Perform data preprocessing on the first original dataset to obtain the corresponding first training dataset;

[0183] The first training dataset includes multiple second personnel datasets;

[0184] The second personnel dataset includes a second calibration data list and a second test data list;

[0185] The second calibration data list includes N second calibration data records; each second calibration data record includes a first calibration time code, a second calibration time code, a third calibration time code, a first calibration signal code vector, a second calibration signal code vector, a third calibration signal code vector, a fourth calibration signal code vector, a first calibration age code, a first calibration gender code, a first calibration height code, a first calibration weight code, a first calibration body mass index code, and a first calibration blood glucose measurement value; the vector lengths of the first, second, third, and fourth calibration signal code vectors are consistent with the tensor width W1;

[0186] The second test data list includes multiple second test data records; the second test data records include the first test time code, the second test time code, the third test time code, the first test signal code vector, the second test signal code vector, the third test signal code vector, the fourth test signal code vector, the first test age code, the first test gender code, the first test height code, the first test weight code, the first test body mass index code, and the first test blood glucose measurement value; the vector lengths of the first, second, third, and fourth test signal code vectors are consistent with the tensor width W1;

[0187] The current step 3 specifically includes:

[0188] Step 3-1: Calculate the total number of records of all first calibration data records and all first test data records in the first original dataset to obtain the corresponding first total number L1;

[0189] Step 3-2, and extract all the first / second acquisition times from the first original dataset to form a data vector, which is denoted as the corresponding first vector;

[0190] The first vector includes L1 first vector data, each first vector data corresponding to a first acquisition time or a second acquisition time;

[0191] Step 3-3: Extract all the first / second previous meal times from the first original dataset and form a data vector, which is denoted as the corresponding second vector.

[0192] The second vector includes L1 second vector data, each second vector data corresponding to a first previous meal time or a second previous meal time;

[0193] Steps 3-4: Extract all the first / second relative times from the first original dataset and form a data vector, which is denoted as the corresponding third vector;

[0194] The third vector includes L1 third vector data, each of which corresponds to a first relative time or a second relative time.

[0195] Steps 3-5: Extract all first / second ages from the first original dataset and form a data vector, which is denoted as the corresponding fourth vector;

[0196] The fourth vector includes L1 fourth vector data, each of which corresponds to a first age or a second age.

[0197] Steps 3-6: Extract all the first / second heights from the first original dataset and form a data vector, which is denoted as the corresponding fifth vector;

[0198] Among them, the fifth vector includes L1 fifth vector data, each fifth vector data corresponds to a first height or a second height;

[0199] Steps 3-7: Extract all the first / second weights from the first original dataset and form a data vector, which is denoted as the corresponding sixth vector;

[0200] The sixth vector includes L1 sixth vector data, each of which corresponds to a first weight or a second weight.

[0201] Steps 3-8: Extract all the first / second body mass indices from the first original dataset and form a data vector, which is denoted as the corresponding seventh vector;

[0202] The seventh vector includes L1 seventh vector data, each of which corresponds to a first body mass index or a second body mass index.

[0203] Steps 3-9: Extract all first / second genders from the first original dataset and form a data vector, which is denoted as the corresponding eighth vector;

[0204] The eighth vector includes L1 eighth vector data, each of which corresponds to a first gender or a second gender.

[0205] Steps 3-10: Extract all first / second A-band PPG signals from the first original dataset to form a signal set, denoted as the corresponding first signal set;

[0206] The first signal set includes L1 first signals, each of which corresponds to a first A-band PPG signal or a second A-band PPG signal.

[0207] Step 3-11, and extract all the first / second B-band PPG signals from the first original dataset to form a signal set, which is denoted as the corresponding second signal set;

[0208] The second signal set includes L1 second signals, each of which corresponds to a first B-band PPG signal or a second B-band PPG signal.

[0209] Steps 3-12: Extract all first / second C-band PPG signals from the first original dataset to form a signal set, which is denoted as the corresponding third signal set.

[0210] The third signal set includes L1 third signals, each of which corresponds to a first C-band PPG signal or a second C-band PPG signal.

[0211] Steps 3-13: Extract all the first / second ambient light signals from the first original dataset to form a signal set, which is denoted as the corresponding fourth signal set;

[0212] The fourth signal set includes L1 fourth signals, each of which corresponds to a first ambient light signal or a second ambient light signal.

[0213] Steps 3-14 are performed, and the first, second, third, fourth, fifth, sixth, and seventh vectors are normalized according to the maximum and minimum normalization method to obtain the corresponding first, second, third, fourth, fifth, sixth, and seventh normalized vectors;

[0214] Among them, the first, second, third, fourth, fifth, sixth or seventh normalized vectors include L1 corresponding first, second, third, fourth, fifth, sixth or seventh normalized data;

[0215] Specifically, this includes step 3-14-1, where the first, second, third, fourth, fifth, sixth, and seventh vectors are sequentially taken as the corresponding current vector A, and each vector data of the current vector A is recorded as the corresponding vector data a. k 1 ≤ data index k ≤ L1;

[0216] Step 3-14-2: Select the maximum-minimum threshold pair corresponding to the current vector A from the preset multiple maximum-minimum threshold pairs as the current maximum-minimum threshold pair, and extract the maximum-minimum threshold of the current maximum-minimum threshold as the corresponding first maximum threshold a. max and the first minimum threshold a min ;

[0217] Among them, multiple maximum and minimum threshold pairs include the collection time-maximum and minimum threshold pair, meal time-maximum and minimum threshold pair, relative time-maximum and minimum threshold pair, age-maximum and minimum threshold pair, height-maximum and minimum threshold pair, weight-maximum and minimum threshold pair, and body mass index-maximum and minimum threshold pair. Each maximum and minimum threshold pair consists of a pair of maximum and minimum thresholds.

[0218] Step 3-14-3, and based on the first maximum threshold a max and the first minimum threshold a min For each vector data a k Normalization is performed to obtain the corresponding normalized data.

[0219] in,

[0220] Step 3-14-4, and then the maximum and minimum normalized data. As the corresponding second maximum threshold Second minimum threshold

[0221] Steps 3-14-5, and based on the second maximum threshold Second minimum threshold For each normalized data Normalization is performed to obtain the corresponding normalized data.

[0222] in,

[0223] Steps 3-14-16, and then normalize each data set. As a first, second, third, fourth, fifth, sixth, or seventh normalized data corresponding to the current vector A; and composed of all the first, second, third, fourth, fifth, sixth, or seventh normalized data obtained this time, a corresponding first, second, third, fourth, fifth, sixth, or seventh normalized vector is formed.

[0224] Steps 3-15 are performed, and the eighth vector is normalized according to the one-hot encoding mechanism to obtain the corresponding eighth normalized vector;

[0225] The eighth normalized vector includes L1 eighth normalized data points;

[0226] Specifically, this includes: Step 3-15-1, setting the genders male and female as mutually exclusive 0-1 codes to obtain the corresponding male and female gender codes;

[0227] Among them, the gender code for male and the gender code for female can only take two values, 0 and 1, and the gender code for male and the gender code for female are mutually exclusive;

[0228] Step 3-15-2: Set a corresponding eighth normalized data for the eighth vector data that matches the gender male or female; set each eighth normalized data corresponding to the gender male as the corresponding gender male code; set each eighth normalized data corresponding to the gender female as the corresponding gender female code; and form a corresponding eighth normalized vector from all the obtained eighth normalized data.

[0229] Step 3-16, and standardize the encoding of each of the first, second, third, and fourth signals in the first, second, third, and fourth signal sets according to the Z-score normalization method to obtain the corresponding first, second, third, and fourth signal encoding vector sets;

[0230] The set of first, second, third, or fourth signal coding vectors includes L1 corresponding first, second, third, or fourth signal coding vectors;

[0231] Specifically, this includes: step 3-16-1, where each of the first, second, third, and fourth signals is taken as the corresponding current signal in sequence;

[0232] Step 3-16-2, and resample the current signal according to the model signal sampling frequency to obtain the corresponding resampled signal;

[0233] Step 3-16-3, and extract the signal segment with a length equal to the sampling time of the model signal from the front end of the resampled signal as the corresponding truncated signal S;

[0234] Step 3-16-4, and count the total number of sampling points of the intercepted signal S to obtain the corresponding total number of sampling points Q;

[0235] Among them, the total number of sampling points Q matches one-quarter of the tensor width W1;

[0236] Step 3-16-5, and record the signal data of each sampling point of the intercepted signal S as the corresponding sampling point data s. q 1 ≤ sampling point index q ≤ Q;

[0237] Step 3-16-6, and normalize the data at each sampling point according to the Z-score method. q Standardization is performed to obtain the corresponding normalized code.

[0238] in,

[0239] μ is the mean and σ is the standard deviation;

[0240] Step 3-16-7, and from all the obtained normalized codes A corresponding normalized coding vector is formed; and the normalized coding vector obtained this time is used as the first, second, third or fourth signal coding vector corresponding to the current signal;

[0241] Steps 3-16-8 are performed, and the obtained first signal encoding vectors form the corresponding first signal encoding vector set; the obtained second signal encoding vectors form the corresponding second signal encoding vector set; the obtained third signal encoding vectors form the corresponding third signal encoding vector set; and the obtained fourth signal encoding vectors form the corresponding fourth signal encoding vector set.

[0242] Steps 3-17: The first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data corresponding to each first calibration data record, along with the first, second, third, and fourth signal encoding vectors and the first blood glucose measurement value, are used as a set of corresponding first calibration time code, second calibration time code, third calibration time code, first calibration age code, first calibration height code, first calibration weight code, first calibration body mass index code, first calibration gender code, first calibration signal encoding vector, second calibration signal encoding vector, third calibration signal encoding vector, fourth calibration signal encoding vector, and the first calibration blood glucose measurement value to form a corresponding second calibration data record;

[0243] Steps 3-18: The first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data corresponding to each first test data record, as well as the first, second, third, and fourth signal encoding vectors and the first blood glucose measurement value, are used as a set of corresponding first test time code, second test time code, third test time code, first test age code, first test height code, first test weight code, first test body mass index code, first test gender code, first test signal encoding vector, second test signal encoding vector, third test signal encoding vector, fourth test signal encoding vector, and first test blood glucose measurement value to form a corresponding second test data record;

[0244] Steps 3-19 are performed, and a corresponding second calibration data list is formed by N second calibration data records corresponding to each first personnel dataset; a corresponding second test data list is formed by all second test data records corresponding to each first personnel dataset; a corresponding second personnel dataset is formed by the second calibration data list and the second test data list corresponding to each first personnel dataset; and a corresponding first training dataset is formed by all the obtained second personnel datasets.

[0245] Step 4: Train the first prediction model based on the first training dataset;

[0246] Specifically, this includes: Step 41, extracting all the second test data records from the first training dataset to form a first record sequence; and calculating the total number of the second test data records in the first record sequence to obtain the corresponding total number of first records; setting the total number of batches B of the first prediction model to an integer greater than 1 but less than or equal to the total number of first records; taking the first second test data record of the first record sequence as the corresponding current starting record; and taking the Bth-th-to-last second test data record of the first record sequence as the corresponding first ending record;

[0247] Step 42: Extract the B second test data records from the first record sequence starting from the current starting record to form the corresponding second record sequence;

[0248] Step 43, and based on the second record sequence, prepare the model input vector and model label vector to obtain the corresponding input tensor X1, input tensor X2, input tensor X3 and label vector Y. * ;

[0249] Specifically, this includes: step 431, taking each second test data record of the second record sequence as the corresponding current data record; and taking the second calibration data list corresponding to the current data record in the first training dataset as the corresponding current calibration data list;

[0250] Step 432 involves concatenating the first, second, third, and fourth calibration signal encoding vectors of each second calibration data record in the current calibration data list to obtain a calibration signal concatenation vector with a length of tensor width W1; and forming a calibration signal concatenation tensor of shape N×W1=H2×W1 from the N signal concatenation vectors of the current calibration data list; concatenating the first, second, third, and fourth test signal encoding vectors of the current data record to obtain a test signal concatenation vector with a length of tensor width W1; and forming an input tensor x of shape (N+1)×W1=(H2+1)×W1=H1×W1 from the calibration signal concatenation tensor and the test signal concatenation vector. 1,i ;

[0251] Step 433, and a calibration encoding vector with a vector width matching the tensor width W2 is formed by the third calibration time code of each second calibration data record in the current calibration data list and the first calibration blood glucose measurement value; and an input tensor x with shape N×W2=H2×W2 is formed by the N calibration encoding vectors in the current calibration data list. 2,i ;

[0252] Step 434, and a corresponding input vector x is formed by the first test time code, the third test time code, the first test age code, the first test gender code, the first test height code, the first test weight code, and the first test body mass index code of the current data record. 3,i ;

[0253] Step 435, and use the first test blood glucose measurement value recorded in the current data record as the corresponding tag blood glucose value.

[0254] Step 436, and the B input tensors x corresponding to the second record sequence. 1,i The corresponding input tensor X1 and B input tensors x are formed. 2,i The corresponding input tensor X2 and B input tensors x are formed. 3,i This forms the corresponding input tensor X3 and B labeled blood glucose values. Form the corresponding label vector Y * ;

[0255] Step 44: Input tensors X1, X2, and X3 are input into the first prediction model to predict blood glucose levels, resulting in B predicted blood glucose values ​​y. i The prediction vector Y is composed of the label vector Y; and the prediction vector Y and the label vector Y are combined. * Input the preset model loss function Loss M The corresponding first loss value is obtained through calculation;

[0256] Wherein, the model loss function Loss M :

[0257] Here, in this embodiment of the invention, the mean squared error (MSE) loss function is used as the model loss function. M ;

[0258] Step 45: Identify whether the first loss value meets the preset first loss value range; if the first loss value does not meet the first loss value range, perform a round of model parameter optimization on the first prediction model based on the preset model parameter optimization algorithm, and return to step 44 to continue training when the model parameter optimization ends; if the first loss value meets the first loss value range, identify whether the current starting record matches the first ending record; if they do not match, take the next second test data record of the first record sequence as the new current starting record and return to step 42 to continue training; if they match, stop model training and confirm that the model training has ended.

[0259] Here, the first loss value range is a pre-set loss value range; there are various model parameter optimization algorithms in this embodiment of the invention, such as stochastic gradient descent algorithm, momentum-driven stochastic gradient descent algorithm, and adaptive gradient algorithm.

[0260] Step 5: After the model training is completed, perform blood glucose prediction processing on any subject based on the first prediction model.

[0261] Specifically, this includes: Step 51, taking the current test subject as the corresponding first test subject;

[0262] Step 52: Select N third random time points within a specified time period after one or more meals of the first subject; at each third random time point, collect PPG signals from the first subject three times based on the A / B / C red light bands to generate corresponding third A-band PPG signals, third B-band PPG signals, and third C-band PPG signals; collect the ambient light signal of the current PPG signal collection environment to obtain the corresponding third ambient light signal; and use a blood glucose meter to measure the blood glucose value of the first subject once to obtain the corresponding third blood glucose measurement value. Statistically analyze the first subject's age, gender, height, weight, and body mass index to obtain corresponding third age, third gender, third height, third weight, and third body mass index. The body mass index (BMI) is used to determine the third historical calibration record. The current third random time point is taken as the corresponding third acquisition time, and the end time of the first subject's most recent meal is taken as the corresponding third previous meal time. The time interval between the third acquisition time and the third previous meal time is calculated to obtain the corresponding third relative time. The third acquisition time, the third previous meal time, the third relative time, the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal, the third ambient light signal, the third age, the third gender, the third height, the third weight, the third body mass index, and the third blood glucose measurement value are combined to form a corresponding first historical calibration record. N first historical calibration records are then combined to form a corresponding first historical calibration list.

[0263] Among them, the signal acquisition duration and signal acquisition frequency of the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal and the third ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and model signal sampling frequency.

[0264] Step 53: At any time after saving the first historical calibration list, perform three PPG signal acquisitions on the first subject based on the A / B / C red light bands to generate corresponding fourth A-band PPG signals, fourth B-band PPG signals, and fourth C-band PPG signals. Also, acquire the ambient light signal of the current PPG signal acquisition environment to obtain the corresponding fourth ambient light signal. Furthermore, statistically analyze the first subject's age, gender, height, weight, and body mass index to obtain corresponding fourth age, fourth gender, fourth height, fourth weight, and fourth body mass index. Finally, set the current fourth random time point as... The corresponding fourth acquisition time is used, and the end time of the most recent meal of the first subject is used as the corresponding fourth previous meal time. The time interval between the fourth acquisition time and the fourth previous meal time is calculated to obtain the corresponding fourth relative time. The fourth acquisition time, the fourth previous meal time, the fourth relative time, the fourth A-band PPG signal, the fourth B-band PPG signal, the fourth C-band PPG signal, the fourth ambient light signal, the fourth age, the fourth gender, the fourth height, the fourth weight, the fourth body mass index, and the fourth blood glucose measurement value are combined to form a corresponding first real-time detection record.

[0265] Step 54, and set the total number of batches B of the first prediction model to 1;

[0266] Step 55, and prepare the model input tensors according to the first historical calibration list and the first real-time detection record to obtain the corresponding input tensors X1, X2 and X3;

[0267] Specifically, this includes step 551, extracting N+1 data points from the first historical calibration list and the first real-time detection record, including acquisition time / previous meal time / relative time / age / height / weight / body mass index / gender, to form corresponding vectors P1, P2, P3, P4, P5, P6, P7, and P8; vector P... 1- Each of the 8 vectors consists of N+1 data elements.

[0268] Step 552: Extract the N+1 A / B / C band PPG signals from the first historical calibration list and the first real-time detection record to form corresponding signal sets G1, G2, and G3; and extract the N+1 ambient light signals from the first historical calibration list and the first real-time detection record to form corresponding signal set G4; signal set G... 1-4 Each consists of N+1 signals;

[0269] Step 553, and process vector P according to the min-max normalization method. 1-7 Normalization is performed to obtain the corresponding normalized vector.

[0270] Step 554, and normalize vector P8 according to the one-hot encoding mechanism to obtain the corresponding normalized vector.

[0271] Step 555, and normalize the signal set G according to the Z-score method. 1-4 Each signal is standardized and encoded to obtain the corresponding set of signal encoding vectors.

[0272] Among them, the signal coding vector set Each includes N+1 corresponding signal encoding vectors;

[0273] Step 556: Concatenate the four signal encoding vectors corresponding to each first historical calibration record in the first historical calibration list to obtain a first vector of length W1; and form a first tensor of shape N×W1=H2×W1 by the N first vectors corresponding to the first historical calibration list.

[0274] Step 557 involves concatenating the four signal encoding vectors from the first real-time detection record to obtain a second vector of length W1; and then superimposing the first tensor and the second vector to form an input tensor x with the shape (N+1)×W1=(H2+1)×W1=H1×W1. 1,i ; and the unique input tensor x 1,i As the corresponding input tensor X1;

[0275] Step 124, and the normalized vector corresponding to each first historical calibration record in the first historical calibration list. The vector data and the corresponding third blood glucose measurement value form a third vector with a width of W2 = 2; and the N third vectors corresponding to the first historical calibration list form an input tensor x with a shape of N×W2 = H2×W2. 2,i ; and the unique input tensor x 2,i As the corresponding input tensor X2;

[0276] Step 125, and recorded by the first real-time detection in the normalized vector. and The normalized vector data of the corresponding collection time, relative time, age, gender, height, weight, and body mass index are used to form an input vector x with a vector width of W3 = 7. 3,i ; and the unique input vector x 3,i As the corresponding input tensor X3;

[0277] Step 56: Input tensors X1, X2, and X3 are input into the first prediction model to predict blood glucose levels and obtain the corresponding prediction vector Y; and the unique predicted blood glucose value y in the prediction vector Y is... i The extracted value is used as the corresponding predicted blood glucose value for this test.

[0278] Here, since the total batch size B is set to 1, the prediction vector Y contains only one predicted blood glucose value y. i Therefore, the unique predicted blood glucose value y is directly used. i Once extracted, it can be used as the corresponding predicted blood glucose value for this test.

[0279] It should be noted that when applying the first prediction model in practice, the total batch size B can also be set to an integer greater than 1. When B > 1, if the target time t is any time after the first historical calibration list has been saved... x Predicting blood glucose levels for a subject requires the current time t. x B optical signal acquisitions were performed on the subject. During each acquisition, three PPG signals and one ambient light signal were collected to form a set of optical signal acquisition results. The input tensor x was generated based on each set of optical signal acquisition results, the acquisition time, the relative time between the acquisition time and the most recent meal time, age, gender, height, weight, body mass index, and N first historical calibration records from the first historical calibration list. 1 / 2 / 3,i We need to obtain a corresponding set of input tensors x. 1,i x 2,i x 3,i And the obtained input tensor x from group B 1,i x 2,i x 3,i The corresponding input tensors X1, X2, and X3 are formed, and then the obtained input tensors X1, X2, and X3 are input into the first prediction model to predict blood glucose, thus obtaining B predicted blood glucose values ​​y. i The prediction vector Y is composed of B predicted blood glucose values ​​y. i The average value is used as the current time t x Blood glucose prediction values.

[0280] Figure 3 is a block diagram of a processing device for a PPG signal blood glucose prediction model provided in Embodiment 2 of the present invention. This device can be a terminal device or server implementing the aforementioned method embodiments, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiments. For example, the device can be a device or chip system of the aforementioned terminal device or server. As shown in Figure 3, the device includes: a model construction module 201, a data acquisition module 202, a data preprocessing module 203, a model training module 204, and a model application module 205.

[0281] The model building module 201 is used to build a PPG signal blood glucose prediction model, denoted as the corresponding first prediction model.

[0282] The data acquisition module 202 is used to construct the corresponding first raw dataset through data acquisition.

[0283] The data preprocessing module 203 is used to preprocess the first original dataset to obtain the corresponding first training dataset.

[0284] The model training module 204 is used to train the first prediction model based on the first training dataset.

[0285] The model application module 205 is used to perform blood glucose prediction processing on any subject based on the first prediction model after the model training is completed.

[0286] The processing device for a PPG signal blood glucose prediction model provided in this embodiment of the invention can execute the method steps in the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0287] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing elements; they can be fully implemented in hardware; or some modules can be implemented by processing elements calling software, while others are implemented in hardware. For example, the model building module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0288] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-on-a-Chip (SOC).

[0289] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).

[0290] Figure 4 is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. As shown in Figure 4, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for completing various processing functions and implementing the processing steps described in the methods of the aforementioned embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.

[0291] The system bus 305 mentioned in Figure 4 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.

[0292] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0293] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.

[0294] This invention also provides a chip for executing instructions, which is used to perform the processing steps described in the foregoing method embodiments.

[0295] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for processing a PPG signal blood glucose prediction model. As described above, this invention constructs a PPG signal blood glucose prediction model, denoted as the first prediction model, and builds a corresponding first original dataset through data acquisition. The first original dataset is then preprocessed to obtain a corresponding first training dataset, and the first prediction model is trained based on the first training dataset. After training, blood glucose prediction is performed on any subject based on the first prediction model. In this invention's technical solution, the subject only needs to retain a few historical calibration records initially through optical signal acquisition and invasive blood glucose value acquisition. Subsequently, at any time, real-time blood glucose prediction can be performed based on the first prediction model provided by this invention, using the historical calibration records and real-time acquired PPG signals. The non-invasive blood glucose prediction solution provided by this invention effectively improves user experience and increases user self-testing enthusiasm.

[0296] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0297] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0298] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for processing PPG signal blood glucose prediction models, characterized in that, The method includes: The PPG signal blood glucose prediction model is constructed and denoted as the corresponding first prediction model; The first original dataset is constructed through data collection; The first original dataset is preprocessed to obtain the corresponding first training dataset; The first prediction model is trained based on the first training dataset; After the model training is completed, blood glucose prediction is performed on any subject based on the first prediction model.

2. The processing method of the PPG signal blood glucose prediction model according to claim 1, characterized in that, The first prediction model corresponds to a model signal sampling duration and a model signal sampling frequency; The first prediction model has three model input terminals and one model output terminal; the three model input terminals are respectively the first, second and third model input terminals; The first prediction model includes a first branch network, a second branch network, a branch output splicing layer, and a terminal linear layer; The first and second input terminals of the first branch network are connected to the corresponding first and second model input terminals, and the output terminal is connected to the first input terminal of the branch output splicing layer; the first branch network includes an encoder, a decoder, a fully connected layer, and a branch linear layer; the input terminal of the encoder is connected to the first input terminal of the first branch network, and the output terminal is connected to the first input terminal of the decoder; The second input terminal of the decoder is connected to the second input terminal of the first tributary network, and the output terminal is connected to the input terminal of the fully connected layer; the output terminal of the fully connected layer is connected to the tributary linear layer; the output terminal of the tributary linear layer is connected to the first input terminal of the tributary output splicing layer. The input of the second branch network is connected to the corresponding input of the third model, and its output is connected to the second input of the branch output splicing layer. The second branch network includes an ELU function layer, a gated linear layer, a residual layer, and a normalization layer. The input of the ELU function layer is connected to the input of the second branch network, and its output is connected to the input of the gated linear layer. The output of the gated linear layer is connected to the input of the residual layer. The output of the residual layer is connected to the input of the normalization layer. The output of the normalization layer is connected to the second input of the branch output splicing layer. The output end of the branch output splicing layer is connected to the input end of the terminal linear layer; The output of the terminal linear layer is connected to the model output.

3. The processing method of the PPG signal blood glucose prediction model according to claim 2, characterized in that, The first prediction model is used to predict blood glucose based on the input tensors X1, X2, and X3 and output the corresponding prediction vector Y. The first, second, and third model input terminals of the first prediction model are used to receive the corresponding input tensors X1, X2, and X3, respectively. The model output terminal of the first prediction model is used to output the corresponding prediction vector Y. The input tensor X1 has a shape of B×H1×W1; the total number of batches B is an integer greater than or equal to 1; the input tensor X1 consists of B input tensors x of shape H1×W1. 1,i Composition: 1 ≤ batch index i ≤ B; tensor height H1 is a positive integer, tensor width W1 = 4 × floor(model signal sampling duration / model signal sampling frequency), floor() is the floor function; The input tensor X2 has a shape of B×H2×W2; the input tensor X2 consists of B input tensors x of shape H2×W2. 2,i Composition; Tensor height H2 = H1 - 1, tensor width W2 = 2; The input tensor X3 has a shape of B×W3; the input tensor X3 consists of B input vectors x with a width of W3. 3,i Composition; Vector width W3 = 7; The prediction vector Y consists of B predicted blood glucose values ​​y i composition; In the first branch network, the encoder and decoder are implemented based on the transformer model encoder-decoder structure, the fully connected layer is implemented based on a fully connected neural network, and the branch linear layer is implemented based on a linear neural network. The first branch network is used to perform encoding, decoding, fully connected, and linear operations on the input tensor X1 and the input tensor X2 to obtain the corresponding linear network tensor X. L The splicing layer outputs to the branch; the linear network tensor X L B vectors with width W L Linear computation vector x L,i Composition; Vector width W L =7; In the second branch network, the gated linear layer is implemented based on the GLU model structure, and the residual layer is implemented based on one residual module or multiple sequentially connected residual modules; the second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization processing on the input tensor X3 to obtain the corresponding standardized tensor X. NM The splicing layer output is sent to the branch; the normalized tensor X NM The shape is B×W NM B vectors with a width of W NM The standardized vector x NM,i Composition; Vector width W NM =7; The branch output splicing layer is used to process the linear network tensor X. L and the standardized tensor X NM Tensor concatenation yields the corresponding concatenated tensor X. CAT Output to the terminal linear layer; the splicing tensor X CAT The shape is B×W CAT B vectors with a width of W CAT spliced ​​vector x CAT,i Composition; Vector width W CAT =W L +W NM ; The terminal linear layer is implemented based on a linear layer neural network; the terminal linear layer is used to adjust the splicing tensor X. CAT The various concatenated vectors x CAT,i The corresponding predicted blood glucose value y is obtained by performing linear calculation. i And from the obtained B predicted blood glucose values ​​y i The corresponding prediction vector Y is then constructed and output.

4. The processing method of the PPG signal blood glucose prediction model according to claim 3, characterized in that, The first branch network is used to perform encoding, decoding, fully connected operations, and linear operations based on the input tensor X1 and the input tensor X2 to obtain the corresponding linear network tensor X. L The output of the splicing layer to the branch specifically includes: The encoder processes each of the input tensors x of the input tensor X1. 1,i Feature encoding is performed to obtain the corresponding encoded tensor x. EN,i And from the obtained B encoded tensors x EN,i Form the corresponding encoding tensor X EN Output to the decoder; the encoded tensor X EN B shapes of shape H EN ×W EN The encoded tensor x EN,i Composition; Tensor height H EN Tensor width W EN It is a positive integer; The decoder, based on the encoded tensor X EN The respective encoded tensors x EN,i and the corresponding input tensor x in the input tensor X2 2,i Decoding is performed to obtain the corresponding decoded tensor x. DE,i And from the obtained B decoded tensors x DE,i Form the corresponding decoding tensor X DE Output to the fully connected layer; the decoded tensor X DE B shapes of shape H DE ×W DE The decoding tensor x DE,i Composition; Tensor height H DE Tensor width W DE It is a positive integer; The decoded tensor X is processed by the fully connected layer. DE The various decoded tensors x DE,i Perform a one-dimensional vector expansion to obtain the corresponding expanded vector x. FC,i And from the obtained B expanded vectors x FC,i The shape is B×W FC Fully connected tensor X FC Output to the linear layer of the branch; the fully connected tensor X FC B vectors with width W FC The expansion vector x FC,i Composition; Vector width W FC =H DE ×W DE ; The branch linear layer is used to determine the fully connected tensor X. FC The various expansion vectors x FC,i Perform linear calculations to obtain the corresponding linear calculation vector x. L,i And from the obtained B linear computation vectors x L,i The shape is B×W L The linear network tensor X L Output the splicing layer to the branch.

5. The processing method of the PPG signal blood glucose prediction model according to claim 3, characterized in that, The second branch network is used to perform ELU function activation, gated linear operation, residual operation, and standardization processing on the input tensor X3 to obtain the corresponding standardized tensor X. NM The output of the splicing layer to the branch specifically includes: The ELU function layer converts each of the input vectors x of the input tensor X3. 3,i Substituting the values ​​into the ELU activation function and performing function operations yields the corresponding activation vector x. ELU,i And from the obtained B activation vectors x ELU,i The shape is B×W ELU Activation tensor X ELU Output to the gated linear layer; the activation tensor X ELU B vectors with width W ELU The activation vector x ELU,i Composition; Vector width W ELU It is a positive integer; The activation tensor X is affected by the gated linear layer. ELU Each of the activation vectors x ELU,i Temporal feature extraction is performed to obtain the corresponding gating vector x. GLU,i And from the obtained B gate vectors x GLU,i The shape is B×W GLU Gated tensor X GLU Output to the residual layer; the gate tensor X GLU B vectors with width W GLU The gate vector x GLU,i Composition; Vector width W GLU It is a positive integer; The gate tensor X is obtained by the residual layer. GLU Each of the gate vectors x GLU,i Perform residual operations to obtain the corresponding residual vector x RS,i And from the obtained B residual vectors x RS,i The shape is B×W RS residual tensor X RS Output to the normalization layer; the residual tensor X RS B vectors with width W RS The residual vector x RS,i Composition; Vector width W RS =7; The residual tensor X is normalized by the normalization layer. RS W RS The corresponding standardized tensor X is obtained by standardizing each feature channel. NM Output the splicing layer to the branch.

6. The processing method of the PPG signal blood glucose prediction model according to claim 3, characterized in that, The first original dataset includes multiple first personnel datasets; The first personnel dataset includes a first calibration data list and a first test data list; The first calibration data list includes a first quantity N first calibration data records; the first quantity N is consistent with the tensor height H2; the first calibration data record includes a first acquisition time, a first previous meal time, a first relative time, a first A-band PPG signal, a first B-band PPG signal, a first C-band PPG signal, a first ambient light signal, a first age, a first gender, a first height, a first weight, a first body mass index, and a first blood glucose measurement value; the first relative time is the time interval between the first acquisition time and the first previous meal time; A, B, and C bands correspond to three red light bands respectively; the first A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band; The first test data list includes multiple first test data records; the number of first test data records is greater than N; The first test data record includes the second acquisition time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value; the second relative time is the time interval between the second acquisition time and the second previous meal time; the second A / B / C band PPG signal is the PPG signal acquired under the corresponding A / B / C red light band; The first training dataset includes multiple second personnel datasets; The second personnel dataset includes a second calibration data list and a second test data list; The second calibration data list includes N second calibration data records; the second calibration data record includes a first calibration time code, a second calibration time code, a third calibration time code, a first calibration signal code vector, a second calibration signal code vector, a third calibration signal code vector, a fourth calibration signal code vector, a first calibration age code, a first calibration gender code, a first calibration height code, a first calibration weight code, a first calibration body mass index code, and a first calibration blood glucose measurement value; the vector lengths of the first, second, third, and fourth calibration signal code vectors are consistent with the tensor width W1; The second test data list includes multiple second test data records; the second test data records include a first test time code, a second test time code, a third test time code, a first test signal code vector, a second test signal code vector, a third test signal code vector, a fourth test signal code vector, a first test age code, a first test gender code, a first test height code, a first test weight code, a first test body mass index code, and a first test blood glucose measurement value; the vector lengths of the first, second, third, and fourth test signal code vectors are consistent with the tensor width W1.

7. The processing method of the PPG signal blood glucose prediction model according to claim 6, characterized in that, The construction of the corresponding first original dataset through data collection specifically includes: A large number of volunteers are recruited to form the first volunteer group; the first volunteer group includes multiple first volunteers; each first volunteer corresponds to a first volunteer service period, which is in days. And each of the first volunteers is taken as the corresponding current volunteer; And create a corresponding first personnel dataset for the current volunteer; and initialize two empty data tables in the first personnel dataset as the corresponding first calibration data list and first test data list; The first calibration data list is populated by collecting N post-meal calibration data from the current volunteer. Specifically, N first random time points are selected within a specified period after one or more meals of the current volunteer. At each first random time point, the current volunteer's PPG signal is collected three times based on the A / B / C red light bands to generate the corresponding first A-band PPG signal, first B-band PPG signal, and first C-band PPG signal. The ambient light signal of the current PPG signal collection environment is also collected to obtain the corresponding first ambient light signal. The current volunteer's blood glucose value is measured once using a blood glucose meter to obtain the corresponding first blood glucose measurement value. The current volunteer's age, gender, height, weight, and body mass index are statistically analyzed to obtain the corresponding first age, first gender, first height, first weight, and first body mass index. The current first random time point is used as the corresponding first collection time. The volunteer's most recent meal end time is taken as the corresponding first previous meal time. The time interval between the first acquisition time and the first previous meal time is calculated to obtain the corresponding first relative time. The first acquisition time, the first previous meal time, the first relative time, the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, the first ambient light signal, the first age, the first gender, the first height, the first weight, the first body mass index, and the first blood glucose measurement value are combined to form a corresponding first calibration data record. The obtained N first calibration data records are filled into the first calibration data list. Among them, the signal acquisition duration and signal acquisition frequency of the first A-band PPG signal, the first B-band PPG signal, the first C-band PPG signal, and the first ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency. The first test data list is updated by collecting multiple random test data from the current volunteer. Specifically, any moment within the first volunteer service period of the current volunteer is taken as a corresponding second random time point. At the current second random time point, PPG signals are collected from the current volunteer three times based on the A / B / C red light bands to generate corresponding second A-band PPG signals, second B-band PPG signals, and second C-band PPG signals. The ambient light signal of the current PPG signal collection environment is also collected to obtain the corresponding second ambient light signal. A blood glucose meter is used to measure the blood glucose value of the current volunteer to obtain the corresponding second blood glucose measurement value. The age, gender, height, weight, and body mass index of the current volunteer are statistically analyzed to obtain the corresponding second age, second gender, second height, second weight, and second body mass index. The current second random time point is taken as the corresponding second... The data collection time is used, and the end time of the most recent meal of the current volunteer is taken as the corresponding second previous meal time. The time interval between the second collection time and the second previous meal time is calculated to obtain the corresponding second relative time. The second collection time, the second previous meal time, the second relative time, the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, the second ambient light signal, the second age, the second gender, the second height, the second weight, the second body mass index, and the second blood glucose measurement value are combined to form a corresponding first test data record and added to the first calibration data list. Among them, the signal collection duration and signal collection frequency of the second A-band PPG signal, the second B-band PPG signal, the second C-band PPG signal, and the second ambient light signal are the same and are all greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency. And when all the service periods of all the first volunteers of the first volunteers have expired, the first original dataset is composed of all the first personnel datasets obtained.

8. The processing method of the PPG signal blood glucose prediction model according to claim 6, characterized in that, The step of preprocessing the first original dataset to obtain the corresponding first training dataset specifically includes: The total number of records of all the first calibration data records and all the first test data records in the first original dataset is counted to obtain the corresponding first total number L1; Then, all the first / second acquisition times of the first original dataset are extracted and formed into a data vector, which is denoted as the corresponding first vector. The first vector includes L1 first vector data, and each first vector data corresponds to a first acquisition time or a second acquisition time. Then, all the first / second previous meal times in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding second vector; the second vector includes L1 second vector data, each of which corresponds to a first previous meal time or a second previous meal time; Then, all the first / second relative times of the first original dataset are extracted to form a data vector, which is denoted as the corresponding third vector; the third vector includes L1 third vector data, and each third vector data corresponds to a first relative time or a second relative time. Then, all the first / second ages in the first original dataset are extracted to form a data vector, which is denoted as the corresponding fourth vector; the fourth vector includes L1 fourth vector data, and each fourth vector data corresponds to a first age or a second age; Then, all the first / second heights in the first original dataset are extracted to form a data vector, which is denoted as the corresponding fifth vector; the fifth vector includes L1 fifth vector data, and each fifth vector data corresponds to a first height or a second height. Then, all the first / second weights in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding sixth vector; the sixth vector includes L1 sixth vector data, and each sixth vector data corresponds to a first weight or a second weight. Then, all the first / second body mass indexes of the first original dataset are extracted to form a data vector, which is denoted as the corresponding seventh vector; the seventh vector includes L1 seventh vector data, and each seventh vector data corresponds to a first body mass index or a second body mass index. Then, all the first / second genders in the first original dataset are extracted and combined into a data vector, which is denoted as the corresponding eighth vector; the eighth vector includes L1 eighth vector data, and each eighth vector data corresponds to a first gender or a second gender. All first / second A-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding first signal set. The first signal set includes L1 first signals, each of which corresponds to a first A-band PPG signal or a second A-band PPG signal. All first / second B-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding second signal set. The second signal set includes L1 second signals, each of which corresponds to either a first B-band PPG signal or a second B-band PPG signal. All first / second C-band PPG signals from the first original dataset are extracted to form a signal set, denoted as the corresponding third signal set; the third signal set includes L1 third signals, each of which corresponds to a first C-band PPG signal or a second C-band PPG signal; All first / second ambient light signals from the first original dataset are extracted to form a signal set, denoted as the corresponding fourth signal set; the fourth signal set includes L1 fourth signals, each of which corresponds to one first ambient light signal or one second ambient light signal. The first, second, third, fourth, fifth, sixth, and seventh vectors are normalized according to the maximum and minimum normalization method to obtain the corresponding first, second, third, fourth, fifth, sixth, and seventh normalized vectors; the first, second, third, fourth, fifth, sixth, or seventh normalized vector includes L1 corresponding first, second, third, fourth, fifth, sixth, or seventh normalized data; The eighth vector is then normalized using a one-hot encoding mechanism to obtain the corresponding eighth normalized vector; the eighth normalized vector includes L1 eighth normalized data. The first, second, third, and fourth signals in the first, second, third, and fourth signal sets are standardized and encoded according to the Z-score standardization method to obtain the corresponding first, second, third, and fourth signal encoding vector sets; the first, second, third, or fourth signal encoding vector set includes L1 corresponding first, second, third, or fourth signal encoding vectors; The first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data corresponding to each of the first calibration data records, along with the first, second, third, and fourth signal encoding vectors and the first blood glucose measurement value, are used as a group to form a corresponding first calibration time code, second calibration time code, third calibration time code, first calibration age code, first calibration height code, first calibration weight code, first calibration body mass index code, first calibration gender code, first calibration signal encoding vector, second calibration signal encoding vector, third calibration signal encoding vector, fourth calibration signal encoding vector, and the first calibration blood glucose measurement value to form a corresponding second calibration data record; Each first test data record is composed of the first, second, third, fourth, fifth, sixth, seventh, and eighth normalized data, the first, second, third, and fourth signal encoding vectors, and the first blood glucose measurement value, forming a corresponding first test time code, second test time code, third test time code, first test age code, first test height code, first test weight code, first test body mass index code, first test gender code, first test signal encoding vector, second test signal encoding vector, third test signal encoding vector, fourth test signal encoding vector, and the first test blood glucose measurement value. A corresponding second calibration data list is formed by N second calibration data records corresponding to each of the first personnel datasets; a corresponding second test data list is formed by all the second test data records corresponding to each of the first personnel datasets; a corresponding second personnel dataset is formed by the second calibration data list and the second test data list corresponding to each of the first personnel datasets; and a corresponding first training dataset is formed by all the obtained second personnel datasets.

9. The processing method of the PPG signal blood glucose prediction model according to claim 8, characterized in that, The normalization process of the first, second, third, fourth, fifth, sixth, and seventh vectors according to the minimum-maximum normalization method to obtain the corresponding normalized vectors includes: The first, second, third, fourth, fifth, sixth, and seventh vectors are sequentially taken as the corresponding current vector A, and each vector data of the current vector A is denoted as the corresponding vector data a. k 1 ≤ data index k ≤ L1; Then, from a plurality of preset maximum and minimum threshold pairs, the maximum and minimum threshold pair corresponding to the current vector A is selected as the current maximum and minimum threshold pair, and the maximum and minimum threshold of the current maximum and minimum threshold is extracted as the corresponding first maximum threshold a. max and the first minimum threshold a min The plurality of maximum and minimum threshold pairs include the collection time-maximum and minimum threshold pairs, meal time-maximum and minimum threshold pairs, relative time-maximum and minimum threshold pairs, age-maximum and minimum threshold pairs, height-maximum and minimum threshold pairs, weight-maximum and minimum threshold pairs, and body mass index-maximum and minimum threshold pairs, each of which consists of a pair of maximum and minimum thresholds; And based on the first maximum threshold a max and the first minimum threshold a min For each of the aforementioned vector data a k Normalization is performed to obtain the corresponding normalized data. And the maximum and minimum normalized data As the corresponding second maximum threshold Second minimum threshold And based on the second maximum threshold and the second minimum threshold For each of the normalized data Normalization is performed to obtain the corresponding normalized data. and each of the normalized data As a first, second, third, fourth, fifth, sixth, or seventh normalized data corresponding to the current vector A; and composed of all the first, second, third, fourth, fifth, sixth, or seventh normalized data obtained this time, a corresponding first, second, third, fourth, fifth, sixth, or seventh normalized vector is formed.

10. The processing method of the PPG signal blood glucose prediction model according to claim 8, characterized in that, The process of normalizing the eighth vector using a one-hot encoding mechanism to obtain the corresponding eighth normalized vector specifically includes: The genders male and female are set as mutually exclusive 0-1 codes to obtain the corresponding male and female gender codes; the male and female gender codes can only take two values, 0 and 1, and the male and female gender codes are mutually exclusive. For each eighth vector data that matches the gender of male or female, a corresponding eighth normalized data is set; and each eighth normalized data corresponding to the gender of male is set as the corresponding gender of male; and each eighth normalized data corresponding to the gender of female is set as the corresponding gender of female; and all the obtained eighth normalized data are combined to form a corresponding eighth normalized vector.

11. The processing method of the PPG signal blood glucose prediction model according to claim 8, characterized in that, The step of standardizing and encoding each of the first, second, third, and fourth signals in the first, second, third, and fourth signal sets according to the Z-score normalization method to obtain the corresponding first, second, third, and fourth signal encoding vector sets specifically includes: Each of the first, second, third, and fourth signals is taken as the corresponding current signal in sequence; The current signal is then resampled according to the sampling frequency of the model signal to obtain the corresponding resampled signal; The resampled signal segment with a front end length equal to the sampling duration of the model signal is extracted and used as the corresponding truncated signal S; The total number of sampling points Q of the intercepted signal S is obtained by counting the total number of sampling points Q; the total number of sampling points Q matches one-quarter of the tensor width W1. The signal data of each sampling point of the intercepted signal S is recorded as the corresponding sampling point data s. q 1 ≤ sampling point index q ≤ Q; And the data s of each sampling point are normalized according to the Z-score method. q Standardization is performed to obtain the corresponding normalized code. μ is the mean and σ is the standard deviation; And by all the obtained normalized codes A corresponding normalized encoding vector is formed; and the normalized encoding vector obtained this time is used as the first, second, third or fourth signal encoding vector corresponding to the current signal; The first signal encoding vector set is formed by all the obtained first signal encoding vectors; the second signal encoding vector set is formed by all the obtained second signal encoding vectors; the third signal encoding vector set is formed by all the obtained third signal encoding vectors; and the fourth signal encoding vector set is formed by all the obtained fourth signal encoding vectors.

12. The processing method of the PPG signal blood glucose prediction model according to claim 6, characterized in that, The step of training the first prediction model based on the first training dataset specifically includes: Step 121: Extract all the second test data records from the first training dataset to form a first record sequence; and count the total number of the second test data records in the first record sequence to obtain the corresponding first record total number; set the batch total number B of the first prediction model to an integer greater than 1 but less than or equal to the first record total number; and take the first second test data record of the first record sequence as the corresponding current starting record; and take the Bth-to-last second test data record of the first record sequence as the corresponding first ending record. Step 122: Extract the B second test data records from the first record sequence starting from the current starting record to form a corresponding second record sequence; Step 123 involves preparing the model input vector and model label vector based on the second record sequence to obtain the corresponding input tensor X1, input tensor X2, input tensor X3, and label vector Y. * ; Specifically, step 1231 involves taking each of the second test data records in the second record sequence as the corresponding current data record, and taking the second calibration data list corresponding to the current data record in the first training dataset as the corresponding current calibration data list. Step 1232 involves concatenating the first, second, third, and fourth calibration signal encoding vectors of each of the second calibration data records in the current calibration data list to obtain a calibration signal concatenation vector with a length equal to the tensor width W1; and forming a calibration signal concatenation tensor of shape N×W1=H2×W1 by the N signal concatenation vectors in the current calibration data list; concatenating the first, second, third, and fourth test signal encoding vectors of the current data record to obtain a test signal concatenation vector with a length equal to the tensor width W1; and forming an input tensor x of shape (N+1)×W1=(H2+1)×W1=H1×W1 by the calibration signal concatenation tensor and the test signal concatenation vector. 1,i ; Step 1233, and the third calibration time code of each of the second calibration data records in the current calibration data list and the first calibration blood glucose measurement value are combined to form a calibration encoding vector whose vector width matches the tensor width W2; and the N calibration encoding vectors in the current calibration data list are combined to form an input tensor x with shape N×W2=H2×W2. 2,i ; Steps 1, 2, 3, and 4 involve composing a corresponding input vector x from the first test time code, the third test time code, the first test age code, the first test gender code, the first test height code, the first test weight code, and the first test body mass index code recorded in the current data. 3,i ; Step 1235, and use the first test blood glucose measurement value recorded in the current data record as the corresponding tag blood glucose value. Step 1236, and the B input tensors x corresponding to the second record sequence. 1,i The corresponding input tensor X1 and B input tensors x are composed of... 2,i The corresponding input tensor X2 and B input tensors x are composed of... 3,i The input tensor X3 and the B labeled blood glucose values ​​are composed of the corresponding input tensor. The corresponding label vector Y is formed. * ; Step 124: Input tensor X1, input tensor X2, and input tensor X3 are input into the first prediction model to predict blood glucose levels, resulting in B predicted blood glucose values ​​y. i The prediction vector Y is composed of the prediction vector Y; and the prediction vector Y and the label vector Y are combined. * Input the preset model loss function Loss M The corresponding first loss value is obtained through calculation; The model loss function Loss M for: Step 125: Identify whether the first loss value meets the preset first loss value range; if the first loss value does not meet the first loss value range, perform a round of model parameter optimization on the first prediction model based on the preset model parameter optimization algorithm, and return to step 124 to continue training when the model parameter optimization ends; if the first loss value meets the first loss value range, identify whether the current starting record matches the first ending record; if they do not match, take the next second test data record of the first record sequence as the new current starting record and return to step 122 to continue training; if they match, stop model training and confirm that the model training has ended.

13. The processing method of the PPG signal blood glucose prediction model according to claim 6, characterized in that, The blood glucose prediction process for any subject based on the first prediction model specifically includes: The current test subject is designated as the corresponding first test subject; Within a specified time period following one or more meals of the first subject, N third random time points are selected. At each third random time point, PPG signals are acquired three times based on the A / B / C red light bands to generate corresponding third A-band PPG signals, third B-band PPG signals, and third C-band PPG signals. The ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding third ambient light signal. A blood glucose meter is used to measure the blood glucose value of the first subject to obtain the corresponding third blood glucose measurement value. The age, gender, height, weight, and body mass index of the first subject are statistically analyzed to obtain corresponding third age, third gender, third height, third weight, and third body mass index. The current third random time point is used as the corresponding third acquisition time, and the end time of the first subject's most recent meal is used as the corresponding third previous meal time. The time interval between the third acquisition time and the third previous meal time is calculated to obtain the corresponding third relative time. A first historical calibration record is formed by the third acquisition time, the third previous meal time, the third relative time, the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal, the third ambient light signal, the third age, the third gender, the third height, the third weight, the third body mass index, and the third blood glucose measurement value. A first historical calibration list is formed by N such first historical calibration records. The signal acquisition duration and frequency of the third A-band PPG signal, the third B-band PPG signal, the third C-band PPG signal, and the third ambient light signal are all the same and greater than or equal to the corresponding model signal sampling duration and the model signal sampling frequency. At any time after saving the first historical calibration list, PPG signals are acquired three times from the first subject based on the A / B / C red light bands to generate corresponding fourth A-band PPG signals, fourth B-band PPG signals, and fourth C-band PPG signals. The ambient light signal of the current PPG signal acquisition environment is also acquired to obtain the corresponding fourth ambient light signal. Furthermore, the age, gender, height, weight, and body mass index of the first subject are statistically analyzed to obtain corresponding fourth age, fourth gender, fourth height, fourth weight, and fourth body mass index. The current fourth random time point is taken as the corresponding fourth acquisition time. The end time of the first subject's most recent meal is taken as the corresponding fourth previous meal time. The time interval between the fourth acquisition time and the fourth previous meal time is calculated to obtain the corresponding fourth relative time. The fourth acquisition time, the fourth previous meal time, the fourth relative time, the fourth A-band PPG signal, the fourth B-band PPG signal, the fourth C-band PPG signal, the fourth ambient light signal, the fourth age, the fourth gender, the fourth height, the fourth weight, the fourth body mass index, and the fourth blood glucose measurement value are combined to form a corresponding first real-time detection record. The total batch size B of the first prediction model is set to 1; the model input tensors X1, X2, and X3 are prepared according to the first historical calibration list and the first real-time detection record; the input tensors X1, X2, and X3 are input into the first prediction model to predict blood glucose and obtain the corresponding prediction vector Y; and the unique predicted blood glucose value y in the prediction vector Y is used as the reference. i The extracted value is used as the corresponding predicted blood glucose value for this test.

14. An apparatus for executing the processing method of the PPG signal blood glucose prediction model according to any one of claims 1-13, characterized in that, The device includes: a model building module, a data acquisition module, a data preprocessing module, a model training module, and a model application module; The model building module is used to build a PPG signal blood glucose prediction model, denoted as the corresponding first prediction model; The data acquisition module is used to construct the corresponding first raw dataset through data acquisition; The data preprocessing module is used to preprocess the first original dataset to obtain the corresponding first training dataset. The model training module is used to train the first prediction model based on the first training dataset. The model application module is used to perform blood glucose prediction processing on any subject based on the first prediction model after the model training is completed.

15. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-13; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Blood glucose prediction method and device based on optical signal characteristics and metabolic heat characteristics

    CN114098724A

  • Blood glucose prediction method and device combining big data model and personalized model

    CN116919395A

  • Noninvasive blood glucose prediction method, system and chip

    CN117558441A

  • Non-invasive blood glucose prediction method and system for smart watch

    CN118197629A

  • Processing method and device of PPG signal blood glucose prediction model

    CN118430829A