Ventilator control method and system

By combining a tree-structured ventilator control system with a twin neural network and PID control, the adaptive adjustment problem of ventilator ventilation control is solved, enabling precise adjustment of ventilation volume and meeting patient needs, and improving the flexibility and accuracy of ventilator control.

CN116736704BActive Publication Date: 2026-04-10HUNAN VENTMED MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN VENTMED MEDICAL TECH CO LTD
Filing Date
2023-05-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Ventilation control on ventilators is difficult to adapt to changes in the patient's condition. Existing PID control methods have fixed parameters, making it difficult to achieve precise control. Furthermore, artificial intelligence models are difficult to deploy on ventilators or have low accuracy.

Method used

The ventilator control system, which adopts a tree-structured architecture, includes a patient monitoring end, a central control end, and a ventilation end. It utilizes a twin neural network for data processing and prediction, combined with PID control, and achieves real-time tidal volume adjustment through lightweight neural network distillation training and momentum gradient descent methods.

Benefits of technology

It achieves precise control of ventilator ventilation, dynamically adjusts airway pressure, improves patient experience, and enhances control flexibility and accuracy by combining neural networks and PID control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116736704B_ABST
    Figure CN116736704B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of breathing machine control, and discloses a breathing machine control method and system, which comprises the following steps: S1, establishing a breathing machine ventilation control sequence, which is electrically connected in a tree structure for a patient monitoring end, a central control end and a ventilation end; S2, the patient monitoring end collects data, including blood pressure, blood oxygen, heart rate, breathing frequency and inspiration pressure, and sends the data to the control central end every unit time; S3, the control central end is provided with a calculation control unit, which pre-processes the data and sends the data to a model together with historical data for training and reasoning; S4, the ventilation control result under the PID mode is obtained, and the model reasoning result is combined; and S5, the ventilation end adjusts the position of a ventilation valve according to the instruction, controls the size of the air output and the air pressure change frequency. The present application reduces the influence of the fixed PID parameters in the field of breathing machine control on the flexible ventilation control, realizes lightweight model reasoning, and improves the stability of the control.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of respirator control, in particular to a respirator control method and system. BACKGROUND

[0002] As an important lung disease treatment tool in modern clinical medicine, the respirator can provide auxiliary breathing function for patients with lack of respiratory capacity and low blood oxygen, and plays an important role in the treatment and rescue of respiratory diseases. However, in recent years, with the increasing use of respirators in clinical medicine, respiratory safety problems have gradually attracted attention. On the one hand, the ventilation volume of the respirator is difficult to control within a reasonable range, and in the case of excessively high airway pressure, the patient's intrathoracic pressure difference is too large, which can cause lung loss, but excessively low airway pressure can also cause the patient to inhale less, causing insufficient blood oxygen and reducing the patient's experience. At present, the general PID control method is used for respirator ventilation problems. Although this method is simple to calculate and quick to respond, the parameters remain fixed during ventilation, making it difficult to achieve adaptive adjustment according to the patient's condition changes. On the other hand, although the respirator has limited computing power, it needs to achieve fast response in application, so it is difficult to deploy large-scale artificial intelligence models, and smaller models have low precision, which cannot meet the demand for precise control of the respirator. SUMMARY

[0003] In view of the complexity of respirator ventilation control and the difficulty of applying artificial intelligence models, the present application proposes a respirator control method and system. To solve the above technical problems, the technical solution adopted by the present application is as follows:

[0004] A respirator control method, comprising the following steps:

[0005] S1, a respirator ventilation control sequence is established based on the hardware and software devices of the respirator, which is connected in a tree structure as a patient monitoring end, a central control end and a ventilation end, the central control end is the root node, and the patient monitoring end and the ventilation end are leaf nodes, and the root node and the leaf nodes are electrically connected;

[0006] S2, the patient monitoring end collects sensing data, including blood pressure, blood oxygen, heart rate, inspiratory pressure and positive end-expiratory pressure, and sends them to the control central end every unit time;

[0007] S3, the control central end installs a calculation control unit, sets label Y1 as the ventilation volume provided by the respirator, and label Y2 as the ventilation volume required by the patient, and performs data preprocessing on the sensing data from the patient monitoring end, and sends the data together with historical data to a neural network model for training and reasoning, and the neural network model training process includes:

[0008] S31, split the training data into two parts: ventilator feature data and patient feature data;

[0009] S32, set the initial iteration round t=0, learning round T, initialize the model parameters w of the twin neural network 0 ;

[0010] S33, judge t<T, if yes, execute step S34, otherwise the twin neural network model training stage ends;

[0011] S34, the two sub-networks of the twin neural network model respectively calculate the loss of label Y1 and label Y2, and then calculate the overall loss of the twin neural network model for label Y3, and use the momentum stochastic gradient descent method to update the model parameters;

[0012] S35, the lightweight neural network is used as a student network, the twin neural network model is used as a teacher network, the ventilator features and patient features are combined, the student network is distilled and trained, and the distilled student network is used as an inference model to infer real-time data;

[0013] S4, acquire the ventilation control result in PID mode, calculate the process different from the model training process, synchronize with the model inference process, combine the PID ventilation control result and the model inference result, and send the command to the ventilation end;

[0014] S5, the ventilation end adjusts the position of the ventilation valve according to the command, controls the size of the air output and the air pressure change frequency;

[0015] As a further improved method of the present application:

[0016] Further, in step S1, the ventilator ventilation sequence established by the ventilator software and hardware device comprises:

[0017] 1) The life characteristic monitoring device installed on the patient monitoring end and the sensor connected with the ventilation mask and other devices are used to collect the life characteristic data of the patient and the air pressure change during the breathing process, have no calculation ability, and are only responsible for data monitoring and sending, and enter the real-time monitoring state after the ventilator is powered on, and data feedback is performed every unit time;

[0018] 2) The calculation chip and FPGA logic control structure installed on the central control end have calculation ability and logic output function, accept the sensing data from the patient monitoring end, deploy the lightweight model after completing the model training and knowledge distillation, perform neural network model inference on real-time data every unit time, and serve as a data connection center and a command center, and perform data and command interaction with the patient monitoring end and the ventilation end through electrical connection mode;

[0019] 3) Ventilation end of the airway is provided with a gate valve, which is only responsible for receiving communication instructions from the central control end for adjustment in working state.

[0020] Further, in step S2, the patient monitoring end collects data and sends it to the central control end, and the data format is:

[0021] Signal={BP;SP;HR;FI;FO;D;P;R}

[0022] Wherein:

[0023] BP represents the blood pressure of the patient;

[0024] SP represents the blood oxygen of the patient;

[0025] HR represents the heart rate of the patient;

[0026] FI represents the inspiratory pressure of the patient;

[0027] FO represents the positive end-expiratory pressure of the patient;

[0028] D represents the voltage of the ventilator;

[0029] P represents the power of the ventilator;

[0030] R represents the oxygen output per unit time of the ventilator.

[0031] Further, in step S3, the data preprocessing method comprises the steps of:

[0032] 1) Default value filling, the missing values in the received sensing data are supplemented, the blood pressure, blood oxygen, and heart rate are supplemented as normal human level values, and the inspiratory pressure and positive end-expiratory pressure missing values are supplemented as zero;

[0033] 2) Z-score standardization is performed on the blood pressure, blood oxygen, heart rate, inspiratory pressure, and positive end-expiratory pressure characteristic data, and the calculation method is:

[0034]

[0035] In the formula, μ represents the mean value of the current feature, σ represents the standard deviation of the current feature, x represents the current feature value, and x * represents the normalized feature value, which is in the range of 0-1, the mean value of the normalized feature is 0, and the standard deviation is 1;

[0036] The historical data include:

[0037] 1) Past recorded standard data manually collected and sorted by artificial, including characteristic data of the ventilator and characteristic data of the patient at the corresponding time.

[0038] 2) Medical standards, various age, gender groups in different lung disease backgrounds maintain the best vital signs of various data.

[0039] Further, in step S32, the two sub-network structures of the twin neural network model are as follows:

[0040] Input-Dense-Resx2-Dense-Output

[0041] In the formula, Input represents the input layer, Res represents the residual structure, the output of which is the sum of the current input and the value after the current input passes through two fully connected layers, Polling represents the pooling layer, Dense represents the fully connected layer, and Output represents the output layer.

[0042] Further, in step S34, the loss calculation is performed for labels Y1 and Y2, and the calculation formula is:

[0043]

[0044]

[0045] In the formula, f1(x) and f2(x) represent the respective outputs of the two sub-networks of the twin neural network, Y1 and Y2 are the ventilation labels provided by the ventilator and the ventilation labels expected by the patient, and δ is a smoothing parameter.

[0046] The loss calculation is performed for label Y3, and the calculation formula is:

[0047]

[0048] In the formula, N represents the number of samples, Y3 is the ratio of the ventilation label Y1 provided by the ventilator to the ventilation label Y2 required by the patient, 0 if the same, otherwise 1, and D W is the Euclidean distance difference value of the input samples of the two sub-networks, and m is the loss threshold.

[0049] The model parameters are iteratively updated using the momentum stochastic gradient descent method, and the calculation formula is:

[0050]

[0051] w t = w t-1 - ηV i t-1

[0052] In the formula, β represents the size of the momentum value, which is between 0 and 1, w t-1denotes the model parameters in the t-1th round of the training process, F(w t-1 ) denotes a loss function, which is the sum of the losses calculated by three labels, i.e., F=F1+F2+F3, is the gradient of the model loss value in the t-1th round, V t-1 denotes the momentum gradient change value in the t-1th round, and η denotes the learning rate used in the momentum stochastic gradient descent process.

[0053] Further, in step S35, the lightweight neural network is trained by knowledge distillation to transfer the capability of the large-size twin neural network model to the small-size model. Compared with the method of directly training the lightweight neural network, the knowledge distillation training replaces the hard labels in the original data with soft labels, enriches the information in the data and labels, and improves the flexibility of prediction, including the following steps:

[0054] 1) The training data is reorganized, and the data features of the ventilator and the data features of the patient in the case where Y1 and Y2 have the same value are merged. The merged data is: sample x represents the features of both, and label Y represents the ventilation provided by the ventilator and the expected ventilation of the patient, i.e., Y=Y1=Y2;

[0055] 2) The student network is trained by distillation, t * is set to 0, the learning round T * is set, and the model parameters of the lightweight neural network are initialized t * is less than T * , if yes, step 3) is executed, otherwise the knowledge distillation model training phase ends;

[0056] 3) The output loss in the distillation process is calculated, and the parameters are updated by the stochastic gradient descent method after gradient derivation of the loss;

[0057] 4) After the knowledge distillation ends, the lightweight student network is deployed at the control center end. If there is a lightweight model of the last round, the lightweight model of the current round is used to replace it, otherwise it is directly deployed.

[0058] The lightweight student network structure is as follows:

[0059] Input ′ -Dense ′ -Dense ′ -Output ′

[0060] In the formula, Input ′ denotes the input layer, Dense ′ denotes the fully connected layer, and Output ′ denotes the output layer.

[0061] The model loss in the distillation process is calculated as follows:

[0062] L stu (x; W) = a * H(Y, σ(z s ; T = 1)) + β * H(σ(z t ; T = τ), σ(z s ; T = τ))

[0063]

[0064] In the formula, T represents the distillation temperature, z s is the current student network output, z t is the current teacher network output, a and β represent loss weight factors, and a + β = 1 here, Y represents the label, Y = Y1 = Y2 here, H(·) represents the minimum mean square error function, and σ(·) represents the mapping function under temperature control.

[0065] The random gradient descent method is calculated as follows:

[0066]

[0067] In the formula, w old is the updated model parameter, w new is the model parameter before updating, represents the gradient obtained by deriving the loss L stu .

[0068] Further, in step S4, the PID method and the model inference result are used together to complete the ventilation control, including the following steps:

[0069] 1) The deployed lightweight model infers real-time data to obtain an inference result e(t);

[0070] 2) The control center calculates the control result in the PID mode, and the calculation formula is:

[0071]

[0072] In the formula, K p is the gas proportional gain value, e(t) represents the gas pressure value at time t, T t represents the integral time constant, T D represents the differential time constant, and u(t) is the control output at time t.

[0073] 3) The control center converts the u(t) value into a communication instruction signal and sends it to the ventilation end.

[0074] The application also provides a ventilator control system, which comprises:

[0075] 1) A ventilator ventilation control sequence including a ventilator software and hardware device, which is composed of a patient monitoring end, a central control end and a ventilation end, is used for collecting and calculating patient feature data and making corresponding instruction communication, and is electrically connected, including sensors and computing chips and FPGA devices for data acquisition and calculation communication, and performs data acquisition and action adjustment every unit time;

[0076] 2) A data processing module, which processes data from the patient monitoring end, including missing value filling and standardization, and splits and merges the data to serve the training of the twin neural network and the training of the knowledge distillation, respectively;

[0077] 3) A ventilation control module, which trains the feature data of the patient and the feature data of the ventilator collected by the patient monitoring end, iteratively deploys the new model and completes real-time inference when the new model training is completed, sends instructions to the ventilation end according to the inference result to adjust the size of the ventilation volume, so as to realize the ventilator control method according to any one of claims 1-8.

[0078] Advantages

[0079] 1) The application provides a feature comparison method based on a twin neural network, the central control end receives sensor data sent from the patient monitoring end, divides the data into ventilator features and patient features, then pre-processes the data, fills in missing values in the data, and standardizes each feature, so that the standard deviation of the processed feature is 1 and the mean is 0, which can obtain stable calculation after being sent into the neural network, and accelerate model training and fast convergence.

[0080] 2) The model is trained based on a twin neural network, two sub-networks of the model are responsible for extracting ventilator feature calculation and patient feature calculation, respectively, and the output results represent the predicted ventilation volume provided by the current ventilator and the current expected ventilation volume of the patient, respectively, then the loss value of the model is calculated using a three-level label, which calculates the loss of the ventilator provided ventilation volume and the expected ventilation volume of the patient, respectively, and calculates the loss of whether the two values are the same, so that the trained model has the ability to accurately predict the ventilator provided ventilation volume and the expected ventilation volume of the patient, and can unify the two values on the prediction result, so that the ventilator provided ventilation volume is the required ventilation volume of the patient.

[0081] The momentum gradient descent method is used in the training process instead of the traditional stochastic gradient descent, which is more conducive to the rapid convergence of the model and can find the global optimal point of the model in a shorter time to obtain a higher accuracy. The advantage of the twin neural network is that it can effectively compare whether the two input samples of the self-network are unified, and the calculation and adjustment of the loss function make the two sub-networks in this twin neural network each have the ability to predict the ventilation volume, so that the final obtained model can not only predict the ventilation volume required by the patient and the ventilation volume prepared by the ventilator, but also make the values of the two ventilation volumes consistent.

[0082] In addition, the present scheme provides a ventilation control method combining neural network and PID control:

[0083] 1) The twin neural network model is distilled and trained using a lightweight neural network, the loss of the original label in the loss function is set as the loss of the patient feature sub-network label, and the trained model is deployed in the central control end to perform real-time inference on the results;

[0084] 2) The inference result of the lightweight neural network is not directly mapped to the ventilation end, but is further used as a factor term and added to the PID algorithm to calculate the PID control result under the neural network inference.

[0085] This neural network and PID collaborative control method takes into account the characteristics of the patient and the ventilator at the same time, combines the advantages of neural network and PID, can avoid the problem of slow control reaction caused by fixed PID parameters, dynamically adjusts the ventilation control according to the patient's respiratory condition at different times, and enables the lightweight neural network to infer the sensing data in real time to obtain accurate ventilation values.

[0086] Overall, the application adopts a tree structure system to form a ventilation control sequence, calculates and feeds back in real time according to the patient's vital sign data, and then adjusts the ventilation valve position. In terms of data processing, the missing value filling and Z-score standardization method are used to adjust the data, standardize the numerical range of different characteristic data, and help the model training process to converge quickly. In terms of model training, by modifying the loss function of the twin neural network model, the sign extraction ability of the subnetwork is enhanced, so that the subnetwork of the twin neural network has the ability to accurately predict the value, and the knowledge distillation method is used to transfer the ability of the twin neural network to the lightweight neural network, which not only retains the sign extraction ability of the large-size twin neural network, but also learns more rich information in the form of soft labels instead of original data hard labels, improving the flexibility of prediction. In addition, in the ventilation result control stage, the control method combining PID control and neural network model inference results is adopted. Compared with either single control method, the combined control method can not only ensure accurate prediction results for the patient's ventilation needs, but also ensure stable fluctuation changes in the gas output stage, improving the flexibility of control. BRIEF DESCRIPTION OF DRAWINGS

[0087] Figure 1 A flowchart of a breathing machine control method provided by an embodiment of the application is shown in the figure.

[0088] Figure 2 A functional module diagram of a breathing machine control system provided by an embodiment of the application is shown in the figure.

[0089] Reference signs: 100, breathing machine control system; 101, breathing ventilation control sequence; 102, data processing module; 103, ventilation control module. DETAILED DESCRIPTION

[0090] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all.

[0091] Embodiment 1:

[0092] A breathing machine control method, as shown in the figure, includes the following steps: Figure 1

[0093] S1, a breathing machine ventilation control sequence is established based on the breathing machine software and hardware equipment, which is connected in a tree structure as a patient monitoring end, a central control end and a ventilation end. The central control end is the root node, and the patient monitoring end and the ventilation end are leaf nodes. The root node and the leaf nodes are electrically connected.

[0094] ​The ventilator ventilation sequence established by the ventilator software and hardware device includes:

[0095] 1) The patient monitoring end is installed with a vital sign monitoring device and a sensor connected with a ventilation mask, which is used to collect the vital sign data of the patient and the air pressure change in the breathing process, has no computing capacity, and is only responsible for data monitoring and sending. After the ventilator is powered on, it enters a real-time monitoring state and feeds back data every unit time;

[0096] 2) The central control end is installed with a computing chip and an FPGA logic control structure, which has computing capacity and logic output function, receives the sensing data from the patient monitoring end, completes model training and knowledge distillation, and then deploys a light model. The neural network model inference is performed on the real-time data every unit time, and the data and command center is connected with the patient monitoring end and the ventilation end through electrical connection mode for data and command interaction;

[0097] 3) The airway of the ventilation end is provided with a gate valve, which only receives the communication instruction from the central control end for adjustment in the working state.

[0098] In the embodiment, the central control end is the core of the whole ventilation control process, has CPU and GPU attributes in computing power, can complete neural network model training and real-time inference, and has a memory capacity of GB level, which can store hundreds of thousands of training data.

[0099] S2, the patient monitoring end collects sensing data, including blood pressure, blood oxygen, heart rate, inspiratory pressure and positive end-expiratory pressure, and sends them to the control center every unit time; the patient monitoring end collects data and sends them to the central control end, and the data format is:

[0100] Signal={BP;SP;HR;FI;FO;D;P;R}

[0101] Wherein:

[0102] BP represents the blood pressure of the patient;

[0103] SP represents the blood oxygen of the patient;

[0104] HR represents the heart rate of the patient;

[0105] Fi represents the inspiratory pressure of the patient;

[0106] FO represents the positive end-expiratory pressure of the patient;

[0107] D represents the voltage of the ventilator;

[0108] P represents the power of the ventilator;

[0109] R represents the oxygen output of the ventilator per unit time;

[0110] The data is finally saved in the form of numbers in the central control terminal, the storage order is as described above, and the storage content does not contain the units of the data.

[0111] S3, the control center is installed with a calculation control unit, and labels Y1 and Y2 are set as the ventilation provided by the ventilator and the ventilation required by the patient, respectively. The sensor data from the patient monitoring terminal are preprocessed, and are sent to a neural network model together with historical data for training and reasoning.

[0112] The data preprocessing method comprises the following steps:

[0113] 1) default value filling, the missing values in the received sensor data are supplemented, the blood pressure, blood oxygen and heart rate are supplemented as normal human level values, and the inspiratory pressure and positive end-expiratory pressure missing values are supplemented as zero;

[0114] 2) Z-score standardization is performed on the blood pressure, blood oxygen, heart rate, inspiratory pressure and positive end-expiratory pressure characteristic data, and the calculation method is:

[0115]

[0116] In the formula, μ represents the mean value of the current characteristic, σ represents the standard deviation of the current characteristic, x represents the current characteristic value, and x * represents the normalized characteristic value, which is in the range of 0-1, the mean value of the normalized characteristic is 0, and the standard deviation is 1;

[0117] 3) a third training label Y3 is set according to the ventilation provided by the ventilator and the ventilation required by the patient, if Y1=Y2, then Y3 is 1, otherwise 0.

[0118] The labels Y1 and Y2 in the training data are represented by an m-dimensional vector, the ventilation range of the ventilator is set as 0-G, G is evenly divided into m parts, and each item in the m-dimensional vector represents a ventilation range; in order to further ensure the accuracy of the prediction, in this example, the ventilation range of the ventilator 0-180 is evenly divided into 30 parts, and the difference between two adjacent items in the label vector is 6.

[0119] The historical data comprise:

[0120] 1) relevant data recorded in the past with standard artificial statistical arrangement, including characteristic data of the ventilator and characteristic data of the patient at the corresponding time;

[0121] 2) various data of the best vital signs of people of different ages and genders in different lung disease backgrounds in medical standards.

[0122] The generated new data set is sent to the model for training, and the process is as follows:

[0123] 1) The training data is divided into two parts: ventilator feature data and patient feature data;

[0124] 2) Set the initial iteration round t = 0, the learning round T, and initialize the model parameters w of the twin neural network 0 ;

[0125] In step S32, the two sub-network structures of the twin neural network model are as follows:

[0126] Input-Dense-Resx2-Dense-Output

[0127] In the formula, Input represents the input layer, Res represents the residual structure, the output of which is the sum of the current input and the numerical value after the current input passes through two fully connected layers, Polling represents the pooling layer, Dense represents the fully connected layer, and Output represents the output layer; The number of neurons in the input layer of the ventilator feature extraction sub-network in the twin neural network model is 3, the number of neurons in the first Dense layer is 128, the number of neurons in the Res structure is 64, and the number of neurons in the last Dense layer is 30; The number of neurons in the output layer of the patient feature extraction sub-network is 5, and the number of neurons in the rest of the structure is consistent with the number of neurons in the corresponding position in the ventilator feature extraction sub-network.

[0128] 3) Determine whether t < T, if yes, execute step S34, otherwise the twin neural network model training phase is ended;

[0129] 4) The two sub-networks of the twin neural network model respectively calculate the loss of label Y1 and label Y2, and then calculate the overall loss of the twin neural network model for label Y3, and use the momentum stochastic gradient descent method to update the model parameters;

[0130] The momentum stochastic gradient descent method is used to iteratively update the model parameters, and the calculation formula is:

[0131]

[0132] w t =w t-1 -ηV i t-1

[0133] In the formula, β represents the momentum value, which is a value between 0 and 1, w t-1 represents the model parameters in the t-1th round of the training process, and F(w t-1) represents a loss function, the loss calculated by three labels is added, that is, F=F1+F2+F3, is the gradient of the model loss value of t-1 rounds, V t-1 represents the momentum gradient change value at t-1 rounds, and η represents the learning rate used in the momentum stochastic gradient descent process.

[0134] The loss calculation is performed for labels Y1 and Y2, and the calculation formula is:

[0135]

[0136]

[0137] In the formula, f1(x) and f2(x) represent the respective outputs of the two subnetworks of the twin neural network, Y1 and Y2 are the ventilation labels provided by the ventilator and the ventilation labels expected by the patient, and δ is a smoothing parameter; different smoothing parameters have different degrees of influence on the smoothness of the predicted value result. In order to ensure the accuracy of the model prediction, δ is set to 6 in this example, and the purpose is to keep the difference between the adjacent two items of the label vector dimension consistent.

[0138] The loss calculation is performed for label Y3, and the calculation formula is:

[0139]

[0140] In the formula, N represents the number of samples, Y3 is the contrast value of the ventilation label Y1 provided by the ventilator and the ventilation label Y2 required by the patient, 0 if the same, otherwise 1, and D W is the sample Euclidean distance difference value input into the two subnetworks, and m is a loss threshold; in this embodiment, m is calculated by calculating the Euclidean distance of the mean value of the input samples of the two subnetworks, and the number of samples N for each training is controlled at about 3000.

[0141] 5) The lightweight neural network is used as a student network, the twin neural network model is used as a teacher network, the ventilator features and the patient features are combined, the student network is distilled and trained, and the distilled and trained student network is used as an inference model to infer real-time data;

[0142] The lightweight neural network is distilled and trained, including the following steps:

[0143] 1) The training data is reorganized, the data features of the ventilator and the patient with the same value of Y1 and Y2 are combined, and the combined data is: the sample x represents the features of both, and the label Y represents the ventilation provided by the ventilator and the expected ventilation of the patient, that is, Y=Y1=Y2;

[0144] 2) Distillation training of student network, set t * = 0, learning round T * = 100, initialize model parameters of lightweight neural network Determine t * < T * , if yes, execute step 3), otherwise the knowledge distillation model training stage ends;

[0145] 3) Calculate the output loss in the distillation process, and update the parameters by gradient descent method after gradient derivation of the loss;

[0146] 4) After the knowledge distillation, deploy the lightweight student network in the control center, if there is a lightweight model of the last round, replace it with the lightweight model of the current round, otherwise directly deploy.

[0147] The lightweight student network structure is as follows:

[0148] Input ′ -Dense ′ -Dense ′ -Output ′

[0149] In the formula, Input ′ represents the input layer, Dense ′ represents the fully connected layer, and Output ′ represents the output layer; in this example, the number of neurons in the input layer of the lightweight model is 8, the number of neurons in the first Dense layer is 64, and the number of neurons in the second Dense layer is 30.

[0150] The model loss in the distillation process is calculated as follows:

[0151] L stu (x; W) = a * H(Y, sigma(z s ; T = 1)) + b * H(sigma(z t ; T = t), sigma(z s ; T = t))

[0152]

[0153] In the formula, T represents the distillation temperature, z s is the current student network output, and z tFor the current teacher network output, a and β represent the loss weight factor, and a+β=1 here, Y represents the label, Y=Y1=Y2 here, H(·) represents the minimum mean square error function, and σ(·) represents the mapping function under temperature control; in this embodiment, the distillation temperature when calculating the soft label loss is set to τ=1, and in this case the temperature control function is formally equivalent to the Softmax function.

[0154] The random gradient descent method has the following calculation formula:

[0155]

[0156] In the formula, w old is the updated model parameter, w new is the model parameter before updating, represents the gradient obtained by derivation on the loss L stu , and in this embodiment, the learning rate of this process is set to a dynamic learning rate, which gradually decays from 10 -1 to 10 -4 as the number of learning rounds increases.

[0157] S4, acquire the ventilation control result in the PID mode, the calculation process is not synchronized with the model training process, is synchronized with the model inference process, combine the PID ventilation control result and the model inference result, and send a command to the ventilation end.

[0158] In step S4, the PID method and the model inference result are used together to complete ventilation control, including the following steps:

[0159] 1) The deployed lightweight model infers real-time data to obtain an inference result e(t);

[0160] 2) The control center calculates the control result in the PID mode, and the calculation formula is:

[0161]

[0162] In the formula, K p is a gas proportional gain value, e(t) represents the gas pressure value at time t, T t represents an integral time constant, and T D represents a differential time constant, and u(t) is the control output at time t.

[0163] 3) The control center converts the u(t) value into a communication instruction signal and sends it to the ventilation end.

[0164] In this example, the parameter values of the PID are respectively K p = 12.8, K p × TD = 15.3, it is inferred that the sampling approximates the change at continuous time points in a non-continuous manner.

[0165] S5, the ventilation end adjusts the ventilation valve position according to the instruction, controls the size of the air output and the air pressure change frequency.

[0166] In the present example, the central control end simultaneously trains and deploys the inference of the model, and after the current lightweight model training is completed, it will replace the previous lightweight model to be deployed, and the inference time of the model and the training time of the model are consistent, so as to ensure that the model is deployed in the shortest time after each model training is completed, and the next round of control inference is performed; in the gap of model deployment, the ventilator can temporarily control through the PID model to ensure the continuity of the ventilation performance.

[0167] Embodiment 2:

[0168] As shown in the Figure 2 The present application also provides a ventilator control system, which comprises: a ventilator control system 100, which can be installed in the electronic device structure of the ventilator. According to the realized function, the ventilator control system comprises a ventilator ventilation control sequence 101, a data processing module 102 and a ventilation control module 103. The modules of the present application can also be called units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0169] The ventilator ventilation control sequence 101 of the ventilator software and hardware device is composed of three parts of the patient monitoring end, the central control end and the ventilation end, which is used for collecting and calculating the patient feature data of the ventilator and making corresponding instruction communication; the three parts are electrically connected, including sensors and computing chips, FPGA devices for data acquisition and calculation communication, and data acquisition and action adjustment every unit time;

[0170] The data processing module 102 processes the data from the patient monitoring end, including missing value filling and standardization arrangement, and splits and merges the data to serve the training of the twin neural network and the training of the knowledge distillation respectively;

[0171] The ventilation control module 103 trains the feature data of the patient and the feature data of the ventilator collected by the patient monitoring end, iteratively deploys and completes real-time inference of the central control end whenever a new model training is completed, and sends instructions to the ventilation end according to the inference result to adjust the size of the ventilation volume.

[0172] In detail, the modules in the ventilator control system 100 in the present application are used in the use as described above. Figure 1The ventilator control method described in the embodiment of the present application has the same technical means and can produce the same technical effects, and thus details are not repeated here.

[0173] It should be noted that the above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. Moreover, the terms "comprise", "contain" or any other variants thereof in the present application are intended to cover non-exclusive inclusion, so that the process, device, article or method comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, device, article or method. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of another identical element in the process, device, article or method comprising the element.

[0174] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) as described above, and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the method described in each embodiment of the present application.

[0175] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A ventilator control method, characterized in that, Includes the following steps: S1. Establish a ventilator ventilation control sequence based on ventilator hardware and software devices, namely a patient monitoring end, a central control end, and a ventilation end, which are connected in a tree structure. The central control end is the root node, and the patient monitoring end and the ventilation end are leaf nodes. The root node and the leaf nodes are electrically connected. S2. The patient monitoring terminal collects sensor data, including blood pressure, blood oxygen, heart rate, inspiratory pressure and positive end-expiratory pressure, and sends it to the control center at regular intervals. S3. A computing control unit is installed at the control center, and a label is set. The ventilation provided by the ventilator, label To determine the required ventilation volume for the patient, sensor data from the patient monitoring terminal is preprocessed and fed into a neural network model along with historical data for training and inference. The neural network model training process includes: S31. Split the training data into two parts: characteristic data of the ventilator and characteristic data of the patient. S32. Set the initial number of iteration rounds. Number of learning rounds Initialize the model parameters of the Siamese neural network ; In step S32, the two sub-network structures of the Siamese neural network model are as follows: ; In the formula, Indicates the input layer. This represents the residual structure, whose output is the sum of the current input and the value obtained after passing through two fully connected layers. Indicates the pooling layer. Indicates a fully connected layer. Indicates the output layer; S33, Judgment If so, proceed to step S34; otherwise, the training phase of the Siamese neural network model ends. S34, the two subnetworks of the Siamese neural network model respectively handle the labels ,Label Perform loss calculation, then target the label Calculate the overall loss of the Siamese neural network model and update the model parameters using the momentum stochastic gradient descent method; S35. A lightweight neural network is used as the student network, and the twin neural network model is used as the teacher network. The ventilator features and patient features are combined to perform distillation training on the student network. The distillation-trained student network is then used as an inference model to perform inference on real-time data. S4. Obtain the ventilation control results in PID mode. The calculation process is not synchronized with the model training process, but synchronized with the model inference process. Combine the PID ventilation control results and the model inference results, and send the command to the ventilation end. S5. The ventilation end adjusts the position of the ventilation valve according to the instruction to control the amount of air output and the frequency of air pressure change.

2. The ventilator control method according to claim 1, characterized in that, In step S1, the ventilator ventilation sequence established by the ventilator hardware and software includes: 1) The vital signs monitoring device installed on the patient monitoring terminal and the sensors connected to the ventilation mask are used to collect the patient's vital signs data and air pressure changes during the breathing process. After the ventilator is powered on, it enters a real-time monitoring state and provides data feedback at unit intervals. 2) The central control terminal performs neural network model inference on real-time data every unit of time, and serves as the data connection center and command center, interacting with the patient monitoring terminal and the ventilation terminal through electrical connection. 3) The airway at the ventilation end is equipped with a gate valve, which is adjusted by instructions from the central control unit of the ventilator.

3. The ventilator control method according to claim 1, characterized in that, In step S3, the data preprocessing method includes the following steps: 1) Default value filling: missing values ​​in the received sensor data are filled in. The blood pressure, blood oxygen and heart rate are filled in to the normal human body level values. The missing values ​​of inspiratory pressure and positive end-expiratory pressure are filled in to zero. 2) The blood pressure, blood oxygen, heart rate, inspiratory pressure, and positive end-expiratory pressure characteristic data were Z-score standardized. The calculation method is as follows: ; In the formula This represents the mean of the current feature. The standard deviation of the current feature is represented. Indicates the current eigenvalue. This represents the standardized feature value, which ranges from 0 to 1. The standardized feature has a mean of 0 and a standard deviation of 1.

4. The ventilator control method according to claim 1, characterized in that, In step S34, the model parameters are iteratively updated using the momentum stochastic gradient descent method, and the calculation formula is as follows: ; ; In the formula, This indicates the magnitude of momentum, with a value between 0 and 1. Indicates the first step in the training process Wheel model parameters, The loss function is obtained by summing the losses calculated from the three labels, i.e. , for The gradient of the derivative of the loss value of the wheel model. express The change in momentum gradient during wheel rotation. This represents the learning rate used in momentum stochastic gradient descent. The label , The loss is calculated using the following formula: ; ; In the formula, , This represents the outputs of the two subnetworks in the Siamese neural network. , The ventilation volume label provided for the ventilator and the ventilation volume label expected by the patient. For smoothing parameters; The label The loss is calculated using the following formula: ; In the formula, Indicates the number of samples. Thyristor labels for ventilators Patient's required ventilation label The comparison value is 0 if they are the same, and 1 otherwise. is the difference in Euclidean distance between the samples input to the two subnetworks, and m is the loss threshold.

5. The ventilator control method according to claim 1, characterized in that, In step S35, the lightweight neural network undergoes knowledge distillation training, including the following steps: 1) Reorganize the training data and filter out... , For feature data with the same value, the data features of the ventilator and the patient are merged. The merged data is as follows: sample x represents the feature of both, and the label... This indicates the ventilation provided by the ventilator and the ventilation required by the patient, i.e. ; 2) Conduct distillation training on the student network, and set up... Learning rounds Initialize the model parameters of the lightweight neural network. ,judge If so, proceed to step 3; otherwise, the knowledge distillation model training phase ends. 3) Calculate the output loss during the distillation process, and then use the stochastic gradient descent method to update the parameters after taking the gradient derivative of the loss; 4) After knowledge distillation, the lightweight student network is deployed at the control center. If there is a lightweight model from the previous round, it is replaced by the lightweight model of the current round; otherwise, it is deployed directly.

6. The ventilator control method according to claim 5, characterized in that, The lightweight student network structure is as follows: ; In the formula, Indicates the input layer. Indicates a fully connected layer. Indicates the output layer; The model loss during the distillation process is calculated as follows: ; ; In the formula, T represents the distillation temperature. For the current student network output, For the current teacher network output, and This represents the loss weighting factor, and here... Here , This represents the minimum mean square error function. Represents the mapping function under temperature control; The parameter updates for the attention mechanism model are calculated using the following formula: ; In the formula, For the updated model parameters, These are the model parameters before the update. Indicates the loss The gradient obtained by differentiation.

7. The ventilator control method according to claim 1, characterized in that, In step S4, the ventilation control is achieved by using the PID method and model inference results together, including the following steps: 1) The deployed lightweight model performs inference on real-time data to obtain the inference result e(t); 2) The control center calculates the control results under PID mode using the following formula: ; In the formula, This is the gas proportional gain value. This represents the air pressure value at time t. Represents the integration time constant. Represents the differential time constant. This refers to the control output at time t. 3) The central control terminal will The numerical value is converted into a communication command signal and sent to the ventilation end.

8. A ventilator control system, characterized in that, The system includes: 1) The ventilator ventilation control sequence, including the ventilator hardware and software, consists of three parts: the patient monitoring end, the central control end, and the ventilation end. It is used to collect and process the characteristic data of the ventilator and the patient and to make corresponding command communication. The three parts are electrically connected and include sensors, computing chips, and FPGA devices for data acquisition, computing and communication. Data acquisition and action adjustment are performed at unit time intervals. 2) Data processing module: Processes data from patient monitoring, including missing value imputation and standardization, and splits and merges the data to serve the training of the Siamese neural network and the knowledge distillation training, respectively. 3) The ventilation control module trains on the characteristic data of the patient and the ventilator collected by the patient monitoring terminal. Whenever a new model is trained, the central control terminal iteratively deploys it and completes real-time inference. Based on the inference results, it sends instructions to the ventilation terminal to adjust the amount of ventilation, so as to realize the ventilator control method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Remote sensing image occlusion processing method and device based on supervised comparative learning

    CN114758231A

  • Intelligent control decision-making method and system for breathing machine

    CN114887169A