Severe survival time prediction model training method and system based on electrolyte disorder

By constructing the time series of electrolyte changes and training an improved LSTM model, the problem of inefficiency of traditional survival time prediction methods is solved, efficient survival time prediction is achieved, and patients' survival chances are improved.

CN119724578AActive Publication Date: 2025-03-28CENT SOUTH UNIV +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411770432.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-03-28
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Traditional survival time prediction methods based on deep learning require the use of multiple inspection indicators in multiple inspection items, resulting in low prediction efficiency and may delay rescue time.

Method used

By obtaining the electrolyte data of the patient, constructing the electrolyte change time series, and constructing the sample data set based on different time thresholds, the improved LSTM model is trained to predict survival time.

Benefits of technology

It realizes survival time prediction without multiple examination items, improves prediction efficiency, leaves medical workers with rescue time, and improves patients' survival chances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724578A_ABST
    Figure CN119724578A_ABST
Patent Text Reader

Abstract

The invention discloses a severe survival time prediction model training method and system based on electrolyte disorder, and the training method comprises the steps: obtaining electrolyte data of different patients, and constructing an electrolyte change time sequence of each patient according to the electrolyte data; different time threshold values are set; based on each time threshold, constructing a sample data set corresponding to the time threshold according to the electrolyte change time sequence and the survival time of each patient; constructing a survival prediction model; and training and verifying the survival prediction model by using each sample data set to obtain a target prediction model corresponding to the time threshold. According to the method, the prediction efficiency is greatly improved on the basis of ensuring the survival time prediction precision.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention is a divisional application for a method and system for predicting critical illness survival time based on patient electrolyte disorders. The application date of the parent case is May 28, 2024, and the application number is 2024106711871. Technical Field

[0002] The present invention belongs to the field of deep learning technology, and in particular relates to a critical illness survival time prediction model training method and system based on electrolyte disorder. Background Art

[0003] In traditional diagnosis and treatment methods, doctors can only roughly judge the life risk of critically ill patients based on their own diagnosis and treatment experience, the current status of critically ill patients and their various examination indicators. This judgment method is subjective, the judgment accuracy is not high, and it has limitations. It is impossible to predict the current life risk of critically ill patients in advance and it is impossible to treat critically ill patients in advance. Predicting the life risk of critically ill patients a few days in advance can not only identify high-risk patients in advance, leaving precious rescue time for medical workers, but also reasonably allocate medical resources according to the patient's risk situation.

[0004] With the popularization of medical system informatization, each examination result, medication, and treatment of medical patients will be saved in the hospital's electronic medical records. These massive data provide a data basis for building artificial intelligence models to analyze patient characteristics and predict patients' life risks. However, the dimensions of patients' indicators are extremely wide, with nearly a hundred. But in medical scenarios, the total amount of data is often insufficient compared to the data dimensions. If all dimensional data are input into the artificial intelligence model, one is that indicators that are not important for life-threatening conditions will affect the accuracy of the model, and more importantly, the model may be at risk of underfitting. Therefore, screening out critical indicators that are meaningful for life-threatening conditions is of great significance for predictive model training and predictive model accuracy.

[0005] Most existing survival time prediction methods use the APACHE II score, and require the use of multiple examination indicators, including temperature, arterial pressure, heart rate, respiratory rate, oxygenation index, sodium ions, potassium ions, pH, bicarbonate, creatinine and other examination indicators. This means that before predicting life-threatening conditions, multiple examination items need to be performed on critically ill patients, and then predictions can be made based on the examination indicators in these examination items. Multiple examination items take a long time, which may result in critically ill patients being in danger of death before the required examination indicators are collected, delaying precious rescue time. In addition, the APACHE II score cannot give an accurate survival time, but can only give a rough prognostic reference.

[0006] For example, in order to accurately predict the patient's life risk using appropriate critical indicators and solve the problem of unimportant indicators affecting the accuracy of the prediction model, the patent document with application publication number CN116759098A discloses a critical survival probability prediction model training and prediction method, which uses the examination indicators of blood routine, liver and kidney power, erythrocyte sedimentation rate, C-reactive protein, coagulation function, blood gas analysis and other examination items to screen out critical indicators, and then predict the patient's survival probability based on the critical indicators. Compared with traditional diagnosis and treatment methods, this method can achieve early prediction of the life risk of critically ill patients and improve the prediction accuracy, but before the prediction, multiple examination items need to be implemented on critically ill patients before the prediction can be made, which affects the prediction efficiency and may delay precious rescue time. Summary of the invention

[0007] The purpose of the present invention is to provide a critical illness survival time prediction model training method and system based on electrolyte imbalance, so as to solve the problem that the traditional deep learning-based survival time prediction method needs to use multiple examination indicators in multiple examination items, resulting in low prediction efficiency and possible delay in rescue time.

[0008] The present invention solves the above technical problems through the following technical solutions: a critical illness survival time prediction model training method based on electrolyte disorder, the training method comprising the following steps:

[0009] Obtaining electrolyte data of different patients, and constructing an electrolyte change time series for each patient based on the electrolyte data; wherein the electrolyte change time series includes the detection value and the number of examinations of each electrolyte index in different time periods;

[0010] Different time thresholds are set according to the survival time prediction range; based on each time threshold, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and its survival time; and a survival prediction model is constructed;

[0011] The survival prediction model is trained and verified using each sample data set to obtain a target prediction model corresponding to the time threshold.

[0012] Further, constructing an electrolyte change time series for each patient based on the electrolyte data specifically includes:

[0013] Determine the length of the time period;

[0014] According to the length of the time period, an initial electrolyte change time series of each patient is constructed, and the initial electrolyte change time series is expressed as:

[0015] P i ={E i1 ,Ei2 ,…,E ij ,…,E iN};

[0016]

[0017] Among them, P i represents the initial electrolyte change time series of the i-th patient, N represents the number of time periods, E ij represents the electrolyte data of the i-th patient in the j-th time period, st j represents the start time of the jth time period, v jn N represents the detection value of the nth electrolyte index in the jth time period. I Indicates the number of electrolyte indicators, m jn represents the number of inspections of the nth electrolyte index in the jth time period;

[0018] The initial electrolyte change time series is preprocessed to obtain the electrolyte change time series.

[0019] Furthermore, the length of the time period is determined, including:

[0020] Set the initial value of the time period length;

[0021] For each patient, the evaluation score of each electrolyte index in the time period was calculated. The specific calculation formula is:

[0022]

[0023] in, Indicates that when the time period length is l t When , the patient's nth electrolyte index assessment score; Indicates that when the time period length is l t When , the number of times the patient's nth electrolyte index is checked in all time periods; Indicates that when the time period length is l t The number of time periods in which the number of examinations of the patient's nth electrolyte index is 0; Indicates that when the time period length is l t When , the number of time periods in which the number of examinations of the patient's nth electrolyte index is 1; α represents a hyperparameter, and its value range is [0,1];

[0024] determining a minimum value among the evaluation scores of all electrolyte indicators of the patient at the length of the time period, and taking the minimum value as the overall score of the patient at the length of the time period;

[0025] The length of the time period is changed, and the steps of calculating the evaluation score of each electrolyte index under the time period length are repeated to obtain the overall score of the patient under different time period lengths;

[0026] The maximum value of the overall scores of the patient at different time period lengths is determined, and the time period length corresponding to the maximum value is used as the final time period length.

[0027] Furthermore, the electrolyte indicators include sodium ions, potassium ions, calcium ions, magnesium ions, chloride ions, phosphate ions, bicarbonate ions, and pH values ​​that measure the acidity and alkalinity of the blood.

[0028] Further, based on each of the time thresholds, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and its survival time, specifically including:

[0029] Setting the size of the sliding window; dividing the electrolyte change time series into a plurality of sample data by moving the sliding window on the electrolyte change time series;

[0030] Generate a label corresponding to the sample data according to the time threshold and the survival time of the patient corresponding to each sample data;

[0031] A sample data set corresponding to the time threshold is constructed according to all sample data and their labels.

[0032] Furthermore, generating a label of the corresponding sample data according to the time threshold and the survival time of the patient corresponding to each sample data specifically includes:

[0033] Determine whether the survival time of the patient corresponding to the last time period in the sample data is greater than or equal to the time threshold. If so, generate a survival label; otherwise, generate a death label; wherein the survival time of the patient corresponding to the last time period in the sample data refers to the time from the last time period in the sample data to death.

[0034] Furthermore, the survival prediction model adopts an improved LSTM model. The improved LSTM model is based on the original LSTM model and adds a time decay module for short-term memory. The time decay module is used to convert the memory sum of the previous unit into the memory sum after decay processing according to the additional time input and the time decay function. The specific expression is:

[0035]

[0036]

[0037] in, represents the short-term memory of the t-1th unit; Ct-1 represents the memory sum of the t-1th unit; W d represents the weight matrix; b d represents the bias parameter; represents the decayed short-term memory of the t-1th unit; g() represents the time decay function; Δt represents the two inputs x t-1 With x t The actual time that passes between them in the physical world; represents the long-term memory of the t-1th unit; It represents the decayed memory sum of the t-1th unit, and is used to replace the memory sum of the original LSTM model.

[0038] Based on the same concept, the present invention also provides a critical illness survival time prediction model training system based on electrolyte disorder, comprising a memory, a processor, and a computer program / instructions stored on the memory, wherein the processor executes the computer program / instructions to implement the critical illness survival time prediction model training method based on electrolyte disorder as described above.

[0039] Based on the same concept, the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the above-mentioned critical illness survival time prediction model training method based on electrolyte disorder.

[0040] Based on the same concept, the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned critical illness survival time prediction model training method based on electrolyte disorder.

[0041] Beneficial Effects

[0042] Compared with the prior art, the advantages of the present invention are:

[0043] The present invention can realize survival time prediction by only obtaining the patient's electrolyte test data, and there is no need to spend a lot of time and money to implement multiple examination items before prediction. The present invention greatly improves the prediction efficiency on the basis of ensuring the accuracy of survival time prediction, leaving precious rescue time for medical workers and increasing the patient's chance of survival; constructing an electrolyte change time series based on electrolyte data and fully exploring the dynamic change characteristics of electrolyte data can improve the prediction accuracy of the model.

[0044] The survival prediction model of the present invention adopts an improved LSTM model, and a time decay model for short-term memory is added on the basis of the original LSTM model, so that it can perceive time intervals of unequal lengths in the electrolyte change time series, that is, it can dynamically perceive the time intervals in the electrolyte change time series. For sequences with long time intervals, the model pays more attention to the second half of the electrolyte change time series, thereby improving the prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1 is a flow chart of a method for predicting critical illness survival time based on electrolyte imbalance in a patient according to an embodiment of the present invention;

[0047] Figure 2 is an example diagram of a label for generating sample data in an embodiment of the present invention;

[0048] Figure 3 It is a diagram of the improved LSTM model architecture in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following is a clear and complete description of the technical solutions in the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0051] like Figure 1 As shown, a method for predicting critical illness survival time based on electrolyte disorder of a patient provided by an embodiment of the present invention comprises the following steps:

[0052] Step S1: Obtain electrolyte data of different patients, and construct an electrolyte change time series for each patient based on the electrolyte data.

[0053] With the popularization of electronic medical records, most hospitals have records of patients' examination data. Electrolytes play a decisive role in maintaining the osmotic pressure of extracellular fluid, the distribution and transfer of body fluids, maintaining the tension of body fluids, and maintaining acid-base balance. Usually, the total number of anions in body fluids is equal to the total number of cations, and they maintain electrical neutrality; when the number of any electrolyte indicator changes, different body damage will occur, that is, electrolyte disorders will occur. In critical illness, electrolyte disorders are closely related to sepsis. If electrolyte disorders are not restored, the probability of inducing sepsis in patients will be greatly increased, leading to the death of patients. Therefore, the severity of electrolyte disorders is directly related to the survival time of critically ill patients. For patients with severe conditions, their survival time may be shorter and require more medical resources; for patients with milder conditions, their survival time is longer or even does not die. In order to predict the survival risk of critically ill patients in advance, strive for rescue time, improve the chance of survival, and help to reasonably allocate medical resources, the present invention uses electrolyte data to predict the survival status of critically ill patients.

[0054] In a specific embodiment of the present invention, electrolyte data of different patients are derived from electronic medical records (e.g., MIMIC-IV database). Since the data derived from the electronic medical records are not uniform and have a chaotic structure, the present invention uses the Pandas library in Python to design a program to organize and extract the derived electrolyte data according to preset standards to obtain electrolyte data of different patients. These electrolyte data are electrolyte data tables with a unified format and structure. The electrolyte data of each patient includes a patient identifier, an examination time of the electrolyte data, and a detection value of an electrolyte index. In this embodiment, the electrolyte index includes sodium ions (Na + ), potassium ion (K + ), calcium ions (Ca 2+ ), magnesium ion (Mg 2+ ), chloride ion (Cl - ), phosphate (HPO4 2- ), bicarbonate (HCO 3- ) and the pH value which measures the acidity and alkalinity of the blood. Unless otherwise specified, these electrolyte indicators are assumed to be measured from the blood.

[0055] In a specific embodiment of the present invention, constructing the electrolyte change time series of each patient according to the electrolyte data specifically includes:

[0056] Step S1.1: Determine the length of the time period, including:

[0057] Step S1.11: Set the initial value of the time period length;

[0058] Step S1.12: For each patient, calculate the evaluation score of each electrolyte index at the time period length. The specific calculation formula is:

[0059]

[0060] in, Indicates that when the time period length is l t When , the patient's nth electrolyte index assessment score; Indicates that when the time period length is l t When , the number of times the patient's nth electrolyte index is checked in all time periods; Indicates that when the time period length is l t The number of time periods in which the number of examinations of the patient's nth electrolyte index is 0; Indicates that when the time period length is l t , the number of time periods in which the number of examinations of the patient's nth electrolyte index is 1; α represents a hyperparameter used to weigh whether to maximize the use of electrolyte data or to retain only one set of electrolyte data in each time period as much as possible. The value range of α is [0,1]. In this embodiment, α is 1; N represents the number of time periods. The number of time periods N is related to the length of the time period l t Related to the length of time the patient stays in the ICU; jn Indicates that when the time period length is l t When , the number of inspections of the nth electrolyte index in the jth time period.

[0061] Step S1.13: Determine the minimum value among the evaluation scores of all the patient's electrolyte indicators in the time period, and use the minimum value as the patient's overall score in the time period.

[0062] Each patient has an assessment score for each electrolyte parameter, so the overall score for each patient over the time period is:

[0063]

[0064] in, Indicates that the i-th patient is in the time period l t The overall score under I Indicates the number of electrolyte indicators. In this embodiment, N I is 8.

[0065] Step S1.14: Change the length of the time period and go to step S1.12 to obtain the patient's time period length l t Overall score under

[0066] Step S1.15: Determine the length of each patient in different time periods l t Overall score under The maximum value among them is used, and the time period length corresponding to the maximum value is taken as the final time period length.

[0067] If the time period is too long, multiple electrolyte tests will be performed in one time period. In fact, only the worst electrolyte test result in the time period will be selected, and other electrolyte test results will be discarded, resulting in the inability to fully utilize the discarded electrolyte data, causing information loss; if the time period is too short, there will be no electrolyte data in some time periods, which will increase the null values ​​in the electrolyte change time series and affect subsequent model training. The present invention uses the evaluation scores under different time period lengths to determine the appropriate time period length, which not only avoids the loss of electrolyte data, but also avoids the appearance of more null values ​​in the electrolyte change time series.

[0068] Step S1.2: construct the initial electrolyte change time series for each patient according to the length of the time period, wherein the initial electrolyte change time series is expressed as:

[0069] P i ={E i1 ,E i2 ,…,E ij ,…,E iN} (6)

[0070]

[0071] Among them, P i represents the initial electrolyte change time series of the i-th patient, E ij represents the electrolyte data of the i-th patient in the j-th time period, st j represents the start time of the jth time period, v jn N represents the detection value of the nth electrolyte index in the jth time period. I Indicates the number of electrolyte indicators, m jn Indicates the number of inspections of the nth electrolyte index in the jth time period.

[0072] The electrolyte data of each patient starts from the time when the patient enters the ICU to the time when the patient leaves the ICU or dies; let the length of the time period be l t (Unit: hour), then from the time the patient enters the ICU, every l tHours is taken as a time period; because each patient stays in the ICU for a different length of time, the number of time periods N corresponding to different patients may be different. If no electrolyte test is performed in a time period, the time period is empty; if only some electrolyte indicators are tested in a time period, the untested electrolyte indicators are missing values; if multiple electrolyte tests are performed in a time period, the worst electrolyte test result in the time period (which refers to the result that deviates the farthest from the normal range) is used as the electrolyte data for the time period.

[0073] Step S1.3: Preprocess the initial electrolyte change time series to obtain the electrolyte change time series for each patient.

[0074] In this embodiment, the initial electrolyte change time series is preprocessed, specifically including checking the data integrity of different electrolyte indicators and processing missing values. Among them, checking the data integrity of different electrolyte indicators specifically includes: first calculating the data integrity of each electrolyte indicator, and then judging whether the data integrity of the electrolyte indicator is less than the integrity threshold. If so, the electrolyte indicator is removed from all initial electrolyte change time series; otherwise, the electrolyte indicator is retained in all initial electrolyte change time series. In this embodiment, the data integrity of each electrolyte indicator is specifically calculated as follows:

[0075]

[0076] Among them, c n Indicates the data completeness of the nth electrolyte indicator, N P represents the total number of all patients in all time periods, e n It represents the number of empty n-th electrolyte indicators of all patients in all time periods. In this embodiment, the integrity threshold is 0.5.

[0077] In a specific embodiment of the present invention, the missing value processing specifically includes:

[0078] Determine whether there are missing values ​​in the electrolyte change time series after checking the data integrity. If so, use the LOCF method (Last Observation Carried Forward) to fill in the missing values.

[0079] Determine whether there are missing values ​​in the electrolyte change time series after one filling. If so, use the NOCB method (Next Observation Carried Backward) to fill in the missing values ​​twice;

[0080] It is determined whether there are missing values ​​in the electrolyte change time series after the secondary filling. If so, the electrolyte change time series of patients with missing values ​​are eliminated to ensure that there are no null values ​​in all electrolyte change time series.

[0081] Step S2: different time thresholds are set according to the survival time prediction range; based on each time threshold, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and its survival time. The time threshold and its number are determined by the survival time prediction range and the survival time prediction accuracy. Different time thresholds include the maximum and minimum values ​​of the survival time prediction range. The higher the survival time prediction accuracy, the smaller the spacing between two adjacent time thresholds. Exemplarily, if the survival time prediction range is 2 hours to 72 hours, the first time threshold is 2 hours, the last time threshold is 72 hours, and 2 hours are added to the first time threshold to obtain the second time threshold, that is, the second time threshold is 4 hours, and so on, to obtain all time thresholds covering the survival time prediction range (i.e., 2 hours, 4 hours, 6 hours, ..., 72 hours). If you want to improve the accuracy of survival time prediction, then reduce the distance between two adjacent time thresholds (i.e., reduce the change in the time threshold). For example, add 1 hour to the first time threshold to obtain the second time threshold, i.e., the second time threshold is 3 hours, and so on, to obtain all time thresholds covering the survival time prediction range (i.e., 2 hours, 3 hours, 4 hours, ..., 72 hours).

[0082] In a specific embodiment of the present invention, based on each time threshold, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and its survival time, specifically including:

[0083] Step S2.1: setting the size of the sliding window; using the movement of the sliding window on the electrolyte change time series, the electrolyte change time series is divided into a plurality of sample data.

[0084] For example, for a patient's electrolyte change time series P i ={E i1 ,E i2 ,…,E ij ,…,E iN}, if the size of the sliding window is 3, the sample data obtained is {E i1 ,E i2 ,E i3}, {E i2 ,E i3 ,E i4}, …, {E iN-2 ,E iN-1 ,E iN}.

[0085] Dividing a patient's electrolyte change time series into multiple sample data greatly increases the number of sample data in the sample data set, which is beneficial to improving the training accuracy of the model.

[0086] Step S2.2: Generate labels for the corresponding sample data according to the time threshold and the survival time of the patient corresponding to each sample data, specifically including:

[0087] Determine whether the survival time of the patient corresponding to the last time period in the sample data is greater than or equal to the time threshold. If so, generate a survival label; otherwise, generate a death label; wherein, the survival time of the patient corresponding to the last time period in the sample data refers to the time from the last time period in the sample data to death. For patients who are confirmed dead, infer how many hours are left for the patient in each time period before the death event occurs based on their time of death; for surviving patients, each time period is deemed to be a very large value away from death, and this large value is much larger than the maximum value of how many hours are left for all patients who are confirmed dead before the death event occurs. At this point, each time period of each patient will have a time away from death, which is the label of the patient's different time periods. For example, such as Figure 2 As shown in the figure, the time period length is 2 hours, the sliding window size is 3, and the red box and the blue box are two sample data. For the sample data in the red box, the survival time corresponding to the last time period of the sample data is 20 hours; for the sample data in the blue box, the survival time corresponding to the last time period of the sample data is 18 hours. Assuming the time threshold at this time is 19 hours, since the survival time corresponding to the last time period in the sample data in the red box is 20 hours, which is greater than the time threshold of 19 hours, the label of the sample data in the red box is the survival label (the corresponding value is 0, a negative sample); since the survival time corresponding to the last time period in the sample data in the blue box is 18 hours, which is less than the time threshold of 19 hours, the label of the sample data in the blue box is the death label (the corresponding value is 1, a positive sample).

[0088] The label of each sample data is different when the time threshold is different.

[0089] Step S2.3: Construct a sample data set corresponding to the time threshold based on all sample data and their labels.

[0090] For each time threshold, a sample data set corresponding to the time threshold can be obtained, so the number of time thresholds is the same as the number of sample data sets. Each sample in the sample data set includes sample data and its label. The sample data set is divided into a training set and a validation set. The training set is used to train the survival prediction model, and the validation set is used to validate the survival prediction model.

[0091] Step S3: Construct a survival prediction model. In this embodiment, the survival prediction model adopts an improved LSTM (Long Short-Term Memory) model. The short-term memory in the original LSTM model is only applicable to time series with regular intervals (i.e., equal intervals), and cannot be applied to time series with irregular intervals (i.e., unequal intervals). In order to overcome the problems of the original LSTM model, the present invention adds a time decay module for short-term memory on the basis of the original LSTM model, so that it can perceive the irregular time intervals in the patient's electrolyte change time series. An LSTM model is composed of a plurality of units with the same structure connected in sequence. Except for the first unit, each unit can receive the memory signal and hidden layer state transmitted by the previous unit. Similar to the original LSTM model, the improved LSTM model of the present invention is composed of a plurality of exactly the same units connected in sequence. The difference between it and the original LSTM model is that a time st is added. j The input and the time decay operation of short-term memory (i.e., formulas (9) to (12)). Each unit with the same structure shares a framework, the mathematical expression of which is:

[0092]

[0093] f t =σ(W f x t +U f h t-1 +b f ) (13)

[0094] i t =σ(W i x t +U i h t-1 +b i ) (14)

[0095] o t =σ(W o x t +U o h t-1 +b o ) (15)

[0096]

[0097] h t =o t *tanh(C t ) (18)

[0098] in, represents the short-term memory of the t-1th unit (i.e., the previous unit), and the superscript S represents short-term; C t-1 represents the sum of the memory of the t-1th unit, which includes the short-term memory and long-term memory of the t-1th unit; represents the attenuated short-term memory of the t-1th unit; g() represents the time attenuation function. The larger the input Δt, the smaller the g(Δt) output is. By attenuating the long-term memory, the influence of past information on the current is reduced; Δt represents the two inputs x t-1 With x t The actual time that passes between them in the physical world; represents the long-term memory of the t-1th unit, and the superscript T indicates long-term; represents the sum of the decayed memory of the t-1th unit, which is obtained by adding the decayed short-term memory and the undecayed long-term memory. Formulas (13) to (18) are consistent with the original LSTM model, and f t 、i t , o t They are the forget gate, input gate, and output gate in the LSTM model. The forget gate is used to forget part of the memory of the previous unit. The input gate is used to control the memory generated by the current unit. The output gate is used to control the output of the current unit (this output is the hidden state of the output rather than the memory). σ represents the sigmoid function. represents candidate memory, x t represents the input of the tth unit (i.e. the current unit), h t-1 and h t denote the hidden state of the t-1th unit and the hidden state of the tth unit, respectively, {W f ,U f ,b f},{W i ,U i ,b i},{W o ,U o ,b o} and {W c ,U c ,b c} respectively represent the neural network parameter matrices of the forget gate, input gate, output gate and candidate memory; {W d ,b d} represents the sub-matrices decomposed from the neural network parameter matrix. The dimensions of these matrices depend on the dimensions of the input, output and the dimensions of the preset hidden parameters.

[0099] Formulas (9) to (18) are a unit of the LSTM model. In addition to multiple units with the same structure, the improved LSTM model also includes an input layer and an output layer. Figure 3As shown, the circular or oval box represents matrix dot multiplication or matrix addition, the arrow represents the back propagation direction, the merging of arrows represents the concatenation of matrices, and the separation of arrows represents the copying of matrices.

[0100] Step S4: Use each sample data set to train and verify the survival prediction model to obtain a target prediction model corresponding to the time threshold.

[0101] Exemplarily, a first sample data set is constructed according to a first time threshold, and the survival prediction model is trained and verified using the first sample data set, thereby obtaining a target prediction model corresponding to the first time threshold; a second sample data set is constructed according to a second time threshold, and the survival prediction model is trained and verified using the second sample data set, thereby obtaining a target prediction model corresponding to the second time threshold; and so on, obtaining multiple target prediction models corresponding to different time thresholds. The number of time thresholds is the same as the number of target prediction models.

[0102] For each sample data set, the structure and training method of the survival prediction model are not changed. When the improved LSTM model is trained using each sample data set, the training termination condition is:

[0103] (Accuracy≥0.8*f(η))∩(AUC≥0.8*g(η))∩(Recall≥0.7*h(η)) (19)

[0104] Where Accuracy represents accuracy, AUC represents the area under the ROC curve, Recall represents the recall rate, f, g, and h represent optional time decay functions, and η represents the time threshold (for example, the time threshold is 19 hours, which means that you want to predict the patient's survival after 19 hours). The calculation formula for the area under the ROC curve AUC is:

[0105]

[0106] Among them, N T Represents the number of positive samples, N N Indicates the number of negative samples; rank i It means sorting the scores of all predicted samples by the model from small to large and then labeling the i-th score from 1. The closer the score is to 1, the greater the probability that the model thinks the sample is a positive sample. The closer the score is to 0, the greater the probability that the model thinks the sample is a negative sample. positiveClass represents the positive class.

[0107] The calculation formula of recall rate Recall is:

[0108]

[0109] Among them, TP represents the number of correctly predicted positive samples, and FN represents the number of positive samples predicted as negative samples.

[0110] Since the time threshold η of this embodiment is relatively small, the time decay function is set as:

[0111]

[0112] The training termination condition can be obtained as follows:

[0113] (Accuracy ≥ 0.765) ∩ (AUC ≥ 0.765) ∩ (Recall ≥ 0.616) (24)

[0114] The actual accuracy, AUC and Recall of the target prediction model obtained through training in this embodiment are 0.795, 0.766 and 0.624, all of which achieve good results.

[0115] Step S5: Obtain the electrolyte test data of the patient to be predicted, use all target prediction models to perform survival prediction on the electrolyte test data, and obtain the survival results of the patient under different time thresholds.

[0116] The electrolyte test data of the patient to be predicted can be the result of multiple tests or a single test. When it is a single test result, the length of the corresponding electrolyte change time series is 1, that is, there is only one time period and the start time of the time period is the test time of the electrolyte test data.

[0117] Step S6: Determine the patient's survival time according to the patient's survival results under different time thresholds.

[0118] The target prediction model can predict whether the patient will live or die at the corresponding time threshold. Therefore, the patient's survival time can be determined based on the patient's survival results at different time thresholds.

[0119] Exemplarily, the patient's survival results are predicted at time thresholds of 2 hours, 4 hours, 6 hours, 8 hours and 10 hours, respectively. The survival result at the time threshold of 2 hours is life, the survival result at the time threshold of 4 hours is life, the survival result at the time threshold of 6 hours is life, the survival result at the time threshold of 8 hours is death, and the survival result at the time threshold of 10 hours is death. It can be determined that the patient's survival time is at least 6 hours.

[0120] An embodiment of the present invention also provides a system for predicting critical illness survival time based on patient electrolyte imbalance, the system comprising: a memory, a processor, and a computer program / instructions stored in the memory, the processor executes the computer program / instructions to implement the method for predicting critical illness survival time based on patient electrolyte imbalance as described above.

[0121] Although not shown, the system includes a processor, which can perform various appropriate operations and processes according to the program and / or data stored in the read-only memory (ROM) or the program and / or data loaded from the storage portion into the random access memory (RAM). The processor can be a multi-core processor, or it can include multiple processors. In some embodiments, the processor can include a general main processor and one or more special coprocessors, such as a central processing unit, a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM, various programs and data required for system operation are also stored. The processor, ROM and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus.

[0122] The processor and the memory are used together to execute the program / instructions stored in the memory. When the program / instructions are executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.

[0123] Although not shown, an embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the method for predicting critical illness survival time based on electrolyte imbalance of a patient as described above.

[0124] Readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0125] Although not shown, an embodiment of the present invention further provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements the method for predicting critical illness survival time based on electrolyte imbalance of a patient as described above.

[0126] What is disclosed above is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention, which should be covered within the protection scope of the present invention.

Claims

1. A critical illness survival time prediction model training method based on electrolyte imbalance, characterized in that: The training method comprises the following steps: Obtaining electrolyte data of different patients, and constructing an electrolyte change time series for each patient based on the electrolyte data; wherein the electrolyte change time series includes the detection value and the number of examinations of each electrolyte index in different time periods; Different time thresholds are set according to the predicted range of survival time; based on each of the time thresholds, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and the survival time; Constructing a survival prediction model; The survival prediction model is trained and verified using each sample data set to obtain a target prediction model corresponding to the time threshold.

2. The method for training a critical illness survival time prediction model based on electrolyte imbalance according to claim 1, characterized in that: Constructing the electrolyte change time series of each patient according to the electrolyte data, specifically including: Determine the length of the time period; According to the length of the time period, an initial electrolyte change time series of each patient is constructed, and the initial electrolyte change time series is expressed as: P i ={And i1 ,AND i2 ,…,AND ij ,…,AND iN }; Among them, P i represents the initial electrolyte change time series of the i-th patient, N represents the number of time periods, E ij represents the electrolyte data of the i-th patient in the j-th time period, st j represents the start time of the jth time period, v jn N represents the detection value of the nth electrolyte index in the jth time period. I Indicates the number of electrolyte indicators, m jn represents the number of inspections of the nth electrolyte index in the jth time period; The initial electrolyte change time series is preprocessed to obtain the electrolyte change time series.

3. The method for training a critical illness survival time prediction model based on electrolyte imbalance according to claim 2, characterized in that: Determine the length of the time period, including: Set the initial value of the time period length; For each patient, the evaluation score of each electrolyte index in the time period was calculated. The specific calculation formula is: in, Indicates that when the time period length is l t When , the patient's nth electrolyte index assessment score; Indicates that when the time period length is l t When , the number of times the patient's nth electrolyte index is checked in all time periods; Indicates that when the time period length is l t The number of time periods in which the number of examinations of the patient's nth electrolyte index is 0; Indicates that when the time period length is l t When , the number of time periods in which the number of examinations of the patient's nth electrolyte index is 1; α represents a hyperparameter, and its value range is [0,1]; determining a minimum value among the evaluation scores of all electrolyte indicators of the patient at the length of the time period, and taking the minimum value as the overall score of the patient at the length of the time period; The length of the time period is changed, and the steps of calculating the evaluation score of each electrolyte index under the time period length are repeated to obtain the overall score of the patient under different time period lengths; The maximum value of the overall scores of the patient at different time period lengths is determined, and the time period length corresponding to the maximum value is used as the final time period length.

4. The method for training a critical illness survival time prediction model based on electrolyte imbalance according to claim 1, characterized in that: The electrolyte indicators include sodium ions, potassium ions, calcium ions, magnesium ions, chloride ions, phosphate ions, bicarbonate ions, and pH value which measures the acidity and alkalinity of the blood.

5. The method for training a critical illness survival time prediction model based on electrolyte imbalance according to claim 1, characterized in that: Based on each of the time thresholds, a sample data set corresponding to the time threshold is constructed according to the electrolyte change time series of each patient and the survival time thereof, specifically including: Setting the size of the sliding window; dividing the electrolyte change time series into a plurality of sample data by moving the sliding window on the electrolyte change time series; Generate a label corresponding to the sample data according to the time threshold and the survival time of the patient corresponding to each sample data; A sample data set corresponding to the time threshold is constructed according to all sample data and their labels.

6. The method for training a critical illness survival time prediction model based on electrolyte imbalance according to claim 5, characterized in that: Generating a label of the corresponding sample data according to the time threshold and the survival time of the patient corresponding to each sample data specifically includes: Determine whether the survival time of the patient corresponding to the last time period in the sample data is greater than or equal to the time threshold, and if so, generate a survival label; otherwise, generate a death label; The survival time of the patient corresponding to the last time period in the sample data refers to the time from the last time period in the sample data to death.

7. The method for training a critical illness survival time prediction model based on electrolyte disorder according to any one of claims 1 to 6, characterized in that: The survival prediction model adopts an improved LSTM model. The improved LSTM model is based on the original LSTM model and adds a time decay module for short-term memory. The time decay module is used to convert the memory sum of the previous unit into the memory sum after decay processing according to the additional time input and the time decay function. The specific expression is: in, represents the short-term memory of the t-1th unit; C t-1 represents the memory sum of the t-1th unit; W d represents the weight matrix; b d represents the bias parameter; represents the decayed short-term memory of the t-1th unit; g() represents the time decay function; Δt represents the two inputs x t-1 With x t The actual time that passes between them in the physical world; represents the long-term memory of the t-1th unit; Represents the decayed memory sum of the t-1th unit.

8. A critical illness survival time prediction model training system based on electrolyte disorder, comprising a memory, a processor, and a computer program / instruction stored in the memory, characterized in that: The processor executes the computer program / instructions to implement the critical illness survival time prediction model training method based on electrolyte disorder according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the critical illness survival time prediction model training method based on electrolyte disorder according to any one of claims 1 to 7 is implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the critical illness survival time prediction model training method based on electrolyte disorder according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Application of SAPS II disease criticality scoring system in prognosis judgment of old patients with senile acute kidney injury

    CN112259217A

  • Application of peripheral blood EPCs as marker for predicting survival time of old and old people

    CN113640516A

  • Critical disease survival probability prediction model training and prediction method

    CN116759098A

  • Medical monitor system, control method therefor and program storage medium

    JP2002336352A