Man-machine asynchronous diagnosis method, device and equipment for mechanical ventilation patient and storage medium
By generating high-quality PVA data from the generative adversarial network and combining with deep learning models, the data imbalance in human-computer asynchronous detection of mechanical ventilation patients is solved, and more accurate PVA event recognition and clinical support are achieved, improving the treatment effect.
Patent Information
- Application Number
- CN202510779810.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-07-11
- 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 performs poorly in the small sample categories, resulting in data imbalance and affecting the classification effect.
A 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, through data generation and smooth processing, resampling, and a hybrid model is constructed to identify PVA events.
It significantly improves the identification accuracy and adaptability of the PVA classification model, provides more accurate clinical support, and improves the treatment effect and prognosis of critically ill patients.
Smart Images

Figure CN120296528A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent control of medical devices, and particularly to a method, device, equipment and storage medium for diagnosing the asynchrony between a mechanical ventilator and a patient. Background Art
[0002] Mechanical ventilation is an important treatment means for critically ill patients. However, the occurrence of the asynchrony between a mechanical ventilator and a patient (PVA) often affects the treatment effect. Traditional PVA detection methods rely on clinicians to identify asynchronous phenomena through visual inspection and ventilator waveform evaluation. However, this method has limitations such as strong subjectivity and difficulty in real-time monitoring. Especially in high-load environments such as the ICU, it is difficult to achieve accurate and continuous monitoring. In recent years, deep learning classification models have been widely used in PVA identification, which can automatically identify PVA events and provide real-time diagnosis.
[0003] Due to the scarcity of data, especially the insufficient data in the few-shot categories, deep learning models face a serious problem of data imbalance in the PVA classification task. This results in poor performance of the model in the few-shot categories, affecting the overall classification effect, making the classification model more dependent on the categories with a larger amount of data, and thus neglecting the accurate identification of the few-shot categories. To solve this problem, some studies have adopted generative adversarial networks (GANs) to generate simulated data and expand the training data of the few-shot categories through data augmentation. However, most of the existing GAN technologies focus on the field of medical image generation. Although certain success has been achieved in generating high-quality medical images (such as CT, MRI images, etc.), there are still deficiencies in generating PVA waveform data. PVA waveform data involves complex temporal features and multiple respiratory parameters. The existing GAN methods fail to fully capture the complexity in real clinical data, resulting in the generated data being difficult to fully reflect the true conditions of clinical patients, and thus limiting the effect of the data in optimizing the training of the PVA classification model. Summary of the Invention
[0004] The present application provides a method, device, equipment and storage medium for diagnosing the asynchrony between a mechanical ventilator and a patient, and 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-based PVA classification and recognition model based on the generated PVA data to solve the problem of data imbalance faced by the PVA recognition task in the prior art. The high-quality and diverse PVA waveform data generated by the GAN provides richer training samples for the deep learning classification model, significantly improving the recognition accuracy of the PVA classification model and its adaptability to complex clinical environments, enabling it to better handle various asynchronous events. The present application overcomes the limitation of the insufficient generalization ability of the traditional method 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 the asynchrony between a mechanical ventilator and a patient, including: Performing smoothing processing and resampling processing on the PVA waveform data to obtain real data; Constructing a PVA data generation model based on a generative adversarial network, the PVA data generation model including a generator and a discriminator, the generator including 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 including a plurality of fully connected layers, preliminarily processing a random noise vector through the fully connected layers, and using the long short-term memory network to capture long-term dependencies in the time series, the residual block alleviating the problem of gradient disappearance in the deep network through skip connections, and the self-attention module automatically adjusting weights according to the correlation of input features and paying attention to key features in the time series, so as to generate time series data conforming to the characteristics of the actual respiratory cycle, the output of the generator including flow rate, pressure and cycle duration, the flow rate and pressure data being processed through a tanh activation function, and the cycle duration being limited within the range of 1.5 to 15 seconds, the discriminator adopting a convolutional neural network structure, extracting features of the input data through convolutional layers, and combining spectral normalization to limit the norm of the weights; training and evaluating the PVA data generation model, and obtaining generated data based on the trained PVA data generation model; Constructing a deep learning classification model, the deep learning classification model being a hybrid model based on a convolutional neural network and a long short-term memory network, training and evaluating the deep learning classification model based on the generated data and the real data, and realizing the classification of PVA events based on the trained deep learning classification model.
[0006] In a possible design, performing smoothing processing and resampling processing on the PVA waveform data to obtain real data includes: Outlier rejection is performed on the PVA waveform data to remove invalid or noise data that deviates from the normal range. A moving average filter is used to smooth the signal, and the processing process is shown in the following formula: ; In the formula, is the data after smoothing processing, N smooth is the size of the moving window, t smooth is the current time, is the index of each data point within the window, x ( i ) is the original data value at time point .
[0007] Based on the data after smoothing processing, by analyzing the zero-crossing points of the flow signal, the start and end times of each respiratory cycle are identified and divided to obtain the data of each respiratory cycle; Based on the data of each respiratory cycle, resampling processing is performed through the following formula to adjust the data of each respiratory cycle into multiple sample points to obtain the real data: ; In the formula, is the real data, x 1 and x 2 are the values of adjacent sample points, t 1 and t 2 are the time points of adjacent sample points, t interpolated is the target time point after interpolation.
[0008] In a possible design, the processing of the flow and pressure data through the tanh activation function is shown in the following formula: ; In the formula, tanh( x input ) is the activated flow and pressure data, e is the natural constant, x input is the input flow and pressure data.
[0009] In a possible design, the output of the convolutional layer of the discriminator is processed through the ReLU activation function, and the features processed by the ReLU activation function are classified through the fully connected layer to output a scalar value. The scalar value is used to indicate whether the input data is real data. The ReLU activation function is expressed as: ; In the formula, Re LU (x input ) is the linearly activated flow and pressure data, max is the maximum value function, x input are the input flow and pressure data.
[0010] In a possible design, training and evaluating the PVA data generation model includes: During the training process, optimize through the following loss function: ; In the formula, L WGAN represents the loss value, and respectively represent the discriminator's scores for the real sample x real and the generated sample ; p data and are the data distribution and the noise distribution respectively, z fake represents the random noise.
[0011] Use the mean square error and dynamic time warping to evaluate the quality of the generated data; among them, the calculation formula of the mean square error is: ; In the formula, MSE Flow represents the mean square error between the generated flow data and the real flow data, MSE Press represents the mean square error between the generated pressure data and the real pressure data, N flow and N press respectively represent the number of samples of the flow and pressure data, i flow and i press are the sample serial numbers of the flow and pressure data respectively, and are the flow and pressure values in the generated data respectively, and are the flow and pressure values in the real data.
[0012] The dynamic time warping is used to evaluate the degree of temporal alignment between the generated data and the real data, and the calculation formula is as follows: ; In the formula, x signal and ysignal are two time series to be aligned respectively w is all possible time alignment paths, and Ω is the set of time alignment paths k is the serial number of the sample M represents the sequence length min is the minimum value function DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, representing the similarity between them
[0013] In a 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 then sends them into a bidirectional LSTM for time series modeling. The multi-head self-attention mechanism is introduced to dynamically adjust the weights of time steps, so as to optimize the learning of critical moments; after the input generated data and / or real data are processed by convolution, batch normalization, pooling, bidirectional LSTM and multi-head self-attention mechanism, they are flattened through a flattening layer and sent into a fully connected layer for classification. The fully connected layer uses the ReLU activation function and outputs the prediction probability of each class through the Softmax activation function; the Softmax activation function is expressed as: ; In the formula, x i represents the output value of the i th class K is the total number of classes e is the natural constant j is a summation index, representing the index of all possible classes. softmax( x i ) is the probability value after normalization for each class
[0014] In a possible design, training and evaluating the deep learning classification model based on the generated data and real data includes: The training uses the Adam optimizer, the learning rate is set to 1×10-5, and the loss function selects the cross-entropy function, as shown in the following formula: ; In the formula, L is the cross-loss value y i is the true label is the probability distribution predicted by the model
[0015] In a second aspect, the present application provides a device for diagnosing the asynchrony between a mechanical ventilator and a patient, the device comprising: A data preprocessing module, configured to perform smoothing processing and resampling processing on the PVA waveform data to obtain real data; A data generation module, configured to construct a PVA data generation model based on a generative adversarial network, the PVA data generation model including a generator and a discriminator, the generator including 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 including a plurality of fully connected layers, initially processing a random noise vector through the fully connected layers, and using the long short-term memory network to capture long-term dependencies in the time series, the residual block alleviating the problem of vanishing gradients in deep networks through skip connections, and the self-attention module automatically adjusting weights according to the correlation of input features and focusing on key features in the time series, thereby generating time series data conforming to the characteristics of the actual respiratory cycle, the output of the generator including flow rate, pressure, and cycle duration, the flow rate and pressure data being processed through a tanh activation function, and the cycle duration being limited within a range of 1.5 to 15 seconds, the discriminator adopting a convolutional neural network structure, extracting features of the input data through convolutional layers, and combining spectral normalization to limit the norm of the weights; training and evaluating the PVA data generation model, and obtaining generated data based on the trained PVA data generation model; An asynchrony diagnosis module, configured to construct a deep learning classification model, the deep learning classification model being a hybrid model based on a convolutional neural network and a long short-term memory network, training and evaluating the deep learning classification model based on the generated data and the real data, and realizing the classification of PVA events based on the trained deep learning classification model.
[0016] 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, such that the at least one processor executes the method for diagnosing the asynchrony between a mechanical ventilator and a patient as described in the first aspect above and various possible designs of the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for diagnosing the asynchrony between a mechanical ventilator and a patient as described in the first aspect above and various possible designs of the first aspect is implemented.
[0018] Fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which when executed by a processor, implements the method for diagnosing asynchrony between human and machine of a mechanically ventilated patient as described in the first aspect above and various possible designs of the first aspect.
[0019] The method, device, equipment and storage medium for diagnosing asynchrony between human and machine of a mechanically ventilated patient provided by the present application have at least the following beneficial effects: 1. Solve the problem of scarce PVA data.
[0020] Based on the generative adversarial network (GAN), the present application generates diverse and high-quality PVA waveform data, successfully overcoming the problems of scarce and unbalanced PVA data in the prior art. The generated data can effectively expand the data set, provide more training samples, significantly improve the learning effect and training stability of the classification model on few-shot classes, and thus improve the classification accuracy of PVA events.
[0021] 2. Improve the generalization ability and classification effect of the classification model.
[0022] The present application combines the generated data and real data, optimizes the performance of the classification model. Especially for few-shot classes, the generated data provides sufficient samples for the model, avoiding the overfitting phenomenon, thus improving the training effect and classification performance of the model. Compared with the traditional method, the generated data enhances the adaptability of the model, enabling it to better handle complex clinical scenarios and improving the recognition ability of different types of PVA events.
[0023] 3. Provide more accurate support for clinical decision-making.
[0024] By combining the generated PVA data and a hybrid classification model based on convolutional neural network (CNN) and long short-term memory network (LSTM), the present application provides an efficient intelligent PVA recognition system, which can identify PVA events of mechanically ventilated patients in real time and accurately, help medical staff make timely and accurate treatment decisions, and thus improve the treatment effect and prognosis of critically ill patients. Description of the Drawings
[0025] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0026] Figure 1 It is a flowchart of a method for diagnosing asynchrony between human and machine of a mechanically ventilated patient provided by an embodiment of the present application; Figure 2 It is a comparison diagram before and after resampling of the respiratory cycle provided by an embodiment of the present application; among them, (a) is the comparison before and after resampling of flow; (b) is the comparison before and after resampling of pressure; Figure 3 It is the architecture diagram of the generator provided by the embodiment of the present application; Figure 4 It is the architecture diagram of the discriminator provided by the embodiment of the present application; Figure 5 It is the architecture diagram of the deep learning classification model provided by the embodiment of the present application; Figure 6 It is the structural schematic diagram of a device for diagnosing the asynchronous human-machine of a mechanically ventilated patient provided by the embodiment of the present application.
[0027] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Specific Embodiments
[0028] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0029] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision, and disclosure of information such as financial data or user data all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0030] It should be noted that in the embodiments of the present application, some industry-existing solutions such as certain software, components, and models may be mentioned. They should be considered exemplary, and their purpose is only to illustrate the feasibility in the implementation of the technical solution of the present application, but it does not mean that the applicant has already or necessarily used this solution.
[0031] Next, the technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail with specific embodiments. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Next, the embodiments of the present application will be described with reference to the drawings.
[0032] An embodiment of the present application provides a method for diagnosing human-machine asynchrony in mechanically ventilated patients. This method collects the patient's respiratory data through a multi-parameter sensor, including key parameters such as pressure and flow, and transmits it to the data terminal in real time via Bluetooth. After preliminary processing, the data is fed into a data generation model based on GAN to generate PVA waveform data that conforms to the characteristics of 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 to extract temporal features and perform multi-classification. After training, the model can accurately identify various PVA events to 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.
[0033] Specifically, as Figure 1 shown, it is a flowchart of a method for diagnosing human-machine asynchrony in mechanically ventilated patients provided by an embodiment of the present application. This method for diagnosing human-machine asynchrony in mechanically ventilated patients includes the following steps S100 - S300.
[0034] S100: Smooth and resample the PVA waveform data to obtain real data.
[0035] It should be noted that the PVA waveform data described herein refers to the data of the flow and pressure changing with time in the case of human-machine asynchrony. It is generally collected through the sensing components equipped on the ventilator, such as pressure sensors, flow sensors, etc.
[0036] In some embodiments, outliers are removed from the collected PVA waveform data to remove invalid or noise data that deviates from the normal range. A moving 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 Equation (1), it can better reflect the patient's real respiratory state.
[0037] ; In the formula, is the data after smoothing, N smooth is the size of the moving window, t smooth is the current moment, is the index of each data point within the window, x ( i ) is the original data value at the time point .
[0038] After the smoothing process, by analyzing the zero-crossing points of the flow signal, the start and end times of each respiratory cycle are identified and divided. To ensure that the data length of each respiratory cycle is consistent, the data of each cycle is resampled. Using the linear interpolation method, 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.
[0039] ; In the formula, is the real data, x 1 and x 2 are the values of adjacent sample points, t 1 and t 2 are the time points of adjacent sample points, t interpolated is the target time point after interpolation.
[0040] As Figure 2 shown, it is a comparison chart before and after resampling of the respiratory cycle provided by the embodiment of the present application.
[0041] 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.
[0042] In this embodiment, the purpose of step S200 is to design a PVA data generation model based on a generative adversarial network (GAN) for generating high-quality and diverse PVA waveform data of mechanically ventilated patients to solve the problems of scarce PVA data and data imbalance in the prior art.
[0043] Among them, the PVA data generation model based on a generative adversarial network includes a generator and a discriminator. The architecture diagrams of the generator and the discriminator are respectively as Figure 3 and Figure 4 shown. Among them, in the overall architecture of the generator, there are successively arranged a fully connected layer 1, a fully connected layer 2, a long short-term memory network, an attention mechanism + residual block, a one-dimensional convolution, Dropout + batch normalization, and a fully connected layer. In the overall architecture of the discriminator, there are successively arranged a one-dimensional convolutional layer + Relu activation function, a flattening layer, a fully connected layer 1, Dropout, and a fully connected layer 2.
[0044] The generator adopts a structure that combines a multi-layer fully connected network and a long short-term memory network (LSTM). It preliminarily processes the random noise vector through the fully connected layer and uses the LSTM layer to capture the long-term dependencies in the time series, which is particularly suitable for processing the complex time series characteristics of flow and pressure signals. The generator also introduces a residual block (ResNet) and a self-attention module. The residual block alleviates the vanishing gradient problem in the deep network through skip connections, and the self-attention module automatically adjusts the weights according to the correlation of the input features, focusing on the key features in the time series, so as to generate 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 through the tanh activation function, as shown in Equation (3). The cycle duration is restricted within the range of 1.5 to 15 seconds to ensure the rationality of the generated data.
[0045] ; where tanh( x input ) are the activated flow and pressure data, e is the natural constant, x input are the input flow and pressure data.
[0046] The discriminator adopts a convolutional neural network (CNN) structure. It extracts the features of the input data through the convolutional layer and combines the spectral normalization technology to limit the norm of the weights, prevent overfitting, and improve the training stability. The output of the convolutional layer of the discriminator is processed through the ReLU activation function, as shown in Equation (4). Finally, the extracted features are classified through the fully connected layer, and a scalar value is output, indicating whether the input data is real data.
[0047] ; where Re LU ( x input ) are the linearly activated flow and pressure data, max is the maximum value function, x input are the input flow and pressure data.
[0048] In some embodiments, the training and evaluation process of the PVA data generation model is as follows: During the training process, the Wasserstein loss (WGAN) is adopted for optimization, as shown in Equation (5), to avoid the vanishing gradient problem in the traditional GAN and accelerate the model convergence.
[0049] ; where L WGANDenotes the loss value, and respectively denote the discriminator's scores for real samples x real and generated samples . p data and are the data distribution and the noise distribution respectively, z fake denotes random noise.
[0050] Adam optimizer is selected for training (lr = 1e-5, β1 = 0.5, β2 = 0.999), the learning rate is set to 1×10 -5 , the batch size is 8, the training period is 3000 epochs, and the gradient penalty coefficient λ gp = 10 to improve training stability.
[0051] To further evaluate whether the flow rate, pressure, and cycle time output by the generator are highly similar to the real data and whether the training data set can be effectively expanded. The present invention uses the mean square error (MSE) and dynamic time warping (DTW) to evaluate the quality of the generated data. MSE is used to measure the numerical difference between the generated data and the real data, and its formula is shown in Equations (6) and (7).
[0052] ; In the formula, MSE Flow denotes the mean square error between the generated flow rate data and the real flow rate data, MSE Press denotes the mean square error between the generated pressure data and the real pressure data, N flow and N press respectively denote the number of samples of the flow rate and pressure data, i flow and i press are the sample serial numbers of the flow rate and pressure data respectively, and are the flow rate and pressure values in the generated data respectively, and are the flow rate and pressure values in the real data.
[0053] DTW is used to evaluate the temporal alignment degree between the generated data and the real data, and the calculation formula is shown in Equation (8), which is used to calculate the matching distance between two time series.
[0054] ; In the formula, xsignal and y signal are two time series to be aligned respectively, w is all possible time alignment paths, and Ω is the set of time alignment paths, k is the sample number, M represents the sequence length, min is the minimum value function, DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, representing the similarity between them.
[0055] S300: Build a deep learning classification model, train and evaluate the deep learning classification model based on the generated data and real data, and realize the classification of PVA events based on the trained deep learning classification model.
[0056] The purpose of step S300 is to provide a hybrid model based on convolutional neural network (CNN) and long short-term memory network (LSTM) for classifying PVA events in mechanically ventilated patients. By combining the data generated by the generative adversarial network (GAN) with real data, it helps the model overcome the data scarcity problem and achieve better performance in PVA event classification.
[0057] As Figure 5 shown, it is the architecture diagram of the deep learning classification model. The deep learning classification model uses a multi-layer convolutional neural network (CNN) for feature extraction. The convolutional layer captures the spatial information in the flow and pressure signals by extracting local features layer by layer, and is connected to the batch normalization and average pooling layer. After the features after the convolutional operation are processed by the pooling layer, they are sent to the bidirectional LSTM for time series modeling. The LSTM can capture long-term dependencies, and the bidirectional LSTM learns the forward and backward time series information simultaneously, thereby improving the time series modeling ability. At the same time, the multi-head self-attention mechanism (MHA) is introduced to dynamically adjust the weights of time steps, so as to optimize the learning of critical moments. After the features are processed by convolution, LSTM and self-attention mechanism, they are flattened through a flattening layer and sent to a fully connected layer for classification. The fully connected layer uses the ReLU activation function. Finally, the predicted probability of each category is output through the Softmax activation function, as shown in Equation (9).
[0058] ; In the formula, x i represents the output value of the i th category,K is the total number of categories, e is the natural constant, j is a summation index representing the indices of all possible categories, softmax( x i ) is the probability value after normalization for each category .
[0059] Exemplarily, the specific layer structure and parameters of the deep learning classification model are shown in Table 1.
[0060] Table 1 Specific layer structure and parameters of the deep learning classification model Type Output Shape Number of Parameters Input Layer (None, 300, 1) 0 1D Convolutional Layer (None, 296, 16) 256 Batch Normalization Layer (None, 296, 16) 64 1D Pooling Layer (None, 148, 16) 0 Dropout Layer (rate = 0.3) (None, 148, 16) 0 1D Convolutional Layer (None, 146, 32) 3104 Batch Normalization Layer (None, 146, 32) 128 1D Pooling Layer (None, 73, 32) 0 Dropout Layer (rate = 0.3) (None, 73, 32) 0 1D Convolutional Layer (None, 72, 64) 12352 Batch Normalization Layer (None, 72, 64) 256 1D Pooling Layer (None, 36, 64) 0 Dropout Layer (rate = 0.3) (None, 36, 64) 0 1D Convolutional Layer (None, 35, 128) 32896 Batch Normalization Layer (None, 35, 128) 512 1D 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 Flatten Layer (None, 4352) 0 Fully Connected Layer (None, 100) 435300 Dropout Layer (rate = 0.5) (None, 100) 0 Fully Connected Layer (None, 5) 505 In some embodiments, the specific process of training and evaluating the deep learning classification model is as follows: The training uses the Adam optimizer, and the learning rate is set to 1×10 -5 . The loss function selects the cross-entropy (CategoricalCross-Entropy) function, as shown in Equation (10). During the training process, the model goes through 3000 epochs, and the size of each batch is 32. To improve the training efficiency, a learning rate scheduler (StepLR) is also used. This scheduler dynamically adjusts the learning rate according to the preset step size and decay factor, aiming to accelerate the model convergence and avoid overfitting.
[0061] ; In the formula, L is the cross-loss value, y i is the true label, is the probability distribution predicted by the model.
[0062] After training, multiple metrics such as classification accuracy, F1-score, precision, and recall are used to comprehensively evaluate the performance of the model. The classification accuracy measures the overall performance of the model on the test set. The F1-score, as the weighted average of precision and recall, is particularly suitable for classification problems in imbalanced datasets. Precision and recall respectively evaluate the detection ability and classification accuracy of the model in each category. In addition, the model further analyzes the classification effect of each category through the confusion matrix, providing a reference for subsequent model optimization.
[0063] Through the above design, the advantages of CNN and LSTM are effectively combined, and the data generated by GAN is fully utilized, significantly improving the accuracy and generalization ability of PVA event classification, providing reliable support for clinical decision-making.
[0064] The present application also provides a human-machine asynchronous diagnosis device for mechanically ventilated patients, such as Figure 6 As shown, the mechanical ventilation patient human-machine asynchronous diagnosis device comprises: The data preprocessing module 601 is configured to perform smoothing and resampling processing on the PVA waveform data to obtain real data; The data generation module 602 is configured to construct a PVA data generation model based on a generative adversarial network, wherein the PVA data generation model includes a generator and a discriminator, wherein the generator includes a multi-layer fully connected network, a long short-term memory network, a residual block and a self-attention module, wherein the multi-layer fully connected network includes multiple fully connected layers, wherein 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, and the residual block alleviates the gradient vanishing problem in the deep network through jump connections, and 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, wherein the output of the generator includes flow, pressure and cycle duration, and the flow and pressure data are processed by a tanh activation function, and the cycle duration is limited to a range of 1.5 to 15 seconds, and the discriminator adopts a convolutional neural network structure, extracts the features of the input data through a convolutional layer, and limits the norm of the weight in combination with spectral normalization; 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 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 the real data, and the classification of PVA events is realized based on the trained deep learning classification model.
[0065] An embodiment of the present application provides an electronic device, which may include: a processor and a memory, wherein the processor and the memory may communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.
[0066] The processor executes the computer execution instructions stored in the memory, so that the processor executes the scheme in the above embodiment. 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 gates or transistor logic devices, and discrete hardware components.
[0067] The communication bus can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The system bus can be divided into an address bus, a data bus, a control bus, etc. The transceiver is used to implement communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0068] The electronic device provided by the embodiment of the present application can be the terminal device of the above embodiment.
[0069] The embodiment of the present application also provides a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions run on a computer, the computer is caused to execute the technical solution of the mechanical ventilation patient-machine asynchrony diagnosis method in the above embodiment.
[0070] The embodiment of the present application also provides a computer program product. The computer program product includes a computer program, which is 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, the technical solution of the mechanical ventilation patient-machine asynchrony diagnosis method in the above embodiment can be implemented.
[0071] In the several embodiments provided by the present 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 only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of devices or modules can be in an electrical, mechanical, or other form.
[0072] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to implement the solution of this embodiment.
[0073] In addition, in each embodiment of the present application, each functional module can be integrated into a processing unit, or each module can exist physically alone, or two or more modules can be integrated into one unit. The unit formed by the above modules can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0074] The integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above software functional module is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods in each embodiment of the present application.
[0075] It should be understood that the above processor can be a central processing unit (Central Processing Unit, abbreviated as CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0076] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk, or an optical disc, etc.
[0077] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0078] The above storage medium can be implemented by any type of volatile or non-volatile storage 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 memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0079] An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component 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 master control device.
[0080] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk or optical disk that can store program codes.
[0081] 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 foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for diagnosing human-machine asynchrony in mechanically ventilated patients, characterized in that, The method includes: Performing smoothing processing and resampling processing on the PVA waveform data to obtain real data; Constructing 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 through the fully connected layer, and the long short-term memory network is used to capture the long-term dependencies in the time series. The residual block alleviates the vanishing gradient problem in the deep network through skip connections. The self-attention module automatically adjusts the weights according to the correlations of the input features, focusing on the key features in the time series, so as to generate time series data that conforms to the actual respiratory cycle characteristics. The output of the generator includes flow rate, pressure, and cycle duration. The flow rate and pressure data are processed through the tanh activation function, and the cycle duration is restricted within the range of 1.5 to 15 seconds. The discriminator adopts a convolutional neural network structure, extracts the features of the input data through convolutional layers, and combines spectral normalization to limit the norm of the weights; training and evaluating the PVA data generation model, and obtaining generated data based on the trained PVA data generation model; Constructing a deep learning classification model, which is a hybrid model based on a convolutional neural network and a long short-term memory network. Training and evaluating the deep learning classification model based on the generated data and the real data, and realizing the classification of PVA events based on the trained deep learning classification model.
2. The method for diagnosing asynchrony between a mechanical ventilator and a patient according to claim 1, wherein Performing smoothing processing and resampling processing on the PVA waveform data to obtain real data, including: Removing outliers from the PVA waveform data, removing invalid or noise data that deviate from the normal range, and using a moving average filter to smooth the signal. The processing process is shown in the following formula: ; In the formula, is the data after smoothing processing, N smooth is the size of the sliding window, t smooth is the current moment, is the index of each data point within the window, x ( i ) is the original data value at the time point ; Based on the smoothed data, by analyzing the zero-crossing points of the flow signal, identifying and dividing the start and end times of each respiratory cycle, and obtaining the data of each respiratory cycle; Based on the data of each respiratory cycle, performing resampling processing through the following formula to adjust the data of each respiratory cycle into multiple sample points to obtain real data: ; In the formula, is the real data, x 1 and x 2 are the values of adjacent sample points, t 1 and t 2 are the time points of adjacent sample points, t interpolated is the target time point after interpolation.
3. The method for diagnosing the asynchronous state between a mechanical ventilator and a patient according to claim 1, wherein The processing process of the flow rate and pressure data through the tanh activation function is shown in the following formula: ; wherein, tanh( x input ) is the activated flow rate and pressure data, e is the natural constant, x input is the input flow rate and pressure data.
4. The method for diagnosing the asynchronous state between a mechanical ventilator and a patient according to claim 1, wherein, The output of the convolutional layer of the discriminator is processed through the ReLU activation function, and the features processed by the ReLU activation function are classified through a 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 linearly activated flow rate and pressure data, max is the maximum value function, x input is the input flow rate and pressure data.
5. The method for diagnosing asynchrony between a mechanical ventilator and a patient according to claim 1, characterized in that, Training and evaluating the PVA data generation model includes: During the training process, optimizing through the following loss function: ; Wherein, L WGAN represents the loss value, and respectively represent the scores of the discriminator for the real sample x real and the generated sample ; p data and are the data distribution and the noise distribution respectively, z fake represents random noise; Using the mean square error and dynamic time warping to evaluate the quality of the generated data; among them, the calculation formula of the mean square error is: ; In the formula, MSE Flow represents the mean square error between the generated flow data and the true flow data, MSE Press represents the mean square error between the generated pressure data and the true pressure data, N flow and N press respectively represent the number of samples of the flow and pressure data, i flow and i press respectively represent the sample numbers of the flow and pressure data, and are respectively the flow and pressure values in the generated data, and are the flow and pressure values in the true data; The dynamic time warping is used to evaluate the temporal alignment degree between the generated data and the real data. The calculation formula is as follows: ; Wherein, x signal and y signal are two time series to be aligned respectively, w is all possible time alignment paths, and Ω is the set of time alignment paths, k is the serial number of the sample, M represents the sequence length, min is the minimum value function, DTW ( x signal , y signal ) is the dynamic time warping (DTW) distance between two time series, representing the similarity between them.
6. The method for diagnosing asynchrony between a mechanical ventilator and a patient according to claim 1, wherein 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 then sends them into a bidirectional LSTM for temporal modeling. A multi-head self-attention mechanism is introduced to dynamically adjust the weights of time steps, thereby optimizing the learning of critical moments; After the input generated data and / or real data are processed by convolution, batch normalization, pooling, bidirectional LSTM, and multi-head self-attention mechanism, they are flattened by a flattening layer and sent into a fully connected layer for classification. The fully connected layer uses the ReLU activation function and outputs the prediction probability of each class through the Softmax activation function; The Softmax activation function is expressed as: ; In the formula, x i represents the output value of the i th category, K is the total number of categories, e is the natural constant, j is a summation index, representing the index of all possible categories. softmax( x i ) is the probability value after normalization for each category .
7. The method for diagnosing asynchrony between a mechanical ventilator and a patient according to claim 6, wherein Training and evaluating the deep learning classification model based on the generated data and real data includes: The training uses the Adam optimizer, the learning rate is set to 1×10-5, and the loss function selects the cross-entropy function, as shown in the following formula: ; Wherein, L is the cross-entropy loss value, y i is the true label, is the probability distribution predicted by the model.
8. A device for diagnosing the asynchronous state between a mechanical ventilator and a patient, characterized in that, The device includes: A data preprocessing module configured to perform smoothing processing and resampling processing on PVA waveform data to obtain real data; A data generation module 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, which preliminarily process the random noise vector through the fully connected layer, and uses the long short-term memory network to capture the long-term dependencies in the time series. The residual block alleviates the vanishing gradient problem in the deep network through skip connections. The self-attention module automatically adjusts the weights 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 characteristics of the actual breathing cycle. 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 restricted 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 convolutional layers, and combines spectral normalization to limit the norm of the weights; Train and evaluate the PVA data generation model, and obtain generated data based on the trained PVA data generation model; An asynchronous diagnosis module 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. Train and evaluate the deep learning classification model based on the generated data and real data, and implement the classification of PVA events based on the trained deep learning classification model.
9. An electronic device, characterized in that, Including: 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 mechanical ventilation patient-machine asynchronous diagnosis method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, are used to implement the method for diagnosing asynchrony between a mechanical ventilator and a patient according to any one of claims 1-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
Electrocardiogram data generation method based on auxiliary classifier generative adversarial network
CN118942677A
ECG anomaly detection method based on AE-GAN
CN119622583A
Multimodal three-dimensional medical image fusion method and system, and electronic device
WO2021022752A1
Cited By
Improved telecommunication abnormal user mining method based on SAGAN network
CN121234122A