Readmission prediction method and device, terminal equipment and medium
By adopting a combination of diagram neural networks and Transformer models in the re -admission prediction of diabetic patients, combining self -attention mechanisms and door control mechanisms, the traditional method has been solved in capturing the complexity of the clinical data of diabetic patients. High predictive accuracy and model stability.
Patent Information
- Application Number
- CN202411520438.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-10-17
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-24
AI Technical Summary
Traditional readmission prediction methods have limitations in processing clinical data of diabetes patients and capturing complex correlations. They cannot accurately capture key features in clinical data, and it is difficult to accurately predict readmissions of diabetes patients.
The readmission prediction method based on the graph neural network model is used to obtain the clinical data of historical diabetes patients, calculate the prior conditional probability of readmission, and encode the clinical data into embedding vectors and binary vectors for fusion, and obtain the correlation with readmission fused feature vector. Then, a readmission prediction model is built based on the Transformer model, and a self-attention mechanism and a gating mechanism are introduced to improve the accuracy of prediction.
It improves the accuracy of feature capture and the accuracy of re -admission prediction. By dynamically adjusting the weight of the attention scores, the model is avoided, which significantly improves the prediction effect.
Smart Images

Figure CN119361051A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of diabetes research, and specifically relates to a readmission prediction method, device, terminal equipment and medium. Background Art
[0002] With the aging population and the increase in chronic diseases (such as diabetes), readmission prediction has become an important issue in the medical field. Readmission prediction aims to predict whether a patient will be hospitalized again within a certain period of time after discharge by analyzing the patient's clinical data, thereby helping medical institutions and doctors better manage the patient's health status and improve the efficiency of medical resource utilization.
[0003] Traditional readmission prediction methods are mainly based on statistical models and machine learning models. These methods have achieved certain prediction effects to a certain extent, but they have certain limitations in processing the clinical data of diabetic patients and capturing the complex correlations between diabetic patients. They cannot accurately capture the key features in the clinical data and it is difficult to accurately predict the readmission of diabetic patients. Summary of the invention
[0004] The technical problem solved by the present invention is to provide a readmission prediction method, device, terminal equipment and medium to accurately predict the readmission of diabetic patients.
[0005] In a first aspect, the present invention provides a method for predicting hospital readmission, the method comprising the following steps:
[0006] Obtain clinical data of historical diabetic patients;
[0007] Based on clinical data, the a priori conditional probability of readmission of patients with diabetes was calculated;
[0008] Obtain the embedding vector corresponding to the clinical data based on the graph neural network model, and encode the clinical data into a binary vector;
[0009] The embedded vector and the binary vector are fused to obtain the fused feature vector related to the readmission of diabetic patients;
[0010] A readmission prediction model is constructed based on the Transformer model; the self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention according to the prior conditional probability and the fused feature vector, and a gating mechanism for balancing the first attention score weight corresponding to the prior probability and the second attention score weight corresponding to the fused feature in the comprehensive attention;
[0011] The readmission prediction model is trained based on the fusion features and clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model;
[0012] The clinical data to be tested of the target diabetic patients are obtained, and the clinical data to be tested are input into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
[0013] Optionally, the clinical data includes examination information, treatment information, diagnosis information, and readmission information.
[0014] Optionally, calculate the a priori conditional probability of readmission for patients with diabetes based on clinical data, including:
[0015] By calculating the formula
[0016]
[0017] Get the prior conditional probability P(A|(b i , c j , d k )); where P(A|(b i , c j , d k )) indicates that the check information is b i , the disposal information is c j , diagnostic information is d k The probability of readmission of diabetic patients, i, j, k represent the number, i = 1, 2, ..., I, I represents the total number of diabetes examination items, j = 1, 2, ..., J, J represents the number of diabetes-related treatment measures, k = 1, 2, ..., K, K represents the number of diabetes diagnosis results, P(A) represents the probability of readmission of historical diabetic patients, P((b i , c j , d k )|A) indicates that the examination information of the diabetic patients with a history of readmission is b i , the disposal information is c j , diagnostic information is d k The probability of i , c j , d k )) indicates that the examination information in the clinical data is b i , the disposal information is c j , diagnostic information is d k probability.
[0018] Optionally, the embedding vector and the binary vector are fused to obtain a fused feature vector related to the readmission of diabetic patients, including:
[0019] By calculating the formula
[0020] X m =Concat{Eb m*b m ;Ec m *c m ;Ed m *d m}
[0021] E m ∈R|b m |×h
[0022] Ec m ∈R|c m |×h
[0023] Ed m ∈R|d m |×h
[0024] Get the fused feature vector X m ; Among them, X m represents the fused feature vector of the mth diabetic patient in the clinical data, m = 1, 2, ..., M, M represents the total number of historical diabetic patients obtained, Concat{·;·;·} represents concatenation, Eb m Indicates the examination information b of the mth diabetic patient m The corresponding embedding vector, Ec m Represents the processing information c of the mth diabetic patient m The corresponding embedding vector, Ed m Represents the diagnosis information d of the mth diabetic patient m The corresponding embedding vector, R|·| represents the encoding, which is used to encode the inspection information, processing information or diagnosis information into the embedding vector, and h represents the dimension of the embedding vector.
[0025] Optionally, the comprehensive attention is calculated as follows:
[0026] Attention_prob=gate_scores*ori_Attention_prob+(1-gate_scores)*prior_Attention_prob
[0027] Among them, Attention_prob represents comprehensive attention, gate_scores represents the gated score, the gated score is a vector of dimension [hidden_size, 2], hidden_size represents the hidden dimension, 2 represents the prediction results on 2 categories, prior_Attention_prob represents the first attention score corresponding to the prior probability, and ori_Attention_prob represents the second attention score corresponding to the fused feature.
[0028] Optionally, the clinical data is text byte data.
[0029] In a second aspect, the present invention provides a readmission prediction device, comprising:
[0030] A clinical data acquisition module is used to obtain clinical data of historical diabetic patients;
[0031] The conditional probability calculation module is used to calculate the prior conditional probability of diabetic patients being readmitted to the hospital based on clinical data;
[0032] An encoding module, used to obtain the embedding vector corresponding to the clinical data based on the graph neural network model, and encode the clinical data into a binary vector;
[0033] A vector fusion module is used to fuse the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients;
[0034] A model building module, for building a readmission prediction model based on a Transformer model; the self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention according to a prior conditional probability and a fused feature vector, and a gating mechanism for balancing a first attention score weight corresponding to a prior probability and a second attention score weight corresponding to a fused feature in the comprehensive attention;
[0035] A model training module is used to train the readmission prediction model based on the fusion features and clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model;
[0036] The readmission prediction module is used to obtain the clinical data to be tested of the target diabetic patients, and input the clinical data to be tested into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
[0037] In a third aspect, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned readmission prediction method when executing the computer program.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which implements the above-mentioned readmission prediction method when executed by a processor.
[0039] The beneficial effects of the present invention are:
[0040] The present invention provides a readmission prediction method. On the one hand, the readmission prediction method obtains an embedding vector corresponding to clinical data based on a graph neural network model, encodes the clinical data into a binary vector, and then fuses the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients. The sparse features in the binary vector can be mapped to the dense vector space corresponding to the embedded features, thereby improving the accuracy of feature capture, thereby improving the accuracy of readmission prediction. On the other hand, the readmission prediction model constructed by the readmission prediction method introduces a comprehensive attention mechanism for calculating comprehensive attention according to prior conditional probability and fused feature vectors in the self-attention mechanism, and a gating mechanism for balancing the weights of each attention score in the comprehensive attention. The prior conditional probability is combined in the attention calculation, which is conducive to improving the accuracy of the comprehensive attention, thereby improving the accuracy of the readmission prediction. Moreover, the weight of each attention score can be dynamically adjusted through the gating mechanism, effectively ensuring that the readmission prediction model is overfitted, thereby further improving the accuracy of the readmission prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flowchart of a method for predicting hospital readmission in one embodiment of the present application;
[0042] Figure 2 This is a structural diagram of a readmission prediction device in one embodiment of the present application;
[0043] Figure 3 This is a structural diagram of a terminal device in one of the implementation modes of the present application. DETAILED DESCRIPTION
[0044] In view of the problem of low accuracy of traditional readmission prediction methods, the present invention provides a readmission prediction method, device, terminal device and medium; wherein, the method obtains an embedding vector corresponding to clinical data based on a graph neural network model, encodes the clinical data into a binary vector, and then fuses the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients, and can map the sparse features in the binary vector to the dense vector space corresponding to the embedded features, thereby improving the accuracy of feature capture, thereby improving the accuracy of readmission prediction; at the same time, the readmission prediction model constructed by the readmission prediction method introduces a comprehensive attention mechanism for calculating comprehensive attention according to prior conditional probability and fused feature vectors and a gating mechanism for balancing the weights of each attention score in the comprehensive attention in the self-attention mechanism, combines the prior conditional probability in the attention calculation, is conducive to improving the accuracy of the comprehensive attention, thereby improving the accuracy of the readmission prediction, and the gating mechanism can dynamically adjust the weights of each attention score, effectively ensuring that the readmission prediction model is overfitted, and further improving the accuracy of the readmission prediction.
[0045] The readmission prediction method provided by the present invention is described in detail below.
[0046] like Figure 1 As shown, the readmission prediction method includes the following steps:
[0047] Step 11, obtaining clinical data of historical diabetic patients.
[0048] In an embodiment of the present invention, the clinical data includes examination information, treatment information, diagnosis information, and readmission information. In some embodiments of the present invention, the clinical data is text byte data, recorded by doctors during consultation, and stored in the hospital's case database. The readmission information can be represented as a binary label, when the readmission information is displayed as 0, it means that there is no readmission, and when the readmission information is displayed as 1, it means that there is no readmission.
[0049] Exemplarily, the clinical data of the above-mentioned historical diabetic patients can be obtained through the hospital's case database.
[0050] In one embodiment of the present invention, the above clinical data are as follows:
[0051] Diagnostic information: diabetes type 1; 250.01; diabetes type 1 is the diagnosis result, and 250.01 is the icd code.
[0052] Examination information: blood sugar | glycosylated hemoglobin | insulin levels;
[0053] Disposition Information: Insulin Therapy | Blood Glucose Monitoring.
[0054] Step 12, based on the clinical data, calculate the prior conditional probability of diabetic patients being readmitted.
[0055] Specifically, the calculation formula
[0056]
[0057] Get the prior conditional probability P(A|(b i , c j , d k )); where P(A|(b i , c j , d k )) indicates that the check information is b i , the disposal information is c j , diagnostic information is d kThe probability of readmission of diabetic patients, i, j, k represent the number, i = 1, 2, ..., I, I represents the total number of diabetes examination items, j = 1, 2, ..., J, I represents the number of diabetes-related treatment measures, k = 1, 2, ..., K, K represents the number of diabetes diagnosis results, P(A) represents the probability of readmission of historical diabetic patients, P((b i , c j , d k )|A) indicates that the examination information of the diabetic patients with a history of readmission is b i , the disposal information is c j , diagnostic information is d k The probability of i , c j , d k )) indicates that the examination information in the clinical data is b i , the disposal information is c j , diagnostic information is d k probability.
[0058] It should be noted that calculating the a priori conditional probability of readmission for diabetic patients can provide a reference for subsequent readmission predictions from the perspective of historical data.
[0059] Step 13: Obtain the embedding vector corresponding to the clinical data based on the graph neural network model, and encode the clinical data into a binary vector.
[0060] It should be noted that the above embedding vector can convert discrete features into continuous vector representations, so that it can be better applied to machine learning and deep learning models; the above binary vector refers to a vector in which each element is 0 or 1, which is usually used to represent a binary state or feature. It is worth mentioning that when the two are multiplied, discrete features can be combined with continuous features to provide richer feature representations, which is beneficial to the training and computational efficiency of the model (embedded vectors are usually low-dimensional continuous vectors, while binary vectors are usually low-dimensional, and after multiplication, a feature representation of moderate dimension can be obtained), and the model's expressiveness can be improved (more feature combinations, thereby improving the model's expressiveness and generalization capabilities).
[0061] For example, all patients' laboratory test information (such as "blood sugar|Glycated hemoglobin|Insulin level", "blood sugar|Glycated hemoglobin|Insulin level", "blood sugar|Glycated hemoglobin") are merged and deduplicated ("blood sugar|Glycated hemoglobin|Insulin level", "blood sugar|Glycated hemoglobin"), and each of the deduplicated results is mapped to a corresponding position index, corresponding to which position, which position is 1, and the rest are 0. The total dimension (which can be understood as length) is the number retained after deduplication.
[0062] In some embodiments of the present invention, the graph neural network model is a graph convolutional network model. Exemplarily, the acquired clinical information is constructed into a graph, in which the nodes represent diabetic patients, the attributes of the nodes represent the examination information, treatment information, diagnosis information and readmission information of the diabetic patients, and the edge connecting two nodes represents the similarity between the clinical data of the diabetic patients corresponding to the two nodes; through multi-layer convolution, the feature information of the node is combined with the information of its neighboring nodes, and higher-level features are gradually extracted. Each layer of convolution maps the features of the node to a new space, thereby generating an embedding vector that reflects the structure and attributes of the node. Finally, the embedding vector obtained based on the graph neural network model can be expressed as Eb m ∈R|b m |×h、Ec m ∈R|c m |×h, Ed m ∈R|d m |×h, where Eb m Indicates the examination information b of the mth diabetic patient m The corresponding embedding vector, Ec m Represents the processing information c of the mth diabetic patient m The corresponding embedding vector, Ed m Represents the diagnosis information d of the mth diabetic patient m The corresponding embedding vector, R|·| represents the encoding, which is used to encode the inspection information, processing information or diagnostic information into the embedding vector, and h represents the dimension of the embedding vector (which can be set to 100). The above dimensions reflect the number of features of the data, and data of different dimensions can contain different information. In deep learning tasks, the dimension of the input data usually corresponds to the number of features. The higher the dimension, the richer the feature information contained in the data.
[0063] Step 14, fuse the embedded vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients.
[0064] Specifically, by calculating the formula
[0065] X m =Concat{Eb m *b m ;Ec m *c m ;Ed m *d m}
[0066] E m ∈R|b m |×h
[0067] Ec m ∈R|c m|×h
[0068] Ed m ∈R|d m |×h
[0069] Get the fused feature vector X m ; Among them, X m represents the fused feature vector of the mth diabetic patient in the clinical data, m=1,2,...,M, M represents the total number of historical diabetic patients obtained, and Concat{·;·;·} represents splicing, specifically splicing performed in the first dimension.
[0070] It is worth mentioning that by fusing the embedding vector and the binary vector, the sparse features in the binary vector can be mapped to a dense vector space of lower dimension, capturing the relationship between the features, thereby improving the performance of the model and helping to improve the accuracy of readmission prediction.
[0071] Step 15: Build a readmission prediction model based on the Transformer model.
[0072] In an embodiment of the present invention, the readmission prediction model improves the self-attention mechanism of the traditional Transformer model. The self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention based on prior conditional probability and fused feature vector, and a gating mechanism for balancing the first attention score weight corresponding to the prior probability in the comprehensive attention and the second attention score weight corresponding to the fused feature.
[0073] In an embodiment of the present invention, the calculation formula of the above comprehensive attention is as follows:
[0074] Attention_prob=gate_scores*ori_Attention_prob+(1-gate_scores)*prior_Attention_prob
[0075] Among them, Attention_prob represents comprehensive attention, gate_scores represents the gated score, the gated score is a vector of dimension [hidden_size, 2], hidden_size represents the hidden dimension, 2 represents the prediction results on 2 categories, prior_Attention_prob represents the first attention score corresponding to the prior probability, and ori_Attention_prob represents the second attention score corresponding to the fused feature.
[0076] It is worth mentioning that the self-attention mechanism introduces a comprehensive attention mechanism that calculates comprehensive attention based on prior conditional probability and fused feature vector, as well as a gating mechanism for balancing the weights of each attention score in the comprehensive attention. The prior conditional probability is combined in the attention calculation, which is conducive to improving the accuracy of the comprehensive attention, thereby improving the accuracy of readmission prediction. Moreover, the gating mechanism can dynamically adjust the weights of each attention score, effectively ensuring that the readmission prediction model is overfitted, thereby further improving the accuracy of readmission prediction.
[0077] The readmission prediction model processes the comprehensive attention through a feedforward neural network to obtain a readmission prediction result. The prediction result is a value between 0 and 1.
[0078] In other embodiments of the present invention, in order to further improve the generalization ability of the readmission prediction model, the comprehensive attention may be randomly inactivated.
[0079] Step 16: Train the readmission prediction model based on the fusion features and clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model.
[0080] In some embodiments of the present invention, the loss value in the readmission prediction model training process is a cross entropy loss value.
[0081] The following is an explanation of the training process of the readmission prediction model, which specifically includes steps I to IV.
[0082] Step I: Initialize the model parameters of the readmission prediction model to obtain the initial readmission prediction model.
[0083] In step II, the fusion features are input into the initial readmission prediction model, and the cross entropy loss value of the initial readmission prediction model is calculated in combination with the readmission information in the clinical data.
[0084] Step III, updating the model parameters of the initial readmission prediction model to obtain an intermediate readmission prediction model, and counting the number of executions of step III;
[0085] Step IV: if the number of executions (training times) of step III is less than the preset number of executions (training times), the intermediate readmission prediction model is used as the initial readmission prediction model in the above step II, and the process returns to step II; otherwise, the intermediate readmission prediction model whose training times reach the preset number of training times is used as the trained readmission prediction model.
[0086] In other embodiments of the present application, if the cross-entropy loss value corresponding to the intermediate readmission prediction model whose training times reaches a preset training time is not the minimum value, the intermediate readmission prediction model with the smallest cross-entropy loss value in each training time is determined as the trained readmission prediction model.
[0087] Step 17, obtaining the clinical data to be tested of the target diabetic patient, and inputting the clinical data to be tested into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
[0088] Based on the predicted probability of readmission, guidance can be provided for the allocation of medical resources in the hospital.
[0089] In order to verify the effectiveness of the readmission prediction method provided by the present invention, in another embodiment of the present invention, a test was carried out using a case database of a hospital, and the comparison object was a traditional machine learning method. The results showed that the AUROC index of the readmission prediction method provided by the present invention reached 0.85, which was much higher than the traditional machine learning method.
[0090] It can be seen that the readmission prediction method provided by the present invention, on the one hand, obtains the embedding vector corresponding to the clinical data based on the graph neural network model, and encodes the clinical data into a binary vector, and then fuses the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients, which can map the sparse features in the binary vector to the dense vector space corresponding to the embedded features, thereby improving the accuracy of feature capture, thereby improving the accuracy of readmission prediction; on the other hand, the readmission prediction model constructed by the readmission prediction method introduces a comprehensive attention mechanism for calculating comprehensive attention according to the prior conditional probability and the fused feature vector in the self-attention mechanism, and a gating mechanism for balancing the weights of each attention score in the comprehensive attention. The prior conditional probability is combined in the attention calculation, which is conducive to improving the accuracy of the comprehensive attention, thereby improving the accuracy of the readmission prediction, and the gating mechanism can dynamically adjust the weights of each attention score, effectively ensuring that the readmission prediction model is overfitted, and further improving the accuracy of the readmission prediction.
[0091] The readmission prediction device provided by the present invention is described below.
[0092] like Figure 2 As shown, the readmission prediction device 200 includes:
[0093] A clinical data acquisition module 201 is used to acquire clinical data of historical diabetic patients;
[0094] The conditional probability calculation module 202 is used to calculate the prior conditional probability of diabetic patients being readmitted to the hospital based on clinical data;
[0095] An encoding module 203, used to obtain an embedding vector corresponding to the clinical data based on a graph neural network model, and encode the clinical data into a binary vector;
[0096] A vector fusion module 204 is used to fuse the embedded vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients;
[0097] A model building module 205 is used to build a readmission prediction model based on the Transformer model; the self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention according to the prior conditional probability and the fused feature vector, and a gating mechanism for balancing the first attention score weight corresponding to the prior probability and the second attention score weight corresponding to the fused feature in the comprehensive attention;
[0098] A model training module 206 is used to train the readmission prediction model based on the fusion features and clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model;
[0099] The readmission prediction module 207 is used to obtain clinical data to be tested of the target diabetic patient, and input the clinical data to be tested into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
[0100] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are not related to the implementation method of the present application.
[0101] The examples are based on the same concept, and their specific functions and technical effects can be specifically referred to in the method embodiment section, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit, and the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0102] like Figure 3 As shown, an embodiment of the present invention provides a terminal device, such as Figure 3As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 3 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.
[0103] Specifically, when the processor D100 executes the computer program D102, it obtains clinical data of historical diabetic patients; calculates the prior conditional probability of readmission of diabetic patients based on the clinical data; obtains the embedding vector corresponding to the clinical data based on the graph neural network model, and encodes the clinical data into a binary vector; fuses the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients; constructs a readmission prediction model based on the Transformer model; trains the readmission prediction model based on the fused features and clinical data until the loss value of the readmission prediction model is less than a preset loss value threshold, thereby obtaining a trained readmission prediction model; obtains the clinical data to be tested of the target diabetic patient, and inputs the clinical data to be tested into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested. Among them, the embedding vector corresponding to the clinical data is obtained based on the graph neural network model, and the clinical data is encoded into a binary vector. The embedded vector and the binary vector are then fused to obtain a fused feature vector related to the readmission of diabetic patients. The sparse features in the binary vector can be mapped to the dense vector space corresponding to the embedded features, thereby improving the accuracy of feature capture and thus improving the accuracy of readmission prediction. The constructed readmission prediction model introduces a comprehensive attention mechanism for calculating the comprehensive attention based on the prior conditional probability and the fused feature vector in the self-attention mechanism, as well as a gating mechanism for balancing the weights of each attention score in the comprehensive attention. The prior conditional probability is combined in the attention calculation, which is conducive to improving the accuracy of the comprehensive attention, thereby improving the accuracy of the readmission prediction. Moreover, the gating mechanism can dynamically adjust the weights of each attention score, effectively ensuring that the readmission prediction model is overfitted, thereby further improving the accuracy of the readmission prediction.
[0104] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0105] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0106] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0107] The present application embodiment provides a computer program product, which, when executed on a terminal device, enables the terminal device to implement the steps in the above-mentioned method embodiments.
[0108] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0109] One or more embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for predicting hospital readmission, characterized in that: include: Obtain clinical data of historical diabetic patients; Calculate the prior conditional probability of hospital readmission for patients with diabetes based on the clinical data; Obtaining an embedding vector corresponding to the clinical data based on a graph neural network model, and encoding the clinical data into a binary vector; fusing the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients; A readmission prediction model is constructed based on the Transformer model; the self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention according to the prior conditional probability and the fused feature vector, and a gating mechanism for balancing a first attention score weight corresponding to the prior probability and a second attention score weight corresponding to the fused feature in the comprehensive attention; Training the readmission prediction model based on the fusion features and the clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model; The clinical data to be tested of the target diabetic patient is obtained, and the clinical data to be tested is input into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
2. The readmission prediction method according to claim 1, characterized in that: The clinical data includes examination information, treatment information, diagnosis information, and readmission information.
3. The readmission prediction method according to claim 2, characterized in that: The step of calculating the prior conditional probability of readmission of the diabetic patient according to the clinical data comprises: By calculating the formula Get the prior conditional probability P(A| ( b i ,c j ,d k )); where P(A|(b i ,c j ,d k )) indicates that the check information is b i , the disposal information is c j , diagnostic information is d k The probability of readmission of diabetic patients, i, j, k represent the number, i = 1, 2, ..., I, I represents the total number of diabetes examination items, j = 1, 2, ..., j, j represents the number of diabetes-related treatment measures, k = 1, 2, ..., K, K represents the number of diabetes diagnosis results, P (A) represents the probability of readmission of historical diabetic patients, P ((b i ,c j ,d k )|A) indicates that the examination information of the diabetic patients with a history of readmission is b i , the disposal information is c j , diagnostic information is d k The probability of i ,c j ,d k )) indicates that the examination information in the clinical data is b i , the disposal information is c j , diagnostic information is d k probability.
4. The readmission prediction method according to claim 3, characterized in that: The fusing the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients includes: By calculating the formula X m =Concat{Eb m *b m ;Ec m *c m ;Ed m *d m } Eb m ∈R|b m |×h Ec m ∈R|c m |×h Ed m ∈R|d m |×h Get the fused feature vector X m ; Among them, X m represents the fused feature vector of the mth diabetic patient in the clinical data, m=1,2,...,M, M represents the total number of historical diabetic patients obtained, Concat{·;·;·} represents concatenation, Eb m Indicates the examination information b of the mth diabetic patient m The corresponding embedding vector, Ec m Represents the processing information c of the mth diabetic patient m The corresponding embedding vector, Ed m Represents the diagnosis information d of the mth diabetic patient m The corresponding embedding vector, R|·| represents the encoding, which is used to encode the inspection information, processing information or diagnosis information into the embedding vector, and h represents the dimension of the embedding vector.
5. The method for predicting hospital readmission according to claim 4, characterized in that: The calculation formula of the comprehensive attention is as follows: Attention_prob=gate_scores*ori_Attention_prob+(1-gate_scores)*prior_Attention_prob Among them, Attention_prob represents the comprehensive attention, gate_scores represents the gated score, the gated score is a vector with a dimension of [hidden_size,2], hidden_size represents the hidden dimension, 2 represents the prediction results on 2 categories, prior_Attention_prob represents the first attention score corresponding to the prior probability, and ori_Attention_prob represents the second attention score corresponding to the fused feature.
6. The method for predicting hospital readmission according to claim 1, characterized in that: The clinical data is text byte data.
7. A readmission prediction device, characterized in that: include: A clinical data acquisition module is used to obtain clinical data of historical diabetic patients; A conditional probability calculation module, used to calculate the prior conditional probability of readmission of diabetic patients based on the clinical data; An encoding module, used for obtaining an embedding vector corresponding to the clinical data based on a graph neural network model, and encoding the clinical data into a binary vector; A vector fusion module, used for fusing the embedding vector and the binary vector to obtain a fused feature vector related to the readmission of diabetic patients; A model building module, for building a readmission prediction model based on a Transformer model; the self-attention mechanism of the readmission prediction model includes a comprehensive attention mechanism for calculating comprehensive attention according to the prior conditional probability and the fused feature vector, and a gating mechanism for balancing a first attention score weight corresponding to the prior probability and a second attention score weight corresponding to the fused feature in the comprehensive attention; A model training module, used for training the readmission prediction model based on the fusion features and the clinical data until the number of training times of the readmission prediction model reaches a preset number of training times, thereby obtaining a trained readmission prediction model; The readmission prediction module is used to obtain clinical data to be tested of the target diabetic patient, and input the clinical data to be tested into the trained readmission prediction model to obtain the readmission prediction probability corresponding to the clinical data to be tested.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for predicting hospital readmission according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting hospital readmission according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Multi-sign fusion lung respiration monitoring system and method based on LSTM neural network
CN120859475A
LSTM neural network-based multi-signature fusion lung respiration monitoring system and method
CN120859475B