Diabetes risk prediction method and device, electronic equipment and storage medium
By constructing a dynamic metabolic graph and a dynamic graph attention network, combining feature extraction and risk prediction models, the convenience and accuracy of diabetes risk prediction in the prior art are solved, and individualized diabetes risk prediction is achieved.
Patent Information
- Application Number
- CN202510627783.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art is difficult to predict diabetes risk easily and accurately, and cannot effectively capture the timing change characteristics and individualized risk expression between metabolic indicators.
By constructing a dynamic metabolic graph, using a dynamic graph attention network and a pre-trained feature extraction model, combined with a multi-layer perceptron model, dynamically capture the spatiotemporal and spatial correlation characteristics of metabolic nodes, and realize rapid feature extraction and risk prediction of metabolic data.
It realizes convenient and accurate prediction of diabetes risk levels, improves individual prediction capabilities, and adapts to changes in metabolic characteristics of different patients.
Smart Images

Figure CN120280155A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of computer processing, and in particular, to a method, device, electronic device and storage medium for predicting diabetes risk. Background Art
[0002] Diabetes is a common chronic disease. It is caused by insulin secretion defects or dysfunction, and long-term hyperglycemia can damage multiple organs such as the heart, brain, and kidneys, leading to complications, seriously affecting the quality of life and life expectancy of patients. Therefore, a method for predicting diabetes risk is provided to more conveniently and accurately detect the diabetes risk level of diabetes patients. Summary of the Invention
[0003] The present invention provides a method, device, electronic device and storage medium for predicting diabetes risk to conveniently and accurately predict the diabetes risk level of a target object.
[0004] According to one aspect of the present invention, a method for predicting diabetes risk is provided. The method includes:
[0005] Determining a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators;
[0006] Inputting the first metabolic map into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic map;
[0007] Inputting each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0008] According to another aspect of the present invention, a device for predicting diabetes risk is provided. The device includes:
[0009] A metabolic map generation module, configured to determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators;
[0010] A feature extraction module, configured to input the first metabolic map into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic map;
[0011] A risk prediction module for inputting each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0012] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0013] One or more processors;
[0014] A storage device for storing one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the diabetes risk prediction method as described in any one of the embodiments of the present invention.
[0016] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the diabetes risk prediction method as described in any one of the present invention when executed.
[0017] The technical solution of the embodiment of the present invention determines the first metabolic map of the target object at the current moment by using the metabolic data of the target object under multiple metabolic detection indicators at the current moment. The first metabolic map includes multiple metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators. By dynamically constructing the metabolic map at the current moment, the metabolic data corresponding to the metabolic indicators at the current moment can be accurately reflected. Inputting the first metabolic map into a pre-trained feature extraction model to obtain the first node feature data of each of the metabolic nodes in the first metabolic map can quickly extract the feature data of the nodes. Then, inputting each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment realizes a relatively convenient and accurate prediction of the risk level of the target object suffering from diabetes.
[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0020] Figure 1Flow diagram of a diabetes risk prediction method provided by an embodiment of the present invention;
[0021] Figure 2 Flow diagram of a diabetes risk prediction method provided by an embodiment of the present invention;
[0022] Figure 3 Structural diagram of a dynamic graph attention network provided by an embodiment of the present invention;
[0023] Figure 4 Structural diagram of a dynamic graph attention layer provided by an embodiment of the present invention;
[0024] Figure 5 Flow diagram of a diabetes risk prediction method provided by an embodiment of the present invention;
[0025] Figure 6 Structural diagram of a second initial network model provided by an embodiment of the present invention;
[0026] Figure 7 Structural diagram of a diabetes risk prediction device provided by an embodiment of the present invention;
[0027] Figure 8 Structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0028] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to users in an appropriate manner and user authorization should be obtained in accordance with relevant laws and regulations.
[0031] For example, when receiving an active request from a user, a prompt message is sent to the user to clearly prompt that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that performs the operations of the technical solutions of the present disclosure based on the prompt message.
[0032] As an optional but non-limiting implementation manner, the way of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above process of notifying and obtaining user authorization is only illustrative and does not limit the implementation manners of the present disclosure, and other manners that meet relevant laws and regulations can also be applied to the implementation manners of the present disclosure.
[0034] It is understandable that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.
[0035] Figure 1 The figure is a schematic flowchart of a diabetes risk prediction method provided for an embodiment of the present invention. This embodiment is applicable to the situation of predicting the diabetes risk level of a target object. This method can be executed by a diabetes risk prediction device, and the diabetes risk prediction device can be implemented in the form of hardware and / or software. The diabetes risk prediction device can be configured in an electronic device such as a computer or a server. As Figure 1 shown, the method of this embodiment includes:
[0036] S110. Determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indexes at the current moment; wherein, the first metabolic map includes multiple metabolic nodes, and the metabolic nodes correspond to the metabolic detection indexes.
[0037] In the embodiments of the present invention, the target object can be understood as the object for which diabetes level prediction needs to be performed. Exemplarily, the target object can be a diabetes patient. The metabolic detection index can be a pre-set metabolic index for predicting the diabetes risk level of the target object. The metabolic detection index can be set according to requirements. The metabolic data can be understood as the specific data under the metabolic index. That is, the relationship between the metabolic detection index and the metabolic data is one-to-one. That is to say, one metabolic detection index corresponds to one metabolic data. Exemplarily, the metabolic index is the body mass index. Then, the metabolic data under the metabolic index is the index value under the body mass index.
[0038] Among them, the first metabolic map can be understood as the metabolic map of the target object at the current moment. In the embodiments of the present invention, the first metabolic map of the target object at the current moment can be obtained based on the metabolic data under multiple metabolic detection indexes of the target object at the current moment. In the embodiments of the present invention, the first metabolic map includes multiple metabolic nodes. The metabolic node can be understood as the node in the first metabolic map. In the embodiments of the present invention, the node data corresponding to the metabolic node can be the metabolic data under the metabolic detection index corresponding to the metabolic node.
[0039] Compared with the related art where using a static map has the technical problem of being unable to reflect the temporal variation characteristics between indicators, in the embodiments of the present invention, through the construction of a dynamic metabolic map, the non-linear dynamic relationship evolving over time among physiological indicators, drug treatments, and life behaviors can be explicitly captured. In the embodiments of the present invention, by constructing the first metabolic map, the key features and indicator associations in the disease evolution process of diabetes patients can be accurately captured, providing efficient and accurate data structure support for subsequent diabetes risk prediction.
[0040] Specifically, obtain the metabolic data of the target object under multiple metabolic detection indexes at the current moment, that is, obtain multiple metabolic data. Thus, multiple metabolic nodes can be obtained based on the multiple metabolic data. Furthermore, based on the multiple metabolic nodes, the first metabolic map of the target object at the current moment can be obtained.
[0041] In an embodiment of the present invention, the metabolic data may include basal metabolic data, drug treatment data, and object behavior data. Among them, the basal metabolic data may include the blood glucose detection data, glycated hemoglobin, insulin concentration, body mass index, and blood lipid content. In an embodiment of the present invention, the blood glucose detection data may be continuous glucose monitoring (CGM). The drug treatment data may include insulin injection dose and oral hypoglycemic drug dosage. Object behavior data may include eating habits, exercise conditions, and sleep status. In other words, the metabolic detection indicators may include basal metabolism indicators, drug treatment indicators, and object behavior indicators. Among them, the basal metabolism indicators may include blood glucose indicators, glycated hemoglobin indicators, insulin indicators, body mass index indicators, and blood lipid indicators. Drug treatment indicators may include insulin injection dose indicators and oral hypoglycemic drug dosage indicators. Object behavior indicators may include eating habit indicators, exercise condition indicators, and sleep status indicators.
[0042] In an embodiment of the present invention, determining the first metabolic map of the target object at the current moment according to the metabolic data of the target object at the current moment under multiple metabolic detection indicators may include: obtaining a node set and an edge set according to the metabolic data of the target object at the current moment under multiple metabolic detection indicators; and determining the first metabolic map of the target object at the current moment based on the node set and the edge set.
[0043] Among them, the node set can be understood as a set of nodes obtained based on the metabolic data of the target object at the current moment under multiple metabolic detection indicators. In an embodiment of the present invention, the node set may include multiple metabolic nodes. A single metabolic node corresponds to a metabolic detection indicator. The edge set may be an edge set obtained based on the metabolic data of the target object at the current moment under multiple metabolic detection indicators.
[0044] In an embodiment of the present invention, obtaining a node set and an edge set according to the metabolic data of the target object at the current moment under multiple metabolic detection indicators may include: for the metabolic data of the target object at the current moment under multiple metabolic detection indicators, taking the metabolic data under each metabolic indicator as a separate metabolic node to obtain a node set. For the metabolic data under every two metabolic detection indicators, when the data correlation coefficient between the metabolic data under the two metabolic indicators exceeds the correlation coefficient threshold, connecting the metabolic nodes corresponding to the metabolic data under the two metabolic indicators respectively to obtain an edge set.
[0045] Among them, the data correlation coefficient can be used to characterize the correlation degree between the metabolic data under two metabolic indicators. It can be understood that the larger the data correlation coefficient, the greater the correlation degree between the metabolic data under the two metabolic indicators. Conversely, the smaller the data correlation coefficient, the smaller the correlation degree between the metabolic data under the two metabolic indicators. In the embodiments of the present invention, the correlation coefficient threshold can be set according to actual needs, and no specific limitation is made here. In the embodiments of the present invention, there are various ways to determine the data correlation coefficient between the metabolic data under the two metabolic indicators, and no specific limitation is made here. For example, Pearson correlation coefficient, Spearman rank correlation coefficient, Kendall rank correlation coefficient, and sliding window Pearson correlation coefficient, etc.
[0046] In the embodiments of the present invention, the sliding window Pearson correlation coefficient is adopted to calculate the data correlation coefficient between the metabolic data under the two metabolic indicators at the current moment. The local focusing, dynamic updating and numerical smoothing mechanisms of the sliding window can be realized, so that the dynamic time series correlation coefficient can be accurately stripped of short-term noise interference, thereby accurately reflecting the correlation of the metabolic data under the two metabolic indicators. Optionally, the calculation method using the time series correlation coefficient can be represented by the following formula to calculate the data correlation coefficient between the metabolic data under the two metabolic indicators at the current moment:
[0047]
[0048] Among them, and respectively represent the standardized values of nodes i and j at the kth moment. and respectively represent the means of nodes i and j within the sliding window. ∈ can represent a minimum value to prevent the denominator from being 0. W can represent the length of the sliding window to capture the dynamic change trend of each metabolic indicator in real time. Exemplarily, W can be 7.
[0049] Optionally, the following formula can be used to represent that when the data correlation coefficient between the metabolic data under the two metabolic indicators exceeds the correlation coefficient threshold, the metabolic nodes corresponding to the metabolic data under the two metabolic indicators are connected respectively to obtain an edge set:
[0050]
[0051] Among them, V (t) can represent the node set at time t. Node v i and node v j can respectively represent the nodes corresponding to the metabolic data under the two metabolic indicators in the node set. It can represent the data correlation coefficient between two nodes at time t. τ can be represented as the correlation coefficient threshold. It can be represented as the node v at time t i and node v j between the edges. E (t) It can be represented as the edge set at time t.
[0052] In the embodiments of the present invention, the data correlation coefficient between the nodes corresponding to the metabolic data under two metabolic indicators in the node set at time t can be used as the weight value of the edge between node v i and node v j to characterize the association strength between two different metabolic detection indicators. The association strength between different metabolic detection indicators can be represented by the following formula.
[0053] Optionally, the edge set at time t can be represented by the following formula:
[0054]
[0055] where can be represented as the association strength between two different metabolic detection indicators at time t.
[0056] Optionally, the first metabolic graph of the target object at time t can be represented by the following formula:
[0057] G (t) =(V (t) , E (t) , X (t) )
[0058] where V (t) can represent the node set at time t. E (t) can be represented as the edge set at time t. X (t) can be represented as the node feature matrix.
[0059] In the embodiments of the present invention, the node set may include a first node subset, a second node subset, and a third node subset. Among them, the first node subset may include nodes corresponding to basic metabolic indicators. The second node subset may include nodes corresponding to drug treatment indicators. The third node subset may include nodes corresponding to object behavior indicators.
[0060] Optionally, the first node subset can be represented by the following formula:
[0061]
[0062] where Can be represented as the node corresponding to the blood glucose index at time t. Can be represented as the node corresponding to the glycated hemoglobin index at time t. Can be represented as the node corresponding to the insulin index at time t. Can be represented as the node corresponding to the body mass index at time t. Can be represented as the node corresponding to the blood glucose index at time t.
[0063] Optionally, the second subset of nodes can be represented by the following formula:
[0064]
[0065] Wherein, Can be represented as the node corresponding to the insulin injection dose index at time t. Can be represented as the node corresponding to the oral hypoglycemic drug dosage index at time t.
[0066] Optionally, the third subset of nodes can be represented by the following formula:
[0067]
[0068] Wherein, Can be represented as the node corresponding to the eating habit index at time t. Can be represented as the node corresponding to the exercise condition index at time t. Can be represented as the node corresponding to the sleep state index at time t.
[0069] Based on this, optionally, the node set can be represented by the following formula:
[0070] V (t) =V meta ∪V med ∪V behav
[0071] Wherein, V meta Can represent the first subset of nodes. V med Can represent the second subset of nodes. V behav Can represent the third subset of nodes. V (t) Can be represented as the node set.
[0072] Optionally, the node feature matrix at time t can be represented by the following formula:
[0073]
[0074] Wherein, Can be represented as the standardized eigenvalue of continuous blood glucose monitoring under the blood glucose index at time t. It can be expressed as the standardized characteristic value of glycated hemoglobin under the glycated hemoglobin index at time t. It can be expressed as the standardized characteristic value of insulin under the insulin index at time t. It can be expressed as the standardized characteristic value of insulin injection dose under the insulin injection dose index at time t. It can be expressed as the standardized characteristic value of oral hypoglycemic drug dosage under the oral hypoglycemic drug dosage index at time t.
[0075] Optionally, the standardized characteristic value of metabolic data under the metabolic detection index at time t can be calculated by the following formula:
[0076]
[0077] Where is the standardized value of the j-th metabolic detection index at time t, ∈ is a minimum constant to prevent division by zero anomaly. min(X j ) can represent the minimum value in the metabolic detection index. max(X j ) can represent the maximum value in the metabolic detection index.
[0078] S120. Input the first metabolic graph into a pre-trained feature extraction model to obtain the first node feature data of each metabolic node in the first metabolic graph.
[0079] Among them, the feature extraction model can be understood as a model for extracting the node feature data of each metabolic node in the first metabolic graph. In the embodiments of the present invention, the pre-trained feature extraction model can be a model obtained by training an existing artificial intelligence model. The first node feature data can be understood as the node feature data of the metabolic nodes in the first metabolic graph.
[0080] Specifically, input the first metabolic graph into a pre-trained feature extraction model. Thus, the node feature data of each metabolic node in the first metabolic graph can be extracted by the feature extraction model, that is, the first node feature data of each metabolic node in the first metabolic graph can be obtained, so as to realize relatively fast extraction of the node feature data of each metabolic node in the first metabolic graph.
[0081] S130. Input each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0082] Among them, the pre-trained risk prediction model can be used to determine the diabetes risk level of the target object at the next moment from the current moment. In the embodiments of the present invention, the pre-trained risk prediction model can be a model obtained by training an existing artificial intelligence model. It should be noted that the artificial intelligence model corresponding to the risk prediction model and the artificial intelligence model corresponding to the feature extraction model can be the same or different. The diabetes risk level can be used to characterize the severity of diabetes. Exemplarily, the diabetes risk level can include a high risk level, a medium risk level, and a low risk level. In the embodiments of the present invention, the diabetes risk level can be represented by at least one of text, numerical value, and image.
[0083] Specifically, input each of the first node feature data into the pre-trained risk prediction model. Through the analysis of each of the first node feature data by the risk prediction model, an analysis result is obtained, that is, the diabetes risk level of the target object at the next moment is obtained, which is convenient and fast for prediction. Without using professional medical equipment for detection, the diabetes risk level of the target object can be detected.
[0084] The technical solution of the embodiments of the present invention is to determine the first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment. The first metabolic map includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators. By dynamically constructing the metabolic map at the current moment, the metabolic data corresponding to the metabolic indicators at the current moment can be accurately reflected. Input the first metabolic map into the pre-trained feature extraction model to obtain the first node feature data of each of the metabolic nodes in the first metabolic map, and the feature data of the nodes can be quickly extracted. Then, input each of the first node feature data into the pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment, realizing a relatively convenient and accurate prediction of the diabetes risk level of the target object.
[0085] Figure 2The flowchart of a diabetes risk prediction method provided by an embodiment of the present invention. Optionally, on the basis of the foregoing embodiment, the diabetes risk prediction method implemented by the present invention further includes: obtaining a first sample set, where the first sample set includes first sample data and a first expected output result corresponding to the first sample. The first sample data is a second metabolic map of the target object at a first historical moment. The second metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the first historical moment. The first expected output result is the second node feature data of each metabolic node in the second metabolic map; inputting the first sample data into a pre-constructed first initial network model to obtain a first actual output result corresponding to the first sample data; where the first initial network model is constructed based on a dynamic graph attention network, and the dynamic graph attention network includes at least two layers of dynamic graph attention layers; training the first initial network model based on the first actual output result and the first expected output result to obtain the trained feature extraction model. Among them, the same or similar technical features as those in the above embodiment will not be described in detail here. As Figure 2 shown, the method of this embodiment specifically includes:
[0086] S210. Obtain a first sample set, where the first sample set includes first sample data and a first expected output result corresponding to the first sample.
[0087] Among them, the first sample set can be understood as a sample set for model training of the first initial network model. In the embodiment of the present invention, the first sample set may include first sample data and a first expected output result corresponding to the first sample data. In practical applications, the number of the first sample data in the first sample set is multiple. The first sample data can be understood as model input data for training the first initial network model. The first expected output result can be understood as the output result expected to be obtained by inputting the first sample data into the first initial network model. In the embodiment of the present invention, the first sample data may be a second metabolic map of the target object at a first historical moment. Among them, the second metabolic map can be understood as the metabolic map of the target object at the first historical moment. The first historical moment can be set according to actual needs and will not be specifically limited here. The second metabolic map can be obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the first historical moment. The first expected output result may be the second node feature data of each metabolic node in the second metabolic map. The second node feature data can be understood as the node feature data of each metabolic node in the second metabolic map.
[0088] In the embodiments of the present invention, there are various ways to obtain the first sample set, which are not specifically limited herein. For example, it may be to determine a target database for storing the first sample set; thus, the first sample set can be obtained from the target database. Alternatively, it may be to use a sample generation model to simulate and generate a plurality of first sample data and corresponding first expected output results for each of the first sample data to obtain the first sample set.
[0089] S220. Input the first sample data into a pre-constructed first initial network model to obtain a first actual output result corresponding to the first sample data.
[0090] Among them, the first initial network model can be understood as an initial network model pre-constructed for training to obtain a feature extraction model. In the embodiments of the present invention, the first initial network model can be constructed based on a dynamic graph attention network. In the embodiments of the present invention, constructing the first initial network model based on the dynamic graph attention network can accurately extract and characterize the spatio-temporal correlation features between each metabolic node in the first metabolic graph of diabetic patients. Compared with the technical problem that existing temporal deep learning methods cannot effectively capture the complex interaction structure between multiple variables, the dynamic graph attention network in the embodiments of the present invention can accurately identify the key variables of the patient's risk change and their spatio-temporal interaction, thereby improving the prediction performance and interpretability of the model.
[0091] Optionally, the dynamic graph attention network includes at least two layers of dynamic graph attention layers. In the embodiments of the invention, the connection mode of the multiple dynamic graph attention layers of the dynamic graph attention network is in series connection. In the embodiments of the present invention, each layer of the dynamic graph attention layer adopts a spatio-temporal attention mechanism to accurately capture the dynamic features of each metabolic node in the first metabolic graph and their spatio-temporal interaction relationship with adjacent nodes. The first actual output result can be understood as the actual output result obtained after inputting the first sample data into the first initial network model.
[0092] Specifically, inputting the first sample data into a pre-constructed first initial network model means inputting the second metabolic graph of the target object at the first historical moment into the first initial network model. Thus, the hidden state features of each metabolic node in the second metabolic graph, that is, node feature data, can be extracted through the first initial network model, that is, a first actual output result corresponding to the first sample data is obtained.
[0093] In the embodiments of the present invention, extracting the hidden state features of each metabolic node in the second metabolic graph through the first initial network model may include: extracting the hidden state features of each metabolic node in the second metabolic graph through multiple serially connected dynamic graph attention layers in the dynamic graph attention network.
[0094] Specifically, the hidden state features of each metabolic node in the second metabolic graph can be extracted through the following steps: Extraction is carried out as follows:
[0095] Step 1: Initial node feature mapping. That is, for the metabolic nodes in the second metabolic graph First, a linear mapping can be used to perform feature transformation on the node features of the metabolic nodes in the second metabolic graph to generate an initial node feature vector (see Figure 3 , where the dynamic graph G in the figure (t) represents the second metabolic graph).
[0096] Optionally, the initial node feature vector can be expressed by the following formula:
[0097]
[0098] Where can represent the node feature (normalized eigenvalue) of metabolic node i in the second metabolic graph at time t. W init and b init can respectively represent the network-trainable weight matrix and bias vector.
[0099] Step 2: In the l-th layer of the dynamic graph attention layer in the dynamic graph attention network, the node hidden state of the metabolic nodes in the second metabolic graph at the L-th layer can be obtained in the following way (see Figure 4 ):
[0100]
[0101] Where can represent the node hidden state of the metabolic nodes in the second metabolic graph at the L-th layer. N(i) can represent the set of neighbor nodes of node i. can represent the network parameter of the -th layer. Mish can represent a non-linear activation function, and its expression is: Mish(x) = x tanh(ln(1 + e x )) can represent the attention coefficient.
[0102] In the invention embodiment, through the spatio-temporal attention mechanism, the hidden state of each metabolic node can accurately focus on the neighbor nodes most closely related to its metabolic changes, so as to realize the accurate dynamic modeling of the relationships between nodes in the metabolic graph.
[0103] Optionally, the node hidden state output matrix of the metabolic nodes in the second metabolic graph at the first historical moment can be expressed by the following formula:
[0104]
[0105] Among them, can represent the node hidden state matrix of the |V (t) |th metabolic node in the second metabolic graph at time t on the Lth layer of L.
[0106] Exemplarily, the dynamic graph attention network in the embodiments of the present invention is composed of three layers of dynamic graph attention layers connected in series. Each layer integrates the spatio-temporal attention mechanism specially designed by the present invention to efficiently extract the complex interaction features evolving over time among the nodes in the metabolic graph of diabetic patients. The advantages of doing so are as follows: enhancing the multi-order aggregation ability of structural information, that is, the first layer mainly captures the local interaction between a node and its first-order neighbors (such as ); the second layer can perceive second-order relationships (such as "yesterday's exercise volume → insulin dose → blood glucose change"); the third layer further explores the potential dependence paths across multiple hops (such as "long-term sleep quality change affects insulin sensitivity"). This multi-order propagation mechanism helps to capture the delayed feedback and cross-factor associations in the diabetic metabolism process. In addition, it can also improve the non-linear expression ability of the model. That is, by introducing more complex non-linear combination functions through a multi-layer structure, the model has a stronger expression ability and can accurately model the non-linear and highly asynchronous metabolic evolution process. Compared with shallow networks, the three-layer structure can effectively improve the feature discrimination ability without introducing redundant calculations. It can effectively control the balance between training stability and overfitting risk. Therefore, in the embodiments of the present invention, a first initial network model is constructed by adopting a structure of three layers of dynamic graph attention layers, which can fully integrate the advantages among the depth of structural modeling, expression ability, and training stability, and significantly enhance the accuracy and individual prediction ability of diabetic metabolism dynamic modeling.
[0107] S230. Train the first initial network model based on the first actual output result and the first expected output result to obtain the trained feature extraction model.
[0108] Specifically, based on the first actual output result and the first expected output result, determine the function value of a preset loss function; thereby, the network parameters of the first initial network model can be adjusted according to the function value; taking the convergence of the preset loss function as the training goal, train the first initial network model to obtain the trained feature extraction model. In the embodiments of the present invention, the loss function is preset and used to measure whether the output value of the determined initial network model after training is accurate. In the embodiments of the present invention, the loss function can be set according to actual needs and is not specifically limited herein. For example, the mean error function, the mean square error function, the logarithmic cosine loss function, etc.
[0109] In an embodiment of the present invention, the preset loss function reaching convergence is used as the training objective to train the initial network model. Specifically, the training error of the loss function can be used as the condition for detecting whether the loss function has reached convergence at present. For example, whether the training error is less than a preset error, or whether the error change trend tends to be stable, or whether the current number of iterations is equal to a preset number. If it is detected that the convergence condition is met, such as the training error of the loss function reaching less than the preset error or the error change tending to be stable, it indicates that the training of the feature extraction model is completed, and at this time, the iterative training can be stopped. If it is detected that the current convergence condition is not met, the training sample data can be further obtained to retrain the trained feature extraction model until the training error of the loss function is within the preset range to obtain the trained feature extraction model.
[0110] S240. Determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators.
[0111] S250. Input the first metabolic map into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic map.
[0112] S260. Input each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0113] The technical solution of the embodiment of the present invention realizes the training of the feature extraction model by obtaining a first sample set, wherein the first sample set includes first sample data and a first expected output result corresponding to the first sample. The first sample data is a second metabolic map of the target object at a first historical moment, and the second metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the first historical moment. The first expected output result is second node feature data of each metabolic node in the second metabolic map; inputting the first sample data into a pre-constructed first initial network model to obtain a first actual output result corresponding to the first sample data; wherein, the first initial network model is constructed based on a dynamic graph attention network, and the dynamic graph attention network includes at least two layers of dynamic graph attention layers; training the first initial network model based on the first actual output result and the first expected output result to obtain the trained feature extraction model.
[0114] Figure 5The flowchart of a diabetes risk prediction method provided by an embodiment of the present invention. Optionally, on the basis of the foregoing embodiment, the diabetes risk prediction method implemented by the present invention further includes: obtaining a second sample set, where the second sample set includes second sample data and a second expected output result corresponding to the second sample. The second sample data is the third node feature data of each metabolic node in the third metabolic map of the target object at the second historical moment. The third metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indexes at the second historical moment. The second expected output result is the diabetes risk level of the target object at the next moment after the second historical moment. Inputting the second sample data into a pre-constructed second initial network model to obtain a second actual output result corresponding to the second sample data. The second initial network model is constructed based on a preset encoder and a multi-layer perceptron connected to the preset encoder. Training the second initial network model based on the second actual output result and the second expected output result to obtain the trained risk prediction model. Technical features that are the same as or similar to those in the above embodiments will not be described in detail herein. As Figure 5 shown, the method of this embodiment specifically includes:
[0115] S310. Obtain a second sample set, where the second sample set includes second sample data and a second expected output result corresponding to the second sample.
[0116] Among them, the second sample set can be understood as a sample set for model training of the second initial network model. In the embodiments of the present invention, the second sample set may include second sample data and second expected output results corresponding to the second samples. In practical applications, the number of the second sample data in the second sample set is multiple. The second sample data can be understood as model input data for training the second initial network model. The second expected output result can be understood as the output result expected to be obtained by inputting the second sample data into the second initial network model. In the embodiments of the present invention, the second sample data is the third node feature data of each metabolic node in the third metabolic map of the target object at the second historical moment. Among them, the second historical moment can be set according to actual needs and is not specifically limited herein. The first historical moment and the second historical moment may be the same or different. The third metabolic map can be understood as the metabolic map of the target object at the second historical moment. The third node feature data can be understood as the node feature data of each metabolic node in the third metabolic map. In the embodiments of the present invention, the third metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the second historical moment. The second expected output result may be the diabetes risk level of the target object at the next moment after the second historical moment.
[0117] In the embodiments of the present invention, there are various ways to obtain the second sample set, which are not specifically limited herein. For example, it may be to determine a target database for storing the second sample set; thus, the second sample set can be obtained from the target database. Or, it may be to use a sample generation model to simulate and generate multiple second sample data and first expected output results corresponding to each second sample data to obtain the second sample set.
[0118] S320. Input the second sample data into a pre-constructed second initial network model to obtain a second actual output result corresponding to the second sample data.
[0119] Among them, the first initial network model can be understood as an initial network model pre-constructed for training a risk prediction model. In the embodiments of the present invention, the second initial network model may be constructed based on a preset encoder and a multi-layer perceptron connected to the preset encoder. The second initial network model constructed based on the preset encoder and the multi-layer perceptron connected to the preset encoder can update the prediction result in real time according to the individual metabolic trajectory of the patient, effectively solving the technical problems in the related art that the risk prediction model has weak individual risk expression ability and is difficult to adapt to the characteristics of different patients, and can significantly improve the individual accurate prediction ability of the model, so as to accurately predict the diabetes risk level of the patient at a future moment.
[0120] Optionally, the preset encoder includes at least two preset encoder layers with the same structure. As Figure 6 shown, the preset encoder layer may include a self-attention sublayer and a feed-forward neural network sublayer connected to the self-attention sublayer.
[0121] Specifically, input the second sample data into a pre-constructed second initial network model, and input the third node feature data of each metabolic node in the third metabolic map of the target object at the second historical moment into the second initial network model. Thus, the diabetes risk level of the target object at the next moment at the second historical moment can be obtained through the second initial network model, that is, the second actual output result corresponding to the second sample data is obtained.
[0122] In the embodiment of the present invention, the diabetes risk level of the target object at the next moment at the second historical moment can be obtained through the second initial network model based on the following steps:
[0123] Step 1: Construct an input feature sequence, that is, construct the node hidden state sequence output by the dynamic graph attention network into the input sequence of the second initial network model.
[0124] Optionally, the input sequence of the second initial network model can be represented in the following manner:
[0125]
[0126] where H (t) can be represented as the output node hidden state matrix of the dynamic graph attention network at the t-th moment. T is the time window length of the encoder input to the second initial network model, which is the historical sequence length that can be used to predict the diabetes risk state at the next moment.
[0127] In the embodiment of the present invention, to meet the input requirements of the encoder in the second initial network model, the above sequence can be flattened to obtain an input feature matrix:
[0128]
[0129] Step 2: Add positional encoding. Since the second initial network model (Transformer model) itself does not have the ability to perceive time series, the positional encoding (PositionalEncoding, PE) method is introduced to express the position information of each moment feature in the input sequence.
[0130] It should be noted that the positional encoding PE is defined as follows:
[0131]
[0132] Among them, pos can be expressed as a time sequence position index, and its value ranges from 1, 2, …, T. c can be expressed as the index of the feature dimension, and its value range is d model can represent the dimension of the input Transformer feature, d model = |V (t) | · d. d can represent the dimension of the node hidden state feature. That is, d model can be understood as the total input dimension of the Transformer module at time t, which can be equal to the number of features multiplied by the dimension of each feature.
[0133] Optionally, the model input of the second initial network model can be expressed by the following formula:
[0134]
[0135] Among them, can be expressed as the feature at time t. PE can be expressed as the position encoding of the feature at time t.
[0136] Step 3: Process the input feature sequence through the second initial network model.
[0137] First, in each encoder layer, the input feature matrix is first processed through the self-attention sublayer. Specifically, the calculation methods of the query (Query), key (Key), and value (Value) can be defined by the following formula:
[0138]
[0139] Among them, and respectively represent the weight matrices in the Layer-th encoding layer. is the input feature matrix of the layer-th layer in the encoder of the second initial network model. Exemplarily, if layer = 1, that is, the first layer encoder of the second initial network model, then is the result after adding the position encoding to the input sequence, that is represents the original input. If layer > 1, then is the output result of the previous layer Transformer encoder (the layer - 1 layer).
[0140] After that, the sub-attention weights can be calculated by the following formula:
[0141]
[0142] Thus, the output of the self-attention sublayer can be obtained, that is
[0143] Then, residual connection and layer normalization are performed through the following formula:
[0144]
[0145] Among them, can be represented as the input tensor of the current layer (the output of the previous layer or the initial input sequence). can be represented as the intermediate output after the current layer is processed by self-attention or a feed-forward network (FFN). LayerNorm(·) represents the layer normalization function, which normalizes the input.
[0146] Secondly, non-linear feature transformation can be performed on the output of the self-attention sublayer based on the feed-forward neural network sublayer. Optionally, the non-linear feature transformation of the output of the self-attention sublayer based on the feed-forward neural network sublayer can be represented by the following formula:
[0147]
[0148] Among them, The output of the self-attention sublayer. and can represent the weight matrix and bias vector of the first fully connected (linear transformation) layer respectively. and can represent the weight matrix and bias vector of the second fully connected (linear transformation) layer respectively. max(0,·) can represent the ReLU (Rectified Linear Unit) activation function, introducing non-linearity.
[0149] After that, residual connection and layer normalization can be performed. Optionally, the residual connection and layer normalization are represented by the following formula:
[0150]
[0151] Among them, can be represented as the intermediate output after the current layer is processed by the self-attention sublayer. can be represented as the intermediate output after the current layer is processed by the feed-forward neural network sublayer. can be represented as the final output of the current layer, which will be passed to the next layer or used as the final result. LayerNorm(·) is the layer normalization function, which normalizes the input.
[0152] Thus, the output features of the preset encoder of the second initial network model can be obtained:
[0153]
[0154] Step 4: Output of risk prediction probability. Specifically, the feature vector output by the preset encoder of the second initial network model can be input into a multi-layer perceptron (MLP) to predict the diabetes risk of a diabetes patient at the next moment of the second historical moment. Among them, the sigmoid function can be used to normalize the output data between (0, 1) to represent the prediction probability of the diabetes risk state of the patient at the next moment, so as to obtain the diabetes risk level of the diabetes patient at the next moment of the second historical moment.
[0155] It should be noted that in the embodiment of the present invention, the second initial network model can be a Transformer model. Through the Transformer model, the dynamic trend of the long-term metabolism evolution of diabetes patients can be fully modeled, the future risk state of individual patients can be accurately predicted, effectively making up for the deficiencies of the existing technology models in long-term dependence relationship modeling and accurate risk prediction, and significantly improving the intelligence and accuracy of diabetes patient management.
[0156] S330: Train the second initial network model based on the second actual output result and the second expected output result to obtain the trained risk prediction model.
[0157] Specifically, based on the second actual output result and the second expected output result, determine the function value of the preset loss function; thus, the network parameters of the second initial network model can be adjusted according to the function value; taking the preset loss function reaching convergence as the training goal, train the second initial network model to obtain the trained feature extraction model. In the embodiment of the present invention, the loss function is preset and is used to measure whether the output value of the determined trained initial network model is accurate. In the embodiment of the present invention, the loss function can be set according to actual needs, and specific limitations are not made here. For example, the mean error function, the mean square error function, the logarithmic cosine loss function, etc.
[0158] In an embodiment of the present invention, the preset loss function reaching convergence is used as the training objective to train the initial network model. Specifically, the training error of the loss function can be used as the condition for detecting whether the loss function has reached convergence currently. For example, whether the training error is less than a preset error, or whether the error change trend tends to be stable, or whether the current number of iterations is equal to a preset number. If it is detected that the convergence condition is met, such as the training error of the loss function reaching less than the preset error or the error change tending to be stable, it indicates that the risk prediction model training is completed, and at this time, the iterative training can be stopped. If it is detected that the current convergence condition is not met, the training sample data can be further obtained to retrain the trained risk prediction model until the training error of the loss function is within the preset range to obtain a trained risk prediction model.
[0159] S340. Determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes multiple metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators.
[0160] S350. Input the first metabolic map into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic map.
[0161] S360. Input each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0162] The technical solution of the embodiment of the present invention realizes the training of the risk prediction model by obtaining a second sample set, where the second sample set includes second sample data and a second expected output result corresponding to the second sample. The second sample data is the third node feature data of each metabolic node in a third metabolic map of the target object at a second historical moment. The third metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the second historical moment. The second expected output result is the diabetes risk level of the target object at the next moment after the second historical moment; inputting the second sample data into a pre-constructed second initial network model to obtain a second actual output result corresponding to the second sample data; wherein, the second initial network model is constructed based on a preset encoder and a multi-layer perceptron connected to the preset encoder; training the second initial network model based on the second actual output result and the second expected output result to obtain the trained risk prediction model.
[0163] Figure 7The structural schematic diagram of a diabetes risk prediction device provided by an embodiment of the present invention is as follows. As Figure 7 shown, the device includes: a metabolic graph generation module 410, a feature extraction module 420, and a risk prediction module 430. Among them, the metabolic graph generation module 410 is configured to determine a first metabolic graph of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic graph includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators; the feature extraction module 420 is configured to input the first metabolic graph into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic graph; the risk prediction module 430 is configured to input each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
[0164] In the technical solution of the embodiment of the present invention, the metabolic graph generation module 410 determines the first metabolic graph of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment. The first metabolic graph includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators. By dynamically constructing the metabolic graph at the current moment, the metabolic data corresponding to the metabolic indicators at the current moment can be accurately reflected. The feature extraction module 420 inputs the first metabolic graph into a pre-trained feature extraction model to obtain the first node feature data of each of the metabolic nodes in the first metabolic graph, and the feature data of the nodes can be quickly extracted. Then, the risk prediction module 430 inputs each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment, realizing a relatively convenient and accurate prediction of the diabetes risk level of the target object.
[0165] Optionally, the metabolic graph generation module 410 is configured to obtain a node set and an edge set according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; and determine the first metabolic graph of the target object at the current moment based on the node set and the edge set.
[0166] Optionally, the metabolic graph generation module 410 is configured to, for the metabolic data of the target object under multiple metabolic detection indicators at the current moment, use the metabolic data under each metabolic indicator as a separate metabolic node to obtain a node set; for the metabolic data under every two metabolic detection indicators, when the data correlation coefficient between the metabolic data under the two metabolic indicators exceeds the correlation coefficient threshold, connect the metabolic nodes corresponding to the metabolic data under the two metabolic indicators to obtain an edge set.
[0167] Optionally, the diabetes risk prediction device further includes a first model training module. The first model training module is configured to obtain a first sample set, where the first sample set includes first sample data and a first expected output result corresponding to the first sample. The first sample data is a second metabolic map of the target object at a first historical moment, and the second metabolic map is obtained based on the metabolic data of the target object at the first historical moment under multiple metabolic detection indexes. The first expected output result is the second node feature data of each metabolic node in the second metabolic map. Input the first sample data into a pre-constructed first initial network model to obtain a first actual output result corresponding to the first sample data. The first initial network model is constructed based on a dynamic graph attention network, and the dynamic graph attention network includes at least two layers of dynamic graph attention layers. Train the first initial network model based on the first actual output result and the first expected output result to obtain the trained feature extraction model.
[0168] Optionally, the diabetes risk prediction device further includes a second model training module. The second model training module is configured to obtain a second sample set, where the second sample set includes second sample data and a second expected output result corresponding to the second sample. The second sample data is the third node feature data of each metabolic node in a third metabolic map of the target object at a second historical moment, and the third metabolic map is obtained based on the metabolic data of the target object at the second historical moment under multiple metabolic detection indexes. The second expected output result is the diabetes risk level of the target object at the next moment after the second historical moment. Input the second sample data into a pre-constructed second initial network model to obtain a second actual output result corresponding to the second sample data. The second initial network model is constructed based on a preset encoder and a multi-layer perceptron connected to the preset encoder. Train the second initial network model based on the second actual output result and the second expected output result to obtain the trained risk prediction model.
[0169] Optionally, the preset encoder includes at least two preset encoder layers with the same structure, and each preset encoder layer includes a self-attention sub-layer and a feed-forward neural network sub-layer connected to the self-attention sub-layer.
[0170] Optionally, the metabolic data includes basal metabolic data, drug treatment data, and object behavior data. The basal metabolic data includes blood glucose detection data, glycated hemoglobin, insulin concentration, body mass index, and blood lipid content. The drug treatment data includes insulin injection dose and oral hypoglycemic drug dosage. The object behavior data includes eating habits, exercise conditions, and sleep status.
[0171] The diabetes risk prediction device provided by the embodiments of the present invention can execute the diabetes risk prediction method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0172] It should be noted that the various units and modules included in the above diabetes risk prediction device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.
[0173] Figure 8 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0174] As Figure 8 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0175] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0176] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the diabetes risk prediction method.
[0177] In some embodiments, the diabetes risk prediction method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the diabetes risk prediction method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the diabetes risk prediction method by any other suitable means (e.g., by means of firmware).
[0178] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0179] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0180] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0181] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0182] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0183] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs that run on respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0184] It should be understood that various forms of processes shown above can be used, with steps reordered, added or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0185] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for predicting diabetes risk, characterized in that, Including: Determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes a plurality of metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators; Input the first metabolic map into a pre-trained feature extraction model to obtain first node feature data of each of the metabolic nodes in the first metabolic map; Input each of the first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
2. The method according to claim 1, wherein The determining the first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment includes: Obtain a node set and an edge set according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; Determine the first metabolic map of the target object at the current moment based on the node set and the edge set.
3. The method according to claim 2, characterized in that The obtaining a node set and an edge set according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment includes: For the metabolic data of the target object under multiple metabolic detection indicators at the current moment, take the metabolic data under each metabolic indicator as a separate metabolic node to obtain a node set; For the metabolic data under every two metabolic detection indicators, when the data correlation coefficient between the metabolic data under the two metabolic indicators exceeds the correlation coefficient threshold, connect the metabolic nodes corresponding to the metabolic data under the two metabolic indicators respectively to obtain an edge set.
4. The method according to claim 1, characterized in that The method further includes: Obtain a first sample set, wherein the first sample set includes first sample data and a first expected output result corresponding to the first sample, the first sample data is a second metabolic map of the target object at a first historical moment, the second metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the first historical moment, and the first expected output result is the second node feature data of each metabolic node in the second metabolic map; Input the first sample data into a pre-constructed first initial network model to obtain a first actual output result corresponding to the first sample data; wherein, the first initial network model is constructed based on a dynamic graph attention network, and the dynamic graph attention network includes at least two layers of dynamic graph attention layers; Train the first initial network model based on the first actual output result and the first expected output result to obtain the trained feature extraction model.
5. The method according to claim 1, wherein The method further includes: Obtain a second sample set, where the second sample set includes second sample data and second expected output results corresponding to the second samples. The second sample data is the third node feature data of each metabolic node in the third metabolic map of the target object at the second historical moment. The third metabolic map is obtained based on the metabolic data of the target object under multiple metabolic detection indicators at the second historical moment. The second expected output result is the diabetes risk level of the target object at the next moment after the second historical moment; Input the second sample data into a pre-constructed second initial network model to obtain a second actual output result corresponding to the second sample data; wherein, the second initial network model is constructed based on a preset encoder and a multi-layer perceptron connected to the preset encoder; Train the second initial network model based on the second actual output result and the second expected output result to obtain the trained risk prediction model.
6. The method according to claim 5, wherein The preset encoder includes at least two preset encoder layers with the same structure. The preset encoder layer includes a self-attention sub-layer and a feed-forward neural network sub-layer connected to the self-attention sub-layer.
7. The method according to claim 1, wherein The metabolic data includes basal metabolic data, drug treatment data, and object behavior data. The basal metabolic data includes blood glucose detection data, glycated hemoglobin, insulin concentration, body mass index, and blood lipid content; the drug treatment data includes insulin injection dose and oral hypoglycemic drug dosage; object behavior data includes eating habits, exercise conditions, and sleep status.
8. A diabetes risk prediction device, characterized in that, Includes: A metabolic map generation module, configured to determine a first metabolic map of the target object at the current moment according to the metabolic data of the target object under multiple metabolic detection indicators at the current moment; wherein, the first metabolic map includes multiple metabolic nodes, and the metabolic nodes correspond to the metabolic detection indicators; A feature extraction module, configured to input the first metabolic map into a pre-trained feature extraction model to obtain the first node feature data of each metabolic node in the first metabolic map; A risk prediction module, configured to input each first node feature data into a pre-trained risk prediction model to obtain the diabetes risk level of the target object at the next moment.
9. An electronic device, characterized in that, It is characterized in that The electronic device includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the diabetes risk prediction method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the processor to implement the diabetes risk prediction method according to any one of claims 1-7 when executed.
Citation Information
Cited By
Diabetes risk assessment method and system
CN120977592A