Multi-disease fusion prediction method and system
Through the multi-disease fusion prediction method, combined with the LSTM algorithm and self-attention mechanism, the patient information and demographic characteristics are integrated, and the problem of difficulty in predicting multiple diseases at the same time in the existing technology is solved, achieving efficient and accurate multi-disease prediction.
Patent Information
- Application Number
- CN202510098470.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to return the prediction results for multiple diseases at the same time with the same input parameters through a single model, and it is necessary to distinguish and input different disease prediction models separately.
The multi-disease fusion prediction method is adopted to obtain medical sequence encoding and output disease vectors, combine LSTM algorithm and self-attention mechanism, configure time gates and attention pooling layers, integrate basic patient information and demographic characteristics, and map to disease risk probability distribution using a full connection layer.
It is realized that multiple diseases are predicted under the same input parameters through a single model, which improves prediction efficiency and accuracy, and can predict the probability of multiple diseases based on general medical records.
Smart Images

Figure CN120015291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical systems, and in particular to a multi-disease fusion prediction method and system. Background Art
[0002] With the development of big data, the prediction algorithms for diseases have also been greatly improved. Currently, the prediction of diseases generally uses multivariate linear regression decision tree models or deep spatiotemporal networks, etc., to analyze and predict the patient's condition through meteorological data or use relevant disease data and a variety of external data to train the model.
[0003] However, in the current related technologies, a single model can only return the prediction results of one disease at a time after obtaining the corresponding input information from the user. When facing different diseases, it is necessary to distinguish different disease prediction models respectively and input different input indicators to obtain the prediction results of multiple diseases respectively. It is impossible for a single model to return the prediction results of multiple diseases at the same time under the same input parameters. Summary of the invention
[0004] In order to predict multiple diseases through common data, the present application provides a multi-disease fusion prediction method and system.
[0005] In the first aspect, the present application provides a multi-disease fusion prediction method, which adopts the following technical solution: A multi-disease fusion prediction method comprises the following steps: Obtaining a medical sequence code and outputting a disease vector based on the medical sequence code, wherein the medical sequence code includes one or more disease categories and basic patient information; The disease vector is used as input and modeled in combination with the LSTM algorithm to obtain a gated memory model, obtain the visit time intervals corresponding to the adjacent medical sequence codes, and configure additional time gates based on the visit time intervals and the disease vector; updating the gated memory model based on the time gate to obtain a healthy memory state at time t in the gated memory model, and obtaining a contextual disease hidden state at time t based on the healthy memory state; Aggregating the context disease hidden state based on a preset self-attention mechanism to obtain an aggregate state, learning the dependencies between the medical records through a preset health archive library and calculating the attention score corresponding to each aggregate state, and outputting the patient's disease state at time t based on the attention score and the aggregate state; Acquire demographic features associated with the patient's basic information, and integrate the demographic features with the patient's disease status to obtain a combined vector; The combined vector is mapped to the disease risk probability distribution through an activation function using a fully connected layer to obtain a prediction result, wherein the prediction result is characterized by the probability that the patient suffers from each disease in a preset disease collection.
[0006] In some embodiments, obtaining a medical sequence code and outputting a disease vector based on the medical sequence code includes the following steps: Identify each of the disease categories as a disease vector of a fixed size through word embedding and output it; If there are multiple disease categories at the same time t in the medical sequence code, the corresponding multiple disease vectors are average pooled to obtain a disease group.
[0007] In some embodiments, the disease vector is used as input and modeled in combination with the LSTM algorithm to obtain a gated memory model, including the following steps: Based on the LSTM algorithm, the input gate, forget gate, and output gate are set. The formula is as follows: ; ; ; ; ; in, , , They are represented as the input gate, forget gate and output gate at time t respectively. Represented as the unit state of the object at time t, Characterized as the disease vector as input, It is represented as the hidden state corresponding to the previous time t-1. It is represented by the sigmoid activation function, W is represented by the weights of different gates, and b is represented by the bias parameters of different gates; The forget gate is paired with the input gate to eliminate the calculation process of the forget gate, so that The calculation formula is simplified to: .
[0008] In some embodiments, obtaining the visit time intervals corresponding to the adjacent medical sequence codes and configuring an additional time gate based on the visit time intervals and the disease vector includes the following steps: Get the current disease vector representing the short-term health status and cell status that characterizes early diagnostic information And calculate the weight vector between
[0009] The time gate is generated by the following formula: ; in, It is represented as the time gate corresponding to time t, Characterized as the weight parameter corresponding to the time gate, is the weight vector, Characterized by the deviation parameter corresponding to the time gate.
[0010] In some embodiments, updating the gated memory model based on the time gate to obtain a healthy memory state at time t in the gated memory model, and obtaining a contextual disease hidden state at time t based on the healthy memory state, comprises the following steps: The cell state is adjusted by the time gate And the output gate, specifically: ; ; in, Characterized as a cell state Update state based on weight parameters; The input disease vector is filtered through the input gate and the time gate respectively to filter the unit state at each time t Determine the health memory state at time t, and obtain the context disease hidden state based on each health memory state. Specifically, .
[0011] In some embodiments, obtaining the context disease hidden state at time t based on the health memory state further includes the following steps: Obtaining the time direction of the medical sequence code and defining it as a forward direction, and reversing the time direction to obtain a backward direction; The forward pointing and backward pointing medical sequence encodings are respectively used as input to obtain the forward hidden state and the backward hidden state ; The forward hidden state and the backward hidden state are coupled, and the concatenated output result is used as the final context disease hidden state.
[0012] In some embodiments, the context disease hidden state is aggregated based on a preset self-attention mechanism to obtain an aggregate state, the dependencies between the medical records are learned through a preset health archive library and the attention score corresponding to each aggregate state is calculated, and the patient disease state at time t is output based on the attention score and the aggregate state, including the following steps: Get the aggregated state after aggregating the context disease hidden state And the attention scores corresponding to different states after learning ; The patient's disease status is calculated based on the following formula: , in, Characterize each of the aggregation states The corresponding attention score, Characterizes the patient's disease state.
[0013] In some embodiments, obtaining demographic features associated with the patient's basic information, and integrating the demographic features with the patient's disease status to obtain a combined vector comprises the following steps: The patient's basic information is transformed by One-hot encoding to obtain the demographic characteristics , the demographic characteristics and the patient's disease status Combine to get the combined vector .
[0014] In some embodiments, a fully connected layer is used to map the combined vector to a disease risk probability distribution through an activation function to obtain a prediction result, comprising the following steps: Configure the training parameters of the two fully connected layers and , input the patient information and the target disease collection and obtain the prediction result through the following formula: , in, Characterizing patients as predicted The probability of having a disease in the disease set D, and They are represented as the bias parameters in the two fully connected layers respectively.
[0015] In the second aspect, the present application provides a multi-disease fusion prediction system, which adopts the following technical solutions: A multi-disease fusion prediction system, comprising: An embedding layer, used to obtain a medical sequence code and output a disease vector based on the medical sequence code, wherein the medical sequence code includes one or more disease categories and basic patient information; A context encoding layer, used to take the disease vector as input and perform modeling in combination with the LSTM algorithm to obtain a gated memory model, obtain the visit time interval corresponding to the adjacent medical sequence codes, and configure an additional time gate based on the visit time interval and the disease vector; updating the gated memory model based on the time gate to obtain a healthy memory state at time t in the gated memory model, and obtaining a contextual disease hidden state at time t based on the healthy memory state; An attention pooling layer, which aggregates the context disease hidden state based on a preset self-attention mechanism to obtain an aggregate state, learns the dependencies between the medical records through a preset health archive library and calculates the attention score corresponding to each aggregate state, and outputs the patient's disease state at time t based on the attention score and the aggregate state; An output layer, used for obtaining demographic characteristics associated with the basic information of the patient, and integrating the demographic characteristics with the disease status of the patient to obtain a combined vector; The combined vector is mapped to the disease risk probability distribution through an activation function using a fully connected layer to obtain a prediction result, wherein the prediction result is characterized by the probability that the patient suffers from each disease in a preset disease collection.
[0016] The technical solution provided by the embodiments of the present application has the following technical features: The patient's medical treatment information is integrated, and one or more known disease data of the patient are used as input to obtain the correlation between each different disease and the degree of influence of different treatment times on different diseases. The patient's recent patient status at different treatment times and the hidden disease status based on context analysis are obtained by matching the correlation and time impact to comprehensively obtain the patient's medical status. Finally, the patient's medical status and the demographic characteristics associated with its basic information are comprehensively input for prediction to obtain the distribution of disease risk probabilities corresponding to different diseases, and the prediction results are obtained based on the distribution results. In this way, the probability of suffering from multiple diseases can be predicted by only uploading the patient's common medical records. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the steps of the multi-disease fusion prediction method provided in the embodiment of the present application.
[0018] Figure 2 It is a schematic diagram of the architecture of the multi-disease fusion prediction system provided in the embodiment of the present application. DETAILED DESCRIPTION
[0019] To more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. However, it should be understood by those of ordinary skill in the art that the present application can be implemented without these details. In some cases, in order to avoid unnecessary descriptions that make various aspects of the present application obscure, well-known methods, processes, systems, components and / or circuits that have been described at a higher level will not be described in detail. For those of ordinary skill in the art, it is obvious that various changes can be made to the embodiments disclosed in the present application, and without departing from the principles and scope of the present application, the general principles defined in the present application can be applied to other embodiments and application scenarios. Therefore, the present application is not limited to the embodiments shown, but conforms to the broadest scope consistent with the scope claimed for protection of the present application.
[0020] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as there is no conflict between them.
[0021] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used to distinguish the technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0022] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples.
[0023] like Figure 1 As shown, the embodiment of the present application discloses a multi-disease fusion prediction method, which specifically includes the following steps: S100, obtaining a medical sequence code and outputting a disease vector based on the medical sequence code.
[0024] Medical sequence codes are ICD codes converted from medical records that record patients' periodic diseases and medical records. They include one or more disease categories, which correspond to the patient's known diseases and disease-related health data, as well as the patient's basic information, such as height, weight, age, gender, etc.
[0025] Each medical sequence is encoded to generate a vector corresponding to different diseases, and the vector is used as the state input for subsequent disease prediction.
[0026] S200, taking the disease vector as input and combining it with the LSTM algorithm for modeling to obtain a gated memory model, obtains the visit time intervals corresponding to adjacent medical sequence codes, and configures additional time gates based on the visit time intervals and the disease vector.
[0027] Because the patient's medical history is a related continuous time series, the disease vector is used as an input item based on the LSTM algorithm to build a model to obtain a gated memory model including an input gate, a forget gate, and an output gate.
[0028] The time intervals between adjacent visits in the medical records are obtained, and a time gate is additionally built based on the time parameter. The main problem solved by building a time gate is that the patient's health status will change differently with the length of the visit interval. The contributions of visit records before different times to the patient's current health status may be different. Therefore, a time gate is needed to quantify the impact of different visit intervals on the patient's health.
[0029] S300, updating the gated memory model based on the time gate to obtain the healthy memory state at time t in the gated memory model, and obtaining the contextual disease hidden state at time t based on the healthy memory state.
[0030] The gated memory model is updated through the time gate, so that the input information can be filtered through the input gate and the time gate, which is beneficial to the simulation effect of different time interval information on the patient's long-term medical status.
[0031] Each time, contextual disease information is obtained from the health memory status of the patient at different visit nodes. As the hidden state of the contextual disease, it enables the system to understand the correlation between different diseases in the entire medical record, and to form associations between different symptoms and signs in different diseases through the hidden state of the contextual disease.
[0032] S400, based on the preset self-attention mechanism, aggregates the context disease hidden state to obtain the aggregate state, learns the dependencies between the medical records through the preset health archive library and calculates the attention score corresponding to each aggregate state, and outputs the patient's disease state at time t based on the attention score and the aggregate state.
[0033] Different medical visits have different impacts on the patient's health status, such as emergency, hospitalization, follow-up, etc., so it is necessary to use the attention pooling step to score the attention for each disease state. The system analyzes the interdependence between different medical records through existing cases in the preset health archive library, and calculates the attention scores corresponding to different medical behaviors based on the size of the dependency. The larger the attention score, the greater the contribution of the corresponding medical record to the final disease risk prediction.
[0034] Therefore, the calculated attention score and the state corresponding to the context disease can be used to output the disease state corresponding to the patient at different times t, and the patient's disease state is used to subsequently predict the probability of each category of disease.
[0035] S500, obtaining demographic features associated with basic information of the patient, and integrating the demographic features with the disease status of the patient to obtain a combined vector.
[0036] The basic information of patients, such as gender and age, is converted into statistical information of the diseased population to obtain demographic characteristics, which can characterize, for example, the relationship characteristics between the number of 40-year-old women suffering from a certain disease and the total number of people suffering from the disease.
[0037] The demographic characteristics and the patient's disease status are combined to obtain a combined vector, which is then used to predict the probability of disease.
[0038] S600, using a fully connected layer to map the combined vector to the disease risk probability distribution through an activation function to obtain a prediction result, where the prediction result is characterized by the probability that the patient suffers from each disease in the preset disease collection.
[0039] The combination vector is mapped to the dimension of disease prediction through two fully connected layers combined with an activation function to determine the distribution of the results output by the combination vector in the disease risk probability, where each disease corresponds to an independent probability distribution. There are n types of diseases in the disease collection, and there are n output neurons in the fully connected layer. The probability distribution of the results on different diseases can be used to predict the probability of a patient suffering from each different disease in a disease collection.
[0040] Through the above steps, the patient's medical treatment information is integrated, and one or more known disease data of the patient are used as input to obtain the correlation between each different disease and the degree of influence of different treatment times on different diseases. The patient's recent patient status at different treatment times and the hidden disease status based on context analysis are obtained by matching the correlation and time influence to comprehensively obtain the patient's medical status. Finally, the patient's medical status and the demographic characteristics associated with its basic information are comprehensively input for prediction to obtain the distribution of disease risk probabilities corresponding to different diseases, and the prediction results are obtained based on the distribution results. In this way, the probability of suffering from multiple diseases can be predicted by only uploading the patient's common medical records.
[0041] In some other embodiments, obtaining a medical sequence code and outputting a disease vector based on the medical sequence code includes the following steps: S110, each disease category is identified as a disease vector of a fixed size through word embedding and output.
[0042] S120, if there are multiple disease categories at the same time t in the medical sequence code, the corresponding multiple disease vectors are average pooled to obtain a disease group.
[0043] This step is implemented in the embedding layer, and its purpose is to represent multiple medical records in a continuous space, so that the correlation between different diseases can be directly modeled.
[0044] Different disease categories in each medical record of the rescue All are represented as a fixed-size disease vector through word embedding , disease vector It will serve as the input of the subsequent gated memory model.
[0045] When multiple diseases are diagnosed at the same time in the medical sequence code, the disease vectors corresponding to the multiple diseases are Average pooling was performed to obtain disease groups.
[0046] Specifically, multiple disease vectors are arranged into a matrix of the form N*D, where N is the number of disease vectors and D is the number of features of each disease vector. The pooling function averages each column of the matrix and combines them into a new feature vector to obtain a disease group.
[0047] In some other embodiments, the disease vector is used as input and modeled in combination with the LSTM algorithm to obtain a gated memory model, including the following steps: S210, based on the LSTM algorithm, sets the input gate, forget gate, and output gate. The formula is as follows: ; ; ; ; .
[0048] in, , , They are represented as the input gate, forget gate and output gate at time t respectively. Represented as the unit state of the object at time t, Represented as the disease vector as input, It is represented as the hidden state corresponding to the previous time t-1. It is represented by the sigmoid activation function, W is represented by the weights of different gates, and b is represented by the bias parameters of different gates.
[0049] Disease vector carrying the tth input Short-term information, Then keep the t-th input disease vector long-term information. The state update mainly consists of two parts, one of which is the forget gate The previous unit state of the control The other part is the result of the tth input gate. The nonlinear transformation of can make the state at the current time t always consist of long-term information and short-term information.
[0050] S220, pairing the forget gate with the input gate equivalently to eliminate the calculation process of the forget gate, so that The calculation formula is simplified to: .
[0051] Generally speaking, the input gate and forget gate need to decide what new information to add to the cell state and what information to forget from the cell state, respectively.
[0052] In the embodiment of the present application, by pairing the forget gate and the input gate so that the system decides what new information to add while also deciding the corresponding information to forget, this method may make the model more efficient in the learning process because it explicitly balances the decision to retain and add information at each step. It only needs to make the input gate and the forget gate share the same input content, but the two have different weights and biases, so that the association formula of the forget gate to the current unit state can be simplified, and the current unit state can be updated directly according to the output information of the input gate and the next input disease vector obtained.
[0053] In some other embodiments, obtaining the consultation time intervals corresponding to adjacent medical sequence codes and configuring an additional time gate based on the consultation time intervals and the disease vector includes the following steps: S230, obtaining a current disease vector representing a short-term health status and cell status that characterizes early diagnostic information And calculate the weight vector between .
[0054] S240, generate the time gate using the following formula: ; in, It is represented as the time gate corresponding to time t, Characterized as the weight parameter corresponding to the time gate, is the weight vector, Characterized as the deviation parameter corresponding to the time gate.
[0055] First, determine the current disease vector that reflects the patient's short-term health status and unit status, which contains information about the patient's early diagnosis and is used to reflect the patient's long-term health status The relationship between them, the time gate is used to control the influence of the two, so the weight vector between the two is calculated , the weight vector It is used to indicate the influence of the time interval between t-1 and t on the current health state and the earlier health state.
[0056] By obtaining the visit interval time between t-1 and t in the unit state The model is built during the updating process of the patient's visit. The interval between two visits can range from days to years. In this way, the calculated time gate can enable the system to learn the impact of different visit time intervals on the changes in the patient's health status, so as to better simulate irregular visit time intervals.
[0057] In some other embodiments, updating the gated memory model based on the time gate to obtain the healthy memory state at time t in the gated memory model, and obtaining the contextual disease hidden state at time t based on the healthy memory state, includes the following steps: S310, adjusting the unit state through the time gate And the output gate, specifically: ; ; in, Characterized as a cell state Update state based on weight parameters.
[0058] Modify the cell state of memory updates through time gates and output gate The update method couples the input gate and the forget gate so that the input information is simultaneously input to the gate and time gate Filtering, hence time gate Can control the input disease vector impact on current forecasts. By reflecting the patient's long-term health status Will continue to affect future memory states, and time gates can help simulate patients' long-term medical conditions.
[0059] S320, filter the input disease vector through the input gate and the time gate to filter the unit state at each time t Determine the health memory state at time t, and obtain the context disease hidden state based on each health memory state. Specifically, .
[0060] In this process, the patient's current status is memorized from each visit to the clinic. A contextual disease state is obtained, which is used to generate a disease prediction result.
[0061] In some other embodiments, obtaining the contextual disease hidden state at time t based on the health memory state further includes the following steps: S321, obtaining the time direction of the medical sequence code and defining it as a forward direction, and reversing the time direction to obtain a backward direction.
[0062] S322, respectively taking the forward pointing and backward pointing medical sequence encoding as input to obtain the forward hidden state and the backward hidden state .
[0063] S323, by coupling the forward hidden state and the backward hidden state, and taking the concatenated output result as the final contextual disease hidden state.
[0064] At the same time, in order to better utilize the contextual disease information of each patient and reduce potential information loss, another LSTM network needs to be built.
[0065] In the above scheme, the processing is performed based on the forward-pointing medical sequence coding, which is characterized by the fact that each visit information in the patient's medical record is arranged and input in chronological order, that is, from the earliest visit time to the latest visit time.
[0066] In addition, the constructed LSTM network uses backward-pointing data as input. The backward-pointing representation is that all the medical records' visit information is input in reverse order according to the time dimension, that is, from the latest visit time to the earliest visit time.
[0067] Finally, the hidden states output in the forward and backward LSTM networks are concatenated, and the concatenated result is used as the hidden state of the final output, that is, .
[0068] Through the bidirectional time-aware LSTM network, not only the impact of different visit intervals on the patient's medical status is obtained, but also the bidirectional sequence information is used to enhance the understanding of the patient's entire visit process, taking into account the temporal irregularity in the patient's medical records and improving the accuracy of disease prediction.
[0069] In some other embodiments, context disease hidden states are aggregated based on a preset self-attention mechanism to obtain an aggregate state, dependencies between medical records are learned through a preset health archive library and attention scores corresponding to each aggregate state are calculated, and the patient disease state at time t is output based on the attention score and the aggregate state, including the following steps: S410, obtaining an aggregated state after aggregating the context disease hidden state And the attention scores corresponding to different states after learning .
[0070] By capturing the interdependencies between disease diagnoses to help assign weights to previous medical records, a two-stage linear self-attention mechanism is used to aggregate all contextual disease hidden states to obtain an aggregated state .
[0071] The model learns the dependencies between various types of medical data through historical health records and calculates a quantitative attention score to more accurately predict future medical risks. The specific calculation method is as follows: .
[0072] b is represented as the attention score, It is represented as the linear weight parameter that needs to be learned, H is a matrix containing the hidden states of all historical visits or diseases in the health records, each row corresponds to a hidden state of a visit record or disease, and finally the product is converted into a probability distribution form through the softmax function to determine how much attention score should be given to each element at the current output.
[0073] S420, calculating the patient's disease status based on the following formula: , in, Characterized by each aggregation state The corresponding attention score, Characterized as the patient's disease status, it can represent the predicted probability of future risk changes for each disease generated by combining the contribution of different medical records to the patient's future disease status changes and the patient's contextual disease.
[0074] All contextual diseases in the patient's medical sequence encoding are aggregated through the above formula to output the patient's disease status.
[0075] In some other embodiments, obtaining demographic features associated with basic patient information and integrating the demographic features with the patient's disease status to obtain a combined vector includes the following steps: S510, transform the basic information of patients through one-hot encoding to obtain demographic characteristics , the demographic characteristics and disease states Combine to get the combined vector .
[0076] The patient's medical status and demographic information, such as gender and age, are combined to make the final prediction. First, use One-hot encoding To represent the basic demographic characteristics of the patient, this vector and medical status Combine to get the combined vector In this way, the prediction conditions based on the patient's own inherent disease parameters can be supplemented with the prediction conditions of the statistical results of the same population with the same basic conditions as the patient, so that the patient's own specific prediction can be combined with the disease distribution of a large sample.
[0077] In some other embodiments, a fully connected layer is used to map the combined vector to a disease risk probability distribution through an activation function to obtain a prediction result, including the following steps: S610, configure the training parameters of the two fully connected layers and , input the patient information and the target disease collection and obtain the prediction result through the following formula: , in, Characterizing patients as predicted The probability of having a disease in the disease set D, and They are represented as the bias parameters in the two fully connected layers respectively.
[0078] First, the patient's information is input into the prediction model, and then the disease set consisting of multiple diseases that the patient wants to predict is input together. First, the primary feature representation is performed through the first fully connected layer, and the bias parameter is added. , and then the output of the first fully connected layer is passed through the Relu activation function, where the Relu activation function is defined as .
[0079] The output of the first fully connected layer is then linearly transformed again through the second fully connected layer to generate high-level features, and the bias parameter is added The sigmoid activation function is applied to map the output of the second fully connected layer to the probability range (0, 1), and finally the probability distribution corresponding to different types of diseases in the disease collection is output.
[0080] The disease collection D may include disease types and their complications in the medical sequence codes, and may also include other disease types that the user wants to predict.
[0081] like Figure 2 As shown, the present application also discloses a multi-disease fusion prediction system, including: The embedding layer is used to obtain the medical sequence code and output the disease vector based on the medical sequence code. The medical sequence code includes one or more disease categories and basic patient information; The context encoding layer is used to take the disease vector as input and combine it with the LSTM algorithm to obtain a gated memory model, obtain the visit time interval corresponding to the adjacent medical sequence codes, and configure additional time gates based on the visit time interval and the disease vector; The gated memory model is updated based on the time gate to obtain a healthy memory state at time t in the gated memory model, and a contextual disease hidden state at time t is obtained based on the healthy memory state; The attention pooling layer aggregates the context disease hidden state based on the preset self-attention mechanism to obtain the aggregate state, learns the dependencies between the medical records through the preset health archive library and calculates the attention score corresponding to each aggregate state, and outputs the patient's disease state at time t based on the attention score and the aggregate state; The output layer is used to obtain the demographic characteristics associated with the patient's basic information and integrate the demographic characteristics with the patient's disease status to obtain a combined vector; A fully connected layer is used to map the combined vector to the disease risk probability distribution through an activation function to obtain a prediction result, which is represented by the probability that the patient suffers from each disease in the preset disease collection.
[0082] The implementation principle is: The patient's medical treatment information is integrated, and one or more known disease data of the patient are used as input to obtain the correlation between each different disease and the degree of influence of different treatment times on different diseases. The patient's recent patient status at different treatment times and the hidden disease status based on context analysis are obtained by matching the correlation and time impact to comprehensively obtain the patient's medical status. Finally, the patient's medical status and the demographic characteristics associated with its basic information are comprehensively input for prediction to obtain the distribution of disease risk probabilities corresponding to different diseases, and the prediction results are obtained based on the distribution results. In this way, the probability of suffering from multiple diseases can be predicted by only uploading the patient's common medical records.
[0083] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise clearly stated in this document, the execution of these steps is not strictly limited in order and can be performed in other orders.
[0084] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A multi-disease fusion prediction method, characterized in that: The following steps are involved: Obtaining a medical sequence code and outputting a disease vector based on the medical sequence code, wherein the medical sequence code includes one or more disease categories and basic patient information; The disease vector is used as input and modeled in combination with the LSTM algorithm to obtain a gated memory model, obtain the visit time intervals corresponding to the adjacent medical sequence codes, and configure additional time gates based on the visit time intervals and the disease vector; updating the gated memory model based on the time gate to obtain a healthy memory state at time t in the gated memory model, and obtaining a contextual disease hidden state at time t based on the healthy memory state; Aggregating the context disease hidden state based on a preset self-attention mechanism to obtain an aggregate state, learning the dependencies between the medical records through a preset health archive library and calculating the attention score corresponding to each aggregate state, and outputting the patient's disease state at time t based on the attention score and the aggregate state; Acquire demographic features associated with the patient's basic information, and integrate the demographic features with the patient's disease status to obtain a combined vector; The combined vector is mapped to the disease risk probability distribution through an activation function using a fully connected layer to obtain a prediction result, wherein the prediction result is characterized by the probability that the patient suffers from each disease in a preset disease collection.
2. The multi-disease fusion prediction method according to claim 1, characterized in that: Obtaining a medical sequence code and outputting a disease vector based on the medical sequence code includes the following steps: Identify each of the disease categories as a disease vector of a fixed size through word embedding and output it; If there are multiple disease categories at the same time t in the medical sequence code, the corresponding multiple disease vectors are average pooled to obtain a disease group.
3. The multi-disease fusion prediction method according to claim 1, characterized in that: The disease vector is used as input and modeled in combination with the LSTM algorithm to obtain a gated memory model, including the following steps: Based on the LSTM algorithm, the input gate, forget gate, and output gate are set. The formula is as follows: ; ; ; ; ; in, , , They are represented as the input gate, forget gate and output gate at time t respectively. Represented as the unit state of the object at time t, Characterized as the disease vector as input, It is represented as the hidden state corresponding to the previous time t-1. It is represented by the sigmoid activation function, W is represented by the weights of different gates, and b is represented by the bias parameters of different gates; The forget gate is paired with the input gate to eliminate the calculation process of the forget gate, so that The calculation formula is simplified to: 。 4. The multi-disease fusion prediction method according to claim 3, characterized in that: Obtaining the consultation time intervals corresponding to the adjacent medical sequence codes, and configuring an additional time gate based on the consultation time intervals and the disease vector, includes the following steps: Get the current disease vector representing the short-term health status and cell status that characterizes early diagnostic information And calculate the weight vector between ; The time gate is generated by the following formula: ; in, It is represented as the time gate corresponding to time t, Characterized as the weight parameter corresponding to the time gate, is the weight vector, Characterized by the deviation parameter corresponding to the time gate.
5. The multi-disease fusion prediction method according to claim 4, characterized in that: The gated memory model is updated based on the time gate to obtain a healthy memory state at time t in the gated memory model, and a contextual disease hidden state at time t is obtained based on the healthy memory state, comprising the following steps: The cell state is adjusted by the time gate And the output gate, specifically: ; ; in, Characterized as a cell state Update status based on weight parameters; The input disease vector is filtered through the input gate and the time gate respectively to filter the unit state at each time t Determine the health memory state at time t, and obtain the context disease hidden state based on each health memory state. Specifically, 。 6. The multi-disease fusion prediction method according to claim 5, characterized in that: Acquiring the context disease hidden state at time t based on the health memory state also includes the following steps: Obtaining the time direction of the medical sequence code and defining it as a forward direction, and reversing the time direction to obtain a backward direction; The forward pointing and backward pointing medical sequence encodings are respectively used as input to obtain the forward hidden state and the backward hidden state ; The forward hidden state and the backward hidden state are coupled, and the concatenated output result is used as the final context disease hidden state.
7. The multi-disease fusion prediction method according to claim 5, characterized in that: Aggregating the context disease hidden state based on a preset self-attention mechanism to obtain an aggregate state, learning the dependencies between the medical records through a preset health archive library and calculating the attention score corresponding to each aggregate state, and outputting the patient's disease state at time t based on the attention score and the aggregate state, including the following steps: Get the aggregated state after aggregating the context disease hidden state And the attention scores corresponding to different states after learning ; The patient's disease status is calculated based on the following formula: , in, Characterize each of the aggregation states The corresponding attention score, Characterizes the patient's disease state.
8. The multi-disease fusion prediction method according to claim 7, characterized in that: Obtaining demographic features associated with the patient's basic information, and integrating the demographic features with the patient's disease status to obtain a combined vector, comprising the following steps: The patient's basic information is transformed by One-hot encoding to obtain the demographic characteristics , the demographic characteristics and the patient's disease status Combine to get the combined vector .
9. The multi-disease fusion prediction method according to claim 8, characterized in that: Using a fully connected layer to map the combined vector to the disease risk probability distribution through an activation function to obtain a prediction result includes the following steps: Configure the training parameters of the two fully connected layers and , input the patient information and the target disease collection and obtain the prediction result through the following formula: , in, Characterizing patients as predicted The probability of having a disease in the disease set D, and They are represented as the bias parameters in the two fully connected layers respectively.
10. A multi-disease fusion prediction system, characterized in that: include: An embedding layer, used to obtain a medical sequence code and output a disease vector based on the medical sequence code, wherein the medical sequence code includes one or more disease categories and basic patient information; A context encoding layer, used to take the disease vector as input and perform modeling in combination with the LSTM algorithm to obtain a gated memory model, obtain the visit time interval corresponding to the adjacent medical sequence codes, and configure an additional time gate based on the visit time interval and the disease vector; updating the gated memory model based on the time gate to obtain a healthy memory state at time t in the gated memory model, and obtaining a contextual disease hidden state at time t based on the healthy memory state; An attention pooling layer, which aggregates the context disease hidden state based on a preset self-attention mechanism to obtain an aggregate state, learns the dependencies between the medical records through a preset health archive library and calculates the attention score corresponding to each aggregate state, and outputs the patient's disease state at time t based on the attention score and the aggregate state; An output layer, used for obtaining demographic characteristics associated with the basic information of the patient, and integrating the demographic characteristics with the disease status of the patient to obtain a combined vector; The combined vector is mapped to the disease risk probability distribution through an activation function using a fully connected layer to obtain a prediction result, wherein the prediction result is characterized by the probability that the patient suffers from each disease in a preset disease collection.
Citation Information
Cited By
Slow patient group health data rapid early warning method and system based on attention mechanism
CN120299721A
Disease dynamic prediction method and device based on multi-source factors, medium and program product
CN120853895A
A disease dynamic prediction method, device, medium and program product based on multiple source factors
CN120853895B
Diabetes risk prediction method based on high-dimensional disease embedding and health data fusion
CN121034637A