A risk prediction method, device, equipment and storage medium

Through structured and tandem medical records in medical texts, a medical treatment timing chart is constructed, and a risk prediction model is used to solve the problem that the existing technology cannot predict the future risks of the target object, and effective support for health management is achieved.

CN114255872BActive Publication Date: 2025-04-08ANHUI IFLYHEALTH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111525272.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-04-08
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The existing medical information prediction solutions are mainly passive predictions, and they cannot predict the future risks of the target object and lack support for health management.

Method used

By obtaining the medical text of the target object, structure the medical visit records, constructing the medical visit chart, and forming the medical visit timing chart in series according to time, using a pre-trained risk prediction model, the future risks of the target object are predicted based on the medical visit timing chart.

Benefits of technology

It realizes the prediction of future risks of target objects, provides important support for health management, and can provide in-depth understanding and prediction based on the timing and logical relationship of medical records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114255872B_ABST
    Figure CN114255872B_ABST
Patent Text Reader

Abstract

The present application provides a risk prediction method, device, equipment and storage medium, wherein the risk prediction method includes: obtaining the medical text of the target object, wherein the medical text includes a number of medical records; structuring the several medical records separately to obtain medical graphs corresponding to the several medical records, wherein the medical graphs contain the medical elements in the corresponding medical records and the relationship between the medical elements; according to the medical times corresponding to the several medical records, connecting the medical graphs corresponding to the several medical records in series to obtain a medical time sequence graph; using the medical time sequence graph, predicting the future risks of the target object. The risk prediction method provided by the present application can predict the future risks of the target object based on the medical time sequence graph obtained by processing a number of medical records of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a risk prediction method, device, equipment and storage medium. Background Art

[0002] At present, information prediction schemes in the medical field are mainly passive prediction schemes, that is, schemes that make predictions based on problems that have been discovered for the target object (such as symptoms, signs, examinations and tests, etc.). There is no scheme to predict the future risks of the target object. The prediction of future risks of the target object is of vital importance to the health management of the target object. Summary of the invention

[0003] In view of this, the present application provides a risk prediction method, device, equipment and storage medium for predicting the future risks of a target object. The technical solution is as follows:

[0004] A risk prediction method, comprising:

[0005] Acquire a medical text of a target object, wherein the medical text includes a plurality of medical records;

[0006] Structuring the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and the relationships between the medical elements;

[0007] According to the visit times corresponding to the plurality of visit records, the visit graphs corresponding to the plurality of visit records are connected in series to obtain a visit time sequence graph;

[0008] The medical consultation sequence diagram is used to predict the future risks of the target object.

[0009] Optionally, the medical consultation graph includes a plurality of nodes, each node is a medical consultation element in a corresponding medical consultation record, and related nodes among the plurality of nodes are connected by directed edges;

[0010] Structure the target visit record to be structured, including:

[0011] Extracting medical consultation elements from the target medical consultation record, and determining the relationship between the extracted medical consultation elements;

[0012] Arrange the extracted medical treatment elements with a time sequence relationship in time sequence, and connect adjacent medical treatment elements in the sorting result through directed edges to obtain a time sequence path corresponding to the target medical treatment record;

[0013] Other medical consultation elements among the extracted medical consultation elements are connected with relevant medical consultation elements on the time series path corresponding to the target medical consultation record through directed edges.

[0014] Optionally, using the medical consultation sequence diagram to predict the future risk of the target subject includes:

[0015] Using the pre-trained risk prediction model, based on the medical consultation time sequence diagram, predict the future risk of the target subject;

[0016] The risk prediction model is trained using a training visit sequence diagram annotated with risk information.

[0017] Optionally, the training process of the risk prediction model includes:

[0018] The initial graph coding model is pre-trained by using the training medical consultation sequence graph to obtain a pre-trained graph coding model;

[0019] Constructing a risk prediction model based on the pre-trained graph coding model, wherein the risk prediction model includes a coding layer and a risk prediction task layer, and the coding layer is the pre-trained graph coding model;

[0020] The constructed risk prediction model was trained using training visit time series diagrams annotated with risk information.

[0021] Optionally, the adopting of the training visit sequence graph to pre-train the initial graph encoding model includes:

[0022] The graph encoding model is pre-trained with the task of predicting the hidden nodes in the training visit sequence graph;

[0023] or,

[0024] The graph encoding model is pre-trained with the task of rearranging a shuffled training medical visit timing graph, wherein the shuffled training medical visit timing graph is obtained by shuffling the timing of nodes on the same timing path in the training medical visit timing graph.

[0025] Optionally, the use of a pre-trained risk prediction model to predict the future risk of the target subject based on the visit time sequence diagram includes:

[0026] Using the encoding layer of the pre-trained risk prediction model, the medical consultation sequence diagram is encoded into a vector that can characterize the logical relationship of the medical consultation sequence diagram as a medical consultation sequence diagram representation vector;

[0027] The risk prediction task layer of the risk prediction model is used to predict the future risk of the target object based on the vector representing the medical consultation time series diagram.

[0028] Optionally, encoding the medical consultation sequence diagram into a vector capable of representing the logical relationship of the medical consultation sequence diagram includes:

[0029] Determine a first representation vector of each node in the medical consultation sequence diagram according to each node in the medical consultation sequence diagram and the sequence information of each node in the medical consultation sequence diagram;

[0030] According to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes, a vector capable of representing the logical relationship of the medical consultation sequence diagram is determined.

[0031] Optionally, determining a first representation vector of each node in the medical consultation sequence diagram according to each node in the medical consultation sequence diagram and the sequence information of each node in the medical consultation sequence diagram includes:

[0032] For each node in the medical consultation time sequence diagram: the word embedding vector of the node, the representation vector of the type to which the node belongs, the character-level representation vector of the node, the representation vector of the timing information of the medical consultation diagram where the node is located in the medical consultation time sequence diagram, and the representation vector of the timing information of the node in the medical consultation diagram where it is located are concatenated, and the concatenated vector is used as the first representation vector of the node.

[0033] Optionally, determining a vector capable of representing a logical relationship of the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes includes:

[0034] Obtaining a representation vector of the relationship between each node and related nodes in the medical consultation time sequence diagram;

[0035] Determine a second representation vector for each node in the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes;

[0036] Fusing the first representation vector and the second representation vector of each node in the medical consultation sequence diagram to obtain a fused vector of each node in the medical consultation sequence diagram as a target representation vector of each node in the medical consultation sequence diagram;

[0037] According to the target representation vector of each node on each timing path in the medical consultation timing diagram, a vector capable of representing the logical relationship of the medical consultation timing diagram is obtained.

[0038] Optionally, after obtaining the fused vector of each node in the medical consultation time series diagram, the method further includes:

[0039] The fused vector of each node in the medical consultation sequence diagram is used as the first representation vector of each node in the medical consultation sequence diagram, and the execution is returned based on the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes, to determine the second representation vector of each node in the medical consultation sequence diagram until a preset number of executions is reached.

[0040] Optionally, determining the second representation vector of each node in the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes includes:

[0041] For each node in the medical consultation sequence diagram:

[0042] Determine the importance of the related nodes of the node to the node according to the first representation vector of the node, the first representation vector of the related nodes of the node, and the representation vector of the relationship between the node and the related nodes;

[0043] The second representation vector of the node is determined according to the importance of the related nodes of the node to the node, the first representation vector of the related nodes of the node, and the representation vector of the relationship between the node and the related nodes.

[0044] A risk prediction device, comprising: a text acquisition module, a medical record structuring module, a medical chart concatenation module and a risk prediction module;

[0045] The text acquisition module is used to acquire the medical text of the target object, wherein the medical text includes a plurality of medical records;

[0046] The medical record structuring module is used to structure the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and the relationships between the medical elements;

[0047] The medical consultation graph series connection module is used to connect the medical consultation graphs corresponding to the plurality of medical consultation records in series according to the medical consultation times corresponding to the plurality of medical consultation records, so as to obtain a medical consultation time sequence graph;

[0048] The risk prediction module is used to predict the future risks of the target object by using the medical consultation sequence diagram.

[0049] A risk prediction device, comprising: a memory and a processor;

[0050] The memory is used to store programs;

[0051] The processor is used to execute the program to implement each step of the risk prediction method described in any one of the above items.

[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements each step of the risk prediction method described in any one of the above items.

[0053] The risk prediction method, apparatus, device and storage medium provided by the present application first obtain the medical text of the target object, then structure the several medical records contained in the medical text respectively to obtain the medical graphs corresponding to the several medical records, then connect the medical graphs corresponding to the several medical records in series according to the medical times corresponding to the several medical records to obtain the medical time sequence graph, and finally use the medical time sequence graph to predict the future risks of the target object. The risk prediction method provided by the present application can predict the future risks of the target object based on the medical time sequence graph obtained by processing several medical records of the target object (the medical time sequence graph contains the time sequence information of several medical records of the target object and the logical relationship information between the medical elements in each medical record). BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0055] Figure 1 A schematic diagram of a risk prediction method according to an embodiment of the present invention;

[0056] Figure 2 An example of a medical consultation diagram provided in an embodiment of the present application;

[0057] Figure 3 An example of a time sequence diagram for medical consultation provided in an embodiment of the present application;

[0058] Figure 4 A schematic diagram of a process for predicting the future risks of a target subject based on a time sequence diagram of medical consultations using a pre-trained risk prediction model provided in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of a process for training a risk prediction model provided in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of hiding nodes in a training visit sequence diagram provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of disrupting the timing of nodes on the same timing path in a training visit timing diagram provided in an embodiment of the present application;

[0062] Figure 8 A schematic diagram of the structure of a risk prediction device provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of the structure of a risk prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] 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 only 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.

[0065] In the process of implementing this application, the applicant discovered that every time a patient visits a doctor, a medical record will be generated. There are usually rich logical relationships such as time sequence and cause and effect within these medical records or between medical records. If this information can be fully utilized, it will be of great significance for predicting the patient's future risks.

[0066] On the basis of the above findings, the applicant conducted research and finally proposed a risk prediction method through continuous research. The overall idea of ​​the risk prediction method is: process several medical records of patients into a medical consultation sequence diagram (the medical consultation sequence diagram contains the time sequence information of several medical records, as well as the key elements in each medical record and the relationship information between the key elements), and predict the patient's future risks based on the medical consultation sequence diagram. Among them, when predicting the patient's future risks based on the medical consultation sequence diagram, the risk prediction model obtained based on pre-training fully explores the logical relationship of the medical consultation sequence diagram (such as time sequence, cause and effect, etc.), and then predicts the patient's future risks based on the logical relationship of the medical consultation sequence diagram.

[0067] The risk prediction method proposed in this application can be applied to electronic devices with data processing capabilities, which can be terminals used by users, such as smart phones, PCs, notebooks, etc. The electronic device can also be a server on the network side (which can be a single server, or multiple servers or server clusters). Next, the risk prediction method provided by this application is introduced through the following embodiments.

[0068] First embodiment

[0069] See also Figure 1, shows a schematic diagram of the process of the risk prediction method provided by an embodiment of the present application, which may include:

[0070] Step S101: Acquire the medical text of the target object.

[0071] Among them, the medical text includes several medical records.

[0072] The medical record in this embodiment may be an outpatient medical record, an inpatient record, or other medical-related electronic records.

[0073] The following table is an example of several hospitalization records for a certain subject:

[0074] Table 1 Example of hospitalization record

[0075]

[0076] Step S102: Structuring a plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively.

[0077] Among them, the medical consultation map includes the medical consultation elements in the corresponding medical consultation record and the relationship between the medical consultation elements. The medical consultation elements can be but are not limited to causes, operations, examinations and tests, treatments, symptoms, etc., and the relationship between the medical consultation elements can be but are not limited to time series, cause and effect, etc.

[0078] It should be noted that the medical consultation graph contains several nodes, each node is a medical consultation element in the corresponding medical consultation record, and related nodes among the several nodes are connected by directed edges. Each directed edge in the medical consultation graph corresponds to the relationship between the two nodes it connects.

[0079] See also Figure 2 , shows an example of a visit graph, Figure 2 The nodes "fall" and "hospitalization" in the table are all medical elements in the medical records. Figure 2 The node "fall" and the node "hospitalization" in are related nodes, and the relationship between the two is "time series". Figure 2 The node "fall" and the node "lung contusion" are related nodes, and the relationship between the two is "cause and effect". Other nodes are similar.

[0080] Next, the specific implementation process of "structuring several medical records separately" is introduced. Since the method of structuring each medical record is the same, this embodiment takes a medical record (referred to as a "target medical record") as an example to illustrate the process of structuring the medical record.

[0081] The process of structuring the target visit record may include:

[0082] Step a1: extract the medical elements and the relationship between the medical elements from the target medical records.

[0083] Existing element and element relationship extraction methods can be used to extract the medical elements and the relationships between the medical elements from the target medical records.

[0084] Step a2: Arrange the extracted medical treatment elements with a time sequence relationship in time sequence, and connect adjacent medical treatment elements in the sorting result through directed edges to obtain the time sequence path corresponding to the target medical treatment record.

[0085] For example, the target medical record is "the patient fell while riding a bicycle, resulting in spinal cord injury, bilateral lung contusion, bilateral pleural effusion, and was admitted to the orthopedics department of a certain hospital. He underwent emergency anterior cervical surgery. After the operation, the patient developed chest tightness, cough, paroxysmal dyspnea at night, and syncope... Klebsiella pneumoniae was cultured from sputum, and imipenem, amikacin and other symptomatic treatments were given... and he was discharged from the hospital." The medical elements with a time sequence relationship extracted from the target medical record include "fall", "admission", "anterior cervical surgery", "anti-infection", ..., "discharged". These medical elements can be arranged in time sequence to obtain " "Fall", "admission", "anterior cervical surgery", "anti-infection", ..., "discharge", take each medical element as a node, connect directed edges between adjacent nodes, that is, connect a directed edge between the nodes "fall" and "admission", and the directed edge points from the node "fall" to the node "admission", indicating that "admission" occurs after "fall", connect a directed edge between the node "admission" and the node "anterior cervical surgery", and the directed edge points from the node "admission" to the node "anterior cervical surgery", indicating that "anterior cervical surgery" occurs after "admission", and so on. In this way, we can get Figure 2 The time sequence path of Part 201 is “fall → admission → anterior cervical surgery → anti-infection → … → discharge”.

[0086] Step a3: connect other medical consultation elements among the extracted medical consultation elements with relevant medical consultation elements on the time series path corresponding to the target medical consultation record through directed edges.

[0087] For the above medical records, in addition to extracting the medical elements of "fall", "admission", "anterior cervical surgery", "anti-infection", ..., and "discharge", we also extract medical elements such as "spinal cord injury", "pulmonary contusion", "pleural effusion", "orthopedics", "paroxysmal dyspnea", "chest tightness", "syncope", and "cough". Since "spinal cord injury" is related to "fall", the node "spinal cord injury" is connected to "fall" on the time series path through a directed edge. Since "fall" is the cause and "spinal cord injury" is the result, a directed edge points from "fall" to "spinal cord injury". Similarly, "pulmonary contusion" and "pleural effusion" are also the results of "fall". Therefore, "pulmonary contusion" and "pleural effusion" are connected to "fall" through directed edges respectively, and directed edges point from "fall" to "pulmonary contusion" and from "fall" to "pleural effusion". Other medical treatment elements are connected to related medical treatment elements on the time series path through directed edges in a similar way.

[0088] Step S103: according to the visit times corresponding to the visit records, the visit graphs corresponding to the visit records are connected in series to obtain a visit time sequence graph.

[0089] According to the visit times corresponding to the several visit records, the visit time sequence diagram obtained by connecting the visit graphs corresponding to the several visit records in series contains the time sequence information of the several visit records.

[0090] See also Figure 3 , shows an example of a consultation sequence diagram, Figure 3 The visit time sequence diagram in the is obtained by connecting several visit diagrams in series according to visit time..., t-2, t-1, t, that is, the visit diagram corresponding to the visit record at visit time t-2 is connected in series with the visit diagram corresponding to the visit record at visit time t-1, and the visit diagram corresponding to the visit record at visit time t-1 is connected in series with the visit diagram corresponding to the visit record at visit time t, and so on.

[0091] Step S104: using the medical consultation sequence diagram, predict the target object's future risks.

[0092] Since the medical consultation sequence diagram contains the temporal relationship of each medical consultation record of the target object, the medical consultation elements in each medical consultation record, and the temporal, causal and other logical relationships between the medical consultation elements, this embodiment predicts the future risks of the target object based on the medical consultation sequence diagram.

[0093] The risk prediction method provided in the embodiment of the present application first obtains the medical text of the target object, then structures the several medical records contained in the medical text respectively to obtain the medical graphs corresponding to the several medical records, then connects the medical graphs corresponding to the several medical records in series according to the medical times corresponding to the several medical records to obtain the medical time sequence graph, and finally uses the medical time sequence graph to predict the future risks of the target object. The risk prediction method provided in the embodiment of the present application can predict the future risks of the target object based on the medical time sequence graph obtained by processing several medical records of the target object.

[0094] Second embodiment

[0095] This embodiment introduces the specific implementation process of "Step S104: predicting the future risks of the target object by using the medical consultation sequence diagram" in the first embodiment.

[0096] The process of predicting the future risk of the target object using the time sequence diagram of medical visits may include: using a pre-trained risk prediction model to predict the future risk of the target object based on the time sequence diagram of medical visits. The risk prediction model is trained using a training time sequence diagram of medical visits annotated with risk information.

[0097] See also Figure 4 , shows a schematic diagram of a process of using a pre-trained risk prediction model to predict the future risk of a target object based on a medical consultation sequence diagram, which may include:

[0098] Step S401: using the encoding layer of the pre-trained risk prediction model, the medical consultation sequence diagram is encoded into a vector that can characterize the logical relationship of the medical consultation sequence diagram as a medical consultation sequence diagram representation vector.

[0099] It should be noted that there are currently some schemes for information prediction based on medical records. However, these schemes all encode medical records as unstructured natural language texts, and do not consider the rich structural information contained in the medical records, such as temporal relationships, causal relationships, etc. In other words, the current schemes only have a superficial understanding of medical records, and do not deeply explore the rich structural information contained in the medical records. The present application considers the temporal relationships between different medical records and the temporal relationships, causal relationships, etc. of medical elements in the same medical record.

[0100] Specifically, using the encoding layer of the pre-trained risk prediction model, the medical consultation sequence diagram is encoded into a vector that can characterize the logical relationship of the medical consultation sequence diagram as a medical consultation sequence diagram representation vector in the following manner:

[0101] Step S4011: Determine the first representation vector of each node in the medical consultation sequence diagram according to each node in the medical consultation sequence diagram and the sequence information of each node in the medical consultation sequence diagram.

[0102] Specifically, for each node in the medical consultation sequence graph: the word embedding vector of the node, the representation vector of the type to which the node belongs, the representation vector of the character level of the node, the representation vector of the timing information of the medical consultation graph where the node is located in the medical consultation sequence graph, and the representation vector of the timing information of the node in the medical consultation graph where it is located are concatenated, and the concatenated vector is used as the first representation vector of the node.

[0103] The character-level representation vector of a node can be obtained by encoding each character in the node using a convolutional neural network (CNN). The type of a node can be, but is not limited to, one of the following types: cause, surgery, examination, treatment, symptom, etc. Figure 3 The type of the middle node "fall" is "cause", the type of the node "anterior cervical surgery" is "surgery", and the type of the node "anti-infection" is "treatment".

[0104] It should be noted that the timing information of the visit graph where a node is located in the visit timing graph refers to the nth visit graph in the visit timing graph where the visit graph where the node is located is. Assuming that the visit graph where the node is located is the third visit graph in the visit timing graph, then the representation vector of the timing information of the visit graph where the node is located in the visit timing graph is the representation vector of "3".

[0105] It should be noted that the timing information of a node in the medical consultation graph refers to the position of the node in the timing path of the medical consultation graph. Figure 3 The node “fall” in the graph is at the first position of the time series path “fall→admission→anterior cervical surgery→anti-infection→…→discharge”. Therefore, the representation vector of the time series information of the node “fall” in the medical consultation graph where it is located is the representation vector of “1”. Since the node “admission” is at the second position of the time series path, the representation vector of the time series information of the node “admission” in the medical consultation graph where it is located is the representation vector of “2”. The other nodes are similar. For the nodes that are not on the time series path, such as “spinal cord injury”, “pulmonary contusion” and “pleural effusion”, since they are related to the node “fall”, it can be considered that the nodes “spinal cord injury”, “pulmonary contusion” and “pleural effusion” are located at the first position of the time series path. The same applies to other nodes that are not on the time series path.

[0106] For a node w in the medical consultation sequence graph, if the word embedding vector of node w is e w Indicates the type of node w, and the vector is represented by e type(w)The character-level representation vector of node w is represented by CharCNN(w), and the representation vector of the time sequence information of the consultation graph where node w is located in the consultation time sequence graph is represented by Indicates that the representation vector of the time series information of node w in its consultation graph is Representation, then the first representation vector of node w is:

[0107]

[0108] Step S4012: Determine a vector that can characterize the logical relationship of the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes.

[0109] Among them, the related nodes of a node may include the parent node and child nodes of the node. For example, Figure 3 For the node "Evaluate Condition" in , its parent node is "Admission", and its child nodes are "ECG Monitoring", "Oxygen Inhalation" and "Anticoagulation". It should be noted that for each timing path, the last node on the forward adjacent timing path of the timing path can be used as the parent node of the first node on the timing path, and the first node on the backward adjacent timing path of the timing path can be used as the child node of the last node on the timing path. For example, for Figure 3 For the first node "Fall" on the time path with a visit time of t-1, the last node on the time path with a visit time of t-2 can be used as the father node of "Fall". For the last node "Discharge" on the time path with a visit time of t-1, the first node "Symptoms Not Improved" on the time path with a visit time of t can be used as the child node of "Discharge".

[0110] Specifically, according to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes, the process of determining the vector capable of representing the logical relationship of the medical consultation sequence diagram includes:

[0111] Step b1, obtain the representation vector of the relationship between each node and related nodes in the medical consultation sequence diagram.

[0112] Specifically, the relationship between each node and the related node in the medical consultation time sequence diagram can be mapped to a vector based on the pre-established mapping relationship between the relationship and the vector. For example, if the relationship between a node and the related node is "time sequence", then based on the pre-established mapping relationship between the relationship and the vector, the "time sequence" is mapped to a vector as the representation vector of the "time sequence".

[0113] Step b2: determine the second representation vector of each node in the medical consultation sequence diagram according to the first representation vector of each node, the first representation vector of the related nodes of each node and the representation vector of the relationship between each node and the related nodes.

[0114] Since the method of determining the second representation vector of each node in the time sequence diagram of medical consultation is the same, the following takes a node w in the time sequence diagram of medical consultation as an example to give the process of determining the second representation vector of the node:

[0115] Step b21: Determine the importance of the related nodes of node w to node w based on the first representation vector of node w, the first representation vector of the related nodes of node w, and the representation vector of the relationship between node w and the related nodes.

[0116] Specifically, the related nodes w of node w can be calculated by the calculation method shown in the following formula: i The importance of node w:

[0117]

[0118] Among them, w i represents the i-th related node of node w, node w j represents the jth related node of node w, Represents the node w i The first representation vector of Represents the node w j The first representation vector, type(w, w i ) represents the node w and the node w i The vector representing the relationship between j The first representation vector Multiplication, α i Represents the node w i The importance of node w.

[0119] Step b22: Determine a second representation vector of node w according to the importance of the related nodes of node w to node w, the first representation vector of the related nodes of node w, and the representation vector of the relationship between node w and the related nodes.

[0120] Specifically, the second representation vector of the node w may be calculated in the following manner:

[0121]

[0122] Among them, Ch(w) and Pa(w) represent the child nodes and parent nodes of node w respectively, |Ch(w)∪Pa(w)| represents the total number of child nodes and parent nodes of node w, which serves as the normalization coefficient.

[0123] Step b3: fuse the first representation vector and the second representation vector of each node in the medical consultation sequence diagram to obtain a fused vector of each node in the medical consultation sequence diagram.

[0124] It should be noted that, for node w, the first representation vector of node w contains information about node w itself, while the second representation vector of node w contains information about nodes surrounding node w. The vector obtained by merging the two vectors contains information about both node w and the nodes surrounding node w.

[0125] There are many ways to fuse the first representation vector of node w with the second representation vector of node w. In one possible implementation, the first representation vector of node w and the second representation vector of node w can be directly summed, and the summed vector is the fused vector of node w. In another possible manner, the first representation vector of node w and the second representation vector of node w can be weighted and summed, and the weighted summed vector is the fused vector Right now:

[0126]

[0127] Wherein, β is a weighting coefficient, which can be set according to specific circumstances.

[0128] After obtaining the fused vector of each node in the medical consultation time series graph, the fused vector of each node can be directly used as the target representation vector of each node. For example, for node w, after obtaining the fused vector of node w After that, the fused vector of node w can be directly The target representation vector h of node w w In order to fully explore the logical relationship between nodes in the time sequence diagram of visiting a doctor, in another preferred implementation, the fused vector of each node in the time sequence diagram of visiting a doctor can be used as the first representation vector of each node in the time sequence diagram of visiting a doctor, and then steps b2 to b3 are repeatedly executed until the preset number of executions is reached. For example, for node w, after obtaining the fused vector of node w After that, As the first representation vector of node w, then based on the new first representation vector Determine the second representation vector of node w in the manner shown in equations (2) and (3) above, and then Combined with the second representation vector determined by this execution, we get Then As the first representation vector of node w, based on the first representation vector Determine the second representation vector of node w in the manner shown in equations (2) and (3) above, and then Combined with the second representation vector determined by this execution, we get And so on, until you get If the weighted summation fusion method is used, the fused vector obtained after each execution can be expressed as:

[0129]

[0130] It should be noted that the is different. The fused vector obtained after N times is The target representation vector h of node w w .

[0131] The target representation vector of each node in the medical consultation sequence diagram can be obtained through the above method.

[0132] Step b4: According to the target representation vector of each node on each timing path in the medical consultation timing diagram, a vector capable of representing the logical relationship of the medical consultation timing diagram is obtained as the representation vector of the medical consultation timing diagram.

[0133] Specifically, for each timing path in the medical consultation timing graph, the representation vector of the timing path can be composed of the target representation vectors of each node on the timing path. After obtaining the representation vectors of each timing path in the medical consultation timing graph, the representation vector of the medical consultation timing graph can be composed of the representation vectors of each timing path in the medical consultation timing graph.

[0134] Step S402: using the risk prediction task layer of the risk prediction model, based on the vector representing the time series diagram of the medical consultation, predict the future risk of the target object.

[0135] It should be noted that when predicting the future risks of the target object based on the representation vector of the medical treatment time sequence graph, the prediction can be based on the representation vector of the entire medical treatment time sequence graph, or based on the representation vector of part of the time series path in the representation vector of the entire medical treatment time sequence graph, or based on the target representation vector of a node on a time series path in the representation vector of the entire medical treatment time series graph. The vector used for the prediction can be determined according to the specific application scenario.

[0136] Step S402 is described below in conjunction with two possible risk prediction scenarios.

[0137] The first scenario: hospitalization risk prediction scenario (for example, the time sequence diagram of medical treatment is obtained by processing several hospitalization records)

[0138] For the prediction of hospitalization risk, the risk prediction task layer of the risk prediction model can be used to predict whether the target object will have a risk of hospitalization in the future based on the last time series path representation vector in the representation vector of the entire time series graph (of course, the entire time series graph representation vector can also be used as the basis) . That is, if the time series graph includes t time series paths, the representation vector of the time series path at the tth time can be used to predict whether the target object will have a risk of hospitalization in the future. Specifically, the risk prediction task layer of the risk prediction model can be used to predict the probability of the target object having a risk of hospitalization in the future based on the representation vector of the time series path at the tth time, and then determine whether the target object will be hospitalized in the future based on the probability of the target object having a risk of hospitalization in the future.

[0139] Among them, the process of using the risk prediction task layer of the risk prediction model to predict the probability of the target object having a risk of hospitalization in the future based on the representation vector of the time series path at the tth time may include: using the risk prediction task layer of the risk prediction model to process the representation vector of the time series path at the tth time into a risk prediction vector, and determining the probability of the target object having a risk of hospitalization in the future based on the risk prediction vector. Optionally, the risk prediction task layer of the risk prediction model may use LSTM or Attention mechanism to process the representation vector of the time series path at the tth time into a risk prediction vector h t , after obtaining the risk prediction vector h t After that, the probability that the target object will be at risk of hospitalization in the future can be determined by the following formula:

[0140] p(hospitalization)=σ(Wh t +b) (6)

[0141] The second scenario: complication prediction scenario (for example, the time sequence diagram of medical treatment is obtained by processing several hospitalization records)

[0142] For the complication prediction scenario, the risk prediction task layer of the risk prediction model can be used to predict the possible complications of the target object in the future based on the target representation vector of the node type of the surgery node on the time series path at the t-th time in the medical consultation time series diagram representation vector. Specifically, the risk prediction task layer of the risk prediction model can be used to predict the probability of the target object having complications in the future (the probability here can be the probability of each symptom occurring in the setting) based on the target representation vector of the node type of the surgery node on the time series path at the t-th time in the medical consultation time series diagram representation vector. The possible complications of the target object in the future are determined based on the probability of the target object having complications in the future. Among them, the probability of the target object having complications in the future can be determined according to the following formula:

[0143]

[0144] Among them, W and b are model parameters, It is the target representation vector of the node whose node type is surgery on the temporal path at the tth time.

[0145] In addition to the above-mentioned hospitalization risk prediction and complication prediction, the time sequence diagram representation vector (for example, the time sequence diagram obtained by processing several outpatient medical records) can also be used as a basis to predict whether the target object will need to take medicine in the future, and what medicine to take when necessary, or to predict whether the target object will need examinations and tests in the future, and what examinations and tests are required when necessary.

[0146] Third embodiment

[0147] It can be seen from the above embodiments that the future risks of the target object are predicted using a pre-trained risk prediction model. This embodiment introduces the training process of the risk prediction model.

[0148] There are many ways to train the risk prediction model. In one possible implementation, the risk prediction model including the coding layer and the risk prediction layer can be directly trained using the training visit sequence diagram annotated with risk information. In order to improve the prediction effect, this embodiment provides another preferred training method. Please refer to Figure 5 , showing a flow chart of the training method, which may include:

[0149] Step S501: pre-training an initial graph coding model using a training medical consultation sequence graph to obtain a pre-trained graph coding model.

[0150] There are several ways to pre-train the initial graph encoding model using the training visit sequence graph:

[0151] In one possible implementation, the task of predicting the hidden nodes in the training visit sequence diagram can be used to pre-train the graph encoding model. In this implementation, a preset number of nodes can be randomly selected from the training visit sequence diagram and replaced with a placeholder "[PH]" to hide the selected nodes. Figure 6 , shows the time series diagram from training visit ( Figure 6The diagram shows a portion of a training medical visit sequence diagram in which three nodes are randomly selected and replaced with a placeholder "[PH]". After hiding the nodes in the training medical visit sequence diagram, the graph coding model is used to encode the training medical visit sequence diagram behind the hidden nodes (the encoding process can refer to the process of encoding the medical visit sequence diagram using the encoding layer of the risk prediction model in the second embodiment), and then the hidden nodes (i.e., the nodes at the placeholder positions) are predicted based on the encoding results of the training medical visit sequence diagram behind the hidden nodes. This implementation method forces the graph coding model to use the information of the unhidden nodes in the training medical visit sequence diagram to predict the nodes at the placeholder positions, thereby enhancing the understanding ability of the graph coding model.

[0152] In another possible implementation, the shuffled training visit sequence diagram can be rearranged into tasks to pre-train the graph encoding model. In this implementation, the timing of the nodes on the same timing path in the training visit sequence diagram is shuffled to obtain the shuffled training visit sequence diagram. Figure 7 , Figure 7 The schematic diagram is a diagram for randomly shuffling the order of nodes on the timing path between the "admission" node and the "discharge" node on the t-1th timing path in the training medical visit timing diagram. It should be noted that, when shuffling, the related nodes in the vertical direction of the nodes whose positions on the timing path change also change positions along with the nodes. After obtaining the shuffled training medical visit timing diagram, the shuffled training medical visit timing diagram is encoded using the graph coding model (the encoding process can refer to the process of encoding the medical visit timing diagram using the coding layer of the risk prediction model in the second embodiment). Then, according to the encoding result of the shuffled training medical visit timing diagram, the shuffled timing path in the shuffled training medical visit timing diagram is rearranged, that is, the original timing path is restored. It should be noted that the graph coding model is pre-trained with the task of rearranging the shuffled training medical visit timing diagram, so that the graph coding model can learn the logical relationship between the nodes in the training medical visit timing diagram. It should also be noted that when shuffling the training visit timing diagram, the timing of the nodes on one of the timing paths can be shuffled (for example, the 3rd node and the 5th node on the 1st timing path can be swapped), or the timing of the nodes on multiple timing paths can be shuffled (for example, the 3rd node and the 5th node on the 1st timing path can be swapped, and the 1st node and the 2nd node on the 3rd timing path can be swapped).

[0153] It should be noted that by pre-training the graph encoding model, the graph encoding model has the ability to mine logical relationships such as time sequence and cause and effect from the input medical consultation time sequence diagram.

[0154] Step S502: construct a risk prediction model based on the pre-trained graph coding model.

[0155] Among them, the risk prediction model includes a coding layer and a risk prediction task layer, and the coding layer is a pre-trained graph coding model.

[0156] After obtaining the pre-trained graph coding model, it can be used as a coding layer and combined with the risk prediction task layer to obtain a risk prediction model including the coding layer and the risk prediction task layer. The risk prediction model at this time is an initial model, which still needs further training.

[0157] Step S503: Use the training visit sequence diagram annotated with risk information to train the constructed risk prediction model.

[0158] Specifically, the process of training the constructed risk prediction model using a training visit sequence diagram annotated with risk information may include: obtaining the training visit sequence diagram from a training data set; encoding the training visit sequence diagram using the encoding layer of the risk prediction model to obtain a representation vector of the training visit sequence diagram; using the risk prediction layer of the risk prediction model to predict the probability that an object corresponding to the training visit sequence diagram will have risks in the future based on the representation vector of the training visit sequence diagram; determining the predicted loss of the risk prediction model based on the predicted probability and the risk information annotated on the training visit sequence diagram; updating the parameters of the risk prediction model based on the predicted loss of the risk prediction model; and performing multiple iterations of training according to the above process until the training end conditions are met.

[0159] Fourth embodiment

[0160] The embodiment of the present application also provides a risk prediction device. The risk prediction device provided in the embodiment of the present application is described below. The risk prediction device described below and the risk prediction method described above can be referenced to each other.

[0161] See also Figure 8 , shows a schematic diagram of the structure of the risk prediction device provided in an embodiment of the present application, which may include: a text acquisition module 801, a medical record structuring module 802, a medical record concatenation module 803 and a risk prediction module 804.

[0162] The text acquisition module 801 is used to acquire the medical text of the target object.

[0163] The medical text includes several medical records.

[0164] The medical record structuring module 802 is used to structure the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively.

[0165] The medical consultation graph includes medical consultation elements in the corresponding medical consultation record and the relationship between the medical consultation elements.

[0166] The medical consultation graph serial connection module 803 is used to serially connect the medical consultation graphs corresponding to the medical consultation records according to the medical consultation times corresponding to the medical consultation records, so as to obtain a medical consultation time sequence graph.

[0167] The risk prediction module 804 is used to predict the future risks of the target object by using the medical consultation sequence diagram.

[0168] The medical consultation graph includes a plurality of nodes, each node is a medical consultation element in a corresponding medical consultation record, and related nodes among the plurality of nodes are connected by directed edges.

[0169] Optionally, when structuring a target medical record to be structured, the medical record structuring module 802 is specifically configured to:

[0170] Extract medical visit elements from the target medical visit record, and determine the relationship between the extracted medical visit elements; arrange the medical visit elements with a time series relationship among the extracted medical visit elements in time series, and connect adjacent medical visit elements in the sorting result through directed edges to obtain the time series path corresponding to the target medical visit record; connect other medical visit elements among the extracted medical visit elements with related medical visit elements on the time series path corresponding to the target medical visit record through directed edges.

[0171] Optionally, when the risk prediction module 804 predicts the future risk of the target subject using the medical consultation sequence diagram, it is specifically used to:

[0172] The risk prediction model obtained by pre-training is used to predict the future risk of the target object based on the time sequence diagram of medical consultation. The risk prediction model is trained using the training time sequence diagram of medical consultation annotated with risk information.

[0173] Optionally, the risk prediction device provided in the embodiment of the present application may also include: a model training module.

[0174] Model training module, specifically used for:

[0175] An initial graph coding model is pre-trained using a training medical visit sequence graph to obtain a pre-trained graph coding model; a risk prediction model is constructed based on the pre-trained graph coding model, wherein the risk prediction model includes a coding layer and a risk prediction task layer, and the coding layer is the pre-trained graph coding model; and the constructed risk prediction model is trained using a training medical visit sequence graph annotated with risk information.

[0176] Optionally, when the model training module uses the training visit sequence diagram to pre-train the initial graph encoding model, it is specifically used to:

[0177] The graph encoding model is pre-trained with the task of predicting the hidden nodes in the training visit sequence graph;

[0178] Alternatively, the graph encoding model is pre-trained with the task of rearranging a shuffled training medical visit timing graph, wherein the shuffled training medical visit timing graph is obtained by shuffling the timing of nodes on the same timing path in the training medical visit timing graph.

[0179] Optionally, the risk prediction model includes a coding layer and a risk prediction task layer.

[0180] The encoding layer of the risk prediction model encodes the medical consultation sequence diagram into a vector that can characterize the logical relationship of the medical consultation sequence diagram as the medical consultation sequence diagram representation vector; the risk prediction task layer of the risk prediction model utilizes the risk prediction task layer of the risk prediction model to predict the future risks of the target object based on the medical consultation sequence diagram representation vector.

[0181] Optionally, when encoding the time sequence diagram of medical consultation into a vector capable of representing the logical relationship of the time sequence diagram of medical consultation, the encoding layer of the risk prediction model is specifically used to:

[0182] Based on each node in the medical consultation sequence diagram and the timing information of each node in the medical consultation sequence diagram, determine the first representation vector of each node in the medical consultation sequence diagram; based on the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node and the relationship between each node and the related nodes, determine the vector that can characterize the logical relationship of the medical consultation sequence diagram.

[0183] Optionally, when the encoding layer of the risk prediction model determines the first representation vector of each node in the medical consultation time sequence diagram according to each node in the medical consultation time sequence diagram and the time sequence information of each node in the medical consultation time sequence diagram, it is specifically used to:

[0184] For each node in the medical consultation time sequence diagram: the word embedding vector of the node, the representation vector of the type to which the node belongs, the character-level representation vector of the node, the representation vector of the timing information of the medical consultation diagram where the node is located in the medical consultation time sequence diagram, and the representation vector of the timing information of the node in the medical consultation diagram where it is located are concatenated, and the concatenated vector is used as the first representation vector of the node.

[0185] Optionally, when the encoding layer of the risk prediction model determines the vector capable of characterizing the logical relationship of the medical consultation time sequence diagram according to the first representation vector of each node in the medical consultation time sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes, it is specifically used to:

[0186] Obtain a representation vector of the relationship between each node in the medical consultation sequence diagram and related nodes; determine the second representation vector of each node in the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and related nodes; fuse the first representation vector and the second representation vector of each node in the medical consultation sequence diagram to obtain a fused vector of each node in the medical consultation sequence diagram as the target representation vector of each node in the medical consultation sequence diagram; obtain a vector capable of characterizing the logical relationship of the medical consultation sequence diagram according to the target representation vector of each node on each timing path in the medical consultation sequence diagram.

[0187] Optionally, after obtaining the fused vector of each node in the medical consultation time sequence diagram, the encoding layer of the risk prediction model may use the fused vector of each node in the medical consultation time sequence diagram as the first representation vector of each node in the medical consultation time sequence diagram, and return to execute the process of determining the second representation vector of each node in the medical consultation time sequence diagram based on the first representation vector of each node in the medical consultation time sequence diagram, the first representation vector of each node's related nodes, and the representation vector of the relationship between each node and its related nodes, until a preset number of executions is reached.

[0188] Optionally, when the encoding layer of the risk prediction model determines the second representation vector of each node in the medical consultation time sequence diagram according to the first representation vector of each node in the medical consultation time sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes, it is specifically used to:

[0189] For each node in the medical consultation sequence diagram: determine the importance of the related nodes of the node to the node based on the first representation vector of the node, the first representation vector of the related nodes of the node and the representation vector of the relationship between the node and the related nodes; determine the second representation vector of the node based on the importance of the related nodes of the node to the node, the first representation vector of the related nodes of the node and the representation vector of the relationship between the node and the related nodes.

[0190] The risk prediction device provided in the embodiment of the present application first obtains the medical text of the target object, then structures the several medical records contained in the medical text respectively to obtain the medical graphs corresponding to the several medical records, then connects the medical graphs corresponding to the several medical records in series according to the medical times corresponding to the several medical records to obtain the medical time sequence graph, and finally uses the medical time sequence graph to predict the future risks of the target object. The risk prediction device provided in the embodiment of the present application can predict the future risks of the target object based on the medical time sequence graph obtained by processing the several medical records of the target object.

[0191] Fifth embodiment

[0192] The present application also provides a risk prediction device. Fig. 9 , showing a schematic diagram of the structure of the risk prediction device, the risk prediction device may include: at least one processor 901, at least one communication interface 902, at least one memory 903 and at least one communication bus 904;

[0193] In the embodiment of the present application, the number of the processor 901, the communication interface 902, the memory 903, and the communication bus 904 is at least one, and the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904;

[0194] The processor 901 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0195] The memory 903 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0196] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0197] Acquire a medical text of a target object, wherein the medical text includes a plurality of medical records;

[0198] Structuring the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and the relationships between the medical elements;

[0199] According to the visit times corresponding to the plurality of visit records, the visit graphs corresponding to the plurality of visit records are connected in series to obtain a visit time sequence graph;

[0200] The medical consultation sequence diagram is used to predict the future risks of the target object.

[0201] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0202] Sixth embodiment

[0203] The embodiment of the present application further provides a computer-readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0204] Acquire a medical text of a target object, wherein the medical text includes a plurality of medical records;

[0205] Structuring the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and the relationships between the medical elements;

[0206] According to the visit times corresponding to the plurality of visit records, the visit graphs corresponding to the plurality of visit records are connected in series to obtain a visit time sequence graph;

[0207] The medical consultation sequence diagram is used to predict the future risks of the target object.

[0208] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0209] 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 any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0210] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0211] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A risk prediction method, characterized in that: include: Acquire a medical text of a target object, wherein the medical text includes a plurality of medical records; Structuring the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and logical relationships between the medical elements, and the logical relationships between the medical elements include time sequence relationships; According to the visit times corresponding to the plurality of visit records, the visit graphs corresponding to the plurality of visit records are connected in series to obtain a visit sequence graph, wherein the visit sequence graph includes the time sequence relationship of each visit record of the target object and the visit elements in each visit record and the logical relationship between the visit elements; Using the medical consultation sequence diagram, predicting the future risks of the target subject; The method of using the medical consultation sequence diagram to predict the future risk of the target subject includes: Using the pre-trained risk prediction model, based on the medical consultation time sequence diagram, predict the future risk of the target subject; The training process of the risk prediction model includes: Using a training visit sequence graph, taking the task of predicting hidden nodes in the training visit sequence graph as a task, or taking the task of rearranging the shuffled training visit sequence graph as a task, pre-training the initial graph encoding model to obtain a pre-trained graph encoding model; Constructing a risk prediction model based on the pre-trained graph coding model, wherein the risk prediction model includes a coding layer and a risk prediction task layer, and the coding layer is the pre-trained graph coding model; The constructed risk prediction model was trained using training visit time series diagrams annotated with risk information.

2. The risk prediction method according to claim 1, characterized in that: The medical consultation graph includes a plurality of nodes, each node is a medical consultation element in a corresponding medical consultation record, and related nodes among the plurality of nodes are connected by directed edges; Structure the target visit record to be structured, including: Extracting medical consultation elements from the target medical consultation record, and determining the relationship between the extracted medical consultation elements; Arrange the extracted medical treatment elements with a time sequence relationship in time sequence, and connect adjacent medical treatment elements in the sorting result through directed edges to obtain a time sequence path corresponding to the target medical treatment record; Other medical consultation elements among the extracted medical consultation elements are connected with relevant medical consultation elements on the time series path corresponding to the target medical consultation record through directed edges.

3. The risk prediction method according to claim 1, characterized in that: The risk prediction model obtained by pre-training is used to predict the future risk of the target subject based on the time sequence diagram of medical consultation, including: Using the encoding layer of the pre-trained risk prediction model, the medical consultation sequence diagram is encoded into a vector that can characterize the logical relationship of the medical consultation sequence diagram as a medical consultation sequence diagram representation vector; The risk prediction task layer of the risk prediction model is used to predict the future risk of the target object based on the vector representing the medical consultation time series diagram.

4. The risk prediction method according to claim 3, characterized in that: The step of encoding the medical consultation sequence diagram into a vector capable of representing the logical relationship of the medical consultation sequence diagram comprises: Determine a first representation vector of each node in the medical consultation sequence diagram according to each node in the medical consultation sequence diagram and the sequence information of each node in the medical consultation sequence diagram; According to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes, a vector capable of representing the logical relationship of the medical consultation sequence diagram is determined.

5. The risk prediction method according to claim 4, characterized in that: The step of determining a first representation vector of each node in the medical consultation sequence diagram according to each node in the medical consultation sequence diagram and the sequence information of each node in the medical consultation sequence diagram comprises: For each node in the medical consultation time sequence diagram: the word embedding vector of the node, the representation vector of the type to which the node belongs, the character-level representation vector of the node, the representation vector of the timing information of the medical consultation diagram where the node is located in the medical consultation time sequence diagram, and the representation vector of the timing information of the node in the medical consultation diagram where it is located are concatenated, and the concatenated vector is used as the first representation vector of the node.

6. The risk prediction method according to claim 4, characterized in that: The step of determining a vector capable of representing a logical relationship of the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the related nodes of each node, and the relationship between each node and the related nodes comprises: Obtaining a representation vector of the relationship between each node and related nodes in the medical consultation time sequence diagram; Determine a second representation vector for each node in the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes; Fusing the first representation vector and the second representation vector of each node in the medical consultation sequence diagram to obtain a fused vector of each node in the medical consultation sequence diagram as a target representation vector of each node in the medical consultation sequence diagram; According to the target representation vector of each node on each timing path in the medical consultation timing diagram, a vector capable of representing the logical relationship of the medical consultation timing diagram is obtained.

7. The risk prediction method according to claim 6, characterized in that: After obtaining the fused vector of each node in the medical consultation time sequence diagram, the method further includes: The fused vector of each node in the medical consultation sequence diagram is used as the first representation vector of each node in the medical consultation sequence diagram, and the execution is returned based on the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes, to determine the second representation vector of each node in the medical consultation sequence diagram until a preset number of executions is reached.

8. The risk prediction method according to claim 6, characterized in that: The step of determining the second representation vector of each node in the medical consultation sequence diagram according to the first representation vector of each node in the medical consultation sequence diagram, the first representation vector of the related nodes of each node, and the representation vector of the relationship between each node and the related nodes comprises: For each node in the medical consultation sequence diagram: Determine the importance of the related nodes of the node to the node according to the first representation vector of the node, the first representation vector of the related nodes of the node, and the representation vector of the relationship between the node and the related nodes; The second representation vector of the node is determined according to the importance of the related nodes of the node to the node, the first representation vector of the related nodes of the node, and the representation vector of the relationship between the node and the related nodes.

9. A risk prediction device, characterized in that: include: Text acquisition module, medical record structuring module, medical chart concatenation module and risk prediction module; The text acquisition module is used to acquire the medical text of the target object, wherein the medical text includes a plurality of medical records; The medical record structuring module is used to structure the plurality of medical records respectively to obtain medical graphs corresponding to the plurality of medical records respectively, wherein the medical graphs include medical elements in the corresponding medical records and logical relationships between the medical elements, and the logical relationships between the medical elements include time sequence relationships; The medical consultation graph series connection module is used to connect the medical consultation graphs corresponding to the medical consultation records in series according to the medical consultation times corresponding to the medical consultation records, so as to obtain a medical consultation time sequence graph, wherein the medical consultation time sequence graph includes the time sequence relationship of each medical consultation record of the target object, the medical consultation elements in each medical consultation record, and the logical relationship between the medical consultation elements; The risk prediction module is used to predict the future risk of the target subject by using the medical consultation sequence diagram; When the risk prediction module uses the medical consultation sequence diagram to predict the future risk of the target object, it is specifically used to: Using the pre-trained risk prediction model, based on the medical consultation time sequence diagram, predict the future risk of the target subject; The risk prediction device further includes a model training module; the model training module is used to: Using a training visit sequence graph, taking the task of predicting hidden nodes in the training visit sequence graph as a task, or taking the task of rearranging the shuffled training visit sequence graph as a task, pre-training the initial graph encoding model to obtain a pre-trained graph encoding model; Constructing a risk prediction model based on the pre-trained graph coding model, wherein the risk prediction model includes a coding layer and a risk prediction task layer, and the coding layer is the pre-trained graph coding model; The constructed risk prediction model was trained using training visit time series diagrams annotated with risk information.

10. A risk prediction device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the risk prediction method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the risk prediction method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Re-hospitalization risk predicting method based on deep learning hybrid model

    CN109949936A

  • Risk early warning method, system and equipment based on natural language processing and medium

    CN113094476A

  • Marrow suppression risk prediction method and device suitable for tumor patient and storage medium

    CN113314222A