Early sepsis detection device based on deep learning and ChatGPT

By combining deep learning and ChatGPT, using structured and unstructured data to extract early detection devices of sepsis, the problem of low diagnostic accuracy in the existing technology is solved, and more accurate early detection and identification is achieved, reducing the Sepsis fatality rate.

CN117153422BActive Publication Date: 2024-12-20TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311185418.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2024-12-20
Estimated Expiration
2043-09-14

AI Technical Summary

Technical Problem

The existing early detection technology of sepsis cannot effectively utilize unstructured data, resulting in low diagnostic accuracy, and the existing models fail to fully mine multiple data in electronic health records, which cannot meet the practical application needs.

Method used

Using a sepsis early detection device based on deep learning and ChatGPT, the Bi-LSTM model combines ClinicalBERT and ChatGPT to remove and summarize the unstructured data and generate text embedded representations. Combined with structured data to make early predictions.

Benefits of technology

It improves the accuracy of early detection of sepsis, reduces the mortality rate, provides more comprehensive medical data mining capabilities, assists doctors in early judgment of the condition, and improves the patient's prognosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117153422B_ABST
    Figure CN117153422B_ABST
Patent Text Reader

Abstract

The present invention discloses an early detection device for sepsis based on deep learning and ChatGPT, the device comprising: an initial data set extraction module for obtaining structured data and unstructured data of patients who have been in the ICU ward for more than six hours to form an initial data set; a structured data preprocessing module for filtering and cleaning structured data; an unstructured preprocessing module. It is used to summarize and remove noise from unstructured data using ChatGPT; a Bi-LSTM-based model for receiving preprocessed data and predicting the probability of a patient suffering from sepsis, the module comprising: an input unit, a processing unit, and an output unit; a training module for training the model, and performing early prediction of sepsis for new ICU patients based on the trained model. The present invention improves the accuracy of early detection and reduces the mortality rate of sepsis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sepsis, and in particular to an early detection device for sepsis based on deep learning and ChatGPT. Background Art

[0002] Sepsis is a disease that poses a serious threat to life safety. Sepsis is a systemic inflammatory response syndrome caused by infection and is one of the common high-risk complications and leading causes of death in ICU patients. An estimated 30 million people suffer from sepsis each year worldwide, and more than 6 million people die from sepsis. The cost of treating sepsis is very high, and the risks are also very high. Due to the high incidence, mortality rate and expensive treatment costs, sepsis has become a public health issue of great concern worldwide. The clinical diagnostic definition of sepsis has evolved from 1.0 to 3.0, and is constantly changing and updating. The latest clinical definition of sepsis 3.0 was proposed by the European Society of Intensive Care Medicine in 2016. Some progress has been made in the study of the pathogenesis of sepsis in clinical practice, but the pathogenesis of sepsis is complex, involving many variable factors, and often shows similar characteristics to other diseases, and the diagnostic accuracy needs to be improved. Studies have shown that early detection of sepsis and timely antibiotic treatment are crucial to improving the outcomes of patients with sepsis. Every hour of delay in treatment will increase the mortality rate by 4%-8%. Early detection of potential patients who may develop sepsis and providing them with timely treatment, as well as exploring the key influencing factors closely related to the occurrence of sepsis, have important research value and significance for improving patient prognosis.

[0003] On the one hand, most of the current research is based on the medical perspective, and most of them use statistical analysis and simple logistic regression models. Few use deep learning algorithms to predict sepsis in patients at an early stage. On the other hand, most of the existing research on sepsis prediction is based on structured data, while unstructured data accounts for 80% of electronic health record data and doctors often rely on unstructured data to assist in judging the patient's condition. There are few methods that can use both unstructured and structured data to predict sepsis, which cannot meet the various needs in practical applications. Summary of the invention

[0004] The present invention provides an early detection device for sepsis based on deep learning and ChatGPT. The present invention fully mines the data in the electronic health record to achieve early detection and identification of potential sepsis patients, improves the accuracy of early detection, and reduces the mortality rate of sepsis. See the following description for details:

[0005] In a first aspect, a device for early detection of sepsis based on deep learning and ChatGPT is characterized in that the device comprises:

[0006] Extracting the initial data set module, used to obtain the structured data and unstructured data of patients who have been in the ICU for more than six hours to form the initial data set;

[0007] The preprocessing module is used to preprocess structured data and summarize and remove noise from unstructured data using ChatGPT;

[0008] A Bi-LSTM-based model is used to receive pre-processed data and predict the probability of a patient suffering from sepsis, the module comprising: an input unit, a processing unit, and an output unit;

[0009] The training module is used to train the model and make early predictions of sepsis for new ICU patients based on the trained model.

[0010] The unstructured data includes all clinical records other than discharge records; the structured data is filtered and cleaned; and ChatGPT is used to summarize and remove noise from the unstructured data.

[0011] The sample upsampling is as follows: according to the ratio of positive to negative samples, a larger sampling weight is given to positive samples, i.e., minority samples, and the opposite is true for negative samples.

[0012] In a second aspect, an early detection device for sepsis based on deep learning and ChatGPT, the device comprising: a processor and a memory, wherein program instructions are stored in the memory, and the processor calls the program instructions stored in the memory to enable the device to perform the following detection operations:

[0013] The initial data set is composed of structured and unstructured data of patients who have been in the ICU for more than six hours.

[0014] Filter and clean structured data; use ChatGPT to summarize and remove noise from unstructured data;

[0015] Receiving the pre-processed data and predicting the probability of the patient suffering from sepsis, the module includes: an input unit, a processing unit and an output unit;

[0016] The model is trained and the early prediction of sepsis is performed for new ICU patients based on the trained model.

[0017] In a third aspect, a computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor performs a detection operation.

[0018] The beneficial effects of the technical solution provided by the present invention are:

[0019] 1. Information in the ICU environment is in an overloaded mode. Existing technologies only use common structured data, but do not make full use of unstructured data, which will lead to the need to improve the prediction accuracy of the model. Studies have shown that 80% of the data in electronic health records is unstructured data. In addition to relying on various structured data such as physiological indicators, doctors often use patients' unstructured data such as diagnostic reports to assist in early judgment of patients' conditions. Unstructured data contains a lot of noise that is not related to the disease. In order to better remove these noises and summarize the text, the present invention uses ChatGPT to process these original clinical diagnosis reports and generate summary reports. It uses ClinicalBERT to obtain text embedding representations at the patient level, connects them to the preprocessed structured data, and feeds them into the model to predict the patient's future risk of sepsis. Compared with using only structured data, the present invention mines medical data more comprehensively, assists doctors in early judgment of patients' conditions, and effectively improves patients' prognosis.

[0020] 2. Existing technologies usually use models based on statistical analysis and simple logistic regression, decision trees, etc. The present invention uses a deep learning model based on Bi-LSTM. The advantage of the Bi-LSTM model in sequence data processing compared to traditional models is that it can simultaneously consider the previous and next context information, better capture the dependencies and long-term dependencies in the sequence, and provide more powerful feature representation and modeling capabilities; the model used in the present invention can better capture the long-term dependencies of the time series, more accurately detect and discover sepsis patients at an early stage, and provide doctors with more time for the management and intervention of sepsis patients; it realizes the early detection and identification of potential sepsis patients, improves the accuracy of early detection, and reduces the mortality rate of sepsis. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A poetic diagram of the internal operation of an early detection device for sepsis based on deep learning and ChatGPT provided by the present invention;

[0022] Figure 2 Schematic diagram of clinical note processing for ChatGPT;

[0023] Figure 3 AUROC diagram for predicting sepsis 4 hours in advance;

[0024] Figure 4 It is the overall architecture diagram of the present invention. DETAILED DESCRIPTION

[0025] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are described in further detail below.

[0026] When solving the problems in the background technology, the inventors found that there is a large amount of noise in the unstructured data that is not related to the disease. The emergence of large models such as ChatGPT provides a solution to remove this noise. Based on the deep learning model, and using both structured and unstructured data for prediction, medical data can be fully mined, thereby improving the accuracy of early detection of sepsis.

[0027] In order to solve the problems of difficult clinical diagnosis of sepsis in ICU patients, insufficient data application and low accuracy in the prior art, an embodiment of the present invention provides an early detection device for sepsis based on deep learning and ChatGPT. The device combines structured data and unstructured data to achieve early detection of sepsis. According to the data mining process, the detection device extracts structured data and unstructured data of ICU patients for several days from the electronic health records. After a series of preprocessing operations such as variable selection and data cleaning are performed on the structured data, the ChatGPT summary obtained through ClinicalBERT and the cleaned unstructured data embedding are sent to a deep learning model based on Bi-LSTM to achieve early prediction of sepsis, thereby providing more valuable time for intervention treatment of sepsis.

[0028] Example 1

[0029] The embodiment of the present invention provides a device for early detection of sepsis based on machine learning, such as Figure 1 As shown, the device comprises:

[0030] Extracting the initial data set module, used to obtain the structured data and unstructured data of patients who have been in the ICU for more than six hours to form the initial data set;

[0031] The preprocessing module is used to preprocess structured data and summarize and remove noise from unstructured data using ChatGPT;

[0032] A Bi-LSTM-based model is used to receive pre-processed data and predict the probability of a patient suffering from sepsis. The model includes: an input unit, a processing unit, and an output unit;

[0033] The training module is used to train the model and make early predictions of sepsis for new ICU patients based on the trained model.

[0034] Among them, unstructured data includes: all clinical records except discharge records.

[0035] The preprocessing of structured data is as follows: variable screening, missing value filling, data normalization, and sample upsampling are performed on the structured data in sequence.

[0036] The above sample upsampling is as follows: according to the ratio of positive and negative samples, a larger sampling weight is given to positive samples, i.e., minority samples, and the opposite is true for negative samples.

[0037] In summary, the embodiments of the present invention achieve early prediction of sepsis through the above modules, thereby providing more valuable time for intervention treatment of sepsis, improving the accuracy of early detection, and reducing the mortality rate of sepsis.

[0038] Example 2

[0039] The scheme in Example 1 is further introduced below in combination with specific examples and formulas, as described below for details:

[0040] 1. Extracting the initial dataset module

[0041] The initial data set was composed of structured and unstructured data of patients who had been in the ICU for more than six hours extracted from the MIMIC-III V1.4 database. A total of 48 test indicators of patients and corresponding clinical notes were extracted, mainly including: vital sign variables (such as systolic blood pressure, mean blood pressure, etc.); laboratory measurement variables (such as lactate, platelet count, etc.); demographic data (such as gender, age, etc.); unstructured data (all clinical records except discharge records).

[0042] The structured variables involved in the embodiments of the present invention are all variables commonly used in the medical scoring system used for the diagnosis of sepsis in the clinic, and the organ failure score (SOFA). As shown in Table 1, these are the variables needed in the SOFA scoring table. In order to compare the performance of the deep learning method and the clinical scoring system, the embodiments of the present invention combine the variables that are often extracted in the research and appear in the medical scoring system for easy comparison. The structured variables used (i.e., 48 detection indicators) are specifically shown in Table 2:

[0043] Table 1: Sequential Organ Failure Assessment (SOFA)

[0044]

[0045] Note: 1. The worst value of the day should be taken for daily assessment; 2. The higher the score, the worse the prognosis.

[0046] Table 2: Structural variables used in the present invention to predict sepsis in advance

[0047]

[0048]

[0049] 2. Preprocessing Module

[0050] Before inputting into the prediction model, the extracted data needs to be preprocessed, including variable screening, missing value filling, data normalization, sample upsampling, summarizing unstructured data using ChatGPT, and noise removal to improve data quality.

[0051] Among them, the original data set usually has many problems and is not suitable for direct use and needs to be preprocessed. Data in real-world scenarios often have various deficiencies, such as human errors, equipment errors, or data distortion. The data of ICU patients is relatively sparse and contains a large number of missing values ​​and outliers. Due to the inconsistency of measurement frequency, for example, laboratory test indicators may require a delay of several days to obtain results, while real-time sampled variables such as heart rate may be sampled every few hours. Therefore, before making a prediction, the data must be preprocessed to obtain available and consistent standard data. Data preprocessing mainly includes:

[0052] (1) Variable screening: Set the variable missing rate threshold to 70%, and delete variables with feature missing rates greater than the threshold;

[0053] (2) Missing value filling: Use the forward filling method to fill the missing value of a variable with its most recent measured value in the past. If there is no measured value in the past, fill it with the mean value of the value in the population;

[0054] (3) Dataset division and normalization: All samples are randomly divided into 70% training set, 15% validation set, and 15% test set according to the division ratio commonly used in this field. All sample data are normalized using the z-score method so that the values ​​of their structured data features are between [-1, 1];

[0055]

[0056] Among them, x represents the value of each feature at each time point, μ train is the mean score of each feature in the training set sample space, σ train is the standard deviation of each feature in the training set sample space.

[0057] (4) Positive and negative sample balance processing: Since the ratio of sepsis patients to non-sepsis patients in the data set is about 1:10, in order to better train the performance of the classifier and prevent the classifier from overfitting, the embodiment of the present invention uses the "WeightedRandomSampler" method in the PyTorch library to control the weights of positive and negative samples during the training process: according to the ratio of positive and negative samples, a larger sampling weight is given to positive samples (small samples), and the opposite is true for negative samples (large samples). In this way, during the training process, the classifier can pay more attention to the minority category.

[0058] (5) Use ChatGPT to summarize and remove noise from unstructured data: Unstructured data contains medical abbreviations, misspellings, and internal noise that is not related to the disease. Call the ChatGPT API and use the prompt "You are an expert in summarizing clinical notes. Please summarize the clinical notes below." to summarize and remove noise from the original medical text and generate a summary report:

[0059] Generated_report i =ChatGPT(Original_note i )

[0060] Here, i represents the i-th note of the patient, and then the generated report is fed into ClinicalBERT to obtain the embedded representation of the text.

[0061] (6) Using ClinicalBERT to obtain text embeddings: ClinicalBERT is a variant of BERT that is fine-tuned on the MIMIC database and can better process medical text data. The process of using ClinicalBERT to obtain text embeddings is as follows:

[0062] x_Word_Emb=WordEmbedding(x)

[0063] x_Position_Emb=PositionEmbeddings(x)

[0064] x_Input_Emb=x_Word_Emb+x_Position_Emb

[0065] x_Output_Emb=EncoderLayer_LastHiden(x_Input_Emb)

[0066] Among them, x is the patient's diagnosis text (unstructured data), x_Word_Emb and x_Position_Emb are the word embedding vector and position embedding vector of the input text respectively, and both are sent to the encoder layer (EncoderLayer) of Transformer to obtain the embedded representation of the text, and the output of the last hidden layer (Last_Hiden_Layer) is taken as the final embedded representation of the text. Since a patient has multiple diagnosis texts, the embodiment of the present invention takes the average of the embedded representations of these texts:

[0067]

[0068] Among them, N represents the total number of diagnosis texts owned by the patient, and x_Last_Emb is the final text embedding representation of the patient. The specific process is as follows Figure 2 shown.

[0069] 3. Building a Bi-LSTM-based model module

[0070] After data preprocessing, it is input into the constructed Bi-LSTM-based model. The model used in the embodiment of the present invention mainly includes: an input unit, a processing unit and an output unit, which are as follows:

[0071] (1) Input unit: The input unit mainly consists of an embedding layer and a pre-trained ClinicalBERT. ClinicalBERT is used to obtain the embedding representation of the generated text, which is then connected to the clinical medical data after data preprocessing and converted into a time series that can be processed by the deep learning model.

[0072] The specific process is as follows: Let s be an input text containing k words, denoted as [w1,w2,…,w i ,…,w k ], where w i Refers to the i-th word in the text. Input the text s into ClinicalBERT and get the contextual representation H = [h1,h2,…,h k ],h k is the vector representation corresponding to the kth word; and the preprocessed structured data G = [g1, g2, ..., g t ] Do the fusion processing to get the final input And the corresponding label Y i , i represents the i-th patient, t is the maximum time span for extracting ICU patient data, represents the set of all characteristic variables of the ith patient at time t, X i Represents the set of all characteristic variables of an ICU patient in a specified time span, Y iIndicates whether the patient is a septic patient.

[0073] (2) Processing unit: This unit is mainly composed of a multi-layer Bi-LSTM and a fully connected feedforward neural network layer. Its core function is to perform nonlinear complex transformations on the time series obtained from the input unit, to mine potential features related to sepsis, and to combine all the potential features obtained to represent the patient's current condition.

[0074] Specifically: X obtained from the input unit i and Y i Input into the processing unit of the model, we get:

[0075]

[0076]

[0077]

[0078] in, and Represent the forward and reverse input sequences X respectively i The weight of and Represents input and The weight of and are the forward bias and reverse bias of the model respectively, To concatenate the output weights of the forward and reverse hidden layers, is the bias vector, N represents the total number of patients, and σ is the nonlinear activation function tanh:

[0079]

[0080] (3) Output unit: The output unit is mainly composed of a fully connected feedforward neural network layer, which maps the output from the processing unit into a probability value, which represents the probability that the patient will suffer from sepsis in the next period of time predicted by the model based on the patient's clinical data so far.

[0081] Specifically: the processing unit will be obtained Input into the output unit of the model to get the predicted label Y * i :

[0082] z i =W*p i +b

[0083]

[0084] in, is the weight matrix of the output linear layer, is the bias vector, Represents the parameter matrix when predicting the output, Y i * Represents the predicted result of the patient (0 represents non-septic patients, 1 represents septic patients).

[0085] 4. Training Module

[0086] The prediction model is trained to find the ideal parameters through training, and the model is continuously tuned to make the model effect stable and optimal, and to predict sepsis in new sepsis patients. Specifically: the data set is divided into 75% training set, 15% validation set and 15% test set, and the model is trained using a five-fold cross-validation method. The designed model is only trained on the training set, the validation set is used for hyperparameter adjustment, and the test set is used to evaluate the effect of the model; this model training uses a binary cross entropy loss function, and its formula is:

[0087]

[0088] Among them, y i is the label 0 or 1, p(y i |x) is the probability that the patient suffers from sepsis under the current input.

[0089] Use ROC-AUC scores, accuracy, specificity, and sensitivity to evaluate model performance:

[0090]

[0091]

[0092]

[0093] Among them: TP is the number of samples correctly predicted to be diseased, TN is the number of samples correctly predicted to be non-diseased, FP is the number of samples incorrectly predicted to be diseased, and FN is the number of samples incorrectly predicted to be non-diseased; the ROC curve is a curve drawn with 1-specificity as the horizontal axis and sensitivity as the vertical axis, and AUC is the area enclosed by this curve and the coordinate axis.

[0094] Use Bayesian optimization to continuously adjust the hyperparameters of the Bi-LSTM model, and repeatedly train and tune the Bi-LSTM model. If the loss value of the model is basically stable or the AUC value is no longer increasing, terminate the training of the Bi-LSTM model while ensuring that there is no overfitting.

[0095] 5. Detection output module

[0096] Among them, after training, the Bi-LSTM model can predict sepsis for new patients. The disease probability value output by the model prediction is between [0-1]. Patients with a predicted probability greater than or equal to 0.5 are classified as 1, which means that they are likely to develop sepsis in the future. Conversely, patients with a predicted probability less than 0.5 are classified as 0, indicating that the patient will not develop sepsis in the future.

[0097] The embodiment of the present invention first extracts the patient's structured prediction variables and unstructured prediction variables from the electronic health record, wherein the structured prediction variables mainly include the patient's vital sign variables, laboratory measurement indicators and demographic information 6 hours after entering the ICU; the unstructured prediction variables mainly include all clinical diagnosis records of the above patients except the discharge records. Then the extracted raw data is preprocessed, including: variable screening, missing value filling, data normalization, sample upsampling, and summarizing and noise removal of unstructured data using ChatGPT to complete the cleaning and processing of the raw data. ClinicalBERT is used to obtain text embedding representation based on patients, and then connected with the processed structured data and sent into the Bi-LSTM-based model. The overall architecture is as follows Figure 3 As shown. After training and parameter tuning, the obtained model can make early predictions of sepsis. The technical solution of the embodiment of the present invention can assist doctors in making clinical decisions and provide more time for the management and intervention of sepsis.

[0098] The prediction of sepsis at 4h, 6h and 12h in advance was selected respectively, and the experimental results are shown in Table 3. The performance of the method proposed in the embodiment of the present invention in predicting sepsis at 4h, 6h and 12h in advance is better than the baseline model. The embodiment of the present invention also draws the ROC curve of AUC for predicting sepsis 4h in advance. The performance of this method in predicting sepsis 4h in advance is better than the baseline model, and is also better than the common sepsis clinical scoring system. The ROC curve of AUC is shown in Figure 3 shown.

[0099] Table 3: Classification performance comparison

[0100]

[0101]

[0102] * The best effect is bold.

[0103] 1 The 95% confidence interval was obtained by bootstraping the test set with 1000 replacement resamplings.

[0104] 2 Specificity was calculated at a sensitivity value of 0.80

[0105] Example 3

[0106] A device for early detection of sepsis based on deep learning and ChatGPT, the device comprising: a processor and a memory, wherein program instructions are stored in the memory, and the processor calls the program instructions stored in the memory to enable the device to perform the following detection operations:

[0107] The initial data set is composed of structured and unstructured data of patients who have been in the ICU for more than six hours.

[0108] Filter and clean structured data; use ChatGPT to summarize and remove noise from unstructured data;

[0109] Receiving the pre-processed data and predicting the probability of the patient suffering from sepsis, the module includes: an input unit, a processing unit and an output unit;

[0110] The model is trained and the early prediction of sepsis is performed for new ICU patients based on the trained model.

[0111] Among them, unstructured data refers to all clinical records except discharge records; preprocessing of structured data includes variable screening, missing value filling, data normalization, and sample upsampling.

[0112] Among them, sample upsampling is: according to the ratio of positive and negative samples, a larger sampling weight is given to positive samples, i.e., minority samples, and the opposite is true for negative samples.

[0113] The specific process of summarizing and removing noise from unstructured data using ChatGPT is as follows:

[0114] Call ChatGPT's API, summarize and remove noise from the original medical text through prompt words, and generate a summary report:

[0115] Generated_report i =ChatGPT(Original_note i )

[0116] Here, i represents the i-th note of the patient, and the generated report is sent to ClinicalBERT to obtain the embedded representation of the text.

[0117] The embedding representation of the text is obtained as follows: the output of the last hidden layer is taken as the final embedding representation of the text, and the embedding representation of the text is averaged:

[0118]

[0119] Where N is the total number of diagnostic texts owned by the patient, x_Last_Emb is the patient's final text embedding representation, and x_Output_Emb is i is the embedding representation corresponding to the i-th diagnosis text of the patient, and x_Last_Emb is the patient’s final text embedding representation.

[0120] Further, the input unit is composed of an embedding layer and a pre-trained ClinicalBERT, wherein the ClinicalBERT is used to obtain an embedding representation of the generated text, which is fused with the pre-processed data and converted into a time series processed by a deep learning model;

[0121] Input the input text s containing k words into ClinicalBERT to obtain the contextual representation of each text; fuse it with the structured data of the preprocessed data to obtain the final input X i And the corresponding label Y i , Y i Indicates whether the patient is a septic patient.

[0122] Furthermore, the processing unit is composed of a multi-layer Bi-LSTM and a fully connected feed-forward neural network layer, which converts the X obtained from the input unit into i and Y i Input into the processing unit of the model, and combine all the latent features to represent the patient's current condition;

[0123]

[0124]

[0125]

[0126] in, and Represent the forward and reverse input sequences X respectively i The weight of and Represents input and The weight of and are the forward bias and reverse bias of the model respectively, To concatenate the output weights of the forward and reverse hidden layers, is the bias vector, N represents the total number of patients, and σ is the nonlinear activation function tanh:

[0127]

[0128] Furthermore, the output unit is composed of a fully connected feedforward neural network layer, which obtains Input into the output unit of the model to get the predicted label Y i * , indicating the predicted probability of the patient suffering from sepsis in the future;

[0129] z i =W*p i +b

[0130] Y i * =softmax(z i w i )∈[0,1]

[0131] in, is the weight matrix of the output linear layer, is the bias vector, Represents the parameter matrix when predicting the output, Y i * Represents the patient's predicted outcome.

[0132] It should be pointed out here that the device description in the above embodiment corresponds to the method description in the embodiment, and the embodiment of the present invention will not be described in detail here.

[0133] The execution subjects of the above-mentioned processor and memory can be devices with computing functions such as computers, single-chip microcomputers, and microcontrollers. In specific implementation, the embodiments of the present invention do not limit the execution subjects and are selected according to the needs of actual applications.

[0134] The data signal is transmitted between the memory and the processor via a bus, which is not described in detail in the embodiment of the present invention.

[0135] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, the storage medium includes a stored program, and when the program is running, the device where the storage medium is located is controlled to execute the method steps in the above embodiment.

[0136] The computer-readable storage medium includes but is not limited to a flash memory, a hard disk, a solid-state drive, and the like.

[0137] It should be pointed out here that the description of the readable storage medium in the above embodiment corresponds to the description of the method in the embodiment, and the embodiment of the present invention will not be described in detail here.

[0138] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present invention are generated.

[0139] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be accessed by the computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium or a semiconductor medium, etc.

[0140] Unless otherwise specified, the models of the components in the embodiments of the present invention are not limited, and any device that can perform the above functions may be used.

[0141] Those skilled in the art will appreciate that the accompanying drawing is only a schematic diagram of a preferred embodiment, and the serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An early detection device for sepsis based on deep learning and ChatGPT, characterized in that: The device comprises: Extracting the initial data set module, used to obtain the structured data and unstructured data of patients who have been in the ICU for more than six hours to form the initial data set; The structured data preprocessing module is used to filter and clean the structured data; the structured data filtering and cleaning are as follows: variable screening, missing value filling, data normalization, and sample upsampling are performed on the structured data in sequence; Missing value filling: Use the forward filling method to fill the missing value of a variable with its most recent measured value in the past. If there is no measured value in the past, use the mean value of the value in the population to fill it; Positive and negative sample balance processing: Use the "WeightedRandomSampler" method in the PyTorch library to control the weights of positive and negative samples during training: According to the ratio of positive and negative samples, give positive samples a larger sampling weight, and negative samples the opposite; The unstructured preprocessing module is used to summarize and remove noise from unstructured data using ChatGPT; the summary and noise removal of unstructured data using ChatGPT are specifically as follows: Call ChatGPT's API, summarize and remove noise from the original medical text through prompt words, and generate a summary report: Generated_report i =ChatGPT(Original_note i ) Here, i represents the i-th note of the patient. The generated report is fed into ClinicalBERT to obtain the embedded representation of the text; The embedding representation of the text is obtained as follows: the word embedding vector and the position embedding vector of the input text are sent to the encoder layer of the Transformer to obtain the embedding representation of the text, the output of the last hidden layer is taken as the final embedding representation of the text, and the embedding representation of the text is averaged: Where N represents the total number of diagnosis texts that the patient has, x_Output_Emb i is the embedding representation corresponding to the patient’s i-th diagnosis text, and x_Last_Emb is the patient’s final text embedding representation; A Bi-LSTM-based model is used to receive pre-processed data and predict the probability of a patient suffering from sepsis, the model comprising: an input unit, a processing unit, and an output unit; The input unit is composed of an embedding layer and a pre-trained ClinicalBERT, wherein the ClinicalBERT is used to obtain an embedding representation of the generated text, which is connected with the pre-processed data and converted into a time series processed by a deep learning model; Input the input text s containing k words into ClinicalBERT to obtain the contextual representation of each text; fuse it with the structured data of the preprocessed data to obtain the final input X i And the corresponding label Y i , Y i Indicates whether the patient is a septic patient; The processing unit is composed of a multi-layer Bi-LSTM and a fully connected feed-forward neural network layer, which obtains the X from the input unit. i and Y i Input into the processing unit of the model, and combine all the latent features to represent the patient's current condition; in, and Represent the forward and reverse input sequences X respectively i The weight of and Represents input and The weight of and are the forward bias and reverse bias of the model respectively, To concatenate the output weights of the forward and reverse hidden layers, is the bias vector, N represents the total number of patients, and σ is the nonlinear activation function tanh: A training module is used to train the model and make early predictions of sepsis in new ICU patients based on the trained model; Bayesian optimization is used to continuously adjust the hyperparameters of the Bi-LSTM model, and the Bi-LSTM model is repeatedly trained and tuned.

2. According to claim 1, a device for early detection of sepsis based on deep learning and ChatGPT is characterized in that: The unstructured data refers to all clinical records other than discharge records.

3. The early detection device for sepsis based on deep learning and ChatGPT according to claim 2, characterized in that: The sample upsampling is: according to the ratio of positive and negative samples, a larger sampling weight is given to the positive sample, i.e., the minority sample, and the opposite is true for the negative sample.

4. The early detection device for sepsis based on deep learning and ChatGPT according to claim 1, characterized in that: The output unit is composed of a fully connected feedforward neural network layer, which inputs the processing unit to the output unit of the model to obtain the predicted label Y i * , indicating the predicted probability of the patient suffering from sepsis in the future; z i =W*p i +b Y i * =softmax(z i w i )∈[0,1] in, is the weight matrix of the output linear layer, is the bias vector, Represents the parameter matrix when predicting the output, Y i * Represents the predicted outcome of the patient.

5. A computer device comprising: A memory and a processor, characterized in that program instructions are stored in the memory, and the processor calls the program instructions stored in the memory to execute the detection operation performed by the early detection device for sepsis based on deep learning and ChatGPT in claim 1: The initial data set is composed of structured and unstructured data of patients who have been in the ICU for more than six hours. Filter and clean structured data; use ChatGPT to summarize and remove noise from unstructured data; Receiving the preprocessed data, predicting the probability of the patient suffering from sepsis, and inputting the data into the constructed Bi-LSTM-based model after data preprocessing, the model includes: an input unit, a processing unit, and an output unit; The model is trained and the early prediction of sepsis is performed on new ICU patients based on the trained model.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the detection operation in claim 5.