A disease risk prediction system based on physical examination data with non-equidistant time intervals
By constructing heterogeneous graphs and using graph neural networks to extract features from medical record sequences with non-equidistant time intervals, the problem of difficulty in mining medical record sequence features and entity correlations in physical examination data was solved, enabling accurate prediction of disease risk and drug recommendation.
Patent Information
- Application Number
- CN202310319272.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-03-29
AI Technical Summary
Existing health checkup data prediction systems are unable to effectively mine the characteristics of medical record sequences with non-equidistant time intervals and the correlations between entities, resulting in inaccurate predictions of disease risk.
Graph neural networks are used to extract features from medical record sequences with non-equidistant time intervals. Heterogeneous graphs are constructed to mine the correlations between medical record entities. Heterogeneous graph convolutional networks are used to extract the attribute features and correlations of diseases and drugs. Risk assessment is then performed in conjunction with a disease risk prediction model.
It enables the prediction of potential disease risks from physical examination data at non-equidistant intervals, improving the accuracy and comprehensiveness of disease risk prediction, and recommending corresponding drugs based on the correlation between diseases and drugs.
Smart Images

Figure CN116313144B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology and relates to a disease risk prediction system based on physical examination data with non-equidistant time intervals. Background Technology
[0002] Current health checkup programs often only focus on whether indicators are within a reasonable range, without considering the changing trends of these indicators and the potential disease risks inherent in those trends. Existing patient medical records contain potential disease characteristics. The disease risk of a patient based on their health checkup data can be predicted by calculating the correlation between these potential disease characteristics and the health checkup data. If the disease risk can be known in advance and interventions can be implemented, the disease can be mitigated or even avoided.
[0003] To predict disease risk using physical examination data, it is necessary to learn from existing medical record information. Methods for building predictive models based on electronic medical records can be mainly divided into three categories: (1) methods based on manual internal review, which mainly train the electronic medical records with corpus data and summarize the overall characteristics of entity distribution; (2) methods based on statistical tools, such as system regression and meta-analysis, which mainly analyze whether there are significant differences between indicators and normal values, determine the correlation and strength with the disease, and thus determine whether there is a risk; and (3) methods based on machine learning, which use existing data to train machine learning models to predict disease risk. Compared to the first two methods, machine learning methods can obtain deeper features from medical record data through complex linear mapping. Currently, the most common way to predict disease risk is based on machine learning.
[0004] In electronic medical record databases, medical records exist independently. Existing machine learning methods can only learn the content information of the medical records and cannot extract the correlations between entities (patients, diseases, medications, symptoms) from them. Furthermore, patient medical records can be stored and represented as sequences based on visit times. The medical records themselves and the time intervals between them can be used to measure the progression of a patient's disease. Disease risk can be predicted through disease trend analysis based on medical record sequences and correlations between entities. However, the time intervals between medical records are often unequal, exhibiting suddenness and randomness. Existing machine learning methods struggle to extract features from medical record sequences with unequal time intervals and the correlations between entities. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a disease risk prediction system for physical examination data with non-equidistant time intervals, which extracts features from medical record sequences with non-equidistant time intervals and uses graph neural networks to mine the correlation between medical record entities.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A disease risk prediction system based on physical examination data with non-equidistant time intervals includes a server and a client, wherein the server includes:
[0008] Medical data preprocessing module: used to collect medical data and preprocess it to generate medical record text data;
[0009] Drug efficacy information database: used to store efficacy information for each drug;
[0010] Text feature extraction module: used to extract medical record features from medical record text data and efficacy features of various drugs from the drug efficacy information database;
[0011] Non-equidistant medical record feature sequence construction module: used to construct a medical record feature set for each patient based on patient information and its corresponding historical medical records, and arrange them in chronological order to generate a non-equidistant medical record feature sequence;
[0012] Disease information sequence construction module: This module is used to construct a disease information set for each patient based on the patient information, physical examination indicators, and disease information in the medical record, and arrange them in chronological order to generate a disease information sequence for that patient.
[0013] Physical examination information sequence tag library: used to store physical examination indicator information and disease information in disease information sequences;
[0014] Semantic feature extraction network: used to process non-equal interval medical record feature sequences and extract semantic features;
[0015] Heterogeneous graph construction module: used to construct heterogeneous graphs from patients, drugs, symptoms, and disease relationships in medical text data, where the semantic features of non-equal interval medical record feature sequences are used as attributes of patient nodes, and drug efficacy features are used as attributes of drug nodes.
[0016] Heterogeneous graph convolutional networks: used to extract disease attribute features and the correlation between diseases and drugs, respectively;
[0017] Physical examination indicator database: used to store information on each physical examination indicator and its corresponding patient information;
[0018] Disease risk prediction model: It is used to predict the risk of various diseases based on the sequence of physical examination indicators and the attribute characteristics of diseases, and recommend relevant drugs based on the correlation information between diseases and drugs, and output the results to the client.
[0019] The client is used to input data and instructions to various modules of the server, and to view the predicted disease risk and recommended medications.
[0020] Furthermore, the medical data preprocessing module collects medical data, specifically including: collecting medical data, and using the PDFMiner method to convert PDF format electronic medical records into text data, obtaining medical medical record text data S =
[0021] {s1,...,s i ,...,s n}, where n is the number of medical records, i∈[1,n];
[0022] The medical data preprocessing module preprocesses the medical data, specifically including: using spaces to separate the medical record text s i The system is divided into multiple Chinese character strings. The description of each string is obtained from the character segment at its starting position. Based on the description, strings containing patient, medication, disease, symptom, time, and physical examination indicators are selected. These selected strings are then split according to punctuation marks to obtain the patient, medication, disease, symptom, time, and physical examination indicator information. Finally, based on the string description, the disease-related information in the medical record is stored in a list format, forming the medical record information. Where c is the number of relevant information items. Let v represent the v-th piece of information in the i-th medical record, where v∈[1,c]. Combine the medical record information from n medical records to generate a medical record information set E={e1,...,e i ,...,e n}
[0023] Furthermore, the specific workflows of the text feature extraction module, the non-equidistant medical record feature sequence construction module, the disease information sequence construction module, and the physical examination information sequence label library are as follows:
[0024] Text feature extraction module: This module uses text feature extraction methods to extract features from the efficacy information of each drug in the drug efficacy information database, and synchronizes the extracted features to a unified dimension to obtain the efficacy features of each drug; it also uses text feature extraction methods to extract features from medical record information. i Each piece of information in the record is processed to extract features, which are then synchronized to a unified dimension, stored in a list format, and used to generate the medical record features for that medical record.
[0025] Non-equidistant medical record feature sequence construction module: based on e i The patient's information and historical medical records in the medical record information set E are used to construct the patient's medical record feature set, which is then arranged in chronological order to generate a corresponding non-equal interval medical record feature sequence. The medical record information set E is traversed to obtain the medical record feature sequences of all patients. Assuming there are p patients in E, a medical record feature sequence set X = {X1, ..., X...} is formed. m ,...,X p}, where Xm Let m represent the medical record feature sequence of the m-th patient, where m∈[1,p]. x m,j t m,j Let len represent the medical record characteristics and time information of the j-th medical record of the m-th patient, respectively. m Let j represent the number of medical record features in the medical record feature sequence of the m-th patient, j∈[1,len]. m ]; For X m Segment the data and generate the length (len). m The disease information subsequence, the j-th subsequence is {[x m,1 ,t m,1 ],...,[x m,j ,t m,j ]};
[0026] Disease information sequence construction module: based on e i Based on the patient information, physical examination indicators, and disease information in the medical record set, construct a disease information set for the patient to store the correspondence between physical examination indicators and disease information, and arrange them in chronological order to generate a disease information sequence for the patient; traverse the medical record information set E to generate a set Z = {Z1,...,Z...} containing p patient disease information sequences. m ,...,Z p},in D represents the sequence of disease information in the medical record of the m-th patient. m,j P m,j Let J represent the disease information and physical examination index information of the j-th medical record of the m-th patient, respectively, where j∈[1,len]. m ]; For Z m Segment the data and generate the length (len). m The disease information subsequence of segment j is {[[D m,1 ,P m,1 ],t m,1 ],,...,[[D m,j ,P m,j ],t m,j ]}, extract physical examination indicator information from the disease information subsequence to form the physical examination indicator sequence {[P m,1 ,t m,1 ],,...,[P m,j ,t m,j ]};
[0027] Physical examination information sequence label library: combining the disease information D of the last element in the physical examination indicator sequence and its corresponding disease information subsequence. m,j The system obtains the correspondence between physical examination indicator sequences and disease information, establishes a physical examination information sequence label library, and stores the correspondence between physical examination indicator sequence segments and disease information.
[0028] Furthermore, the semantic feature extraction network consists of a gru-ode module, a relevance calculation module, and an information fusion module;
[0029] The gru-ode module consists of two parts: a gated loop unit and a process fitting unit, used to extract the semantic feature information of each segment of the medical record feature sequence for the m-th patient. Where I m,j Represents the j-th segment of the medical record's characteristic sequence {[x m,1 ,t m,1 ],...,[x m,j ,t m,j The semantic feature information of the medical record feature sequence from segment jd to segment j-1 is {I}. m,j-d ,...,I m,a ,...,I m,j-1} and its corresponding d medical records' medical record characteristics {[x m,j-d ,t m,j-d ],...,[x m,a ,t m,a ],...,[x m,j-1 ,t m,j-1 The data is sequentially input into the gru-ode module. Based on the semantic features of these d segments of medical record features, the predicted information sequence of the semantic features of the j-th segment of medical record features is obtained. in Let a represent the semantic features of the j-th medical record feature sequence predicted from the semantic features of the a-th medical record feature sequence. Semantic features with subscripts less than or equal to 0 are zero vectors, and a∈[jd,j-1].
[0030] The correlation calculation module includes attribute correlation calculation and time correlation calculation. The attribute correlation calculation part uses the sequence similarity calculation method to calculate the correlation between each type of feature among medical record features, stores the feature correlations in list form, and generates the attribute correlation r(x) between medical records. m,a ,x m,j ):
[0031]
[0032] The time correlation calculation section uses a time decay function to fit this changing process and generate the time correlation between medical records. aj :
[0033]
[0034] In the above formula, md is the average time interval, and w is a trainable parameter;
[0035] The information fusion module includes attention coefficient calculation and information fusion, and the specific working steps are as follows:
[0036] The attention coefficient calculation section integrates the temporal and attribute correlations between medical records to generate inter-medical record correlations. Then, it normalizes the correlation between the previous d medical records and the current medical record using a softmax function to obtain the attention coefficient.
[0037] s(x m,a ,x m,j )=r(x m,a ,x m,j )decay aj
[0038]
[0039] Where w a These are trainable parameters used to mitigate the impact of certain highly variable medical records;
[0040] The information fusion component is based on the attention coefficients of adjacent medical records. Selectively predict semantic feature information from the first d medical records Extract information and generate the semantic feature result I of the j-th segment of the medical record feature sequence. m,j :
[0041]
[0042] The repeated attention coefficient calculation and information fusion process yields the semantic feature information of the m-th patient's medical record feature sequence.
[0043] Furthermore, the specific working steps of the gru-ode module are as follows:
[0044] Calculate medical record features x using a gated loop unit. m,a and the semantic features of the input I m,a Fusion information
[0045]
[0046] A process fitting component is used to simulate the changing trends of medical record semantic features between time intervals; the process fitting component includes a residual process and a differential process, the residual process using... To simulate the changing trends of semantic features between adjacent time periods, a differentiation process is used to differentiate the changing trends of semantic features between adjacent time periods, which is then used to simulate the changing trends of semantic features within a time interval. This is combined with the changing trends of semantic features within the time interval and fused information. Obtain the semantic features of the j-th medical record feature sequence predicted from the semantic features of the a-th medical record feature sequence.
[0047]
[0048] t m,a ,t m,j This represents the time attribute corresponding to the a-th and j-th medical records; the process of g() is as follows:
[0049]
[0050]
[0051]
[0052]
[0053] Indicate I m,a The result obtained after subspace decomposition and correction For I m,a The fitted medical record features, with tanh and sigmoid as activation functions, W d W x b d b x These are learnable parameters.
[0054] Furthermore, the specific working steps of the heterogeneous graph construction module and the heterogeneous graph convolutional network are as follows:
[0055] Based on the semantic features of the extracted medical record feature sequences, the correlation between medical records is calculated using sequence similarity calculation methods. Connections between nodes with low correlation are filtered out, and the correlation information is normalized using the softmax function to generate attention coefficients between patient nodes.
[0056] A heterogeneous graph is constructed, and the extracted patients, drugs, symptoms, and diseases are abstracted into nodes. The patient's medical record features are used as the attributes of the patient node, and the drug efficacy features are used as the attributes of the drug node. The attention coefficient between patient nodes is used to fit the edge information between patient nodes. There are edge relationships between patients, symptoms, and diseases in the same medical record, and the edge information value is 1. The inclusion relationship between drug efficacy information and symptoms and diseases in the drug efficacy database is determined. If the drug efficacy information contains symptoms or disease information, there is an edge relationship between the drug and the symptoms or diseases, and the edge information value is 1.
[0057] Two heterogeneous graph convolutional networks are used to extract disease attribute features and the correlation information between diseases and drugs, respectively. Disease attribute features represent physical examination indicators of susceptibility to diseases, and the correlation information between diseases and drugs represents the probability of recommending a certain drug for a certain type of disease. The attribute features of each type of disease are combined to generate a disease attribute feature set. Where 'o' represents the type of disease.
[0058] Furthermore, the specific calculation steps of the disease risk prediction model are as follows:
[0059] The system queries the patient's past physical examination indicators in the physical examination indicator database, generates a non-equal interval sequence of physical examination indicators by sorting them chronologically, and uses a semantic feature extraction network to extract features from the patient's physical examination indicator sequence to obtain the patient's physical examination indicator features Att. pei ;
[0060] The disease risk prediction model comprises o feature blocks, one fully connected layer, and one softmax activation function; each feature block contains two fully connected layers, and each feature block corresponds to one disease; the patient's physical examination index features Att are used to predict the disease risk. pei and disease attribute feature set Att dis The attribute features of each disease are combined and input into the corresponding feature block. The feature block is used to calculate the patient's physical examination index feature Att. pei The similarity features with disease attribute features are then concatenated through a fully connected layer, followed by softmax processing to obtain an o-dimensional vector representing the risk probability P of o diseases. dr ; Filter out diseases with a low probability of infection, and recommend preventive drugs by combining the correlation information between diseases and drugs obtained from heterogeneous graph convolutional networks.
[0061] The beneficial effects of this invention are as follows: This invention can uncover the changing trend information of non-equidistant physical examination indicator sequences, facilitating the discovery of potential disease risks during later prediction. This invention extracts entity information (patient, disease, drug, symptom) from electronic medical records and proposes a feature extraction system based on heterogeneous graphs. Compared with machine learning-based feature extraction methods, the method used in this system can, while mining medical record features, also uncover correlation information between medical records connected by entities, and between diseases and drugs. During model learning, knowledge in medical records can be connected and exchanged through entities, resulting in a more comprehensive outcome.
[0062] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0063] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0064] Figure 1 This is a flowchart of a method for predicting disease risk based on physical examination data with non-equidistant time intervals, as disclosed in an embodiment of this application.
[0065] Figure 2 This is a diagram of the improved ode model for non-equal interval time series according to the present invention;
[0066] Figure 3 This is a model diagram of the disease risk prediction model of the present invention. Detailed Implementation
[0067] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0068] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0069] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0070] This invention provides a disease risk prediction system based on non-equidistant time interval physical examination data, including a server and a client. The server includes the following modules: a medical data preprocessing module for collecting and preprocessing medical data to generate medical record text data; a drug efficacy information database for storing efficacy information for each drug; a text feature extraction module for extracting medical record features from the medical record text data and drug efficacy features from the drug efficacy information database; a non-equidistant time interval medical record feature sequence construction module for constructing a medical record feature set for each patient based on patient information and their corresponding historical medical records, arranging them chronologically to generate a non-equidistant time interval medical record feature sequence; and a disease information sequence construction module for constructing a disease information set for each patient based on patient information, physical examination indicator information, and disease information from the medical record, arranging them chronologically to generate a disease information sequence for that patient. The system comprises the following modules: a disease information sequence library; a physical examination information sequence tag library (used to store physical examination indicator information and disease information in the disease information sequence); a semantic feature extraction network (used to process non-equal interval medical record feature sequences and extract semantic features); a heterogeneous graph construction module (used to construct a heterogeneous graph from the patient, drug, symptom, and disease relationships in the medical text data, where the semantic features of the non-equal interval medical record feature sequences are used as attributes of patient nodes, and drug efficacy features are used as attributes of drug nodes); a heterogeneous graph convolutional network (used to extract the attribute features of diseases and the correlation between diseases and drugs); a physical examination indicator library (used to store each physical examination indicator information and its corresponding patient information); and a disease risk prediction model (used to predict the risk of various diseases based on the physical examination indicator sequence and disease attribute features, and recommend relevant drugs based on the correlation information between diseases and drugs, outputting the results to the client). The client is used to input data and instructions to each module of the server and view the recommended drugs.
[0071] like Figure 1-3 As shown, when the client sends instructions and medical data to the server, the server's modules will perform the following workflow:
[0072] S1: Collect and preprocess medical data to generate medical record text data, and extract patient, drug, symptom, disease, and physical examination indicator information from the medical text data. Establish a drug efficacy information database to store the efficacy information corresponding to each drug.
[0073] S11: Collect medical data and use the PDFMiner method to convert PDF format electronic medical records into text data, obtaining medical record text data S={s1,...,s i ,...,s n}, where n is the number of medical records, and i∈[1,n].
[0074] S12: Process the medical record text data S obtained in S11, using spaces to separate the medical record text s. i The system is divided into multiple Chinese character strings. The description of each string is obtained from the character segment at its starting position. Based on the description, strings containing information about the patient, medication, disease, symptoms, time, and physical examination indicators are selected. These selected strings are then split according to punctuation marks to extract the patient, medication, disease, symptoms, time, and physical examination indicator information. Based on the string description, the disease-related information in the medical record is stored in a list format, forming the medical record information. c is the number of related information items. Let v represent the v-th piece of information in the i-th medical record, where v∈[1,c]. Combine the medical record information from n medical records to generate a medical record information set E={e1,...,e i ,...,e n}
[0075] S13: Establish a drug efficacy information database to store efficacy information for each drug.
[0076] S2: Use text feature extraction methods to extract features from the medical record text data and drug efficacy information in S1, generating medical record features and drug efficacy features. Based on the patient information and corresponding historical medical records, construct a medical record feature set for each patient and arrange them in chronological order. Due to the non-uniform interval of medical record time, generate a corresponding non-uniform interval medical record feature sequence. Based on the patient information, physical examination index information, and disease information in the medical record, construct a disease information set for each patient and arrange them in chronological order to generate a disease information sequence for that patient. Combine the physical examination information and disease information in the disease information sequence to establish a physical examination information sequence label library.
[0077] S21: Use the text feature extraction method word2vec to extract features from the efficacy information in the drug efficacy information database, and use zero padding to unify the extracted features to the same dimension to obtain drug efficacy features.
[0078] S22: Use the text feature extraction method word2vec to analyze medical record information e i Each piece of information in the data is used to extract features, which are then synchronized to a unified dimension. These features are stored in a list format to generate the medical record features for that medical record. According to e i The system uses patient information and their historical medical records in medical record set E to construct a patient's medical record feature set, which is then arranged chronologically to generate a corresponding non-equally spaced medical record feature sequence. The system iterates through medical record set E to obtain the medical record feature sequences for all patients. Assume there are p patients in E, forming a medical record feature sequence set X = {X1, ..., X...} m ,...,X p}, where X m Let m represent the medical record feature sequence of the m-th patient, where m∈[1,p]. x m,j t m,j Let len represent the medical record characteristics and time information of the j-th medical record of the m-th patient, respectively. m Let j represent the number of medical record features in the medical record feature sequence of the m-th patient, j∈[1,len]. m ]. For X m Divide into segments to obtain len m A segment of disease information subsequence. The specific process is as follows: Create an empty list, and add X sequentially. m The elements in the sequence are used to retain the intermediate results, resulting in a subsequence of disease information, where the j-th subsequence is {[x m,1 ,t m,1 ],...,[x m,j ,t m,j ]}.
[0079] S23: According to e i Based on the patient information, physical examination indicators, and disease information in the medical record set E, construct a disease information set for the patient (to store the correspondence between physical examination indicators and disease information), and arrange them in chronological order to generate a disease information sequence for the patient. Iterate through the medical record information set E to generate a set Z = {Z1, ..., Zn} containing p patient disease information sequences. m ,...,Z p},in D represents the sequence of medical record information for the m-th patient. m,j P m,j Let J represent the disease information and physical examination index information of the j-th medical record of the m-th patient, respectively, where j∈[1,len]. m ]. For Z m Segment the data and generate the length (len). m The disease information subsequence of segment j is {[[D m,1 ,Pm,1 ],t m,1 ],,...,[[D m,j ,P m,j ],t m,j ]}, extract physical examination indicator information from the disease information subsequence to form the physical examination indicator sequence {[P m,1 ,t m,1 ],,...,[P m,j ,t m,j ]}. Combining the health checkup indicator sequence and the disease information D of the last element in its corresponding disease information subsequence. m,j This process involves obtaining the correspondence between physical examination indicator sequences and disease information. A physical examination information sequence label library is established to store the correspondence between physical examination indicator sequence segments and disease information.
[0080] S3: Construct a semantic feature extraction network to process the non-equal interval medical record feature sequences of patients and obtain the semantic features of the patient medical record feature sequences.
[0081] S31: Construct a semantic feature extraction network to extract semantic features from non-equally spaced patient medical record sequences. The semantic feature extraction network consists of a gru-ode module, a correlation calculation module, and an information fusion module.
[0082] S311: The gru-ode consists of two parts: a gated loop unit and a process fitting module. Using the gru-ode module, the semantic feature information of each segment of the medical record feature sequence of the m-th patient can be extracted. Where I m,j Represents the j-th segment of the medical record's characteristic sequence {[x m,1 ,t m,1 ],...,[x m,j ,t m,j The semantic feature information of the medical record feature sequence from segment jd to segment j-1. m,j-d ,...,I m,a ,...,I m,j-1} (semantic features with indices less than or equal to 0 are zero vectors) and the corresponding medical record features of d medical records {[x m,j-d ,t m,j-d ],...,[x m,a ,t m,a ],...,[x m,j-1 ,t m,j-1 The sequences d (a∈[jd,j-1]) are sequentially input into the gru-ode module. Based on the semantic features of these d segments of medical record features, a predicted information sequence of semantic features for the j-th segment of medical record features is obtained. in Let a represent the semantic features of the j-th medical record feature sequence predicted from the semantic features of the a-th medical record feature sequence, where a∈[jd,j-1]. The specific steps are as follows:
[0083] S3111: Calculating medical record features x using a gated loop unit m,a and the semantic features of the input I m,a Fusion information
[0084]
[0085] S3112: A process fitting component is used to simulate the changing trends of medical record semantic features between time intervals. The process fitting component includes a residual process and a differential process; the residual process uses... To simulate the changing trends of semantic features between adjacent time periods, a differentiation process is used to differentiate the changing trends of semantic features between adjacent time periods, which is then used to simulate the changing trends of semantic features within a time interval. This is combined with the changing trends of semantic features within the time interval and fused information. The semantic features of the j-th segment of the medical record predicted from the semantic features of the a-th segment of the medical record feature sequence.
[0086]
[0087] t m,a ,t m,j This represents the time attribute corresponding to the a-th and j-th medical records. The process of g() is as follows:
[0088]
[0089]
[0090]
[0091]
[0092] Indicate I m,a The result obtained after subspace decomposition and correction For I m,a The fitted medical record features, with tanh and sigmoid as activation functions, W d W x b d b x These are learnable parameters.
[0093] S312: The correlation calculation module includes two parts: attribute correlation calculation and time correlation calculation.
[0094] S3121: Since there are multiple types of features in medical records, the attribute correlation calculation part uses the sequence similarity calculation method r to calculate the correlation between each type of feature among medical record features. Then, the correlation of each type of feature is merged together through a linear layer to generate the attribute correlation r(x) between medical records. m,a ,x m,j ).
[0095]
[0096] S3122: Due to the characteristics of physical examination medical records, the shorter the time interval between medical records, the more correlated the features of the two records will be; conversely, the greater the time interval, the greater the difference between the features. The time correlation calculation uses a time decay function to fit this change process and generate the time correlation decay between medical records. aj .
[0097]
[0098] In the above formula, md is the average time interval, and w is a trainable parameter.
[0099] S313: The information fusion module mainly includes two parts: attention coefficient calculation and information fusion. The specific steps are as follows:
[0100] S3131: The attention coefficient calculation part integrates the temporal and attribute correlations between medical records to generate the correlation r(x) between medical records. m,a ,x m,j The attention coefficient is obtained by normalizing the correlation between the previous d medical records and the current medical record using the softmax function.
[0101] s(x m,a ,x m,j )=r(x m,a ,x m,j )decay aj
[0102]
[0103] Where w a These are trainable parameters used to mitigate the impact of certain highly variable medical records.
[0104] S3132: The information fusion part is based on the attention coefficient of adjacent medical records. Selectively predict semantic feature information from the first d medical records Extract information and generate the semantic feature result I of the j-th segment of the medical record feature sequence. m,j .
[0105]
[0106] S3132: Repeat the above process to obtain the semantic feature information of the m-th patient's medical record feature sequence.
[0107] S4: Construct a heterogeneous graph from the patient, drug, symptom, and disease relationships in the medical text data. The semantic features of the medical record feature sequence are used as attributes of patient nodes, and the drug efficacy features are used as attributes of drug nodes. Two heterogeneous graph convolutional networks are used to extract the attribute features of diseases and the correlation between diseases and drugs, respectively.
[0108] S41: Based on the semantic features of the medical record feature sequences extracted in S3, the correlation between medical records is calculated using the sequence similarity calculation method r. A threshold of 0.5 is set to filter out connections between nodes with low correlation, and the softmax function is used to normalize the correlation information to generate the attention coefficient between patient nodes.
[0109] S42: Construct a heterogeneous graph, abstracting the patients, drugs, symptoms, and diseases extracted in S12 into nodes. Patient medical record features are used as attributes of patient nodes, and drug efficacy features are used as attributes of drug nodes. Attention coefficients between patient nodes are used to fit the edge information between them. Patients, symptoms, and diseases within the same medical record have an edge relationship with an edge information value of 1. Determine the inclusion relationship between drug efficacy information and symptoms / diseases in the drug efficacy database. If drug efficacy information contains symptom or disease information, then there is an edge relationship between the drug and the symptom or disease, with an edge information value of 1.
[0110] S43: Two heterogeneous graph convolutional networks are used to extract disease attribute features and the correlation information between diseases and drugs, respectively. Disease attribute features represent physical examination indicators of susceptibility to diseases, and the correlation information between diseases and drugs represents the probability of recommending a certain drug for that type of disease. The attribute features of each disease type are combined to generate a disease attribute feature set. Where 'o' represents the type of disease.
[0111] S5: Establish a physical examination indicator database to store information on each indicator and its corresponding patient information. Develop a disease risk prediction model to predict the risk of various diseases based on the patient's physical examination indicator sequence and the disease attribute characteristics extracted in S4. Recommend relevant medications based on the correlation information between diseases and medications obtained in S4.
[0112] S51: Establish a physical examination indicator database to store information on each physical examination indicator and its corresponding patient information.
[0113] S52: Establish a disease risk prediction model to predict the patient's disease risk. The disease risk prediction model includes the following steps:
[0114] S521: Process the physical examination report using the method in S12, obtain patient information and physical examination indicator information, query the patient's past physical examination indicator information in the physical examination indicator database established in S52, generate a non-equal interval physical examination indicator sequence according to time, and use the feature extraction method in S3 to extract features from the patient's physical examination indicator sequence to obtain the patient's physical examination indicator features Att. pei .
[0115] S522: Establish a disease risk prediction model, which consists of o feature blocks (each feature block contains two fully connected layers, and each feature block corresponds to a disease), one fully connected layer, and one softmax activation function. The patient's physical examination index features Att... pei and disease attribute feature set Att dis The attribute features of each disease are combined and input into the corresponding feature block. The feature block is used to calculate the patient's physical examination index feature Att. pei The similarity features with disease attribute features are then concatenated through a fully connected layer, followed by softmax processing to obtain an o-dimensional vector representing the risk probability P of o diseases. dr A threshold of 0.2 is set to filter out diseases with a low probability of infection. Based on the correlation information between diseases and drugs obtained from S43, preventive drugs are recommended and sent to the client.
[0116] S523: Training the Disease Risk Prediction Model: The feature sequences from the feature sequence information set containing p patients obtained in S22 are sequentially extracted using the feature extraction method in S3. A heterogeneous graph network is constructed, and it is used to extract disease attribute features and the correlation information between diseases and drugs. The physical examination information sequences from the physical examination information sequence label library are fed into the feature extraction method in S3 for feature extraction. The obtained physical examination index features and disease attribute features are then input into the disease risk prediction model for prediction. The difference between the prediction results and the disease information in the physical examination information sequence label library is calculated using cross-entropy loss, where the model learning rate is set to 0.005, and the optimization strategy is SGD (stochastic gradient descent).
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A disease risk prediction system based on physical examination data with non-equidistant time intervals, characterized in that: Includes a server and a client, wherein the server includes: Medical data preprocessing module: This module collects and preprocesses medical data to generate medical record text data. Specifically, the medical data preprocessing module collects medical data and uses the PDFMiner method to convert PDF format electronic medical records into text data, thus obtaining the medical record text data. n is the number of medical records, i∈[1,n]; The medical data preprocessing module preprocesses the medical data, specifically including: using spaces to separate the medical record text. The system is divided into multiple Chinese character strings. The description of each string is obtained from the character segment at its starting position. Based on the description, strings containing patient, medication, disease, symptom, time, and physical examination indicators are selected. These selected strings are then split according to punctuation marks to obtain the patient, medication, disease, symptom, time, and physical examination indicator information. Finally, based on the string description, the disease-related information in the medical record is stored in a list format, forming the medical record information. ,in The number of related information items. This represents the v-th piece of information in the i-th medical record. Combine the medical record information of n medical records to generate a medical record information set. ; Drug efficacy information database: used to store efficacy information for each drug; Text feature extraction module: used to extract medical record features from medical record text data and efficacy features of various drugs from the drug efficacy information database; Non-equidistant medical record feature sequence construction module: used to construct a medical record feature set for each patient based on patient information and its corresponding historical medical records, and arrange them in chronological order to generate a non-equidistant medical record feature sequence; Disease information sequence construction module: This module is used to construct a disease information set for each patient based on the patient information, physical examination indicators, and disease information in the medical record, and arrange them in chronological order to generate a disease information sequence for that patient. Physical examination information sequence tag library: used to store physical examination indicator information and disease information in disease information sequences; Semantic feature extraction network: used to process non-equal interval medical record feature sequences and extract semantic features; Heterogeneous graph construction module: used to construct heterogeneous graphs from patients, drugs, symptoms, and disease relationships in medical text data, where the semantic features of non-equal interval medical record feature sequences are used as attributes of patient nodes, and drug efficacy features are used as attributes of drug nodes. Heterogeneous graph convolutional networks: used to extract disease attribute features and the correlation between diseases and drugs, respectively; Physical examination indicator database: used to store information on each physical examination indicator and its corresponding patient information; Disease risk prediction model: It is used to predict the risk of contracting various diseases based on the sequence of physical examination indicators and the attribute characteristics of diseases; and recommend relevant drugs based on the correlation information between diseases and drugs, and output the results to the client. The client is used to input data and instructions to various modules of the server, and to view the predicted disease risk and recommended medications.
2. The disease risk prediction system based on non-equidistant time interval physical examination data according to claim 1, characterized in that: The specific workflows of the text feature extraction module, the non-equidistant medical record feature sequence construction module, the disease information sequence construction module, and the physical examination information sequence label library are as follows: Text feature extraction module: This module uses text feature extraction methods to extract features from the efficacy information of each drug in the drug efficacy information database, and synchronizes the extracted features to a unified dimension to obtain the efficacy features of each drug; it also uses text feature extraction methods to extract features from medical record information. Each piece of information in the record is processed to extract features, which are then synchronized to a unified dimension, stored in a list format, and used to generate the medical record features for that medical record. Non-equidistant medical record feature sequence construction module: based on The patient's information and historical medical records in the medical record information set E are used to construct the patient's medical record feature set, which is then arranged in chronological order to generate a corresponding non-equally spaced medical record feature sequence; the medical record information set is then traversed. Obtain the medical record feature sequences of all patients; assuming there are p patients in E, form a medical record feature sequence set. ,in Let m represent the medical record feature sequence of the m-th patient, where m∈[1,p]. , Let represent the medical record characteristics and time information of the j-th medical record of the m-th patient, respectively. Let j represent the number of medical record features in the medical record feature sequence of the m-th patient, j∈[1, 1, 2, 3]. ];right Segmentation and generation The disease information subsequence, the j-th subsequence is ; Disease information sequence construction module: based on Based on the patient information, physical examination indicators, and disease information in the medical records, a disease information set for the patient is constructed to store the correspondence between physical examination indicators and disease information, and arranged in chronological order to generate a disease information sequence for the patient; the medical record information set is then traversed. Generate a set containing sequences of disease information for p patients. ,in This represents the sequence of disease information from the medical record of the m-th patient. Let J represent the disease information and physical examination index information of the j-th medical record of the m-th patient, respectively, where j∈[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 19 ... ;right Segmentation and generation The disease information subsequence of segment j, the disease information subsequence of segment j is Physical examination indicator information is extracted from the disease information subsequence to form a physical examination indicator sequence. ; Physical examination information sequence tag library: combining the disease information of the last element in the physical examination indicator sequence and its corresponding disease information subsequence. The system obtains the correspondence between physical examination indicator sequences and disease information, establishes a physical examination information sequence label library, and stores the correspondence between physical examination indicator sequence segments and disease information.
3. The disease risk prediction system based on non-equidistant time interval physical examination data according to claim 1, characterized in that: The semantic feature extraction network consists of a gru-ode module, a correlation calculation module, and an information fusion module. The gru-ode module consists of two parts: a gated loop unit and a process fitting unit, used to extract the semantic feature information of each segment of the medical record feature sequence for the m-th patient. ,in This represents the characteristic sequence segment of the j-th medical record. The semantic feature information, which is the semantic feature information of the medical record feature sequence from segment jd to segment j-1. The characteristics of the corresponding d medical records The data are sequentially input into the gru-ode module. Based on the semantic features of these d segments of medical record features, the predicted information sequence of the semantic features of the j-th segment of medical record features is obtained. ,in Let a represent the semantic features of the j-th medical record feature sequence predicted by the semantic features of the a-th medical record feature sequence. Semantic features with subscripts less than or equal to 0 are zero vectors, and a∈[jd,j-1]. The correlation calculation module includes attribute correlation calculation and time correlation calculation. The attribute correlation calculation part uses the sequence similarity calculation method to calculate the correlation between each type of feature among the medical record features, and stores the feature correlations in list form to generate the attribute correlation between medical records. : The time correlation calculation section uses a time decay function to fit this change process and generate the time correlation between medical records. : In the above formula, md is the average time interval, and w is a trainable parameter; The information fusion module includes attention coefficient calculation and information fusion, and the specific working steps are as follows: The attention coefficient calculation section integrates the temporal and attribute correlations between medical records to generate inter-medical record correlations. Then, it normalizes the correlation between the previous d medical records and the current medical record using a softmax function to obtain the attention coefficient. : in These are trainable parameters used to mitigate the impact of certain highly variable medical records; The information fusion component is based on the attention coefficients of adjacent medical records. Selectively predict semantic feature information from the first d medical records Extract information and generate semantic feature results for the j-th segment of the medical record feature sequence. : The repeated attention coefficient calculation and information fusion process yields the semantic feature information of the m-th patient's medical record feature sequence. .
4. The disease risk prediction system based on non-equidistant time interval physical examination data according to claim 3, characterized in that: The specific working steps of the gru-ode module are as follows: Calculate medical record features using a gated loop unit. and semantic features of the input Fusion information : A process fitting component is used to simulate the changing trends of medical record semantic features between time intervals; the process fitting component includes a residual process and a differential process, the residual process using... To simulate the changing trends of semantic features between adjacent time periods, a differentiation process is used to differentiate the changing trends of semantic features between adjacent time periods, which is then used to simulate the changing trends of semantic features within a time interval. This is combined with the changing trends of semantic features within the time interval and fused information. The semantic features of the j-th medical record feature sequence predicted from the semantic features of the a-th medical record feature sequence are obtained. : This represents the time attribute corresponding to the a-th and j-th medical records; the process of g() is as follows: express The result obtained after subspace decomposition and correction for The fitted medical record features use tanh and sigmoid as activation functions. These are learnable parameters.
5. The disease risk prediction system based on non-equidistant time interval physical examination data according to claim 1, characterized in that: The specific working steps of the heterogeneous graph construction module and the heterogeneous graph convolutional network are as follows: Based on the semantic features of the extracted medical record feature sequences, the correlation between medical records is calculated using sequence similarity calculation methods; the connections between nodes with low correlation are filtered out, and the correlation information is normalized using the softmax function to generate the attention coefficient between patient nodes. A heterogeneous graph is constructed, and the extracted patients, drugs, symptoms, and diseases are abstracted into nodes. The patient's medical record features are used as the attributes of the patient node, and the drug efficacy features are used as the attributes of the drug node. The attention coefficient between patient nodes is used to fit the edge information between patient nodes. There are edge relationships between patients, symptoms, and diseases in the same medical record, and the edge information value is 1. The inclusion relationship between drug efficacy information and symptoms / diseases in the drug efficacy database is determined. If the drug efficacy information contains symptom or disease information, there is an edge relationship between the drug and the symptom or disease, and the edge information value is 1. Two heterogeneous graph convolutional networks are used to extract disease attribute features and the correlation information between diseases and drugs, respectively. Disease attribute features represent physical examination indicators of susceptibility to diseases, and the correlation information between diseases and drugs represents the probability of recommending a certain drug for a certain type of disease. The attribute features of each type of disease are combined to generate a disease attribute feature set. , where o represents the type of disease.
6. The disease risk prediction system based on non-equidistant time interval physical examination data according to claim 1, characterized in that: The specific calculation steps of the disease risk prediction model are as follows: The system queries the patient's past physical examination indicators in the physical examination indicator database, generates a non-uniformly spaced sequence of physical examination indicators according to time, and uses a semantic feature extraction network to extract features from the patient's physical examination indicator sequence to obtain the patient's physical examination indicator features. ; The disease risk prediction model comprises o feature blocks, one fully connected layer, and one softmax activation function; each feature block contains two fully connected layers, and each feature block corresponds to one disease; the model incorporates the patient's physical examination indicators. Disease attribute feature set The attributes and features of each disease category are combined and input into the corresponding feature blocks, which are used to calculate the patient's physical examination index features. The similarity features with disease attribute features are then concatenated through a fully connected layer, followed by softmax processing to obtain an o-dimensional vector representing the probability of having o diseases. ; Filter out diseases with a low probability of infection, and recommend preventive drugs by combining the correlation information between diseases and drugs obtained from heterogeneous graph convolutional networks.