Diabetes Prediction Methods and Systems Integrating Knowledge Graphs and Deep Learning

By integrating knowledge graphs and deep learning, a vector representation of physical examination data and symptom descriptions is constructed. Combining self-attention mechanisms with convolutional neural networks, the problem of insufficient accuracy and interpretability in existing diabetes prediction models is solved, achieving higher accuracy and interpretability in diabetes prediction.

CN115719625BActive Publication Date: 2026-03-06NANJING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing diabetes prediction models only consider patients' physical examination data, resulting in low accuracy and a lack of interpretability. They fail to fully consider the impact of patients' lifestyle habits and symptoms on the prediction results.

Method used

This paper proposes a method that integrates knowledge graphs and deep learning. By constructing an entity vector library of physical examination data and a knowledge graph in the field of diabetes, and combining self-attention mechanism and convolutional neural network, a classification prediction model is built. This model takes into account patient physical examination data and symptom descriptions, and obtains global information and extracts local features.

Benefits of technology

It improves the accuracy and interpretability of diabetes prediction, can extract diagnostic rules from massive amounts of medical data, makes the prediction process closer to actual clinical diagnosis, and takes into account more influencing factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115719625B_ABST
    Figure CN115719625B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for predicting diabetes by integrating knowledge graphs and deep learning. The method constructs an entity vector library of physical examination data, and obtains vector representations of patient physical examination data based on this library, resulting in physical examination data vectors. It then constructs a diabetes domain knowledge graph; based on this knowledge graph, it extracts entities and relationships from patient symptom descriptions and represents them as vectors, obtaining symptom description vectors, and thus a matrix representing the patient's condition; finally, it integrates a self-attention mechanism and a convolutional neural network to construct a classification prediction model, which yields the prediction results. Compared with existing methods, this invention, by simultaneously considering patient physical examination data and symptom descriptions and based on a dual-driven approach of knowledge and data, achieves higher accuracy and interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for predicting diabetes that integrates knowledge graphs and deep learning, belonging to the field of medical information technology. Background Technology

[0002] Diabetes mellitus is a common endocrine and metabolic disease caused by a relative or absolute deficiency of insulin secretion, leading to excessively high blood sugar and resulting in disorders of protein and fat metabolism. Symptoms of diabetes often include polydipsia, polyphagia, polyuria, and weight loss, but the main danger lies in the fact that long-term elevated blood sugar can cause various serious complications, causing enormous damage to organs such as the kidneys, blood vessels, nerves, and eyes, and even endangering life.

[0003] Currently, diabetes cannot be completely cured, but with proper care in the early stages, including lifestyle modifications and adjunctive medication, the risk of diabetic complications can be reduced by 30% to 60%. Therefore, early detection of diabetes is crucial. Medically, diabetes is primarily diagnosed via finger-prick blood sampling, with diagnostic criteria including a fasting blood glucose level ≥7.0 mmol / L or a two-hour post-glucose tolerance test blood glucose level ≥11.1 mmol / L.

[0004] However, with the rapid development of artificial intelligence technology and smart healthcare, researchers have begun to apply AI methods to diabetes prediction. This mainly involves using machine learning or deep learning algorithms to automatically process diabetes data and uncover hidden information to determine whether a patient has diabetes. While existing diabetes classification and prediction models can effectively identify high-risk groups and provide a basis for health management and disease prevention decisions, some shortcomings still exist.

[0005] For example, most current diabetes classification prediction models are based on data-driven methods, which are limited by data quality. Moreover, most models only consider patients' physical examination data and do not take into account the impact of patients' lifestyle habits and their own symptoms on the prediction results.

[0006] Furthermore, classification and prediction models based solely on machine learning or deep learning methods have low interpretability and lack support from external medical expertise. Medical decisions often involve life-threatening risks; entrusting such crucial decisions to machines that cannot provide accountability and lack interpretability is tantamount to shirking responsibility and could potentially lead to catastrophic consequences.

[0007] The above issues are problems that should be considered and addressed in the process of diabetes prediction. Summary of the Invention

[0008] The purpose of this invention is to provide a diabetes prediction method and system that integrates knowledge graphs and deep learning to solve the problems in the prior art that only consider patients' physical examination data, resulting in low accuracy of prediction results and a lack of interpretability.

[0009] The technical solution of this invention is:

[0010] A diabetes prediction method integrating knowledge graphs and deep learning includes the following steps:

[0011] S1. Construct a physical examination data entity vector library, and obtain the vector representation of the patient's physical examination data based on the physical examination data entity vector library to obtain the physical examination data vector.

[0012] S2. Obtain professional literature on diabetes, perform knowledge extraction and fusion, and based on the knowledge representation model TransR, represent all entities and relations in the knowledge graph of the diabetes field as vectors to construct a knowledge graph of the diabetes field.

[0013] S3. Based on the diabetes domain knowledge graph constructed in step S2, extract entities and relationships from the patient's symptom descriptions and represent them as vectors to obtain symptom description vectors, and then obtain the matrix of the patient's own condition.

[0014] S4. Integrate the self-attention mechanism and convolutional neural network to construct a classification prediction model. The prediction result is obtained by the classification prediction model using the physical examination data vector obtained in step S1 and the symptom description vector obtained in step S3.

[0015] Further, in step S1, a physical examination data entity vector library is constructed, specifically as follows:

[0016] S11. Based on the normal range of physical examination indicators as defined in medicine, the test values ​​of the physical examination indicators are divided into several more granular reference ranges, and the corresponding relationships are determined.

[0017] S12. Based on the partitioned reference range, the physical examination indicators, relationships and test values ​​are represented as triples, and the TransH knowledge representation model is used to obtain the physical examination data entity vector library.

[0018] Further, in step S2, professional literature on diabetes is acquired, knowledge extraction and fusion are performed, and based on the knowledge representation model TransR, all entities and relations in the diabetes knowledge graph are represented as vectors to construct a diabetes knowledge graph. Specifically,

[0019] S21. Obtain professional literature in the field of diabetes for constructing knowledge graphs;

[0020] S22. Perform knowledge extraction, including entity extraction and relation extraction. Entity extraction is based on the Bi-Short Memory Network (BiLSTM) and Conditional Random Field (CRF) model to extract diabetes-related entities from professional literature in the field of diabetes obtained in step S21. Relation extraction is to extract the relationships between implicit entities in the text through syntactic analysis and represent them as triples (head entity, relation, tail entity).

[0021] S23. Perform knowledge fusion, integrate and disambiguate the extracted knowledge entities through entity alignment and entity linking, make correctness judgments through relational reasoning, and then update the entities and relations in the triples;

[0022] S24. Perform knowledge representation: Based on the knowledge representation model TransR, represent the entities and relations in the diabetes domain knowledge graph as vectors to obtain the constructed diabetes domain knowledge graph.

[0023] Furthermore, in step S3, a matrix representing the patient's own condition is obtained, specifically as follows:

[0024] S31. Determine whether the patient has undergone a physical examination and obtained physical examination data. If yes, proceed to step S32; otherwise, proceed to step S33.

[0025] S32. When obtaining physical examination data during a patient's physical examination, the obtained symptom description vector is concatenated with the patient's physical examination data vector obtained in step S1 to form a matrix describing the patient's own condition.

[0026] S33. When the patient has not undergone a physical examination and no physical examination data is obtained, the obtained symptom description vectors are concatenated separately to form a matrix describing the patient's own condition.

[0027] Further, in step S4, a classification prediction model is constructed by integrating the self-attention mechanism and the convolutional neural network. The classification prediction model includes an input layer, a self-attention layer, a convolutional layer, a fully connected layer, a softmax layer, and an output layer. Specifically,

[0028] S41. The input layer of the classification prediction model inputs the matrix of the patient's own condition into the self-attention layer. The self-attention mechanism of the self-attention layer mines the mutual influence relationship between the patient's physical examination data and symptom description to obtain the global information matrix.

[0029] S42. Input the acquired global information matrix into the convolutional layer to extract local features and obtain the final representation vector of the patient's physical examination data and symptom description;

[0030] S43. The final representation vector of the patient's physical examination data and symptom description obtained in step S42 is transformed by a fully connected layer to obtain the score vector s of whether the patient has diabetes.

[0031] S44. Input the score vector s into the Softmax layer. The score vector s is calculated by the Softmax layer to obtain the probability distribution of whether the patient has diabetes. Based on the probability distribution, the prediction result of whether the patient has diabetes is obtained and the prediction result is output by the output layer.

[0032] Furthermore, in step S41, the self-attention mechanism of the self-attention layer is used to mine the interaction between patient physical examination data and symptom descriptions to obtain global information. Specifically,

[0033] S411. Define three weight matrices: w q ∈R q×k w k ∈R q×k w v ∈R v×k According to the formula in, The column vectors representing the patient's condition matrix are linearly mapped to three different spaces to obtain the query vector q. i Key vector k i Sum vector v i ;

[0034] S412, Query vector q i Key vector k i Sum vector v i The query matrix Q, key matrix K, and value matrix V are merged respectively. The global information matrix obtained by the self-attention mechanism, i.e., the output matrix, is then calculated according to the following formula:

[0035]

[0036] Where softmax() is the activation function, D k For query vector q i Dimensions.

[0037] Further, in step S42, local feature extraction is performed by the convolutional layer to obtain the final representation vector of the patient's physical examination data and symptom description, specifically,

[0038] S421. Assume the convolutional filter W of the convolutional layer... f ∈R h×d Where R is the vector space, h is the size of the convolution filter window, and d represents the dimension of the input vector, representing the local features from row i to row i+k-1 of the input. That is, the vectors of the list from i to i+h-1 in the global information matrix, the i-th eigenvalue of the feature submatrix extracted by the convolution filter is represented as:

[0039]

[0040] Where f(·) is the nonlinear activation function relu(·), and b is the bias value;

[0041] S422. Obtain the output matrix E from the self-attention layer. attn The local feature matrix is:

[0042] C = [c1, c2, c3, ..., c i ,…,c m-h+1 ]

[0043] Where m is E attn The number of column vectors, where h is the size of the convolution filter window;

[0044] S423. Perform max pooling on the local feature matrix C to obtain the final representation vector of the patient's physical examination data and symptom description.

[0045] Further, in step S44, the score vector s is calculated via a Softmax layer to obtain the probability distribution of whether the patient has diabetes, i.e., the probability that the patient has diabetes and does not have diabetes:

[0046]

[0047] Wherein, exp(s i ), exp(s j ) are the base-e exponents of the i-th and j-th dimensions of the score vector s, respectively, where i and j represent the dimensions of the score vector s.

[0048] A system employing a diabetes prediction method integrating knowledge graphs and deep learning as described above includes a physical examination data vector representation module, a knowledge graph construction module, a self-condition matrix generation module, and a classification prediction module.

[0049] Physical examination data vector representation module: Constructs a physical examination data entity vector library, and obtains the vector representation of the patient's physical examination data, namely the physical examination data vector, based on the physical examination data entity vector library;

[0050] Knowledge graph construction module: Acquire professional literature on diabetes, perform knowledge extraction and fusion, and based on the knowledge representation model TransR, represent all entities and relations in the knowledge graph of the diabetes field as vectors to construct a knowledge graph of the diabetes field;

[0051] Self-condition matrix generation module: Based on the constructed knowledge graph in the diabetes domain, it extracts entities and relationships from the patient's symptom descriptions and represents them as vectors to obtain symptom description vectors, and then obtains the matrix of the patient's self-condition.

[0052] Classification prediction module: It integrates self-attention mechanism and convolutional neural network to build a classification prediction model. The prediction result is obtained by using the matrix of the patient's own condition through the constructed classification prediction model.

[0053] The beneficial effects of this invention are as follows: Compared with existing methods, this diabetes prediction method and system, which integrates knowledge graphs and deep learning, can extract more information from the data and achieve higher accuracy in prediction results by simultaneously considering patient physical examination data and symptom descriptions, introducing a self-attention mechanism to acquire global information, and using convolutional neural networks to extract local features. This method, driven by both data and knowledge, can mine diagnostic rules from massive amounts of medical data. Furthermore, by introducing external medical expertise, the prediction process is closer to actual clinical diagnosis, exhibiting higher interpretability. It addresses the problem of incomplete consideration of influencing factors in existing diabetes prediction processes, leading to lower accuracy and interpretability of prediction results. Attached Figure Description

[0054] Figure 1 This is a flowchart illustrating the diabetes prediction method that integrates knowledge graphs and deep learning according to an embodiment of the present invention.

[0055] Figure 2 This is an illustrative diagram illustrating the vector representation of the physical examination data obtained in the embodiment.

[0056] Figure 3 This is an illustrative diagram illustrating the construction of a knowledge graph in the field of diabetes in this embodiment.

[0057] Figure 4 This is a schematic diagram illustrating the classification prediction model in the embodiment.

[0058] Figure 5 This is an illustrative diagram illustrating the diabetes prediction system that integrates knowledge graphs and deep learning according to an embodiment of the present invention. Detailed Implementation

[0059] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0060] Example

[0061] A diabetes prediction method that integrates knowledge graphs and deep learning, such as Figure 1 This includes the following steps:

[0062] S1. Construct a physical examination data entity vector library, and obtain the vector representation of the patient's physical examination data based on the physical examination data entity vector library to obtain the physical examination data vector.

[0063] In step S1, a physical examination data entity vector library is constructed, such as... Figure 2 Specifically,

[0064] S11. Based on the medically defined normal range of physical examination indicators, the test values ​​of the physical examination indicators are divided into several more granular reference ranges, and the corresponding relationships are determined. In one example, it is divided into seven reference ranges, and the corresponding relationships are determined as severely low, generally low, slightly low, normal, slightly high, generally high, and severely high.

[0065] S12. Based on the reference range of the division, the physical examination indicators, relationships and test values ​​are represented in the form of triplets, such as (triglycerides, 0.44 mmol / L, slightly low). The physical examination data entity vector library is obtained based on the knowledge representation model TransH.

[0066] S2. Obtain professional literature on diabetes, perform knowledge extraction and fusion, and based on the knowledge representation model TransR, represent all entities and relations in the diabetes knowledge graph as vectors to construct a diabetes knowledge graph; such as Figure 3 .

[0067] S21. Obtain professional literature in the field of diabetes for constructing knowledge graphs;

[0068] S22. Perform knowledge extraction, including entity extraction and relation extraction. Entity extraction is based on the Bi-Short Memory Network (BiLSTM) and Conditional Random Field (CRF) model to extract diabetes-related entities from professional literature in the field of diabetes obtained in step S21. Relation extraction is based on the syntactic analysis of the text to extract the relationships between the implicit entities in the text and represent them in the form of triples (head entity, relation, tail entity), such as (diabetes, symptoms, polyphagia).

[0069] S23. Perform knowledge fusion, integrate and disambiguate the extracted knowledge entities through entity alignment and entity linking, make correctness judgments through relational reasoning, and then update the entities and relations in the triples;

[0070] S24. Perform knowledge representation: Based on the knowledge representation model TransR, represent the entities and relations in the diabetes domain knowledge graph as vectors to obtain the constructed diabetes domain knowledge graph.

[0071] S3. Based on the diabetes domain knowledge graph constructed in step S2, extract entities and relationships from the patient's symptom descriptions and represent them as vectors to obtain symptom description vectors, and then obtain the matrix of the patient's own condition.

[0072] In step S3, the matrix E representing the patient's own condition is then obtained. k×m Specifically,

[0073] S31. Determine whether the patient has undergone a physical examination and obtained physical examination data. If yes, proceed to step S32; otherwise, proceed to step S33.

[0074] S32. When obtaining physical examination data during a patient's physical examination, the obtained symptom description vector is concatenated with the patient's physical examination data vector obtained in step S1 to form a matrix describing the patient's own condition.

[0075] S33. When the patient has not undergone a physical examination and no physical examination data is obtained, the obtained symptom description vectors are concatenated separately to form a matrix describing the patient's own condition.

[0076] S4. Integrate the self-attention mechanism and convolutional neural network to construct a classification prediction model. The prediction result is obtained by the classification prediction model using the physical examination data vector obtained in step S1 and the symptom description vector obtained in step S3.

[0077] After the patient's physical examination data in step S1 and the symptom description in step S3 are both represented as vectors, they are concatenated into a matrix describing the patient's condition. This matrix integrates data from both modalities, taking into account information from both the patient's physical examination data and the symptom description. Since there is an interaction between the patient's physical examination data and the symptom description, this matrix is ​​first input into a self-attention mechanism to obtain global information. Furthermore, to prevent certain local invalid information from affecting the prediction results, a convolutional neural network is used to extract locally effective features.

[0078] In step S4, a classification prediction model is constructed by integrating the self-attention mechanism and the convolutional neural network. This model includes an input layer, a self-attention layer, a convolutional layer, a fully connected layer, a softmax layer, and an output layer, as follows: Figure 4 Specifically:

[0079] S41, Matrix E of the patient's own condition k×m The data is input into the self-attention layer, where the self-attention mechanism of the self-attention layer is used to mine the mutual influence relationship between the patient's physical examination data and symptom descriptions, and to obtain a global information matrix.

[0080] In step S41, the self-attention mechanism of the self-attention layer is used to mine the interaction between patient physical examination data and symptom descriptions to obtain global information. Specifically,

[0081] S411. Define three weight matrices: w q ∈R q×k w k ∈R q×k w v ∈R v×k According to the formula in, The column vectors representing the patient's condition matrix are linearly mapped to three different spaces to obtain the query vector q. i Key vector k i Sum vector v i ;

[0082] S412, Query vector q i Key vector k i Sum vector v i The query matrix Q, key matrix K, and value matrix V are merged respectively. The global information matrix obtained by the self-attention mechanism, i.e., the output matrix, is then calculated according to the following formula:

[0083]

[0084] Where softmax() is the activation function, D k For query vector q i Dimensions.

[0085] S42. The acquired global information matrix is ​​input into the convolutional neural network, and the convolutional layer performs local feature extraction to obtain the final representation vector of the patient's physical examination data and symptom description; this enables deeper mining of information in the relationship matrix.

[0086] In step S42, local feature extraction is performed by the convolutional layer to obtain the final representation vector of the patient's physical examination data and symptom description, specifically,

[0087] S421. Assume the convolutional filter W of the convolutional layer... f ∈R h×d Where R is the vector space, h is the size of the convolution filter window, and d represents the dimension of the input vector, representing the local features from row i to row i+k-1 of the input. That is, the vectors of the list from i to i+h-1 in the global information matrix, the i-th eigenvalue of the feature submatrix extracted by the convolution filter is represented as:

[0088]

[0089] Where f(·) is the nonlinear activation function relu(·), and b is the bias value;

[0090] S422. Obtain the output matrix E from the self-attention layer. attn The local feature matrix is:

[0091] C = [c1, c2, c3, ..., c i ,…,c m-h+1 ]

[0092] Where m is E attnThe number of column vectors, where h is the size of the convolution filter window;

[0093] S423. Perform max pooling on the local feature matrix C to obtain the final representation vector of the patient's physical examination data and symptom description.

[0094] S43. The final representation vector of the patient's physical examination data and symptom description obtained in step S42 is transformed by a fully connected layer to obtain the score vector s of whether the patient has diabetes.

[0095] S44. Input the score vector s into the Softmax layer. The score vector s is calculated by the Softmax layer to obtain the probability distribution of whether the patient has diabetes. Based on the probability distribution, the prediction result of whether the patient has diabetes is obtained and the prediction result is output by the output layer.

[0096] In step S44, the score vector s is calculated via a Softmax layer to obtain the probability distribution of whether the patient has diabetes, i.e., the probability that the patient has diabetes and does not have diabetes:

[0097]

[0098] Wherein, exp(s i ), exp(s j ) are the base-e exponents of the i-th and j-th dimensions of the score vector s, respectively, where i and j represent the dimensions of the score vector s.

[0099] like Figure 5 The embodiment also provides a system for predicting diabetes using a method that integrates knowledge graphs and deep learning as described above, including a physical examination data vector representation module, a knowledge graph construction module, a self-condition matrix generation module, and a classification prediction module.

[0100] Physical examination data vector representation module: Constructs a physical examination data entity vector library, and obtains the vector representation of the patient's physical examination data, namely the physical examination data vector, based on the physical examination data entity vector library;

[0101] Knowledge graph construction module: Acquire professional literature on diabetes, perform knowledge extraction and fusion, and based on the knowledge representation model TransR, represent all entities and relations in the knowledge graph of the diabetes field as vectors to construct a knowledge graph of the diabetes field;

[0102] Self-condition matrix generation module: Based on the constructed knowledge graph in the diabetes domain, it extracts entities and relationships from the patient's symptom descriptions and represents them as vectors to obtain symptom description vectors, and then obtains the matrix of the patient's self-condition.

[0103] Classification prediction module: It integrates self-attention mechanism and convolutional neural network to build a classification prediction model. The prediction result is obtained by using the matrix of the patient's own condition through the constructed classification prediction model.

[0104] This diabetes prediction method and system, which integrates knowledge graphs and deep learning, surpasses existing methods by simultaneously considering patient physical examination data and symptom descriptions. It incorporates a self-attention mechanism to acquire global information and a convolutional neural network to extract local features, thereby extracting more information from the data and achieving higher prediction accuracy. Driven by both data and knowledge, this method can mine diagnostic rules from massive amounts of medical data. Furthermore, by introducing external medical expertise, the prediction process more closely resembles actual clinical diagnosis, exhibiting higher interpretability. This addresses the problem of incomplete consideration of influencing factors in existing diabetes prediction processes, leading to lower accuracy and interpretability.

[0105] This diabetes prediction method and system, which integrates knowledge graphs and deep learning, constructs a diabetes-related knowledge graph and introduces external medical expertise into the deep learning classification and prediction model, thereby improving the accuracy and interpretability of the prediction results. By simultaneously considering the patient's physical examination data and symptom descriptions, it can prevent the influence of other factors on the patient's physical examination index values ​​and reduce the impact of external noise on the prediction results.

[0106] This diabetes prediction method and system, which integrates knowledge graphs and deep learning, addresses the challenge of using numerical data for physical examinations and textual data for patient symptom descriptions. Considering both modalities simultaneously requires preprocessing. The method constructs a vector representation of the physical examination data using the knowledge representation learning model TransH, converting the patient's physical examination data into vector form. The construction of the diabetes domain knowledge graph, i.e., the vector representation of patient symptom descriptions, involves building a diabetes domain knowledge graph based on collected literature and vectorizing entities within the knowledge graph using the knowledge representation learning model TransR. Symptom entities are extracted from the knowledge graph and represented as vectors. After both the physical examination data and patient symptom descriptions are represented as vectors, they are concatenated into a matrix and input into the SACC classifier to obtain the probability that the patient has diabetes.

[0107] This diabetes prediction method and system, which integrates knowledge graphs and deep learning, constructs vector representations of physical examination data and a knowledge graph in the diabetes field, namely, vector representations of patient symptom descriptions. It then combines this with a classification prediction model, SACC (Self-Attention CNN Classifier), built using a self-attention mechanism and a convolutional neural network, to obtain predictive results. By constructing a diabetes-related knowledge graph and utilizing representation learning to combine it with deep learning, the method introduces external professional knowledge support into diabetes prediction, enabling the classification prediction model to consider more comprehensive factors and effectively improving the accuracy and interpretability of predictions. The modeling data in this method comes from medical data and professional literature in the field of diabetes, ensuring its authenticity and reliability. Even if patients have not undergone physical examinations and no physical examination data is available, this method can still predict based on patient symptom descriptions, making it widely applicable and more feasible.

[0108] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method of predicting diabetes by fusing a knowledge graph and deep learning, characterized in that: The method comprises the following steps: S1, a physical examination data entity vector library is constructed, physical examination data of a patient is represented in a vector form based on the physical examination data entity vector library, and a physical examination data vector is obtained; S2, diabetes professional literature is acquired, knowledge extraction and knowledge fusion are performed, all entities and relationships in a diabetes field knowledge graph are represented in a vector form based on a knowledge representation model TransR, and the diabetes field knowledge graph is constructed; S3, based on the diabetes field knowledge graph constructed in step S2, entities and relationships in a patient symptom description are extracted and represented in a vector form, a symptom description vector is obtained, and a patient self-condition matrix is further obtained; S4, a classification prediction model is constructed by fusing a self-attention mechanism and a convolutional neural network, and a prediction result is obtained from the patient self-condition matrix through the constructed classification prediction model; In step S4, the classification prediction model is constructed by fusing the self-attention mechanism and the convolutional neural network, and the classification prediction model comprises an input layer, a self-attention layer, a convolutional layer, a full connection layer, a Softmax layer and an output layer, and specifically, S41, the patient self-condition matrix is input into the self-attention layer through the input layer of the classification prediction model, global information matrix is obtained by the self-attention mechanism of the self-attention layer to mine the mutual influence relationship between the physical examination data and the symptom description of the patient; S42, the obtained global information matrix is input into the convolutional layer, local feature extraction is performed, and the final representation vector of the physical examination data and the symptom description of the patient is obtained; S43, the final representation vector of the physical examination data and the symptom description of the patient obtained in step S42 is transformed through the full connection layer to obtain a score vector s of whether the patient has diabetes; S44, the score vector s is input into the Softmax layer, the score vector s is calculated through the Softmax layer to obtain the probability distribution of whether the patient has diabetes, the prediction result of whether the patient has diabetes is obtained according to the probability distribution, and the prediction result is output through the output layer. 2.The method of claim 1, wherein: In step S1, the physical examination data entity vector library is constructed, and specifically, S11, according to the normal range of the physical examination index defined in medicine, the detection value of the physical examination index is divided into a plurality of reference ranges with finer granularity, and the corresponding relationship is determined; S12, based on the divided reference range, the physical examination index, the relationship and the detection value are represented in the form of a triple, and the physical examination data entity vector library is obtained by using the knowledge representation model TransH. 3.The method of claim 1, wherein: In step S2, the diabetes professional literature is acquired, the knowledge extraction and the knowledge fusion are performed, all entities and relationships in the diabetes field knowledge graph are represented in the vector form based on the knowledge representation model TransR, and the diabetes field knowledge graph is constructed, and specifically, S21, diabetes field professional literature used for constructing the knowledge graph is acquired; S22, knowledge extraction is performed, including entity extraction and relation extraction, wherein the entity extraction is based on a bidirectional long short-term memory network (BiLSTM) and a conditional random field (CRF) model to extract entities related to diabetes from the professional literature in the diabetes field obtained in step S21; the relation extraction is based on syntactic analysis of the text to extract the relations between the entities in the text and express the relations in the form of a triple (head entity, relation, tail entity); S23, knowledge fusion is performed, the extracted knowledge entities are integrated and disambiguated through entity alignment and entity linking, the correctness is judged through relation reasoning, and then the entities and relations in the triple are updated; S24, knowledge representation is performed, the entities and relations in the triple are represented in the form of vectors based on a knowledge representation model TransR, and a constructed knowledge graph of the diabetes field is obtained. 4.The method of claim 1-3, wherein: In step S3, a matrix of the patient's own condition is further obtained, specifically, S31, it is determined whether the patient has physical examination to obtain physical examination data, if yes, step S32 is performed; if no, step S33 is performed; S32, when the patient has physical examination to obtain physical examination data, the obtained symptom description vector and the patient physical examination data vector obtained in step S1 are spliced to obtain a matrix of the patient's own condition; S33, when the patient does not have physical examination to obtain physical examination data, the obtained symptom description vector is spliced alone to obtain a matrix of the patient's own condition. 5.The method of claim 1, wherein: In step S41, the self-attention mechanism of the self-attention layer is used to mine the mutual influence relationship between the patient physical examination data and the symptom description, and global information is obtained, specifically, S411、define three weight matrices: w q ∈R q×k , w k ∈R q×k , w v ∈R v×k , according to the formula wherein, denotes a column vector of the patient's own condition matrix, each vector in the matrix is linearly mapped to three different spaces, resulting in a query vector q i , a key vector k i and a value vector v i ; S412、combine the query vector q i , the key vector k i and the value vector v i into a query matrix Q, a key matrix K and a value matrix V respectively, and calculate the global information matrix obtained by the self-attention mechanism, i.e. the output matrix, according to the following formula: where softmax() is an activation function, D k is the dimension of the query vector q i . 6.The method of claim 1, wherein: In step S42, local feature extraction is performed by the convolution layer to obtain the final representation vector of the patient physical examination data and the symptom description, specifically, S421、Assume the convolution filter W of the convolution layer f ∈R h×d where R is a vector space, h is the convolution filter window size, d represents the dimension of the input vector, and for the local features of the input from the i-th row to the i+k-1-th row i.e. the vector of the i-th to i+h-1-th row of the global information matrix, the i-th feature value of the feature sub-matrix extracted by the convolution filter is represented as: Wherein, f(·) is a nonlinear activation function relu(·), and b is a bias value; S422, obtaining the output matrix E from the self-attention layer attn The local feature matrix of the local feature matrix is: C = [c1, c2, c3, L, c i L, c m-h+1 ] where m is E attn The number of column vectors, h is the size of the convolution filter window. S423, a maximum pooling operation is performed on the local feature matrix C to obtain the final representation vector of the patient physical examination data and the symptom description. 7.The method of claim 1, wherein: In step S44, the score vector s is calculated through the Softmax layer to obtain the probability distribution of whether the patient has diabetes, i.e., the probability of the patient having diabetes and not having diabetes: where exp(s i ), exp(s j ) are the exponential of the i-th dimension, j-th dimension of the score vector s with base e, i, j represent the dimension of the score vector s respectively.

8. A system for predicting diabetes using the fusion knowledge graph and deep learning method according to any one of claims 1-7, characterized in that: The system comprises a physical examination data vector representation module, a knowledge graph construction module, a self-condition matrix generation module, and a classification prediction module, The physical examination data vector representation module: constructs a physical examination data entity vector library, and obtains the vector representation of the patient physical examination data based on the physical examination data entity vector library, i.e., the physical examination data vector; The knowledge graph construction module: obtains professional literature of diabetes, performs knowledge extraction and knowledge fusion, and represents all entities and relations in the knowledge graph of the diabetes field in the form of vectors based on a knowledge representation model TransR, and constructs a knowledge graph of the diabetes field; The self-condition matrix generation module: based on the constructed knowledge graph of the diabetes field, extracts entities and relations in the patient symptom description and represents them in the form of vectors to obtain a symptom description vector, and then obtains a matrix of the patient's own condition; The classification prediction module: fuses the self-attention mechanism and the convolutional neural network to construct a classification prediction model, and obtains a prediction result from the matrix of the patient's own condition through the constructed classification prediction model.

Citation Information

Patent Citations

  • Natural language relationship extraction method based on neural network

    CN110263332A

  • Knowledge graph representation learning method for integrating text semantic features based on attention mechanism

    CN110334219A

Cited By

  • A headache cause analysis method based on a knowledge graph and deep learning

    CN122334428A