Diagnosis and treatment reasoning-oriented graph embedding method and system

Through the DisenKGAT model and knowledge graph completion task, the entities and relationships in the critically ill-care knowledge graph are embedded in low-dimensional vectors, combined with the relationship topology structure, the problem of inaccurate diagnosis in traditional diagnosis and treatment methods is solved, and high-accurate diagnosis and treatment is achieved Improved inference and data representation capabilities provide accurate diagnostic and therapeutic support for critically ill patients.

CN118919087APending Publication Date: 2024-11-08SINOSOFT
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411341164.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Traditional diagnosis and treatment methods have problems such as inaccurate diagnosis and treatment in the diagnosis and treatment reasoning of critically ill patients. It is difficult for the existing technology to make full use of the knowledge graph information of critically ill patients to improve the accuracy of diagnosis and treatment reasoning and data representation ability.

Method used

Using a graph embedding method for diagnosis and treatment inference, entities and relationships are embedded into low-dimensional vectors through the DisenKGAT model, combining relation topology structure and knowledge graph completion tasks to construct highly discriminant entities and relationship embeddings to improve the accuracy of diagnosis and treatment inference .

Benefits of technology

It significantly improves the accuracy of diagnosis and treatment reasoning and the data representation ability of the model in critically ill patients, provides reliable support for diagnosis and treatment, and optimizes diagnosis and treatment effects through potential similar diseases and treatment suggestions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118919087A_ABST
    Figure CN118919087A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of diagnosis and treatment reasoning, and particularly discloses a graph embedding method and system oriented to diagnosis and treatment reasoning, and the method comprises the steps: collecting knowledge graph data in the medical field, including entities and relationships between the entities, representing the entities as a plurality of independent vectors through decoupling, entity embedding is updated through a relation perception information aggregation mechanism to construct a relation importance degree matrix, the importance degree of a relation and a subgraph relation in an original triple is determined, collected data is preprocessed, noise data is removed, standardization processing is carried out, and the consistency and integrity of the data are ensured; constructing an entity relationship importance matrix corresponding to the topological structure; the method comprises the following steps: determining embedding of a head entity and an entity relationship of a triple through scoring function measurement, forming the triple by a tail entity and the embedding of the head entity and the entity relationship, and predicting a knowledge graph by utilizing the triple to obtain potential similar diseases and treatment suggestions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of diagnosis and treatment reasoning technology, and in particular to a graph embedding method and system for diagnosis and treatment reasoning. Background Art

[0002] The diagnosis and treatment reasoning of critically ill patients is a complex and critical process. Traditional diagnosis and treatment methods rely on the experience and knowledge of doctors. In the face of complex and changing conditions, there may be problems of inaccurate diagnosis or untimely treatment. With the development of artificial intelligence technology, graph embedding technology has become an effective means to convert entities (such as patients, symptoms, etc.) and relationships (such as drugs, parts, etc.) in critical knowledge graphs into low-dimensional vector representations, improve the discriminability of data features, thereby improving reasoning accuracy and providing reliable support for diagnosis and treatment.

[0003] Therefore, how to provide a graph embedding method and system for diagnostic and treatment reasoning, use highly discriminative entity and relationship embedding to significantly improve the accuracy of diagnostic and treatment reasoning; make full use of the information of critical and emergency knowledge graphs to improve the data representation ability of the model; and further optimize and verify the model effect through knowledge graph completion tasks, are technical problems that need to be urgently solved by technical personnel in this field. Summary of the invention

[0004] To achieve the purpose of the present invention, the present application provides a graph embedding method for diagnosis and treatment reasoning, comprising:

[0005] Step S1: Collect knowledge graph data in the medical field, including entities and relationships between entities, represent entities as multiple independent vectors through decoupling, and update entity embeddings through a relationship-aware information aggregation mechanism;

[0006] The entities include: patients, symptoms, drugs, and parts;

[0007] Step S2: construct a relationship importance matrix, determine the importance of the relationship in the original triple and the subgraph relationship, pre-process the collected data, remove noise data and perform standardization to ensure the consistency and integrity of the data, and construct an entity relationship importance matrix corresponding to the topological structure;

[0008] Step S3: Determine the embedding of the head entity and entity relationship of the triple by measuring with a scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

[0009] In some specific embodiments, step S1 includes:

[0010] Step S11: Initialize entity embeddings, map the initialized entity embeddings to different latent spaces, and construct a relationship importance matrix to measure the importance of different relationships to the reasoning task;

[0011] Step S12: Through the mapping relationship perception information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

[0012] In some specific embodiments, the relationship-aware aggregation mechanism of the DisenKGAT model is defined as shown in the formula:

[0013]

[0014]

[0015] Among them, N represents the neighbors connected to entity u through relationship r, k represents the number of entities in the embedding mapping space, φ(e v,k ,e r ,θ r ) represents the information aggregation of entity embedding and relationship embedding, θ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedding representation of entity v in space k, · represents the dot product operation of two embedding representations, σ represents the nonlinear activation function ReLU, e u,k represents the embedding of entity u in the kth space, Represents a relation-aware aggregation mechanism.

[0016] In some specific embodiments, step S2 includes:

[0017] Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure;

[0018] Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information;

[0019] Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

[0020] In some specific embodiments, step S3 includes: using the scoring function ConvE model to concatenate the head entity embedding and the relationship embedding through a convolution operation, and calculating the inner product with the tail entity embedding through a fully connected layer to determine the triplet score.

[0021] To achieve the same invention purpose, the present application also provides a graph embedding system for diagnosis and treatment reasoning, including:

[0022] Entity Embedding Module: It is used to collect knowledge graph data in the medical field, including entities and the relationships between entities. It represents entities as multiple independent vectors through decoupling, and updates entity embeddings through a relationship-aware information aggregation mechanism.

[0023] The entities include: patients, symptoms, drugs, and parts;

[0024] Relationship embedding module: used to construct a relationship importance matrix, determine the importance of the relationship in the original triple and the subgraph relationship, preprocess the collected data, remove noise data and perform standardization to ensure the consistency and integrity of the data, and construct an entity relationship importance matrix corresponding to the topological structure;

[0025] Knowledge graph completion module: used to measure and determine the embedding of the head entity and entity relationship of the triple through the scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

[0026] In some specific embodiments, the entity embedding module is used to perform the following steps:

[0027] Step S11: Initialize entity embeddings and map the initialized entity embeddings to different latent spaces;

[0028] Step S12: Through the mapping relationship perception information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

[0029] In some specific embodiments, the relationship-aware aggregation mechanism of the DisenKGAT model is defined as shown in the formula:

[0030]

[0031]

[0032] Where N represents the neighbors connected to entity u through relation r, k represents the number of entities in the embedding mapping space, ψ(e v,k ,e r ,θ r ) represents the information aggregation of entity embedding and relationship embedding, θ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedding representation of entity v in space k, · represents the dot product operation of two embedding representations, σ represents the nonlinear activation function ReLU, e u,k represents the embedding of entity u in the kth space, Represents a relation-aware aggregation mechanism.

[0033] In some specific embodiments, the relationship embedding module is used to perform the following steps:

[0034] Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure;

[0035] Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information;

[0036] Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

[0037] In some of the specific embodiments, the knowledge graph completion module is used to: use the scoring function ConvE model to concatenate the head entity embedding and the relationship embedding through a convolution operation, and calculate the inner product with the tail entity embedding through a fully connected layer to determine the triple score.

[0038] Beneficial effects of the above technical solution:

[0039] This application can convert entities (such as patients, symptoms, etc.) and relationships (such as drugs, parts, etc.) in the knowledge graph of critical and emergency diseases into low-dimensional vector representations, improve the discriminability of data features, thereby improving the accuracy of reasoning and providing reliable support for diagnosis and treatment. This application proposes a graph embedding technology based on the DisenKGAT model, which integrates the relationship topology structure to update the relationship embedding, and introduces the knowledge graph completion task. By constructing a graph embedding model for diagnosis and treatment reasoning, the information of the knowledge graph of critical and emergency diseases is fully utilized to improve the data representation ability and reasoning accuracy of the model. The model of the present invention significantly improves the accuracy of diagnosis and treatment reasoning through highly discriminative entity and relationship embedding; fully utilizes the information of the knowledge graph of critical and emergency diseases to improve the data representation ability of the model; and further optimizes and verifies the model effect through the knowledge graph completion task. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A schematic diagram of a flow chart of a graph embedding method for diagnosis and treatment reasoning provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the structure of a graph embedding system for diagnosis and treatment reasoning provided for one embodiment of the present invention. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0044] Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0045] Embodiment 1

[0046] An embodiment of the present invention provides a graph embedding method for diagnosis and treatment reasoning, comprising:

[0047] Step S1: Collect knowledge graph data in the medical field, including entities and the relationships between entities, represent entities as multiple independent vectors through decoupling, and update entity embeddings through a relationship-aware information aggregation mechanism.

[0048] In a specific embodiment of the present invention, step S1 includes:

[0049] Step S11: Initialize entity embeddings and map the initialized entity embeddings to different latent spaces;

[0050] Step S12: Through the mapping relationship perception information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

[0051] In a specific embodiment of the present invention, entity embedding is mainly generated based on the DisenKGAT model. The DisenKGAT model improves the knowledge graph representation capability of the model by decoupling entities into multiple independent vectors, and updates entity embedding through a relationship-aware information aggregation mechanism.

[0052] Specifically, assume that E is an entity set, R is a relationship set, and G is a knowledge graph consisting of triples (u, r, v), where u∈E, v∈E, and r∈R. u represents the embedding of the head entity u, ev represents the embedding of the tail entity v, e r Representing the embedding of relation r, first, the model initializes the entity embedding, and then maps the initialized embedding to different latent spaces, as shown in the formula:

[0053] e u,k =σ(W k ·x u )

[0054] Among them, e u,k represents the embedding of entity u in the kth space, σ is the nonlinear activation function ReLU, x u is the feature of entity u, W = {W1, W2, ..., W k} represents the projection matrix of different spaces.

[0055] Specifically, in order to achieve different topics in different spaces, the model adopts a relationship-aware information aggregation mechanism. When aggregating neighbor information, the relationship between entities and neighbors is considered, and neighbors related to the topic are given a higher weight. The relationship-aware aggregation mechanism of the DisenKGAT model is defined as follows:

[0056]

[0057]

[0058] Among them, N represents the neighbors connected to entity u through relationship r, k represents the number of entities in the embedding mapping space, φ(e v,k , e r ,θ r ) represents the information aggregation of entity embedding and relationship embedding, θ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedding representation of entity v in space k, · represents the dot product operation of two embedding representations, σ represents the nonlinear activation function ReLU, e u,k represents the embedding of entity u in the kth space, Represents a relation-aware aggregation mechanism.

[0059] Use the preprocessed data to train the model, use the appropriate optimization algorithm (Adam) and loss function (cross entropy) to optimize the parameters, adjust the model hyperparameters through the validation set to prevent overfitting and improve the generalization ability of the model. Evaluate the model through the test set, and use indicators such as accuracy, recall, and F1-score to measure model performance.

[0060] The trained model is applied to actual diagnosis and treatment reasoning tasks to provide decision support for doctors. In this way, the actual data combination steps of the DisenKGAT model are more specific and detailed, which can clearly show how the algorithm is applied in actual diagnosis and treatment reasoning.

[0061] Step S2: Construct a relationship importance matrix, determine the importance of the relationships in the original triples and the subgraph relationships, preprocess the collected data, remove noise data and perform standardization to ensure the consistency and integrity of the data, and construct an entity relationship importance matrix corresponding to the topological structure.

[0062] In a specific embodiment of the present invention, step S2 includes:

[0063] Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure;

[0064] Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information;

[0065] Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

[0066] In a specific embodiment of the present invention, the relational topology structure describes the association pattern between relations, and the importance of information provided by different relations is also different. In the knowledge graph representation learning, the relational information can be aggregated through the relational topology to enhance the representation ability of the knowledge graph. Therefore, this project introduces a relational information aggregation mechanism based on relational topology. At the same time, this project adopts a method of dividing subgraphs, and divides the subgraphs according to the batch size set in advance, which can effectively reduce the amount of calculation and speed up the training of the model.

[0067] Specifically, after initialization, by querying the importance matrix W of each relationship r , we can get the importance of the relationship in the original triple and the relationship in the subgraph, and construct the relationship importance matrix corresponding to the topological structure. Finally, we aggregate the relationship neighborhood information to get the topological structure embedding of the relationship r. The formula is as follows:

[0068]

[0069] Among them, n means there are n kinds of relationship topological structures; ∧ p ∈R n×m Represents the relationship importance matrix corresponding to the p-th relationship topology. The matrix is ​​obtained by querying the trainable matrix Wr to construct; R is the embedding slice of relation r in the initial relation embedding; W p ∈R d×d represents the weight parameter matrix; d represents the relationship embedding dimension. According to the above formula, adaptive relationship selection is achieved through the trainable importance matrix ∧, and adaptive relationship aggregation is completed.

[0070] After obtaining the neighborhood information of relation r, the topological structure is integrated to embed the embedding of the updated relation. The formula is as follows:

[0071]

[0072] Where σ represents the activation function ReLU, e r represents the embedding of relation r, represents the concatenation of two embeddings, r N represents the topological structure embedding, W rel ∈R d×d is a trainable matrix. r and topological structure embedding N After concatenation, the relation embedding is updated through a fully connected layer and activation function, and finally normalized. r .

[0073] Step S3: Determine the embedding of the head entity and entity relationship of the triple by measuring with a scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

[0074] In a specific embodiment of the present invention, the scoring function ConvE model is used to concatenate the head entity embedding and the relation embedding through a convolution operation, and the inner product with the tail entity embedding is calculated through a fully connected layer to determine the triple score.

[0075] Specifically, the scoring function measures the possibility that a candidate tail entity can form a triple with the given head entity and relation embeddings. The scoring function ConvE concatenates the head entity embedding and the relation embedding through a convolution operation, and calculates the inner product with the tail entity embedding through a fully connected layer to obtain the triple score. The loss function is then used to guide the training and optimization of the model by measuring the difference between the predicted value and the true value.

[0076] The scoring function measures the possibility that a candidate tail entity can form a triple with the given head entity and relation embedding. The formula of the scoring function ConvE is as follows:

[0077]

[0078] Among them, e u represents the head entity embedding, er Denote the relation embedding as e v Denote the tail entity embedding, × represents the Hadamard product operation, ω represents the convolutional kernel, W represents the matrix, and f represents the non-linear function. [e u ; e r represents the concatenation of two embeddings, and vec represents reshaping the tensor into a vector. The convolution operation is to concatenate the head entity embedding and the relation embedding, pass through the fully connected layer, and finally calculate the inner product with the tail entity embedding to obtain the triple score.

[0079] The loss function is as shown in the formula:

[0080]

[0081] Among them, n represents a total of n samples, i represents the i-th sample, pred represents the value output by the model, and t represents the true value of the target. t[i] represents the true value of the target for the i-th sample, and pred[i] represents the value output by the model for the i-th sample.

[0082] Specifically, assume the triple instance:

[0083] 1. Head Entity: Patient A

[0084] 2. Relation: Patient

[0085] 3. Tail Entity: Disease X

[0086] In this triple, it means that Patient A has Disease X. Through the graph embedding technology, Patient A, Disease X, and the relationship "has" between them are mapped into the low-dimensional vector space.

[0087] Application example:

[0088] 1) Embedding representation of entities and relations:

[0089] Using the graph embedding method, map Patient A to the vector PA, Disease X to the vector DX, and the relation "has" to the vector R_has.

[0090] 2) Application of the scoring function:

[0091] Define a scoring function F(PA, R_has, DX), which is used to measure the rationality of connecting the head entity Patient A and the tail entity Disease X through the relation "has". The higher the value of the scoring function, the more reasonable the triple is.

[0092] 3) Reasoning and prediction of the knowledge graph:

[0093] Using the scoring function, we can search the knowledge graph for other patients similar to patient A and the diseases they suffer from. For example, if the embedding vector PB of patient B is very close to PA, we can infer that patient B may also suffer from disease X or a similar disease.

[0094] 4) Discovery of similar diseases:

[0095] By comparing the embedding vectors of different patients, we can discover groups of patients with similar symptoms and further analyze the diseases they suffer from to identify potential similar diseases.

[0096] 5) Recommendations for similar treatment options:

[0097] Once similar diseases are identified, similar treatments can be recommended to patients based on the treatment information already available in the knowledge graph. For example, if disease X is usually treated with drug Y, patient A can be recommended to also use drug Y.

[0098] Through the application examples of the above triples, we can see how graph embedding technology can help medical professionals make effective inferences and predictions in knowledge graphs, thereby providing patients with more personalized and accurate diagnosis and treatment recommendations. This approach can greatly improve the accuracy and efficiency of diagnosis and treatment.

[0099] The present invention provides a graph embedding technology for diagnosis and treatment reasoning. Through a graph embedding method based on the DisenKGAT model, the relationship topology structure and knowledge graph completion tasks are integrated to comprehensively improve the diagnosis and treatment reasoning ability and reliability of the model, providing more accurate and effective support for the diagnosis and treatment of critically ill patients.

[0100] Embodiment 2

[0101] An embodiment of the present invention provides a graph embedding system for diagnosis and treatment reasoning, including:

[0102] Entity embedding module 10: used to collect knowledge graph data in the medical field, including entities and the relationships between entities, represent entities as multiple independent vectors through decoupling, and update entity embedding through a relationship-aware information aggregation mechanism.

[0103] In a specific embodiment of the present invention, the entity embedding module 10 is used to perform the following steps:

[0104] Step S11: Initialize entity embeddings and map the initialized entity embeddings to different latent spaces;

[0105] Step S12: Through the mapping relationship perception information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

[0106] In a specific embodiment of the present invention, entity embedding is mainly generated based on the DisenKGAT model. The DisenKGAT model improves the knowledge graph representation capability of the model by decoupling entities into multiple independent vectors, and updates entity embedding through a relationship-aware information aggregation mechanism.

[0107] Specifically, assume that E is an entity set, R is a relationship set, and G is a knowledge graph consisting of triples (u, r, v), where u∈E, v∈E, and r∈R. u represents the embedding of the head entity u, e v represents the embedding of the tail entity v, e r Representing the embedding of relation r, first, the model initializes the entity embedding, and then maps the initialized embedding to different latent spaces, as shown in the formula:

[0108] e u,k =σ(W k ·x u )

[0109] Among them, e u,k represents the embedding of entity u in the kth space, σ is the nonlinear activation function ReLU, x u is the feature of entity u, W = {W1, W2, ..., W k} represents the projection matrix of different spaces.

[0110] In order to achieve different topics in different spaces, the model adopts a relationship-aware information aggregation mechanism. When aggregating neighbor information, the relationship between entities and neighbors is considered, and neighbors related to the topic are given a higher weight. The relationship-aware aggregation mechanism of the model is defined as shown in the formula:

[0111]

[0112]

[0113] Among them, N represents the neighbors connected to entity u through relationship r, k represents the number of entities in the embedding mapping space, φ(e v,k , e r ,θ r ) represents the information aggregation of entity embedding and relationship embedding, θ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedded representation of entity v in space k, and represents the dot product operation of two embedded representations.

[0114] Relationship embedding module 20: used to construct a relationship importance matrix, determine the importance of the relationship in the original triple and the subgraph relationship, preprocess the collected data, remove noise data and perform standardization to ensure the consistency and integrity of the data, and construct an entity relationship importance matrix corresponding to the topological structure.

[0115] In a specific embodiment of the present invention, the relationship embedding module 20 is used to perform the following steps:

[0116] Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure;

[0117] Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information;

[0118] Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

[0119] In a specific embodiment of the present invention, the relational topology structure describes the association pattern between relations, and the importance of information provided by different relations is also different. In the knowledge graph representation learning, the relational information can be aggregated through the relational topology to enhance the representation ability of the knowledge graph. Therefore, this project introduces a relational information aggregation mechanism based on relational topology. At the same time, this project adopts a method of dividing subgraphs, and divides the subgraphs according to the batch size set in advance, which can effectively reduce the amount of calculation and speed up the training of the model.

[0120] Specifically, after initialization, by querying the importance matrix W of each relationship r , we can get the importance of the relationship in the original triple and the relationship in the subgraph, and construct the relationship importance matrix corresponding to the topological structure. Finally, we aggregate the relationship neighborhood information to get the topological structure embedding of the relationship r. The formula is as follows:

[0121]

[0122] Among them, n means there are n kinds of relationship topological structures; ∧ p ∈R n×m Represents the relationship importance matrix corresponding to the p-th relationship topology. The matrix is ​​obtained by querying the trainable matrix W r to construct; R is the embedding slice of relation r in the initial relation embedding; W p ∈R d×drepresents the weight parameter matrix; d represents the relationship embedding dimension. According to the above formula, adaptive relationship selection is achieved through the trainable importance matrix ∧, and adaptive relationship aggregation is completed.

[0123] After obtaining the neighborhood information of relation r, the topological structure is integrated to embed the embedding of the updated relation. The formula is as follows:

[0124]

[0125] Where σ represents the activation function ReLU, e r represents the embedding of relation r, represents the concatenation of two embeddings, r N represents the topological structure embedding, W rel ∈R d×d is a trainable matrix. r and topological structure embedding N After concatenation, the relation embedding is updated through a fully connected layer and activation function, and finally normalized. r .

[0126] The knowledge graph completion module 30 is used to measure and determine the embedding of the head entity and entity relationship of the triple through a scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

[0127] In a specific embodiment of the present invention, the knowledge graph completion module 30 is used to: use the scoring function ConvE model to concatenate the head entity embedding and the relationship embedding through a convolution operation, and calculate the inner product with the tail entity embedding through a fully connected layer to determine the triple score.

[0128] Specifically, the scoring function measures the possibility that a candidate tail entity can form a triple with the given head entity and relation embeddings. The scoring function ConvE concatenates the head entity embedding and the relation embedding through a convolution operation, and calculates the inner product with the tail entity embedding through a fully connected layer to obtain the triple score. The loss function is then used to guide the training and optimization of the model by measuring the difference between the predicted value and the true value.

[0129] The scoring function measures the possibility that a candidate tail entity can form a triple with the given head entity and relation embedding. The formula of the scoring function ConvE is as follows:

[0130]

[0131] Among them, e u represents the head entity embedding, e r represents relation embedding, e vrepresents tail entity embedding, × represents Hadamard product operation, ω represents convolution kernel, W represents matrix, and f represents nonlinear function. u ;e r ] represents the concatenation of two embeddings, and vec represents the transformation of a tensor into a vector. The convolution operation concatenates the head entity embedding and the relation embedding, passes through a fully connected layer, and finally calculates the inner product with the tail entity embedding to obtain the triple score.

[0132] The loss function is shown in the formula:

[0133]

[0134] Where n represents a total of n samples, i represents the i-th sample, pred represents the value output by the model, and t represents the true value of the target. t[i] represents the true value of the target for the i-th sample, and pred[i] represents the model output value for the i-th sample.

[0135] The present invention provides a graph embedding technology for diagnosis and treatment reasoning. Through a graph embedding method based on the DisenKGAT model, the relationship topology structure and knowledge graph completion tasks are integrated to comprehensively improve the diagnosis and treatment reasoning ability and reliability of the model, providing more accurate and effective support for the diagnosis and treatment of critically ill patients.

[0136] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0137] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referenced to each other. The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention. Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0138] The method and device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

[0139] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "one specific embodiment" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A graph embedding method for diagnosis and treatment reasoning, It is characterized in that include: Step S1: Collect knowledge graph data in the medical field, including entities and relationships between entities, represent entities as multiple independent vectors through decoupling, and update entity embeddings through a relationship-aware information aggregation mechanism; The entities include: patients, symptoms, drugs, and parts; Step S2: construct a relationship importance matrix, determine the importance of the relationship in the original triple and the subgraph relationship, pre-process the collected data, remove noise data and perform standardization to ensure the consistency and integrity of the data, and construct an entity relationship importance matrix corresponding to the topological structure; Step S3: Determine the embedding of the head entity and entity relationship of the triple by measuring with a scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

2. According to claim 1, the graph embedding method for diagnosis and treatment reasoning, It is characterized in that Step S1 includes: Step S11: Initialize entity embeddings using random initialization or vectors based on a pre-trained model, and map the initialized entity embeddings into different latent spaces; Step S12: The initialized entity embedding is mapped into different latent spaces to form a multi-dimensional representation. Through the mapping relationship-aware information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

3. According to claim 2, the graph embedding method for diagnosis and treatment reasoning, It is characterized in that The relationship-aware aggregation mechanism of the DisenKGAT model is defined as follows: Among them, N represents the neighbors connected to entity u through relationship r, k represents the number of entities in the embedding mapping space, φ(e v,k ,e r ,γ r ) represents the information aggregation of entity embedding and relationship embedding, γ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedding representation of entity v in space k, · represents the dot product operation of two embedding representations, σ represents the nonlinear activation function ReLU, e u,k represents the embedding of entity u in the kth space, Represents a relation-aware aggregation mechanism.

4. The graph embedding method for diagnosis and treatment reasoning according to claim 1, It is characterized in that Step S2 includes: Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure; Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information; Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

5. According to claim 1, the graph embedding method for diagnosis and treatment reasoning, It is characterized in that Step S3 includes: using the scoring function ConvE model to concatenate the head entity embedding and the relationship embedding through a convolution operation, and calculating the inner product with the tail entity embedding through a fully connected layer to determine the triple score.

6. A graph embedding system for diagnosis and treatment reasoning, It is characterized in that include: Entity Embedding Module: It is used to collect knowledge graph data in the medical field, including entities and the relationships between entities. It represents entities as multiple independent vectors through decoupling, and updates entity embeddings through a relationship-aware information aggregation mechanism. Wherein, the entities include: patients, symptoms, drugs, and parts; Relationship embedding module: constructs a relationship importance matrix, determines the importance of the relationship in the original triple and the subgraph relationship, preprocesses the collected data, removes noise data and performs standardization to ensure the consistency and integrity of the data, and constructs an entity relationship importance matrix corresponding to the topological structure; Knowledge graph completion module: used to measure and determine the embedding of the head entity and entity relationship of the triple through the scoring function, form a triple with the tail entity and the embedding of the head entity and entity relationship, and use the triple to predict the knowledge graph to obtain potential similar diseases and treatment suggestions.

7. The graph embedding system for diagnosis and treatment reasoning according to claim 6, It is characterized in that The entity embedding module is used to perform the following steps: Step S11: Initialize entity embeddings using random initialization or vectors based on a pre-trained model, and map the initialized entity embeddings into different latent spaces; Step S12: The initialized entity embedding is mapped into different latent spaces to form a multi-dimensional representation. Through the mapping relationship-aware information aggregation mechanism, the DisenKGAT model determines the weight of the neighborhood according to the connection relationship between the entity and the neighborhood when aggregating neighborhood information.

8. The graph embedding system for diagnosis and treatment reasoning according to claim 7, It is characterized in that The relationship-aware aggregation mechanism of the DisenKGAT model is defined as follows: Among them, N represents the neighbors connected to entity u through relationship r, k represents the number of entities in the embedding mapping space, φ(e v,k ,e r ,θ r ) represents the information aggregation of entity embedding and relationship embedding, θ represents the projection matrix of a specific relationship, represents the embedding representation of entity u in space k, represents the embedding representation of entity v in space k, · represents the dot product operation of two embedding representations, σ represents the nonlinear activation function ReLU, e u,k represents the embedding of entity u in the kth space, Represents a relation-aware aggregation mechanism.

9. The graph embedding system for diagnosis and treatment reasoning according to claim 6, It is characterized in that The relation embedding module is used to perform the following steps: Step S21: Based on the relationship information aggregation mechanism of the relationship topology, query the importance matrix of each relationship, determine the importance of the relationship in the original triple and the relationship in the subgraph, and construct an entity relationship importance matrix corresponding to the topological structure; Step S22: Determine the topological structure embedding of the entity relationship by aggregating the relationship neighborhood information; Step S23: After concatenating the embedding of the entity relationship and the topological structure embedding of the entity relationship, the embedding of the entity relationship is updated through a fully connected layer and an activation function.

10. The graph embedding system for diagnosis and treatment reasoning according to claim 6, It is characterized in that The knowledge graph completion module is used to: use the scoring function ConvE model to concatenate the head entity embedding and the relationship embedding through convolution operations, and calculate the inner product with the tail entity embedding through the fully connected layer to determine the triple score.

Citation Information

Cited By

  • Online medical inquiry method and system based on large language model language reasoning analysis

    CN119274774A