Method for predicting human-machine synchronous respiration transition point of non-invasive ventilator

Through the prediction model based on the Transformer framework, the problem of inaccurate synchronization of human-machine by non-invasive ventilators is solved, and high-accurate breathing conversion point prediction is achieved, which improves the convenience and accuracy of the equipment.

WO2024234654A1PCT designated stage expired Publication Date: 2024-11-21NANJING SUPERSTAR MEDICAL EQUIP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/140910
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-18
Filing Date
2023-12-22
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

In clinical applications, existing non-invasive ventilators often experience human-machine dissynchronization. The existing respiratory conversion trigger recognition method requires artificial parameters to be set, which is inconvenient to use and has low accuracy.

Method used

采用基于Transformer框架的无创呼吸机人机同步呼吸转换点预测方法,通过获取呼吸气流量时间序列数据,标记吸气、呼气和中间状态点,构建预测模型,利用Embedding层、编码器和全局平均 The pooling layer performs data processing and prediction, sets up cross entropy loss function and Adam optimizer, segments training, validation and test sets, and performs model training and evaluation.

Benefits of technology

Highly accurate breathing conversion point prediction is achieved, with an accuracy rate of 0.94 and an error trigger rate as low as 5.8%, improving the accuracy and convenience of human-computer synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023140910_21112024_PF_FP_ABST
    Figure CN2023140910_21112024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a method for predicting a human-machine synchronous respiration transition point of a non-invasive ventilator. The method in the present invention comprises: acquiring large-batch normal and abnormal respiratory airflow time sequence data; performing manual marking and verification on the acquired time sequence data; performing standardization processing, random sampling and sliding window sampling on the marked data; segmenting processed data sets into a training set, a verification set and a test set; constructing a Transformer framework to perform respiration transition point classification prediction based on an airflow time sequence, so as to guide the switching between air supply and air release states of a non-invasive ventilator. The present invention is based on a Transformer framework, and abnormal and normal respiratory airflow time sequence data is also introduced, such that the precision of a respiration transition point classification prediction model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method for predicting the transition point of human-machine synchronous breathing in a non-invasive ventilator Technical Field

[0001] The present invention relates to the technical field of non-invasive ventilators, and in particular to a method for predicting human-machine synchronous breathing transition points of non-invasive ventilators based on a Transformer framework. Background Art

[0002] A non-invasive ventilator is a non-invasive medical device that replaces, controls, or modifies normal breathing, increasing lung ventilation, improving respiratory function, and reducing respiratory exhaustion. With the rapid development of my country's non-invasive ventilator industry, ventilators are expanding from clinical support to home treatment, and their functionality is becoming increasingly diverse.

[0003] At present, human-machine asynchrony often occurs during the clinical application of non-invasive ventilators. Most of the existing respiratory conversion trigger recognition methods require manual parameter setting, which is inconvenient to use and has low human-machine synchronization accuracy.

[0004] Summary of the Invention

[0005] In order to solve the problems existing in the prior art, the present invention provides a method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator with high prediction accuracy.

[0006] In order to achieve the above object, the technical solution proposed by the present invention is: a method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator, comprising the following steps:

[0007] S1. Acquire time series data of respiratory airflow in a normal state and time series data of respiratory airflow in an abnormal state of a non-invasive ventilator;

[0008] S2. Marking the three states of the inhalation transition point, the exhalation transition point, and the intermediate state point in the acquired normal state respiratory air flow time series data and the abnormal state respiratory air flow time series data;

[0009] S3, standardize the labeled data and perform sampling to obtain a sampled data set;

[0010] S4, split the sampled data set into a training set;

[0011] S5. Build a prediction model based on the Transformer framework, which includes: an Embedding layer, an encoder, a global average pooling layer, and a Dense layer;

[0012] Use the training set data to train the prediction model;

[0013] S6. The respiratory air flow time series data to be predicted is brought into the trained prediction model to perform classification prediction of the respiratory transition point based on the air flow time series; when the predicted classification result is the inhalation transition point, the ventilator switches from the deflation state to the supply state; when the predicted classification result is the exhalation transition point, the ventilator switches from the supply state to the deflation state; when the predicted classification result is the intermediate state point, the ventilator maintains the current state.

[0014] Further design of the above technical solution: the Embedding layer in the prediction model based on the Transformer framework is used to add position information to the input vector, specifically:

[0015] Among them, pos represents the relative position of the input element to be encoded in the time series data. d=d model is the dimension of the model, L x is the length of the input sequence;

[0016] The encoder includes a normalization module, an attention mechanism module, and a forward fully connected module. The encoder includes two encoders, which are used to distribute the input vector after adding position information through Layer-Normalization, and then input it into the attention mechanism module to extract local feature information combined with the position information; then obtain input through the feedforward neural network layer in the forward fully connected module; and then continue to input the obtained input into the next encoder;

[0017] Input the output of the encoder into the global average pooling layer to achieve dimensionality reduction;

[0018] Finally, the softmax function is used through the Dense layer for dropout regularization.

[0019] The loss function of the Transformer-based prediction model is set to the cross-entropy function. The predicted value is input into the loss function and compared with the true value. The Adam algorithm is set as the optimizer, and the reverse gradient is used to adjust the network parameters of the prediction model.

[0020] The cross entropy function formula is as follows:

[0021] Among them, N represents the total number of samples; M represents the number of labeled categories; y ic represents the sign function, which takes 1 if the true category of sample i is equal to c, otherwise it takes 0; p ic Represents the predicted probability that observation sample i belongs to category c.

[0022] The data set sampled in step S4 is further divided into a validation set and a test set.

[0023] The ratio of normal data to abnormal data in the sampled data set is 9:1;

[0024] The sampled dataset is divided into training set, validation set and test set with a ratio of 6:2:2. The ratio of normal data to abnormal data in the training set, validation set and test set is the same, which is 9:1.

[0025] The validation set data is input into the prediction model, and the network parameters of the prediction model are further fine-tuned using mini-batch to obtain the optimal hyperparameter prediction model.

[0026] The prediction model is evaluated using the test set data. The specific method is as follows:

[0027] The accuracy is used as the vertical coordinate and the number of training set iterations is used as the horizontal coordinate; the cross entropy loss function value is used as the vertical coordinate and the number of training set iterations is used as the horizontal coordinate for training and prediction; and the deviation between the true value and the predicted value of the test set is quantified according to the confusion matrix system to evaluate the model.

[0028] The specific method of step S3 is:

[0029] S31, perform Z-Score standardization on the labeled data;

[0030] S32. Randomly sample normal and abnormal respiratory airflow time series data in batches, set a random number range and a fixed sliding window size, randomly slide the window forward a fixed number of times within the set range starting from the inspiratory transition point, and mark the corresponding sliding window state as the inspiratory transition point; randomly slide the window forward a fixed number of times within the set range starting from the respiratory transition point, and mark the corresponding sliding window state as the expiratory transition point;

[0031] S33. Perform sliding window sampling on the normal and abnormal respiratory air flow time series data in batches, extract the sliding window states that do not include the inhalation transition point and the exhalation transition point, and mark them as intermediate state points.

[0032] The beneficial effects of the present invention are:

[0033] The present invention is based on the Transformer framework prediction model, and performs classification prediction of respiratory transition points based on airflow time series. At the same time, normal and abnormal respiratory airflow time series data are collected to expand the training set, and the validation set and test set are selected according to a certain ratio. This enables the model to better identify the respiratory transition points of normal and abnormal respiratory airflow time series, making the prediction accuracy reach 0.94 and the false trigger rate as low as 5.8%. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] FIG1 is a flow chart of the method of the present invention.

[0035] FIG2 is a waveform diagram of respiratory air flow data in a normal state of the present invention.

[0036] FIG3 is a waveform diagram of respiratory air flow data in an abnormal state according to the present invention.

[0037] FIG4 is a network structure based on the Transformer framework used in the present invention.

[0038] FIG5 is a graph showing the accuracy of the present invention.

[0039] FIG6 is a graph showing a loss function of the present invention.

[0040] FIG7 is a confusion matrix diagram of the prediction results of the present invention.

[0041] FIG8 is a diagram showing the evaluation results of the model parameters of the present invention. DETAILED DESCRIPTION

[0042] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] Example

[0044] The Transformer-based non-invasive ventilator human-machine synchronized breathing transition point prediction model of this embodiment includes the following steps, as shown in FIG1 :

[0045] S1. As shown in FIG2 , a large amount of respiratory airflow data is obtained from a non-invasive ventilator, including normal state respiratory airflow time series data and abnormal state respiratory airflow time series data. The main difference between normal state and abnormal state respiratory airflow time series data is that the respiratory cycle of the former is stable, while the respiratory cycle of the latter fluctuates greatly.

[0046] S2. Manually mark and verify the acquired time series data, and manually determine the inhalation and exhalation transition points. This is mainly because the existing synchronization algorithm has very low recognition of respiratory transition points and cannot be directly used as training markers.

[0047] S21. In conjunction with Figure 2, the inverted triangle pattern in the figure represents the inhalation transition point, and the circular pattern represents the exhalation transition point. The normal state respiratory air flow time series data is manually identified and verified according to clinical judgment criteria, and the three states of inhalation transition point, exhalation transition point and intermediate state point are marked accordingly. In this case, the cycle is stable;

[0048] S22. In conjunction with Figure 3, the inverted triangle pattern represents the inhalation transition point, and the circular pattern represents the exhalation transition point. The abnormal respiratory flow time series data was manually identified and verified based on clinical criteria and periodic patterns. Three states were marked: the inhalation transition point, the exhalation transition point, and the intermediate state. In this case, the periodicity was unstable, and the inhalation transition point and the exhalation transition point were observed to appear in pairs, but the frequency of occurrence varied.

[0049] S3, standardize, randomly sample and slide window sample the labeled data;

[0050] S31, perform Z-Score standardization on the marked data, obtain the mean and variance of the data, subtract the data's own mean, and then divide it by the corresponding variance to achieve the standardization process;

[0051] S32. Randomly sample normal and abnormal respiratory airflow time series data in batches, and set the random number range and fixed sliding window size. The random number range is 10, and the fixed sliding window size is 25ms. Starting from the inhalation transition point, randomly slide the window forward a fixed number of times within the set range 20 times, and the corresponding sliding window state is marked as the inhalation transition point; starting from the exhalation transition point, randomly slide the window forward a fixed number of times within the set range, and the corresponding sliding window state is marked as the exhalation transition point, where the inhalation transition point is marked as 1 and the exhalation transition point is marked as 2;

[0052] S33. Perform sliding window sampling on the normal and abnormal respiratory airflow time series data in batches, with a fixed sliding window size of 25 ms. Slide the window sequentially according to the time series to extract the sliding window states that do not include the inhalation transition point and the exhalation transition point, and mark them as intermediate state points. The intermediate state points are marked as 0.

[0053] The reason for using two sampling methods separately is that random upsampling of the two transition points avoids the amplification of regional data features caused by multiple collections of the same features, and solves the problem of sample imbalance of the data itself; sliding window sampling of the intermediate state points can more completely capture all its features and provide more sample data for training.

[0054] S4. Split the processed data set into a training set, a validation set, and a test set. Most of the data is placed in the training set, and target data with similar distribution is placed in the validation set and the test set.

[0055] S41, integrating the processed normal data set and abnormal data set as a new data set, wherein the ratio of the normal data set to the abnormal data set is 9:1;

[0056] S42. Split the new dataset into a training set, a validation set, and a test set with a corresponding ratio of 6:2:2. The ratio of normal data to abnormal data in the training set, validation set, and test set is the same, which is 9:1.

[0057] S43. Shuffle the training set data to randomly disrupt the order of the training set data.

[0058] S5. Build a Transformer framework-based model to classify and predict respiratory transition points of airflow time series.

[0059] S51. Input the training set data, including normal and abnormal respiratory airflow time series data, into a non-invasive ventilator human-machine synchronized breathing transition point prediction model based on the Transformer framework. The model is essentially a classification prediction of multi-source univariate time series data based on the Transformer framework.

[0060] S52, in conjunction with FIG4, the non-invasive ventilator human-machine synchronized breathing transition point prediction model based on the Transformer framework includes: an Embedding layer, an encoder Encoder and a global average pooling layer, and a Dense layer;

[0061] Among them, the encoder includes normalization, attention mechanism module and forward full connection module.

[0062] The Embedding layer is used to add position information to the input vector. The specific principles are as follows:

[0063] Among them, pos represents the relative position of the input element to be encoded in the time series data. d=d model is the dimension of the model, L x is the length of the input sequence;

[0064] The encoder consists of two encoders: the input vector with position information added is first distributed and adjusted by Layer-Normalization, and then input into the multi-head attention mechanism module to extract local feature information combined with position information; then the input is obtained through the feedforward neural network layer; and the input is continuously input into the next encoder;

[0065] The output of the encoder is input into the global average pooling layer to directly implement the dimensionality reduction operation, greatly reduce the network parameters, and reduce the model memory;

[0066] Finally, the softmax function is used through the Dense layer for dropout regularization.

[0067] S53. Set the loss function to the cross entropy function, input the predicted value into the loss function and compare it with the true value, set the Adam algorithm as the optimizer, and adjust the network parameters with reverse gradient;

[0068] The cross entropy function formula is as follows:

[0069] Among them, N represents the total number of samples, M represents the number of labeled categories; y ic represents the sign function, which takes 1 if the true category of sample i is equal to c, otherwise it takes 0; p ic Represents the predicted probability that observation sample i belongs to category c.

[0070] S54. Use the validation set data to verify the prediction model. In the validation phase, use mini-batch to further fine-tune the parameters to obtain the optimal hyperparameter prediction model.

[0071] S55. Use accuracy as the vertical coordinate and the number of training set iterations as the horizontal coordinate; use the cross entropy loss function value as the vertical coordinate and the number of training set iterations as the horizontal coordinate to display the training and prediction process; and quantify the deviation between the true value and the predicted value of the test set based on the confusion matrix system to perform model evaluation.

[0072] S56. When the non-invasive ventilator human-machine synchronized breathing transition point prediction model based on the Transformer framework predicts a classification result of an inhalation transition point, the ventilator switches from the deflation state to the supply state; when the prediction classification result is an exhalation transition point, the ventilator switches from the supply state to the deflation state; when the prediction classification result is an intermediate state point, the ventilator maintains the current state.

[0073] As shown in Figures 5 and 6, as the number of training epochs increases, the cross-entropy loss function (Loss) gradually decreases to a stable state, while the accuracy (ACC) gradually increases to a stable state. The dark line represents the training process, and the light line represents the prediction process. It can be seen that the prediction process is relatively close to the training process, and the prediction effect is relatively ideal.

[0074] Please refer to Figures 7 and 8 for the final model prediction and evaluation results. Figure 7 shows the prediction results of the test set in the form of a confusion matrix, with the true label as the vertical axis and the predicted label as the horizontal axis. It can be observed that the prediction error is mainly reflected in the recognition accuracy of the inhalation transition point and the exhalation transition point, that is, state 1 and state 2. There is almost no case of recognizing the normal state as the inhalation transition point or the exhalation transition point. Figure 8 summarizes the precision, recall and F1-Score of the three classification labels. It can be observed that the Precision and Recall of each type of label are negatively correlated, but almost all can reach above 0.9, and F1-Score is 0.9. 1- The score reached 0.94; the macro average and weighted average both reached above 0.92. The model's forecasting performance was good.

[0075] The technical solutions of the present invention are not limited to the above-mentioned embodiments, and any technical solutions obtained by equivalent replacement methods fall within the scope of protection required by the present invention.

Claims

1. A method for predicting the transition point of human-machine synchronous breathing in a non-invasive ventilator, characterized in that: The steps include: S1. Acquire the respiratory air flow time series data of the normal state and the respiratory air flow time series data of the abnormal state of the non-invasive ventilator; S2, marking the three states of the inhalation switching point, the exhalation switching point and the intermediate state point in the acquired normal state respiratory air flow time series data and the abnormal state respiratory air flow time series data; S3, standardize the labeled data and perform sampling to obtain a sampled data set; S4, split the sampled data set into a training set; S5. Construct a prediction model based on the Transformer framework, wherein the prediction model includes: an Embedding layer, an encoder, a global average pooling layer, and a Dense layer; Use the training set data to train the prediction model; S6. Bring the respiratory air flow time series data to be predicted into the trained prediction model, and perform classification prediction of the respiratory transition point based on the air flow time series; when the predicted classification result is the inhalation transition point, the ventilator switches from the deflation state to the supply state; when the predicted classification result is the exhalation transition point, the ventilator switches from the supply state to the deflation state; when the predicted classification result is the intermediate state point, the ventilator maintains the current state.

2. According to the method for predicting the human-machine synchronous breathing transition point of the non-invasive ventilator as described in claim 1, it is characterized in that: The Embedding layer in the prediction model based on the Transformer framework is used to add position information to the input vector, specifically: Among them, pos represents the relative position of the input element to be encoded in the time series data. d=d model is the dimension of the model, L x is the length of the input sequence; The encoder includes a normalization module, an attention mechanism module and a forward fully connected module; the encoder includes two encoders, which are used to first distribute and adjust the input vector after adding the position information through Layer-Normalization, and then input it into the attention mechanism module to extract local feature information combined with the position information; then obtain the input through the feedforward neural network layer in the forward fully connected module; and then continue to input the obtained input into the next encoder; Input the output of the encoder into a global average pooling layer to achieve dimensionality reduction; Finally, the softmax function is used through the Dense layer for dropout regularization.

3. The method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator according to claim 1, characterized in that: The loss function of the prediction model based on the Transformer framework is set to the cross entropy function, the predicted value is input into the loss function to compare with the true value, and the Adam algorithm is set as the optimizer, and the reverse gradient is used to adjust the network parameters of the prediction model; The cross entropy function formula is as follows: Among them, N represents the total number of samples; M represents the number of labeled categories; y ic represents the sign function, which takes 1 if the true category of sample i is equal to c, otherwise it takes 0; p ic Represents the predicted probability that observation sample i belongs to category c.

4. The method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator according to claim 3, characterized in that: The data set sampled in step S4 is further divided into a validation set and a test set.

5. The method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator according to claim 4, characterized in that: The ratio of data in normal state to data in abnormal state in the sampled data set is 9:1; The sampled data set is divided into training set, validation set and test set in a ratio of 6:2:

2. The ratio of normal data to abnormal data in the training set, validation set and test set is the same, which is 9:

1.

6. The method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator according to claim 5, characterized in that: The validation set data is input into the prediction model, and mini-batch is used to further fine-tune the network parameters of the prediction model to obtain the optimal hyper-parameter prediction model.

7. The method for predicting the transition point of human-machine synchronous breathing of a non-invasive ventilator according to claim 6, characterized in that: The test set data is used to evaluate the prediction model. The specific method is as follows: The accuracy is used as the ordinate and the number of training set iterations is used as the abscissa; the cross entropy loss function value is used as the ordinate and the number of training set iterations is used as the abscissa for training and prediction; The deviation between the true value and the predicted value of the test set is quantified based on the confusion matrix system to evaluate the model.

8. The method for predicting the human-machine synchronous breathing transition point of a non-invasive ventilator according to claim 1, characterized in that: The specific method of step S3 is: S31, performing Z-Score standardization on the labeled data; S32, randomly sampling normal and abnormal respiratory air flow time series data in batches, setting a random number range and a fixed sliding window size, taking the inhalation transition point as the starting point, randomly sliding the window forward a fixed number of times within the set range, and marking the corresponding sliding window state as the inhalation transition point; taking the exhalation transition point as the starting point, randomly sliding the window forward a fixed number of times within the set range, and marking the corresponding sliding window state as the exhalation transition point; S33, performing sliding window sampling on the normal and abnormal respiratory air flow time series data in batches, extracting the sliding window states that do not include the inhalation transition point and the exhalation transition point, and marking the corresponding points as intermediate state points.

Citation Information

Patent Citations

  • Method and device for man-machine synchronization of invasive respirator in noninvasive ventilation mode

    CN103182120A

  • Intelligent classification and recognition method of heart beat of electrocardiogram

    CN111449645A

  • Mechanical ventilation man-machine asynchronous detection method and device and computer readable storage medium

    CN113521460A

  • Breathing machine man-machine asynchronous classification method, terminal and storage medium

    CN113539501A

  • Breathing machine intelligent synchronization method and data visualization system thereof

    CN113724851A