Method, device, equipment and storage medium for human-machine asynchronous diagnosis of mechanically ventilated patients
By generating high-quality PVA data from the generative adversarial network and combining with deep learning models, the problems of scarcity and imbalance in PVA detection are solved, more accurate PVA event recognition and treatment support are achieved, and the treatment effect of critically ill patients is improved.
Patent Information
- Application Number
- CN202510779810.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-12
AI Technical Summary
In the prior art, the human-machine asynchronous (PVA) detection method for mechanical ventilation patients depends on visual examinations of clinicians, and has strong subjectivity and difficulty in real-time monitoring. The deep learning model has poor classification results due to data scarcity and imbalance, especially in the small sample category.
The PVA data generation model based on Generative Adversarial Network (GAN) is adopted to generate high-quality and diverse PVA data, and combined with deep learning classification models, including convolutional neural networks and long and short-term memory networks, optimize the identification ability of the classification model through data generation and real data training.
It significantly improves the classification accuracy of PVA events and the generalization ability of the model, can better deal with complex clinical environments, provide accurate clinical support, and improve the treatment effect and prognosis of critically ill patients.
Smart Images

Figure CN120296528B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent control technology for medical equipment, and in particular to a method, apparatus, device and storage medium for human-machine asynchronous diagnosis of mechanically ventilated patients. Background Art
[0002] Mechanical ventilation is an important treatment for critically ill patients, but the occurrence of patient-ventilator asynchrony (PVA) often compromises treatment outcomes. Traditional PVA detection methods rely on clinicians to identify asynchrony through visual inspection and ventilator waveform assessment. However, this method is subject to limitations such as high subjectivity and difficulty in real-time monitoring, making accurate and continuous monitoring difficult, especially in high-load environments such as the ICU. In recent years, deep learning classification models have been widely used for PVA identification, enabling automated identification of PVA events and real-time diagnosis.
[0003] Due to data scarcity, particularly insufficient data in the minority-sample class, deep learning models face a severe data imbalance problem in PVA classification tasks. This results in poor model performance on the minority-sample class, impacting overall classification effectiveness and causing the classification model to rely more heavily on the class with larger data volumes, thereby neglecting accurate identification of the minority-sample class. To address this issue, some studies have employed generative adversarial networks (GANs) to generate simulated data and augment training data for the minority-sample class through data augmentation. However, existing GAN techniques have largely focused on medical image generation. While achieving some success in generating high-quality medical images (such as CT and MRI images), they remain deficient in generating PVA waveform data. PVA waveform data involves complex temporal features and multiple respiratory parameters. Existing GAN methods fail to fully capture the complexity of real clinical data, resulting in the generated data failing to fully reflect the true clinical patient condition, thus limiting the effectiveness of this data in optimizing PVA classification model training. Summary of the Invention
[0004] The present application provides a method, apparatus, device and storage medium for diagnosing human-machine asynchronous communication in mechanically ventilated patients, proposes a PVA data generation model based on a generative adversarial network (GAN) for generating high-quality and diverse PVA data, and further develops a deep learning PVA classification and recognition model based on the generated PVA data to solve the data imbalance problem faced by PVA recognition tasks in the prior art. The high-quality and diverse PVA waveform data generated by GAN provides richer training samples for the deep learning classification model, significantly improving the recognition accuracy and adaptability of the PVA classification model to complex clinical environments, enabling it to better handle various asynchronous events. The present application overcomes the limitations of traditional methods in terms of insufficient model generalization ability due to insufficient data, provides more accurate support for clinical decision-making, and thus significantly improves the treatment effect and prognosis of critically ill patients.
[0005] In a first aspect, the present application provides a method for diagnosing human-machine asynchronous communication in a mechanically ventilated patient, comprising:
[0006] Smoothing and resampling the PVA waveform data to obtain real data;
[0007] A PVA data generation model based on a generative adversarial network is constructed, wherein the PVA data generation model includes a generator and a discriminator. The generator includes a multi-layer fully connected network, a long short-term memory network, a residual block, and a self-attention module. The multi-layer fully connected network includes multiple fully connected layers, and the random noise vector is preliminarily processed by the fully connected layer, and the long short-term memory network is used to capture the long-term dependency in the time series. The residual block alleviates the gradient vanishing problem in the deep network through jump connections. The self-attention module automatically adjusts the weight according to the correlation of the input features, focuses on the key features in the time series, and thus generates time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure, and cycle duration. The flow and pressure data are processed by the tanh activation function, and the cycle duration is limited to the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through the convolution layer, and combines spectral normalization to limit the norm of the weight. The PVA data generation model is trained and evaluated, and generated data is obtained based on the trained PVA data generation model.
[0008] A deep learning classification model is constructed, where the deep learning classification model is a hybrid model based on a convolutional neural network and a long short-term memory network. The deep learning classification model is trained and evaluated based on the generated data and real data, and the classification of PVA events is achieved based on the trained deep learning classification model.
[0009] In one possible design, the PVA waveform data is smoothed and resampled to obtain real data, including:
[0010] The PVA waveform data is subjected to outlier removal to remove invalid or noise data that deviates from the normal range, and the signal is smoothed using a sliding average filter. The processing process is shown in the following formula:
[0011] ;
[0012] Where, is the data after smoothing. N smooth is the size of the sliding window, t smooth For the current moment, is the index of each data point in the window, x ( i ) is the time point The original data value at .
[0013] Based on the smoothed data, the start and end time of each respiratory cycle are identified and divided by analyzing the zero-crossing point of the flow signal to obtain the data of each respiratory cycle;
[0014] Based on the data of each respiratory cycle, resampling is performed using the following formula to adjust the data of each respiratory cycle into multiple sample points to obtain the real data:
[0015] ;
[0016] Where, For real data, x 1 and x 2 is the value of the adjacent sample point, t 1 and t 2 is the time point of the adjacent sample points, t interpolated is the target time point after interpolation.
[0017] In one possible design, the flow and pressure data are processed through the tanh activation function as shown in the following formula:
[0018] ;
[0019] Where, tanh( x input ) is the activated flow and pressure data, e is a natural constant, x input Input flow and pressure data.
[0020] In one possible design, the convolutional layer output of the discriminator is processed by the ReLU activation function, and the features processed by the ReLU activation function are classified through the fully connected layer, and a scalar value is output. The scalar value is used to indicate whether the input data is real data. The ReLU activation function is expressed as:
[0021] ;
[0022] Where, Re LU ( x input ) is the flow and pressure data of linear activation, max is the maximum value function, x input The flow and pressure data are input.
[0023] In one possible design, training and evaluating the PVA data generation model includes:
[0024] During the training process, optimization is performed through the following loss function:
[0025] ;
[0026] Where, L WGAN represents the loss value, and They represent the discriminator's response to the real samples x real and generate samples Rating, p data and are the data distribution and the noise distribution, z fake represents random noise.
[0027] The mean square error and dynamic time warping are used to evaluate the quality of the generated data; the calculation formula of the mean square error is:
[0028] ;
[0029] Where, MSE Flow represents the mean square error between the generated traffic data and the real traffic data, MSE Press represents the mean square error between the generated pressure data and the true pressure data, N flow and N press Represents the number of samples of flow and pressure data respectively, i flow and ipress The sample numbers of flow and pressure data respectively, and are the flow and pressure values in the generated data, and are the flow and pressure values in the real data.
[0030] The dynamic time warping is used to evaluate the temporal alignment between the generated data and the real data. The calculation formula is as follows:
[0031] ;
[0032] Where, x signal and y signal are two time series that need to be aligned. w are all possible time-aligned paths, Ω is the set of time-aligned paths, k is the sample number, M represents the sequence length, min is the minimum function, DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, indicating the similarity between them.
[0033] In one possible design, the deep learning classification model extracts local features layer by layer in response to the input generated data and / or real data, captures the spatial information in the flow and pressure signals, and accesses the batch normalization and pooling layers, and feeds them into the bidirectional LSTM for time series modeling. The multi-head self-attention mechanism is introduced to dynamically adjust the weights of the time steps, thereby optimizing the learning of key moments. The input generated data and / or real data are processed by convolution, batch normalization, pooling, bidirectional LSTM and multi-head self-attention mechanism, flattened by the flattening layer, and fed into the fully connected layer for classification. The fully connected layer uses the ReLU activation function and outputs the predicted probability of each category through the Softmax activation function. The Softmax activation function is expressed as:
[0034] ;
[0035] Where, x i Indicates the i The output value of each category, K is the total number of categories, e is a natural constant, j is a sum index, representing the index of all possible categories, softmax( xi ) for each category The normalized probability value.
[0036] In one possible design, training and evaluating the deep learning classification model based on the generated data and real data includes:
[0037] The Adam optimizer is used for training, the learning rate is set to 1×10-5, and the cross entropy function is used as the loss function, as shown in the following formula:
[0038] ;
[0039] Where, L is the cross loss value, y i is the true label, is the probability distribution predicted by the model.
[0040] In a second aspect, the present application provides a device for human-machine asynchronous diagnosis of a mechanically ventilated patient, the device comprising:
[0041] The data preprocessing module is configured to perform smoothing and resampling on the PVA waveform data to obtain real data;
[0042] A data generation module is configured to construct a PVA data generation model based on a generative adversarial network. The PVA data generation model includes a generator and a discriminator. The generator includes a multi-layer fully connected network, a long short-term memory network, a residual block and a self-attention module. The multi-layer fully connected network includes multiple fully connected layers. The random noise vector is preliminarily processed by the fully connected layer, and the long short-term memory network is used to capture the long-term dependency in the time series. The residual block alleviates the gradient vanishing problem in the deep network through jump connections. The self-attention module automatically adjusts the weight according to the correlation of the input features, focuses on the key features in the time series, and thus generates time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure and cycle duration. The flow and pressure data are processed by the tanh activation function, and the cycle duration is limited to the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through the convolution layer, and combines spectral normalization to limit the norm of the weight; the PVA data generation model is trained and evaluated, and generated data is obtained based on the trained PVA data generation model;
[0043] The asynchronous diagnosis module is configured to build a deep learning classification model, which is a hybrid model based on a convolutional neural network and a long short-term memory network. The deep learning classification model is trained and evaluated based on the generated data and real data, and the classification of PVA events is realized based on the trained deep learning classification model.
[0044] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the human-machine asynchronous diagnosis method for mechanically ventilated patients as described in the first aspect and various possible designs of the first aspect.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the human-machine asynchronous diagnosis method for mechanically ventilated patients as described in the first aspect and various possible designs of the first aspect is implemented.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the human-machine asynchronous diagnosis method for mechanically ventilated patients as described in the first aspect and various possible designs of the first aspect.
[0047] The method, apparatus, device, and storage medium for diagnosing human-machine asynchronous communication in mechanically ventilated patients provided in this application have at least the following beneficial effects:
[0048] 1. Solved the problem of PVA data scarcity.
[0049] This application uses a generative adversarial network (GAN) to generate diverse and high-quality PVA waveform data, successfully overcoming the scarcity and imbalance of PVA data in existing technologies. The generated data effectively expands the dataset, providing more training samples, significantly improving the learning performance and training stability of the classification model for low-sample categories, and thus enhancing the classification accuracy of PVA events.
[0050] 2. Improved the generalization ability and classification effect of the classification model.
[0051] This application combines generated data with real data to optimize classification model performance. In particular, for low-sample categories, the generated data provides sufficient samples for the model, avoiding overfitting and thus improving the model's training and classification performance. Compared to traditional methods, the generated data enhances the model's adaptability, enabling it to better cope with complex clinical scenarios and improve its ability to identify different types of PVA events.
[0052] 3. Provide more accurate support for clinical decision-making.
[0053] This application provides an efficient intelligent PVA recognition system by combining the generated PVA data with a hybrid classification model based on a convolutional neural network (CNN) and a long short-term memory network (LSTM). It can accurately identify PVA events in mechanically ventilated patients in real time, helping medical staff make timely and accurate treatment decisions, thereby improving the treatment effect and prognosis of critically ill patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0055] Figure 1 A flowchart of a method for diagnosing human-machine asynchronous communication in a mechanically ventilated patient provided in an embodiment of the present application;
[0056] Figure 2 Comparison diagrams before and after resampling of respiratory cycles provided in the embodiments of the present application; (a) before and after flow resampling; (b) before and after pressure resampling;
[0057] Figure 3 An architectural diagram of a generator provided in an embodiment of the present application;
[0058] Figure 4 An architectural diagram of a discriminator provided in an embodiment of the present application;
[0059] Figure 5 This is an architectural diagram of the deep learning classification model provided in the embodiments of the present application;
[0060] Figure 6 This is a schematic structural diagram of a human-machine asynchronous diagnostic device for mechanically ventilated patients provided in an embodiment of the present application.
[0061] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0062] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0063] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0064] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0065] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0066] An embodiment of the present application provides a human-machine asynchronous diagnosis method for mechanically ventilated patients, which collects the patient's respiratory data through a multi-parameter sensor, including key parameters such as pressure and flow, and transmits it to a data terminal in real time via Bluetooth. After preliminary processing, the data is sent to a GAN-based data generation model to generate PVA waveform data that conforms to the characteristics of the real data. The generated data is combined with the real data and input into a hybrid classification model based on a convolutional neural network (CNN) and a long short-term memory network (LSTM) for training, extracting time series features and performing multi-classification. After training is completed, the model can accurately identify various types of PVA events and help clinicians optimize clinical decisions. Finally, by interacting with the cloud database, real-time classification results are provided to assist doctors in improving the treatment effect and prognosis of mechanically ventilated patients.
[0067] Specifically, if Figure 1 As shown, it is a flow chart of a method for diagnosing human-machine asynchronousness in a mechanically ventilated patient provided by an embodiment of the present application. The method for diagnosing human-machine asynchronousness in a mechanically ventilated patient includes the following steps S100-S300.
[0068] S100: Smoothing and resampling the PVA waveform data to obtain real data.
[0069] It should be noted that the PVA waveform data described in this article refers to the flow and pressure changes over time in the case of asynchronous patient-ventilator interaction. This data is generally collected through the sensor components equipped with the ventilator, such as pressure sensors and flow sensors.
[0070] In some embodiments, the collected PVA waveform data is subjected to outlier removal to remove invalid or noise data that deviates from the normal range. A sliding average filter is used to smooth the signal to reduce the interference of high-frequency noise and ensure the smoothness of the data, as shown in Formula (1), which can better reflect the patient's true respiratory state.
[0071] ;
[0072] Where, is the data after smoothing. N smooth is the size of the sliding window, t smooth For the current moment, is the index of each data point in the window, x ( i ) is the time point The original data value at .
[0073] After smoothing, the start and end times of each respiratory cycle are identified and divided by analyzing the zero-crossing points of the flow signal. To ensure the consistency of the data length of each respiratory cycle, the data of each cycle is resampled using linear interpolation, as shown in Equation (2). The flow and pressure data of each cycle are adjusted to 150 sample points, providing unified input data for subsequent PVA classification and recognition.
[0074] ;
[0075] Where, For real data, x 1 and x 2 is the value of the adjacent sample point, t 1 and t 2 is the time point of the adjacent sample points, t interpolated is the target time point after interpolation.
[0076] like Figure 2 , which is a comparison diagram before and after the respiratory cycle resampling provided in an embodiment of the present application.
[0077] S200: Construct a PVA data generation model based on a generative adversarial network, train and evaluate the PVA data generation model, and obtain generated data based on the trained PVA data generation model.
[0078] In this embodiment, the purpose of step S200 is to design a PVA data generation model based on a generative adversarial network (GAN) to generate high-quality and diverse PVA waveform data of mechanically ventilated patients, so as to solve the problems of PVA data scarcity and data imbalance in the prior art.
[0079] Among them, the PVA data generation model based on the generative adversarial network includes a generator and a discriminator. The architecture diagrams of the generator and the discriminator are as follows: Figure 3 and Figure 4 As shown in the figure, the generator architecture consists of the following: fully connected layer 1, fully connected layer 2, long short-term memory network, attention mechanism + residual block, one-dimensional convolution, dropout + batch normalization, and fully connected layer. The discriminator architecture consists of the following: one-dimensional convolution layer + ReLU activation function, flattening layer, fully connected layer 1, dropout, and fully connected layer 2.
[0080] The generator uses a structure that combines a multi-layer fully connected network with a long short-term memory network (LSTM). The fully connected layer performs preliminary processing on the random noise vector, and the LSTM layer is used to capture long-term dependencies in the time series. It is particularly suitable for processing the complex time series characteristics of flow and pressure signals. The generator also introduces residual blocks (ResNet) and self-attention modules. The residual blocks alleviate the gradient vanishing problem in deep networks through skip connections. The self-attention module automatically adjusts the weights based on the correlation of input features, focusing on key features in the time series, thereby generating time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure, and cycle duration. The flow and pressure data are processed using the tanh activation function, as shown in Equation (3). The cycle duration is limited to the range of 1.5 to 15 seconds to ensure the rationality of the generated data.
[0081] ;
[0082] Where, tanh( x input ) is the activated flow and pressure data, e is a natural constant, x input The flow and pressure data are input.
[0083] The discriminator uses a convolutional neural network (CNN) structure to extract features from the input data through convolutional layers. Spectral normalization is used to limit the norm of the weights to prevent overfitting and improve training stability. The output of the discriminator's convolutional layer is processed by the ReLU activation function, as shown in Equation (4). Finally, the extracted features are classified through a fully connected layer, and a scalar value is output to indicate whether the input data is real data.
[0084] ;
[0085] Where, Re LU ( x input) is the flow and pressure data of linear activation, max is the maximum value function, x input Input flow and pressure data.
[0086] In some embodiments, the training and evaluation process of the PVA data generation model is as follows:
[0087] During the training process, Wasserstein loss (WGAN) is used for optimization, as shown in Equation (5), to avoid the gradient vanishing problem in traditional GAN and accelerate model convergence.
[0088] ;
[0089] Where, L WGAN represents the loss value, and They represent the discriminator's response to the real samples x real and generate samples Rating, p data and are the data distribution and the noise distribution, z fake represents random noise.
[0090] The Adam optimizer (lr=1e-5, β1=0.5, β2=0.999) was used for training, and the learning rate was set to 1×10 -5 , the batch size is 8, the training cycle is 3000 epochs, and the gradient penalty coefficient λ gp =10 to improve training stability.
[0091] In order to further evaluate whether the flow, pressure, and cycle time output by the generator are highly similar to the real data and whether the training dataset can be effectively expanded, the present invention uses mean square error (MSE) and dynamic time warping (DTW) to evaluate the quality of the generated data. MSE is used to measure the difference in values between the generated data and the real data, and its formula is shown in Equations (6) and (7).
[0092] ;
[0093] Where, MSE Flow represents the mean square error between the generated traffic data and the real traffic data, MSE Press represents the mean square error between the generated pressure data and the true pressure data, N flow and N pressRepresents the number of samples of flow and pressure data respectively, i flow and i press The sample numbers of flow and pressure data respectively, and are the flow and pressure values in the generated data, and are the flow and pressure values in the real data.
[0094] DTW is used to evaluate the degree of temporal alignment between generated data and real data. The calculation formula is as shown in Equation (8), which is used to calculate the matching distance between two time series.
[0095] ;
[0096] Where, x signal and y signal are two time series that need to be aligned. w are all possible time-aligned paths, Ω is the set of time-aligned paths, k is the sample number, M represents the sequence length, min is the minimum function, DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, indicating the similarity between them.
[0097] S300: Build a deep learning classification model, train and evaluate the deep learning classification model based on generated data and real data, and classify PVA events based on the trained deep learning classification model.
[0098] The purpose of step S300 is to provide a hybrid model based on a convolutional neural network (CNN) and a long short-term memory network (LSTM) for classifying PVA events in mechanically ventilated patients. By combining data generated by a generative adversarial network (GAN) with real data, the model overcomes data scarcity and achieves better performance in PVA event classification.
[0099] like Figure 5Figure 2 shows the architecture of a deep learning classification model. The deep learning classification model uses a multi-layer convolutional neural network (CNN) for feature extraction. The convolution layer extracts local features layer by layer to capture spatial information in the flow and pressure signals, and then connects to the batch normalization and average pooling layers. The features after the convolution operation are processed by the pooling layer and then sent to the bidirectional LSTM for time series modeling. LSTM can capture long-term dependencies, while the bidirectional LSTM simultaneously learns forward and backward time series information, thereby improving the time series modeling capability. At the same time, a multi-head self-attention mechanism (MHA) is introduced to dynamically adjust the weights of time steps to optimize the learning of key moments. After being processed by convolution, LSTM, and self-attention mechanisms, the features are flattened by the flattening layer and sent to the fully connected layer for classification. The fully connected layer uses the ReLU activation function. Finally, the softmax activation function outputs the predicted probability of each category, as shown in Equation (9).
[0100] ;
[0101] Where, x i Indicates the i The output value of each category, K is the total number of categories, e is a natural constant, j is a sum index, representing the index of all possible categories, softmax( x i ) for each category The normalized probability value.
[0102] For example, the specific layer structure and parameters of the deep learning classification model are shown in Table 1.
[0103] Table 1 Specific layer structure and parameters of deep learning classification model
[0104] type Output shape Number of parameters Input layer (None, 300, 1) 0 One-dimensional convolutional layer (None, 296, 16) 256 Batch Normalization Layer (None, 296, 16) 64 One-dimensional pooling layer (None, 148, 16) 0 Dropout layer (rate=0.3) (None, 148, 16) 0 One-dimensional convolutional layer (None, 146, 32) 3104 Batch Normalization Layer (None, 146, 32) 128 One-dimensional pooling layer (None, 73, 32) 0 Dropout layer (rate=0.3) (None, 73, 32) 0 One-dimensional convolutional layer (None, 72, 64) 12352 Batch Normalization Layer (None, 72, 64) 256 One-dimensional pooling layer (None, 36, 64) 0 Dropout layer (rate=0.3) (None, 36, 64) 0 One-dimensional convolutional layer (None, 35, 128) 32896 Batch Normalization Layer (None, 35, 128) 512 One-dimensional pooling layer (None, 17, 128) 0 Dropout layer (rate=0.3) (None, 17, 128) 0 Bidirectional LSTM layer (None, 17, 256) 197376 Dropout layer (rate=0.3) (None, 17, 256) 0 Multi-head attention layer (None, 17, 256) 131328 Flat Layer (None, 4352) 0 Fully connected layer (None, 100) 435300 Dropout layer (rate=0.5) (None, 100) 0 Fully connected layer (None, 5) 505
[0105] In some embodiments, the specific process of training and evaluating the deep learning classification model is as follows:
[0106] The Adam optimizer is used for training, and the learning rate is set to 1×10 -5The loss function used is the Categorical Cross-Entropy function, as shown in Equation (10). During training, the model undergoes 3000 epochs, with each batch size being 32. To improve training efficiency, a learning rate scheduler (StepLR) is also used. This scheduler dynamically adjusts the learning rate based on a preset step size and decay factor, aiming to accelerate model convergence and avoid overfitting.
[0107] ;
[0108] Where, L is the cross loss value, y i is the true label, is the probability distribution predicted by the model.
[0109] After training, the model's performance is comprehensively evaluated using multiple metrics, including classification accuracy, F1-score, precision, and recall. Classification accuracy measures the model's overall performance on the test set. F1-score, a weighted average of precision and recall, is particularly suitable for classification problems in imbalanced datasets. Precision and recall respectively assess the model's detection capability and classification accuracy in each category. Furthermore, the model uses a confusion matrix to further analyze the classification performance of each category, providing a reference for subsequent model optimization.
[0110] Through the above design, the advantages of CNN and LSTM are effectively combined, and the data generated by GAN is fully utilized to significantly improve the accuracy and generalization ability of PVA event classification, providing reliable support for clinical decision-making.
[0111] The present application also provides a device for human-machine asynchronous diagnosis of mechanically ventilated patients, such as Figure 6 As shown, the human-machine asynchronous diagnostic device for mechanically ventilated patients includes:
[0112] The data preprocessing module 601 is configured to perform smoothing and resampling on the PVA waveform data to obtain real data;
[0113] The data generation module 602 is configured to construct a PVA data generation model based on a generative adversarial network. The PVA data generation model includes a generator and a discriminator. The generator includes a multi-layer fully connected network, a long short-term memory network, a residual block, and a self-attention module. The multi-layer fully connected network includes multiple fully connected layers. The random noise vector is preliminarily processed by the fully connected layer, and the long short-term memory network is used to capture the long-term dependency in the time series. The residual block alleviates the gradient vanishing problem in the deep network through jump connections. The self-attention module automatically adjusts the weight according to the correlation of the input features and focuses on the key features in the time series, thereby generating time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure, and cycle duration. The flow and pressure data are processed by the tanh activation function, and the cycle duration is limited to the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through the convolution layer, and combines spectral normalization to limit the norm of the weight. The PVA data generation model is trained and evaluated, and generated data is obtained based on the trained PVA data generation model.
[0114] The asynchronous diagnosis module 603 is configured to construct a deep learning classification model, which is a hybrid model based on a convolutional neural network and a long short-term memory network. The deep learning classification model is trained and evaluated based on the generated data and real data, and the classification of PVA events is realized based on the trained deep learning classification model.
[0115] An embodiment of the present application provides an electronic device, which may include a processor and a memory, wherein the processor and the memory can communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.
[0116] The processor executes the computer-executable instructions stored in the memory, so that the processor implements the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0117] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. System buses can be categorized as address buses, data buses, and control buses. Transceivers facilitate communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) or non-volatile memory.
[0118] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0119] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the technical solution of the human-machine asynchronous diagnosis method for mechanically ventilated patients in the above embodiment.
[0120] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the human-machine asynchronous diagnosis method for mechanically ventilated patients in the above embodiment.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0122] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0123] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.
[0124] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The software function modules stored in a storage medium include a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some of the steps of the methods of various embodiments of the present application.
[0125] It should be understood that the processor described above may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0126] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0127] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, and control buses.
[0128] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0129] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0130] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for diagnosing human-machine asynchronous communication in mechanically ventilated patients, characterized in that: The method comprises: Smoothing and resampling the PVA waveform data to obtain real data; A PVA data generation model based on a generative adversarial network is constructed, wherein the PVA data generation model includes a generator and a discriminator. The generator includes a multi-layer fully connected network, a long short-term memory network, a residual block, and a self-attention module. The multi-layer fully connected network includes multiple fully connected layers, and the random noise vector is preliminarily processed by the fully connected layer, and the long short-term memory network is used to capture the long-term dependency in the time series. The residual block alleviates the gradient vanishing problem in the deep network through jump connections. The self-attention module automatically adjusts the weight according to the correlation of the input features, focuses on the key features in the time series, and thus generates time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure, and cycle duration. The flow and pressure data are processed by the tanh activation function, and the cycle duration is limited to the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through the convolution layer, and combines spectral normalization to limit the norm of the weight. The PVA data generation model is trained and evaluated, and generated data is obtained based on the trained PVA data generation model. A deep learning classification model is constructed, where the deep learning classification model is a hybrid model based on a convolutional neural network and a long short-term memory network. The deep learning classification model is trained and evaluated based on the generated data and real data, and the classification of PVA events is achieved based on the trained deep learning classification model.
2. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 1, characterized in that: The PVA waveform data is smoothed and resampled to obtain real data, including: The PVA waveform data is subjected to outlier removal to remove invalid or noise data that deviates from the normal range, and the signal is smoothed using a sliding average filter. The processing process is shown in the following formula: ; Where, is the data after smoothing. N smooth is the size of the sliding window, t smooth For the current moment, is the index of each data point in the window, x ( i ) is the time point The original data value at ; Based on the smoothed data, the start and end time of each respiratory cycle are identified and divided by analyzing the zero-crossing point of the flow signal to obtain the data of each respiratory cycle; Based on the data of each respiratory cycle, resampling is performed using the following formula to adjust the data of each respiratory cycle into multiple sample points to obtain the real data: ; Where, For real data, x 1 and x 2 is the value of the adjacent sample point, t 1 and t 2 is the time point of the adjacent sample points, t interpolated is the target time point after interpolation.
3. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 1, characterized in that: The flow and pressure data are processed by the tanh activation function as shown in the following formula: ; Where, tanh( x input ) is the activated flow and pressure data, e is a natural constant, x input The flow and pressure data are input.
4. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 1, characterized in that: The convolutional layer output of the discriminator is processed by the ReLU activation function, and the features processed by the ReLU activation function are classified through the fully connected layer, and a scalar value is output. The scalar value is used to indicate whether the input data is real data. The ReLU activation function is expressed as: ; Where, Re LU ( x input ) is the flow and pressure data of linear activation, max is the maximum value function, x input Input flow and pressure data.
5. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 1, characterized in that: The PVA data generation model is trained and evaluated, including: During the training process, optimization is performed using the following loss function: ; Where, L WGAN represents the loss value, and They represent the discriminator's response to the real samples x real and generate samples Rating, p data and are the data distribution and the noise distribution, z fake represents random noise; The mean square error and dynamic time warping are used to evaluate the quality of the generated data; the calculation formula of the mean square error is: ; Where, MSE Flow represents the mean square error between the generated traffic data and the real traffic data, MSE Press represents the mean square error between the generated pressure data and the true pressure data, N flow and N press Represents the number of samples of flow and pressure data respectively, i flow and i press The sample numbers of flow and pressure data respectively, and are the flow and pressure values in the generated data, and are the flow and pressure values in the real data; The dynamic time warping is used to evaluate the temporal alignment between the generated data and the real data. The calculation formula is as follows: ; Where, x signal and y signal are two time series that need to be aligned. w are all possible time-aligned paths, Ω is the set of time-aligned paths, k is the sample number, M represents the sequence length, min is the minimum function, DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, indicating the similarity between them.
6. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 1, characterized in that: The deep learning classification model extracts local features layer by layer in response to the input generated data and / or real data, captures the spatial information in the flow and pressure signals, and then connects to the batch normalization and pooling layers. The model is fed into the bidirectional LSTM for time series modeling, introduces a multi-head self-attention mechanism, and dynamically adjusts the weight of the time step to optimize the learning of key moments; The input generated data and / or real data are processed by convolution, batch normalization, pooling, bidirectional LSTM and multi-head self-attention mechanism, flattened by the flattening layer, and sent to the fully connected layer for classification. The fully connected layer uses the ReLU activation function and outputs the predicted probability of each category through the Softmax activation function; the Softmax activation function is expressed as: ; Where, x i Indicates the i The output value of each category, K is the total number of categories, e is a natural constant, j is a sum index, representing the index of all possible categories, softmax( x i ) for each category The normalized probability value.
7. The method for diagnosing human-machine asynchrony in mechanically ventilated patients according to claim 6, characterized in that: Training and evaluating the deep learning classification model based on the generated data and real data includes: The Adam optimizer is used for training, the learning rate is set to 1×10-5, and the cross entropy function is used as the loss function, as shown in the following formula: ; Where, L is the cross loss value, y i is the true label, is the probability distribution predicted by the model.
8. A human-machine asynchronous diagnostic device for mechanically ventilated patients, characterized in that: The device comprises: The data preprocessing module is configured to perform smoothing and resampling on the PVA waveform data to obtain real data; A data generation module is configured to construct a PVA data generation model based on a generative adversarial network. The PVA data generation model includes a generator and a discriminator. The generator includes a multi-layer fully connected network, a long short-term memory network, a residual block and a self-attention module. The multi-layer fully connected network includes multiple fully connected layers. The random noise vector is preliminarily processed by the fully connected layer, and the long short-term memory network is used to capture the long-term dependency in the time series. The residual block alleviates the gradient vanishing problem in the deep network through jump connections. The self-attention module automatically adjusts the weight according to the correlation of the input features, focuses on the key features in the time series, and thus generates time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow, pressure and cycle duration. The flow and pressure data are processed by the tanh activation function, and the cycle duration is limited to the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through the convolution layer, and combines spectral normalization to limit the norm of the weight; the PVA data generation model is trained and evaluated, and generated data is obtained based on the trained PVA data generation model; The asynchronous diagnosis module is configured to build a deep learning classification model, which is a hybrid model based on a convolutional neural network and a long short-term memory network. The deep learning classification model is trained and evaluated based on the generated data and real data, and the classification of PVA events is realized based on the trained deep learning classification model.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method for diagnosing human-machine asynchronous communication in a mechanically ventilated patient according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for human-machine asynchronous diagnosis of a mechanically ventilated patient according to any one of claims 1 to 7.
Citation Information
Patent Citations
Man-machine asynchronous identification method based on one-dimensional interpretable convolutional neural network
CN112560919A
Breathing machine rapid detection method and device, electronic equipment and storage medium
CN115998998A