Complication prediction method, device, electronic device and readable storage medium
By preprocessing user data and analyzing medical knowledge graphs, combined with the intelligent disease prediction model, the problem of ignoring numerical feature knowledge in the existing technology is solved, and the accuracy of disease prediction and model performance is improved.
Patent Information
- Application Number
- CN202411277248.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The existing disease prediction methods only build knowledge graphs for text-based features, ignoring the knowledge behind numerical features, resulting in poor accuracy of prediction results.
By preprocessing user data, numerical features are extracted and mapped into indicator range categories, entity analysis is performed by combining the pre-constructed medical knowledge graph, entity knowledge representation vectors are obtained, and input them into the pre-trained disease intelligent prediction model for prediction.
By considering the medical knowledge behind numerical characteristics, the accuracy of disease prediction and the robustness, generalization ability and interpretability of the model are improved.
Smart Images

Figure CN118800456B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a disease prediction method, and specifically to a complication prediction method, device, electronic device and readable storage medium. Background Art
[0002] Diabetes is a chronic, systemic metabolic disease caused by the long-term combined effects of genetic and environmental factors. It has a high incidence rate and is on a continuous upward trend. Diabetes is currently incurable and has many complications. Long-term high blood sugar levels cause damage to blood vessels and affect multiple tissues and organs throughout the body, leading to serious chronic complications such as coronary heart disease and renal failure, which seriously affect the patient's quality of life and endanger their lives. Early detection and timely intervention of high-risk complications can prevent or delay the occurrence of complications and significantly improve patient prognosis.
[0003] Intelligent disease prediction technology can use big data and artificial intelligence to discover hidden patterns and rules from multiple information such as the patient's family history, living habits, symptoms, etc., and identify high-risk groups for specific diseases, which is of great significance for disease prevention and timely intervention.
[0004] However, the features used for disease prediction, including but not limited to: symptoms, diseases, surgical procedures, drugs, indicator values, demographic information, lifestyle habits, and genetic history, all contain certain medical knowledge. Existing disease prediction methods only build knowledge graphs for text-based features and perform knowledge representation, ignoring the knowledge behind numerical features such as inspection and test results. Therefore, how to graph numerical features and introduce knowledge into numerical features is of great significance for further strengthening the depth of data utilization and improving model prediction performance, as well as improving the robustness, generalization ability, and interpretability of the model. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the existing disease prediction methods only construct knowledge graphs for text-based features and perform knowledge representation, ignoring the knowledge behind numerical features such as inspection and test results, resulting in poor accuracy of prediction results. In order to solve the above problem, the present invention provides a complication prediction method, device, electronic device and readable storage medium.
[0006] The content of the present invention includes:
[0007] In a first aspect, an embodiment of the present invention provides a complication prediction method, comprising:
[0008] Preprocess the user data to obtain original features, where the original features include numerical features and non-numerical features, and the numerical features are used to represent target indicators and corresponding target indicator values;
[0009] Based on a pre-built rule base, a target indicator value in the numerical feature is mapped to a target range category to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent a mapping relationship between an indicator value and a range category;
[0010] Based on a pre-constructed medical knowledge graph, an entity knowledge representation vector corresponding to the non-numerical feature and an entity knowledge representation vector corresponding to the indicator range feature are obtained through entity resolution, wherein the medical knowledge graph includes a plurality of target triples, and the target triples include a head entity, a relationship, and a tail entity;
[0011] The entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features are input into a pre-trained disease intelligent prediction model to obtain complication prediction results.
[0012] Optionally, obtaining the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the indicator range feature through entity resolution based on the pre-constructed medical knowledge graph includes:
[0013] Searching the medical knowledge graph based on the non-numerical features and the indicator range features;
[0014] For the non-numeric feature, when a first target entity matching the non-numeric feature is retrieved, the knowledge representation vector corresponding to the first target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature; otherwise, a second target entity is determined based on the similarity between the entity semantic embedding of the non-numeric feature and the semantic embedding of the entity in the medical knowledge graph, and the knowledge representation vector corresponding to the second target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature;
[0015] For the indicator range type feature, when a third target entity matching the indicator range type feature is retrieved, the knowledge representation vector corresponding to the third target entity is determined as the entity knowledge representation vector corresponding to the indicator range type feature; otherwise, based on the target indicator and the target range category, the entity knowledge representation vector corresponding to the indicator range type feature is obtained by calculation.
[0016] Optionally, the inputting the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results includes:
[0017] After concatenating the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the index range feature, the concatenation is combined with the original feature to form a joint input;
[0018] Inputting the combined input into the pre-trained disease intelligent prediction model, calculating the importance score of each feature, and obtaining an optimal feature set, wherein the importance score of the features in the optimal feature set is greater than or equal to a threshold;
[0019] Prediction is performed based on the optimal feature set to obtain a complication prediction result.
[0020] Optionally, before obtaining the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the indicator range feature through entity resolution based on the pre-constructed medical knowledge graph, the method further includes:
[0021] Based on the predefined entity classes and relations, information is extracted from the medical knowledge text to obtain the initial triples;
[0022] Based on a predefined synonym table, coreference resolution is performed on the initial triples to obtain target triples;
[0023] The medical knowledge graph is constructed with the entities of the target triples as nodes and the relationships of the target triples as edges.
[0024] Optionally, the information extraction of the medical knowledge text is performed based on the predefined entity classes and relationships to obtain initial triples, including:
[0025] The medical knowledge text is input into the entity-relationship joint extraction model for information extraction to obtain an initial triple. The entity-relationship joint extraction model includes:
[0026] A first embedding layer, the first embedding layer is used to obtain a vector representation of the medical knowledge text at a word level;
[0027] A sequence layer, wherein the sequence layer is used to accept a vector representation sequence of variable length, convert it into a coding state with a fixed shape, and then map the coding state with a fixed shape into a label sequence of variable length to obtain a named entity recognition result;
[0028] A dependency layer, wherein the dependency layer is used to classify the relationships between the named entities identified by the named entity recognition result to obtain a relationship recognition result;
[0029] The initial triplet is obtained based on the named entity recognition result and the relationship recognition result.
[0030] Optionally, the preprocessing of the user data to obtain original features includes:
[0031] Extracting information from the user data to obtain user information, wherein the user data includes structured data and unstructured data, and the user information includes initial numerical features and initial non-numerical features;
[0032] De-dimensionalizing the initial numerical features after unifying the dimensions to obtain the numerical features;
[0033] The initial non-numerical features are converted into Boolean type after being subjected to noun unification processing based on preset rules and vocabulary, thereby obtaining the non-numerical features.
[0034] Optionally, extracting information from the user data to obtain user information includes:
[0035] For the structured data, extract the user information under the corresponding field through conditional query to obtain the user information;
[0036] For the unstructured data, annotate text data in the unstructured data to obtain text annotations, input the text data and the corresponding text annotations into a named entity recognition model for recognition, and obtain the user information, wherein the named entity recognition model includes:
[0037] A second embedding layer, the second embedding layer is used to obtain a vector representation of the text annotation word level;
[0038] An encoding layer, the encoding layer is used to accept a variable-length vector representation sequence and convert it into an encoding state with a fixed shape;
[0039] The decoding layer is used to map the coding state with a fixed shape into a sequence of variable length to obtain the labeled text.
[0040] In a second aspect, an embodiment of the present invention provides a complication prediction device, comprising:
[0041] A preprocessing module, used to preprocess user data to obtain original features, wherein the original features include numerical features and non-numerical features, and the numerical features are used to represent target indicators and corresponding target indicator values;
[0042] A mapping module, used to map the target indicator value in the numerical feature to a target range category based on a pre-built rule base, to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent the mapping relationship between the indicator value and the range category;
[0043] A parsing module, for obtaining an entity knowledge representation vector corresponding to the non-numerical feature and an entity knowledge representation vector corresponding to the indicator range feature through entity parsing based on a pre-constructed medical knowledge graph, wherein the medical knowledge graph includes a plurality of target triples, and the target triples include a head entity, a relationship, and a tail entity;
[0044] The input module is used to input the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results.
[0045] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the complication prediction method as described in the first aspect.
[0046] In a fourth aspect, an embodiment of the present invention provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the complication prediction method as described in the first aspect.
[0047] The beneficial effect of the present invention is that by preprocessing user data, original features are obtained, and the original features include numerical features and non-numerical features. Based on a pre-constructed rule base, the target indicator values in the numerical features are mapped to target range categories to obtain corresponding indicator range features, thereby explicitly giving medical knowledge to the numerical features to a certain extent; based on a pre-constructed medical knowledge graph, entity knowledge representation vectors corresponding to non-numerical features and entity knowledge representation vectors corresponding to indicator range features are obtained through entity resolution, and while giving knowledge to non-numerical features, medical knowledge is further given to numerical features; the entity knowledge representation vectors corresponding to the original features and non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features are input into a pre-trained disease intelligent prediction model to obtain complication prediction results, and finally, on the basis of considering the knowledge behind numerical features such as inspection and test results, external prior medical knowledge is introduced into the model, and the model prediction process is guided by knowledge, and the problems of limited data volume, high-dimensional sparse and unbalanced data are alleviated through knowledge-driven, thereby improving disease prediction performance, as well as the robustness, generalization ability and interpretability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Attached Figure 1 A flowchart of a complication prediction method provided by an embodiment of the present invention;
[0049] Attached Figure 2 A schematic diagram of the structure of the Chinese diabetes knowledge graph provided by an embodiment of the present invention;
[0050] Attached Figure 3 A flow chart of a knowledge-enhanced intelligent prediction method for diabetes complications provided by an embodiment of the present invention;
[0051] Attached Figure 4 A structural block diagram of a knowledge-enhanced diabetes complication intelligent prediction system provided by an embodiment of the present invention;
[0052] Attached Figure 5 A schematic diagram of the structure of a complication prediction device provided by an embodiment of the present invention;
[0053] Attached Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of the present application, the term "multiple" refers to two or more, and other quantifiers are similar. The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0055] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word include the elements, objects, contents and their equivalents listed after the word, without excluding other elements, objects or contents. "In one embodiment" and "in another embodiment" may refer to one or more of the same or different embodiments according to the present invention.
[0056] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of protection of the present invention is limited to these examples; the disclosed embodiments are only examples of the present invention, which can be implemented in a variety of ways under the concept of the present invention, and the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of one or more embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity. Therefore, the specific structural and functional details disclosed in the present invention are not intended to be limiting, but are only used as the basis and representative basis of the claims to teach those skilled in the art to use the present invention in a variety of ways with substantially any suitable detailed structure.
[0057] It should also be understood that various modifications may be made to the embodiments disclosed herein. Therefore, although the present invention has been described using some specific examples, the following description should not be considered as limiting, but only as an example of the embodiments. Any omissions, modifications, equivalent substitutions, improvements, etc. that can be thought of by a person skilled in the art within the spirit, principles, and technical scope of the present invention disclosed by the present invention should be included in the protection scope of the present invention.
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] See also Figure 1 , Figure 1 A flowchart of a complication prediction method provided by an embodiment of the present invention. The complication prediction method provided by an embodiment of the present invention can be used to predict complications of a disease. For example, the embodiment of the present invention can be used to intelligently predict complications of diabetes. For ease of description, the following will be described using the application of this application to predict complications of diabetes as an example.
[0060] like Figure 1 As shown, the method specifically comprises the following steps:
[0061] Step 101 , preprocessing the user data to obtain original features, wherein the original features include numerical features and non-numerical features, and the numerical features are used to represent target indicators and corresponding target indicator values.
[0062] Step 102, based on a pre-built rule base, map the target indicator value in the numerical feature to a target range category to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent the mapping relationship between the indicator value and the range category.
[0063] Step 103, based on a pre-constructed medical knowledge graph, obtain the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the indicator range feature through entity resolution, the medical knowledge graph includes multiple target triples, and the target triples include a head entity, a relationship and a tail entity.
[0064] Step 104, input the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results.
[0065] The original features include numerical features and non-numerical features. The numerical features are used to represent the target indicator and the corresponding target indicator value. For example, the numerical feature is "{"BMI": 20Kg / m 2}", where "BMI" represents the target index, and "20Kg / m 2 " is the corresponding target indicator value. For example, non-numerical features are "female", "hypertension", "dizziness", and "genetic history of diabetes".
[0066] In step 101, user data needs to be acquired first, and then preprocessed to obtain original features. Optionally, in some embodiments, step 101 includes:
[0067] Extracting information from the user data to obtain user information, wherein the user data includes structured data and unstructured data, and the user information includes initial numerical features and initial non-numerical features;
[0068] De-dimensionalizing the initial numerical features after unifying the dimensions to obtain the numerical features;
[0069] The initial non-numerical features are converted into Boolean type after being subjected to noun unification processing based on preset rules and vocabulary, thereby obtaining the non-numerical features.
[0070] In this embodiment, user data can be obtained from various medical and health information systems through data interfaces. For example, the medical and health information systems accessed in this embodiment include, but are not limited to, physical examination and laboratory information management systems, hospital information management systems, clinical information systems, electronic medical records, image archiving and communication systems, and radiology information systems.
[0071] As a specific embodiment, the preprocessing includes:
[0072] 1. Information extraction: The extracted content includes symptoms, diseases, surgical procedures, drugs, indicator values, demographic information, living habits, and genetic history. The types of information of the user data obtained include structured data and unstructured data. Structured data includes but is not limited to tabular data and structured electronic medical records. Unstructured data is various documents in the form of images or PDFs, including but not limited to medical records, examination reports, surgical records, and discharge records. For structured data, the data under the corresponding field can be obtained through conditional queries. For unstructured data, user information text can be extracted through optical character recognition (OCR), and then the corresponding information can be extracted from the user information text through named entity recognition. The extracted information includes two types: numerical and non-numerical, which are respectively recorded as initial numerical features and initial non-numerical features.
[0073] 2. Data standardization: Different methods are used for data standardization of different types. Specifically, for the initial numerical features, the initial numerical features under the same indicator are de-dimensionalized after unifying the dimensions. For non-numerical features, a corresponding vocabulary is constructed, and the medical expressions are standardized through a rule-based approach. Exemplarily, the corresponding vocabulary content includes Chinese standard medical terms, Chinese abbreviations, Chinese aliases, English standard medical terms, English aliases, English abbreviations, ICD codes, etc., which are used to solve the problem of multiple expressions of the same medical object, among which the ICD code types include ICD disease codes and ICD surgical codes.
[0074] For example, the Chinese standard medical term "coronary atherosclerotic heart disease" is abbreviated as "coronary heart disease" in Chinese, and its Chinese nickname is "coronary heart disease" or "coronary artery disease"; the English standard medical term is "Coronary Atherosclerotic Heart Disease"; its English nickname is "Coronary Heart Disease", "Coronary Artery Disease" or "Ischemic Heart Disease"; its English abbreviation is "CAD", "CHD" or "IHD". The ICD code described in this embodiment is determined according to the version used in the historical patient information. If the disease code adopts ICD-10, it is "I25.103". Through data standardization processing, the above different medical expressions can be unified into the same predetermined expression, thereby facilitating subsequent data processing.
[0075] Data conversion: Specifically, non-numeric features are converted to Boolean types, i.e., "0" and "1". Exemplarily, when non-numeric features belong to symptoms, diseases, surgical procedures, drugs, lifestyle habits, and genetic history, "0" means that the feature does not exist for the user, and "1" means that the feature exists for the user; when non-numeric features belong to demographic information, the meanings of "0" and "1" need to be specifically defined. For example, if a user's non-numeric features are ["female", "hypertension", "dizziness", "genetic history of diabetes"], the data will be converted to {"sex": 0; "hypertension": 1; "hyperlipidemia": 0; "dizziness": 1; "smoking": 0; "alcoholism": 0; "family history of diabetes": 1}, where "sex" of "0" means "female" and "sex" of "1" means "male".
[0076] Medical expressions can be standardized in the above manner, and the process is simple and easy. When the rules are comprehensive, the accuracy is extremely high and is not affected by the amount of data. When this application is applied to the scenario of diabetes complication prediction, since diabetes belongs to a specialized vertical field rather than a general field, the amount of terminology is limited, so it is feasible to build a relatively comprehensive rule base and maintain it in a timely manner at both the technical and cost levels.
[0077] Optionally, in some embodiments, extracting information from the user data to obtain user information includes:
[0078] For the structured data, extract the user information under the corresponding field through conditional query to obtain the user information;
[0079] For the unstructured data, annotate text data in the unstructured data to obtain text annotations, input the text data and the corresponding text annotations into a named entity recognition model for recognition, and obtain the user information, wherein the named entity recognition model includes:
[0080] A second embedding layer, the second embedding layer is used to obtain a vector representation of the text annotation word level;
[0081] An encoding layer, the encoding layer is used to accept a variable-length vector representation sequence and convert it into an encoding state with a fixed shape;
[0082] The decoding layer is used to map the coding state with a fixed shape into a sequence of variable length to obtain the labeled text.
[0083] As a specific embodiment, the user information text may be annotated using the "BIO" annotation method, where "B" or "begin" indicates the entity start character, "I" or "inside" indicates the Chinese character in the middle or at the end of the entity, and "O" or "outside" indicates a non-entity. The "BIO" annotation method may be combined with the entity type to annotate the type of each character in the user data. For example, the sentence "suffering from diabetic foot" may be annotated as {"suffer": "O"; "have": "O"; "sugar": "B-Disease"; "urine": "I-Disease"; "disease": "I-Disease"; "foot": "I-Disease"}.
[0084] Then build a named entity recognition model, including embedding layer, encoding layer and decoding layer:
[0085] Among them, the embedding layer is used to obtain the vector representation of each Chinese character. As a specific embodiment, the embedding layer is configured as the Chinese ELECTRA model. Chinese ELECTRA is trained based on a large-scale Chinese corpus, including Wikipedia, news articles, social media data, etc. This enables it to represent a wide range of Chinese text fields well. However, the model lacks domain-specific knowledge, so the present invention fine-tunes it based on a large number of Chinese medical texts in the field of diabetes. The fine-tuned Chinese ELECTRA is configured in the embedding layer.
[0086] The encoding layer is used to accept a variable-length vector representation sequence and convert it into an encoding state with a fixed shape. The encoding layer is configured as a bidirectional long short-term neural network (Bi-directional Long Short-Term Memory, Bi-LSTM). Bi-LSTM is a recurrent neural network. BiLSTM can effectively capture the bidirectional long-distance semantic dependencies of text.
[0087] The decoding layer is used to map the encoding state with a fixed shape into a sequence of variable length, where each element in the sequence is a "BIO" label. For example, the text sequence "suffering from diabetic foot" is finally decoded into a label sequence ["O", "O", "B-Disease", "I-Disease", "I-Disease", "I-Disease"], thereby identifying the disease entity "diabetic foot". The encoding layer is configured as a conditional random field (CRF), which is a discriminative probability model that can capture the interdependence between labels, thereby improving the accuracy of sequence labeling tasks.
[0088] It should be understood that before step 102, the method further includes: constructing a rule base. In specific implementation, an initial rule base framework is constructed according to medical standards; for rules corresponding to indicators in historical user information that are missing in the initial rule framework, the initial rule framework is supplemented with rules according to the opinions and suggestions of medical experts; the rules are modified according to the specific medical standards of the location of the data applied in the embodiment; and the rules are updated according to the development of medicine and changes in medical standards.
[0089] For example, the medical standard may be CTCAE, which provides specific clinical descriptions based on the severity of each adverse event (grade 1 to 5), including:
[0090] Grade 1: Mild; asymptomatic or mild; clinical or diagnostic observation only; no treatment required;
[0091] Grade 2: moderate; minor, local or noninvasive treatment required; age-appropriate instrumental activities of daily living limited;
[0092] Grade 3: severe or medically significant but not immediately life-threatening; leading to hospitalization or prolonged hospitalization; causing disability; limiting self-care activities of daily living;
[0093] Grade 4: Life-threatening; urgent treatment required;
[0094] Grade 5: Death related to adverse events.
[0095] The above 5 levels of clinical descriptions correspond to the state of death. Dead users are not the objects of intelligent disease prediction. Therefore, the present invention does not consider this level and determines the initial rule base framework as "level 4 low", "level 3 low", "level 2 low", "level 1 low", "normal", "level 1 high", "level 2 high", "level 3 high", and "level 4 high", where the specific indicator value ranges corresponding to the division of each indicator at level 1, level 2, level 3, and level 4 refer to the medical standards.
[0096] In specific implementation, the above medical standards can be adjusted according to actual needs. For example, some rules corresponding to the BMI (Body Mass Index) indicator are modified from: {"Normal": [20,25); "Level 2 High": [25,30); "Level 3 High": [35,40); "Level 4 High": [40,+∞)} to {"Normal": [18.5,24); "Level 2 High": [24,28); "Level 3 High": [24,28)}, where the value dimension is "Kg / m 2 ", there is no "Level 1 High" under the BMI indicator, and "Level 4 High" is based on the opinions and suggestions of experts in the medical field to supplement the initial rule framework.
[0097] The above is only an example of how to construct a rule base. In the specific implementation, the rule base can be constructed, adjusted and updated according to the actual situation, which will not be elaborated here. The rule base contains range categories corresponding to different numerical values of different indicators. After the target indicator is determined, the range category corresponding to the target indicator data can be determined according to the content corresponding to the target indicator in the rule base. For example, if the numerical feature in the original feature is {"BMI": 20Kg / m 2}, then the partial rule corresponding to the BMI (Body Mass Index) indicator {"normal": [18.5,24)} is mapped to the indicator "BMI" and the range category "normal", thereby obtaining the corresponding indicator range feature "BMI normal".
[0098] Based on the pre-built rule base, the target indicator value in the numerical feature is mapped to the target range category to obtain the corresponding indicator range feature. Through the above method, the specific numerical value can be converted into the medical significance of the indicator value, so that the numerical feature can be explicitly endowed with medical knowledge to a certain extent.
[0099] It should be understood that, before step 103, the method further includes: constructing a knowledge graph. Optionally, the specific method of constructing a knowledge graph includes:
[0100] Based on the predefined entity classes and relations, information is extracted from the medical knowledge text to obtain the initial triples;
[0101] Based on a predefined synonym table, coreference resolution is performed on the initial triples to obtain target triples;
[0102] The medical knowledge graph is constructed with the entities of the target triples as nodes and the relationships of the target triples as edges.
[0103] The above method can be used to construct a knowledge graph. The following is an example of constructing a Chinese diabetes medical knowledge graph. Specifically, constructing a Chinese diabetes medical knowledge graph includes the following steps:
[0104] The ontology design of the Chinese diabetes medical knowledge graph was carried out, and the entity classes and relationships were defined to construct the network structure of diabetes knowledge. Specifically, a class refers to an entity class, which can also be called an entity category, that is, a set of entities with common attributes and behaviors. A relationship is a semantic link between two classes or instances, which defines the interaction mode between entities.
[0105] Collect Chinese diabetes medical knowledge texts, including but not limited to: various diabetes clinical guidelines and consensus (for example, National Primary Care Diabetes Prevention and Management Guidelines, Expert Consensus on the Use of Insulin Secretagogues for Type 2 Diabetes in Adults in China, Guidelines for Diabetes Diagnosis and Treatment in the Elderly in China), books and textbooks (for example, Diabetology, Practical Diabetes Therapeutics, Diabetes Manual, Merck Manual of Diagnosis and Treatment), papers and professional literature, encyclopedias and web knowledge.
[0106] Based on the Chinese diabetes medical knowledge graph ontology design, entity relationship joint extraction is performed on the Chinese diabetes medical knowledge text to obtain (head entity, relationship, tail entity) triples (i.e., initial triples), thereby realizing the instantiation of the Chinese diabetes medical knowledge graph ontology;
[0107] Based on the pre-defined synonym table, the extracted entities and relations are coreference resolved through rule-based methods to solve the problem of multiple words with one meaning, improve the quality of triples, and obtain the target triples;
[0108] Based on the triples after coreference resolution (i.e., target triples), the Chinese diabetes medical knowledge graph is structured with entities as nodes and relationships between entities as edges to form a large-scale Chinese diabetes medical knowledge network. As a specific embodiment, the tool configuration for structured representation of the Chinese diabetes medical knowledge graph is Neo4j.
[0109] As a specific example, see Figure 2 , 9 entity classes and 27 relationships are defined in the Chinese diabetes medical knowledge graph, including:
[0110] 9 entity classes, including:
[0111] “Symptoms”, such as “dizziness”;
[0112] “disease”, such as “type 2 diabetes”;
[0113] “surgical procedure”, such as “coronary endarterectomy”;
[0114] “drugs”, such as “metformin”;
[0115] “Indicators”, such as “fasting blood sugar”;
[0116] "Indicator value range", such as "fasting blood sugar level 3 high";
[0117] “Demographic information”, such as “married”;
[0118] “Lifestyle habits”, such as “alcoholism”;
[0119] “Genetic history”, such as “Genetic history of hypertension”.
[0120] like Figure 2 The Chinese diabetes medical knowledge graph shown defines 27 relationships, including:
[0121] 1 hierarchical relationship: “is-a”, corresponding to triples such as “coronary heart disease—is-a—heart disease”, “glibenclamide—is-a—sulfonylurea drugs”;
[0122] 26 non-hierarchical relationships, including:
[0123] 9 relationships between two types of entities, namely, indicators and indicator value ranges defined in the indicator rule base, including:
[0124] “Level 4 low”, corresponding to a triple such as “fasting blood sugar – Level 4 low – fasting blood sugar level 4 low”;
[0125] “Level 3 low”, corresponding to a triple such as “fasting blood sugar – Level 3 low – fasting blood sugar level 3 low”;
[0126] “Level 2 low”, corresponding to a triple such as “fasting blood glucose—level 2 low—fasting blood glucose level 2 low”;
[0127] “Level 1 low”, corresponding to a triple such as “fasting blood glucose—level 1 low—fasting blood glucose level 1 low”;
[0128] “Normal”, corresponding to a triple such as “fasting blood glucose – normal – normal fasting blood glucose”;
[0129] “Level 1 high”, corresponding to a triple such as “fasting blood sugar – Level 1 high – fasting blood sugar level 1 high”;
[0130] “Level 2 high”, corresponding to a triple such as “fasting blood glucose—level 2 high—fasting blood glucose level 2 high”;
[0131] “Level 3 high”, corresponding to a triple such as “fasting blood sugar – Level 3 high – fasting blood sugar level 3 high”;
[0132] “Level 4 high” corresponds to a triple such as “fasting blood sugar—level 4 high—fasting blood sugar level 4 high”.
[0133] 17 other non-hierarchical relationships, including:
[0134] “Surgical procedure_treatment_disease”, corresponding to the triplet “intracoronary thrombolytic drug infusion—surgical procedure_treatment_disease—coronary atherosclerotic heart disease”;
[0135] “Surgical procedure_complication_disease”, corresponding to the triplet “coronary artery drug-eluting stent implantation—surgical procedure_complication_disease—acute myocardial infarction”;
[0136] “Surgical procedure_complication_symptom”, corresponding to the triplet such as “coronary artery drug-eluting stent implantation—surgical procedure_complication_symptom—headache”;
[0137] “Surgical procedure_complication_index value range”, corresponding to the triplet such as “coronary artery drug-eluting stent implantation—surgical procedure_complication_index value range—partial thromboplastin time level 2 high”;
[0138] “Drug_treatment_disease”, corresponding to triples such as “metformin-drug_treatment_disease-type 2 diabetes”;
[0139] “Drug_Adverse Reaction_Disease”, corresponding to triples such as “Exenatide-Drug_Adverse Reaction_Disease-Pancreatitis”;
[0140] “Drug_Adverse Reaction_Symptom”, corresponding to the triplet “Liraglutide-Drug_Adverse Reaction_Symptom-Headache”;
[0141] “Drug_Adverse reaction_Indicator value range”, corresponding to the triplet such as “Empaligliflozin-Drug_Adverse reaction_Indicator value range-High low-density lipoprotein cholesterol level 2”;
[0142] “Lifestyle_Disease”, corresponding to the triplet “High-calorie diet—Lifestyle_Disease—Type 2 diabetes”;
[0143] “Lifestyle_Symptoms”, corresponding to the triple “staying up late—lifestyle_symptoms—dizziness”;
[0144] “Lifestyle habits_Indicator value range”, corresponding to the triplet such as “high-fat diet-lifestyle habits_Indicator value range-low-density lipoprotein cholesterol level 3 high”;
[0145] “Genetic history_disease”, corresponding to a triple such as “family history of diabetes—genetic history_disease—type 2 diabetes”;
[0146] “Demographic information_disease”, corresponding to a triple such as “female-demographic information_disease-breast cancer”;
[0147] “Indicator value range_disease”, corresponding to a triplet such as “Fibrinogen level 3 high—Indicator value range_disease—thrombosis”;
[0148] “Disease_Cause_Disease”, corresponding to triples such as “atherosclerosis-cause_disease-coronary atherosclerotic heart disease”;
[0149] “Disease_Symptoms”, corresponding to triples such as “Type 2 diabetes—Disease_Symptoms—Poor appetite”;
[0150] "Associated indicator", corresponding to the triplet such as "BMI-associated indicator-weight".
[0151] Optionally, in some embodiments, the information extraction of the medical knowledge text based on the predefined entity classes and relationships to obtain the initial triples includes:
[0152] The medical knowledge text is input into the entity-relationship joint extraction model for information extraction to obtain an initial triple. The entity-relationship joint extraction model includes:
[0153] A first embedding layer, the first embedding layer is used to obtain a vector representation of the medical knowledge text at a word level;
[0154] A sequence layer, wherein the sequence layer is used to accept a vector representation sequence of variable length, convert it into a coding state with a fixed shape, and then map the coding state with a fixed shape into a label sequence of variable length to obtain a named entity recognition result;
[0155] A dependency layer, wherein the dependency layer is used to classify the relationships between the named entities identified by the named entity recognition result to obtain a relationship recognition result;
[0156] The initial triplet is obtained based on the named entity recognition result and the relationship recognition result.
[0157] As a specific embodiment, the entity relationship joint extraction model is configured as an SPTree framework, including an embedding layer, a sequence layer and a dependency layer.
[0158] The embedding layer is used to obtain the vector representation of each Chinese character. Specifically, the embedding layer is configured as the Chinese ELECTRA model;
[0159] The sequence layer is used to accept a variable-length vector representation sequence, convert it into a fixed-shape encoding state, and then convert the fixed-shape encoding state into a variable-length label sequence, where each element is a "BIO" label. For example, the text sequence "suffering from diabetic foot" is eventually decoded into a label sequence ["O", "O", "B-Disease", "I-Disease", "I-Disease", "I-Disease"], thereby identifying the disease entity "diabetic foot" and completing the named entity recognition subtask. The models used to complete the above two-step conversion are configured as Bi-LSTM and CRF respectively;
[0160] The dependency layer is used to extract relations from entities identified by the named entity recognition subtask. The dependency layer is configured as a bidirectional tree structure long short-term memory network (LSTM); the dependency layer is superimposed on the sequence layer, and the two subtasks of named entity recognition and relationship classification are trained simultaneously. The two subtasks of named entity recognition and relationship classification can share the information of the sequence layer and word embedding layer, and after the decoding of the entire model is completed, the shared parameters are updated through the back propagation algorithm to achieve information interaction, so the accuracy of entity and relationship extraction can be improved through the interaction of the two subtasks.
[0161] Optionally, in some embodiments, step 103 specifically includes:
[0162] Searching the medical knowledge graph based on the non-numerical features and the indicator range features;
[0163] For the non-numeric feature, when a first target entity matching the non-numeric feature is retrieved, the knowledge representation vector corresponding to the first target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature; otherwise, a second target entity is determined based on the similarity between the entity semantic embedding of the non-numeric feature and the semantic embedding of the entity in the medical knowledge graph, and the knowledge representation vector corresponding to the second target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature;
[0164] For the indicator range type feature, when a third target entity matching the indicator range type feature is retrieved, the knowledge representation vector corresponding to the third target entity is determined as the entity knowledge representation vector corresponding to the indicator range type feature; otherwise, based on the target indicator and the target range category, the entity knowledge representation vector corresponding to the indicator range type feature is obtained by calculation.
[0165] As an optional embodiment, the trained knowledge representation model is used like a pre-trained language model, and the model needs to be called each time. After the target entity (the first target entity, the second target entity, or the third target entity) is determined, the knowledge representation vector of the target entity can be obtained by calling the knowledge representation model to obtain the corresponding entity knowledge representation vector.
[0166] As another optional embodiment, the training result of the trained knowledge representation learning model is saved, and the saved form can be understood as: entity: knowledge representation vector. Therefore, after determining the target entity (the first target entity, the second target entity or the third target entity), the corresponding entity knowledge representation vector can be obtained.
[0167] As a specific embodiment, the knowledge graph representation learning model is configured as TransH. TransH is a knowledge graph representation learning model that is used to learn the association between entities and relationships and embed them into a continuous vector space. TransH constructs a vector space for each relationship, so it can effectively model complex relationships such as 1-N, N-1, NN, etc. between the head entity and the tail entity. Each relationship in TransH is represented by a unit vector representing a hyperplane and the relation translation vector in the hyperplane The purpose of characterizing with two vectors is to make the same entity have different meanings in different relationships.
[0168] Specifically, in each triple First, the head entity and tail entity Mapping to a hyperplane Get the projection vector and .
[0169] ;
[0170] ;
[0171] in, and Represent the head entity and tail entity vectors respectively, and Respectively represent the projection vectors of the head entity and the tail entity in the relation space, Unit vector representing the hyperplane The transpose of .
[0172] TransH is a translation model that considers the relationship as a translation from the head entity to the tail entity in a low-dimensional vector space. The translation operation is, that is, then the error is , the final score function is:
[0173]
[0174] in, is the relation translation vector in the hyperplane, express Norm.
[0175] TransH is trained by minimizing the score of correct triplets and maximizing the score of incorrect triplets, and updates the parameters using stochastic gradient descent. The following constraints need to be considered when minimizing the loss function:
[0176] ;
[0177] ;
[0178] ;
[0179] in, Approaches zero infinitely and is used as a numerical stability factor.
[0180] When the constraints are met, the TransH loss function is:
[0181]
[0182] in, and They represent positive sample and negative sample sets respectively. The negative sample set is generated by negative sampling, that is, replacing the head entity or the tail entity in the correct triplet to generate a negative sample; is a hyperparameter used to adjust the importance of the constraint; and Represent entity and relationship vectors respectively; E and R represent entity and relationship vector sets respectively; , represents the distance factor, is the maximum positive function.
[0183] Specifically, feature entities in the feature set are retrieved in the Chinese diabetes medical knowledge graph, so as to map non-numerical feature entities and indicator range features to the Chinese diabetes medical knowledge graph. If there is a matching result (i.e., the first target entity or the third target entity is retrieved), the corresponding entity knowledge representation vector is directly obtained.
[0184] If there is no matching result after the retrieval, for numerical feature entities, based on the corresponding head entity and relationship, i.e., indicator and range category, the corresponding entity knowledge representation vector is obtained by calculation in the following manner; for other feature entities, the similarity between the semantic embedding of the feature entity and the semantic embedding of all entities in the Chinese diabetes medical knowledge graph is calculated by cosine similarity, and the knowledge representation vector of the entity with the highest similarity (i.e., the second target entity) is obtained as the corresponding entity knowledge representation vector.
[0185] The calculation of the tail entity knowledge representation vector is performed based on the TransH principle:
[0186] ;
[0187] The feature entity semantic embedding and all entity semantic embeddings in the Chinese diabetes medical knowledge graph are obtained based on the Chinese ELECTRA model.
[0188] Optionally, in some embodiments, step 104 includes:
[0189] After concatenating the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the index range feature, the concatenation is combined with the original feature to form a joint input;
[0190] Inputting the combined input into the pre-trained disease intelligent prediction model, calculating the importance score of each feature, and obtaining an optimal feature set, wherein the importance score of the features in the optimal feature set is greater than or equal to a threshold;
[0191] Prediction is performed based on the optimal feature set to obtain a complication prediction result.
[0192] In this embodiment, the disease intelligent prediction model is configured as Extreme GradientBoosting (XGBoost). XGBoost is an efficient gradient boosting decision tree algorithm, which is improved on the basis of the original gradient boosting decision tree. It adopts the Boosting integration idea and integrates multiple classification and regression trees (Classification And Regression Tree, CART) into a strong learner through a certain method, so that the model effect is greatly improved. It can be applied to tasks such as classification and regression, and can effectively deal with high-dimensional sparse data. The principle is:
[0193] ;
[0194] in, Before CART tree for sample The predicted value of Before CART tree for sample The predicted value of For the A model of a tree.
[0195] The loss function is based on the predicted value and the true value Perform the calculation:
[0196]
[0197] In addition, XGBoost also has the function of outputting feature importance. Specifically, in a single decision tree, the attribute importance is calculated by the amount by which each attribute split point improves the performance metric. The node is responsible for weighting and recording the number of times. The greater the improvement of a feature on the split point performance metric, the greater the weight; the more boosted trees are selected, the more important the attribute is, and the performance metric function is configured as Gini purity.
[0198] The existence of irrelevant and redundant features will not only increase the computational overhead, but also introduce noise that affects the model accuracy, especially when there is a small sample problem. Therefore, in order to improve computational efficiency and improve model accuracy, in step 104, the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the index range feature are concatenated to form a joint input, and the joint input is input into the XGBoost model, the importance score of each feature is calculated and sorted, and feature screening is performed by setting a minimum threshold, and features with importance scores exceeding the threshold constitute the optimal feature set.
[0199] In the process of model training, based on the optimal feature set, the historical user disease intelligent prediction input is obtained, and the model is trained by cross-validation method to obtain the trained XGBoost disease intelligent prediction model. In the process of model application, the optimal feature set is obtained in the above manner and input into the knowledge-enhanced diabetes complication intelligent prediction model, and the complication prediction results are output.
[0200] It should be understood that the calculation of the importance score of each feature is performed internally in the disease intelligent prediction model, but in some embodiments, the disease intelligent prediction model will not automatically perform screening and prediction internally. Therefore, in this embodiment, the optimal feature set obtained based on the screening of all features and the prediction based on the optimal feature set are described as two steps.
[0201] It should be understood that, in specific implementation, the disease intelligent prediction model may also be other models in the relevant technology that can realize disease intelligent prediction, and its specific structure is not limited here.
[0202] As a specific example, see Figure 3 , Figure 3 A schematic diagram of a knowledge-enhanced intelligent prediction method for diabetes complications provided by the present method. Specifically, the method includes:
[0203] S1: Obtain historical user information and perform preprocessing to obtain corresponding original features and specified complication status, wherein the original features include numerical features and non-numerical features;
[0204] S2: construct a rule base, which includes mapping relationships between indicator values and range categories under different indicators, wherein the indicators include inspection indicators and test indicators;
[0205] S3: Based on the rule base, the numerical features in the original features are mapped into index range features, and together with the non-numerical features in the original features, they form a feature entity set;
[0206] S4: Construct Chinese diabetes medical knowledge graph;
[0207] S5: constructing a knowledge graph representation learning model to generate knowledge representation vectors for entities and relationships in the Chinese diabetes medical knowledge graph;
[0208] S6: Obtain the knowledge representation vector corresponding to the index range feature and the non-numerical feature through entity resolution;
[0209] S7: inputting the knowledge representation vectors and original features corresponding to the indicator range features and non-numerical features into the disease intelligent prediction model, predicting the specified complication status, and training to obtain the diabetes complication intelligent prediction model;
[0210] S8: The trained diabetes complication intelligent prediction model is used as the disease intelligent prediction model, see Figure 1 The method shown enables prediction of diabetic complications.
[0211] See also Figure 4 The embodiment of the present invention further provides a knowledge-enhanced intelligent prediction system for diabetes complications, comprising:
[0212] The data module consists of two submodules: the data acquisition module and the data processing module;
[0213] A data acquisition module is used to obtain historical user information and user data through a data interface;
[0214] A data processing module pre-processes the acquired historical user information and user data to obtain original features and specified complication status;
[0215] The knowledge module consists of two submodules: the knowledge base construction module and the knowledge base application module;
[0216] Knowledge base construction module, used to build rule base and Chinese diabetes medical knowledge graph;
[0217] A knowledge base application module is used to map the numerical features in the original features into index range features based on the rule base, and form a feature entity set together with the non-numerical features in the original features; construct a knowledge graph representation learning model to generate knowledge representation vectors for entities and relationships in the Chinese diabetes medical knowledge graph; obtain corresponding entity knowledge representation vectors through entity resolution;
[0218] The prediction module consists of two sub-modules: prediction model training module and prediction model calling module;
[0219] The prediction model training module inputs the entity knowledge representation vector and original features corresponding to the historical users into the disease intelligent prediction model, predicts the specified complication status, and trains the diabetes complication intelligent prediction model;
[0220] The prediction model calling module inputs the original features of the user data and the corresponding entity knowledge representation vector into the diabetes complications intelligent prediction model and outputs the complication prediction results.
[0221] In this embodiment, first, intelligent disease prediction is performed based on numerical features and non-numerical features, and more comprehensive information is provided for the disease prediction process through multimodal features. Secondly, an indicator rule base is constructed and based on the rule base, the range corresponds to the medical significance of the indicator value, and the numerical features in the original features are mapped to indicator range features, and the range of the indicator value is defined based on medical knowledge, so that medical knowledge can be explicitly assigned to the numerical features to a certain extent. Construct a medical knowledge graph; then construct a knowledge graph representation learning model, obtain the corresponding entity knowledge representation vector through entity resolution, and assign knowledge to non-numerical features while further assigning medical knowledge to numerical features. Finally, the entity knowledge representation vector and the original features are input into the disease intelligent prediction model, so as to introduce external prior medical knowledge into the model, guide the model prediction process with knowledge, and alleviate the problems of limited data volume, high-dimensional sparse data and imbalance through knowledge-driven, so as to improve the disease prediction performance, as well as the robustness, generalization ability and interpretability of the model.
[0222] In some embodiments, since the rule base and medical knowledge graph need to be maintained, modified and updated, the knowledge module needs to be configured with a user-friendly front-end interface, including:
[0223] Data management unit: provides basic operations of adding, deleting, modifying and checking, allowing users to manage data; supports batch operation and editing to improve efficiency; provides data import and export functions to facilitate data migration and backup;
[0224] Data query unit: supports various complex condition searches; supports saving commonly used query conditions; facilitates users to reuse; provides visual display of query results, including but not limited to tables and charts;
[0225] Data Analysis Unit: Provides various data analysis reports and dashboards according to business needs; supports the design and configuration of custom reports; provides data visualization functions such as charts, maps, etc.;
[0226] Permission management unit: supports fine-grained permission control, sets different operation permissions for different users or roles; provides a management interface for permission allocation and approval; records user operation logs;
[0227] System configuration unit: provides management interface for database connection, table structure, dictionary data, etc.; supports configuration and management of system parameters; provides viewing and analysis functions of operation logs;
[0228] Auxiliary units: including but not limited to online help, usage guidance functions, progress bar effects, to improve user experience.
[0229] See also Figure 5 The embodiment of the present invention provides a complication prediction device 500, comprising:
[0230] A preprocessing module 501 is used to preprocess the user data to obtain original features, where the original features include numerical features and non-numerical features, and the numerical features are used to represent the target indicator and the corresponding target indicator value;
[0231] A mapping module 502 is used to map the target indicator value in the numerical feature to a target range category based on a pre-built rule base to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent the mapping relationship between the indicator value and the range category;
[0232] A parsing module 503 is used to obtain an entity knowledge representation vector corresponding to the non-numerical feature and an entity knowledge representation vector corresponding to the indicator range feature through entity parsing based on a pre-constructed medical knowledge graph, wherein the medical knowledge graph includes a plurality of target triples, and the target triples include a head entity, a relationship, and a tail entity;
[0233] The input module 504 is used to input the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results.
[0234] Optionally, the parsing module 503 includes:
[0235] A retrieval unit, configured to search the medical knowledge graph based on the non-numerical feature and the indicator range feature;
[0236] A first processing unit is used for, for the non-numeric feature, when a first target entity matching the non-numeric feature is retrieved, determining the knowledge representation vector corresponding to the first target entity as the entity knowledge representation vector corresponding to the non-numeric feature; otherwise, determining a second target entity based on the similarity between the entity semantic embedding of the non-numeric feature and the semantic embedding of the entity in the medical knowledge graph, and determining the knowledge representation vector corresponding to the second target entity as the entity knowledge representation vector corresponding to the non-numeric feature;
[0237] The second processing unit is used for, for the indicator range type feature, when a third target entity matching the indicator range type feature is retrieved, determining the knowledge representation vector corresponding to the third target entity as the entity knowledge representation vector corresponding to the indicator range type feature; otherwise, obtaining the entity knowledge representation vector corresponding to the indicator range type feature by calculation based on the target indicator and the target range category.
[0238] Optionally, the input module 504 includes:
[0239] A third processing unit is used to concatenate the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the index range feature, and then form a joint input with the original feature;
[0240] A first input unit, used for inputting the combined input into the pre-trained disease intelligent prediction model, calculating the importance score of each feature, and obtaining an optimal feature set, wherein the importance score of the features in the optimal feature set is greater than or equal to a threshold;
[0241] The prediction unit is used to make predictions based on the optimal feature set to obtain complication prediction results.
[0242] Optionally, the complication prediction device 500 further includes:
[0243] An information extraction module is used to extract information from medical knowledge text based on predefined entity classes and relationships to obtain initial triples;
[0244] A coreference resolution module, used for performing coreference resolution on the initial triples based on a predefined synonym table to obtain target triples;
[0245] A construction module is used to construct the medical knowledge graph using the entities of the target triples as nodes and the relationships of the target triples as edges.
[0246] Optionally, the information extraction module includes:
[0247] The second input unit is used to input the medical knowledge text into the entity-relationship joint extraction model for information extraction to obtain an initial triple. The entity-relationship joint extraction model includes:
[0248] A first embedding layer, the first embedding layer is used to obtain a vector representation of the medical knowledge text at a word level;
[0249] A sequence layer, wherein the sequence layer is used to accept a vector representation sequence of variable length, convert it into a coding state with a fixed shape, and then map the coding state with a fixed shape into a label sequence of variable length to obtain a named entity recognition result;
[0250] A dependency layer, wherein the dependency layer is used to classify the relationships between the named entities identified by the named entity recognition result to obtain a relationship recognition result;
[0251] The initial triplet is obtained based on the named entity recognition result and the relationship recognition result.
[0252] Optionally, the preprocessing module 501 includes:
[0253] An information extraction unit, configured to extract information from the user data to obtain user information, wherein the user data includes structured data and unstructured data, and the user information includes initial numerical features and initial non-numerical features;
[0254] A fourth processing unit is used to perform dimensionless processing on the initial numerical features after unifying the dimensions to obtain the numerical features;
[0255] The fifth processing unit is used to perform noun unification processing on the initial non-numeric features based on preset rules and a vocabulary and then convert them into Boolean type to obtain the non-numeric features.
[0256] Optionally, the information extraction unit is specifically used to:
[0257] For the structured data, extract the user information under the corresponding field through conditional query to obtain the user information;
[0258] For the unstructured data, annotate text data in the unstructured data to obtain text annotations, input the text data and the corresponding text annotations into a named entity recognition model for recognition, and obtain the user information, wherein the named entity recognition model includes:
[0259] A second embedding layer, the second embedding layer is used to obtain a vector representation of the text annotation word level;
[0260] An encoding layer, the encoding layer is used to accept a variable-length vector representation sequence and convert it into an encoding state with a fixed shape;
[0261] The decoding layer is used to map the coding state with a fixed shape into a sequence of variable length to obtain the labeled text.
[0262] The complication prediction device 500 provided in the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be repeated in this embodiment.
[0263] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0264] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0265] In addition, to ensure data security and user privacy, the present invention uses blockchain technology to encrypt the complication prediction method and complication prediction device as described in any of the above embodiments. Blockchain technology combines computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. to establish a decentralized, tamper-proof digital ledger. The blockchain encryption process involved in the present invention includes:
[0266] Encrypted communication uses encrypted communication protocols to transmit data between nodes in the blockchain network to ensure the security of data transmission, including but not limited to the process of obtaining historical user information and new user information.
[0267] Encrypted storage: data on the blockchain will be permanently stored on distributed nodes. Each node will store a complete copy of the encrypted data to ensure that the data will not be tampered with, including but not limited to the user's disease intelligent prediction results.
[0268] Encrypted identity authentication, users in the blockchain network are authenticated through digital signatures. Each user has his or her own public key and private key for encrypting and decrypting data, including but not limited to the modification of indicator rules in the process of building the indicator rule library.
[0269] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present invention is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity.
[0270] like Figure 6 As shown, an embodiment of the present application provides an electronic device 600, comprising: a memory 602, a processor 601, and a program stored in the memory 602 and executable on the processor 601; the processor 601 is used to read the program in the memory 602 to implement the steps in the complication prediction method as described above.
[0271] An embodiment of the present application also provides a readable storage medium, on which a program is stored. When the program is executed by a processor, the various processes of the above-mentioned complication prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as compact disk (CD), digital video disc (DVD), Blu-ray Disc (BD), high-definition versatile disc (HVD), etc.), and semiconductor memory (such as read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read only memory (EEPROM), non-volatile memory (NAND FLASH), solid-state drive (Solid State Disk or Solid State Drive, SSD)), etc.
[0272] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0273] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0274] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A complication prediction method, characterized in that: include: Preprocess the user data to obtain original features, where the original features include numerical features and non-numerical features, and the numerical features are used to represent target indicators and corresponding target indicator values; Based on a pre-built rule base, a target indicator value in the numerical feature is mapped to a target range category to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent a mapping relationship between an indicator value and a range category; Based on a pre-constructed medical knowledge graph, an entity knowledge representation vector corresponding to the non-numerical feature and an entity knowledge representation vector corresponding to the indicator range feature are obtained through entity resolution, wherein the medical knowledge graph includes a plurality of target triples, and the target triples include a head entity, a relationship, and a tail entity; Inputting the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results; The method of obtaining the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the indicator range feature through entity resolution based on the pre-constructed medical knowledge graph includes: Searching the medical knowledge graph based on the non-numerical features and the indicator range features; For the non-numeric feature, when a first target entity matching the non-numeric feature is retrieved, the knowledge representation vector corresponding to the first target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature; otherwise, a second target entity is determined based on the similarity between the entity semantic embedding of the non-numeric feature and the semantic embedding of the entity in the medical knowledge graph, and the knowledge representation vector corresponding to the second target entity is determined as the entity knowledge representation vector corresponding to the non-numeric feature; For the indicator range type feature, when a third target entity matching the indicator range type feature is retrieved, the knowledge representation vector corresponding to the third target entity is determined as the entity knowledge representation vector corresponding to the indicator range type feature; otherwise, based on the target indicator and the target range category, the entity knowledge representation vector corresponding to the indicator range type feature is obtained by calculation.
2. The method according to claim 1, characterized in that: The step of inputting the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results includes: After concatenating the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the index range feature, the concatenation is combined with the original feature to form a joint input; Inputting the combined input into the pre-trained disease intelligent prediction model, calculating the importance score of each feature, and obtaining an optimal feature set, wherein the importance score of the features in the optimal feature set is greater than or equal to a threshold; Prediction is performed based on the optimal feature set to obtain a complication prediction result.
3. The method according to claim 1, characterized in that: Before obtaining the entity knowledge representation vector corresponding to the non-numerical feature and the entity knowledge representation vector corresponding to the indicator range feature through entity resolution based on the pre-constructed medical knowledge graph, the method further includes: Based on the predefined entity classes and relations, information is extracted from the medical knowledge text to obtain the initial triples; Based on a predefined synonym table, coreference resolution is performed on the initial triples to obtain target triples; The medical knowledge graph is constructed with the entities of the target triples as nodes and the relationships of the target triples as edges.
4. The method according to claim 3, characterized in that: Based on the predefined entity classes and relationships, information is extracted from the medical knowledge text to obtain initial triples, including: The medical knowledge text is input into the entity-relationship joint extraction model for information extraction to obtain an initial triple. The entity-relationship joint extraction model includes: A first embedding layer, the first embedding layer is used to obtain a vector representation of the medical knowledge text at a word level; A sequence layer, wherein the sequence layer is used to accept a vector representation sequence of variable length, convert it into a coding state with a fixed shape, and then map the coding state with a fixed shape into a label sequence of variable length to obtain a named entity recognition result; A dependency layer, wherein the dependency layer is used to classify the relationships between the named entities identified by the named entity recognition result to obtain a relationship recognition result; The initial triplet is obtained based on the named entity recognition result and the relationship recognition result.
5. The method according to claim 1, characterized in that: The preprocessing of the user data to obtain the original features includes: Extracting information from the user data to obtain user information, wherein the user data includes structured data and unstructured data, and the user information includes initial numerical features and initial non-numerical features; De-dimensionalizing the initial numerical features after unifying the dimensions to obtain the numerical features; The initial non-numerical features are converted into Boolean type after being subjected to noun unification processing based on preset rules and vocabulary, thereby obtaining the non-numerical features.
6. The method according to claim 5, characterized in that: The extracting information from the user data to obtain user information includes: For the structured data, extract the user information under the corresponding field through conditional query to obtain the user information; For the unstructured data, annotate text data in the unstructured data to obtain text annotations, input the text data and the corresponding text annotations into a named entity recognition model for recognition, and obtain the user information, wherein the named entity recognition model includes: A second embedding layer, the second embedding layer is used to obtain a vector representation of the text annotation word level; An encoding layer, the encoding layer is used to accept a variable-length vector representation sequence and convert it into an encoding state with a fixed shape; The decoding layer is used to map the coding state with a fixed shape into a sequence of variable length to obtain the labeled text.
7. A complication prediction device, characterized in that: include: A preprocessing module, used to preprocess user data to obtain original features, wherein the original features include numerical features and non-numerical features, and the numerical features are used to represent target indicators and corresponding target indicator values; A mapping module, used to map the target indicator value in the numerical feature to a target range category based on a pre-built rule base, to obtain a corresponding indicator range feature, wherein the indicator range feature includes the target indicator and the target range category, and the rule base is used to represent the mapping relationship between the indicator value and the range category; A parsing module, for obtaining an entity knowledge representation vector corresponding to the non-numerical feature and an entity knowledge representation vector corresponding to the indicator range feature through entity parsing based on a pre-constructed medical knowledge graph, wherein the medical knowledge graph includes a plurality of target triples, and the target triples include a head entity, a relationship, and a tail entity; An input module, used for inputting the entity knowledge representation vectors corresponding to the original features and the non-numerical features and the entity knowledge representation vectors corresponding to the indicator range features into a pre-trained disease intelligent prediction model to obtain complication prediction results; Wherein, the parsing module includes: A retrieval unit, configured to search the medical knowledge graph based on the non-numerical feature and the indicator range feature; A first processing unit is used for, for the non-numeric feature, when a first target entity matching the non-numeric feature is retrieved, determining the knowledge representation vector corresponding to the first target entity as the entity knowledge representation vector corresponding to the non-numeric feature; otherwise, determining a second target entity based on the similarity between the entity semantic embedding of the non-numeric feature and the semantic embedding of the entity in the medical knowledge graph, and determining the knowledge representation vector corresponding to the second target entity as the entity knowledge representation vector corresponding to the non-numeric feature; The second processing unit is used for, for the indicator range type feature, when a third target entity matching the indicator range type feature is retrieved, determining the knowledge representation vector corresponding to the third target entity as the entity knowledge representation vector corresponding to the indicator range type feature; otherwise, obtaining the entity knowledge representation vector corresponding to the indicator range type feature by calculation based on the target indicator and the target range category.
8. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the complication prediction method as described in any one of claims 1 to 6.
9. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the complication prediction method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Auxiliary disease differential diagnosis system based on causality-containing medical knowledge graph
CN113871003A
Chronic disease clinical decision support system and construction method
CN117423470A