Pneumonia rehabilitation progress judgment method and prediction system based on machine learning
By constructing a recovery probability prediction model based on machine learning methods and utilizing monitoring coefficients and feature update algorithms, the real-time and computational redundancy problems of pneumonia recovery efficiency prediction in existing technologies are solved, achieving efficient and accurate prediction of recovery status.
Patent Information
- Application Number
- CN202510935228.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-28
AI Technical Summary
Existing models for predicting pneumonia recovery efficiency rely on manual assessment, which suffers from computational redundancy and insufficient real-time performance.
A machine learning-based method is used to build a recovery probability prediction model by constructing training time series samples and extracting feature domains. Using the monitoring coefficient and feature update algorithm, data is updated and predicted only when the recovery status changes.
It improves the real-time performance and computational efficiency of rehabilitation status prediction, reduces redundant computation, and enhances the computational efficiency and accuracy of the prediction model.
Smart Images

Figure CN120853883A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pneumonia image judgment, specifically involving a method and prediction system for judging pneumonia recovery progress based on machine learning. Background Art
[0002] Pneumonia is a lung infection caused by bacteria, viruses, or other microorganisms, with bacterial and viral pneumonia being the most common. Pathogens are easily transmitted through the respiratory tract. Common symptoms of pneumonia include cough, sputum production, fever, and fatigue. Some patients may experience shortness of breath and difficulty breathing, progressing to severe cases. Severe cases can lead to severe hypoxia, electrolyte and acid-base imbalances, acute respiratory distress syndrome, septic shock, and multiple organ failure. Real-time monitoring of a patient's infection recovery helps guide clinical diagnosis and treatment, and monitoring lung lesions is an effective means of assessing the patient's infection recovery status.
[0003] Currently, a corresponding rehabilitation efficiency prediction model has been developed. This model can perform relevant feature searches based on hospital medical record data provided by the user, and then match similar cases. In the most similar cases, it calculates the probability of recovery. However, existing rehabilitation efficiency models predict the rehabilitation efficiency of the tested subjects by manually evaluating a large number of medical records and examination results. This method has certain computational redundancy issues and a certain delay in the real-time prediction of patient rehabilitation. Summary of the Invention
[0004] The purpose of this invention is to propose a method for judging the progress of pneumonia recovery based on machine learning, so as to solve one or more technical problems existing in the prior art, and at least provide a beneficial option or create conditions.
[0005] A machine learning-based method for assessing pneumonia recovery progress includes the following steps: Step S1: Construct a training time series sample for rehabilitation prediction based on the rehabilitation representation data of the patient at the previous time series during the rehabilitation cycle, and extract features from the training time series sample to obtain rehabilitation feature domain data at the previous time series, and then construct a rehabilitation probability prediction model based on the rehabilitation feature domain data at the previous time series. Step S2: Extract the feature domain from the rehabilitation representation data at the later time sequence of the patient's rehabilitation cycle to obtain the rehabilitation feature domain data at the later time sequence, and calculate the similarity between the rehabilitation feature domain data at the later time sequence and the rehabilitation feature domain data at the earlier time sequence as the monitoring coefficient representing the rehabilitation changes. Step S3: Based on the monitoring coefficient, update the rehabilitation feature domain data at the preceding time sequence, and input the updated rehabilitation feature domain data at the preceding time sequence into the rehabilitation probability prediction model to predict the rehabilitation probability at the following time sequence. Then, based on the probability change rate between the rehabilitation probability at the following time sequence and the rehabilitation probability at the preceding time sequence, calculate the patient's rehabilitation time.
[0006] Further, in step S1, the method for constructing the training time-series samples includes: adding time-series attributes and probability attributes to the rehabilitation representation data X to obtain training time-series samples, wherein the time-series attributes of the rehabilitation representation data X include the time series ti collected by the rehabilitation representation data X during the rehabilitation period, and the probability attributes of the rehabilitation representation data X include the rehabilitation probability at time series ti collected by the rehabilitation representation data X during the rehabilitation period. ,in, The data is represented by rehabilitation characteristics at time ti. The probability of a patient recovering at time ti is represented by i∈[1,n], where i is a measurement constant with no substantial meaning, and n represents the total number of time series. The method for calculating the recovery probability includes: Rehabilitation representation data at time ti Data representing the lesion area of pneumonia were extracted, and the percentage of the lesion area to the initial lesion area (s) was used as the patient's recovery probability at time ti. (The lower the percentage value, the higher the probability of recovery.) (The higher the value), where the initial area of the pneumonia lesion data s is represented by the data representing the initial area of the pneumonia lesion extracted from the rehabilitation representation data at time t1.
[0007] Further, in step S1, the method for extracting the rehabilitation feature domain data at the preceding time series includes: performing one-hot encoding on the training time series samples to obtain feature encoding vectors, and performing matrix multiplication on the feature encoding vectors to transform the encoded feature quantities from an independent sparse state into a correlated continuous state of rehabilitation feature domain data, wherein, This is represented as the feature encoding vector at time t1. The data is represented as the rehabilitation feature domain data at time t1; The formula for matrix multiplication is: W = Here, W represents the transformation matrix.
[0008] Further, in step S1, the method for constructing the rehabilitation probability prediction model includes: processing the rehabilitation feature domain data... As the input of the convolutional neural network, the recovery probability is used as the output of the convolutional neural network, and convolutional training of the convolutional neural network is implemented to obtain the recovery probability prediction model; The error of the convolutional neural network is set to the true value of the recovery probability of the patient at the time sequence ti, which is characterized by the difference between the predicted value of the recovery probability and the true value of the recovery probability of the patient at the time sequence ti.
[0009] Further, in the step S2, the calculation method of the listening coefficient includes: calculating the single vector similarity between the recovery feature domain data at the subsequent time sequence ti+1 (i≥n) and the recovery feature domain data at the previous time sequence ti (i∈[1,n]), and the calculation formula of the vector similarity is: Im= ; where Im represents the similarity between the recovery feature domain data and the vector m in the transformation matrix, represents the vector m of the recovery feature domain data, represents the vector m of the recovery feature domain data, m∈[1,M], and M represents the total number of single vectors in the recovery feature domain data; Set the listening coefficient y, and compare the listening coefficient y with the listening threshold. Among them, if the listening coefficient y is greater than the listening threshold, the recovery feature domain data is used to update the recovery feature domain data; If the listening coefficient y is less than the listening threshold, the recovery feature domain data does not need to be updated.
[0010] Further, in the step S3, the method for updating the recovery feature domain data includes: arranging all single vectors in the recovery feature domain data in ascending order according to the similarity, and selecting the first R (R<m) single vectors in the recovery feature domain data as replacement vectors; < p="" style="box-sizing: inherit; margin: 0px;padding: 0px; list-style: none; border: none;"> The replacement vectors are used to replace the corresponding single vectors in the recovery feature domain data to realize the update of the recovery feature domain data.
[0011] Further, in the step S3, the prediction method of the recovery probability at the subsequent time sequence includes: inputting the updated recovery feature domain data into the recovery probability prediction model to output the recovery probability at the subsequent time sequence ti+1 (i≥n).
[0012] Furthermore, in step S3, the method for estimating the patient's recovery time includes: calculating the recovery probability and the probability change rate of the recovery probability, and calculating the patient's recovery time based on the probability change rate.
[0013] Furthermore, the rehabilitation characterization data is normalized before being used in the calculation.
[0014] Compared with the prior art, the present invention has the following advantages: This invention utilizes rehabilitation feature domain data from the preceding time series to construct a rehabilitation probability prediction model and monitors the rehabilitation feature domain data from the following time series. Once a change in the patient's rehabilitation status is detected in the following time series, the rehabilitation feature domain data in the following time series will change. At this time, it is only necessary to update the rehabilitation feature domain data from the preceding time series with the replacement vector in the rehabilitation feature domain data from the following time series. The updated rehabilitation feature domain data from the preceding time series is then input into the rehabilitation probability prediction model to obtain the patient's rehabilitation probability in the following time series, and thus to estimate the patient's rehabilitation time. This method can estimate only when the patient's rehabilitation status changes, effectively eliminating redundant calculations for unchanged rehabilitation status and improving estimation efficiency. Moreover, by only replacing and updating the data with a high degree of change, redundant calculations for the low-change data parts are also avoided. Attached Figure Description
[0015] The above and other features of the present invention will become more apparent from the detailed description of the embodiments shown in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar elements. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings: Figure 1 The flowchart shown is a method for judging the progress of pneumonia recovery based on machine learning. Detailed Implementation
[0016] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0017] like Figure 1 As shown, the present invention provides a method for predicting the recovery progress of patients with pneumonia, including the following steps: Step S1: Construct a training time series sample for rehabilitation prediction based on the rehabilitation representation data of the patient at the previous time series during the rehabilitation cycle, and extract features from the training time series sample to obtain rehabilitation feature domain data at the previous time series, and then construct a rehabilitation probability prediction model based on the rehabilitation feature domain data at the previous time series. In step S1, the method for constructing the training time-series samples includes: adding time-series attributes and probability attributes to the rehabilitation representation data X to obtain training time-series samples. The time-series attributes of the rehabilitation representation data X include the time series ti collected during the rehabilitation cycle, and the probability attributes of the rehabilitation representation data X include the rehabilitation probability at time series ti collected during the rehabilitation cycle. ,in, The data is represented by rehabilitation characteristics at time ti. The probability of a patient recovering at time ti is represented by i∈[1,n], where i is a measurement constant with no substantial meaning, and n represents the total number of time series. Methods for calculating the probability of recovery include: Rehabilitation representation data at time ti Data representing the lesion area of pneumonia were extracted, and the percentage of the lesion area to the initial lesion area (s) was used as the patient's recovery probability at time ti. (The lower the percentage value, the higher the probability of recovery.) (The higher the value), where the initial area of the pneumonia lesion data s is represented by the data representing the initial area of the pneumonia lesion extracted from the rehabilitation representation data at time t1.
[0018] The recovery period of pneumonia refers to the period when the area of pneumonia lesions gradually decreases until they disappear. Therefore, the lesion area is largest in the early stage of recovery and smallest (0) in the late stage of recovery. The lesion area is inversely proportional to the recovery probability. The corresponding recovery probability is 0 in the early stage of recovery and 100% when the patient is fully recovered. Step S1, the method for extracting rehabilitation feature domain data at the preceding time sequence includes: The method for extracting rehabilitation feature domain data from the preceding time series includes: performing one-hot encoding on the training time series samples to obtain feature encoding vectors, and performing matrix multiplication on the feature encoding vectors to transform the encoded feature quantities from an independent sparse state to a correlated continuous state of rehabilitation feature domain data. This is represented as the feature encoding vector at time t1. The data is represented as the rehabilitation feature domain data at time t1; The formula for matrix multiplication is: W = Here, W represents the transformation matrix.
[0019] Compared to rehabilitation feature domain data, rehabilitation representation data is characterized by its independent data categories that fail to represent the relationships between different categories, high dimensionality, and excessive sparsity. In contrast, rehabilitation feature domain data, obtained by multiplying rehabilitation representation data by a transformation matrix, establishes correlations between data categories and reduces data dimensionality, transforming the data from a sparse to a continuous state. This dimensionality reduction not only uncovers new features but also improves the computational load and accuracy of training the rehabilitation probability prediction model.
[0020] The rehabilitation representation data includes four data categories [Category 1, Category 2, Category 3, Category 4], which are sequentially one-hot encoded to obtain [1, 0], [0, 1, 0], [0, 0, 0, 1], [1, 0, 0], where k represents the number of columns in the W12*k matrix. The rehabilitation feature domain data Eti contains four single vectors: Eti(1) = w1,1,w1,2,...,w1,k, Eti(2) = w4,1,w4,2,...,w4,k, Eti3 = w9,1,w9,2,...,w9,k, and Eti(4) = [w10,1,w10,2,...,w10,k].
[0021] In step S1, the method for constructing the rehabilitation probability prediction model includes: By using rehabilitation feature domain data as input to a convolutional neural network and rehabilitation probability as output, a rehabilitation probability prediction model is obtained through convolutional training of the convolutional neural network. The error of the convolutional neural network is set to the true value of the patient's recovery probability at time ti, and is represented as the difference between the predicted value of the patient's recovery probability at time ti and the true value of the recovery probability.
[0022] Step S2: Extract the feature domain from the rehabilitation representation data at the later time sequence of the patient's rehabilitation cycle to obtain the rehabilitation feature domain data at the later time sequence, and calculate the similarity between the rehabilitation feature domain data at the later time sequence and the rehabilitation feature domain data at the earlier time sequence as the monitoring coefficient representing the rehabilitation changes. Changes in a patient's rehabilitation representation data indicate a change in their rehabilitation status, which is the focus of the research. Therefore, the study only needs to examine the rehabilitation representation data that undergoes temporal changes. This approach compresses computational load. Furthermore, rehabilitation is a slow process, and a patient's rehabilitation status lasts for a time period. Moreover, when a rehabilitation status transitions from one time period to the next, only a small change occurs. In this case, the vector with the largest change in the rehabilitation feature domain data of the next time period compared to the previous time period is used as the replacement vector. The replacement vector is then used to update the rehabilitation feature domain data of the previous time period. This approach reflects both the change and the stable quantity, reducing the computation of the stable quantity in the model and improving the model's computational efficiency.
[0023] In step S2, the method for calculating the monitoring coefficient includes: calculating the single vector similarity between the rehabilitation feature domain data at the later time step ti+1 (i≥n) and the rehabilitation feature domain data at the earlier time step ti (i∈[1,n]), wherein the formula for calculating the vector similarity is: Im= ; Where Im represents the similarity between the rehabilitation feature domain data and vector m in the transformation matrix. The vector m, representing the rehabilitation feature domain data, The vector m, m∈[1,M], represents the data of the rehabilitation feature domain, and M represents the total number of individual vectors in the data of the rehabilitation feature domain. Set a monitoring coefficient y, and compare the monitoring coefficient y with a monitoring threshold. If the monitoring coefficient y is greater than the monitoring threshold, then update the rehabilitation feature domain data using the rehabilitation feature domain data. If the monitoring coefficient y is less than the monitoring threshold, the rehabilitation feature domain data does not need to be updated.
[0024] If the monitoring coefficient y is less than the monitoring threshold, the rehabilitation feature domain data does not need to be updated.
[0025] The similarity Im indicates the degree of similarity between the rehabilitation feature domain data and the vector m in the transformation matrix. The higher the similarity, the more similar the two are, indicating a lower degree of change.
[0026] Step S3: Based on the monitoring coefficient, update the rehabilitation feature domain data at the previous time sequence, and input the updated rehabilitation feature domain data at the previous time sequence into the rehabilitation probability prediction model to predict the rehabilitation probability at the subsequent time sequence. Then, based on the probability change rate between the rehabilitation probability at the subsequent time sequence and the rehabilitation probability at the previous time sequence, calculate the patient's rehabilitation time.
[0027] In step S3, the method for updating the rehabilitation feature domain data includes: Arrange all individual vectors in the rehabilitation feature domain data in ascending order of similarity, and select the first R (R < m) individual vectors in the rehabilitation feature domain data as replacement vectors; Replace the corresponding individual vectors in the rehabilitation feature domain data with the replacement vectors to update the rehabilitation feature domain data.
[0028] In step S3, the prediction method for the rehabilitation probability at the post-temporal sequence includes: Input the updated rehabilitation feature domain data into the rehabilitation probability prediction model to output the rehabilitation probability at the post-temporal sequence ti+1 (i ≥ n). In step S3, the calculation method for the patient's rehabilitation time includes: Calculate the rehabilitation probability and the probability change rate of the rehabilitation probability. The calculation formula for the probability change rate is: V = ; Calculate the patient's rehabilitation time according to the probability change rate. The calculation formula for the rehabilitation time is: T = V * ; Among them, V represents the probability change rate, and T represents the rehabilitation time.
[0029] Using the probability change rate of the rehabilitation probability to predict the rehabilitation time is essentially using the characteristic that rehabilitation is a slow process. Therefore, the calculated probability change rate of the rehabilitation probability is an average rate quantity, which can more accurately simulate the change rate of the rehabilitation probability, and then calculate the average time to full recovery, and finally obtain the rehabilitation time T.
[0030] The rehabilitation characterization data is normalized before participating in the calculation to remove the interference of dimensionality.
[0031] This invention utilizes rehabilitation feature domain data from the preceding time series to construct a rehabilitation probability prediction model and monitors the rehabilitation feature domain data from the following time series. Once a change in the patient's rehabilitation status is detected in the following time series, the rehabilitation feature domain data in the following time series will change. At this time, it is only necessary to update the rehabilitation feature domain data from the preceding time series with the replacement vector in the rehabilitation feature domain data from the following time series. The updated rehabilitation feature domain data from the preceding time series is then input into the rehabilitation probability prediction model to obtain the patient's rehabilitation probability in the following time series, and thus calculate the patient's rehabilitation time. This method can perform the calculation only when the patient's rehabilitation status changes, effectively eliminating redundant calculations for unchanged rehabilitation status and improving calculation efficiency. Moreover, by only replacing and updating the data with a large degree of change, redundant calculations for the low-change data parts are also avoided.
[0032] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A method for judging the recovery progress of pneumonia based on machine learning, characterized in that, The method includes the following steps: Step S1: Construct training time series samples for rehabilitation prediction based on the rehabilitation characterization data at the pre - time series during the patient's rehabilitation cycle, extract features from the training time series samples to obtain the rehabilitation feature domain data at the pre - time series, and then construct a rehabilitation probability prediction model based on the rehabilitation feature domain data at the pre - time series; Step S2: Extract the rehabilitation feature domain data at the post - time series of the patient's rehabilitation cycle to obtain the rehabilitation feature domain data at the post - time series, and calculate the similarity between the rehabilitation feature domain data at the post - time series and the rehabilitation feature domain data at the pre - time series as the monitoring coefficient representing the rehabilitation change; Step S3: Update the features of the rehabilitation feature domain data at the pre - time series based on the monitoring coefficient, input the updated rehabilitation feature domain data at the pre - time series into the rehabilitation probability prediction model to predict the rehabilitation probability at the post - time series, and then calculate the patient's rehabilitation time based on the probability change rate between the rehabilitation probability at the post - time series and the rehabilitation probability at the pre - time series.
2. The method for judging pneumonia recovery progress based on machine learning according to claim 1, characterized in that: In step S1, the method for constructing the training time-series samples includes: adding time-series attributes and probability attributes to the rehabilitation representation data X to obtain training time-series samples. The time-series attributes of the rehabilitation representation data X include the time series ti collected during the rehabilitation cycle, and the probability attributes of the rehabilitation representation data X include the rehabilitation probability at time series ti collected during the rehabilitation cycle. ,in, The data is represented by rehabilitation characteristics at time ti. The probability of a patient recovering at time ti is represented by i∈[1,n], where i is a measurement constant with no substantial meaning, and n represents the total number of time series. The calculation method of the rehabilitation probability includes: Rehabilitation representation data at time ti Data representing the lesion area of pneumonia were extracted, and the percentage of the lesion area to the initial lesion area (s) was used as the patient's recovery probability at time ti. (The lower the percentage value, the higher the probability of recovery.) (The higher the value), where the initial area of the pneumonia lesion data s is represented by the data representing the initial area of the pneumonia lesion extracted from the rehabilitation representation data at time t1.
3. The method for judging pneumonia recovery progress based on machine learning according to claim 2, characterized in that: Step S1, the method for extracting the rehabilitation feature domain data at the preceding time series, includes: performing one-hot encoding on the training time series samples to obtain feature encoding vectors, and performing matrix multiplication on the feature encoding vectors to transform the encoded feature quantities from an independent sparse state into a correlated continuous state of rehabilitation feature domain data, wherein... This is represented as the feature encoding vector at time t1. The data is represented as the rehabilitation feature domain data at time t1; The formula for matrix multiplication is: W = Here, W represents the transformation matrix.
4. The method for judging pneumonia recovery progress based on machine learning according to claim 3, characterized in that: In step S1, the method for constructing the rehabilitation probability prediction model includes: processing the rehabilitation feature domain data... The recovery probability is used as the input to the convolutional neural network and as the output of the convolutional neural network, thereby achieving convolutional training of the convolutional neural network to obtain the recovery probability prediction model. The error of the convolutional neural network is set as the true value of the rehabilitation probability at time series ti of the patient, which is represented as the difference between the predicted value of the rehabilitation probability and the true value of the rehabilitation probability at time series ti.
5. The method for judging pneumonia recovery progress based on machine learning according to claim 4, characterized in that: In step S2, the method for extracting the rehabilitation feature domain data at the later time series includes: performing one-hot encoding on the rehabilitation representation data at the later time series ti+1 (i≥n) to obtain a feature encoding vector, and performing matrix multiplication on the feature encoding vector to convert the encoded feature quantity from an independent sparse state to a correlated continuous state of rehabilitation feature domain data, wherein, This is represented as the feature encoding vector at time ti+1. The data is represented as the rehabilitation feature domain data at time ti+1.
6. The method for judging pneumonia recovery progress based on machine learning according to claim 5, characterized in that: In step S2, the calculation method of the monitoring coefficient includes: calculating the single - vector similarity between the rehabilitation feature domain data at the post - time series ti + 1 (i≥n) and the rehabilitation feature domain data at the pre - time series ti (i∈[1,n]), and the calculation formula of the vector similarity is: Im= ; Where Im represents the similarity between the rehabilitation feature domain data and vector m in the transformation matrix. The vector m, representing the rehabilitation feature domain data, The vector m, m∈[1,M], represents the data of the rehabilitation feature domain, and M represents the total number of individual vectors in the data of the rehabilitation feature domain. Set the monitoring coefficient y, and compare the monitoring coefficient y with the monitoring threshold. Among them, if the monitoring coefficient y is greater than the monitoring threshold, update the rehabilitation feature domain data using the rehabilitation feature domain data; If the monitoring coefficient y is less than the monitoring threshold, the rehabilitation feature domain data does not need to be updated.
7. The method for judging pneumonia recovery progress based on machine learning according to claim 6, characterized in that, In step S3, the method for updating the rehabilitation feature domain data includes: arranging all single vectors in the rehabilitation feature domain data in ascending order according to the similarity, and selecting the first R (R < m) single vectors in the rehabilitation feature domain data as replacement vectors; Replace the corresponding single vectors in the rehabilitation feature domain data with the replacement vectors to achieve the update of the rehabilitation feature domain data.
8. The method for judging pneumonia recovery progress based on machine learning according to claim 7, characterized in that, In step S3, the prediction method of the rehabilitation probability at the post - time series includes: inputting the updated rehabilitation feature domain data into the rehabilitation probability prediction model to output the rehabilitation probability at the post - time series ti + 1 (i≥n).
9. The method for judging the progress of pneumonia recovery based on machine learning according to claim 8, characterized in that, In step S3, the calculation method of the patient's rehabilitation time includes: calculating the rehabilitation probability and the probability change rate of the rehabilitation probability, and calculating the patient's rehabilitation time according to the probability change rate.
10. The method for judging pneumonia recovery progress based on machine learning according to claim 1, characterized in that, The rehabilitation characterization data is normalized before participating in the calculation.