Method and device for predicting evolution trend of chronic gastritis
By combining the historical interactive mode and the method of generating models, build a chronic gastritis time -sequent knowledge map, solve the problem of predicting the dynamic evolution of chronic gastritis in existing technology, and realize the dynamic prediction and data -driven dynamic prediction and data -driven in the future state of the target patients. Medical decision support.
Patent Information
- Application Number
- CN202411327385.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to predict the dynamic evolution trend of chronic gastritis in the prior art, especially in the time-series diagnosis and treatment data.
A combination of historical interaction mode and generation mode is used to construct a chronic gastritis time-series knowledge graph. The current condition data of the target patient is inferred through a pre-trained model, and the probability distribution of the historical vocabulary and entity vocabulary is integrated to predict the possible future occurrence of the target patient. disease state.
The dynamic prediction of the future condition of patients with chronic gastritis targets has provided data -driven decision support tools to help doctors make more wise medical decisions.
Smart Images

Figure CN119361141A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the fields of temporal knowledge graph reasoning and medical technology, and in particular to a method and device for predicting the evolution trend of chronic gastritis. Background Art
[0002] Studies have found that in the medical field, patients with the same disease usually show similar symptoms. The patient's historical medical information plays an important role in the diagnosis and prediction of subsequent patients with the same disease. Chronic gastritis refers to chronic inflammatory lesions of the gastric mucosa caused by different causes. The cause and pathogenesis of this disease are not yet fully understood, and may be the result of a combination of factors. Studies have shown that chronic gastritis, gastric atrophy, intestinal metaplasia, and atypical hyperplasia all have the risk of independently developing into gastric cancer. Therefore, it is very meaningful to study the evolution of chronic gastritis and even canceration.
[0003] In recent years, researchers have used the four diagnostic information to predict the disease development status of chronic gastritis or predict the relationship between pulse and gastric cancer tumor markers CEA and CA199. For example, the SSD-based CNN model effectively improved the endoscopic diagnosis of early gastric cancer; the mask region-based CNN method achieved the detection of early gastric cancer. Although some static disease prediction studies have been carried out on the diagnosis and treatment data of chronic gastritis or gastric cancer, there are few studies on dynamic disease prediction based on time series diagnosis and treatment data. Therefore, how to predict the dynamic evolution trend of chronic gastritis has become an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a method and device for predicting the evolution trend of chronic gastritis, which are used to solve the defect of difficulty in predicting the dynamic evolution trend of chronic gastritis in the prior art, and to evaluate the disease state that may occur in the target patient in the future. At the same time, it can also provide doctors with data-driven decision support tools to help doctors make more informed medical decisions.
[0005] The present invention provides a method for predicting the evolution trend of chronic gastritis, comprising:
[0006] Obtain current condition data of target patients for chronic gastritis disease prediction;
[0007] Inputting the current condition data into a pre-trained prediction model of the evolution trend of chronic gastritis, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode;
[0008] Inferring the current condition data through the historical interaction pattern, obtaining a first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph;
[0009] Inferring the current condition data by generating a pattern, obtaining a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis;
[0010] The first probability distribution and the second probability distribution are integrated to obtain a disease entity with the highest combined probability as a prediction result of the future condition of the target patient.
[0011] In a possible implementation, the method further includes:
[0012] Obtain clinical diagnosis and treatment data set of chronic gastritis;
[0013] Extracting a set of related entities, a set of relationships between entities, and a set of timestamps in the clinical diagnosis and treatment data set;
[0014] A chronic gastritis time series knowledge graph is constructed based on the set of related entities, the set of relationships between entities, and the set of timestamps. The chronic gastritis time series knowledge graph includes a historical vocabulary and a full entity vocabulary. The historical vocabulary contains a set of all tail entities that interact with the head entity and relationships in a fact set of all known time snapshots before a specific moment. The full entity vocabulary is a set of entities related to the clinical diagnosis and treatment of chronic gastritis.
[0015] In a possible implementation, the method further includes:
[0016] Generate a first index vector through MLP;
[0017] Determine a candidate space based on the first index vector and the historical vocabulary to minimize the probability of uninteresting entities;
[0018] A softmax function is used to predict the first probability distribution of entities in the historical vocabulary in the candidate space.
[0019] In a possible implementation, the method further includes:
[0020] Using a second index vector with a dimension that is consistent with the size of the entire entity vocabulary space;
[0021] A second probability distribution of entities in the entire entity vocabulary is predicted using a softmax function based on the second index vector.
[0022] In a possible implementation, the method further includes:
[0023] Calculate the combined probability distribution of each predicted entity of the first probability distribution and the predicted entity of the second probability distribution using cross entropy loss based on a preset weight coefficient;
[0024] The disease entity with the highest combined probability is used as the prediction result of the future condition of the target patient.
[0025] In a possible implementation, the method further includes:
[0026] Obtain the clinical diagnosis and treatment dataset of chronic gastritis within the target time span;
[0027] Dividing the clinical diagnosis and treatment dataset into multiple time series knowledge graph datasets according to the number of diagnosis times;
[0028] Construct an initial historical-generation temporal knowledge graph reasoning model that integrates historical interaction mode and generation mode;
[0029] Based on the multiple time series knowledge graph data sets, the initial history-generated time series knowledge graph reasoning model is trained and tested to obtain a trained target history-generated knowledge graph model, and the trained target history-generated knowledge graph model is used as a prediction model for the evolution trend of chronic gastritis.
[0030] In a possible implementation, the method further includes:
[0031] Based on the predicted result of the future condition of the target patient, the chronic gastritis time series knowledge graph is queried to determine an auxiliary treatment plan for the predicted result of the future condition.
[0032] The present invention also provides a device for predicting the evolution trend of chronic gastritis, comprising the following modules:
[0033] An acquisition module is used to acquire the current condition data of the target patient for chronic gastritis disease prediction;
[0034] An input module, used for inputting the current condition data into a pre-trained prediction model of the evolution trend of chronic gastritis, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode;
[0035] A prediction module, configured to infer the current condition data through the historical interaction mode to obtain a first probability distribution of a predicted entity in a historical vocabulary of a pre-constructed chronic gastritis time series knowledge graph;
[0036] A prediction module, used to infer the current condition data by generating a pattern to obtain a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis;
[0037] The prediction module is used to fuse the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient.
[0038] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for predicting the evolution trend of chronic gastritis as described in any one of the above is implemented.
[0039] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting the evolution trend of chronic gastritis as described in any one of the above.
[0040] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for predicting the evolution trend of chronic gastritis as described in any one of the above is implemented.
[0041] The method and device for predicting the evolution trend of chronic gastritis provided by the present invention obtain the current condition data of a target patient for chronic gastritis disease prediction; input the current condition data into a pre-trained prediction model for the evolution trend of chronic gastritis, wherein the prediction model for the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; infer the current condition data through the historical interaction mode to obtain a first probability distribution of a predicted entity in a historical vocabulary of a pre-constructed chronic gastritis time series knowledge graph; infer the current condition data through the generation mode to obtain a second probability distribution of the predicted entity in a set of entities related to clinical diagnosis and treatment of chronic gastritis; and fuse the first probability distribution and the second probability distribution to obtain a disease entity with the highest combined probability as a prediction result of the future condition of the target patient. Compared with the existing technology, there are fewer studies on dynamic disease prediction for time-series diagnosis and treatment data prediction, and some existing knowledge graph embedding methods only focus on the potential representation of each individual snapshot, while ignoring the problem of long-term dependencies of facts in continuous time snapshots. This solution constructs a dynamic clinical diagnosis and treatment dataset for chronic gastritis and a chronic gastritis evolution trend prediction model including historical interaction patterns and generation patterns. The chronic gastritis evolution trend prediction model is used to dynamically predict the development of the current condition of the target chronic gastritis patient, and the existing disease state is used to predict the future disease state. This can effectively evaluate the possible disease state of the target patient in the future, and can also provide doctors with data-driven decision support tools to help them make more informed medical decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a flow chart of a method for predicting the evolution trend of chronic gastritis provided by the present invention.
[0044] Figure 2 It is a schematic diagram of a process for training a chronic gastritis evolution trend prediction model provided by the present invention.
[0045] Figure 3 An overall framework diagram of a historical-generation temporal knowledge graph reasoning model provided for an embodiment of the present invention.
[0046] Figure 4 A schematic diagram of the recursive training process of a historical-generation temporal knowledge graph reasoning model provided in an embodiment of the present invention.
[0047] Figure 5 A schematic diagram of a visualization display of a temporal knowledge graph dataset CG-TKG-4 provided in an embodiment of the present invention.
[0048] Figure 6 A schematic diagram of a chronological knowledge graph of a patient's four medical visits provided in an embodiment of the present invention.
[0049] Figure 7 A schematic diagram of the visualization of the knowledge graph reasoning results of the patient’s fourth visit provided in an embodiment of the present invention.
[0050] Figure 8 A schematic diagram of the structure of a device for predicting the evolution trend of chronic gastritis provided in an embodiment of the present invention.
[0051] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0053] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0054] First, the technology applied in the embodiment of the present invention is described:
[0055] Temporal knowledge graphs not only contain entity relationship information of knowledge graphs, but also have rich temporal knowledge information. Researching reasoning technology for temporal knowledge graphs is conducive to discovering the dynamic evolution of entity relationships. Aiming at the actual demand for disease prediction / early warning in the evolution of chronic gastritis, this study proposed a History-Generation Temporal Knowledge Graph Reasoning Model (H-GRM), which uses historical interaction patterns and generation patterns to capture facts that generate a large number of interactions in historical time snapshots and predict new facts, so as to predict the evolution of chronic gastritis.
[0056] Knowledge Graph (KG) has been widely used in information retrieval, product recommendation, etc. due to its rich knowledge organization capabilities and fast retrieval and reasoning capabilities. Traditional KG represents the static relationship between subject entities and object entities in the form of triples (subject entity, relationship, object entity), but it is difficult to represent the dynamic relationship between interactive entities based on events. Therefore, researchers proposed the concept of Temporal Knowledge Graph (TKG). TKG adds a timestamp to the triple representation of traditional KG, that is, it is represented in the form of (subject entity, relationship, object entity, timestamp), which is equivalent to a series of KG sequences with timestamps, and each KG records the event connection that occurred at a specific moment.
[0057] Figure 1 A flow chart of a method for predicting the evolution trend of chronic gastritis provided in an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method specifically includes:
[0058] S11. Obtain current condition data of the target patient for chronic gastritis disease prediction.
[0059] In an embodiment of the present invention, the problems and actual entities in the dynamic prediction process of the evolution trend of chronic gastritis are firstly abstracted and summarized, and then converted into a universal symbolic definition of a dynamic knowledge graph.
[0060] definition They are a set of entities related to the clinical diagnosis and treatment of chronic gastritis (such as chronic gastritis, chronic atrophic gastritis, gastroscopy, hepatogastric qi stagnation, etc.), a set of relationships (such as symptoms, manifestations, current medical history, allergy history, testing, etc.) and a set of timestamps. A time series knowledge graph of chronic gastritis is a set of four-tuples of the form (s, r, o, t), where s∈ε is the head entity, o∈ε is the tail entity, It is the relationship between entity s and entity o occurring at time t. The dynamic clinical diagnosis and treatment dataset CG-TKG of chronic gastritis can be formalized as a KG sequence with timestamps, that is, in is a snapshot of a TKG (i.e., a knowledge graph representation of a patient's visit) consisting of a set of four-tuples occurring at time t. Let s, r, o, t represent the embedding representation of the head entity s, relation r, tail entity o, and timestamp t, respectively. For each pair of k The head entity and relationship of the moment, define a specific (s, r, t k ) Historical Glossary It includes k All known time snapshots before the moment The set of all tail entities that interact with the head entity s and the relationship r in the fact set (i.e., the patient's historical medical records), where is an N-dimensional multi-hot encoding vector, where entities in the historical vocabulary will be set to 1, and other entities will be set to 0, and N is the size of the entity set ε. The goal of the entity reasoning task is to determine the missing head entity or tail entity (i.e., infer / predict the disease status, drug treatment, etc. of the patient at time t) given the temporal knowledge of the missing head entity (?, r, o, t) or the temporal knowledge of the missing tail entity (s, r, ?, t).
[0061] Among them, the dynamic clinical diagnosis and treatment data set CG-TKG of chronic gastritis comes from the clinical diagnosis and treatment research data of chronic gastritis treated by the chief physician of a tertiary Chinese medicine hospital. The data overview is as follows: a total of 17,906 patients, 38,360 visits; clinical consultation time is from March 2009 to October 2022; symptoms include bloating, stomach pain, poor appetite, heartburn, acid reflux, white tongue coating, slippery pulse and other 40,993 types of complaints, current medical history and TCM inspection and palpation information; Western medicine diseases are chronic gastritis, including 119 types of diseases such as chronic atrophic gastritis, chronic superficial gastritis, erosive gastritis, Helicobacter pylori-related gastritis, etc.; TCM diseases include spleen deficiency and damp-heat syndrome, liver-stomach disharmony syndrome, spleen-stomach disharmony syndrome, liver depression and spleen deficiency syndrome, spleen and stomach syndrome. 263 types of diagnostic results such as asthenia syndrome; laboratory examinations included 59 experimental items such as complete biochemistry, urine routine, complete blood cell analysis, stool routine + occult blood, including 139 indicators and 21 indicator results such as white blood cells, red blood cells, urine protein, alpha-fetoprotein, etc.; gastroscopy and pathological examinations included 35 items such as active inflammation, intraepithelial neoplasia, atrophy, gastric mucosal texture, gastric mucosal color, and 56 indicator descriptions such as mild, moderate, normal, smooth and soft, and rough mucosa; the longest number of diagnosis and treatment for the patient was 35 times, and the shortest number of diagnosis and treatment was 1 time.
[0062] Furthermore, a time series knowledge graph of chronic gastritis was constructed. The CG-TKG dataset was divided according to the number of visits, and the data with the number of visits of m∈{4,8,12} were selected to construct a time series dataset. The data of the first k∈{3,7,11} visits were used as the training set, and the rest were used as the validation set and the test set. Finally, after manual proofreading by TCM experts, three dynamic clinical diagnosis and treatment datasets of chronic gastritis were obtained: CG-TKG-4, CG-TKG-8, and CG-TKG-12. Table 1 shows the data statistics of the CG-TKG dataset. Figure 5 This is a visual display of the CG-TKG-4 map.
[0063] Table 1 CG-TKG dataset statistics
[0064]
[0065] Furthermore, the current condition data of the current chronic gastritis target patient is obtained, wherein the current condition data includes but is not limited to: current time, current symptoms, manifestations, historical medical history and current medical history, etc.
[0066] S12, inputting the current condition data into the pre-trained prediction model of the evolution trend of chronic gastritis.
[0067] In an embodiment of the present invention, a pre-trained chronic gastritis evolution trend prediction model includes a historical interaction mode and a generation mode. It is convenient to simultaneously aggregate the historical interaction information in the past snapshots and the new facts that may appear in the future, and can effectively improve the performance of dynamic event evolution reasoning. It mainly includes the following steps: obtaining a clinical diagnosis and treatment data set of chronic gastritis diseases within a target time span; dividing the clinical diagnosis and treatment data set into multiple time series knowledge graph data sets according to the number of diagnoses; constructing an initial history-generation time series knowledge graph reasoning model that integrates the historical interaction mode and the generation mode; training and testing the initial history-generation time series knowledge graph reasoning model based on multiple time series knowledge graph data sets to obtain a trained target history-generation knowledge graph model, and using the trained target history-generation knowledge graph model as a chronic gastritis evolution trend prediction model.
[0068] Specifically, Figure 3 The overall framework of the History-Generation Temporal Knowledge Graph Reasoning Model (H-GRM) is presented. H-GRM mainly integrates two reasoning modes: historical interaction mode and generation mode. It considers the specific historical vocabulary distribution and the overall entity vocabulary distribution of historical repeated facts, and combines the two distributions to give prediction results. Figure 3As shown in the figure, when predicting the quadruple (s1, r1, ?, t+1), the historical interaction mode infers the probability of the entity in the historical vocabulary (i.e., the blue entity in the figure). On the other hand, the generation mode estimates the entity probability in the entire entity vocabulary. Finally, H-GRM combines the results of the probability prediction of the historical interaction mode and the generation mode to output the final prediction of the entity.
[0069] First, the training set is preprocessed to obtain the historical vocabulary for each pair of entity and relation combination (s, r, t) at each time t in the training snapshot in is an N-dimensional multi-hot encoded vector that contains All object entities in the entity s and the object entity of the relation r. Figure 4 As shown, the model is trained in the order of each snapshot, and the recursive idea is adopted to train the model by incrementally maintaining the historical vocabulary of all previous snapshots. When it is necessary to accept queries or evaluate performance in the validation set and test set, the largest historical vocabulary in the entire training set is used to give prediction results.
[0070] Specifically, for each k The query quadruple (s, r, ?, t k ), the formal process of continuously expanding the historical vocabulary from past time snapshots during training is as follows:
[0071]
[0072] in is an N-dimensional multi-hot encoded vector with all entities in the current history vocabulary labeled as 1.
[0073] S13. Inferring the current condition data through the historical interaction pattern, obtaining a first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph.
[0074] Two reasoning modes are introduced below.
[0075] Historical Interaction Pattern: The historical interaction pattern aims to identify facts that query entity and relationship pairs generate a large number of interactions in historical time snapshots and consider these known facts to predict future facts.
[0076] If the query (s,r,?,t k ) exists k A moment-specific historical vocabulary for entity s and relation r H-GRM will increase the estimated probability of object entities in the historical vocabulary. Specifically, the historical interaction module first generates an index vector v through MLP q :
[0077] t k =t k-1 +t u
[0078] v α =tanh(W h [s,r,t k ]+b h )
[0079] in and is a training hyperparameter. u is the unit step of time, t1 = t u . Index vector v q is an N-dimensional vector, where N is the entire entity set size.
[0080] In the historical interaction module, in order to minimize the probability of entities that do not generate known facts with the query entities and relations in the historical snapshot, we use replace Change the index values of entities that are not of interest to a small negative number. Therefore, H-GRM can be q and changing the multi-hot encoded vector To divide the candidate space, minimize the probability of entities of no interest, and finally use the softmax function to estimate the probability of the target entity in the historical vocabulary:
[0081]
[0082] p(h)=softmax(c q )
[0083] where h q is an N-dimensional index vector, entities of no interest are in h q is assigned a value that is infinitely close to 0. p(c) is a vector of size equal to the size of the overall entity vocabulary, representing the prediction probability of the historical vocabulary. The historical interaction pattern can be predicted from the vocabulary that has historical interactions with the query entities and relations, rather than from the entire vocabulary. In addition, new facts may also appear in the new snapshot, so the generative model is introduced to predict these facts.
[0084] S14. Inferring the current condition data by generating a pattern to obtain a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis.
[0085] Generate Patterns: Generate patterns given the same query (s, r, ?, t k), the generating schema is responsible for extracting The prediction fact of the generative mode is regarded as a brand new fact that has nothing to do with historical interactions. Similar to the historical interaction mode, the generative mode also uses one dimension as the candidate space An index vector of size g q , and use the softmax function to normalize and predict:
[0086] g q =W g [s,r,t k ]+b g
[0087] p(g) = softmax(g q )
[0088] in and is a training hyperparameter. The generative model complements the historical interaction model and has the ability to predict new facts.
[0089] S15. Fusing the first probability distribution and the second probability distribution to obtain a disease entity with the highest combined probability as a prediction result of the future condition of the target patient.
[0090] Given a query (s,r,?,t k ) Predicting the target entity can be viewed as a multi-classification task. The learning goal of H-GRM is to minimize the cross entropy loss over all snapshots of TKG.
[0091]
[0092] Among them it For snapshot The i-th target entity with the true value, p(y ik |s,r,t) is in the snapshot When the i truth-value entity is o i is the combined probability of the kth target entity.
[0093] In order to realize the reasoning process, the coefficient α is introduced to adjust the weight between the historical interaction pattern and the generation pattern. H-GRM combines the probability predictions of the historical interaction pattern and the generation pattern to obtain the entity with the highest combined probability as the prediction result, as follows:
[0094] p(o|s,r,t)=α*p(h)+(1-α)*p(g)
[0095] o t = argmax o∈ε p(o|s,r,t)
[0096] where α∈[0,1] and p(o|s,r,t) is a vector containing the probabilities of all entities.
[0097] The chronic gastritis time series knowledge graph can effectively integrate the diagnosis and treatment records of chronic gastritis patients at different time points, helping doctors to more accurately diagnose different stages and types of chronic gastritis. The time series knowledge graph reasoning technology can provide early warning of potential disease deterioration based on the patient's historical condition and treatment response, support timely intervention, and reduce disease progression. Figure 6 The time series knowledge graph of chronic gastritis of the patient's four clinical visits is shown. We use the patient's first three medical records and the symptom information of the fourth medical visit to perform reasoning and predict the patient's Chinese and Western medicine disease diagnosis and treatment methods in the fourth medical visit. The results after reasoning using the H-GRM model are as follows Figure 7 . The patient was diagnosed with chronic gastritis, chronic superficial atrophic gastritis, and chronic atrophic gastritis in the first three diagnosis and treatments. In the fourth diagnosis and treatment, the patient had symptoms such as difficulty in digestion, thin white fur, poor appetite, and taste. H-GRM combined this information with the evolution law of chronic gastritis learned from CG-TKG-4, and predicted that the patient's current Western medicine disease was chronic atrophic gastritis, and the TCM disease was epigastric pain and liver-stomach qi stagnation. At the same time, based on the original atlas, our method predicted some high-probability edges of Chinese herbal medicines and Chinese patent medicines used for treatment. H-GRM can effectively evaluate the patient's possible future disease status, and at the same time provide possible treatment drugs and methods, providing doctors with data-driven decision support tools to help them make more informed medical decisions.
[0098] The method for predicting the evolution trend of chronic gastritis provided in an embodiment of the present invention obtains the current condition data of the target patient for prediction of chronic gastritis; inputs the current condition data into the prediction model of the evolution trend of chronic gastritis after pre-training, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; infers the current condition data through the historical interaction mode to obtain the first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph; infers the current condition data through the generation mode to obtain the second probability distribution of the predicted entity in the set of entities related to the clinical diagnosis and treatment of chronic gastritis; fuses the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient. Compared with the prior art, there are fewer studies on dynamic disease prediction for time series diagnosis and treatment data prediction, and some existing knowledge graph embedding methods only focus on the potential representation of each individual snapshot, while ignoring the problem of long-term dependency of facts in continuous time snapshots. By using this method, a dynamic clinical diagnosis and treatment dataset of chronic gastritis and a chronic gastritis evolution trend prediction model including historical interaction patterns and generation patterns are constructed. The chronic gastritis evolution trend prediction model is used to dynamically predict the development of the current condition of the target chronic gastritis patient. The existing disease state is used to predict the future disease state, which can effectively evaluate the target patient's possible disease state in the future. At the same time, it can also provide doctors with data-driven decision support tools to help them make more informed medical decisions.
[0099] Figure 2 A schematic diagram of a process for training a chronic gastritis evolution trend prediction model provided by an embodiment of the present invention, such as Figure 2 As shown, the method specifically includes:
[0100] S21. Obtain a clinical diagnosis and treatment dataset of chronic gastritis within a target time span.
[0101] S22. Divide the clinical diagnosis and treatment dataset into multiple time series knowledge graph datasets based on the number of consultations.
[0102] In an embodiment of the present invention, a pre-trained chronic gastritis evolution trend prediction model includes a historical interaction mode and a generation mode. It is convenient to simultaneously aggregate the historical interaction information in the past snapshots and the new facts that may appear in the future, and can effectively improve the performance of dynamic event evolution reasoning. It mainly includes the following steps: obtaining a clinical diagnosis and treatment data set of chronic gastritis diseases within a target time span; dividing the clinical diagnosis and treatment data set into multiple time series knowledge graph data sets according to the number of diagnoses; constructing an initial history-generation time series knowledge graph reasoning model that integrates the historical interaction mode and the generation mode; training and testing the initial history-generation time series knowledge graph reasoning model based on multiple time series knowledge graph data sets to obtain a trained target history-generation knowledge graph model, and using the trained target history-generation knowledge graph model as a chronic gastritis evolution trend prediction model.
[0103] Firstly, a dynamic clinical diagnosis and treatment dataset CG-TKG of real-world chronic gastritis diseases containing 17,906 people was constructed, covering the period from March 2009 to October 2022. According to the number of consultations, it was divided into three temporal knowledge graph datasets: CG-TKG-4 (including 772 patients, with a mean time interval of 37.00 days and a variance of 84.94 days), CG-TKG-8 (including 140 patients, with a mean time interval of 38.06 days and a variance of 88.90 days), and CG-TKG-12 (including 54 patients, with a mean time interval of 30.45 days and a variance of 62.25 days).
[0104] S23. Construct an initial historical-generation temporal knowledge graph reasoning model that integrates historical interaction mode and generation mode.
[0105] like Figure 3 The overall framework of the History-Generation Temporal Knowledge Graph Reasoning Model (H-GRM) is shown. H-GRM mainly integrates two reasoning modes: historical interaction mode and generation mode. It is convenient to simultaneously aggregate historical interaction information in past snapshots and new facts that may appear in the future. It considers the specific historical vocabulary distribution and the overall entity vocabulary distribution of historical repeated facts, and combines the two distributions to give prediction results, which can effectively improve the performance of reasoning on dynamic event evolution.
[0106] S24. Based on the multiple time series knowledge graph data sets, the initial history-generated time series knowledge graph reasoning model is trained and tested to obtain a trained target history-generated knowledge graph model, and the trained target history-generated knowledge graph model is used as a prediction model for the evolution trend of chronic gastritis.
[0107] First, the training set is preprocessed to obtain the historical vocabulary for each pair of entity and relation combination (s, r, t) at each time t in the training snapshot in is an N-dimensional multi-hot encoded vector that contains All object entities in the entity s and the object entity of the relation r. Figure 4 As shown, the model is trained in the order of each snapshot, and the recursive idea is adopted to train the model by incrementally maintaining the historical vocabulary of all previous snapshots. When it is necessary to accept queries or evaluate performance in the validation set and test set, the largest historical vocabulary in the entire training set is used to give prediction results.
[0108] Specifically, for each k The query quadruple (s, r, ?, t k ), the formal process of continuously expanding the historical vocabulary from past time snapshots during training is as follows:
[0109]
[0110] in is an N-dimensional multi-hot encoded vector with all entities in the current history vocabulary labeled as 1.
[0111] The H-GRM model uses Xavier to initialize the model parameters, and then uses the Adam algorithm to optimize the objective function. The hyperparameters of H-GRM are set as follows: the hidden layer size is set to 200 dimensions, the embedding dimension is also set to 200 dimensions, the batch size of training is fixed to 1024, the maximum training cycle is 30, the coefficient α is set to 0.5, and the learning rate is set to 0.001.
[0112] The prediction performance of H-GRM and baseline models was tested on the three CG-TKG temporal knowledge graphs mentioned above. The experimental results show that the H-GRM model has an average MRR improvement of 45.95% compared to the best baseline CeNet model, indicating that the H-GRM model can better use historical events to predict evolution trends.
[0113] Table 1 shows the results of the link prediction task of H-GRM and baseline models on three chronic gastritis datasets. On the three datasets, the static knowledge graph reasoning method lags behind the temporal knowledge graph method because the static knowledge graph reasoning method does not consider temporal dynamic information and lacks the ability to capture long-term dependencies. It can be seen that H-GRM has shown superior performance to other baseline methods on each dataset, and compared with the second best method CeNet, it has an average improvement of 45.95% in MRR, 34.99% in Hits@1, 24.52% in Hits@3, and 22.02% in Hits@10. This result shows that under the joint action of historical interaction mode and generation mode, H-GRM can well learn the disease evolution information of chronic gastritis and effectively improve the accuracy of link prediction.
[0114] Table 1 Comparison results of link prediction performance between H-GRM and baseline methods on chronic gastritis dataset
[0115]
[0116] The embodiment of the present invention also conducted an ablation experiment on H-GRM to explore the importance of historical interaction patterns and generation patterns. The historical interaction module (wG-only) and the generation module (wH-only) were removed respectively, and tested on three data sets. The experimental results are shown in Table 2. It can be seen that removing the historical interaction pattern will cause the MRR to drop by an average of 26.76%, and other indicators will also drop sharply, which shows that the historical interactions in the diagnosis, examination and treatment information of known chronic gastritis patients are of great help in predicting the disease trend of future patients. On the other hand, removing the generation mode will reduce the MRR by an average of 10.15%, which means that the model's predictive ability for new facts decreases. These results show that the good performance of H-GRM is due to the combined effect of the ability to learn from historical interactions and the ability to predict new facts, which further shows that H-GRM is very suitable for studying the evolution of chronic gastritis.
[0117] Table 2 Ablation experiment results
[0118]
[0119]
[0120] The chronic gastritis evolution trend prediction model of the embodiment of the present invention captures the time and historical interaction information in the temporal knowledge graph by integrating the historical interaction mode and the generation mode, which is used for the prediction and feature display of chronic gastritis disease progression. The experimental results show that H-GRM has good disease prediction performance on the chronic gastritis dataset, and provides an effective model for the study of disease evolution of chronic gastritis.
[0121] Figure 8 A schematic diagram of a device for predicting the evolution trend of chronic gastritis provided by an embodiment of the present invention, specifically comprising:
[0122] The acquisition module 801 is used to acquire the current condition data of the target patient for chronic gastritis disease prediction. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0123] The input module 802 is used to input the current condition data into the pre-trained prediction model of the evolution trend of chronic gastritis, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0124] The prediction module 803 is used to infer the current condition data through the historical interaction mode to obtain the first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0125] The prediction module 803 is used to infer the current condition data by generating a pattern to obtain a second probability distribution of the predicted entity in the set of entities related to the clinical diagnosis and treatment of chronic gastritis. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0126] The prediction module 803 is used to fuse the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0127] The prediction device for the evolution trend of chronic gastritis provided in this embodiment can be as follows: Figure 8 The prediction device for the evolution trend of chronic gastritis shown in can be performed as follows Figure 1 All steps of the method for predicting the evolution trend of chronic gastritis in Figure 1 The technical effect of the prediction method of the evolution trend of chronic gastritis shown in the figure is shown in the figure. Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0128] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the prediction method of the evolution trend of chronic gastritis, which method includes: obtaining the current condition data of the target patient for prediction of chronic gastritis; inputting the current condition data into the prediction model of the evolution trend of chronic gastritis after pre-training, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; inferring the current condition data through the historical interaction mode to obtain the first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph; inferring the current condition data through the generation mode to obtain the second probability distribution of the predicted entity in the set of entities related to the clinical diagnosis and treatment of chronic gastritis; fusing the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient.
[0129] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0130] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for predicting the evolution trend of chronic gastritis provided by the above-mentioned methods, the method including: obtaining current condition data of a target patient for chronic gastritis disease prediction; inputting the current condition data into a pre-trained prediction model for the evolution trend of chronic gastritis, wherein the prediction model for the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; inferring the current condition data through the historical interaction mode to obtain a first probability distribution of the predicted entity in the historical vocabulary of a pre-constructed chronic gastritis time series knowledge graph; inferring the current condition data through the generation mode to obtain a second probability distribution of the predicted entity in a set of entities related to clinical diagnosis and treatment of chronic gastritis; fusing the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient.
[0131] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the method for predicting the evolution trend of chronic gastritis provided by the above-mentioned methods, the method comprising: obtaining current condition data of a target patient for predicting the evolution trend of chronic gastritis; inputting the current condition data into a pre-trained prediction model for the evolution trend of chronic gastritis, wherein the prediction model for the evolution trend of chronic gastritis comprises a historical interaction mode and a generation mode; inferring the current condition data through the historical interaction mode to obtain a first probability distribution of a predicted entity in a historical vocabulary of a pre-constructed chronic gastritis time series knowledge graph; inferring the current condition data through the generation mode to obtain a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis; fusing the first probability distribution and the second probability distribution to obtain a disease entity with the highest combined probability as a prediction result of the future condition of the target patient.
[0132] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the evolution trend of chronic gastritis, characterized in that: include: Obtain current condition data of target patients for chronic gastritis disease prediction; Inputting the current condition data into a pre-trained prediction model of the evolution trend of chronic gastritis, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; Inferring the current condition data through the historical interaction pattern, obtaining a first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph; Inferring the current condition data by generating a pattern, obtaining a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis; The first probability distribution and the second probability distribution are integrated to obtain a disease entity with the highest combined probability as a prediction result of the future condition of the target patient.
2. The method according to claim 1, characterized in that The method further comprises: Obtain clinical diagnosis and treatment data set of chronic gastritis; Extracting a set of related entities, a set of relationships between entities, and a set of timestamps in the clinical diagnosis and treatment data set; A chronic gastritis time series knowledge graph is constructed based on the set of related entities, the set of relationships between entities, and the set of timestamps. The chronic gastritis time series knowledge graph includes a historical vocabulary and a full entity vocabulary. The historical vocabulary contains a set of all tail entities that interact with the head entity and relationships in a fact set of all known time snapshots before a specific moment. The full entity vocabulary is a set of entities related to the clinical diagnosis and treatment of chronic gastritis.
3. The method according to claim 2, characterized in that The inference of the current condition data by the historical interaction mode to obtain a first probability distribution of the predicted entity in the historical vocabulary of the pre-constructed chronic gastritis time series knowledge graph includes: Generate a first index vector through MLP; Determine a candidate space based on the first index vector and the historical vocabulary to minimize the probability of uninteresting entities; A softmax function is used to predict the first probability distribution of entities in the historical vocabulary in the candidate space.
4. The method according to claim 2, characterized in that: The inference of the current condition data by generating a pattern to obtain a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis includes: Using a second index vector with a dimension that is consistent with the size of the entire entity vocabulary space; A second probability distribution of entities in the entire entity vocabulary is predicted using a softmax function based on the second index vector.
5. The method according to claim 1, characterized in that The fusing the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient includes: Calculate the combined probability distribution of each predicted entity of the first probability distribution and the predicted entity of the second probability distribution using cross entropy loss based on a preset weight coefficient; The disease entity with the highest combined probability is used as the prediction result of the future condition of the target patient.
6. The method according to claim 1, characterized in that Before inputting the current condition data into the pre-trained prediction model of the evolution trend of chronic gastritis, the method includes: Obtain the clinical diagnosis and treatment dataset of chronic gastritis within the target time span; Dividing the clinical diagnosis and treatment dataset into multiple time series knowledge graph datasets according to the number of diagnosis times; Construct an initial historical-generation temporal knowledge graph reasoning model that integrates historical interaction mode and generation mode; Based on the multiple time series knowledge graph data sets, the initial history-generated time series knowledge graph reasoning model is trained and tested to obtain a trained target history-generated knowledge graph model, and the trained target history-generated knowledge graph model is used as a prediction model for the evolution trend of chronic gastritis.
7. The method according to claim 5, characterized in that The method further comprises: Based on the predicted result of the future condition of the target patient, the chronic gastritis time series knowledge graph is queried to determine an auxiliary treatment plan for the predicted result of the future condition.
8. A device for predicting the evolution trend of chronic gastritis, characterized in that: include: An acquisition module is used to acquire the current condition data of the target patient for chronic gastritis disease prediction; An input module, used for inputting the current condition data into a pre-trained prediction model of the evolution trend of chronic gastritis, wherein the prediction model of the evolution trend of chronic gastritis includes a historical interaction mode and a generation mode; A prediction module, configured to infer the current condition data through the historical interaction mode to obtain a first probability distribution of a predicted entity in a historical vocabulary of a pre-constructed chronic gastritis time series knowledge graph; A prediction module, used to infer the current condition data by generating a pattern to obtain a second probability distribution of the predicted entity in a set of entities related to the clinical diagnosis and treatment of chronic gastritis; The prediction module is used to fuse the first probability distribution and the second probability distribution to obtain the disease entity with the highest combined probability as the prediction result of the future condition of the target patient.
9. A computer device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a prediction program for the evolution trend of chronic gastritis stored in the memory to implement the prediction method for the evolution trend of chronic gastritis according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method for predicting the evolution trend of chronic gastritis according to any one of claims 1 to 7.
Citation Information
Patent Citations
Pediatric patient electronic health recording system
CN117854665A
Chronic disease prediction method in whole disease course management system based on big data
CN118136206A
Digestive tract health data analysis method and system
CN118522467A
Cited By
Intelligent follow-up method and system for chronic atrophic gastritis based on multi-source electronic medical records
CN119763795A
Model construction method and device, electronic equipment and storage medium
CN121981236A