Artificial intelligence-based prediction method and system for hospitalization time of intensive care patients
By selecting the optimal dynamic prediction model through leave-one-out cross-validation and incremental learning, and combining an improved long short-term memory network and a medical knowledge graph, the problem of insufficient model generalization ability in existing technologies is solved, enabling real-time and accurate prediction of hospitalization time for critically ill patients and supporting medical decision-making.
Patent Information
- Application Number
- CN202311734743.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2043-12-18
AI Technical Summary
Existing methods for model evaluation and selection in time series forecasting are biased, failing to accurately assess the model's generalization ability. Predictive models cannot utilize the latest information in real time, resulting in prediction results that fail to reflect the patient's current state and cannot dynamically adapt to new sample data.
An AI-based approach is employed to select the optimal dynamic prediction model through leave-one-out cross-validation. Incremental training is performed as the condition of critically ill patients changes. Dynamic prediction is achieved by combining an improved long short-term memory network and a medical knowledge graph, and the model is updated in real time to reflect the patient's status.
It improves the model's generalization ability and prediction accuracy, enables it to adapt to changes in patients' conditions in real time, provides real-time intelligent decision support, reduces repeated training time and computational resources, and enhances the model's adaptability and interpretability.
Smart Images

Figure CN118016285B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of time prediction, and in particular, to a method and system for predicting the hospitalization time of intensive care patients based on artificial intelligence. Background Art
[0002] The intensive care unit is the last line of defense for saving lives, and the resources therein, such as beds and medical staff, are extremely valuable. Severely ill patients suffer tremendous pain, and the cost of treatment is also very high. If the hospital stay is too long, it will not only increase the risk of infection for the patient, but also occupy precious medical resources; if the hospital stay is too short, the patient will not be adequately treated, and the hidden dangers of the disease will still exist. Therefore, accurately predicting the patient's hospital stay is crucial to improving the hospital's emergency response capabilities and bed management efficiency, which can save more lives to the greatest extent possible.
[0003] With the improvement of medical informationization, various electronic medical record systems are recording and collecting patients' diagnosis and treatment data. These rich data containing time information make it possible to establish an intelligent hospital stay prediction model. By analyzing these time series data, doctors can more accurately judge the changes in patients' conditions and provide a basis for intensive care treatment decisions.
[0004] However, the model evaluation and selection methods used in the prior art for time series prediction are biased and cannot accurately evaluate the generalization ability of the model. The prediction model cannot use the latest information for prediction in real time, resulting in the prediction results being difficult to reflect the patient's current status and unable to dynamically adapt to new sample data. When the patient undergoes major changes, the entire model needs to be retrained, resulting in long training time and easy forgetting of learned knowledge. The verification and correction mechanism for the model's prediction results cannot guarantee prediction accuracy.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] In order to overcome the above problems, the present invention aims to propose an artificial intelligence-based method and system for predicting the length of stay of intensive care patients, with the aim of solving the problems in the prior art of model evaluation and selection methods for time series prediction, which are biased, unable to accurately evaluate the generalization ability of the model, and the inability of the prediction model to use the latest information for prediction in real time.
[0007] To this end, the specific technical solution adopted by the present invention is as follows:
[0008] According to one aspect of the present invention, a method for predicting the hospitalization time of intensive care patients based on artificial intelligence is provided, and the method for predicting the hospitalization time of intensive care patients comprises the following steps:
[0009] S1. Collect clinical data of patients in intensive care;
[0010] S2. Build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models;
[0011] S3, using leave-one-out cross validation to train multiple dynamic prediction models and select the best dynamic prediction model;
[0012] S4. When the condition of a critically ill patient changes significantly, the best dynamic prediction model is incrementally trained using the latest time series data;
[0013] S5. At each prediction time point, use the current information as the input of the optimal dynamic prediction model, perform dynamic prediction, and output the expected hospitalization days for critically ill patients;
[0014] S6. Use the expected hospital stay as a reference, and review the prediction results in combination with the medical knowledge graph to output the final hospital stay prediction for critically ill patients;
[0015] S7. Based on the newly collected critically ill patients’ admission data and follow-up data, iteratively train and optimize the optimal dynamic prediction model.
[0016] Optionally, training multiple dynamic prediction models using leave-one-out cross validation and selecting the best dynamic prediction model includes the following steps:
[0017] S31. Obtain clinical data of patients in intensive care, including physiological parameters and medical records at different time points;
[0018] S32. Clean clinical data and build multiple dynamic prediction models;
[0019] S33, each time one sample is set aside from the clinical data as a validation set, and the remaining samples are used to train the model;
[0020] S34, for each dynamic prediction model, calculating the prediction error of the samples in the reserved validation set;
[0021] S35, repeating steps S33 to S34 until each sample is used as a validation set once, and obtaining an average prediction error of each dynamic prediction model;
[0022] S36, comparing average prediction errors of different dynamic prediction models, and selecting the dynamic prediction model with the smallest error as the best dynamic prediction model;
[0023] S37. Use all the training data to retrain the selected best model as the final dynamic prediction model.
[0024] Optionally, for each dynamic prediction model, calculating its prediction error of samples in the held-out validation set includes the following steps:
[0025] S341, for each sample in the training set, use it as a validation set in turn, and the remaining samples as training sets;
[0026] S342, training a dynamic prediction model using a training set to obtain a model function;
[0027] S343. For the samples in the validation set, use the model function to predict the output at the k+1th time point based on the data at the k time points before the sample;
[0028] S344, calculating the error between the predicted output and the actual output;
[0029] S345, repeating steps S343 to S344 for all samples in the validation set, and calculating the average prediction error;
[0030] S346, all samples in the training set are verified as validation sets, and the average error of each round of verification is calculated;
[0031] Among them, the formula for calculating the error between the predicted output and the actual output is:
[0032]
[0033] In the formula, y pred Predict output values for dynamic prediction models;
[0034] y ture is the true output value of the sample;
[0035] MSE is the average of the squared prediction errors for each sample;
[0036] n is the sample size.
[0037] Optionally, when a critically ill patient's condition undergoes a significant change, incremental training of the best dynamic prediction model using the latest time series data includes the following steps:
[0038] S41. Monitor the physiological parameters and condition of critically ill patients to determine whether there are significant changes in their condition;
[0039] S42. If the condition changes significantly, collect the latest time series data for the time period of the condition change;
[0040] S43, merging the latest time series data with the original training data to obtain an updated training data set, and preprocessing the updated training data set;
[0041] S44, based on the preprocessed training data set, using incremental learning to train the best dynamic prediction model;
[0042] S45, freezing the original parameters of the best dynamic prediction model, and training the newly added parameters;
[0043] S46. Calculate the performance of the best dynamic prediction model after incremental training on the validation set;
[0044] S47. If the verification performance is improved, the best dynamic prediction model after incremental training is saved as the final model.
[0045] Optionally, based on the preprocessed training data set, training the optimal dynamic prediction model using incremental learning includes the following steps:
[0046] S441, initializing the dynamic prediction model using the preprocessed training data set;
[0047] S442, using an incremental learning method to train the newly introduced parameters while keeping the existing model parameters unchanged;
[0048] S443. Develop a gradually changing learning rate strategy to serve the training of new parameters;
[0049] S444, determining the number of iterations of the training process, and making appropriate adjustments to the model to prevent overfitting to new data, and evaluating the performance of the model on the validation set;
[0050] S445. When the performance cannot be further improved, stop training to obtain a dynamic prediction model optimized by incremental learning.
[0051] Optionally, at each prediction time point, using the information at the current moment as the input of the optimal dynamic prediction model, and performing dynamic prediction, outputting the expected hospitalization days of critically ill patients includes the following steps:
[0052] S51. Obtain clinical information of critically ill patients at the current moment;
[0053] S52, performing wavelet transform denoising on the time series data of clinical information;
[0054] S53, using an improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model, ensuring that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment;
[0055] S54. Use the hidden layer of the improved long short-term memory network to associate current information with past information and learn time-dependent features;
[0056] S55, using the output layer of the optimal dynamic prediction model, predicting the expected hospitalization days of the patient at the current moment according to the learned time-dependent features;
[0057] S56, providing the prediction results to the treating physician, making a decision based on the prediction results, and revising the prediction results;
[0058] S57. Collect the actual hospital stay days of the patients, calculate the prediction error of the best dynamic prediction model, and continuously optimize the best dynamic prediction model based on the prediction error.
[0059] Optionally, using an improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model, ensuring that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment includes the following steps:
[0060] S531, arranging the time series data after wavelet transform denoising into a format suitable for input into the model;
[0061] S532, select the improved long short-term memory network as the best dynamic prediction model;
[0062] S533, inputting the sorted time series data into the input layer of the optimal dynamic prediction model;
[0063] S534, the input layer of the optimal dynamic prediction model receives the time series data and transmits the time series data to the hidden layer;
[0064] S535. During the training of the optimal dynamic prediction model, if it is found that there is a problem with the format of the input data, return to step S531, and perform further data cleaning on the data before conducting model training.
[0065] Optionally, using the output layer of the optimal dynamic prediction model, predicting the expected hospitalization days of the patient at the current moment according to the learned time-dependent features includes the following steps:
[0066] S551, preprocessing the time series data at the current moment, and then inputting the preprocessed data into the input layer of the optimal dynamic prediction model;
[0067] S552, the input layer of the optimal dynamic prediction model receives the time series data and passes it to the hidden layer, in which the input data is mathematically transformed according to the preset weights and bias values, so as to learn the time-dependent characteristics of the data;
[0068] S553, the hidden layer transmits the processed data to the output layer, and the output layer generates a predicted value of the expected hospitalization days of the patient at the current moment according to the output of the hidden layer and its own weight and bias value;
[0069] S554, the output layer will generate a prediction value. If the best dynamic prediction model is a binary or multi-class prediction, the output result is a probability distribution;
[0070] If the model is designed to make continuous value predictions, the output will be a continuous value;
[0071] S555. Compare the predicted results with the actual results, and evaluate the prediction accuracy of the model by calculating the size of the prediction error. If the prediction accuracy is insufficient, adjust the parameters of the optimal dynamic prediction model.
[0072] Optionally, the expected hospital stay is used as a reference, and the prediction results are reviewed in combination with the medical knowledge graph. The final hospital stay prediction for critically ill patients includes the following steps as output:
[0073] S61. Obtaining the expected hospitalization days of the patient based on the optimal dynamic prediction model;
[0074] S62. In the medical knowledge graph, query the information of the patient's disease, symptoms and treatment methods, and obtain the correlation data between the information and the number of hospitalization days;
[0075] S63, comparing the expected length of hospital stay with the data obtained from the medical knowledge graph;
[0076] S64. According to the comparison and review results, the expected length of stay in hospital is adjusted to generate the final prediction result of length of stay in hospital.
[0077] According to another aspect of the present invention, there is also provided an artificial intelligence-based system for predicting hospitalization time of intensive care patients, the system comprising: a data acquisition module, a model building module, a model selection module, a model incremental learning module, a dynamic prediction module, a result correction module and a model optimization module;
[0078] The data acquisition module is connected to the model selection module through the model construction module, the model selection module is connected to the dynamic prediction module through the model incremental learning module, and the dynamic prediction module is connected to the model optimization module through the result correction module;
[0079] a data acquisition module to collect clinical data from critical care patients;
[0080] A model building module is used to build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models;
[0081] A model selection module, used to train multiple dynamic prediction models using leave-one-out cross-validation and select the best dynamic prediction model;
[0082] The model incremental learning module is used to incrementally train the best dynamic prediction model using the latest time series data when the condition of critically ill patients undergoes significant changes;
[0083] The dynamic prediction module is used to use the current information as the input of the optimal dynamic prediction model at each prediction time point, and to perform dynamic prediction and output the expected hospitalization days for critically ill patients;
[0084] The result correction module is used to review the predicted results by taking the expected hospitalization days as a reference and combining it with the medical knowledge graph to output the final hospitalization days prediction for critically ill patients;
[0085] The model optimization module is used to iteratively train and optimize the best dynamic prediction model based on the newly collected critically ill patients' admission data and follow-up data.
[0086] Compared with the prior art, this application has the following beneficial effects:
[0087] 1. The leave-one-out cross-validation of the present invention can well evaluate the generalization ability of the time series model, provide an unbiased model selection criterion, and help select the best dynamic prediction model. Incremental learning allows the model to be updated when new data arrives without retraining from scratch, and can quickly adapt to the latest environmental changes. The leave-one-out cross-validation repeats multiple rounds of validation and calculates the average index, which can more reliably evaluate the generalization performance of the model. Incremental learning only trains new parameters and fixes existing parameters, which can avoid forgetting learned knowledge and improve learning efficiency.
[0088] 2. The present invention adopts means such as gradually decaying the learning rate and controlling the number of training rounds to avoid overfitting of incremental learning to new data, calculates the validation set indicators to determine whether the model has truly improved the generalization ability, and controls the quality of incremental learning. The combination of the two methods can not only select the optimal model, but also make the model dynamically adapt to new data, comprehensively improve the prediction ability of the model, reduce repeated training and calculation, and is more suitable for actual incremental data environments.
[0089] 3. The present invention uses the latest information as the model input, which can monitor and reflect the latest status of the patient in real time. Wavelet transform preprocessing can improve the quality of input data. The improved long short-term memory network structure learns time dependence and provides memory capacity for dynamic prediction. Different output layer formats are designed to adapt to different prediction tasks. The prediction error is calculated and the parameters of the model are adjusted to achieve dynamic optimization of the model. Doctors make decisions based on the prediction results to make the results more explainable. Continuous retraining with new data can adapt the model to the latest environment. The dynamic prediction method does not require retraining of the entire model and is more efficient. Compared with static prediction, dynamic prediction can provide real-time intelligent decision support.
[0090] 4. The knowledge graph of the present invention provides structured medical knowledge, which can identify unreasonable situations in the prediction results and improve the accuracy of the results. The empirical knowledge contained in the knowledge graph can make up for the limitations of the model and make the results more in line with medical practice. The model gives quantitative predictions, which can make up for the incompleteness of the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] The above characteristics, features and advantages of the present invention and their implementation methods and methods will become more clearly understood in conjunction with the following description of the embodiments, which are described in detail in conjunction with the accompanying drawings. Herein, a schematic diagram is shown:
[0092] Figure 1 is a flow chart of a method for predicting hospital stay of intensive care patients based on artificial intelligence according to an embodiment of the present invention;
[0093] Figure 2 It is a principle block diagram of an artificial intelligence-based intensive care patient hospitalization time prediction system according to an embodiment of the present invention.
[0094] In the figure:
[0095] 1. Data acquisition module; 2. Model building module; 3. Model selection module; 4. Model incremental learning module; 5. Dynamic prediction module; 6. Result correction module; 7. Model optimization module. DETAILED DESCRIPTION
[0096] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0097] According to an embodiment of the present invention, a method and system for predicting the hospitalization time of intensive care patients based on artificial intelligence are provided.
[0098] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a method for predicting the hospitalization time of intensive care patients based on artificial intelligence is provided, and the method for predicting the hospitalization time of intensive care patients comprises the following steps:
[0099] S1. Collect clinical data of patients in intensive care.
[0100] It should be explained that the collection of clinical data should be as comprehensive and detailed as possible, including structured data such as physiological parameter monitoring and medical records, as well as semi-structured or unstructured data such as medical images and clinical notes. Data collection needs to cover patients of different age groups and different disease spectra to avoid sample distribution bias. At the same time, sufficient sample data should be collected to build a stable prediction model. Data collection requires the support of hospital information systems, and data needs to be de-identified to protect patient privacy. A standardized medical data format should be used to facilitate data integration between different systems.
[0101] S2. Build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models.
[0102] It needs to be explained that to build an efficient and interpretable dynamic prediction model based on deep learning, it is necessary to consider selecting a suitable network structure, tuning model hyperparameters, conducting targeted feature engineering, using model integration to improve robustness, using incremental learning mechanisms for dynamic updates, and taking methods such as leave-one-out cross-validation to evaluate the generalization ability of the model, and performing deployment optimization such as model compression and quantization. At the same time, adding attention mechanisms to provide predictive interpretability for the model. By comprehensively considering these factors, we can give full play to the advantages of deep learning and build an accurate, efficient, and interpretable dynamic prediction model.
[0103] S3. Use leave-one-out cross validation to train multiple dynamic prediction models and select the best dynamic prediction model.
[0104] Preferably, training multiple dynamic prediction models using leave-one-out cross validation and selecting the best dynamic prediction model comprises the following steps:
[0105] S31. Obtain clinical data of patients in intensive care, including physiological parameters and medical records at different time points;
[0106] S32. Clean clinical data and build multiple dynamic prediction models;
[0107] S33, each time one sample is set aside from the clinical data as a validation set, and the remaining samples are used to train the model;
[0108] S34, for each dynamic prediction model, calculating the prediction error of the samples in the reserved validation set;
[0109] S35, repeating steps S33 to S34 until each sample is used as a validation set once, and obtaining an average prediction error of each dynamic prediction model;
[0110] S36, comparing average prediction errors of different dynamic prediction models, and selecting the dynamic prediction model with the smallest error as the best dynamic prediction model;
[0111] S37. Use all the training data to retrain the selected best model as the final dynamic prediction model.
[0112] Preferably, for each dynamic prediction model, calculating the prediction error of the samples in the reserved validation set includes the following steps:
[0113] S341, for each sample in the training set, use it as a validation set in turn, and the remaining samples as training sets;
[0114] S342, training a dynamic prediction model using a training set to obtain a model function;
[0115] S343. For the samples in the validation set, use the model function to predict the output at the k+1th time point based on the data at the k time points before the sample;
[0116] Specifically, select a sample in the validation set and a specified time point k. Make sure that the sample has data for at least k+1 time points, and extract the data corresponding to the first k time points from the sample. These data will be used as inputs to the model function, and the extracted input data will be input into the model function. The model function will perform calculations based on these inputs, and obtain the predicted value from the model function. This predicted value represents the output of the model predicted k+1th time point, which is compared with the actual output of the sample at the k+1th time point to determine the accuracy of the prediction.
[0117] S344, calculating the error between the predicted output and the actual output;
[0118] S345, repeating steps S343 to S344 for all samples in the validation set, and calculating the average prediction error;
[0119] S346, all samples in the training set are verified as validation sets, and the average error of each round of verification is calculated;
[0120] Among them, the formula for calculating the error between the predicted output and the actual output is:
[0121]
[0122] In the formula, y pred Predict output values for dynamic prediction models;
[0123] y ture is the true output value of the sample;
[0124] MSE is the average of the squared prediction errors for each sample;
[0125] n is the sample size.
[0126] It needs to be explained that leave-one-out cross-validation is used to evaluate the generalization ability of the model. In the time series prediction task, due to the time dependence between the data, the training set and the test set cannot be randomly divided. Leave-one-out cross-validation can effectively use time series data to evaluate the model effect. In the implementation process, it is necessary to pay attention to the order of samples. One sample is left out each time as the validation set, and the rest are used as the training set. At the same time, multiple rounds of verification should be repeated until each sample has been verified. Finally, the average index of each round of verification is calculated to evaluate the effect of different models. Compared with traditional cross-validation, leave-one-out cross-validation can provide unbiased estimates and more accurately evaluate the generalization ability of time series models, but the amount of calculation is large and the model needs to be repeatedly trained. You can consider using mechanisms such as incremental learning to optimize it. In short, leave-one-out cross-validation is suitable for model evaluation of time series problems. It can well evaluate the predictive ability of dynamic prediction models for unseen data and provide an unbiased model selection standard, but you need to pay attention to the amount of calculation and adopt mechanisms such as incremental learning to improve efficiency.
[0127] S4. When there is a significant change in the condition of a critically ill patient, use the latest time series data to perform incremental training on the best dynamic prediction model.
[0128] Preferably, when a critically ill patient's condition undergoes a significant change, incremental training of the optimal dynamic prediction model using the latest time series data includes the following steps:
[0129] S41. Monitor the physiological parameters and condition of critically ill patients to determine whether there are significant changes in their condition;
[0130] S42. If the condition changes significantly, collect the latest time series data for the time period of the condition change;
[0131] S43, merging the latest time series data with the original training data to obtain an updated training data set, and preprocessing the updated training data set;
[0132] S44, based on the preprocessed training data set, using incremental learning to train the best dynamic prediction model;
[0133] S45, freezing the original parameters of the best dynamic prediction model, and training the newly added parameters;
[0134] S46. Calculate the performance of the best dynamic prediction model after incremental training on the validation set;
[0135] S47. If the verification performance is improved, the best dynamic prediction model after incremental training is saved as the final model.
[0136] Preferably, based on the preprocessed training data set, training the optimal dynamic prediction model using incremental learning includes the following steps:
[0137] S441, initializing the dynamic prediction model using the preprocessed training data set;
[0138] S442, using an incremental learning method to train the newly introduced parameters while keeping the existing model parameters unchanged;
[0139] S443. Develop a gradually changing learning rate strategy to serve the training of new parameters;
[0140] S444, determining the number of iterations of the training process, and making appropriate adjustments to the model to prevent overfitting to new data, and evaluating the performance of the model on the validation set;
[0141] S445. When the performance cannot be further improved, stop training to obtain a dynamic prediction model optimized by incremental learning.
[0142] It needs to be explained that incremental learning allows the prediction model to adapt to new data without retraining from scratch, and can effectively utilize previously learned knowledge. When the condition of critically ill patients changes, incremental learning is used to update the model, which can quickly integrate the latest time series data and improve the model's adaptability. Specifically, incremental learning will fix the original parameters of the model, only train the newly added parameters, and adopt a gradually decaying learning rate strategy. At the same time, it is necessary to control the number of training rounds to avoid overfitting new data. New data is usually small and it is easy to overfit. Evaluating the performance of the model on the validation set can determine whether the model has truly improved its generalization ability. Compared with completely retraining the model, incremental learning can greatly reduce training time and computing resources, but attention should be paid to the use of validation sets. The validation sets in the incremental learning process cannot be used for model selection. Overall, incremental learning enables dynamic prediction models to effectively use new data for self-optimization and adapt to environmental changes.
[0143] S5. At each prediction time point, the current information is used as the input of the optimal dynamic prediction model, and dynamic prediction is performed to output the expected number of hospital stays for critically ill patients.
[0144] Preferably, at each prediction time point, the information at the current moment is used as the input of the optimal dynamic prediction model, and dynamic prediction is performed to output the expected hospitalization days of critically ill patients, including the following steps:
[0145] S51. Obtain clinical information of critically ill patients at the current moment;
[0146] S52, performing wavelet transform denoising on the time series data of clinical information;
[0147] S53, using an improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model, ensuring that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment;
[0148] S54. Use the hidden layer of the improved long short-term memory network to associate current information with past information and learn time-dependent features;
[0149] S55, using the output layer of the optimal dynamic prediction model, predicting the expected hospitalization days of the patient at the current moment according to the learned time-dependent features;
[0150] S56, providing the prediction results to the treating physician, making a decision based on the prediction results, and revising the prediction results;
[0151] S57. Collect the actual hospital stay days of the patients, calculate the prediction error of the best dynamic prediction model, and continuously optimize the best dynamic prediction model based on the prediction error.
[0152] Preferably, using an improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model, and ensuring that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment includes the following steps:
[0153] S531, arranging the time series data after wavelet transform denoising into a format suitable for input into the model;
[0154] S532, select the improved long short-term memory network as the best dynamic prediction model;
[0155] S533, inputting the sorted time series data into the input layer of the optimal dynamic prediction model;
[0156] S534, the input layer of the optimal dynamic prediction model receives the time series data and transmits the time series data to the hidden layer;
[0157] S535. During the training of the optimal dynamic prediction model, if it is found that there is a problem with the format of the input data, return to step S531, and perform further data cleaning on the data before conducting model training.
[0158] Preferably, using the output layer of the optimal dynamic prediction model, predicting the expected hospitalization days of the patient at the current moment according to the learned time-dependent features includes the following steps:
[0159] S551, preprocessing the time series data at the current moment, and then inputting the preprocessed data into the input layer of the optimal dynamic prediction model;
[0160] S552, the input layer of the optimal dynamic prediction model receives the time series data and passes it to the hidden layer, in which the input data is mathematically transformed according to the preset weights and bias values, so as to learn the time-dependent characteristics of the data;
[0161] S553, the hidden layer transmits the processed data to the output layer, and the output layer generates a predicted value of the expected hospitalization days of the patient at the current moment according to the output of the hidden layer and its own weight and bias value;
[0162] S554, the output layer will generate a prediction value. If the best dynamic prediction model is a binary or multi-class prediction, the output result is a probability distribution;
[0163] If the model is designed to make continuous value predictions, the output will be a continuous value;
[0164] S555. Compare the predicted results with the actual results, and evaluate the prediction accuracy of the model by calculating the size of the prediction error. If the prediction accuracy is insufficient, adjust the parameters of the optimal dynamic prediction model.
[0165] It needs to be explained that dynamic prediction uses the latest information at the current moment as model input, which can realize real-time monitoring and response to changes in the disease. Compared with the initial prediction, dynamic prediction can better reflect the patient's current condition. To realize dynamic prediction, it is necessary to pay attention to the real-time data preprocessing to ensure that the input data is in the correct format. At the same time, the model structure needs to include memory capabilities and learn the time dependence of data. Improved long and short-term memory networks and other structures can meet this requirement. The prediction process should consider different output forms, such as classification or regression, and design the corresponding output layer. At the same time, it is necessary to evaluate the prediction effect, calculate the error index, and adjust the model parameters accordingly to achieve dynamic optimization of the model. Compared with static models, dynamic prediction models can continuously use new data to improve themselves, combine with clinical practice without time difference, and provide timely intelligent support for medical decision-making, but it is necessary to control the frequency of model updates to prevent excessive sensitivity.
[0166] S6. Take the expected length of hospital stay as a reference, and review the prediction results in combination with the medical knowledge graph, as the output of the final prediction of the length of hospital stay for critically ill patients.
[0167] Preferably, the expected hospital stay is used as a reference, and the prediction results are reviewed in combination with the medical knowledge graph, and the final hospital stay prediction of the critically ill patient is output as the following steps:
[0168] S61. Obtaining the expected hospitalization days of the patient based on the optimal dynamic prediction model;
[0169] S62. In the medical knowledge graph, query the information of the patient's disease, symptoms and treatment methods, and obtain the correlation data between the information and the number of hospitalization days;
[0170] S63, comparing the expected length of hospital stay with the data obtained from the medical knowledge graph;
[0171] S64. According to the comparison and review results, the expected length of stay in hospital is adjusted to generate the final prediction result of length of stay in hospital.
[0172] It needs to be explained that the medical knowledge graph organizes and stores structured medical knowledge in the form of a knowledge graph, which includes information on symptoms, drugs, treatments, and their relationships. Combining it with the model prediction results can give full play to their respective advantages. The knowledge graph provides standardized medical knowledge and can identify unreasonable situations in the prediction results. At the same time, the empirical knowledge it contains can make up for the shortcomings of the model, and the model gives quantitative predictions to make up for incomplete knowledge. Specifically, the knowledge graph can be queried to obtain relevant knowledge of the patient, and compared with the model results to determine whether the model prediction is consistent with medical common sense. If there is a deviation, the result needs to be adjusted. Compared with directly using model predictions, combining the knowledge graph to correct the results can improve the accuracy and interpretability of the prediction and make the results more in line with the needs of medical practice. However, it is necessary to build a high-quality knowledge graph and design a reasonable comparison and correction mechanism.
[0173] S7. Based on the newly collected critically ill patients’ admission data and follow-up data, iteratively train and optimize the optimal dynamic prediction model.
[0174] It needs to be explained that medical data is incremental in nature, and new patient admission and follow-up data will continue to be generated. Retraining the model with these new data can enable it to dynamically adapt to changes in data distribution and improve prediction performance. Specifically, new admission and follow-up data can be collected regularly or in real time and added to the original data set. After preprocessing the data set, the model can be retrained with the new data. In order to avoid the model "forgetting" the original knowledge, mechanisms such as incremental learning can be used to only adjust the model's parameters without retraining the entire model. At the same time, the model structure can be adjusted in combination with new data, such as replacing key components, etc. It can also be integrated with multiple models to enhance the model's generalization ability. Through continuous new data fusion and model optimization, the prediction system can dynamically adapt to the latest environment, greatly improving the robustness and effectiveness of the model in practice.
[0175] According to another embodiment of the present invention, Figure 2As shown, an artificial intelligence-based system for predicting hospitalization time of critical care patients is also provided, the system comprising: a data acquisition module 1, a model building module 2, a model selection module 3, a model incremental learning module 4, a dynamic prediction module 5, a result correction module 6 and a model optimization module 7;
[0176] The data acquisition module 1 is connected to the model selection module 3 through the model construction module 2, the model selection module 3 is connected to the dynamic prediction module 5 through the model incremental learning module 4, and the dynamic prediction module 5 is connected to the model optimization module 7 through the result correction module 6;
[0177] Data collection module 1, used to collect clinical data of critical care patients;
[0178] Model building module 2, used to build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models;
[0179] A model selection module 3 is used to train multiple dynamic prediction models using leave-one-out cross validation and select the best dynamic prediction model;
[0180] Model incremental learning module 4 is used to incrementally train the best dynamic prediction model using the latest time series data when the condition of a critically ill patient undergoes a significant change;
[0181] The dynamic prediction module 5 is used to use the information at the current moment as the input of the optimal dynamic prediction model at each prediction time point, and to perform dynamic prediction and output the expected hospitalization days of critically ill patients;
[0182] Result correction module 6 is used to review the prediction results by taking the expected hospitalization days as a reference and combining it with the medical knowledge graph, and output the final hospitalization days prediction for critically ill patients;
[0183] The model optimization module 7 is used to iteratively train and optimize the best dynamic prediction model based on the newly collected critically ill patients' admission data and follow-up data.
[0184] In summary, with the help of the above technical solutions of the present invention, the leave-one-out cross-validation of the present invention can well evaluate the generalization ability of the time series model, provide an unbiased model selection standard, and help select the best dynamic prediction model. Incremental learning allows the model to be updated when new data arrives without retraining from scratch, and can quickly adapt to the latest environmental changes. Leave-one-out cross-validation repeats multiple rounds of verification and calculates the average index, which can more reliably evaluate the generalization performance of the model. Incremental learning only trains new parameters and fixes existing parameters, which can avoid forgetting learned knowledge and improve learning efficiency at the same time. The present invention adopts means such as gradually decaying the learning rate and controlling the number of training rounds to avoid overfitting of incremental learning to new data, calculates the verification set index to determine whether the model has truly improved the generalization ability, and controls the quality of incremental learning. The combination of the two methods can not only select the optimal model, but also make the model dynamically adapt to new data, comprehensively improve the prediction ability of the model, reduce repeated training and calculation, and is more suitable for actual Incremental data environment in; the present invention uses the latest information as the model input, which can monitor and reflect the latest status of the patient in real time. Wavelet transform preprocessing can improve the quality of input data. The improved long short-term memory network structure learns time dependence and provides memory capacity for dynamic prediction. Different output layer formats are designed to adapt to different prediction tasks. The prediction error is calculated and the parameters of the model are adjusted to achieve dynamic optimization of the model. Doctors make decisions based on the prediction results to make the results more explainable. Continuous retraining with new data makes the model adapt to the latest environment. The dynamic prediction method does not require retraining the entire model and is more efficient. Compared with static prediction, dynamic prediction can provide real-time intelligent decision support. The knowledge graph of the present invention provides structured medical knowledge, which can identify unreasonable situations in the prediction results and improve the accuracy of the results. The empirical knowledge contained in the knowledge graph can make up for the limitations of the model and make the results more in line with medical practice. The model gives quantitative predictions to make up for the incompleteness of the knowledge graph.
[0185] Although the present invention has been disclosed as above with preferred embodiments, the embodiments are merely examples for the convenience of description and are not intended to limit the present invention. Those skilled in the art may make several changes and modifications without departing from the spirit and scope of the present invention. The scope of protection claimed by the present invention shall be based on the claims.
Claims
1. An artificial intelligence-based method for predicting hospital stay of critical care patients, characterized in that: The method for predicting the length of stay of intensive care patients includes the following steps: S1. Collect clinical data of patients in intensive care; S2. Build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models; S3, using leave-one-out cross validation to train multiple dynamic prediction models and select the best dynamic prediction model; S4. When the condition of a critically ill patient changes significantly, the best dynamic prediction model is incrementally trained using the latest time series data; S5. At each prediction time point, use the current information as the input of the optimal dynamic prediction model, perform dynamic prediction, and output the expected hospitalization days for critically ill patients; S6. Use the expected hospital stay as a reference, and review the prediction results in combination with the medical knowledge graph to output the final hospital stay prediction for critically ill patients; S7. Iteratively train and optimize the best dynamic prediction model based on the newly collected admission data and follow-up data of critically ill patients; The method of training multiple dynamic prediction models by leave-one-out cross validation and selecting the best dynamic prediction model comprises the following steps: S31, obtaining clinical data of the intensive care patient, wherein the clinical data includes physiological parameters and medical record data at different time points; S32. Clean clinical data and build multiple dynamic prediction models; S33, each time one sample is set aside from the clinical data as a validation set, and the remaining samples are used to train the model; S34, for each dynamic prediction model, calculating the prediction error of the samples in the reserved validation set; S35, repeating steps S33 to S34 until each sample is used as a validation set once, and obtaining an average prediction error of each dynamic prediction model; S36, comparing average prediction errors of different dynamic prediction models, and selecting the dynamic prediction model with the smallest error as the best dynamic prediction model; S37, using all the training data to retrain the selected best model as the final dynamic prediction model; When the condition of a critically ill patient changes significantly, incremental training of the optimal dynamic prediction model using the latest time series data includes the following steps: S41. Monitor the physiological parameters and condition of critically ill patients to determine whether there are significant changes in their condition; S42. If the condition changes significantly, collect the latest time series data for the time period of the condition change; S43, merging the latest time series data with the original training data to obtain an updated training data set, and preprocessing the updated training data set; S44, based on the preprocessed training data set, using incremental learning to train the best dynamic prediction model; S45, freezing the original parameters of the best dynamic prediction model, and training the newly added parameters; S46. Calculate the performance of the best dynamic prediction model after incremental training on the validation set; S47. If the verification performance is improved, the best dynamic prediction model after incremental training is saved as the final model.
2. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 1, characterized in that: The step of calculating the prediction error of each dynamic prediction model in the samples in the reserved validation set includes the following steps: S341, for each sample in the training set, use it as a validation set in turn, and the remaining samples as training sets; S342, training a dynamic prediction model using a training set to obtain a model function; S343. For the samples in the validation set, use the model function to predict the output at the k+1th time point based on the data at the k time points before the sample; S344, calculating the error between the predicted output and the actual output; S345, repeating steps S343 to S344 for all samples in the validation set, and calculating the average prediction error; S346, all samples in the training set are verified as validation sets, and the average error of each round of verification is calculated; The formula for calculating the error between the predicted output and the actual output is: ; In the formula, Predict output values for dynamic prediction models; is the true output value of the sample; is the average of the squared prediction errors for each sample; is the sample size.
3. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 1, characterized in that: The method of training the optimal dynamic prediction model using incremental learning based on the preprocessed training data set includes the following steps: S441, initializing the dynamic prediction model using the preprocessed training data set; S442, using an incremental learning method to train the newly introduced parameters while keeping the existing model parameters unchanged; S443. Develop a gradually changing learning rate strategy to serve the training of new parameters; S444, determining the number of iterations of the training process, and making appropriate adjustments to the model to prevent overfitting to new data, and evaluating the performance of the model on the validation set; S445. When the performance cannot be further improved, stop training to obtain a dynamic prediction model optimized by incremental learning.
4. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 3 is characterized in that: At each prediction time point, the current information is used as the input of the optimal dynamic prediction model, and dynamic prediction is performed to output the expected hospitalization days of critically ill patients, including the following steps: S51. Obtain clinical information of critically ill patients at the current moment; S52, performing wavelet transform denoising on the time series data of clinical information; S53, using an improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model, ensuring that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment; S54. Use the hidden layer of the improved long short-term memory network to associate current information with past information and learn time-dependent features; S55, using the output layer of the optimal dynamic prediction model, predicting the expected hospitalization days of the patient at the current moment according to the learned time-dependent features; S56, providing the prediction results to the treating physician, making a decision based on the prediction results, and revising the prediction results; S57. Collect the actual hospital stay days of the patients, calculate the prediction error of the best dynamic prediction model, and continuously optimize the best dynamic prediction model based on the prediction error.
5. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 4 is characterized in that: The step of using the improved long short-term memory network to input the denoised time series data into the optimal dynamic prediction model to ensure that the input layer of the optimal dynamic prediction model can accurately receive the time series data at the current moment includes the following steps: S531, arranging the time series data after wavelet transform denoising into a format suitable for input into the model; S532, select the improved long short-term memory network as the best dynamic prediction model; S533, inputting the sorted time series data into the input layer of the optimal dynamic prediction model; S534, the input layer of the optimal dynamic prediction model receives the time series data and transmits the time series data to the hidden layer; S535. During the training of the optimal dynamic prediction model, if it is found that there is a problem with the format of the input data, return to step S531, and perform further data cleaning on the data before conducting model training.
6. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 5, characterized in that: The method of using the output layer of the optimal dynamic prediction model to predict the expected hospitalization days of the patient at the current moment according to the learned time-dependent features includes the following steps: S551, preprocessing the time series data at the current moment, and then inputting the preprocessed data into the input layer of the optimal dynamic prediction model; S552, the input layer of the optimal dynamic prediction model receives the time series data and passes it to the hidden layer, in which the input data is mathematically transformed according to the preset weights and bias values, so as to learn the time-dependent characteristics of the data; S553, the hidden layer transmits the processed data to the output layer, and the output layer generates a predicted value of the expected hospitalization days of the patient at the current moment according to the output of the hidden layer and its own weight and bias value; S554, the output layer will generate a prediction value. If the best dynamic prediction model is a binary or multi-class prediction, the output result is a probability distribution; If the model is designed to make continuous value predictions, the output will be a continuous value; S555. Compare the predicted results with the actual results, and evaluate the prediction accuracy of the model by calculating the size of the prediction error. If the prediction accuracy is insufficient, adjust the parameters of the optimal dynamic prediction model.
7. The method for predicting hospitalization time of intensive care patients based on artificial intelligence according to claim 1, characterized in that: The method of taking the expected hospital stay as a reference, reviewing the prediction results in combination with the medical knowledge graph, and outputting the final hospital stay prediction for critically ill patients includes the following steps: S61. Obtaining the expected hospitalization days of the patient based on the optimal dynamic prediction model; S62. In the medical knowledge graph, query the information of the patient's disease, symptoms and treatment methods, and obtain the correlation data between the information and the number of hospitalization days; S63, comparing the expected length of hospital stay with the data obtained from the medical knowledge graph; S64. According to the comparison and review results, the expected length of stay in hospital is adjusted to generate the final prediction result of length of stay in hospital.
8. An artificial intelligence-based system for predicting the hospitalization time of intensive care patients, used to implement the artificial intelligence-based method for predicting the hospitalization time of intensive care patients according to any one of claims 1 to 7, characterized in that: The system includes: a data acquisition module, a model building module, a model selection module, a model incremental learning module, a dynamic prediction module, a result correction module and a model optimization module; The data acquisition module is connected to the model selection module through the model construction module, the model selection module is connected to the dynamic prediction module through the model incremental learning module, and the dynamic prediction module is connected to the model optimization module through the result correction module; The data acquisition module is used to collect clinical data of intensive care patients; The model building module is used to build multiple dynamic prediction models based on deep learning, and input the static information of critically ill patients as covariates into the dynamic prediction models; The model selection module is used to train multiple dynamic prediction models using leave-one-out cross validation and select the best dynamic prediction model; The model incremental learning module is used to incrementally train the best dynamic prediction model using the latest time series data when the condition of a critically ill patient undergoes a significant change; The dynamic prediction module is used to use the current information as the input of the optimal dynamic prediction model at each prediction time point, and perform dynamic prediction to output the expected hospitalization days of critically ill patients; The result correction module is used to review the prediction results by taking the expected hospitalization days as a reference and combining it with the medical knowledge graph, and output the final hospitalization days prediction for critically ill patients; The model optimization module is used to iteratively train and optimize the best dynamic prediction model based on newly collected critically ill patients' admission data and follow-up data.
Citation Information
Patent Citations
Respiratory disease patient person-time dynamic prediction method based on neural network
CN108846503A
Early death risk assessment model establishing method and device based on ensemble learning
CN110827993A
Operation opportunity prediction model for patient with acute necrotizing pancreatitis
CN111081377A
