Model training method and system, blood glucose prediction method and device and medium

By collecting blood glucose tags and subcutaneous Raman spectra, and using interpolation and time lag time difference functions to correct blood glucose curves, combined with machine learning models, the problem of modeling inaccuracy caused by time lag between tags and spectral signals in blood glucose prediction is solved, achieving more accurate blood glucose prediction.

CN122073153APending Publication Date: 2026-05-22PHOTONIC VIEW TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PHOTONIC VIEW TECHNOLOGY CO LTD
Filing Date
2024-11-20
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing subcutaneous Raman spectroscopy technology suffers from insufficient modeling accuracy in blood glucose prediction due to the time lag between blood glucose tags and spectral signals. Improvements are needed in the matching methods between tags and spectral signals to enhance prediction accuracy.

Method used

By collecting blood glucose tags and subcutaneous Raman spectra, blood glucose curves are obtained using interpolation algorithms, and the blood glucose curves are corrected using a time lag function. A blood glucose prediction model is then obtained by training a machine learning or deep learning model.

Benefits of technology

It achieves more accurate blood glucose prediction, improves the automation and accuracy of the model, and can efficiently predict blood glucose levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122073153A_ABST
    Figure CN122073153A_ABST
Patent Text Reader

Abstract

The invention provides a model training method and system, a blood glucose prediction method and device and a medium. The model training method comprises the steps that a blood glucose label and a subcutaneous Raman spectrum are collected; processing the blood glucose label to obtain a blood glucose curve; correcting the blood glucose curve by using a lag time difference function to obtain a corrected blood glucose label; and training a machine learning or deep learning model by using the corrected blood glucose tag and the subcutaneous Raman spectrum to obtain a blood glucose prediction model. According to the model training method, a more accurate blood glucose prediction model can be obtained, and accurate and efficient prediction of blood glucose is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of model training technology, and relates to a model training method, particularly a model training method and system, a blood glucose prediction method, equipment and medium. Background Technology

[0002] Diabetes mellitus is a chronic disease characterized by hyperglycemia, caused by absolute or relative insulin deficiency and impaired insulin utilization. Conventional blood glucose monitoring methods include venous blood measurement and finger-prick blood measurement, both of which are invasive techniques. In recent years, with technological advancements, various non-invasive blood glucose monitoring methods have emerged, among which subcutaneous spatially shifted Raman spectroscopy, capable of detecting the dermis, is one of the most promising technologies. When using spectral technology to predict blood glucose concentration, the spectral signal acquired by the device needs to be converted into blood glucose values ​​through machine learning or deep learning models. Therefore, it is necessary to collect blood glucose labels and spectral data in advance and establish a predictive model. Most of the glucose molecules measured by subcutaneous spatially shifted Raman spectroscopy originate from tissue fluid, while the blood glucose labels collected during the data collection phase come from venous or finger-prick blood. It takes time for glucose molecules to permeate from blood vessels into tissue fluid; this time lag leads to a mismatch between the label and the spectral signal in terms of blood glucose concentration, thus affecting the accuracy of the modeling. Therefore, how to correct the acquired labels to match the spectral signals collected by the subcutaneous spatially shifted Raman system, thereby improving the accuracy of modeling and prediction, still requires further theoretical analysis and experimental verification. Summary of the Invention

[0003] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a model training method and system, a blood glucose prediction method, device and medium to improve the accuracy of blood glucose prediction models based on subcutaneous Raman spectroscopy.

[0004] In a first aspect, this application provides a model training method, which includes: acquiring blood glucose labels and subcutaneous Raman spectra; processing the blood glucose labels to obtain a blood glucose curve; correcting the blood glucose curve using a time lag function to obtain a corrected blood glucose label; and training a machine learning or deep learning model using the corrected blood glucose label and the subcutaneous Raman spectra to obtain a blood glucose prediction model.

[0005] In this application, blood glucose tags and subcutaneous Raman spectra are collected, and the blood glucose tags are processed to obtain a blood glucose curve. The blood glucose curve is corrected using a time lag function, and a machine learning or deep learning model is trained using the corrected blood glucose tags and subcutaneous Raman spectra to obtain a blood glucose prediction model. This model training method can obtain a more accurate blood glucose prediction model, achieving automated, precise, and efficient blood glucose prediction.

[0006] In one implementation of the first aspect, processing the blood glucose tag to obtain a blood glucose curve includes: interpolating the blood glucose tag using an interpolation algorithm to obtain the blood glucose curve showing the change of blood glucose over the collection time.

[0007] In one implementation of the first aspect, the process of correcting the blood glucose curve using a lag time difference function to obtain a corrected blood glucose label includes: shifting the blood glucose curve according to the lag time to obtain a shifted blood glucose curve; obtaining a shifted blood glucose label based on the shifted blood glucose curve; training an initial machine learning or deep learning model using the shifted blood glucose label and the subcutaneous Raman spectrum to obtain a regression model; screening the regression model using model evaluation metrics to obtain a target time difference; and correcting the blood glucose curve using a lag time difference function based on the target time difference to obtain the corrected blood glucose label.

[0008] In one implementation of the first aspect, using model evaluation metrics to screen the regression model to obtain the target time difference includes: using K-fold cross-validation or independent testing to obtain the root mean square error corresponding to different lag times of the regression model; and screening the root mean square errors corresponding to the different lag times to obtain the target time difference.

[0009] In one implementation of the first aspect, obtaining the root mean square error of the regression model for different lag times using K-fold cross-validation or independent testing includes: Where, Δt j For a lag time of j minutes, RMSE(Δt) j ) represents the lag time Δt j The corresponding root mean square error, Let y be the regression model prediction result for the i-th sample. i (Δt j ) represents the offset lag time Δt j The blood glucose label is denoted by n, where n is the number of sampling points.

[0010] In one implementation of the first aspect, the model training method further includes: validating the blood glucose prediction model using the mean absolute relative error and / or root mean square error to obtain the validation results of the blood glucose prediction model.

[0011] Secondly, this application provides a model training system, which includes: a data acquisition module for acquiring blood glucose labels and subcutaneous Raman spectra; a label processing module for processing the blood glucose labels to obtain a blood glucose curve; a label correction module for correcting the blood glucose curve using a time lag function to obtain a corrected blood glucose label; and a model training module for training a machine learning or deep learning model using the corrected blood glucose label and the subcutaneous Raman spectrum to obtain a blood glucose prediction model.

[0012] Thirdly, this application provides a blood glucose prediction method, which includes: acquiring a subcutaneous Raman spectrum to be tested; and using a blood glucose prediction model obtained by the model training method described in any one of the first aspects to perform prediction processing on the subcutaneous Raman spectrum to be tested, thereby obtaining a blood glucose prediction result.

[0013] Fourthly, this application provides an electronic device comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory to cause the electronic device to perform the model training method as described in any one of the first aspects and / or the blood glucose prediction method as described in the third aspect.

[0014] Fifthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model training method described in any one of the first aspects and / or the blood glucose prediction method described in the third aspect. Attached Figure Description

[0015] Figure 1A The diagram shown illustrates an application scenario of the model training method described in this application.

[0016] Figure 1B This diagram illustrates the structure of the mid-cloud interaction scenario in these implementation methods.

[0017] Figure 2 The diagram shown is a flowchart illustrating the model training method described in the embodiments of this application.

[0018] Figure 3 The diagram shown is a schematic representation of the blood glucose curve described in the embodiments of this application.

[0019] Figure 4A The diagram shown is a flowchart of the model training method described in the embodiments of this application.

[0020] Figure 4B The diagram shown is a schematic representation of the offset processing described in an embodiment of this application.

[0021] Figure 5The diagram shown is a flowchart of the model training method described in the embodiments of this application.

[0022] Figure 6 The diagram shown is a verification result of the blood glucose prediction model described in the embodiments of this application.

[0023] Figure 7 The diagram shown is a structural schematic of the model training system described in an embodiment of this application.

[0024] Figure 8 The diagram shown is a flowchart illustrating the blood glucose prediction method described in the embodiments of this application.

[0025] Figure 9 The diagram shown is a structural schematic of the electronic device described in an embodiment of this application.

[0026] Component designation explanation

[0027] 1. Model training device

[0028] 11 Sample collection equipment

[0029] 12 Local Processors

[0030] 13 Display Terminals

[0031] 2-Terminal-Cloud Interactive System

[0032] 20 terminals

[0033] 21 Cloud Servers

[0034] 100 Model Training System

[0035] 110 Data Acquisition Module

[0036] 120 Tag Processing Module

[0037] 130 Label Correction Module

[0038] 140 Model Training Module

[0039] 900 electronic devices

[0040] 910 memory

[0041] 920 processor

[0042] 930 monitor

[0043] Steps S11 to S14

[0044] Steps S131~S135

[0045] Steps S1341~S1342

[0046] Steps S21 to S22 Detailed Implementation

[0047] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0048] It should be noted that in the embodiments of this application, the words "optionally" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "optionally" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "optionally" or "for example" is intended to present the relevant concepts in a specific manner.

[0049] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0050] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0051] Figure 1A This diagram illustrates an application scenario of the model training method described in this application. The model training device 1 can be used to implement the model training method provided in the embodiments of this application, but the application scenarios of the model training method provided in the embodiments of this application are not limited to this. Figure 1A The model training device 1 shown is as follows. Figure 1AAs shown, the model training device 1 includes a sample acquisition device 11, a local processor 12, and a display terminal 13. The model training method provided in this embodiment can be applied to the local processor 12.

[0052] in, Figure 1A The local processor 12 can be a single local processor, a cluster of multiple local processors, or a cloud computing center, etc., and is not specifically limited here. Although Figure 1A Only one sample acquisition device 11, one local processor 12, and one display terminal 13 are shown. The display terminal 13 is used to display the test results after model training. However, it should be understood that... Figure 1A The examples in this paper are only for understanding this solution. The specific number of local processors 12 and display terminals 13 should be flexibly determined based on the actual situation.

[0053] In some other implementations, the model training device 1 may not include a display terminal 13, but only a local processor 12 with display functionality and a sample acquisition device 11. The model training method provided in this application embodiment can be applied to the local processor 12. The local processor 12 with display functionality may include tablet computers, laptops, handheld computers, mobile phones, personal computers, and voice interaction devices, or it may be a monitoring device, etc., which is not limited here.

[0054] In some other implementations, the model training method described in this application can be applied to edge-cloud interaction scenarios. Figure 1B This diagram illustrates the structure of the endpoint-cloud interaction scenario in these implementation methods. For example... Figure 1B As shown, the terminal-cloud interaction system 2 includes a terminal 20 and a cloud server 21. The terminal 20 and the cloud server 21 can communicate with each other, and the communication method is not limited to wired or wireless.

[0055] The terminal 20 can be mobile or fixed. For example, it can be a wireless terminal or a wired terminal. A wireless terminal can refer to a device with wireless transceiver capabilities, which can be deployed indoors, outdoors, and in industrial workshops. The terminal 20 can be a mobile phone, tablet computer, laptop computer, etc., and is not limited thereto. The cloud server 21 can include one or more servers, or one or more processing nodes, or one or more virtual machines running on the server. The cloud server 21 can also be referred to as a server cluster, management platform, data processing center, etc., and is not limited thereto in this embodiment.

[0056] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0057] The following embodiments of this application provide a model training method, which, for example, can be achieved through... Figure 1A The local processor 12 shown Figure 1B The cloud server 21 shown is used to implement this. Figure 2 The diagram shown is a flowchart illustrating the model training method described in the embodiments of this application. Figure 2 As shown, the model training method includes steps S11 to S14.

[0058] Step S11: Collect blood glucose tags and subcutaneous Raman spectra.

[0059] Optionally, the subcutaneous Raman spectrum is obtained using multichannel micro spatial shift Raman spectroscopy (mμSORS). Based on the mμSORS subcutaneous Raman spectrum of the dermis and human blood glucose tags, a blood glucose prediction model can be established to predict blood glucose levels via subcutaneous Raman spectroscopy.

[0060] Optionally, the acquired Raman spectra can undergo a series of preprocessing steps to further highlight the glucose signal, such as mean-variance normalization and fluorescence background removal algorithms.

[0061] Step S12: Process the blood glucose label to obtain a blood glucose curve. Specifically, the blood glucose curve is a curve showing the change of blood glucose over time.

[0062] Step S13: The blood glucose curve is corrected using a time lag function to obtain a corrected blood glucose label. Specifically, since there is a certain time interval between acquiring the blood glucose label and acquiring the subcutaneous Raman spectrum during the sampling process, and the time interval between the acquired blood glucose label values ​​is greater than the blood glucose lag time difference, it is necessary to use a time lag function to correct the blood glucose curve to obtain a more accurate blood glucose label and its corresponding subcutaneous Raman spectrum.

[0063] Step S14: The corrected blood glucose label and the subcutaneous Raman spectrum are used to train a machine learning or deep learning model to obtain a blood glucose prediction model. Specifically, the blood glucose prediction model is a machine learning regression model. Commonly used machine learning algorithms for spectral modeling include Partial Least Squares (PLS), Support Vector Machine (SVM), and Principal Component Analysis (PCA). When prediction accuracy is insufficient and data is sufficient, deep learning algorithms such as convolutional neural networks can be used.

[0064] In some possible implementations, during data collection, for each subject, a series of blood glucose tags and corresponding subcutaneous Raman spectral data are collected during blood glucose changes through a specific blood glucose regulation method, such as an oral glucose tolerance test. After data collection is complete, all blood glucose tags Y and subcutaneous Raman spectra X can be obtained. Where Y = (y1,...,y...) n )T Here, n represents the sampling point. After collecting the subject's blood glucose tags and subcutaneous Raman spectra, the discontinuous blood glucose tags are processed to obtain a blood glucose curve that changes continuously over time. Since the time interval between the collected blood glucose tag values ​​is greater than the blood glucose lag time difference, the blood glucose curve is corrected using a lag time difference function to obtain a corrected blood glucose tag. The corrected blood glucose tag and the subcutaneous Raman spectrum are then used to train a machine learning or deep learning model to obtain a blood glucose prediction model.

[0065] In this embodiment, blood glucose tags and subcutaneous Raman spectra are collected, and the blood glucose tags are processed to obtain a blood glucose curve. The blood glucose curve is corrected using a time lag function, and a machine learning or deep learning model is trained using the corrected blood glucose tags and subcutaneous Raman spectra to obtain a blood glucose prediction model. This model training method can obtain a more accurate blood glucose prediction model, achieving automated, precise, and efficient blood glucose prediction.

[0066] In one embodiment of this application, Figure 3 The diagram shown is a schematic representation of the blood glucose curve described in the embodiments of this application, such as... Figure 3 As shown, the horizontal axis represents the sampling time, the vertical axis represents the blood glucose label value, and the origin is the blood glucose label at a certain sampling time. Processing the blood glucose labels to obtain a blood glucose curve includes: using an interpolation algorithm to interpolate the blood glucose labels to obtain the blood glucose curve showing the change in blood glucose over the sampling time.

[0067] In some possible implementations, there is a time interval between the acquired blood glucose tags and the subcutaneous Raman spectra, and the time interval between the acquired blood glucose tag values ​​is greater than the blood glucose lag time difference. Therefore, an interpolation algorithm is needed to interpolate the blood glucose tags to obtain the blood glucose curve showing the change in blood glucose over time. In computer science, interpolation algorithms are used to estimate the values ​​of unknown data points. Specifically, based on a known set of data points, the interpolation algorithm constructs an approximate function using mathematical methods to predict data points in unknown regions. Interpolation algorithms include linear interpolation, polynomial interpolation, and spline interpolation. Optionally, a quadratic polynomial interpolation algorithm is used to interpolate the blood glucose tags to obtain the blood glucose curve showing the change in blood glucose over time. Figure 3 As shown, the curve of blood glucose change over time after interpolation is f(t), and the sampling time for a specific sampling point i is t. i The blood glucose label is represented as y i When t = 0, y i (0) = f(0) indicates the case where blood glucose and label are collected simultaneously.

[0068] Figure 4AThe diagram shown is a flowchart illustrating the model training method described in the embodiments of this application. Figure 4A As shown, step S13 includes steps S131 to S135.

[0069] Step S131: The blood glucose curve is shifted according to the lag time to obtain the shifted blood glucose curve.

[0070] Step S132: Obtain the offset blood glucose label based on the offset blood glucose curve.

[0071] Step S133: Use the offset blood glucose label and the subcutaneous Raman spectrum to train the initial machine learning or deep learning model to obtain a regression model.

[0072] Step S134: Use model evaluation metrics to screen the regression model in order to obtain the target time difference.

[0073] Step S135: Correct the blood glucose curve using a lag time difference function based on the target time difference to obtain the corrected blood glucose label.

[0074] Among some possible implementations, Figure 4B The diagram shown is a schematic representation of the offset processing described in an embodiment of this application. Figure 4B As shown, the blood glucose curve is shifted according to the lag time to obtain the shifted blood glucose curve. The blood glucose curve at sampling time t is then obtained based on the shifted blood glucose curve. i Blood glucose label value y after offset Δt i (Δt)=f Δt (t i Specifically, without changing the trend of blood glucose changes over time, shifting the blood glucose curve f(t) to the right by a lag time Δt, then at time t, the blood glucose concentration f(t) at the lag time Δt is... Δt (t) = f(t-Δt), and the trend of change is as follows: Figure 4B As shown. Finally, the subcutaneous Raman spectrum X and the shifted blood glucose label Y are obtained, at which point Y(Δt) = (y1(Δt),...,y n (Δt)) T , where y i (Δt)=f Δt (t i The offset blood glucose label and the subcutaneous Raman spectrum are used to train an initial machine learning or deep learning model to obtain a regression model. The regression model is then screened using model evaluation metrics to obtain the target time difference Δt. opt The blood glucose curve is corrected using a lag time difference function based on the target time difference to obtain the corrected blood glucose label.

[0075] Figure 5 The diagram shown is a flowchart illustrating the model training method described in the embodiments of this application. Figure 5 As shown, step S134 includes steps S1341 to S1342.

[0076] Step S1341: Obtain the root mean square error corresponding to different lag times of the regression model using K-fold cross-validation or independent testing.

[0077] Step S1342: Filter the root mean square errors corresponding to the different lag times to obtain the target time difference.

[0078] In some possible implementations, the lag time Δt varies from 0 to 25 minutes depending on the location of the blood glucose measurement. Δt is iterated sequentially within the 0-25 minute range, and the lag time of j minutes is denoted as Δt. j Then Y(Δt) j )=(y1(Δt j ),...,y n (Δt j )) T The target time difference Δt for all lag times can be obtained using machine learning regression models and K-fold cross-validation or independent testing. opt Evaluation metrics for regression models include mean absolute relative error and root mean square error. Optionally, the root mean square error of the regression model at different lag times can be obtained using K-fold cross-validation or independent testing.

[0079] In one embodiment of this application, obtaining the root mean square error corresponding to different lag times of the regression model using K-fold cross-validation or independent testing includes:

[0080]

[0081] Where, Δt j For a lag time of j minutes, RMSE(Δt) j ) represents the lag time Δt j The corresponding root mean square error, Let y be the regression model prediction result for the i-th sample. i (Δt j ) represents the offset lag time Δt j The blood glucose label is denoted by n, where n is the number of sampling points.

[0082] In some possible implementations, calculating the RMSE for each lag time within the range of 0–25 minutes yields a curve showing the RMSE changing over time. At this point, the target time difference Δt... opt The minimum lag time for error:

[0083] Δt opt =argmin Δt RMSE(Δt).

[0084] In one embodiment of this application, Figure 6 This diagram illustrates the validation results of the blood glucose prediction model described in the embodiments of this application. Figure 6 As shown, the model training method further includes: validating the blood glucose prediction model using the mean absolute relative error and / or root mean square error to obtain the validation results of the blood glucose prediction model. Figure 7 The diagram shown is a structural schematic of the model training system described in an embodiment of this application. Figure 7 As shown, the model training system 100 includes a data acquisition module 110, a label processing module 120, a label correction module 130, and a model training module 140.

[0085] The data acquisition module 110 is used to acquire blood glucose tags and subcutaneous Raman spectra.

[0086] The label processing module 120 is used to process the blood glucose label to obtain a blood glucose curve.

[0087] The label correction module 130 is used to correct the blood glucose curve using a time lag function to obtain a corrected blood glucose label.

[0088] The model training module 140 is used to train a machine learning or deep learning model using the corrected blood glucose label and the subcutaneous Raman spectrum to obtain a blood glucose prediction model.

[0089] In some possible implementations, the collected blood glucose labels and subcutaneous Raman spectra are divided into training and testing datasets, respectively. The subcutaneous Raman spectra of the training dataset are X. train The blood glucose label is Y. train The subcutaneous Raman spectrum of the test dataset is X. test The blood glucose label is Y. test The blood glucose labels Y in the training dataset were interpolated using quadratic polynomial interpolation. train (Δt), Δt=1,2,...25. Establish a blood glucose label Y. train and subcutaneous Raman spectrum is X train A blood glucose prediction model was established, and the root mean square error (RMSE) of the blood glucose prediction model as a function of Δt was obtained using 10-fold cross-validation. The Δt corresponding to the minimum RMSE was selected as the target time difference Δt. opt .like Figure 6As shown, it is easy to see that the RMSE value first decreases and then increases over time. The target time difference is 14 minutes, at which point the root mean square error (RMSE) = 2.75. Using the subcutaneous Raman spectra X from the test dataset... test and blood glucose label Y test The blood glucose prediction model was tested, and the prediction results were compared with the absolute and relative errors (MARD) of the blood glucose labels to obtain the test results of the blood glucose prediction model.

[0090] In other possible implementations, during data collection, each subject undergoes specific blood glucose regulation methods, such as an oral glucose tolerance test. The data acquisition module 110 collects a series of blood glucose tags and corresponding subcutaneous Raman spectral data during blood glucose changes. After data acquisition, all blood glucose tags Y and subcutaneous Raman spectra X can be obtained. Where Y = (y1,...,y...) n ) T Here, n represents the sampling point. The tag processing module 120 processes the discontinuous blood glucose tags after collecting the subject's blood glucose tags and subcutaneous Raman spectra to obtain a blood glucose curve that changes continuously over time. Since the time interval between the collected blood glucose tag values ​​is greater than the blood glucose lag time difference, the tag correction module 130 corrects the blood glucose curve using a lag time difference function to obtain corrected blood glucose tags. The model training module 140 uses the corrected blood glucose tags and the subcutaneous Raman spectra to train a machine learning or deep learning model to obtain a blood glucose prediction model.

[0091] In this embodiment, the data acquisition module 110 is used to acquire blood glucose tags and subcutaneous Raman spectra, and the tag processing module 120 is used to process the blood glucose tags to obtain a blood glucose curve. The tag correction module 130 is used to correct the blood glucose curve using a time lag function, and the model training module 140 is used to train a machine learning or deep learning model using the corrected blood glucose tags and subcutaneous Raman spectra to obtain a blood glucose prediction model. The model training system 100 can obtain a more accurate blood glucose prediction model, realizing automated, accurate, and efficient blood glucose prediction.

[0092] Figure 8 The diagram shown is a flowchart illustrating the blood glucose prediction method described in an embodiment of this application. Figure 8 As shown, the blood glucose prediction method includes the following steps S21 to S22.

[0093] Step S21: Obtain the subcutaneous Raman spectrum of the target sample.

[0094] Step S22: The blood glucose prediction model obtained by the model training method described in any embodiment of this application is used to predict the subcutaneous Raman spectrum to be tested, and the blood glucose prediction result is obtained.

[0095] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0096] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0097] 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 implementation should not be considered beyond the scope of this application.

[0098] This application also provides an electronic device. Figure 9 The diagram shown is a structural schematic of the electronic device 900 described in an embodiment of this application. Figure 9 As shown, in this embodiment, the electronic device 900 includes a memory 910 and a processor 920.

[0099] The memory 910 is used to store computer programs; preferably, the memory 910 includes various media that can store program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk.

[0100] Specifically, memory 910 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. Electronic device 900 may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 910 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application. It is understood that memory 910 may be volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable categories of memory.

[0101] The processor 920 is connected to the memory 910 and is used to execute the computer program stored in the memory 910 so that the electronic device 900 performs the model training method and / or the blood glucose prediction method described in any embodiment of this application.

[0102] Optionally, the processor 920 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0103] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by the processor 920. The processor 920 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 920 or by instructions in the form of software. The processor 920 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 920 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor 920 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.

[0104] Optionally, the electronic device 900 in this embodiment may further include a display 930. The display 930 is communicatively connected to the memory 910 and the processor 920, and is used to display the relevant graphical user interface (GUI) of the model training method described in the embodiments of this application and / or the blood glucose prediction method described in other embodiments of this application.

[0105] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements the model training method described in any embodiment of this application and / or the blood glucose prediction method described in other embodiments of this application.

[0106] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0107] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0108] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A model training method, characterized in that, include: Collect blood glucose tags and subcutaneous Raman spectra; The blood glucose labels are processed to obtain blood glucose curves; The blood glucose curve is corrected using a time lag function to obtain a corrected blood glucose label; The corrected blood glucose label and the subcutaneous Raman spectrum are used to train a machine learning or deep learning model to obtain a blood glucose prediction model.

2. The model training method according to claim 1, characterized in that, Processing the blood glucose label to obtain a blood glucose curve includes: The blood glucose label is interpolated using an interpolation algorithm to obtain the blood glucose curve showing the change in blood glucose over time.

3. The model training method according to claim 1, characterized in that, The blood glucose curve is corrected using a time lag function to obtain the corrected blood glucose label, which includes: The blood glucose curve is shifted based on the lag time to obtain the shifted blood glucose curve. Obtain the offset blood glucose label based on the offset blood glucose curve; The offset blood glucose label and the subcutaneous Raman spectrum are used to train an initial machine learning or deep learning model to obtain a regression model; The regression models are screened using model evaluation metrics to obtain the target time difference; The blood glucose curve is corrected using a lag time difference function based on the target time difference to obtain the corrected blood glucose label.

4. The model training method according to claim 3, characterized in that, The regression models are screened using model evaluation metrics to obtain the target time difference, including: The root mean square error of the regression model at different lag times is obtained using K-fold cross-validation or independent testing. The root mean square error corresponding to the different lag times is filtered to obtain the target time difference.

5. The model training method according to claim 1, characterized in that, The root mean square error of the regression model at different lag times was obtained using K-fold cross-validation or independent testing, including: Where, Δt j For a lag time of j minutes, RMSE(Δt) j ) represents the lag time Δt j The corresponding root mean square error, Let y be the regression model prediction result for the i-th sample. i (Δt j ) represents the offset lag time Δt j The blood glucose label is denoted by n, where n is the number of sampling points.

6. The model training method according to claim 1, characterized in that, Also includes: The blood glucose prediction model is validated using the mean absolute relative error and / or root mean square error to obtain the validation results of the blood glucose prediction model.

7. A model training system, characterized in that, include: The data acquisition module is used to acquire blood glucose tags and subcutaneous Raman spectra; The label processing module is used to process the blood glucose labels to obtain blood glucose curves; The label correction module is used to correct the blood glucose curve using a hysteresis time difference function to obtain the corrected blood glucose label. The model training module is used to train a machine learning or deep learning model using the corrected blood glucose label and the subcutaneous Raman spectrum to obtain a blood glucose prediction model.

8. A method for predicting blood glucose levels, characterized in that, include: Obtain the subcutaneous Raman spectrum of the target sample; The blood glucose prediction model obtained by the model training method according to any one of claims 1 to 6 is used to predict the subcutaneous Raman spectrum to be tested, and the blood glucose prediction result is obtained.

9. An electronic device, characterized in that, The electronic device includes: Memory, used to store computer programs; A processor for executing a computer program stored in the memory to cause the electronic device to perform the model training method as described in any one of claims 1 to 6 and / or the blood glucose prediction method as described in claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the model training method of any one of claims 1 to 6 and / or the blood glucose prediction method of claim 8.