Method for constructing glucose-metabolism-related disease prediction model, method for constructing non-diabetic subtyping model, and method for predicting postprandial blood glucose
By constructing an unsupervised pre-trained model and a fine-tuned model based on dynamic blood glucose concentration data, combined with a Transformer model, the shortcomings of traditional diabetes diagnosis methods are addressed, enabling accurate prediction of individual risk of prediabetes and postprandial blood glucose, thus improving the timeliness and accuracy of diagnosis.
Patent Information
- Application Number
- PCT/CN2024/113123
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-21
- Filing Date
- 2024-08-19
- Publication Date
- 2026-02-26
AI Technical Summary
Existing methods for diagnosing diabetes rely on clinical physiological and pathological tests, which are time-consuming and labor-intensive and cannot detect the risk of conversion to prediabetes in individuals in a timely manner. Traditional machine learning algorithms are not accurate enough on CGM data and cannot accurately predict the type of diabetes and the risk of complications.
By constructing an unsupervised pre-trained model based on dynamic blood glucose concentration data, fine-tuning it with clinical diagnostic labels and physiological data, and using the Transformer model and multi-head self-attention mechanism for machine learning, a prediction model for glucose metabolism-related diseases is constructed, enabling the prediction of diabetes type and postprandial blood glucose.
It improves the accuracy of individual risk prediction for prediabetes and the accuracy of postprandial blood glucose prediction, reduces reliance on traditional testing, and provides more timely and accurate early warning and management methods.
Smart Images

Figure CN2024113123_26022026_PF_FP_ABST
Abstract
Description
Method for constructing a model for predicting a disease related to sugar metabolism, a model for non-diabetic classification, and a method for predicting postprandial blood glucose
[0001] Related applications
[0002] This application claims priority to the Chinese patent applications with the application number 2024108113834, the title of "Method and device for constructing a model for predicting a disease related to sugar metabolism, predicting a disease related to sugar metabolism", the application number 202410811375X, the title of "Method and device for constructing a model for predicting postprandial blood glucose, predicting postprandial blood glucose", the application number 2024108113694, the title of "Method and device for constructing a model for non-diabetic classification, predicting non-diabetic classification", filed on June 21, 2024, the contents of which are hereby incorporated by reference in their entirety. TECHNICAL FIELD
[0003] The present application belongs to the field of artificial intelligence prediction technology related to diseases related to sugar metabolism, and in particular, to a method for constructing a model for predicting a disease related to sugar metabolism, a model for non-diabetic classification, and predicting postprandial blood glucose. BACKGROUND
[0004] Diabetes is one of the three major chronic diseases in the world, and the complications caused by diabetes, including retinopathy, are important factors that threaten the health and life of patients. Diabetes is caused by abnormal sugar metabolism dynamics such as insufficient insulin secretion and decreased insulin sensitivity, and there is strong inter-patient heterogeneity in clinical manifestations, treatment and prognosis.
[0005] The prevalence of diabetes has increased rapidly in recent decades and has become a growing public health problem. Early warning and stratified management of non-diabetic populations are crucial for the prevention and control of diabetes, especially for people with prediabetes, which is a subclinical state without symptoms, with a global prevalence of about 10% to 30%.
[0006] However, prediabetes can be converted to type 2 diabetes, with an annual conversion rate of 5% to 10%, and type 2 diabetes is associated with morbidity and mortality. Therefore, it is very important to classify non-diabetic populations, determine which individuals are at risk of developing diabetes, and provide targeted and appropriate dietary and exercise intervention recommendations.
[0007] Traditional diabetes diagnosis mainly relies on clinical physiological and pathological tests, and is diagnosed by detecting indicators of sugar metabolism including fasting blood glucose, insulin, C peptide, glycosylated hemoglobin, etc. The screening of diabetes complications usually starts from the fifth year after the diagnosis of diabetes, and combines medical examination methods including fundus image examination to screen for complication risks and manage diabetes progression. However, the clinical physiological and pathological examination is time-consuming and laborious, and the screening and management of complications rely on complex medical examination equipment, which is an invasive examination and requires individuals to go to the hospital, and the accessibility is poor and the heterogeneity between patients is ignored. The screening and detection of a large number of diabetes patients and high-risk groups have brought great pressure to the medical system.
[0008] The continuous glucose monitoring system (CGMS) provides comprehensive and real-time blood glucose level data for users, reflecting the comprehensive, rich and complex dynamic characteristics of blood glucose, and is developing towards convenience, accuracy, minimally invasive, and even non-invasive. The current technology for diagnosing diabetes and its complications based on CGM data mainly focuses on two aspects: one is to obtain statistical indicators such as mean, variance, and time proportion within the range from CGM data, which reflect the blood glucose dynamic characteristics of individuals. However, these indicators can only reflect a single blood glucose dynamic characteristic, and combined with clinical experience and population data, abnormal glucose metabolism can be judged from these statistical indicators to achieve diabetes diagnosis based on CGM data. However, this method can only diagnose abnormal glucose metabolism, i.e. identify patients as diabetes patients / normal control population, lacks interpretation of problems including diabetes type, complication risk, etc., has insufficient accuracy, and has limited application scenarios; the other method is to apply traditional machine learning algorithms such as neural networks to supervised training and prediction of a single and small data set, which has low prediction accuracy.
[0009] SUMMARY
[0010] Therefore, an embodiment of the present application provides a method for constructing a glucose metabolism related disease prediction model, a non-diabetes classification model and predicting postprandial blood glucose
[0011] One or more embodiments of the present application provide a method for constructing a glucose metabolism related disease prediction model, comprising:
[0012] Obtaining dynamic blood glucose concentration data of a first sample set, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-training model;
[0013] Obtaining dynamic blood glucose concentration data and clinical diagnosis labels of a second sample set, and training the pre-training model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain a glucose metabolism impaired disease prediction model; and / or
[0014] obtaining dynamic blood glucose concentration data, clinical diagnosis labels and clinical physiological data of a third sample set, training the pre-training model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain a glucose metabolism impairment degree prediction model;
[0015] The first sample set and the third sample set include a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples, and the second sample set includes normal glucose tolerance samples and glucose metabolism impairment disease samples corresponding to a prediction task.
[0016] In one of the embodiments, the machine learning based on the dynamic blood glucose concentration data of the first sample set in an unsupervised manner to obtain the pre-training model includes:
[0017] The dynamic blood glucose concentration data of the first sample set is preprocessed to obtain continuous blood glucose sequence data of the first sample set.
[0018] The continuous blood glucose sequence data of the first sample set is input into an initial model to obtain blood glucose dynamic feature data of the first sample set.
[0019] The continuous blood glucose sequence data of the first sample set is subjected to mask processing, and the masked dynamic blood glucose sequence data of the first sample set is input into the initial model to obtain masked blood glucose dynamic feature data of the first sample set.
[0020] The training loss of the initial model is determined according to the blood glucose dynamic feature data of the first sample set and the masked blood glucose dynamic feature data of the target sample, the parameters of the initial model are updated according to the loss training loss of the initial model, and the pre-training model is obtained according to the updated initial model parameters.
[0021] In one of the embodiments, the initial model includes a transformer model, and the transformer model includes an initial encoding layer, a multi-head self-attention mechanism layer and a feedforward neural network layer.
[0022] In one of the embodiments, the training of the pre-training model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain the glucose metabolism impairment disease prediction model includes:
[0023] The dynamic blood glucose concentration data of the second sample set is input into the pre-training model to obtain blood glucose dynamic feature data of the second sample set.
[0024] The blood glucose dynamic feature data of the second sample set is input into the first fine-tuning layer to obtain predicted clinical diagnosis labels of the second sample set.
[0025] determine a first training loss based on the predicted clinical diagnosis label of the second sample set and the clinical diagnosis label, update parameters of the pre-training model and the first fine-tuning layer according to the first training loss, and obtain the impaired glucose metabolism disease prediction model corresponding to the prediction task according to the pre-training model parameters after the update and the first fine-tuning layer parameters after the update.
[0026] In one of the embodiments, the second fine-tuning layer includes a linear encoding layer and the prediction layer, and the training of the pre-training model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis label and the clinical physiological data of the third sample set to obtain the impaired glucose metabolism degree prediction model includes:
[0027] inputting the dynamic blood glucose concentration data of the third sample set into the pre-training model to obtain blood glucose dynamic feature data of the third sample set;
[0028] inputting the blood glucose dynamic feature data of the third sample set into the linear encoding layer to obtain impaired glucose metabolism feature data of the third sample set;
[0029] inputting the impaired glucose metabolism feature data of the third sample set into the prediction layer to obtain a plurality of predicted clinical physiological features of each sample in the third sample set;
[0030] determining a second training loss based on the plurality of predicted clinical physiological features of each sample in the third sample set, the clinical diagnosis label and the plurality of clinical physiological data, updating parameters of the linear encoding layer and the prediction layer according to the second training loss, and obtaining the impaired glucose metabolism degree prediction model according to the pre-training model and the updated second fine-tuning layer parameters.
[0031] One or more embodiments of the present application provide a method for predicting a glucose metabolism related disease, comprising:
[0032] obtaining dynamic blood glucose concentration data of a subject;
[0033] inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism disease prediction model constructed by the method to obtain an impaired glucose metabolism disease prediction result of the subject; and / or
[0034] inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism degree prediction model constructed by the method to obtain an impaired glucose metabolism degree prediction result of the subject.
[0035] One or more embodiments of the present application further provide a device for constructing a glucose metabolism related disease prediction model, comprising:
[0036] a pre-training module configured to obtain dynamic blood glucose concentration data of a first sample set, and perform machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-training model;
[0037] The first model fine-tuning module is configured to obtain dynamic blood glucose concentration data and clinical diagnosis labels of a second sample set, and train the pre-trained model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain a glucose metabolism impairment disease prediction model; and / or
[0038] The second model fine-tuning module is configured to obtain dynamic blood glucose concentration data, clinical diagnosis labels and clinical physiological data of a third sample set, and train the pre-trained model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain a glucose metabolism impairment degree prediction model.
[0039] The first sample set and the third sample set include a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples, and the second sample set includes normal glucose tolerance samples and glucose metabolism impairment disease samples corresponding to a prediction task.
[0040] One or more embodiments of the present application provide a device for predicting a glucose metabolism related disease, comprising:
[0041] The data acquisition module is configured to obtain dynamic blood glucose concentration data of a subject.
[0042] The first prediction module is configured to input the dynamic blood glucose concentration data of the subject into the glucose metabolism impairment disease prediction model constructed by the method to obtain a glucose metabolism impairment disease prediction result of the subject; and / or
[0043] The second prediction module is configured to input the dynamic blood glucose concentration data of the subject into the glucose metabolism impairment degree prediction model constructed by the method to obtain a glucose metabolism impairment degree prediction result of the subject.
[0044] One or more embodiments of the present application provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above method.
[0045] One or more embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above method.
[0046] One or more embodiments of the present application further provide a method for constructing a non-diabetes classification model, comprising:
[0047] Obtaining dynamic blood glucose concentration data of a target sample, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-trained model.
[0048] obtaining blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and clustering the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data;
[0049] The non-diabetic blood glucose dynamic distribution data includes a plurality of blood glucose dynamic feature data clusters and a non-diabetic classification represented by the clusters.
[0050] The target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0051] In one embodiment, the pre-training model is obtained by machine learning based on the dynamic blood glucose concentration data of the target samples in an unsupervised manner, including:
[0052] The dynamic blood glucose sequence data of the target samples is obtained by preprocessing the dynamic blood glucose concentration data of the target samples.
[0053] The blood glucose dynamic feature data of the target samples is obtained by inputting the dynamic blood glucose sequence data of the target samples into an initial model.
[0054] The dynamic blood glucose sequence data of the target samples is processed by masking to obtain masked dynamic blood glucose sequence data of the target samples, and the blood glucose dynamic feature data of the target samples after masking is obtained by inputting the masked dynamic blood glucose sequence data of the target samples into the initial model.
[0055] The training loss is determined according to the blood glucose dynamic feature data of the target samples and the blood glucose dynamic feature data of the target samples after masking, the parameters of the initial model are updated according to the training loss, and the pre-training model is obtained according to the initial model after updating the parameters.
[0056] In one embodiment, the initial model includes an initial encoding layer and an initial prediction layer, and the initial prediction layer includes a multi-head self-attention mechanism layer and a feedforward neural network layer.
[0057] In one embodiment, the method further includes:
[0058] A plurality of clinical features corresponding to each blood glucose dynamic feature data cluster are obtained, and the diabetes risk of each non-diabetic classification is determined according to the plurality of clinical features and the blood glucose fluctuation feature of each blood glucose dynamic feature data cluster.
[0059] One or more embodiments of the present application provide a method for predicting non-diabetic classification, including:
[0060] Obtaining dynamic blood glucose concentration data of a to-be-tested sample;
[0061] determining a non-diabetic type of the to-be-tested sample according to dynamic blood glucose concentration data of the to-be-tested sample;
[0062] The method is implemented based on a non-diabetic type model, and the non-diabetic type model is used to perform the following steps:
[0063] inputting dynamic blood glucose concentration data of the to-be-tested sample into a pre-trained model to obtain blood glucose dynamic feature data of the to-be-tested sample;
[0064] determining a non-diabetic type of the to-be-tested sample based on the blood glucose dynamic feature data of the to-be-tested sample and non-diabetic blood glucose dynamic distribution data;
[0065] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0066] The non-diabetic blood glucose dynamic distribution data includes a plurality of blood glucose dynamic feature data clusters, and the plurality of blood glucose dynamic feature data clusters are obtained by clustering blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-trained model.
[0067] In one of the embodiments, the determination of the non-diabetic type of the to-be-tested sample based on the blood glucose dynamic feature data of the to-be-tested sample and the non-diabetic blood glucose dynamic distribution data includes:
[0068] calculating the blood glucose dynamic feature data of the to-be-tested sample and an average distance of each blood glucose dynamic feature data cluster;
[0069] determining the non-diabetic type of the to-be-tested sample according to a non-diabetic type represented by a blood glucose dynamic feature data cluster with the minimum average distance;
[0070] Optionally, the pre-trained model includes a pre-trained encoding layer and a prediction layer, and the prediction layer includes a multi-head self-attention mechanism layer and a feedforward neural network layer.
[0071] One or more embodiments of the present application provide a device for constructing a non-diabetic type model, which includes:
[0072] a pre-training module configured to obtain dynamic blood glucose concentration data of target samples, and obtain a pre-trained model by machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target samples;
[0073] a clustering module configured to obtain blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-trained model, and obtain non-diabetic blood glucose dynamic distribution data by clustering the blood glucose dynamic feature data of the plurality of non-diabetic samples;
[0074] The non-diabetic blood glucose dynamic distribution data includes a plurality of blood glucose dynamic feature data clusters and a non-diabetic type represented by the blood glucose dynamic feature data clusters.
[0075] The target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0076] One or more embodiments of the present application provide a method for predicting a non-diabetic type, comprising:
[0077] The data acquisition module is configured to acquire dynamic blood glucose concentration data of a to-be-tested sample.
[0078] The non-diabetic type module is configured to determine a non-diabetic type of the to-be-tested sample based on the dynamic blood glucose concentration data of the to-be-tested sample.
[0079] The device is implemented based on a non-diabetic type model, and the non-diabetic type model is configured to perform the following steps:
[0080] The dynamic blood glucose concentration data of the to-be-tested sample is input into a pre-trained model to obtain blood glucose dynamic feature data of the to-be-tested sample.
[0081] The non-diabetic type of the to-be-tested sample is determined based on the blood glucose dynamic feature data of the to-be-tested sample and non-diabetic blood glucose dynamic distribution data.
[0082] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, and the target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0083] The non-diabetic blood glucose dynamic distribution data includes a plurality of blood glucose dynamic feature data clusters and a non-diabetic type represented by the blood glucose dynamic feature data clusters, and the plurality of blood glucose dynamic feature data clusters are obtained by clustering blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-trained model.
[0084] One or more embodiments of the present application also provide a computer device including a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.
[0085] One or more embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the above method.
[0086] One or more embodiments of the present application also provide a method for predicting postprandial blood glucose, comprising:
[0087] acquire blood glucose dynamic characteristic data of a subject, pre-meal instant blood glucose data and at least one dietary structure information, the blood glucose dynamic characteristic data of the subject being obtained based on a pre-trained model;
[0088] input the blood glucose dynamic characteristic data of the subject, the pre-meal instant blood glucose data and the at least one dietary structure information into a postprandial blood glucose prediction model, and output predicted postprandial blood glucose of the subject based on the postprandial blood glucose prediction model;
[0089] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0090] The postprandial blood glucose prediction model is obtained by training a machine learning model based on the blood glucose dynamic characteristic data of the subject, historical dietary structure information and corresponding target time zone historical blood glucose data, the target time zone historical blood glucose data including historical pre-meal blood glucose data and historical postprandial blood glucose data.
[0091] In one of the embodiments, the method comprises:
[0092] providing dietary prescription suggestions according to the predicted postprandial blood glucose of the subject;
[0093] Optionally, the machine learning model comprises a long short-term memory network model.
[0094] Optionally, the machine learning model comprises an encoding layer, a long short-term memory network layer and a prediction layer.
[0095] Another aspect of the present application provides a method for constructing a postprandial blood glucose prediction model, comprising:
[0096] acquire blood glucose dynamic characteristic data of a subject, historical dietary structure information and corresponding target time zone historical blood glucose data, the blood glucose dynamic characteristic data of the subject being obtained based on a pre-trained model;
[0097] train a machine learning model based on the blood glucose dynamic characteristic data of the subject, the historical dietary structure information and the corresponding target time zone historical blood glucose data to obtain a postprandial blood glucose prediction model;
[0098] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0099] In one of the embodiments, the step of constructing the pre-trained model comprises:
[0100] The dynamic blood glucose concentration data of the target sample is preprocessed to obtain dynamic blood glucose sequence data of the target sample;
[0101] The dynamic blood glucose sequence data of the target sample is input into an initial model to obtain blood glucose dynamic feature data of the target sample;
[0102] The dynamic blood glucose sequence data of the target sample is subjected to mask processing to obtain masked dynamic blood glucose sequence data of the target sample, and the masked dynamic blood glucose sequence data of the target sample is input into the initial model to obtain masked blood glucose dynamic feature data of the target sample;
[0103] A first training loss is determined according to the blood glucose dynamic feature data of the target sample and the masked blood glucose dynamic feature data of the target sample, the parameters of the initial model are updated according to the first training loss, and the pre-training model is obtained according to the initial model after the parameters are updated.
[0104] In one of the embodiments, the initial model includes an initial encoding layer and an initial prediction layer, and the initial prediction layer includes a multi-head self-attention mechanism layer and a feedforward neural network layer.
[0105] In one of the embodiments, a postprandial blood glucose prediction model is obtained by training a machine learning model using the blood glucose dynamic feature data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, and the method includes:
[0106] The blood glucose dynamic feature data of the subject, the historical dietary structure information, and the corresponding preprandial blood glucose data are input into the machine learning model to obtain target time zone predicted blood glucose data;
[0107] A second training loss is determined based on the target time zone predicted postprandial blood glucose data and the target time zone historical blood glucose data, the parameters of the machine learning model are updated according to the second training loss, and the postprandial blood glucose prediction model is obtained according to the machine learning model after the parameters are updated.
[0108] Optionally, the machine learning model includes a long short-term memory network model.
[0109] The machine learning model includes an encoding layer, a long short-term memory network layer, and a prediction layer.
[0110] One or more embodiments of the present application also provide a device for predicting postprandial blood glucose, which includes:
[0111] A first data acquisition module is configured to acquire blood glucose dynamic feature data of a subject, preprandial blood glucose data, and at least one dietary structure information, and the blood glucose dynamic feature data of the subject is obtained based on a pre-training model.
[0112] a blood glucose prediction module configured to input the blood glucose dynamic characteristic data, the immediate pre-meal blood glucose data, and the at least one meal structure information of the subject into a post-meal blood glucose prediction model, and predict the post-meal blood glucose of the subject based on an output of the post-meal blood glucose prediction model;
[0113] The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0114] The post-meal blood glucose prediction model is obtained by training a machine learning model based on the blood glucose dynamic characteristic data, the historical meal structure information, and corresponding target time zone historical blood glucose data of the subject, the target time zone historical blood glucose data including historical pre-meal blood glucose data and historical post-meal blood glucose data.
[0115] One or more embodiments of the present application further provide a device for constructing a post-meal blood glucose prediction model, comprising:
[0116] a second data acquisition module configured to acquire blood glucose dynamic characteristic data, historical meal structure information, and corresponding target time zone historical blood glucose data of the subject, the blood glucose dynamic characteristic data of the subject being obtained based on a pre-training model;
[0117] a model training module configured to train a machine learning model based on the blood glucose dynamic characteristic data, the historical meal structure information, and the corresponding target time zone historical blood glucose data of the subject to obtain a post-meal blood glucose prediction model, the post-meal blood glucose prediction model being configured to predict post-meal blood glucose of the subject corresponding to the meal structure information;
[0118] The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0119] One or more embodiments of the present application further provide a computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.
[0120] One or more embodiments of the present application further provide a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the above method.
[0121] The details of one or more embodiments of the present application are set forth in the accompanying description, which makes apparent other features, objectives and advantages of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0122] In order to more clearly illustrate the technical solutions in the embodiments of the present application, more completely understand the present application and its beneficial effects, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0123] FIG. 1 is a flow chart of a method for constructing a prediction model of a sugar metabolism related disease according to an embodiment of the present application;
[0124] FIG. 2 is a flow chart of a method for predicting a sugar metabolism related disease according to an embodiment of the present application;
[0125] FIG. 3 is a structural block diagram of an apparatus for constructing a prediction model of a sugar metabolism related disease according to an embodiment of the present application;
[0126] FIG. 4 is a structural block diagram of an apparatus for predicting a sugar metabolism related disease according to an embodiment of the present application;
[0127] FIG. 5 is an internal structure diagram of a computer device according to an embodiment of the present application;
[0128] FIG. 6 is a flow chart of a method for constructing a prediction model of a sugar metabolism related disease according to Embodiment 1 of the present application;
[0129] FIG. 7 is a flow chart of a method for constructing a pre-training model according to Embodiment 1 of the present application;
[0130] FIG. 8 is a flow chart of a method for constructing a risk model of impaired sugar metabolism according to Embodiment 1 of the present application;
[0131] FIG. 9 is a comparison result of accuracy of different prediction models in predicting diabetes according to Embodiment 2 of the present application;
[0132] FIG. 10 is a comparison result of accuracy of different prediction models in predicting diabetes complications according to Embodiment 2 of the present application;
[0133] FIG. 11 is a flow chart of a method for predicting a non-diabetic type according to an embodiment of the present application;
[0134] FIG. 12 is a flow chart of a method for constructing a non-diabetic type model according to an embodiment of the present application;
[0135] FIG. 13 is a structural block diagram of an apparatus for predicting a non-diabetic type according to an embodiment of the present application;
[0136] FIG. 14 is a structural block diagram of an apparatus for constructing a non-diabetic type model according to an embodiment of the present application;
[0137] FIG. 15 is a flowchart of a method for predicting a non-diabetes classification according to an embodiment of the present application;
[0138] FIG. 16 is a structural diagram of a pre-trained model according to an embodiment of the present application;
[0139] FIG. 17 is a flowchart of a method for constructing a pre-trained model according to an embodiment of the present application;
[0140] FIG. 18 is a comparison result of consistency between a non-diabetes classification, a Glucotype classification and a clinical gold standard according to an embodiment of the present application;
[0141] FIG. 19 is a flowchart of a method for predicting postprandial blood glucose according to an embodiment of the present application;
[0142] FIG. 20 is a flowchart of a method for constructing a postprandial blood glucose prediction model according to an embodiment of the present application;
[0143] FIG. 21 is a structural diagram of an apparatus for predicting postprandial blood glucose according to an embodiment of the present application;
[0144] FIG. 22 is a structural diagram of an apparatus for constructing a postprandial blood glucose prediction model according to an embodiment of the present application;
[0145] FIG. 23 is a flowchart of a method for constructing a postprandial blood glucose prediction model according to an embodiment of the present application;
[0146] FIG. 24 is a flowchart of a method for training a postprandial blood glucose prediction model according to an embodiment of the present application;
[0147] FIG. 25 is a comparison result of accuracy of a postprandial blood glucose prediction model and a baseline model in predicting postprandial blood glucose according to an embodiment of the present application. DETAILED DESCRIPTION
[0148] The present application will be further described below in conjunction with embodiments and examples. It should be understood that these embodiments and examples are only used to explain the present application and not intended to limit the scope of the present application. The purpose of providing these embodiments and examples is to make the disclosure of the present application more thorough and comprehensive. It should also be understood that the present application can be implemented in many different forms and is not limited to the embodiments and examples described herein. Those skilled in the art can make various modifications or changes without departing from the spirit and scope of the present application, and the equivalent forms thus fall within the protection scope of the present application. In addition, in the following description, a large number of specific details are given in order to provide a more complete understanding of the present application. It should be understood that the present application can be implemented without one or more of these details.
[0149] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0150] The terms
[0151] Unless otherwise indicated or unless contradicted by context, the terms or phrases used herein have the following meanings:
[0152] The term "and / or", "or / and", "and / or" used herein in the alternative includes any one of two or more of the associated listed items, and also includes any and all combinations of the associated listed items, including any two of the associated listed items, any more of the associated listed items, or all of the associated listed items. It is to be noted that when at least three items are connected by at least two conjunctions selected from "and / or", "or / and", "and / or", it is to be understood that the technical solution in this application undoubtedly includes the technical solution connected by "logical and", and also undoubtedly includes the technical solution connected by "logical or". For example, "A and / or B" includes three parallel solutions of A, B and A+B. For another example, the technical solution of "A, and / or, B, and / or, C, and / or, D" includes any one of A, B, C and D (i.e. the technical solution connected by "logical or"), and also includes any and all combinations of A, B, C and D, i.e. includes the combination of any two or any three of A, B, C and D, and also includes the four-item combination of A, B, C and D (i.e. the technical solution connected by "logical and").
[0153] In this application, "multiple", "various", "multiple times", "multiple" and the like are used without specific limitation, which means more than two or equal to two in quantity. For example, "one or more" means one or more than two.
[0154] As used herein, "combinations thereof", "any combination thereof", "any combination manner thereof" and the like include all suitable combination manners of any two or more of the listed items.
[0155] In this application, "suitable", "suitable", "any suitable manner" and the like are described in the context of being able to implement the technical solutions of the application, solve the technical problems of the application, and achieve the intended technical effects of the application.
[0156] In this application, "further", "further", "particularly" and the like are used for description purposes, indicating differences in content, but should not be understood as limiting the scope of protection of the application.
[0157] In the present application, "optionally", "optional" or "option" means that it can be present or absent, i.e. it means that it is selected from either of the two parallel schemes "present" or "absent". If there are multiple "optionally" in a technical scheme, and there is no contradictory or mutually restrictive relationship, and no special instructions, each "optionally" is independent.
[0158] In the present application, the technical features described in an open manner include both the closed technical scheme consisting of the listed features and the open technical scheme including the listed features.
[0159] In the present application, when referring to a numerical interval (i.e. a numerical range), if no special instructions are given, the optional numerical distribution within the above numerical interval is considered to be continuous, and includes the two numerical end points (i.e. the minimum value and the maximum value) of the numerical range, as well as every numerical value between the two numerical end points. If no special instructions are given, when the numerical interval only points to the integers within the numerical interval, including the two end point integers of the numerical range and every integer between the two end points, in this document, it is equivalent to directly listing each integer, for example, t is an integer selected from 1 to 10, which means that t is any one integer selected from the group consisting of 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10. In addition, when multiple ranges are provided to describe a feature or characteristic, these ranges can be combined. In other words, unless otherwise specified, the ranges disclosed herein should be understood to include any and all sub-ranges therein.
[0160] In the present application, the temperature parameter, if not specifically limited, allows for constant temperature treatment, and also allows for fluctuations within a certain temperature range. It should be understood that the constant temperature treatment allows the temperature to fluctuate within the accuracy range controlled by the instrument. Fluctuations within a range such as ±5°C, ±4°C, ±3°C, ±2°C, ±1°C are allowed.
[0161] In the present application, % (w / w) and wt% both represent weight percentage, % (v / v) means volume percentage, and % (w / v) means mass volume percentage.
[0162] All documents mentioned in the present application are incorporated by reference in the present application as if each document is individually incorporated by reference. Unless it conflicts with the purpose and / or technical scheme of the present application, the cited documents are incorporated by reference in their entirety. When the present application refers to the cited documents, the definitions of the relevant technical features, terms, nouns, phrases, etc. in the cited documents are also incorporated by reference. When the present application refers to the cited documents, the examples and preferred ways of the relevant technical features cited are also incorporated by reference into the present application, but are limited to the implementation of the present application. It should be understood that when the cited content conflicts with the description in the present application, the present application is given priority or is modified according to the description in the present application.
[0163] Traditional diabetes diagnosis mainly relies on clinical physiological and pathological tests, for example, according to the test value of venous plasma glucose, the glucose metabolism state is divided into normal blood glucose (fasting blood glucose < 6.1 mmol / L, 2-hour post-load blood glucose < 7.8 mmol / L), impaired fasting glucose (6.1 ≤ fasting blood glucose < 7.0 mmol / L, 2-hour post-load blood glucose < 7.8 mmol / L), impaired glucose tolerance (fasting blood glucose < 7.0 mmol / L, 7.8 < 2-hour post-load blood glucose < 11.1 mmol / L), diabetes (fasting blood glucose ≥ 7.0 mmol / L, 2-hour post-load blood glucose ≥ 11.1 mmol / L). In the "China Type 2 Diabetes Prevention Guide (2020 Edition)", the diagnostic criteria for diabetes include typical symptoms of diabetes, plus fasting blood glucose ≥ 7.0 mmol / L, plus 2-hour post-load blood glucose ≥ 11.1 mmol / L, or plus HbA1c (glycated hemoglobin) ≥ 6.5%. It can be seen that the gold standard for the diagnosis of diabetes relies on the quantification of blood glucose concentration at two static time points of fasting and 2 hours after glucose load, which obviously cannot fully and timely reflect the blood glucose fluctuation of the patient, especially the hidden hyperglycemia and hypoglycemia, such as postprandial hyperglycemia and asymptomatic nocturnal hypoglycemia.
[0164] In addition, large fluctuations in blood glucose levels over a short period of time are also associated with a variety of health problems, including that blood glucose variability increases the risk of heart attack and stroke, as blood glucose fluctuations cause blood vessel damage and inflammation; blood glucose variability damages the kidneys, leading to decreased kidney function, as blood glucose fluctuations cause damage to the glomeruli (tiny structures in the kidneys that filter blood); blood glucose variability damages the retina (the light-sensitive tissue at the back of the eye), leading to vision loss, as blood glucose fluctuations cause damage to retinal blood vessels and leakage; blood glucose variability damages nerves, leading to numbness, tingling, and pain, as blood glucose fluctuations cause nerve damage and inflammation.
[0165] To at least partially solve the above technical problems, the first aspect of the present application provides a method for constructing a glucose metabolism related disease prediction model, comprising:
[0166] S10: obtaining dynamic blood glucose concentration data of a first sample set, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-trained model;
[0167] Specifically, the dynamic blood glucose concentration data refers to data obtained by continuous monitoring of the whole-day blood glucose concentration of the subject, for example, which can be CGM data.
[0168] In some embodiments, the pre-trained model comprises a pre-trained encoding layer and a prediction layer, and the prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer. The pre-trained model is used to predict the corresponding blood glucose dynamic feature data in an unsupervised manner by machine learning the dynamic blood glucose concentration data of the target sample. The pre-trained model is constructed by using the blood glucose continuous monitoring data of multiple types of samples, which can effectively capture and store the blood glucose dynamic change characteristics contained in the CGM.
[0169] In some embodiments, the first sample set comprises a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples, and a plurality of diabetes samples.
[0170] The diagnostic criteria for the normal glucose tolerance sample is that when the fasting blood glucose of the subject is less than 6.1 mmol / L and the 2-hour postprandial blood glucose is less than 7.8 mmol / L, it means that the body's blood glucose regulation ability after eating glucose is normal.
[0171] The diagnostic criteria for the impaired glucose tolerance sample is that the fasting blood glucose of the subject is normal (less than 6.0 mmol / L) when doing the oral glucose tolerance test, but the 2-hour postprandial blood glucose is between 7.8-11.1 mmol / L, which is higher than the normal value, but does not meet the diagnostic criteria for diabetes. This state is called impaired glucose tolerance.
[0172] Diabetes includes type 1 diabetes, type 2 diabetes, gestational diabetes, and other special types of diabetes. Among them, the gold standard for the diagnosis of type 2 diabetes is the glucose tolerance test. According to the diagnostic criteria for diabetes in the "China Type 2 Diabetes Prevention Guide (2020 Edition)", the diagnostic criteria for diabetes include typical symptoms of diabetes, fasting blood glucose ≥7.0 mmol / L, 2-hour postprandial blood glucose ≥11.1 mmol / L after sugar loading, or HbA1c (glycated hemoglobin) ≥6.5%.
[0173] In some embodiments, the dynamic blood glucose concentration data of the first sample set is obtained, and the pre-trained model is obtained by machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set, comprising:
[0174] The dynamic blood glucose concentration data of the first sample set is preprocessed to obtain continuous blood glucose sequence data of the first sample set;
[0175] The continuous blood glucose sequence data of the first sample set is input into the initial model to obtain blood glucose dynamic feature data of the first sample set;
[0176] The continuous blood glucose sequence data of the first sample set is subjected to mask processing, and the masked dynamic blood glucose sequence data of the first sample set is input into the initial model to obtain blood glucose dynamic feature data of the first sample set after masking;
[0177] The training loss of the initial model is determined according to the blood glucose dynamic feature data of the first sample set and the blood glucose dynamic feature data after the target sample mask, the parameters of the initial model are updated according to the loss training loss of the initial model, and the pre-training model is obtained according to the updated initial model parameters.
[0178] Specifically, the dynamic blood glucose sequence data refers to time sequence data obtained by segmenting the dynamic blood glucose concentration data.
[0179] In some embodiments, the preprocessing of the dynamic blood glucose concentration data refers to segmenting the dynamic blood glucose concentration data by day, taking the 288 complete measurement values from 0:00 to 24:00 of each day as a sequence, filtering incomplete sequences, and obtaining the all-day blood glucose time sequence. Among them, the blood glucose concentration value measured at each time point is uniformly discretized into Gmax-Gmin+1, i.e., 261 blood glucose levels from Gmin (40 mg / ml) to Gmax (300 mg / ml).
[0180] In some embodiments, for the collected CGM data, the present application constructs a deep self-attention transformation network model with a Transformer architecture as an initial model, and pre-trains it in the collected CGM data. Deep learning is used to effectively capture and store the blood glucose dynamic change patterns contained in CGM, so that the computer system can understand, reason and process this information, and then build a high-precision diabetes-related disease prediction model based on this information.
[0181] The initial model refers to a sequence data processing model that has not been trained. In some embodiments, the initial model is a Transformer model.
[0182] Among them, the Transformer is a deep learning model architecture for natural language processing (NLP) and other sequence-to-sequence tasks, which performs well in processing sequence data by introducing a self-attention mechanism.
[0183] In some embodiments, the initial model includes an initial encoding layer and an initial prediction layer, and the initial prediction layer is composed of a multi-head self-attention mechanism layer and a feedforward neural network layer. Specifically, the initial encoding layer is used to encode the positions and elements in the dynamic blood glucose sequence data to obtain blood glucose encoding feature data. The initial prediction layer is used to further learn the patterns of the dynamic blood glucose encoding feature data and output blood glucose dynamic feature data. In the pre-training process, the present application sets a mask randomly for the input sequence, and inputs the masked input sequence into the initial model to learn the features and patterns of the input sequence by reconstructing the elements at the masked positions, and calculates the loss function.
[0184] In some embodiments, the prediction layer is composed of 4 transformer units, each of which is composed of a multi-head self-attention module (MSA) and a feed-forward neural network module (MLP).
[0185] Multi-Head Attention: The self-attention mechanism in the transformer unit is extended to multiple attention heads, each of which can learn different attention weights to better capture different types of relationships. Multi-head attention allows the model to process different subspaces of information in parallel.
[0186] A feed-forward neural network is a fully connected network that contains a hidden layer, consisting of two linear transformations separated by a nonlinear activation function (usually ReLU) as the hidden layer. The first linear transformation uses a learnable weight matrix to project the input representation into a higher-dimensional space. The non-linear activation passes the output of the first linear transformation through a non-linear activation function (e.g., ReLU), introducing non-linearity into the model, enabling it to capture complex patterns and relationships in the data. The second linear transformation projects the output of the activation function back into the original dimensional space through another learnable weight matrix.
[0187] Specifically, in the process of inputting the dynamic blood glucose sequence data into the initial model for pre-training, the following steps are included:
[0188] The positions and elements of the dynamic blood glucose sequence data are encoded to output blood glucose encoding feature data corresponding to the dynamic blood glucose sequence data;
[0189] The multi-head self-attention vector of the blood glucose encoding feature data is calculated, and the combination of the multi-head self-attention vector is spliced and layer normalized to output;
[0190] The output result after splicing and layer normalization is input into the feed-forward neural network for conversion, and the conversion result is layer normalized through residual connection to obtain the output of the feed-forward neural network layer.
[0191] Specifically, after the initial encoding layer encodes the dynamic blood glucose sequence data to obtain blood glucose encoded feature data, the multi-head self-attention mechanism layer encodes the blood glucose encoded feature data into low-dimensional triplets, i.e., query vectors, key vectors, and value vectors. The coefficients of the value vectors are obtained by taking the dot product between the query vectors and the key vectors and then performing softmax, i.e., the self-attention vectors of each head are obtained. After the self-attention vectors of each head are calculated, the final result is a linear combination of different value vectors. The linear combination results of different value vectors are spliced and then normalized to obtain the output of the multi-head self-attention mechanism layer. Further, the feedforward neural network layer converts the output result of the multi-head self-attention mechanism layer and outputs in a residual connection and normalization manner.
[0192] The residual connection refers to directly adding the input to the output to pass part of the information to the next layer, thereby avoiding the loss of information. This connection method can make the network easier to train and help improve the performance of the model. Layer normalization is a normalization technique that normalizes the features in the input of each layer, which can speed up the convergence speed of the network and improve the generalization ability of the model.
[0193] In this application, the Transformer model is pre-trained in large-scale CGM data, which can learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data in an unsupervised manner, capture individual blood glucose dynamic characteristics, and map CGM data to a low-dimensional vector space to capture its potential blood glucose dynamic characteristics.
[0194] S20: Obtain dynamic blood glucose concentration data and clinical diagnosis labels of a second sample set, and train the pre-trained model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain a sugar metabolism impaired disease prediction model.
[0195] Specifically, by designing a prediction task related to sugar metabolism diseases, selecting dynamic blood glucose concentration data of target samples matched with the prediction task, and combining the clinical diagnosis labels of the target samples, the pre-trained model and the first fine-tuning layer are trained to obtain a sugar metabolism impaired disease prediction model.
[0196] The prediction task related to sugar metabolism diseases can include any one of predicting whether the sugar metabolism state is normal, predicting whether the subject has diabetes, predicting the type of diabetes, predicting macrovascular complications, and predicting microvascular complications.
[0197] In some embodiments, for the task of predicting whether the sugar metabolism state is normal, the second sample set includes a plurality of normal glucose tolerance samples, a plurality of impaired glucose regulation samples, and a plurality of mixed glucose tolerance impaired samples.
[0198] In some embodiments, for the task of predicting whether a subject has diabetes, the second sample set comprises a plurality of diabetes samples and a plurality of non-diabetes samples. In some embodiments, for the task of predicting a type of diabetes, the second sample set comprises type 1 diabetes samples and type 2 diabetes samples.
[0199] In some embodiments, for the task of predicting macrovascular complications, the second sample set comprises diabetes samples with macrovascular complications and diabetes samples without macrovascular complications.
[0200] In some embodiments, for the task of predicting microvascular complications, the second sample set comprises diabetes samples with microvascular complications and diabetes samples without microvascular complications.
[0201] In some embodiments, training the pre-trained model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain the impaired glucose metabolism disease prediction model comprises:
[0202] inputting the dynamic blood glucose concentration data of the second sample set into the pre-trained model to obtain blood glucose dynamic feature data of the second sample set;
[0203] inputting the blood glucose dynamic feature data of the second sample set into the first fine-tuning layer to obtain predicted clinical diagnosis labels of the second sample set;
[0204] determining a first training loss based on the predicted clinical diagnosis labels and the clinical diagnosis labels of the second sample set, updating parameters of the pre-trained model and parameters of the first fine-tuning layer according to the first training loss, and obtaining the impaired glucose metabolism disease prediction model corresponding to the prediction task according to the updated pre-trained model parameters and the updated first fine-tuning layer parameters.
[0205] Specifically, by adding a task-specific prediction layer after the pre-trained model, the parameters of the first fine-tuning layer and the parameters in the pre-trained model are adjusted according to the dynamic blood glucose concentration data of the second sample set corresponding to different prediction tasks, thereby obtaining a plurality of task-specific impaired glucose metabolism disease prediction models to realize the diagnosis tasks in multiple medical scenarios.
[0206] In some exemplary embodiments, the impaired glucose metabolism disease prediction model comprises any one of a glucose tolerance impairment prediction model for predicting whether glucose tolerance is impaired, a diabetes prediction model for predicting whether a subject has diabetes, a diabetes type prediction model for predicting a type of diabetes that a subject has, and a diabetes complication prediction model for predicting whether a subject has a complication.
[0207] In some specific embodiments, the type of diabetes comprises type 1 diabetes and type 2 diabetes.
[0208] In some embodiments, the diabetic complications include diabetic macrovascular complications and diabetic microvascular complications.
[0209] S30: obtaining dynamic blood glucose concentration data, clinical diagnosis labels and clinical physiological data of a third sample set, training the pre-trained model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain the impaired glucose metabolism degree prediction model.
[0210] Specifically, the plurality of clinical physiological data includes age, BMI, fasting blood glucose, fasting insulin, HOMA-IS, HOMA-B, 120-minute postprandial blood glucose, glycosylated hemoglobin, high-density cholesterol, etc.
[0211] In some embodiments, the third sample set includes a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples. In some embodiments, the third sample set and the first sample set can be the same.
[0212] In some embodiments, the second fine-tuning layer includes a plurality of linear encoding layers and a plurality of prediction layers. Each prediction layer is composed of a linear transformation and an activation function. Each prediction layer has a different prediction task.
[0213] In some embodiments, training the pre-trained model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain the impaired glucose metabolism degree prediction model includes:
[0214] inputting the dynamic blood glucose concentration data of the third sample set into the pre-trained model to obtain blood glucose dynamic feature data of the third sample set;
[0215] inputting the blood glucose dynamic feature data of the third sample set into the linear encoding layer to obtain impaired glucose metabolism feature data of the third sample set;
[0216] inputting the impaired glucose metabolism feature data of the third sample set into the prediction layer to obtain a plurality of predicted clinical physiological features of each sample in the third sample set;
[0217] determining a second training loss based on the plurality of predicted clinical physiological features of each sample in the third sample set, the clinical diagnosis labels and the plurality of clinical physiological data, updating parameters of the linear encoding layer and the prediction layer according to the second training loss, and obtaining the impaired glucose metabolism degree prediction model according to the pre-trained model and the updated parameters of the second fine-tuning layer.
[0218] Specifically, the impaired glucose metabolism degree prediction model is obtained by adding a second fine-tuning layer composed of a multi-layer linear encoding layer and multiple prediction layers to the pre-training model for fine-tuning, wherein the multi-layer linear encoding layer maps the CGM data to a real number reflecting the diabetes duration and complication risk of the patient, and further inputs the real number into the multiple prediction layers specific to the task to decode and predict the multiple clinical physiological data, and the loss function of the model is defined by the mean square error of the multiple tasks, thereby obtaining the impaired glucose metabolism degree prediction model.
[0219] To sum up, the present application collects large-scale CGM data, and uses self-supervised learning to construct a CGM pre-training model on a large sample CGM data set, which can capture the individual blood glucose dynamic characteristics in CGM; for each glucose metabolism related disease diagnosis task, different fine-tuning layers are added to the pre-training model, and the pre-training model is fine-tuned in combination with the clinical diagnosis labels of CGM data, thereby obtaining a prediction model suitable for different glucose metabolism related disease prediction tasks; a multi-task learning model is designed on the basis of the pre-training model, and the pre-training model is fine-tuned in combination with the clinical diagnosis labels of CGM data and multiple clinical physiological data, thereby obtaining a model for predicting the degree of impaired glucose metabolism and complication risk.
[0220] Further, the second aspect of the present application provides a method for predicting glucose metabolism related diseases, and the method flow chart is shown in FIG. 2, which comprises:
[0221] S100: obtaining dynamic blood glucose concentration data of a subject;
[0222] S200: inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism disease prediction model constructed by the above method to obtain the impaired glucose metabolism disease prediction result of the subject; and / or
[0223] S300: inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism degree prediction model constructed by the above method to obtain the impaired glucose metabolism degree prediction result of the subject.
[0224] Specifically, the present application provides a method for predicting glucose metabolism related diseases based on a pre-training model trained by dynamic blood glucose concentration data, which combines the unsupervised learning of the pre-training process and the supervised learning of the fine-tuning process two stages, and realizes the prediction of impaired glucose metabolism diseases through individual CGM data.
[0225] For the input CGM data of the subject, the fine-tuned pre-training model can combine the blood glucose dynamic characteristics obtained by large sample unlabeled pre-training and the learning of labeled CGM data, realize multiple task specific diagnoses of the patient, answer questions including whether the patient has diabetes, impaired glucose tolerance, diabetes type, macrovascular complications, microvascular complications, etc., and provide diagnosis and treatment and diabetes management suggestions.
[0226] Further, the application also provides a method for evaluating the degree of impaired glucose metabolism based on dynamic blood glucose concentration data, combining clinical physiological data of a large sample, using a multi-task learning approach to estimate the impaired glucose metabolism of a patient, and further assisting the diagnosis and treatment of the patient and the daily management of diabetes.
[0227] Correspondingly, the third aspect of the application provides a device for constructing a prediction model of a glucose metabolism related disease, as shown in FIG. 3, comprising:
[0228] The pre-training module 10 is configured to obtain dynamic blood glucose concentration data of a first sample set, and perform machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-training model.
[0229] The first model fine-tuning module 20 is configured to obtain dynamic blood glucose concentration data and clinical diagnosis labels of a second sample set, and train the pre-training model and the first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain a prediction model of an impaired glucose metabolism disease; and / or
[0230] The second model fine-tuning module 30 is configured to obtain dynamic blood glucose concentration data, clinical diagnosis labels and clinical physiological data of a third sample set, and train the pre-training model and the second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain a prediction model of the degree of impaired glucose metabolism.
[0231] The first sample set and the third sample set comprise a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples, and the second sample set comprises normal glucose tolerance samples and impaired glucose metabolism disease samples corresponding to the prediction task.
[0232] The fourth aspect of the application provides a device for predicting a glucose metabolism related disease, as shown in FIG. 4, comprising:
[0233] The data acquisition module 100 is configured to obtain dynamic blood glucose concentration data of a subject.
[0234] The first prediction module 200 is configured to input the dynamic blood glucose concentration data of the subject into the prediction model of the impaired glucose metabolism disease constructed by the above method to obtain a prediction result of the impaired glucose metabolism disease of the subject; and / or
[0235] The second prediction module 300 is configured to input the dynamic blood glucose concentration data of the subject into the prediction model of the degree of impaired glucose metabolism constructed by the above method to obtain a prediction result of the degree of impaired glucose metabolism of the subject.
[0236] The specific limitations of the device for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease can be seen from the limitations of the method for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease, which will not be repeated here. Each module of the device for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease described above can be realized by software, hardware and combinations thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each of the above modules.
[0237] In some embodiments, a computer device is provided, which can be a server 104 or a terminal 102, and its internal structure diagram can be shown in FIG. 5. The computer device includes a processor, a memory and a communication interface connected by a system bus. When the computer device is a terminal, it also includes a display screen and an input device connected with the system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a method for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0238] Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0239] The present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above-mentioned method for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease when executing the computer program.
[0240] The present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned method for constructing a prediction model of a glucose metabolism related disease and predicting a glucose metabolism related disease.
[0241] The application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method for constructing a prediction model for a sugar metabolism related disease and predicting the sugar metabolism related disease.
[0242] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0243] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of the method. In the embodiments provided by the present application, any reference to a memory, a database or other medium can include at least one of a non-volatile and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0244] In another embodiment, the conventional diagnosis and classification of diabetes and impaired glucose tolerance population mainly relies on fasting static blood glucose measurement or average measurement of overall blood glucose, and oral glucose tolerance test (OGTT) and the like. For example, the classification based on oral glucose tolerance test divides the population into four categories of normal glucose tolerance (NGT), impaired fasting glucose (IFG), impaired glucose tolerance (IGT), combined glucose tolerance (CGI), and diabetes (Diabetes) based on fasting and 2-hour postprandial blood glucose.
[0245] A study has proposed a pathophysiology-based classification of individual clinical glucose-lipid metabolism characteristic data, which describes the clinical characteristics and risk stratification of each classification. Another study proposes a classification method based on CGM data, which uses spectral clustering to divide blood glucose fluctuation characteristics into three categories of low fluctuation, moderate fluctuation and severe fluctuation. However, this method only considers the fluctuation of blood glucose dynamics, and ignores other features including blood glucose level, hypoglycemic event and the like.
[0246] From the perspective of using data, the conventional classification method for non-diabetic population is mostly based on individual blood glucose measurement data, pathophysiological data, and clinical glucose-lipid metabolism characteristic data collection, which requires individuals to rely on hospitals, and the accessibility of the method is poor. From the perspective of individual blood glucose measurement, most of them are based on individual static single-point measurement data, and cannot obtain the individual blood glucose regulation characteristics reflected by the complex dynamics of blood glucose; from the perspective of mining feature patterns in data, the clustering algorithm based on individual original data space representation features lacks deep mining and representation of nonlinear correlations contained in the data.
[0247] To solve at least one of the above problems, the fifth aspect of the present application provides a method for constructing a non-diabetic model, the method flow chart is shown in Figure 11, comprising:
[0248] S40: Obtain the dynamic blood glucose concentration data of the target sample, and perform machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-trained model;
[0249] S50: Obtain the blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-trained model, and perform clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data;
[0250] Specifically, the dynamic blood glucose concentration data refers to data obtained by continuous monitoring of the whole-day blood glucose concentration of the subject, which can be CGM data, for example.
[0251] In some embodiments, the pre-trained model comprises a pre-trained encoding layer and a prediction layer, the prediction layer comprising a multi-head self-attention mechanism layer and a feed-forward neural network layer. The pre-trained model is used to predict the corresponding blood glucose dynamic feature data of the target sample in an unsupervised manner by machine learning the dynamic blood glucose concentration data of the target sample.
[0252] In some embodiments, the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples comprising a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0253] The diagnostic criteria for the normal glucose tolerance sample is that when the fasting blood glucose of the subject is <6.1 mmol / L and the 2-hour postprandial blood glucose is <7.8 mmol / L, it indicates that the body's blood glucose regulation ability after eating glucose is in a normal state.
[0254] The diagnostic criteria for the impaired glucose tolerance sample is that the fasting blood glucose of the subject is normal (less than 6.0 mmol / L) when the oral glucose tolerance test is performed, but the 2-hour postprandial blood glucose is between 7.8-11.1 mmol / L, which is greater than the normal value, but does not meet the diagnostic criteria for diabetes, which is impaired glucose tolerance.
[0255] The gold standard for the diagnosis of the diabetic sample is the glucose tolerance test. According to the diagnostic criteria for diabetes in the "China Type 2 Diabetes Prevention Guidelines (2020 Edition)", the diagnostic criteria for diabetes include typical symptoms of diabetes, plus fasting blood glucose ≥7.0 mmol / L, plus 2-hour postprandial blood glucose ≥11.1 mmol / L after sugar loading, or plus HbA1c (glycated hemoglobin) ≥6.5%.
[0256] In this application, the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters obtained by clustering the blood glucose dynamic feature data of a plurality of non-diabetic samples according to the output of the pre-trained model.
[0257] Clustering refers to dividing similar data together, and the label of this class is not concerned during specific division. The goal is to aggregate similar data together, and clustering is an unsupervised learning method.
[0258] Specifically, the dynamic blood glucose sequence data of the non-diabetic sample is processed by the pre-trained model to obtain the blood glucose dynamic feature data of the non-diabetic sample; further, the similarity of the non-diabetic sample is measured based on the cosine similarity of the blood glucose dynamic feature data, and a plurality of blood glucose dynamic feature data clusters are obtained.
[0259] The pre-training data set is constructed based on blood glucose continuous monitoring data of multiple different types of samples, so that the pre-training process can learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabelled CGM data in an unsupervised manner, thereby effectively capturing and storing the dynamic characteristics of blood glucose changes contained in CGM, and embedding the CGM data into a low-dimensional vector space to obtain blood glucose dynamic characteristic data.
[0260] Further, according to the clustering results of the blood glucose dynamic characteristic data of the non-diabetic population, non-diabetic blood glucose dynamic distribution data is obtained, and a non-diabetic population typing model based on the CGM pre-training model is constructed, realizing capturing of blood glucose dynamic characteristic data from individual dynamic blood glucose concentration data, and realizing typing of the non-diabetic population according to the blood glucose dynamic characteristic data of the non-diabetic samples, and further combining the sugar metabolism characteristics and clinical data of the non-diabetic population to predict the risk of diabetes.
[0261] In some embodiments, the dynamic blood glucose concentration data of the target sample is obtained, and the pre-training model is obtained by machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample, including:
[0262] S5001: Obtain dynamic blood glucose concentration data of a target sample, and preprocess the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample;
[0263] S5002: Input the dynamic blood glucose sequence data of the target sample into an initial model to obtain blood glucose dynamic characteristic data of the target sample;
[0264] S5003: Perform mask processing on the dynamic blood glucose sequence data of the target sample to obtain masked dynamic blood glucose sequence data of the target sample, and input the masked dynamic blood glucose sequence data of the target sample into the initial model to obtain masked blood glucose dynamic characteristic data of the target sample;
[0265] S5004: Determine a training loss according to the blood glucose dynamic characteristic data of the target sample and the masked blood glucose dynamic characteristic data of the target sample, update parameters of the initial model according to the training loss, and obtain a pre-training model according to the initial model after updating the parameters.
[0266] Specifically, the dynamic blood glucose sequence data refers to all-day time series data obtained by segmenting the dynamic blood glucose concentration data.
[0267] In some embodiments, the segmentation of dynamic glucose concentration data refers to segmenting the CGM data of a sample by day, taking the complete 288 measurements from 0:00 to 24:00 of each day as a sequence, filtering incomplete sequences in the data collection process, and finally obtaining complete all-day glucose time series. For the measured glucose concentration value at each time point, it is uniformly discretized into G min (40mg / ml) to G max (300mg / ml) of G max -G min +1 i.e. 261 glucose levels.
[0268] The initial model refers to a sequence data processing model that has not been trained. For the collected CGM data, the present application constructs a deep self-attention transformer network model as the initial model and pre-trains it on the collected CGM data. Deep learning is used to effectively capture and store the dynamic glucose change patterns contained in the CGM, so that the computer system can understand, reason and process this information, and then obtain glucose dynamic feature data corresponding to different non-diabetic subtypes based on this information, to construct a non-diabetic subtype prediction model.
[0269] In some embodiments, the initial model includes an initial encoding layer and an initial prediction layer, and the initial prediction layer is composed of a multi-head self-attention mechanism layer and a feedforward neural network layer. Specifically, the initial encoding layer is used to encode the positions and elements in the dynamic glucose sequence data to obtain glucose encoding feature data. The initial prediction layer is used to further learn the patterns of the dynamic glucose encoding feature data and output glucose dynamic feature data. In the pre-training process, the present application sets a mask randomly for the input sequence, and transmits the input sequence after the mask into the initial model, learns the features and patterns of the input sequence by reconstructing the elements at the mask positions, and calculates the loss function.
[0270] In some specific embodiments, the prediction layer is composed of 4 layers of transformer units, and each layer of transformer unit is composed of a multi-head self-attention module (MSA) and a feedforward neural network module (MLP).
[0271] Multi-Head Attention: The self-attention mechanism in the transformer unit is expanded into multiple attention heads, each of which can learn different attention weights to better capture different types of relationships. Multi-head attention allows the model to process different subspaces of information in parallel.
[0272] A feedforward neural network is a fully connected network containing one hidden layer, composed of two linear transformations separated by a nonlinear activation function (typically ReLU) as the hidden layer. The first linear transformation uses a learnable weight matrix to project the input representation into a higher-dimensional space. The nonlinear activation passes the output of the first linear transformation through a nonlinear activation function (e.g., ReLU), introducing nonlinearity into the model, enabling it to capture complex patterns and relationships in the data. The second linear transformation projects the output of the activation function back into the original dimensional space through another learnable weight matrix.
[0273] In particular, inputting the dynamic blood glucose sequence data of the target sample into the initial model obtains blood glucose dynamic feature data of the target sample, including:
[0274] The dynamic blood glucose sequence data of the target sample is positionally encoded and elementally encoded to output blood glucose encoded feature data of the target sample;
[0275] A multi-head self-attention vector of the blood glucose encoded feature data of the target sample is calculated, and the combination of the multi-head self-attention vector is spliced and layer-normalized to output;
[0276] The output result after splicing and layer normalization is input into a feedforward neural network for conversion, and the conversion result is layer-normalized after residual connection to obtain the output of the feedforward neural network layer.
[0277] In particular, after the initial encoding layer positionally encodes and elementally encodes the dynamic blood glucose sequence data to obtain blood glucose encoded feature data, the multi-head self-attention mechanism layer encodes the blood glucose encoded feature data into low-dimensional triplets, i.e., query vectors, key vectors, and value vectors. The coefficients of the value vectors are obtained by taking the dot product between the query vectors and the key vectors and then performing softmax, i.e., obtaining the self-attention vector of each head. After the self-attention vector of each head is calculated, the final result is a linear combination of different value vectors. The linear combination results of different value vectors are spliced and then normalized to obtain the output of the multi-head self-attention mechanism layer. Further, the feedforward neural network layer converts the output result of the multi-head self-attention mechanism layer and outputs it in a residual connection and normalization manner.
[0278] The residual connection refers to directly adding the input to the output, directly passing part of the information to the next layer, thereby avoiding the loss of information. This connection method can make the network easier to train and help improve the performance of the model. Layer normalization is a normalization technique that normalizes features in the input of each layer, which can speed up the convergence speed of the network and improve the generalization ability of the model.
[0279] In some specific embodiments, in order to realize the diabetes risk prediction of each non-diabetic subtype, the method further comprises:
[0280] obtaining a plurality of clinical characteristics corresponding to each blood glucose dynamic feature data cluster, and determining the diabetes risk of each non-diabetes type according to the plurality of clinical characteristics and the blood glucose fluctuation characteristics of each blood glucose dynamic feature data cluster.
[0281] Specifically, the blood glucose fluctuation characteristics of each cluster can be the statistical analysis results of the mean and standard deviation of the blood glucose dynamic characteristics from different individual samples in each cluster, and the blood glucose fluctuation can be the full-time mean, full-time standard deviation, etc.
[0282] In actual application, the blood glucose dynamic characteristics and clinical characteristics of each type are characterized according to the blood glucose fluctuation characteristics and clinical data of individuals in each cluster, combined with the individual clinical characteristics matched with the CGM data, so as to realize the evaluation of the diabetes risk of non-diabetes samples combined with the blood glucose dynamic characteristics and clinical characteristics of the type.
[0283] Correspondingly, the sixth aspect of the present application provides a method for predicting non-diabetes types, and the method flow chart is shown in Figure 12, which comprises:
[0284] S400: obtaining dynamic blood glucose concentration data of the sample to be tested;
[0285] S500: determining the non-diabetes type of the sample to be tested according to the dynamic blood glucose concentration data of the sample to be tested;
[0286] Specifically, the method is realized based on a non-diabetes type model, and the non-diabetes type model comprises a pre-trained model and non-diabetes blood glucose dynamic distribution data. The non-diabetes type model is used to execute the following steps:
[0287] inputting the dynamic blood glucose concentration data of the sample to be tested into the pre-trained model to obtain the blood glucose dynamic feature data of the sample to be tested;
[0288] determining the non-diabetes type of the sample to be tested based on the blood glucose dynamic feature data of the sample to be tested and the non-diabetes blood glucose dynamic distribution data.
[0289] Wherein, the pre-trained model is based on the dynamic blood glucose concentration data of the target sample to be tested to perform machine learning in an unsupervised manner to predict the blood glucose dynamic feature data corresponding to the dynamic blood glucose concentration data. The non-diabetes blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters obtained by clustering the blood glucose dynamic feature data of a plurality of non-diabetes samples output by the pre-trained model.
[0290] In particular, for the sample to be tested with multiple days of CGM data, the CGM data of the sample to be tested for multiple days is segmented and mapped to the vector of the latent space, and the mean value is taken as the blood glucose dynamic feature data of the sample to be tested.
[0291] The individual dynamic blood glucose data obtained by continuous glucose monitoring is encoded and embedded into a hidden space by a pre-trained model to obtain blood glucose dynamic feature data, combined with blood glucose dynamic feature distribution data corresponding to different non-diabetic types obtained by clustering blood glucose dynamic feature data captured by the pre-trained model based on large-scale CGM data, and then the type of the individual sample is obtained.
[0292] For the to-be-tested sample from the non-diabetic population, the pre-trained model is used to capture the blood glucose dynamics and evaluate the blood glucose metabolism state of the individual based on the powerful feature extraction capability of the pre-trained model, and the type of the non-diabetic population is completed based on the blood glucose dynamic feature distribution data of a large sample, which is helpful for more accurate diagnosis of pre-diabetic state, early intervention and management of abnormal blood glucose metabolism, and personalized formulation of diet, exercise, drug intervention and treatment plan.
[0293] In some embodiments, determining the non-diabetic type of the to-be-tested sample based on the blood glucose dynamic feature data of the to-be-tested sample and the non-diabetic blood glucose dynamic distribution data comprises:
[0294] calculating the average distance between the blood glucose dynamic feature data of the to-be-tested sample and each blood glucose dynamic feature data cluster;
[0295] determining the non-diabetic type of the to-be-tested sample according to the non-diabetic type represented by the blood glucose dynamic feature data cluster with the minimum average distance.
[0296] Specifically, when typing the to-be-tested sample, the average distance between the blood glucose dynamic feature data of the to-be-tested sample and each blood glucose dynamic feature data cluster is calculated, and the non-diabetic type represented by the blood glucose dynamic feature data cluster with the minimum average distance is taken as the type of the to-be-tested sample.
[0297] In summary, the traditional typing of the non-diabetic population relies on the static measurement of the clinic, and in particular, the diagnosis and classification of the clinical diabetic and impaired glucose tolerance population mainly rely on the fasting static blood glucose measurement or the average measurement of the overall blood glucose, ignoring the individual blood glucose regulation characteristics reflected by the complex dynamics of blood glucose. The analysis of continuous blood glucose monitoring data is mostly focused on a single statistical quantity or a single dimension clustering, for example, the blood glucose fluctuation typing based on CGM only considers the fluctuation of blood glucose dynamics, and ignores other characteristics including blood glucose level, hypoglycemic event, etc.
[0298] Correspondingly, the seventh aspect of the present application provides a device for constructing a non-diabetic typing model, as shown in FIG. 13, comprising:
[0299] The pre-training module 40 is configured to obtain dynamic blood glucose concentration data of a target sample, and perform machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-trained model.
[0300] The clustering module 50 is configured to obtain blood glucose dynamic feature data of the plurality of non-diabetic samples output by the pre-trained model, and cluster the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain a plurality of blood glucose dynamic feature data clusters, thereby obtaining non-diabetic blood glucose dynamic distribution data.
[0301] The target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0302] Correspondingly, the fourth aspect of the present application provides a device for constructing a non-diabetic classification model, as shown in FIG. 14, which includes:
[0303] The data acquisition module 400 is configured to obtain dynamic blood glucose concentration data of the to-be-tested sample.
[0304] The non-diabetic classification module 500 is configured to determine the non-diabetic classification of the to-be-tested sample based on the dynamic blood glucose concentration data of the to-be-tested sample.
[0305] The device is implemented based on a non-diabetic classification model, and the non-diabetic classification model is configured to perform the following steps:
[0306] The dynamic blood glucose concentration data of the to-be-tested sample is input into the pre-trained model to obtain blood glucose dynamic feature data of the to-be-tested sample.
[0307] The non-diabetic classification of the to-be-tested sample is determined based on the blood glucose dynamic feature data of the to-be-tested sample and the non-diabetic blood glucose dynamic distribution data.
[0308] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0309] The non-diabetic blood glucose dynamic distribution data includes a plurality of blood glucose dynamic feature data clusters, and the plurality of blood glucose dynamic feature data clusters are obtained by clustering the blood glucose dynamic feature data of the plurality of non-diabetic samples output by the pre-trained model.
[0310] For specific limitations of the device for predicting non-diabetic classification and / or constructing a model for predicting non-diabetic classification, refer to the limitations of the method for predicting non-diabetic classification and / or constructing a model for predicting non-diabetic classification described above, which will not be repeated here. Each module in the device for predicting non-diabetic classification and / or constructing a model for predicting non-diabetic classification described above can be realized by software, hardware, and combinations thereof, in whole or in part. Each module described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0311] In some embodiments, a computer device is provided, which can be the server 104 or the terminal 102, and its internal structure diagram can be shown in FIG. 5. The computer device includes a processor, a memory and a communication interface connected by a system bus. When the computer device is a terminal, it also includes a display screen and an input device connected with the system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a method for predicting non-diabetic classification and / or constructing a prediction model for non-diabetic classification. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0312] Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0313] The present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above-mentioned method for predicting non-diabetic classification and / or constructing a prediction model for non-diabetic classification when executing the computer program.
[0314] The present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the processor implements the steps of the above-mentioned method for predicting non-diabetic classification and / or constructing a prediction model for non-diabetic classification when executing the computer program.
[0315] The present application also provides a computer program product. The computer program product includes a computer program, and the processor implements the steps of the above-mentioned method for predicting non-diabetic classification and / or constructing a prediction model for non-diabetic classification when executing the computer program.
[0316] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0317] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without limitation. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without limitation.
[0318] In another embodiment, diabetic patients usually rely on finger blood glucose testing for daily blood glucose management. However, finger blood glucose testing requires patients to operate by themselves, and can only provide discrete single-point blood glucose concentration data. In contrast, a continuous glucose monitoring system (CGMS) can provide users with comprehensive, real-time blood glucose level data, reflecting the comprehensive, rich and complex dynamic characteristics of blood glucose. Although some methods use time series prediction-related algorithms for blood glucose prediction, these methods do not fully consider the role of individual characteristics and external disturbances (such as specific dietary nutrients, exercise, etc.) in blood glucose dynamics, and thus have certain limitations.
[0319] Some retrospective dietary recommendation systems give recommendations by analyzing postprandial blood glucose dynamics, and cannot provide pre-meal meal recommendations for patients. In order to better manage the blood glucose levels of diabetic patients, it is necessary to further explore and develop more intelligent and personalized blood glucose prediction methods to better guide the diet and lifestyle of patients.
[0320] To solve at least one of the above problems, an eighth aspect of the present application provides a method for predicting postprandial blood glucose, the method flowchart is shown in Figure 19, comprising:
[0321] S60: obtaining blood glucose dynamic characteristic data, pre-meal instantaneous blood glucose data and at least one dietary structure information of the subject, the blood glucose dynamic characteristic data of the subject being obtained based on a pre-trained model;
[0322] S70: inputting the blood glucose dynamic characteristic data, pre-meal instantaneous blood glucose data and at least one dietary structure information of the subject into a postprandial blood glucose prediction model, and predicting the postprandial blood glucose of the subject based on the output of the postprandial blood glucose prediction model;
[0323] Specifically, the dynamic blood glucose concentration data refers to data obtained by continuous monitoring of the whole-day blood glucose concentration of the subject, for example, CGM data. The pre-trained model is obtained by machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample. The postprandial blood glucose prediction model refers to a model for predicting the postprandial blood glucose of the subject, which is obtained by pre-training a machine learning model based on the blood glucose dynamic characteristic data of the subject, historical dietary structure information and corresponding target time zone historical blood glucose data.
[0324] In some embodiments, the dynamic blood glucose sequence data refers to whole-day time series data obtained by segmentation processing of continuous blood glucose monitoring data.
[0325] In some embodiments, the segmentation of the dynamic blood glucose concentration data refers to segmenting the CGM data of a sample by day, taking the complete 288 measurements from 0:00 to 24:00 of each day as a sequence, filtering incomplete sequences in the data collection process, and finally obtaining complete all-day blood glucose time series. For the blood glucose concentration value measured at each time point, it is uniformly discretized into G min (40mg / ml) to G max (300mg / ml) of G max -G min +1, i.e., 261 blood glucose levels.
[0326] In particular, for subjects with multi-day CGM data, the multi-day CGM data of the subject is segmented into multi-day dynamic blood glucose sequence data, which is respectively input into the pre-trained model to obtain multi-day blood glucose dynamic feature data, and the mean of the multi-day blood glucose dynamic feature data of the subject is taken as the blood glucose dynamic feature data of the subject.
[0327] In some embodiments, the historical dietary structure information includes 5-dimensional features of calories (kcal), carbohydrates (g), proteins (g), fats (g), and cellulose (g). The historical dietary structure information and the target time zone historical blood glucose data matched with the historical dietary structure information can be obtained according to the historical dietary records. The target time zone historical blood glucose data refers to the blood glucose concentration data in the preset time period before a meal and in the preset time period after a meal.
[0328] In some embodiments, the target time zone historical blood glucose data includes blood glucose concentration data from 1 hour before a meal to 2 hours after a meal.
[0329] In some embodiments, the pre-meal instantaneous blood glucose data refers to blood glucose data in the preset time period before a meal. In some embodiments, the pre-meal instantaneous blood glucose data includes blood glucose concentration data 1 hour before a meal.
[0330] In some embodiments, the target sample includes a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples includes a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0331] The diagnostic criteria for a normal glucose tolerance sample are that when the fasting blood glucose of a subject is <6.1 mmol / L and the 2-hour postprandial blood glucose is <7.8 mmol / L, it indicates that the blood glucose regulation ability of the human body after eating blood glucose is in a normal state.
[0332] The diagnostic criteria for an impaired glucose tolerance sample are that when the fasting blood glucose of a subject is normal (less than 6.0 mmol / L) during an oral glucose tolerance test, but the blood glucose 2 hours after oral glucose is between 7.8-11.1 mmol / L, the value is greater than the normal value, but does not meet the diagnostic criteria for diabetes, which is an impaired glucose tolerance.
[0333] The diagnostic gold standard for diabetes samples is the glucose tolerance test. According to the diagnostic criteria for diabetes in the “Chinese Guidelines for the Prevention and Treatment of Type 2 Diabetes (2020 Edition)”, the diagnostic criteria for diabetes include typical symptoms of diabetes, plus fasting blood glucose ≥7.0 mmol / L, plus 2-hour post-load blood glucose ≥11.1 mmol / L, or plus HbA1c (glycated hemoglobin) ≥6.5%.
[0334] The present application learns the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data unsupervisedly based on a pre-trained model, effectively captures and stores the dynamic characteristics of blood glucose changes contained in CGM, and embeds the CGM data into a low-dimensional vector space to obtain blood glucose dynamic characteristic data. In combination with the pre-meal instantaneous blood glucose data and dietary structure information of the subject, the postprandial blood glucose of the subject can be predicted, and then a personalized dietary prescription is provided for the subject in combination with the simulated diet.
[0335] To achieve the above-mentioned method for predicting postprandial blood glucose, the ninth aspect of the present application provides a method for constructing a postprandial blood glucose prediction model, and the method flow chart is shown in FIG. 20, which comprises:
[0336] S600: Obtain the blood glucose dynamic characteristic data, historical dietary structure information, and corresponding target time zone historical blood glucose data of the subject, and the blood glucose dynamic characteristic data of the subject is obtained based on a pre-trained model;
[0337] S700: Train a machine learning model using the blood glucose dynamic characteristic data, historical dietary structure information, and corresponding target time zone historical blood glucose data of the subject to obtain a postprandial blood glucose prediction model;
[0338] In the present application, after pre-training in a large amount of CGM data, the pre-trained model can learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data unsupervisedly, capture individual blood glucose dynamic characteristics, and then construct a postprandial blood glucose prediction model in combination with the individual's historical dietary structure information and corresponding target time zone historical blood glucose data.
[0339] In some embodiments, the construction step of the pre-trained model comprises:
[0340] S7001: Preprocess the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample;
[0341] S7002: Input the dynamic blood glucose sequence data of the target sample into the initial model to obtain the blood glucose dynamic characteristic data of the target sample;
[0342] S7003: Masking the dynamic blood glucose sequence data of the target sample to obtain target sample masked dynamic blood glucose sequence data, and inputting the target sample masked dynamic blood glucose sequence data into the initial model to obtain target sample masked blood glucose dynamic feature data;
[0343] S7004: determining a first training loss according to the blood glucose dynamic feature data of the target sample and the target sample masked blood glucose dynamic feature data, updating the parameters of the initial model according to the first loss training loss, and obtaining a pre-training model according to the initial model after updating the parameters.
[0344] Specifically, the initial model refers to a sequence data processing model that has not been trained. For the collected CGM data, the present application constructs a deep self-attention transformation network model as the initial model, and pre-trains it in the collected CGM data. Deep learning is used to effectively capture and store the blood glucose dynamic change patterns contained in the CGM, so that the computer system can understand, reason and process these information, and then based on these information, the blood glucose dynamic feature distribution data corresponding to different non-diabetic types can be obtained to construct a postprandial blood glucose prediction model.
[0345] In the pre-training process, the present application randomly sets a mask for the dynamic blood glucose sequence data, and transmits the masked sequence into the initial model, reconstructs the elements at the masked positions, learns the features and patterns of the dynamic blood glucose sequence, and calculates the loss function to update the parameters of the initial model.
[0346] In some embodiments, the initial model includes an initial encoding layer and an initial prediction layer, and the initial prediction layer is composed of a multi-head self-attention mechanism layer and a feedforward neural network layer. Specifically, the initial encoding layer is used to encode the positions and elements in the dynamic blood glucose sequence data to obtain blood glucose encoding feature data. The initial prediction layer is used to further learn the patterns of the dynamic blood glucose encoding feature data and output blood glucose dynamic feature data.
[0347] Multi-Head Attention: The self-attention mechanism in the Transformer unit is expanded into multiple attention heads, each of which can learn different attention weights to better capture different types of relationships. Multi-head attention allows the model to process different subspaces of information in parallel.
[0348] A feedforward neural network is a fully connected network containing one hidden layer, composed of two linear transformations separated by a nonlinear activation function (typically ReLU) as the hidden layer. The first linear transformation projects the input representation into a higher-dimensional space using a learnable weight matrix. The nonlinear activation passes the output of the first linear transformation through a nonlinear activation function (e.g., ReLU), introducing nonlinearity into the model, enabling it to capture complex patterns and relationships in the data. The second linear transformation projects the output of the activation function back into the original dimensional space through another learnable weight matrix.
[0349] In some embodiments, the prediction layer is composed of 4 layers of transformer units, each of which is composed of a multi-head self-attention module (MSA) and a feedforward neural network module (MLP).
[0350] Correspondingly, inputting the dynamic blood glucose sequence data of the target sample into the initial model to obtain the blood glucose dynamic feature data of the target sample includes:
[0351] Based on the initial encoding layer, the dynamic blood glucose sequence data is positionally encoded and elementally encoded to obtain blood glucose encoding feature data;
[0352] Based on the multi-head self-attention mechanism layer, a multi-head self-attention vector of the blood glucose encoding feature data is calculated, and after layer normalization of the combination of the multi-head self-attention vector, the output is outputted;
[0353] Based on the feedforward neural network layer, the output after the above layer normalization is transformed, and the output is outputted through residual connection and layer normalization.
[0354] Specifically, after the initial encoding layer encodes the dynamic blood glucose sequence data to obtain the blood glucose encoding feature data, the multi-head self-attention mechanism layer encodes the blood glucose encoding feature data into low-dimensional triples, i.e., query vectors, key vectors, and value vectors. After the dot product between the query vectors and the key vectors, the coefficients of the value vectors are obtained through softmax, i.e., the self-attention vectors of each head are obtained. After the calculation of the self-attention vectors of each head is completed, the final result is the linear combination of different value vectors. The linear combination results of different value vectors are spliced, and then normalized to obtain the output of the multi-head self-attention mechanism layer. Further, the feedforward neural network layer transforms the output results of the multi-head self-attention mechanism layer, and outputs in the form of residual connection and normalization.
[0355] Among them, the residual connection refers to directly adding the input to the output, directly passing part of the information to the next layer, thereby avoiding the loss of information. This connection method can make the network easier to train and help improve the performance of the model. Layer normalization is a normalization technique that normalizes features in the input of each layer, which can speed up the convergence of the network and improve the generalization ability of the model.
[0356] In some embodiments, training the machine learning model using the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding target time zone historical blood glucose data to obtain a postprandial blood glucose prediction model comprises:
[0357] Inputting the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding historical preprandial blood glucose data into the machine learning model to obtain target time zone predicted blood glucose data;
[0358] Determining a second training loss based on the target time zone predicted blood glucose data and the target time zone historical blood glucose data, updating the parameters of the machine learning model according to the second training loss, and obtaining a postprandial blood glucose prediction model according to the machine learning model after updating the parameters;
[0359] In some specific embodiments, the machine learning model comprises an LSTM model. The LSTM model comprises an encoding layer, a long short-term memory network layer, and a prediction layer.
[0360] The basic flow of the LSTM model comprises:
[0361] Data preprocessing: first, the input data is preprocessed, including standardization, normalization and other operations, so that the model can better learn the features of the data.
[0362] Model creation: in deep learning frameworks such as Keras, LSTM models are usually created through the Sequential class. Then, LSTM layers and other necessary layers such as Dense layers (fully connected layers) are added in the desired order for output prediction. Define network structure: in LSTM, the input of each time step goes through three main "gate" structures: forget gate, input gate, and output gate. These gate structures determine which information should be retained and which should be forgotten through specific calculation formulas and control mechanisms. Forget gate: controls whether to forget the hidden cell state of the previous layer, and determines which information needs to be retained with a certain probability. Input gate: responsible for processing the input of the current sequence position and updating the cell state. It contains two parts: one part uses the sigmoid activation function to calculate the value of the input gate, and the other part uses the tanh activation function to calculate the value of the candidate memory unit. Output gate: according to the updated cell state, calculate and output the hidden state of the current time step.
[0363] Model training: The pre-processed data is used to train the model. During the training process, the model learns how to adjust its parameters to minimize the prediction error. This is usually achieved through backpropagation algorithms and gradient descent optimizers.
[0364] Model evaluation: After the training is completed, the model is evaluated using the validation or test set to check its performance. Evaluation metrics may include accuracy, loss function value, etc.
[0365] Model application: Once the model is trained and evaluated, and meets the expected performance requirements, it can be applied to practical tasks such as time series prediction, natural language processing, etc.
[0366] In this application, the blood glucose dynamic feature data of the subject, the historical dietary structure information and the corresponding historical pre-meal blood glucose data are input into the machine learning model to obtain the predicted post-meal blood glucose data, which includes:
[0367] The blood glucose dynamic feature data of the subject is embedded into a low-dimensional hidden space to obtain blood glucose coding dynamic feature data;
[0368] The historical dietary structure information of the subject and the corresponding historical pre-meal blood glucose data are combined into pre-meal blood glucose dietary sequence data, which includes pre-meal blood glucose dietary sequence at multiple time points, and each blood glucose dietary sequence includes blood glucose data and dietary structure information at that time;
[0369] For each time point before the meal, the predicted blood glucose coding dynamic feature data and the predicted blood glucose feature vector of the next time point are iteratively output according to the blood glucose coding dynamic feature data of the subject and the pre-meal blood glucose dietary sequence at that time, and the predicted blood glucose feature vector is linearly decoded to obtain the predicted blood glucose data;
[0370] For each time point after the meal, the blood glucose coding dynamic feature data and the predicted blood glucose feature vector of the next time point are iteratively output according to the predicted blood glucose coding dynamic feature data at that time and the predicted blood glucose dietary sequence at that time, and the predicted blood glucose feature vector is linearly decoded to obtain the predicted blood glucose data, and the predicted blood glucose dietary sequence includes the predicted blood glucose data and the dietary structure information at that time.
[0371] Further, the loss function can be obtained according to the mean square error of the target time zone predicted blood glucose data and the target time zone historical blood glucose data, so as to update the model parameters according to the loss function.
[0372] In practical applications, by perturbing the dietary structure information, the influence of different simulated diets on post-meal blood glucose dynamics can be predicted, thereby providing personalized dietary prescription suggestions for patients.
[0373] Correspondingly, the tenth aspect of the present application provides a device for predicting postprandial blood glucose, as shown in FIG. 21, comprising:
[0374] The first data acquisition module 60 is configured to acquire blood glucose dynamic characteristic data of the subject, immediate preprandial blood glucose data, and at least one dietary structure information, wherein the blood glucose dynamic characteristic data of the subject is obtained based on a pre-trained model;
[0375] The blood glucose prediction module 70 is configured to input the blood glucose dynamic characteristic data of the subject, the immediate preprandial blood glucose data, and the at least one dietary structure information into a postprandial blood glucose prediction model, and obtain predicted postprandial blood glucose of the subject corresponding to each dietary structure information based on an output of the postprandial blood glucose prediction model.
[0376] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, wherein the target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0377] The postprandial blood glucose prediction model is obtained by training a machine learning model based on the blood glucose dynamic characteristic data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, wherein the target time zone historical blood glucose data includes historical preprandial blood glucose data and historical postprandial blood glucose data.
[0378] Correspondingly, the eleventh aspect of the present application provides a device for constructing a postprandial blood glucose prediction model, as shown in FIG. 22, comprising:
[0379] The second data acquisition module 600 is configured to acquire blood glucose dynamic characteristic data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, wherein the blood glucose dynamic characteristic data of the subject is obtained based on a pre-trained model.
[0380] The model training module 700 is configured to train a machine learning model based on the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding target time zone historical blood glucose data to obtain a postprandial blood glucose prediction model.
[0381] The pre-trained model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, wherein the target samples include a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples include a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
[0382] The specific limitations of the device for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model can be found in the above limitations of the method for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model, which will not be repeated here. Each of the above-mentioned modules of the device for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model can be realized by software, hardware and their combination in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so that the processor calls and executes the operations corresponding to each of the above-mentioned modules.
[0383] In some embodiments, a computer device is provided, which can be a server 104 or a terminal 102, and its internal structure diagram can be as shown in FIG. 5. The computer device includes a processor, a memory and a communication interface connected by a system bus. When the computer device is a terminal, it also includes a display screen and an input device connected with the system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a method for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0384] Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0385] The present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above-mentioned method for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model when executing the computer program.
[0386] The present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned method for predicting postprandial blood glucose and / or constructing a postprandial blood glucose prediction model.
[0387] The application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method of predicting postprandial blood glucose and / or constructing a model for predicting postprandial blood glucose.
[0388] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0389] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of the method. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0390] The embodiments of the present application will be described in detail below with examples. It should be understood that these examples are only used to illustrate the present application and not used to limit the scope of the present application. The experimental methods in the following examples without specific conditions are preferred to refer to the instructions given in the present application, and can also be carried out according to the experimental manuals or conventional conditions in the art, or according to the conditions suggested by the manufacturers, or according to the experimental methods known in the art.
[0391] In the following specific examples, the measurement parameters of the raw material components may have slight deviations within the weighing accuracy range if not specifically stated. For temperature and time parameters, acceptable deviations caused by instrument testing accuracy or operation accuracy are allowed.
[0392] It should be understood that the size of the sequence number of each process described above in various embodiments of the present application does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0393] Example 1
[0394] The present example provides a method for constructing a prediction model for sugar metabolism related diseases, and the flow chart is shown in Figure 6. The steps of the method are as follows.
[0395] 1. Constructing CGM pre-training model data set
[0396] CGM data from 11 hospitals in 7 provinces and cities nationwide containing 964 subjects (national multi-center CGM data) were obtained, and the matching clinical information of each subject was collected. This data covers people with different sugar metabolism characteristics in three categories of normal glucose tolerance, impaired glucose tolerance and diabetes. Each subject wore a CGM device for an average of 3 days, and the blood glucose concentration was detected every 5 minutes. During the data collection process, the subjects' lifestyles such as diet and exercise were strictly controlled, providing high-quality and comprehensive CGM data.
[0397] 2. Construction and training of pre-training model
[0398] For the national multi-center CGM data collected in step 1, first, the time series data is segmented by day, with 288 complete measurements from 0:00 to 24:00 each day as a sequence, and incomplete sequences during data collection are filtered to obtain complete all-day blood glucose time series. For the blood glucose value measured at each time point, it is discretized into 261 blood glucose levels from 40 mg / ml to 300 mg / dl, and the blood glucose concentration time series in a complete day is converted into a sequence S composed of blood glucose levels, and finally the CGM pre-training model corpus is obtained.
[0399] After obtaining the CGM-based corpus, the embodiment constructs and trains a deep self-attention transformer network with a Transformer architecture, which can learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data in an unsupervised manner.
[0400] Specifically, the network is composed of 4 layers of transformer units, and each layer of transformer unit is composed of a multi-head self-attention module (MSA) and a feedforward neural network module (MLP). The network takes a sequence S with a length of L as input, learns the patterns of blood glucose sequences before and after, sets a mask, and predicts the blood glucose level at the corresponding position. First, the encoder encodes the position and element in the input sequence, and converts each position in the sequence into a d-dimensional vector, and each sequence can be represented as Then, the encoded sequence is trained through four layers of transformer units, and each layer of transformer unit has 8 self-attention heads. In each layer 1, the input Z l-1 (Z 0 =S enc ) is first encoded into a triple (query vector Q, key vector K, value vector V) through linear transformation in the self-attention module, that is:
[0401] Q= Zl-1 W Q , K=Z l-1 W K , V=Z l-1 W V ;
[0402] wherein, are the learnable weight parameters in the three linear mapping layers, and k is the feature dimension of the triple. Subsequently, the self-attention mechanism (SA) can be represented as:
[0403] MSA is an extension with m independent self-attention mechanism operations, and maps their joint output: MSA(Z l-1 )=[SA1(Z l-1 );SA2(Z l-1 );…;SA m ( Zl-1 )]W O , wherein k is usually set to d / m.
[0404] Then, the output of MSA is transformed by the MLP block, and the output of the layer is normalized after the residual connection:
[0405] As shown in FIG. 7, in the pre-training process, for a given unlabeled sequence S, first, some positions are randomly set as masks to produce S mask Then S mask is input into the pre-training model to obtain the output The pre-training stage loss function can be expressed as:
[0406] Where nunk is the number of masks, and s is the original element embedding representation of the mask position.
[0407] The average vector calculated by the output matrix S out of the last layer according to the position is taken as the feature vector of the sequence
[0408] The pre-training model learns the individual blood glucose dynamic characteristics and patterns from a large amount of unlabeled data through self-supervised learning, realizes the mapping of CGM data to a low-dimensional vector space, and captures the potential blood glucose dynamic characteristics.
[0409] 3. Collecting the fine-tuning dataset
[0410] In addition to the national multi-center CGM data, the CGM database in the published paper is collected for fine-tuning of the pre-training model. For CGM data generated by different devices, they are divided by day and filtered according to the same CGM data processing flow, and supplemented to a sequence with a length of 288. The CGM data is matched with the clinical diagnosis labels of the patients to construct fine-tuning datasets for different diagnosis tasks, as shown in Table 1. Normal glucose tolerance (NGT, FBG < 6.1 mmol / L, 2hPG < 7.8 mmol / L), impaired fasting glucose (IFG, 6.1 ≤ FBG < 7.0 mmol / L, 2hPG < 7.8 mmol / L), impaired glucose tolerance (IGT, FBG < 6.1 mmol / L, 7.8 ≤ 2hPG < 11.1 mmol / L), combined glucose tolerance (CGI, 6.1 ≤ FBG < 7.0 mmol / L, 7.8 ≤ 2hPG < 11.1 mmol / L), wherein FBG refers to fasting blood glucose, 2hPG refers to 2h postprandial blood glucose, and IFG and IGT are collectively referred to as impaired glucose regulation (IGR, i.e., prediabetes).
[0411] Table 1
[0412] 4. Fine-tuning pre-trained model based on matching CGM data and clinical diagnosis
[0413] The embodiment fine-tunes the parameters of the prediction layer and the parameters in the original model by adding a task-specific prediction layer after the pre-trained model.
[0414] Specifically, for the input blood glucose sequence s, the pre-trained model encodes it into v S = Enc(S, Θ Pretrain ), Θ Pretrain is the total parameter in the pre-trained model. For each diagnosis task, the prediction layer consists of a fully connected layer and a softmax layer, which outputs the prediction result of the clinical diagnosis label, denoted as:
[0415] L S = Dec(v S , Θ finetuning ) = softmax(NN(v S ));
[0416] The training loss is defined by the cross-entropy loss between the predicted label and the true label, that is:
[0417] where p S represents the true label distribution, L S is the label distribution predicted by the model, and in the training process, the pre-trained part of the parameters Θ Pretrain and the fine-tuned layer parameters Θ finetuning are optimized simultaneously.
[0418] The embodiment constructs and trains a task-specific fine-tuned model on multiple diagnosis tasks to achieve diagnosis tasks in multiple medical scenarios.
[0419] 5. Estimate impaired glucose metabolism and complication risk in combination with physiological and pathological data
[0420] To quantitatively estimate the impaired glucose metabolism of patients from CGM data and predict the duration of diabetes and the risk of complications, the embodiment designs a multi-task learning model that estimates impaired glucose metabolism and complication risk in combination with clinical physiological and pathological data based on the pre-trained model. As shown in FIG. 8, the model consists of a multi-layer linear encoding layer and multiple prediction layers added after the pre-trained model, wherein the multi-layer linear encoding layer is used to map the CGM data into a real number, which reflects the duration of diabetes and the risk of complications of the patient, etc.
[0421] Specifically, for the input blood glucose sequence S, the pre-trained model encodes it into v S = Enc(S, Θ Pretrain ), which is first encoded into a real number And then by multiple task-specific prediction layers (composed of linear transformation and activation function) decoding and predicting age, BMI, fasting glucose, fasting insulin, HOMA-IS, HOMA-B, 120-minute postprandial glucose, glycosylated hemoglobin, high-density cholesterol and other clinical physiological and pathological data, the loss function is defined by the mean square error of multiple tasks, that is:
[0422] Wherein, L s Defined by the label of sample S, normal glucose tolerance sample is defined as 0, impaired glucose tolerance sample is defined as 0.5, and diabetes sample is defined as 1, Dec j (C S ) represents the decoder for clinical physiological and pathological index j, O j (S) represents the true value of sample s index j, and p is the control parameter between the two loss functions.
[0423] In the training process, part of the parameters Θ Pretrain of the pre-trained model is frozen, and the multi-layer linear encoding layer and the task-specific prediction layer are optimized, and the is output as the patient's impaired glucose metabolism and complication risk estimate.
[0424] Embodiment 2
[0425] Based on the prediction model of glucose metabolism related diseases constructed in embodiment 1, this embodiment is tested on the national multi-center CGM data and the public data set labeled with diabetic complications.
[0426] On the national multi-center CGM data set, this embodiment takes the information of individual diagnosis by hospital according to clinical diagnosis standard as the third party gold standard, and designs multiple baseline control methods to compare the diagnostic accuracy.
[0427] One baseline method is a statistical derivative index calculated based on a single CGM.
[0428] The igluR package was used to calculate CGM-derived indicators for glucose control and glucose variability, including mean glucose (average), standard deviation (SD), mean amplitude of glycemic excursions (MAGE), time in range (TIR), time above range (TAR), and other major indicators. TIR refers to the time (usually expressed in minutes) or percentage of time within the target range (usually 3.9-10.0 mmol / L, or 3.9-7.8 mmol / L) within 24 hours. Time in range (TIR) is a new blood glucose control indicator that has received much attention in recent years both domestically and internationally, and has a strong correlation with diabetes diagnosis and complications. The Chinese Guidelines for the Prevention and Treatment of Type 2 Diabetes (2020 Edition) includes TIR in the control target for blood glucose, and the TIR control target for type 2 diabetes (T2DM) patients recommended by the international consensus is >70%. Another baseline method is to apply machine learning methods to the CGM time series for prediction.
[0429] In this embodiment, two commonly used neural network types, multilayer perceptron (MLP neural network) and long short-term memory neural network (LSTM neural network), were selected for comparison to build models for predicting glucose metabolism-related diseases. These two types of neural networks have their own characteristics and are suitable for different application scenarios. MLP neural networks can handle some linearly inseparable problems, while LSTM neural networks can handle sequential data. In the binary classification scenario of diagnosing T2D from IGR or NGT samples, compared with all baseline methods, the diabetes and complication prediction method based on continuous glucose monitoring pre-trained model of the present application showed the highest precision (0.88) and recall rate (0.86), as shown in FIG. 9. The method of the present application is always superior to the diagnosis based on single indicators derived from CGM records, including mean glucose (average), SD, MAGE, TIR, and TAR, and is significantly superior to machine learning methods based on LSTM and MLP.
[0430] The course of macrovascular or microvascular complications is generally long, and the etiology and possible environmental influences are complex, making it a relatively difficult task to predict type 2 diabetes complications from individual glucose dynamic monitoring data. To test the performance of the present application in predicting diabetes complications based on glucose dynamic monitoring data, this embodiment collected a public dataset published by the Fourth People's Hospital of Shanghai (Zhao, Q. et al. Chinese diabetes datasets for data-driven machine learning. Sci Data 10, 35 (2023).), which identified macrovascular or microvascular complications, and used the hospital diagnosis of complications information as the gold standard to design three prediction tasks, including total complications, macrovascular complications, and microvascular complications.
[0431] The sugar metabolism related disease prediction model of Example 1 achieved an accuracy of 0.8 in predicting microvascular complications and an accuracy of 0.7 in predicting macrovascular complications. This embodiment also compared other machine learning models based on continuous glucose data as control models with the sugar metabolism related disease prediction model of the present application. The sugar metabolism related disease prediction model of Example 1 was superior to other machine learning models in predicting microvascular complications and predicting macrovascular complications. The comparison results of the accuracy of predicting microvascular complications are shown in Figure 10 (A), and the comparison results of the accuracy of predicting macrovascular complications are shown in Figure 10 (B).
[0432] Example 3
[0433] This embodiment provides a method for predicting non-diabetic subtypes, the flow chart is shown in Figure 15, and the steps of the method are as shown below.
[0434] 1. Construct and train the pre-trained model
[0435] (1) Construct the subtypes and obtain the reference distribution of the subtypes in the latent space
[0436] CGM data from 11 hospitals in 7 provinces and cities nationwide containing 964 subjects (national multi-center CGM data) were obtained, and the matched clinical information of each subject was collected. This data covers people with different sugar metabolism characteristics such as normal glucose tolerance, impaired glucose tolerance, and diabetes. Each subject wore a CGM device for an average of 3 days, and the blood glucose concentration was detected every 5 minutes. During the data collection process, the subjects' lifestyles such as diet and exercise were strictly controlled, providing high-quality and comprehensive CGM data.
[0437] (2) Construction and training of the pre-trained model
[0438] For the national multi-center CGM data collected in step 1, first, the time series data is segmented by day, with 288 complete measurements from 0:00 to 24:00 each day as a sequence, and incomplete sequences during data collection are filtered out, resulting in complete all-day blood glucose time series. For the blood glucose value measured at each time point, it is discretized into 261 blood glucose levels from 40 mg / ml to 300 mg / dl. The blood glucose concentration time series in a complete day is converted into a sequence S composed of blood glucose levels, and finally the CGM pre-trained model corpus is obtained.
[0439] After obtaining the CGM-based corpus, this embodiment constructs and trains a deep self-attention transformation network with a Transformer architecture, which can unsupervisedly learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data.
[0440] Specifically, as shown in the figure, the network is composed of 4 layers of transformer units, and each layer of transformer unit is composed of a multi-head self-attention module (MSA) and a feedforward neural network module (MLP). The network takes a sequence S with a length of L as input, learns the patterns of the pre and post blood glucose sequences, sets a mask, and predicts the blood glucose level at the corresponding position, and calculates the loss function of the model.
[0441] First, the encoder encodes the positions and elements in the input sequence, converting each position in the sequence into a d-dimensional vector, and each sequence can be represented as Then, the encoded sequence is trained through four layers of transformer units, and each layer of transformer unit has 8 self-attention heads. In each layer l, the input Z l-1 (Z 0 =S enc ) is first encoded into a triple (query vector Q, key vector K, value vector V) through linear transformation in the self-attention module, that is:
[0442] Q=Z l-1 W Q , K=Z l-1 W K , V=Z l-1 V V
[0443] wherein are the learnable weight parameters in the three linear mapping layers, and k is the feature dimension of the triple. Subsequently, the self-attention mechanism (SA) can be represented as:
[0444] MSA is an extension with m independent self-attention mechanism operations, and maps their joint output: MSA(Z l-1 ) = [SA1(Z l-1 ); SA2(Z l-1 ); …; SA m (Z l-1 )]W O , wherein k is usually set to d / m.
[0445] Then, the output of MSA is transformed by the MLP block, with a residual connection after normalization as the output of the layer:
[0446] As shown in Figures 16 and 17, in the pre-training process, for a given unlabeled sequence S, first, a part of the positions are randomly set as a mask to produce S mask , and then Smask The foregoing pre-training model is inputted, and an output is obtained The pre-training stage loss function can be expressed as:
[0447] Wherein, n unk is the number of masks, and x is the original element embedding representation of the mask position.
[0448] The average vector calculated according to the position of the output matrix S out of the last layer is used as the feature vector of the sequence The pre-training model learns the individual blood glucose dynamic characteristics and patterns from a large amount of unlabeled data through self-supervised learning, realizes the mapping of CGM data into a low-dimensional vector space, and captures the potential blood glucose dynamic characteristics.
[0449] 2. Constructing a non-diabetic type based on a CGM pre-training model
[0450] (1) Constructing a typing model and obtaining the reference distribution of each type in the latent space
[0451] The model pre-trained on a large amount of unlabeled data can effectively encode the blood glucose data recorded by CGM into vectors in the latent space, capture the individual blood glucose dynamic characteristics, and the distance of the vector in the latent space reflects the similarity of the corresponding CGM data blood glucose dynamic characteristics.
[0452] The CGM corpus constructed by the nationwide multi-center CGM data is encoded into 128-dimensional vectors in the latent space through pre-training, and the vectors corresponding to the non-diabetic population in the embodiment are clustered to obtain a non-diabetic population typing based on a continuous glucose monitoring pre-training model, denoted as P={P t ,t=1,2,…,M}, M is the number of types obtained by clustering. Each type t is represented by the vector of the corresponding sequence in the nationwide multi-center data to depict its distribution in the latent space:
[0453] P t ={v s ,T(s)=t}
[0454] Wherein, v s represents the vector representation of the sample s, and T(s) is the type of the sample s.
[0455] (2) Combined with clinical data to depict the clinical characteristics and diabetes risk of the type
[0456] Further, combined with the individual clinical characteristics matched with the CGM data, the blood glucose dynamic characteristics and clinical pathophysiological characteristics of each type are characterized according to the global and time-period blood glucose dynamic characteristics and clinical data. Combined with the type of glucose metabolism characteristics and pathophysiological characteristics, the risk of diabetes is evaluated.
[0457] 3. Give diagnosis and treatment suggestions based on CGM data for non-diabetes types
[0458] (1) Map the input CGM data to the latent space by the pre-trained model
[0459] For the input CGM data, the embodiment first divides it by day and converts it into a sequence, and converts it into a latent space vector via the pre-trained model. For a subject individual s with multiple days of data, the individual CGM data is divided and mapped into a vector Take the average as the latent space vector representation of the subject:
[0460] (2) Type the sample based on the representation of the individual CGM data in the latent space
[0461] Calculate The average distance of clustering in the latent space to the distribution of each type in the latent space, and take the type with the smallest distance as the type of sample s, that is:
[0462] In actual application, the embodiment realizes the evaluation of the individual risk of diabetes by combining the glucose metabolism characteristics and pathophysiological characteristics of the type, and gives personalized diagnosis and treatment suggestions.
[0463] Embodiment 4
[0464] Based on the method of non-diabetes type provided in embodiment 1, the embodiment is tested by using multi-center CGM data nationwide. The blood glucose dynamic characteristic vectors of the multi-center CGM data nationwide obtained by the pre-trained model are subjected to hierarchical clustering, and the blood glucose dynamic change patterns of the CGM can be divided into 6 groups, that is, 6 subtypes. Statistical analysis of the average blood glucose dynamic characteristics of the 6 subtypes shows that the 6 groups of blood glucose dynamic change patterns well reflect the average blood glucose values, dynamic fluctuation amplitudes and other blood glucose dynamic change characteristics in different stages of fasting and postprandial, as shown in Table 2. Further, the blood glucose dynamic change characteristics of these samples and the matched clinical data are associated, as shown in Table 3, and it is found that a normal subtype and five pre-diabetes subtypes can be typed, which reflects the good consistency of the clustering type result and the clinical data.
[0465] Table 2
[0466] Table 3
[0467] The above six subtypes are compared with the glucotype classification proposed by the team of Stanford University in the United States. The classification obtained in the present embodiment is more detailed. Overall, the classification in the present embodiment can subdivide the moderate variability subtype (moderate variability) obtained by the glucotype classification into two groups (Pre_Ia, Pre_Ib), and subdivide the severe variability subtype (severe variability) obtained by the glucotype classification into three groups (Pre_IIa, Pre_IIb, Pre_IIc), as shown in Table 4. In particular, if the clinical OGTT result is taken as the third-party gold standard, compared with the glucotype classification, the six subtype classification of the present embodiment can more accurately distinguish normal glucose tolerance (Normal Glucose Tolerance, NGT, FBG < 6.1 mmol / L, 2hPG < 7.8 mmol / L), impaired fasting glucose (Impaired Fasting Glucose, IFG, 6.1 ≤ FBG < 7.0 mmol / L, 2hPG < 7.8 mmol / L), impaired glucose tolerance (Impaired Glucose Tolerance, IGT, FBG < 6.1 mmol / L, 7.8 ≤ 2hPG < 11.1 mmol / L), combined glucose tolerance (Combined Glucose Tolerance, CGI, 6.1 ≤ FBG < 7.0 mmol / L, 7.8 ≤ 2hPG < 11.1 mmol / L), as shown in Table 5. As shown in FIG. 18, compared with the glucotype classification, the classification of the six subtypes of the present embodiment has higher consistency with the classification in OGTT. In FIG. 18, ARI represents the adjusted Rand index, and AMI represents the adjusted mutual information index.
[0468] Table 4
[0469] Table 5
[0470] Example 5
[0471] The present embodiment provides a method for predicting postprandial blood glucose, and the flow chart is shown in FIG. 23. The steps of the method are as follows.
[0472] 1. Construct and train the pre-training model
[0473] (1) Construct the classification and obtain the reference distribution of the classification in the latent space
[0474] CGM data from 11 hospitals in 7 provinces and cities nationwide (national multi-center CGM data) containing 964 subjects were obtained, and the matched clinical information of each subject was collected. The data covered people with different glucose metabolism characteristics such as normal glucose tolerance, impaired glucose tolerance, and diabetes. Each subject wore a CGM device for an average of 3 days, with blood glucose concentration detected every 5 minutes, and the subjects' lifestyles such as diet and exercise were strictly controlled during data collection, providing high-quality and comprehensive CGM data.
[0475] (2) Construction and training of pre-trained model
[0476] For the national multi-center CGM data collected in step 1, the time series data was first segmented by day, with 288 complete measurements from 0:00 to 24:00 each day as a sequence, and incomplete sequences during data collection were filtered out, resulting in complete all-day blood glucose time series. For the blood glucose value measured at each time point, it was discretized into 261 blood glucose levels from 40mg / ml to 300mg / dl, and the complete blood glucose concentration time series in a day was converted into a sequence S composed of blood glucose levels, and finally the CGM pre-training model corpus was obtained.
[0477] After obtaining the CGM-based corpus, this embodiment constructs and trains a deep self-attention transformation network with Transformer architecture, which can learn the dynamic characteristics and patterns of blood glucose fluctuations from a large amount of unlabeled CGM data in an unsupervised manner.
[0478] Specifically, as shown in FIG. 24, the network consists of 4 layers of transformer units, and each layer of transformer unit consists of a multi-head self-attention module (MSA) and a feedforward neural network module (MLP). The network takes a sequence S of length L as input, learns the patterns of blood glucose sequences before and after, sets a mask, and predicts the blood glucose level at the corresponding position, and calculates the loss function of the model.
[0479] First, the encoder encodes the positions and elements in the input sequence, converting each position in the sequence to a d-dimensional vector, and each sequence can be represented as Then, the encoded sequence is trained through four layers of transformer units, and each transformer unit has 8 self-attention heads. At each layer l, the input Z l-1 (Z 0 =S enc ) is first encoded into a triple (query vector Q, key vector K, value vector V) through linear transformation in the self-attention module, i.e.:
[0480] Q=Z l-1 WQ , K = Z l-1 W K , V = Z l-1 W V ;
[0481] where, are the learnable weight parameters in three linear mapping layers, and k is the feature dimension of the triplets. Subsequently, the self-attention mechanism (SA) can be represented as:
[0482] MSA is an extension with m independent self-attention mechanism operations and maps their joint output: MSA(Z l-1 ) = [SA1(Z l-1 ) ; SA2(Z l-1 ) ;... ; SA m (Z l-1 )]W O , where k is usually set as d / m.
[0483] Then, the output of MSA is transformed by an MLP block to normalize the layer after a residual connection as the output of the layer:
[0484] In the pre-training process, for a given unlabeled sequence S, first, some positions are randomly set as masks to produce S mask , and then S mask is input into the aforementioned pre-training model to obtain the output By learning the features and patterns of the input sequence through the elements of the masked positions, the pre-training stage loss function can be represented as:
[0485] where n unk is the number of masks, and x is the original element embedding representation of the mask position.
[0486] The average vector calculated by the output matrix S out of the last layer is used as the feature vector The pre-training model learns the individual glycemic dynamic features and patterns from a large amount of unlabeled data through self-supervised learning, realizes the mapping of CGM data to a low-dimensional vector space, and captures the potential glycemic dynamic features.
[0487] 2. Collect matched dietary records and dynamic glycemic data
[0488] This embodiment collected CGM data with dietary records, matched the pre- and post-meal blood glucose dynamics for each meal, and converted the dietary structure information into the nutritional components of the meal, including five dimensions: calories (kcal), carbohydrates (g), protein (g), fat (g), and fiber (g). For an individual's CGM records, we encode them using the pre-trained model trained in step 1, and take the average vector of records from multiple days as the feature vector of patient P, i.e.
[0489] in, This is the set of all 24-hour blood glucose sequences segmented from patient P's CGM data. Let S be the feature vector encoded by the pre-trained model for the blood glucose sequence S.
[0490] 3. Construct a postprandial blood glucose prediction model
[0491] This embodiment predicts postprandial blood glucose dynamics by combining the individual blood glucose dynamics reflected in the patient's past CGM data, pre-meal blood glucose, and dietary structure information.
[0492] Specifically, as shown in Figure 24, the model input consists of three parts: the CGM data of patient P is a feature vector encoded by the pre-trained model. Blood sugar one hour before meals Where t represents the number of blood glucose tests conducted by the CGM device within one hour, with t=12 at 5-minute intervals; and when the dietary structure information is available... The model first puts v P It is embedded from a linear layer into an l-dimensional latent space, i.e. Then combined with pre-meal blood glucose (G) B right Fine-tuning is used to reflect an individual's current blood glucose status, and dietary information is processed as an immediate input perturbation to iteratively predict postprandial blood glucose.
[0493] Specifically, the blood glucose sequence and dietary structure information are first combined into a continuous time series signal as input, and then defined as follows: Where T 1,. =G B ,T 2:6,t =M,T 2:6,1:t-1 =0. Definition have:
[0494] v k+1 ,o k+1 =LSTM(v k ,R .,k )
[0495] For 1≤k≤t iterations t times, get represents the sugar metabolism state before the meal, and represents the blood glucose dynamics immediately after eating, and D represents. The output vector o is decoded by a linear decoder to predict the blood glucose
[0496] Then, the postprandial blood glucose is iteratively predicted, and for k>t, there is:
[0497] wherein, is the predicted blood glucose from the previous time, The loss function of the model is represented as the mean square error of the predicted blood glucose and the true blood glucose, that is,
[0498] wherein G pred =(g k ) 1<k≤3t , G P is the true postprandial blood glucose. The model predicted postprandial blood glucose can be obtained from
[0499] Further, by inputting different simulated dietary structure information into the model, the postprandial blood glucose dynamics under different dietary structures can be predicted. In order to provide personalized dietary prescriptions for patients, for a patient S, first, the existing CGM records of the patient are encoded by the pre-trained model to extract a vector v S representing the blood glucose dynamics characteristics of the patient. Then, according to the immediate pre-meal blood glucose G B of the patient before the meal, combined with the individual basal metabolism fixed meal calories, the functional proportions of carbohydrates, proteins and fats are adjusted, different dietary structure information is input into the model, and the postprandial blood glucose under different dietary structures is predicted, and the personalized dietary prescription is selected for the patient combined with the postprandial blood glucose dynamics.
[0500] Table 6
[0501] Example 6
[0502] In this embodiment, the prediction performance of the postprandial blood glucose prediction model in Example 5 is tested, and the feasibility of the prediction method is verified.
[0503] The public dataset published by the Fourth People's Hospital of Shanghai with matching dietary structure information and dynamic blood glucose monitoring data (Zhao, Q. et al. Chinese diabetes datasets for data-driven machine learning. Sci Data 10, 35 (2023).) was collected. By converting the dietary structure information in the dataset into nutrients such as calories, carbohydrates, proteins, fats, and dietary fiber, the meal information was matched with the blood glucose dynamics, and the training and testing were performed in the dataset. The individual's CGM data was combined with the pre-trained model encoded blood glucose dynamic feature data, pre-meal blood glucose data, and dietary perturbation in the hidden space, and the post-meal blood glucose prediction was output. The post-meal blood glucose concentration measured by dynamic glucose monitoring was used as the gold standard, and the Pearson correlation coefficient was calculated to quantify the accuracy of the prediction.
[0504] The baseline model LSTM has the same architecture as the post-meal blood glucose prediction model constructed in Example 6, but does not use the pre-trained model encoded blood glucose dynamic features as input. Instead, it directly combines the individual's pre-meal blood glucose data and dietary perturbation as input and outputs the predicted post-meal blood glucose.
[0505] According to the analysis results as shown in FIG. 25, the post-meal blood glucose prediction model constructed in Example 6 has accurate and robust post-meal blood glucose prediction performance, with a Pearson correlation coefficient greater than 0.8 with the true blood glucose value throughout the entire 2-hour period (8 time points, each interval 15 minutes). Moreover, the post-meal blood glucose prediction model constructed in Example 5 significantly outperforms the baseline model LSTM with the same architecture but without using the pre-trained model encoded blood glucose dynamic features as input in terms of blood glucose prediction level at all time points throughout the entire 2-hour period.
[0506] The above-described embodiments only express several implementation manners of the present application, facilitate specific and detailed understanding of the technical solutions of the present application, but cannot be understood as limiting the patent protection scope of the present application. It should be noted that, for ordinary skilled persons in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the protection scope of the present application. In addition, it should be understood that, after reading the above teaching content of the present application, the skilled person in the art can make various modifications or improvements to the present application, and the equivalent forms are also within the protection scope of the present application. It should also be understood that, the technical solutions obtained by the skilled person in the art through logical analysis, reasoning or limited experiments on the basis of the technical solutions provided by the present application are within the protection scope of the appended claims of the present application. Therefore, the protection scope of the patent of the present application should be based on the content of the appended claims, and the description and drawings can be used to explain the content of the claims.
Claims
1. A method of constructing a prediction model for a disease related to sugar metabolism, characterized by, The method comprises: obtaining dynamic blood glucose concentration data of a first sample set, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-training model; obtaining dynamic blood glucose concentration data and clinical diagnosis labels of a second sample set, and training the pre-training model and a first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis labels of the second sample set to obtain a sugar metabolism impairment disease prediction model; and / or obtaining dynamic blood glucose concentration data, clinical diagnosis labels and clinical physiological data of a third sample set, and training the pre-training model and a second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis labels and the clinical physiological data of the third sample set to obtain a sugar metabolism impairment degree prediction model; wherein the first sample set and the third sample set comprise a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples, and the second sample set comprises normal glucose tolerance samples and sugar metabolism impairment disease samples corresponding to a prediction task.
2. The method of claim 1, wherein, The method comprises: preprocessing the dynamic blood glucose concentration data of the first sample set to obtain continuous blood glucose sequence data of the first sample set; inputting the continuous blood glucose sequence data of the first sample set into an initial model to obtain blood glucose dynamic feature data of the first sample set; performing mask processing on the continuous blood glucose sequence data of the first sample set, inputting the masked dynamic blood glucose sequence data of the first sample set into the initial model to obtain blood glucose dynamic feature data of the first sample set after masking; determining a training loss of the initial model according to the blood glucose dynamic feature data of the first sample set and the blood glucose dynamic feature data of the target sample after masking, updating parameters of the initial model according to the loss training loss of the initial model, and obtaining the pre-training model according to the updated initial model parameters.
3. The method of claim 2, wherein, The initial model comprises a transformer model, and the transformer model comprises an initial encoding layer, a multi-head self-attention mechanism layer and a feedforward neural network layer.
4. The method according to any one of claims 1 to 3, characterized in that, The method comprises: inputting the dynamic blood glucose concentration data of the second sample set into the pre-training model to obtain blood glucose dynamic feature data of the second sample set; inputting the blood glucose dynamic feature data of the second sample set into the first fine-tuning layer to obtain predicted clinical diagnosis labels of the second sample set; determining a first training loss based on the predicted clinical diagnosis labels and the clinical diagnosis labels of the second sample set, updating parameters of the pre-training model and parameters of the first fine-tuning layer according to the first training loss, and obtaining a sugar metabolism impairment disease prediction model corresponding to the prediction task according to the pre-training model parameters after updating and the first fine-tuning layer parameters after updating.
5. The method according to any one of claims 1 to 4, characterized in that, The second fine-tuning layer comprises a linear encoding layer and the prediction layer, and the method comprises: inputting the dynamic blood glucose concentration data of the third sample set into the pre-training model to obtain blood glucose dynamic feature data of the third sample set; inputting the blood glucose dynamic feature data of the third sample set into the linear encoding layer to obtain impaired glucose metabolism feature data of the third sample set; inputting the impaired glucose metabolism feature data of the third sample set into the prediction layer to obtain a plurality of predicted clinical physiological features of each sample in the third sample set; determining a second training loss based on the plurality of predicted clinical physiological features, the clinical diagnosis label and the plurality of clinical physiological data of each sample in the third sample set, updating parameters of the linear encoding layer and the prediction layer according to the second training loss, and obtaining the impaired glucose metabolism degree prediction model according to the pre-training model and the updated second fine-tuning layer parameters.
6. A method for predicting a disease related to sugar metabolism, characterized by, comprising: obtaining dynamic blood glucose concentration data of a subject; inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism disease prediction model constructed by the method of any one of claims 1-5 to obtain impaired glucose metabolism disease prediction results of the subject; and / or inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism degree prediction model constructed by the method of any one of claims 1-5 to obtain impaired glucose metabolism degree prediction results of the subject.
7. An apparatus for constructing a predictive model for glucose metabolism-related diseases, characterized in that, comprising: a pre-training module for obtaining dynamic blood glucose concentration data of a first sample set, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the first sample set to obtain a pre-training model; a first model fine-tuning module for obtaining dynamic blood glucose concentration data and a clinical diagnosis label of a second sample set, training the pre-training model and a first fine-tuning layer based on the dynamic blood glucose concentration data and the clinical diagnosis label of the second sample set to obtain an impaired glucose metabolism disease prediction model; and / or a second model fine-tuning module for obtaining dynamic blood glucose concentration data, a clinical diagnosis label and clinical physiological data of a third sample set, training the pre-training model and a second fine-tuning layer based on the dynamic blood glucose concentration data, the clinical diagnosis label and the clinical physiological data of the third sample set to obtain an impaired glucose metabolism degree prediction model; wherein the first sample set and the third sample set comprise a plurality of normal glucose tolerance samples, a plurality of impaired glucose tolerance samples and a plurality of diabetes samples, and the second sample set comprises normal glucose tolerance samples and impaired glucose metabolism disease samples corresponding to a prediction task.
8. A device for predicting glucose metabolism-related diseases, characterized in that, comprising: a data acquisition module for obtaining dynamic blood glucose concentration data of a subject; a first prediction module for inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism disease prediction model constructed by the method of any one of claims 1-5 to obtain impaired glucose metabolism disease prediction results of the subject; and / or a second prediction module for inputting the dynamic blood glucose concentration data of the subject into the impaired glucose metabolism degree prediction model constructed by the method of any one of claims 1-5 to obtain impaired glucose metabolism degree prediction results of the subject. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1-6.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.
11. A method of constructing a non-diabetes classification model, the method comprising: comprising: The method comprises the following steps: obtaining dynamic blood glucose concentration data of a target sample, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-training model; obtaining blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and performing clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data; wherein the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and a non-diabetic classification represented by the clusters; 12. The method of claim 11, wherein, the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprises a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The method comprises the following steps: preprocessing the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample; inputting the dynamic blood glucose sequence data of the target sample into an initial model to obtain blood glucose dynamic feature data of the target sample; performing mask processing on the dynamic blood glucose sequence data of the target sample to obtain masked dynamic blood glucose sequence data of the target sample, and inputting the masked dynamic blood glucose sequence data of the target sample into the initial model to obtain masked blood glucose dynamic feature data of the target sample; 13. The method of claim 12, wherein, determining a training loss according to the blood glucose dynamic feature data of the target sample and the masked blood glucose dynamic feature data of the target sample, updating parameters of the initial model according to the training loss, and obtaining the pre-training model according to the initial model after updating the parameters.
14. The method according to any one of claims 11 to 13, characterized in that, The initial model comprises an initial encoding layer and an initial prediction layer, and the initial prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer. The method further comprises the following steps:
15. A method of predicting non-diabetic phenotypes, characterized in that, obtaining a plurality of clinical features corresponding to each blood glucose dynamic feature data cluster, and determining a diabetes risk of each non-diabetic classification according to the plurality of clinical features and blood glucose fluctuation features of each blood glucose dynamic feature data cluster. The method comprises the following steps: obtaining dynamic blood glucose concentration data of a target sample, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-training model; obtaining blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and performing clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data; wherein the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and a non-diabetic classification represented by the clusters; the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprises a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The method comprises the following steps: preprocessing the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample; inputting the dynamic blood glucose sequence data of the target sample into an initial model to obtain blood glucose dynamic feature data of the target sample; 16. The method of claim 15, wherein, performing mask processing on the dynamic blood glucose sequence data of the target sample to obtain masked dynamic blood glucose sequence data of the target sample, and inputting the masked dynamic blood glucose sequence data of the target sample into the initial model to obtain masked blood glucose dynamic feature data of the target sample; determining a training loss according to the blood glucose dynamic feature data of the target sample and the masked blood glucose dynamic feature data of the target sample, updating parameters of the initial model according to the training loss, and obtaining the pre-training model according to the initial model after updating the parameters. The initial model comprises an initial encoding layer and an initial prediction layer, and the initial prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer. The method further comprises the following steps: obtaining a plurality of clinical features corresponding to each blood glucose dynamic feature data cluster, and determining a diabetes risk of each non-diabetic classification according to the plurality of clinical features and blood glucose fluctuation features of each blood glucose dynamic feature data cluster. The method comprises the following steps: obtaining dynamic blood glucose concentration data of a target sample, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-training model; obtaining blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and performing clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data; wherein the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and a non-diabetic classification represented by the clusters; the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprises a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The method comprises the following steps: preprocessing the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample; inputting the dynamic blood glucose sequence data of the target sample into an initial model to obtain blood glucose dynamic feature data of the target sample; performing mask processing on the dynamic blood glucose sequence data of the target sample to obtain masked dynamic blood glucose sequence data of the target sample, and inputting the masked dynamic blood glucose sequence data of the target sample into the initial model to obtain masked blood glucose dynamic feature data of the target sample; determining a training loss according to the blood glucose dynamic feature data of the target sample and the masked blood glucose dynamic feature data of the target sample, updating parameters of the initial model according to the training loss, and obtaining the pre-training model according to the initial model after updating the parameters. The initial model comprises an initial encoding layer and an initial prediction layer, and the initial prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer. The method further comprises the following steps: obtaining a plurality of clinical features corresponding to each blood glucose dynamic feature data cluster, and determining a diabetes risk of each non-diabetic classification according to the plurality of clinical features and blood glucose fluctuation features of each blood glucose dynamic feature data cluster. The method comprises the following steps: obtaining dynamic blood glucose concentration data of a target sample, and performing machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-training model; obtaining blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and performing clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data; wherein the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and a non-diabetic classification represented by the clusters; the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprises a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The method comprises the following steps: preprocessing the dynamic blood glucose concentration data of the target sample to obtain dynamic blood glucose sequence data of the target sample; inputting the dynamic blood glucose sequence data of the target sample into an initial model to obtain blood glucose dynamic feature data of the target sample; performing mask processing on the dynamic blood glucose sequence data of the target sample to obtain masked dynamic blood glucose sequence data of the target sample, and inputting the masked dynamic blood glucose sequence data of the target sample into the initial model to obtain masked blood glucose dynamic feature data of the target sample; determining a training loss according to the blood glucose dynamic feature data of the target sample and the masked blood glucose dynamic feature data of the target sample, updating parameters of the initial model according to the training loss, and obtaining the pre-training model according to the initial model after updating the parameters. The initial model comprises an initial encoding layer and an initial prediction layer, and the initial prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer. The method further comprises the following steps: obtaining a plurality of clinical features corresponding to each blood glucose dynamic feature data cluster, and determining a diabetes risk of each non-diabetic classification according to the plurality of clinical features and blood glucose fluctuation features of each blood glucose dynamic feature data cluster. The method comprises the following steps: calculate blood glucose dynamic feature data of the to-be-tested sample and average distances of each blood glucose dynamic feature data cluster; determine the non-diabetic type of the to-be-tested sample according to the non-diabetic type represented by the blood glucose dynamic feature data cluster with the smallest average distance; Optionally, the pre-training model comprises a pre-trained encoding layer and a prediction layer, and the prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer.
17. An apparatus for constructing a non-diabetic subtyping model, characterized in that, It comprises: a pre-training module: used to obtain dynamic blood glucose concentration data of a target sample, and perform machine learning in an unsupervised manner based on the dynamic blood glucose concentration data of the target sample to obtain a pre-training model; a clustering module: used to obtain blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model, and perform clustering on the blood glucose dynamic feature data of the plurality of non-diabetic samples to obtain non-diabetic blood glucose dynamic distribution data; wherein the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and non-diabetic types represented by the plurality of blood glucose dynamic feature data clusters; the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprise a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
18. A method of predicting non-diabetes classification, characterized by, It comprises: a data acquisition module: used to obtain dynamic blood glucose concentration data of a to-be-tested sample; a non-diabetic type module: used to determine a non-diabetic type of the to-be-tested sample according to the dynamic blood glucose concentration data of the to-be-tested sample; wherein the device is implemented based on a non-diabetic type model, and the non-diabetic type model is used to perform the following steps: input the dynamic blood glucose concentration data of the to-be-tested sample into a pre-training model to obtain blood glucose dynamic feature data of the to-be-tested sample; determine a non-diabetic type of the to-be-tested sample based on the blood glucose dynamic feature data of the to-be-tested sample and the non-diabetic blood glucose dynamic distribution data; the pre-training model is obtained by performing machine learning in an unsupervised manner based on dynamic blood glucose concentration data of a target sample, and the target sample comprises a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprise a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples; the non-diabetic blood glucose dynamic distribution data comprises a plurality of blood glucose dynamic feature data clusters and non-diabetic types represented by the plurality of blood glucose dynamic feature data clusters, and the plurality of blood glucose dynamic feature data clusters are obtained by clustering blood glucose dynamic feature data of a plurality of non-diabetic samples output by the pre-training model. 19.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-18. The processor executes the computer program to implement the steps of the method of any one of claims 11-16.
20. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 11-16.
21. A method of predicting postprandial glycemia, characterized by, It comprises: obtain blood glucose dynamic feature data, pre-meal instantaneous blood glucose data and at least one dietary structure information of a subject, and the blood glucose dynamic feature data of the subject is obtained based on a pre-training model; input the blood glucose dynamic feature data, the pre-meal instantaneous blood glucose data and the at least one dietary structure information of the subject into a postprandial blood glucose prediction model, and output predicted postprandial blood glucose of the subject based on the postprandial blood glucose prediction model; The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The postprandial blood glucose prediction model is obtained by training a machine learning model based on blood glucose dynamic characteristic data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, the target time zone historical blood glucose data including historical preprandial blood glucose data and historical postprandial blood glucose data.
22. The method of claim 21, wherein, The method comprises: providing dietary prescription suggestions according to the predicted postprandial blood glucose of the subject; Optionally, the machine learning model comprises a long short-term memory network model. Optionally, the machine learning model comprises an encoding layer, a long short-term memory network layer, and a prediction layer.
23. A method of constructing a postprandial glucose prediction model, the method comprising: The method comprises: obtaining blood glucose dynamic characteristic data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, the blood glucose dynamic characteristic data of the subject being obtained based on a pre-training model; training a machine learning model based on the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding target time zone historical blood glucose data to obtain a postprandial blood glucose prediction model; The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, the target samples including a plurality of non-diabetic samples and a plurality of diabetic samples, the plurality of non-diabetic samples including a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples.
24. The method of claim 23, wherein, The pre-training model comprises: preprocessing the dynamic blood glucose concentration data of the target samples to obtain dynamic blood glucose sequence data of the target samples; inputting the dynamic blood glucose sequence data of the target samples into an initial model to obtain blood glucose dynamic characteristic data of the target samples; masking the dynamic blood glucose sequence data of the target samples to obtain masked dynamic blood glucose sequence data of the target samples, and inputting the masked dynamic blood glucose sequence data of the target samples into the initial model to obtain masked blood glucose dynamic characteristic data of the target samples; determining a first training loss based on the blood glucose dynamic characteristic data of the target samples and the masked blood glucose dynamic characteristic data of the target samples, updating parameters of the initial model based on the first training loss, and obtaining the pre-training model based on the initial model after the parameters are updated.
25. The method of claim 24, wherein, The initial model comprises an initial encoding layer and an initial prediction layer, and the initial prediction layer comprises a multi-head self-attention mechanism layer and a feedforward neural network layer.
26. The method of claim 23, wherein, Training a machine learning model based on the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding target time zone historical blood glucose data to obtain a postprandial blood glucose prediction model comprises: inputting the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding preprandial blood glucose data into the machine learning model to obtain target time zone predicted blood glucose data; determining a second training loss based on the target time zone predicted postprandial blood glucose data and the target time zone historical blood glucose data, updating parameters of the machine learning model based on the second training loss, and obtaining the postprandial blood glucose prediction model based on the machine learning model after the parameters are updated. Optionally, the machine learning model comprises a long short-term memory network model. The machine learning model comprises an encoding layer, a long short-term memory network layer, and a prediction layer.
27. An apparatus for predicting postprandial blood glucose, the apparatus comprising: Comprising: The first data acquisition module is configured to acquire blood glucose dynamic characteristic data of a subject, immediate pre-meal blood glucose data, and at least one dietary structure information, wherein the blood glucose dynamic characteristic data of the subject is obtained based on a pre-training model; The blood glucose prediction module is configured to input the blood glucose dynamic characteristic data of the subject, the immediate pre-meal blood glucose data, and the at least one dietary structure information into a post-meal blood glucose prediction model, and obtain a predicted post-meal blood glucose of the subject based on an output of the post-meal blood glucose prediction model. The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, wherein the target samples comprise a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprise a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. The post-meal blood glucose prediction model is obtained by training a machine learning model based on the blood glucose dynamic characteristic data of the subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, wherein the target time zone historical blood glucose data comprises historical pre-meal blood glucose data and historical post-meal blood glucose data.
28. An apparatus for constructing a postprandial blood glucose prediction model, the apparatus comprising: Comprising: The second data acquisition module is configured to acquire blood glucose dynamic characteristic data of a subject, historical dietary structure information, and corresponding target time zone historical blood glucose data, wherein the blood glucose dynamic characteristic data of the subject is obtained based on a pre-training model; The model training module is configured to train a machine learning model based on the blood glucose dynamic characteristic data of the subject, the historical dietary structure information, and the corresponding target time zone historical blood glucose data to obtain a post-meal blood glucose prediction model, wherein the post-meal blood glucose prediction model is used to predict a post-meal blood glucose of the subject corresponding to the dietary structure information. The pre-training model is obtained by machine learning in an unsupervised manner based on dynamic blood glucose concentration data of target samples, wherein the target samples comprise a plurality of non-diabetic samples and a plurality of diabetic samples, and the plurality of non-diabetic samples comprise a plurality of normal glucose tolerance samples and a plurality of impaired glucose tolerance samples. 29.A computer device, comprising a memory and a processor, wherein the memory stores a computer program. The processor executes the computer program to implement the steps of the method of any one of claims 21-26.
30. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 21-26.