Graph model training method, application method and related equipment based on rare diseases
By constructing and training heterogeneous graph models, the problems of data sparseness and information mismatch in rare disease data analysis are solved, and the accuracy of rare disease data analysis is improved.
Patent Information
- Application Number
- CN202410713907.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing data processing methods are difficult to learn effective patterns from scarce data in the field of rare diseases, resulting in low analysis accuracy, mainly due to data sparseness and mismatch of doctor-patient information.
By identifying entities and their associated relationships from historical rare disease information and medical information, a heterogeneous graph is constructed and input into the initial graph model for training, and node vectors are aggregated to generate target vectors to improve the accuracy of data analysis.
By increasing the analysis capabilities of rare disease data, the accuracy of rare disease data analysis is improved and the problems of data sparseness and information mismatch are overcome.
Smart Images

Figure CN118299064B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a graph model training method based on rare diseases, an application method and related equipment. Background Art
[0002] Currently, the data analysis process for rare diseases has problems such as mismatched information between doctors and patients, sparse data, and complex symptom-disease relationships, which makes it difficult for models that process data for rare diseases to learn effective patterns from rare disease data. For example, traditional machine learning-based methods usually rely on a large amount of labeled data to train models, but in the field of rare diseases, such data is usually not easy to obtain. This leads to low accuracy in data analysis of rare diseases. Summary of the invention
[0003] The embodiments of the present invention provide a rare disease-based graph model training method, application method, and related equipment to improve the accuracy of data analysis on rare diseases.
[0004] In order to solve the above technical problems, the present application embodiment provides a graph model training method based on rare diseases, including:
[0005] Determine multiple entities and association relationships between the entities from historical rare disease information and medical information associated with each rare disease, wherein the entities at least include a user entity and a rare disease entity;
[0006] According to the entities and the association relationship between the entities, a heterogeneous graph is determined, and the heterogeneous graph is input into the initial graph model; the heterogeneous graph includes nodes and connecting edges, the nodes are used to represent the entities in the rare disease, and the connecting edges are used to connect two entities with an association relationship;
[0007] Determine an initial vector of each of the nodes in the heterogeneous graph, and determine a plurality of neighbor nodes of a target node in the heterogeneous graph;
[0008] Aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node until the training is completed, and use the obtained model as the graph model.
[0009] In order to solve the above technical problems, the present application embodiment provides a method for applying a graph model based on rare diseases, including:
[0010] Acquire target medical data;
[0011] Inputting the target medical data into a graph model to obtain a vector corresponding to the target medical data, wherein the graph model is a model trained according to the above-mentioned graph model training method based on rare diseases;
[0012] Based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graphical model, the analysis result of the target medical data is determined.
[0013] In order to solve the above technical problems, the embodiment of the present application further provides a graph model training device based on rare diseases, comprising:
[0014] An entity determination module, used to determine a plurality of entities and association relationships between the entities from historical rare disease information and medical information associated with each rare disease, wherein the entities at least include a user entity and a rare disease entity;
[0015] A heterogeneous graph determination module is used to determine a heterogeneous graph according to the entities and the association relationship between the entities, and input the heterogeneous graph into the initial graph model; the heterogeneous graph includes nodes and connecting edges, the nodes are used to represent the entities in the rare disease, and the connecting edges are used to connect two entities with an association relationship;
[0016] An initial vector determination module, used to determine an initial vector of each of the nodes in the heterogeneous graph, and to determine a plurality of neighboring nodes of a target node in the heterogeneous graph;
[0017] The graph model determination module is used to aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node until the training is completed and the obtained model is used as the graph model.
[0018] In order to solve the above technical problems, the embodiment of the present application further provides a rare disease-based graph model application device, including:
[0019] A target medical data acquisition module, used to acquire target medical data;
[0020] A vector determination module, used for inputting the target medical data into a graph model to obtain a vector corresponding to the target medical data, wherein the graph model is a model trained according to the above-mentioned graph model training method based on rare diseases;
[0021] The analysis result determination module is used to determine the analysis result of the target medical data based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graphical model.
[0022] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned rare disease-based graphical model training method when executing the computer program, or implements the steps of the above-mentioned rare disease-based graphical model application method when executing the computer program.
[0023] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned rare disease-based graphical model training method, or when the computer program is executed by a processor, it implements the steps of the above-mentioned rare disease-based graphical model application method.
[0024] The rare disease-based graph model training method, application method and related equipment provided by the embodiments of the present invention determine multiple entities and the association relationship between each entity from historical rare disease information and medical information associated with each rare disease; determine a heterogeneous graph based on the entities and the association relationship between the entities, and input the heterogeneous graph into the initial graph model; the heterogeneous graph includes nodes and connecting edges, the nodes are used to represent entities in rare diseases, and the connecting edges are used to connect two entities with an association relationship; determine the initial vector of each node in the heterogeneous graph, and determine multiple neighbor nodes of the target node in the heterogeneous graph; aggregate the initial vector of the target node and the initial vectors of the neighbor nodes corresponding to the target node to obtain the target vector of the target node until the training is completed, use the obtained model as the graph model, use the historical rare disease information and the medical information associated with each rare disease, increase the data that can be used for analysis of rare diseases, and based on the graph model, improve the accuracy of data analysis of rare diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0026] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0027] Figure 2 is a flowchart of an embodiment of a rare disease-based graph model training method of the present application;
[0028] Figure 3 is a connection diagram of various entities provided in an embodiment of the present application;
[0029] Figure 4 is a schematic diagram of determining the initial vector of each node provided by an embodiment of the present application;
[0030] Figure 5 It is a schematic diagram of determining multiple neighbor nodes of a target node provided by an embodiment of the present application;
[0031] Figure 6 is a flow chart of an embodiment of a method for applying a graph model based on rare diseases of the present application;
[0032] Figure 7 is a structural schematic diagram of an embodiment of a rare disease-based graphical model training device according to the present application;
[0033] Figure 8 is a structural schematic diagram of an embodiment of a rare disease-based graph model application device according to the present application;
[0034] Fig. 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] See also Figure 1 ,like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0039] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.
[0040] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Eperts Group Audio Layer III), MP4 (Moving Picture Eperts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0041] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0042] It should be noted that the graph model training method based on rare diseases and the graph model application method based on rare diseases provided in the embodiments of the present application are executed by a server. Accordingly, the graph model training device based on rare diseases and the graph model application device based on rare diseases are arranged in the server.
[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.
[0044] See also Figure 2 , Figure 2 A graph model training method based on rare diseases provided by an embodiment of the present invention is shown, and the method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:
[0045] Step 201: Determine multiple entities and association relationships between entities from historical rare disease information and medical information associated with each rare disease, wherein the entities include at least user entities and rare disease entities.
[0046] The above-mentioned historical rare disease information refers to the clinical data of patients with rare diseases, such as the medical records of patients with rare diseases. Each historical rare disease information includes at least the name of the rare disease, patient information, symptoms, and image information (such as medical images). The historical rare disease information can be obtained through existing experimental data in papers or through hospital shared databases. This application does not limit the acquisition method.
[0047] Among them, the medical information associated with each rare disease mentioned above refers to the data where the medical information associated with each rare disease is located. For example, a medical knowledge base. The medical knowledge base includes at least image information (such as medical images) and text information (such as rare disease names and symptoms) associated with rare diseases. For example, the medical knowledge base is the HPO database (Human Phenotype Ontology, human phenotype terminology). The selection and number of medical knowledge bases can be adjusted according to actual conditions, and the embodiments of this application are not limited.
[0048] The above entities refer to entity information extracted from historical rare disease information and medical information associated with each rare disease, and the association relationship between each entity is a connection relationship between different types of entities. The number of entities and the number of associations between entities can be adjusted according to actual conditions, and the embodiments of this application do not limit it.
[0049] Entities include at least user entities and rare disease entities. The entities extracted in the embodiment of the present application include patient entities, text entities (i.e., symptoms of rare diseases), image entities (i.e., medical images corresponding to rare diseases), and disease entities (i.e., names of rare diseases). Figure 3 , Figure 3 It is a connection diagram of the relationship between entities, where: Figure 3 The connecting edges between entities are the association relationships between entities.
[0050] In this application, due to the large number of rare disease patients and the small number of patients, the data is insufficient. The problem of insufficient data is solved by introducing medical information related to each rare disease, such as external medical databases, and historical rare disease information, such as patient medical records, to form a heterogeneous graph data structure.
[0051] Step 202: Determine a heterogeneous graph based on entities and association relationships between entities, and input the heterogeneous graph into an initial graph model. The heterogeneous graph includes nodes and connecting edges. The nodes are used to represent entities in rare diseases, and the connecting edges are used to connect two entities with an association relationship.
[0052] Among them, the process of determining the heterogeneous graph based on the entities and the associations between the entities can be, inputting the entities and the associations between the entities into the DGL framework (Deep Graph Library, deep graph learning framework), and determining the heterogeneous graph through the DGL framework. The process of determining the heterogeneous graph based on the entities and the associations between the entities can also be, inputting the entities and the associations between the entities into the PYG framework (PyTorch Geometric, deep graph learning framework), and determining the heterogeneous graph through the PYG framework. The specific process of determining the heterogeneous graph can be adjusted according to the actual situation, and the embodiments of the present application are not limited.
[0053] Step 203: determine an initial vector of each node in the heterogeneous graph, and determine a plurality of neighboring nodes of the target node in the heterogeneous graph.
[0054] The process of determining the initial vector of each node in the heterogeneous graph may be: for each node, extracting features of data corresponding to the node, and using the extracted features as the initial vector for determining each node in the heterogeneous graph.
[0055] Among them, the process of determining the initial vector of each node in the heterogeneous graph can also be: obtaining the node type of each node in the heterogeneous graph; based on the node type of the node, inputting the node into the coding layer corresponding to the node type in the initial graph model, so that the coding layer pre-encodes the node, and uses the vector obtained after encoding as the initial vector of the node.
[0056] Among them, the node types include attribute nodes, text nodes and image nodes. Based on the node type of the node, the node is input into the coding layer corresponding to the node type in the initial graph model, including: if the node type of the node is an attribute node, the node is input into the one-hot coding layer of the initial graph model; if the node type of the node is a text node, the node is input into the representation coding layer of the initial graph model; if the node type of the node is an image node, the node is input into the visual coding layer of the initial graph model.
[0057] For details, please refer to Figure 4 , Figure 4A schematic diagram of determining the initial vector of each node and aggregating based on type provided in an embodiment of the present application. Among them, the initial graph model includes a pre-trained coding layer, a fully connected layer, a bidirectional long short-term memory network layer (BiLSTM) and a mean pooling layer, wherein the pre-trained coding layer includes a one-hot coding layer (one-hot), a representation coding layer (Med2Vec, medical activity representation learning), and a visual coding layer (ViT, Vision Transformer). For each node, the initial graph model first extracts its content features, which may include text, images or other forms of attributes (for example, patient entities). The attribute information in the node is pre-trained and encoded using a one-hot coding layer, the text information is pre-trained and encoded through the representation coding layer, and the image is pre-trained and encoded through the visual coding layer. The content after pre-training encoding is input into the fully connected layer, the content output by the fully connected layer is input into the BiLSTM layer for aggregation, and the aggregation result output by the bidirectional long short-term memory network layer is input into the mean pooling layer for average processing to obtain the initial vector of the node.
[0058] The extracted heterogeneous content is encoded into fixed-size embeddings using a neural network fully connected layer. For example, a specific patient node has heterogeneous content including the patient's medical history description, clinical test results, etc. These content items exist in the form of text or numerical data. The purpose of the fully connected layer is to convert different content features into feature representations in a unified format.
[0059] After being processed by the fully connected layer, the feature representation in a unified format is fed into a bidirectional long short-term memory network (Bi-LSTM). Bi-LSTM is able to process and analyze sequence data, especially capturing the contextual dependencies, thereby extracting deeper feature interactions. The output of Bi-LSTM is an embedding of the content features of each node after deep processing. These embeddings capture the deep relationships between content items and provide an informative and expressive feature representation for each node.
[0060] Since text data has complex semantic information, the text is represented and extracted through the representation coding layer to obtain text information with more analytical value, thereby improving the accuracy of analysis. When processing high-resolution medical images, the visual coding layer can capture a wider range of context and details to improve the accuracy of resolution, thereby improving the accuracy of analysis.
[0061] The process of determining a plurality of neighbor nodes of a target node in the heterogeneous graph may be: based on a random walk strategy, sampling the target node in the heterogeneous graph, and determining neighbor nodes corresponding to the target node under different node types.
[0062] See also Figure 5 , Figure 5 The present invention provides an example graph for collecting nodes in a heterogeneous graph, determining the initial vector of each node in the heterogeneous graph, and determining multiple neighbor nodes of a target node in the heterogeneous graph in the training method of a graph model based on rare diseases. The target node in the heterogeneous graph is sampled based on a random walk strategy to determine the characteristics of the target node, as well as the corresponding neighbor nodes under different node types and the corresponding characteristics of the neighbor nodes.
[0063] Among them, the random walk strategy includes but is not limited to a random walk strategy based on restart and a random walk strategy with prior knowledge. The specific selection can be adjusted according to actual conditions and is not limited in the embodiments of the present application.
[0064] Taking the restart-based random walk strategy as an example, the restart-based random walk strategy is a method for sampling a fixed-size heterogeneous neighbor set for each node in a heterogeneous graph, which includes two consecutive steps. The first is to sample a fixed-length restart random walk. Starting from the specified node v, the strategy will iteratively visit the neighbors of the current node, or return to the starting node with a certain probability p until a fixed number of nodes are successfully collected. This set is recorded as RWR(v). To ensure that all node types are sampled, the number of different types of nodes in RWR(v) is limited. The second step is to group neighbors according to node type. For each node type t, we select the first kt nodes from RWR(v) according to frequency and use them as the t-type related neighbor set of node v. Through the restart-based random walk strategy, all types of neighbors are collected for each node; the size of the neighbors sampled by each node is fixed, and the most frequently visited neighbors are selected; by grouping neighbors of the same type, type-based aggregation can be performed.
[0065] Step 204: Aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node, until the training is completed and the obtained model is used as the graph model.
[0066] Among them, based on the node type, a first neighbor node and a second neighbor node are determined from multiple neighbor nodes, the node type of the first neighbor node is consistent with the node type of the target node, and the node type of the second neighbor node is inconsistent with the node type of the target node; based on the first aggregation module, the initial vector of the first neighbor node is aggregated to obtain a first aggregation vector; based on the second aggregation module, the initial vector of the second neighbor node is aggregated to obtain a second aggregation vector; feature interaction processing is performed on the first aggregation vector, the second aggregation vector and the initial vector of the target node, and the obtained vector is used as the target vector of the target node.
[0067] The first aggregation module refers to a vector for aggregating nodes of the same node type as the target node.
[0068] The aggregation process of nodes of the same type is as follows: for each group of neighbor nodes of the same type, a neural network (such as Bi-LSTM) is used to aggregate the content embeddings of these neighbors. For example, all neighbor nodes of the "symptom" type are aggregated into a representative symptom embedding through a Bi-LSTM; all neighbor nodes of the "treatment" type are aggregated into a representative treatment embedding through another Bi-LSTM.
[0069] The second aggregation module refers to a vector for aggregating nodes of a different node type from the target node.
[0070] The aggregation process of different types of nodes is as follows: receive the aggregate embeddings of different types of neighbors from the previous step, and use the attention mechanism to synthesize the aggregate embeddings of different types of neighbors. The attention mechanism assigns a weight to each type of neighbor, reflecting their contribution to the overall representation of the node. For example, if a certain symptom is very critical to the patient's diagnosis, then these "symptom" type neighbors will be given a higher weight in the final aggregation.
[0071] In an embodiment of the present application, multiple entities and the association relationships between the entities are determined from historical rare disease information and medical information associated with each rare disease; a heterogeneous graph is determined based on the entities and the association relationships between the entities, and the heterogeneous graph is input into an initial graph model; the heterogeneous graph includes nodes and connecting edges, the nodes are used to represent entities in rare diseases, and the connecting edges are used to connect two entities with an association relationship; an initial vector of each node in the heterogeneous graph is determined, and multiple neighbor nodes of the target node in the heterogeneous graph are determined; the initial vector of the target node and the initial vectors of the neighbor nodes corresponding to the target node are aggregated to obtain a target vector of the target node, until the training is completed, the obtained model is used as a graph model, the historical rare disease information and the medical information associated with each rare disease are used to increase the data that can be used for analysis of rare diseases, and based on the graph model, the accuracy of data analysis of rare diseases is improved.
[0072] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0073] See also Figure 6 , Figure 6 A method for applying a graph model based on a rare disease provided by an embodiment of the present invention is shown. The method is applied in Figure 2 The graph model based on rare diseases in is used as an example to illustrate the details as follows:
[0074] Step 301: Acquire target medical data.
[0075] Step 302: Input the target medical data into the graph model to obtain a vector corresponding to the target medical data. The graph model is a model trained according to the above-mentioned graph model training method based on rare diseases.
[0076] Step 303: Determine the analysis result of the target medical data based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graph model.
[0077] For step 301, the target medical data may be the medical data corresponding to the new patient, including genotype, medical images, clinical symptoms, and the like.
[0078] For step 302, a new node of the patient corresponding to the target medical data is created in the graph model, and based on the target medical data, the patient node is connected to the entity node corresponding to the medical data. The features of the new node are digitally represented and converted into a numerical vector. This feature vectorization process must ensure consistency with the feature type and format used in the model training phase. Based on the graph model, multiple neighbor nodes of the new node are determined, and based on the neighbor nodes, the target vector corresponding to the new node is updated.
[0079] In an embodiment of the present application, by inductively generating node representations of new patients, effective predictions are made for new patients or unseen cases, thereby improving the accuracy of predictions for rare diseases.
[0080] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0081] Figure 7 FIG. 1 is a block diagram showing a diagram model training apparatus based on rare diseases corresponding to the diagram model training method based on rare diseases in the above-mentioned embodiment. Figure 7 As shown, the rare disease-based graph model training device includes an entity determination module 31, a heterogeneous graph determination module 32, an initial vector determination module 33 and a graph model determination module 34. Each functional module is described in detail as follows:
[0082] The entity determination module 31 is used to determine multiple entities and the relationship between the entities from the historical rare disease information and the medical information associated with each rare disease.
[0083] The heterogeneous graph determination module 32 is used to determine the heterogeneous graph based on entities and the association relationships between entities, and input the heterogeneous graph into the initial graph model. The heterogeneous graph includes nodes and connecting edges. The nodes are used to represent entities in rare diseases, and the connecting edges are used to connect two entities with an association relationship.
[0084] The initial vector determination module 33 is used to determine the initial vector of each node in the heterogeneous graph, and to determine a plurality of neighboring nodes of the target node in the heterogeneous graph.
[0085] The graph model determination module 34 is used to aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node until the training is completed and the obtained model is used as the graph model.
[0086] Optionally, in the device of the embodiment of the present application, in the initial vector determination module 33, determining the initial vector of each node in the heterogeneous graph includes:
[0087] The node type acquisition unit is used to obtain the node type of each node in the heterogeneous graph.
[0088] The encoding unit is used to input the node into the encoding layer corresponding to the node type in the initial graph model based on the node type of the node, so that the encoding layer pre-encodes the node and uses the vector obtained after encoding as the initial vector of the node.
[0089] Optionally, in the device of the embodiment of the present application, the node type includes an attribute node, a text node, and an image node, and the encoding unit includes:
[0090] The first encoding unit is used to input the node into the one-hot encoding layer of the initial graph model if the node type of the node is an attribute node.
[0091] The second encoding unit is used to input the node into the representation encoding layer of the initial graph model if the node type of the node is a text node.
[0092] The third encoding unit is used to input the node into the visual encoding layer of the initial graph model if the node type of the node is an image node.
[0093] Optionally, in the device of the embodiment of the present application, in the initial vector determination module 33, determining multiple neighbor nodes of the target node in the heterogeneous graph includes:
[0094] The sampling unit is used to sample the target node in the heterogeneous graph based on the random walk strategy, and determine the neighbor nodes corresponding to the target node under different node types.
[0095] Optionally, in the device of the embodiment of the present application, in the graph model determination module 34, the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node are aggregated to obtain the target vector of the target node, including:
[0096] The neighbor node determination unit is used to determine a first neighbor node and a second neighbor node from multiple neighbor nodes based on node type, wherein the node type of the first neighbor node is consistent with the node type of the target node, and the node type of the second neighbor node is inconsistent with the node type of the target node.
[0097] The first aggregation unit is configured to aggregate the initial vectors of the first neighboring nodes based on the first aggregation module to obtain a first aggregation vector.
[0098] The second aggregation unit is configured to aggregate the initial vectors of the second neighboring nodes based on the second aggregation module to obtain a second aggregation vector.
[0099] The target vector determination unit is used to perform feature interaction processing on the first aggregate vector, the second aggregate vector and the initial vector of the target node, and use the obtained vector as the target vector of the target node. For the specific definition of the graph model training device based on rare diseases, please refer to the definition of the graph model training method based on rare diseases above, which will not be repeated here. Each module in the above-mentioned graph model training device based on rare diseases can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0100] Figure 8 The principle block diagram of the graph model application device based on rare diseases is shown in one-to-one correspondence with the graph model application method based on rare diseases in the above-mentioned embodiment. Figure 8 As shown, the rare disease-based graphical model application device includes a target medical data acquisition module 41, a vector determination module 42, and an analysis result determination module 43. The functional modules are described in detail as follows:
[0101] The target medical data acquisition module 41 is used to acquire target medical data.
[0102] The vector determination module 42 is used to input the target medical data into the graph model to obtain the vector corresponding to the target medical data. The graph model is a model trained according to the above-mentioned graph model training method based on rare diseases.
[0103] The analysis result determination module 43 is used to determine the analysis result of the target medical data based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graphical model.
[0104] For the specific limitations of the rare disease-based graphical model application device, please refer to the limitations of the rare disease-based graphical model application method above, which will not be repeated here. Each module in the above-mentioned rare disease-based graphical model application device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0105] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 9 This is a basic structural block diagram of the computer device in this embodiment.
[0106] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 5 with components connected to the memory 51, the processor 52, and the network interface 53, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0107] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0108] The memory 51 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 51 can also be an external storage device of the computer device 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 5. Of course, the memory 51 can also include both the internal storage unit of the computer device 5 and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device 5, such as the program code for controlling electronic files, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.
[0109] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run the program code stored in the memory 51 or process data, such as running the program code for controlling the electronic file.
[0110] The network interface 53 may include a wireless network interface or a wired network interface. The network interface 53 is generally used to establish a communication connection between the computer device 5 and other electronic devices.
[0111] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned rare disease-based graphical model training method, or to enable the at least one processor to perform the steps of the above-mentioned rare disease-based graphical model application method.
[0112] 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 such an 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, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0113] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A graph model training method based on rare diseases, characterized in that: The graph model training method based on rare diseases includes: Determine a plurality of entities and relationships between the entities from historical rare disease information and medical information associated with each rare disease; Determine a heterogeneous graph according to the entities and the association relationship between the entities, and input the heterogeneous graph into an initial graph model, wherein the heterogeneous graph includes nodes and connecting edges, wherein the nodes are used to represent the entities in the rare disease, and the connecting edges are used to connect two entities having an association relationship; Determine an initial vector of each of the nodes in the heterogeneous graph, and determine a plurality of neighbor nodes of a target node in the heterogeneous graph; Aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node until the training is completed, and use the obtained model as the graph model; Wherein, determining the initial vector of each node in the heterogeneous graph includes: Obtaining the node type of each node in the heterogeneous graph; Based on the node type of the node, input the node into a coding layer corresponding to the node type in the initial graph model, so that the coding layer pre-encodes the node, and uses a vector obtained after encoding as an initial vector of the node; The step of aggregating the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node includes: Based on the node type, determine a first neighbor node and a second neighbor node from the plurality of neighbor nodes, wherein the node type of the first neighbor node is consistent with the node type of the target node, and the node type of the second neighbor node is inconsistent with the node type of the target node; Aggregating the initial vector of the first neighbor node based on the first aggregation module to obtain a first aggregation vector; Aggregating the initial vectors of the second neighboring nodes based on the second aggregation module to obtain a second aggregation vector; Feature interaction processing is performed on the first aggregated vector, the second aggregated vector, and the initial vector of the target node, and the obtained vector is used as the target vector of the target node.
2. The method for training a graph model based on a rare disease according to claim 1, wherein: The node types include attribute nodes, text nodes, and image nodes, and the step of inputting the nodes into a coding layer corresponding to the node types in the initial graph model based on the node types includes: If the node type of the node is an attribute node, input the node into a one-hot encoding layer of the initial graph model; If the node type of the node is a text node, inputting the node into the representation coding layer of the initial graph model; If the node type of the node is an image node, the node is input into the visual encoding layer of the initial graph model.
3. The method for training a graph model based on a rare disease according to claim 1, wherein: The determining of a plurality of neighbor nodes of the target node in the heterogeneous graph comprises: Based on a random walk strategy, the target node in the heterogeneous graph is sampled to determine the neighbor nodes corresponding to the target node under different node types.
4. A method for applying a graph model based on rare diseases, characterized in that: The rare disease-based graph model application method includes: Acquire target medical data; Inputting the target medical data into a graph model to obtain a vector corresponding to the target medical data, wherein the graph model is a model trained according to the graph model training method based on rare diseases according to any one of claims 1 to 3; Based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graphical model, the analysis result of the target medical data is determined.
5. A graphical model training device based on rare diseases, characterized in that: The rare disease-based graph model training device comprises: An entity determination module, used to determine multiple entities and the association relationship between the entities from historical rare disease information and medical information associated with each rare disease; A heterogeneous graph determination module, used to determine a heterogeneous graph according to the entities and the association relationship between the entities, and input the heterogeneous graph into an initial graph model, wherein the heterogeneous graph includes nodes and connecting edges, wherein the nodes are used to represent the entities in the rare disease, and the connecting edges are used to connect two entities having an association relationship; An initial vector determination module, used to determine an initial vector of each of the nodes in the heterogeneous graph, and to determine a plurality of neighboring nodes of a target node in the heterogeneous graph; A graph model determination module, used to aggregate the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node to obtain the target vector of the target node, until the training is completed, and the obtained model is used as the graph model; Wherein, in the initial vector determination module, determining the initial vector of each node in the heterogeneous graph includes: Obtaining the node type of each node in the heterogeneous graph; Based on the node type of the node, input the node into a coding layer corresponding to the node type in the initial graph model, so that the coding layer pre-encodes the node, and uses a vector obtained after encoding as an initial vector of the node; Among them, in the graph model determination module, the initial vector of the target node and the initial vectors of the neighboring nodes corresponding to the target node are aggregated to obtain the target vector of the target node, including: Based on the node type, determine a first neighbor node and a second neighbor node from the plurality of neighbor nodes, wherein the node type of the first neighbor node is consistent with the node type of the target node, and the node type of the second neighbor node is inconsistent with the node type of the target node; Aggregating the initial vector of the first neighbor node based on the first aggregation module to obtain a first aggregation vector; Aggregating the initial vectors of the second neighboring nodes based on the second aggregation module to obtain a second aggregation vector; Feature interaction processing is performed on the first aggregated vector, the second aggregated vector, and the initial vector of the target node, and the obtained vector is used as the target vector of the target node.
6. A rare disease-based graphical model application device, characterized in that: The rare disease-based graph model application device comprises: A target medical data acquisition module, used to acquire target medical data; A vector determination module, used for inputting the target medical data into a graph model to obtain a vector corresponding to the target medical data, wherein the graph model is a model trained according to the graph model training method based on rare diseases according to any one of claims 1 to 3; The analysis result determination module is used to determine the analysis result of the target medical data based on the similarity between the vector corresponding to the target medical data and the target vector corresponding to each rare disease in the graphical model.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the rare disease-based graphical model training method as described in any one of claims 1 to 3, or, when the processor executes the computer program, it implements the rare disease-based graphical model application method as described in claim 4.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the rare disease-based graphical model training method as described in any one of claims 1 to 3, or, when the computer program is executed by the processor, it implements the rare disease-based graphical model application method as described in claim 4.
Citation Information
Patent Citations
Electronic medical record retrieval method and device based on graph neural network
CN114639483A
Disease prediction system based on heterogeneous information network
CN114883001A
Depression risk detection model training method, depression symptom early warning method and related equipment
CN115714002A
Drug recommendation method and system based on heterogeneous EHR network representation learning
CN116779111A
Patient clustering method and device based on heterogeneous hypergraph neural network
CN117009839A
