Sudden cardiac arrest prediction method and device, equipment and storage medium
By collecting interactive parameters in the electronic devices of ventilator-assisted users and using long-term memory networks to predict heart status, the problem of difficulty in predicting cardiac arrest in the existing technology is solved, and the accessibility rate of cardiopulmonary resuscitation and successful rescue are improved. Rate.
Patent Information
- Application Number
- CN202411702231.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing cardiac arrest prediction methods are difficult to issue a timely warning before the event occurs, resulting in a low access rate of cardiopulmonary resuscitation and rescue success rate, mainly because these methods can only deal with a limited number of physiological parameters.
By collecting the interactive parameters of the ventilator, such as respiratory rate, tidal volume, airway pressure and oxygen saturation in the electronic devices of the ventilator assisting users, and using the respiratory pattern prediction network under the heart state based on long and short-term memory network, real-time updates Cell state, calculates the risk probability of cardiac arrest, and generates alarm information when the risk probability exceeds the preset threshold.
Accurate early warning before cardiac arrest occurs, improve the accessibility and rescue success rate of cardiopulmonary resuscitation, save computing resources and human resources, and increase the convenience of the system.
Smart Images

Figure CN119184669A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cardiac arrest risk prediction, and in particular to a cardiac arrest prediction method, device, equipment and storage medium. Background Art
[0002] In the field of medical diagnostic technology, in-hospital cardiac arrest is a common and serious clinical event, which is the loss of the heart's pumping function due to the sudden cessation of the heart's electrical physiological activity in hospitalized patients. Thousands of cardiac arrests occur in a single hospital each year. In-hospital cardiac arrest is usually difficult to predict, and once it occurs, cardiopulmonary resuscitation (CPR) is required immediately to restore the heart's normal electrical physiological activity and pumping function.
[0003] Existing solutions mainly rely on the clinical experience and observation of medical staff, as well as the assessment of the patient's medical history and current physiological parameters. For example, medical staff may monitor the patient's heart rate, blood pressure, respiratory rate, and blood oxygen saturation and other physiological parameters, and judge whether the patient is at risk of in-hospital cardiac arrest based on the changes in these parameters. Alternatively, through some automatic warning rules and algorithms, the system will automatically issue a warning when the patient suffers from cardiac arrest; however, these warning methods can usually only process a limited number of physiological parameters, and it is difficult to issue a warning in time before cardiac arrest actually occurs, resulting in a low accessibility and rescue success rate of cardiopulmonary resuscitation. Summary of the invention
[0004] The present application aims to provide a cardiac arrest prediction method, device, equipment and storage medium. By calculating the changes in the patient's breathing pattern over time, the complex patterns and trends of the patient's heart state that can support the current breathing pattern over time can be fully captured, and accurate warning can be given before cardiac arrest actually occurs.
[0005] In a first aspect, an embodiment provides a cardiac arrest prediction method, which is applied to an electronic device, and in the process of using a ventilator to assist a user in breathing, a first interaction parameter actually occurring in the ventilator is collected at unit time intervals; the first interaction parameter refers to a parameter that measures the human body's acceptance state of specific oxygen input by the ventilator; the first interaction parameter collected at the current time is input as event information into a respiratory pattern prediction network under a cardiac state constructed based on a long short-term memory network, and the target cell state of the respiratory pattern prediction network under the cardiac state at the current moment is updated; and the risk probability calculated by the respiratory pattern prediction network under the cardiac state is output, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
[0006] In one embodiment, the method further includes: When the risk probability exceeds a preset threshold, an alarm message is generated.
[0007] In one embodiment, the first interaction parameter collected at the current time is input as event information into a heart state respiratory pattern prediction network constructed based on a long short-term memory network, and the target cell state of the heart state respiratory pattern prediction network at the current moment is updated, including: Performing a forgetting operation on the last cell state corresponding to the last moment of the breathing pattern prediction network under the heart state at the previous moment to obtain a long-term memory vector; the forgetting operation is used to discard part of the information of the last cell state; Receiving a first hidden state vector outputted from the last cell state; Calculating the first hidden state vector and the first interaction parameter to obtain a short-term memory vector; The long-term memory vector and the short-term memory vector are fused to update the target cell state of the respiratory pattern prediction network under the heart state at the current moment.
[0008] In one embodiment, outputting the risk probability calculated by the respiratory pattern prediction network under the cardiac state includes: Receiving a first hidden state vector corresponding to the last cell state output of the respiratory pattern prediction network under the heart state at the previous moment before the current moment; determining a screening factor according to the first hidden state vector and the first interaction parameter; Calculating the information of the target cell state using the screening factor to screen out a fourth hidden state vector that determines the respiratory state at the current time; The risk probability is calculated according to the fourth hidden state vector.
[0009] In one embodiment, the first interaction parameter includes: Respiratory rate, tidal volume, airway pressure, and oxygen saturation.
[0010] In one embodiment, the method further includes a process of training a respiratory pattern prediction network under cardiac conditions, comprising: During a preset time period of a ventilator-assisted user, the heart state at each detection moment is collected to obtain a state mark corresponding to each detection moment; the heart state includes cardiac arrest and non-cardiac arrest state; the non-cardiac arrest state is represented by the cardiac arrest probability corresponding to the electrocardiogram signal at the collection moment; the collection moment represents the time when a specific non-cardiac arrest state is collected; the arrest probability represents the probability of cardiac arrest within a preset time after the electrocardiogram signal appears, and multiple detection moments are arranged in sequence; In a preset continuous time period of the ventilator-assisted user, the second interaction parameter actually occurring in the ventilator at each detection moment is collected to obtain a training sample sequence; Marking the training sample sequence with the state mark corresponding to each detection moment to obtain a marked training sample sequence; The long short-term memory network is trained using a plurality of the labeled training sample sequences to obtain a respiratory pattern prediction network under the cardiac state.
[0011] In one embodiment, the process of training the long short-term memory network using a single labeled training sample sequence includes: For any specific detection moment among the different detection moments, inputting the second interaction parameter corresponding to the specific detection moment into the current cell state of the long short-term memory network through an input gate of the current cell state; Performing a forget operation on the previous cell state of the long short-term memory network through a forget gate of the current cell state to obtain a long-term memory sample; Calculate the previous cell state through the output gate of the previous cell state of the long short-term memory network to obtain a second hidden state vector; fusing the second hidden state vector and the second interaction parameter through an input gate of the current state calculation network to obtain a short-term memory sample; Fusing the long-term memory sample and the short-term memory sample, updating a previous cell state of the long short-term memory network, and obtaining a current cell state of the long short-term memory network; Processing the current cell state through an output gate of the current cell state to obtain a third hidden state vector; Outputting a predicted probability according to the third hidden state vector; Calculate the predicted probability and the loss value of the state mark corresponding to the specific detection moment; The output gate, the forget gate, the input gate, and the parameters of the output layer of the current state computing network are adjusted according to the loss value so that the long short-term memory network converges.
[0012] In a second aspect, an embodiment provides a cardiac arrest prediction device, which is provided in an electronic device, and the device includes: A parameter acquisition module is used to acquire a first interaction parameter actually occurring in the ventilator at intervals during the process of using the ventilator to assist the user in breathing; the first interaction parameter refers to a parameter that measures the human body's acceptance of a specific oxygen input by the ventilator; A state updating module, configured to input the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under a cardiac state constructed based on a long short-term memory network, and update a target cell state of the respiratory pattern prediction network under the cardiac state at the current moment; The output module is used to output the risk probability calculated by the respiratory pattern prediction network under the cardiac state, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
[0013] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the cardiac arrest prediction method as described above when executed by the processor.
[0014] In a fourth aspect, an embodiment of the present application further provides an electronic device, wherein the storage device is used to store computer instructions, and the processor is used to execute the program instructions to implement the cardiac arrest prediction method as described above.
[0015] The beneficial effects of this application are: The cardiac arrest prediction method proposed in the embodiment of the present application connects the data of the ventilator to the computing model, collects the data actually occurring during the breathing process of the ventilator-assisted user, directly and accurately locates the patient who needs to monitor cardiac arrest, does not need to manually or use other computing methods to determine the patient with the risk of cardiac arrest, and then collects the relevant physiological parameters, saving computing resources and human resources. Further, the embodiment of the present application is based on the cell state updated in real time by the long short-term memory network, simulating the breathing pattern of the patient that changes over time. Since the breathing pattern is determined by the patient's heart state, the patient's breathing pattern can be predicted to infer the heart state that causes the patient to have the breathing pattern, and then determine whether the patient is at risk of cardiac arrest. The data of the ventilator is generated in real time. Under normal circumstances, there will be a change in the breathing pattern before cardiac arrest. Therefore, the above method can issue a warning in time before cardiac arrest occurs, thereby improving the accessibility and rescue success rate of cardiopulmonary resuscitation. The data of the ventilator is the data originally generated during the breathing process of the ventilator-assisted patient, and does not need to be obtained or collected separately, which increases the convenience of system operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a diagram of an implementation environment of the cardiac arrest prediction method proposed in an embodiment of the present application; Figure 2 is a flowchart of the steps of the cardiac arrest prediction method proposed in the embodiment of the present application; Figure 3 It is a schematic diagram of a long short-term memory network configured in an embodiment of the present application; Figure 4 It is a functional module diagram of the cardiac arrest prediction device proposed in the embodiment of the present application. DETAILED DESCRIPTION
[0017] The present application is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are intended to enable the present application to be better understood. However, those skilled in the art can easily recognize that some of the features can be omitted in different situations, or can be replaced by other elements, materials, and methods. In some cases, some operations related to the present application are not shown or described in the specification, in order to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations based on the description in the specification and the general technical knowledge in the art.
[0018] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0019] The serial numbers assigned to the components herein, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0020] Figure 1 is a diagram of the implementation environment of the cardiac arrest prediction method proposed in the embodiment of the present application, such as Figure 1 As shown, the electronic device can be an integrated computing device such as a computer or a server. The electronic device can be connected to or communicate with multiple ventilators at the same time. The ventilator can be set in a hospital bed, an operating room or other places to receive real-time data from the ventilator.
[0021] The patient uses a ventilator ventilation device, and the data generated based on the ventilator-assisted breathing of the patient can represent the objective fact of the patient's current breathing pattern. The patient's breathing pattern is directly affected by the heart state, especially weak heart arrest, which affects the parameters of the ventilator and directly affects the data generated during the operation of the ventilator. The embodiment of the present application proposes a cardiac arrest prediction method, which starts from the direct connection between the breathing pattern and the normal heart, and predicts the patient's breathing pattern change trend in the future according to the interactive parameters of the ventilator, thereby predicting whether there is a risk of cardiac arrest.
[0022] Figure 2 is a flowchart of the cardiac arrest prediction method steps proposed in the embodiment of the present application, such as Figure 2As shown, the steps include: S201: When a ventilator is used to assist a user in breathing, a first interaction parameter actually occurring in the ventilator is collected at intervals of a unit time.
[0023] The first interaction parameter refers to a parameter that measures the human body's acceptance of the specific oxygen input by the ventilator.
[0024] Normally, a ventilator is used for patients with certain risks. The embodiment of the present application collects parameters occurring during the operation of the ventilator as predictive data to accurately locate patients who need to monitor changes in heart status. In addition, the present application uses actual parameters occurring during the operation of the ventilator for predictive calculations, and can accurately monitor changes in the breathing pattern that can be supported by the user's heart status during the period when the user uses the ventilator for assisted breathing.
[0025] After collecting interaction parameters at unit time intervals, the present application uses a breathing pattern prediction network under heart state to predict the breathing pattern at the next moment after the current time, and gives a breathing pattern prediction that the heart state can support at each moment, which can better detect real-time changes in the heart state.
[0026] For example, the time step is 1, and the first interaction parameter is collected at time T , collect the first interaction parameter at time T+1 , collect the first interaction parameter at time T+2 .
[0027] S202: Input the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under cardiac state constructed based on a long short-term memory network, and update the target cell state of the respiratory pattern prediction network under cardiac state at the current moment.
[0028] The cell states of the long short-term memory (LSTM) network at different times are independent. The cell states at different times are obtained by updating the cell states of the previous moment based on the long-term memory that records historical information and the short-term memory that records current information. The patient's heart state at different times is also affected by long-term factors and real-time factors. The patient's heart state affects the patient's breathing pattern, and the patient's breathing pattern is directly reflected in the ventilator data. Therefore, according to the interaction parameters of the ventilator, the long short-term memory network can be used to simulate the patient's breathing pattern at different consecutive moments with the continuous different cell states originally possessed by the long short-term memory network, and predict whether the patient will have cardiac arrest at the next moment from the current moment based on the patient's breathing pattern.
[0029] S203: Outputting the risk probability calculated by the respiratory pattern prediction network under the cardiac state, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
[0030] The cardiac arrest prediction method proposed in the embodiment of the present application connects the data of the ventilator to the computing model, collects the data actually occurring during the breathing process of the ventilator-assisted user, directly and accurately locates the patient who needs to monitor cardiac arrest, does not need to manually or use other computing methods to determine the patient with the risk of cardiac arrest, and then collects the relevant physiological parameters, saving computing resources and human resources. Furthermore, the embodiment of the present application simulates the breathing pattern of the patient that changes over time based on the cell state updated in real time by the long short-term memory network. Since the breathing pattern is determined by the patient's heart state, the patient's breathing pattern can be predicted to infer the heart state that causes the patient to have the breathing pattern, and then determine whether the patient is at risk of cardiac arrest. The data of the ventilator is generated in real time. Under normal circumstances, there will be a change in the breathing pattern before cardiac arrest. Therefore, the above method can issue a warning in time before cardiac arrest occurs, thereby improving the accessibility and rescue success rate of cardiopulmonary resuscitation. The data of the ventilator is the data originally generated during the breathing process of the ventilator-assisted patient, and does not need to be obtained or collected separately, which increases the convenience of the system.
[0031] The cardiac arrest prediction method proposed in the embodiment of the present application may further include step S204: S204: When the risk probability exceeds a preset threshold, an alarm message is generated.
[0032] In the embodiment of the present application, the electronic device can not only display the risk probability calculated by the respiratory pattern prediction network under the cardiac state, but also set a threshold value θ. When the risk probability output by the respiratory pattern prediction network under the cardiac state is greater than the threshold value θ, it indicates that cardiac arrest may occur at the next moment, and the electronic device generates an alarm message to notify medical staff to perform rescue so that corresponding rescue measures can be taken in time before cardiac arrest. The alarm message can be a sound signal, a light signal, a voice signal, a message signal, etc.
[0033] In one embodiment of the present application, the first interaction parameter actually occurring in the ventilator is collected every unit time, including the respiratory frequency. , tidal volume , airway pressure and oxygen saturation .
[0034] Respiratory rate , tidal volume , airway pressure and oxygen saturation Both can indicate the patient's ability to accept oxygen after the ventilator outputs oxygen to the patient according to the set mode. The patient's ability to accept oxygen reflects the patient's heart state. If the patient's heart state is about to stop, the respiratory rate , tidal volume , airway pressure and oxygen saturation There will be immediate and noticeable changes.
[0035] Before executing step S202 in the embodiment of the present application, the first interaction parameter: respiratory rate , tidal volume , airway pressure and oxygen saturation Perform preprocessing operations; the process of preprocessing operations is as follows: K11: Data cleaning, remove data points that are obviously deviated from the normal range during the collection process, such as parameters such as respiratory rate that is too high or too low, abnormal tidal volume, and airway pressure that is too low or too high. Data points that are obviously deviated from the normal range may be caused by equipment failure, etc.
[0036] K12: Normalization processing, normalize each parameter to the interval [0, 1]. Take the respiratory frequency as an example. is the minimum value of respiratory rate in historical data, is the maximum value of the respiratory rate in the historical data. The currently collected respiratory rate is recorded as , after normalization, we get Similarly, similar normalization processing is performed on parameters such as tidal volume, airway pressure, and oxygen saturation.
[0037] The present application also provides a process for training a respiratory pattern prediction network under cardiac conditions, including the following steps: M110: Build a basic network model based on long short-term memory network. Figure 3 Schematic diagram of the long short-term memory network configured in the embodiment of the present application. Figure 3 As shown, the long short-term memory network includes multiple cell states, the previous cell state inputs the next cell state, and is updated according to the relevant parameters corresponding to the next cell state. The updated cell state outputs a hidden vector indicating whether cardiac arrest will occur in the next unit time under the breathing mode supported by the current heart state. The embodiment of the present application uses samples to train the above network to improve the accuracy of the network updating the cell state and improve the accuracy of the hidden vector output by each cell state.
[0038] M120: During the preset time period of the ventilator-assisted user, the heart status at each detection moment is collected to obtain the status mark corresponding to each detection moment.
[0039] The heart state includes cardiac arrest and non-cardiac arrest state; the non-cardiac arrest state is represented by the arrest probability corresponding to the electrocardiogram signal at the time of collection; the collection time represents the time when a specific non-cardiac arrest state is collected; the arrest probability represents the probability of cardiac arrest occurring within a preset time after the electrocardiogram signal appears, and multiple detection times are arranged in sequence.
[0040] For example, the preset time period is to For example, the detection time includes , , ,……, , assuming that If the heart is in cardiac arrest, The status of the moment mark is 100%, detected to The cardiac state at the moment is the non-arrest state. The ECG signal of the patient at the corresponding moment is obtained. The probability of cardiac arrest after the corresponding ECG signal of multiple patients occurs is counted as the mark of the corresponding moment. Assume The patient's ECG signal at the corresponding moment is ECG1. According to historical statistics, the probability of cardiac arrest in patients who have had this ECG signal at the next moment is p%. The status mark of the moment is p%.
[0041] M130: During a preset continuous time period of the ventilator-assisted user, the second interaction parameter actually occurring in the ventilator at each detection moment is collected to obtain a training sample sequence.
[0042] The second interactive parameter also includes respiratory rate, tidal volume, airway pressure and oxygen saturation. For example, the preset time period is to For example, the detection time includes , , assuming The second interactive parameter collected includes respiratory rate , tidal volume , airway pressure and oxygen saturation , The second interactive parameter collected includes respiratory rate , tidal volume , airway pressure and oxygen saturation , the training sample sequence can be expressed as .
[0043] M140: Mark the training sample sequence with the state mark corresponding to each detection moment to obtain a marked training sample sequence.
[0044] Continuing with the above example, the training sample sequence carrying the label can be expressed as .
[0045] M150: Use a plurality of the labeled training sample sequences to train the set long short-term memory network to obtain the breathing pattern prediction network under the cardiac state.
[0046] Continue to refer Figure 3 The process of executing step M150 to train the long short-term memory network can be implemented by using a single labeled training sample sequence to train the set long short-term memory network multiple times. Any one time of using a single labeled training sample sequence to train the set long short-term memory network can be implemented by the following steps: M1501: For any specific detection moment among the different detection moments, the second interaction parameter corresponding to the specific detection moment is input into the current cell state of the long short-term memory network through the input gate of the current cell state.
[0047] refer to Figure 3 , assuming that the current time is the detection time , the second interaction parameter is input through the input gate of the cell state n, The second interaction parameter collected at each moment can carry information used to express the patient's Data on respiratory and cardiac status at all times.
[0048] M1502: Perform a forget operation on the previous cell state of the long short-term memory network through the forget gate of the current cell state to obtain a long-term memory sample.
[0049] For example, The cell state at this moment is , the long-term memory sample can be expressed as , represents the forgetting coefficient, which can be expressed as , represents the sigmoid activation function of the forget gate, represents the weight matrix of the forget gate, is the hidden state vector output by the previous cell state of the LSTM network, is the second interaction parameter, is the bias vector of the forget gate.
[0050] The interactive parameters respiratory rate, tidal volume, airway pressure and oxygen saturation collected at different times are different. Some of the information contained in the interactive parameters is only related to the patient's heart condition at the next moment from the current moment, and some parameters are related to the long-term state of the heart. In addition, some information about the breathing pattern at the current moment may affect the long-term state of the heart, and some information about the breathing pattern may only be affected by the current heart state, and it is difficult to manually analyze the relationship between the information; in view of the above facts, the embodiment of the present application is based on the time series analysis and pattern recognition capabilities of the long short-term memory network. When training the long short-term memory network, the coordination of the forgetting gate, the input gate and the output gate is realized. The information related to the long-term management of the heart state can be screened out from the interactive parameters and cell states and input into the next cell state. The information affecting the current heart state is used to update the current cell state, thereby achieving the accuracy of the simulation of the breathing pattern under the heart state at each moment, and further outputting an accurate prediction of the heart state through the breathing pattern, including the prediction of whether the heart will stop or not, and the prediction of the probability of risk of cardiac arrest.
[0051] M1503: Calculate the previous cell state through the output gate of the previous cell state of the long short-term memory network to obtain a second hidden state vector.
[0052] The process of calculating the second hidden state vector of M1503 can be expressed as: , is the previous cell state of the LSTM network, It is determined by the hidden state vector of the previous cell state and the second interaction parameter of the previous cell state.
[0053] M1504: Fuse the second hidden state vector and the second interaction parameter through the input gate of the current cell state to obtain a short-term memory sample.
[0054] Calculate short-term memory samples via M1504 The process can be expressed as: , is the weight matrix of the input gate, is the activation function of the input gate, is the bias vector for the input gate.
[0055] M1505: Fusing the long-term memory sample and the short-term memory sample, updating the previous cell state of the long short-term memory network, and obtaining the current cell state of the long short-term memory network; Update the previous cell state Get the current cell status The process can be expressed as: , in, is a long-term memory sample, is a short-term memory sample, , is the weight matrix for cell state update, is the bias vector for cell state update.
[0056] M1506: Process the current cell state through the output gate of the current state calculation network to obtain a third hidden state vector.
[0057] The process of calculating the third hidden state vector by M1506 can be expressed as , is the current cell state, , is the weight matrix of the output gate, is the bias vector for the output gate.
[0058] M1507: Output the predicted probability based on the third hidden state vector.
[0059] The output layer has one neuron, and its output layer is activated by the sigmoid function. OK, execute M1507 to output the predicted probability The process may include: , is the weight matrix of the output layer, is the hidden state at the last time step, is the bias vector of the output layer.
[0060] At each detection moment, the LSTM network can output a predicted probability based on the cell state corresponding to the current detection moment.
[0061] M1508: Calculate the predicted probability and the loss value of the state mark corresponding to the specific detection moment.
[0062] The loss function can be: ; Indicates the status mark corresponding to the current detection moment.
[0063] M1509: Adjust the output gate, forget gate, input gate and output layer parameters of the current state calculation network according to the loss value, so that the long short-term memory network converges to obtain the breathing pattern prediction network under the heart state.
[0064] The parameters of the output gate, forget gate, and input gate may include: the weight matrix of the output layer , the weight matrix of the output gate , the bias vector of the output gate , the weight matrix for cell state update , the bias vector for cell state update , the weight matrix of the input gate , the bias vector of the input gate , the weight matrix of the forget gate , the bias vector of the forget gate wait.
[0065] For example, in specific training, hyperparameter optimization techniques such as network search or random search can be used to obtain the best hyperparameter configuration. Hyperparameters include learning rate α, batch size m, number of training rounds n, etc. Among them, the learning rate α determines the step size of the model to update the weight in each iteration, the batch size m determines the amount of data used in each training, and the number of training rounds n indicates the number of times the model trains the entire sample data set. The optimizer uses the Adam optimizer, which combines the advantages of the momentum method and the adaptive learning rate and can quickly converge to the optimal solution.
[0066] After training with multiple training sample sequences carrying labels, the LSTM network can output the predicted probability of the cell state corresponding to each detection moment within the preset range of the labeled state under the test sample test, thus realizing the accurate prediction of the heart state at different moments. Therefore, the LSTM network trained and converged by the above training method can be used as the breathing pattern prediction network under the heart state.
[0067] Based on the respiratory pattern prediction network under the heart state obtained by the above training, the step of updating the target cell state of the respiratory pattern prediction network under the heart state at the current moment includes: S2021: Perform a forgetting operation on the last cell state corresponding to the previous moment of the breathing pattern prediction network under the heart state at the previous moment to obtain a long-term memory vector; the forgetting operation is used to discard part of the information of the previous cell state.
[0068] For example, if the current time is t, the corresponding cell state is , then the cell state at the previous moment of the current moment is , S2022: Receive the first hidden state vector of the previous cell state output.
[0069] The first hidden state vector is the last cell state output during the model application phase. .
[0070] S2023: Calculate the first hidden state vector and the first interaction parameter to obtain a short-term memory vector.
[0071] S2024: Fusing the long-term memory vector and the short-term memory vector, and updating the target cell state of the respiratory pattern prediction network under the heart state at the current moment.
[0072] The calculation process of the model in the application phase can refer to the calculation process of the model in the training phase.
[0073] Based on the respiratory pattern prediction network under the heart state obtained by the training, the step of outputting the risk probability calculated by the respiratory pattern prediction network under the heart state comprises: S2031: Receive a first hidden state vector corresponding to the last cell state output by the respiratory pattern prediction network under the heart state at the previous moment before the current moment.
[0074] S2032: Determine a screening factor according to the first hidden state vector and the first interaction parameter.
[0075] The process of the screening factor is: the output gate screens the information associated with the current heart state in the first hidden state vector and the first interaction parameter. Corresponding to the training stage, the screening factor refers to .
[0076] S2033: Calculate the information of the target cell state using the screening factor to screen out a fourth hidden state vector that determines the respiratory state at the current time.
[0077] The fourth hidden state vector is the output of the last cell state in the model application phase. .
[0078] S2034: Calculate the risk probability according to the fourth hidden state vector.
[0079] The process of the respiratory pattern prediction network under cardiac state outputting the risk probability at each moment in the application phase can refer to the process of the long short-term memory network outputting the predicted probability in the training phase.
[0080] Figure 4 is a functional module diagram of a cardiac arrest prediction device proposed in an embodiment of the present application, which is arranged in an electronic device, such as Figure 4 As shown, the cardiac arrest prediction device comprises: The parameter acquisition module 41 is used to acquire the first interaction parameter actually occurring in the ventilator at every unit time during the process of using the ventilator to assist the user in breathing; the first interaction parameter refers to a parameter that measures the human body's acceptance state of the specific oxygen input by the ventilator; A state updating module 42, configured to input the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under a heart state constructed based on a long short-term memory network, and update the target cell state of the respiratory pattern prediction network under the heart state at the current moment; The output module 43 is used to output the risk probability calculated by the respiratory pattern prediction network under the cardiac state, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
[0081] Figure 4 The implementation principle and technical effects of the cardiac arrest prediction device provided in the illustrated embodiment may be further referred to the relevant description in the embodiment based on the cardiac arrest prediction method.
[0082] Optionally, the device further comprises: The early warning module is used to generate an alarm message when the risk probability exceeds a preset threshold.
[0083] Optionally, the state updating module is specifically used to perform a forgetting operation on the last cell state corresponding to the last moment of the respiratory pattern prediction network under the heart state at the previous moment to obtain a long-term memory vector; the forgetting operation is used to discard part of the information of the last cell state; Receiving a first hidden state vector outputted from the last cell state; Calculating the first hidden state vector and the first interaction parameter to obtain a short-term memory vector; The long-term memory vector and the short-term memory vector are fused to update the target cell state of the respiratory pattern prediction network under the heart state at the current moment.
[0084] Optionally, the output module is specifically used to receive a first hidden state vector corresponding to the last cell state output of the respiratory pattern prediction network under the heart state at the previous moment before the current moment; determining a screening factor according to the first hidden state vector and the first interaction parameter; Calculating the information of the target cell state using the screening factor to screen out a fourth hidden state vector that determines the respiratory state at the current time; The risk probability is calculated according to the fourth hidden state vector.
[0085] Optionally, the first interaction parameter includes: Respiratory rate, tidal volume, airway pressure, and oxygen saturation.
[0086] Optionally, the device further includes a model training module, and the model training module includes: The marking submodule is used to collect the heart state at each detection moment within a preset time period of the ventilator-assisted user, and obtain the state mark corresponding to each detection moment; the heart state includes cardiac arrest and non-cardiac arrest state; the non-cardiac arrest state is represented by the arrest probability corresponding to the electrocardiogram signal at the collection moment; the collection moment represents the time when a specific non-cardiac arrest state is collected; the arrest probability represents the probability of cardiac arrest within a preset time length after the electrocardiogram signal appears, and multiple detection moments are arranged in sequence; The sample collection submodule is used to collect the second interaction parameter actually occurring in the ventilator at each detection moment within a preset continuous time period of the ventilator-assisted user to obtain a training sample sequence; the training sample sequence is marked with a state mark corresponding to each detection moment to obtain a marked training sample sequence; The training submodule is used to train the set long short-term memory network using a plurality of the training sample sequences carrying the mark to obtain the breathing pattern prediction network under the cardiac state.
[0087] Optionally, the training submodule is specifically used in the process of training the set long short-term memory network using a single labeled training sample sequence: For any specific detection moment among the different detection moments, inputting the second interaction parameter corresponding to the specific detection moment into the current cell state of the long short-term memory network through an input gate of the current cell state; Performing a forget operation on the previous cell state of the long short-term memory network through a forget gate of the current cell state to obtain a long-term memory sample; Calculate the previous cell state through the output gate of the previous cell state of the long short-term memory network to obtain a second hidden state vector; fusing the second hidden state vector and the second interaction parameter through an input gate of the current state calculation network to obtain a short-term memory sample; Fusing the long-term memory sample and the short-term memory sample, updating a previous cell state of the long short-term memory network, and obtaining a current cell state of the long short-term memory network; Processing the current cell state through an output gate of the current cell state to obtain a third hidden state vector; Outputting a predicted probability according to the third hidden state vector; Calculate the predicted probability and the loss value of the state mark corresponding to the specific detection moment; The output gate, the forget gate, the input gate, and the parameters of the output layer of the current state computing network are adjusted according to the loss value so that the long short-term memory network converges.
[0088] Regarding the various modules / units included in the various devices described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining modules / units can be implemented in the form of hardware such as circuits; for various devices applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component of the chip module (such as a chip, circuit module, etc.) or in different components, or at least some of the modules / units can be implemented in the form of software programs. The software program may be implemented in the form of a program, which runs on a processor integrated in the chip module, and the remaining modules / units may be implemented in the form of hardware such as circuits; for each device applied to or integrated in the electronic terminal device, each module / unit contained therein may be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (for example, a chip, a circuit module, etc.) or in different components in the electronic terminal device, or at least some modules / units may be implemented in the form of a software program, which runs on a processor integrated in the electronic terminal device, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits.
[0089] An embodiment of the present application further provides an electronic device, wherein the storage device is used to store computer instructions, and the processor is used to execute the program instructions to implement the cardiac arrest prediction method as described above.
[0090] In one embodiment of the present application, a computer-readable storage medium is provided, on which a program is stored. The stored program includes a method that can be loaded by a processor and process any of the above embodiments.
[0091] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0092] The above specific examples are used to illustrate the present application, which is only used to help understand the present application and is not intended to limit the present application. For technicians in the technical field to which the present application belongs, they can also make some simple deductions, deformations or substitutions based on the ideas of the present application.
Claims
1. A cardiac arrest prediction method, characterized in that: Applied to electronic equipment, the method comprises: In the process of using the ventilator to assist the user in breathing, the first interaction parameter actually occurring in the ventilator is collected every unit time; the first interaction parameter refers to a parameter that measures the human body's acceptance state of the specific oxygen input by the ventilator; Input the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under a heart state constructed based on a long short-term memory network, and update the target cell state of the respiratory pattern prediction network under a heart state at the current moment; The risk probability calculated by the respiratory pattern prediction network under the cardiac state is output, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
2. The method according to claim 1, characterized in that: The method further comprises: When the risk probability exceeds a preset threshold, an alarm message is generated.
3. The method according to claim 1, characterized in that Inputting the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under a heart state constructed based on a long short-term memory network, and updating the target cell state of the respiratory pattern prediction network under a heart state at the current moment, including: Performing a forgetting operation on the last cell state corresponding to the last moment of the breathing pattern prediction network under the heart state at the previous moment to obtain a long-term memory vector; the forgetting operation is used to discard part of the information of the last cell state; Receiving a first hidden state vector outputted from the last cell state; Calculating the first hidden state vector and the first interaction parameter to obtain a short-term memory vector; The long-term memory vector and the short-term memory vector are fused to update the target cell state of the respiratory pattern prediction network under the heart state at the current moment.
4. The method according to claim 1, characterized in that: Outputting the risk probability calculated by the respiratory pattern prediction network under the cardiac state includes: Receiving a first hidden state vector corresponding to the last cell state output of the respiratory pattern prediction network under the heart state at the previous moment before the current moment; determining a screening factor according to the first hidden state vector and the first interaction parameter; Calculating the information of the target cell state using the screening factor to screen out a fourth hidden state vector that determines the respiratory state at the current time; The risk probability is calculated according to the fourth hidden state vector.
5. The method according to any one of claims 1 to 4, characterized in that: The first interaction parameter includes: Respiratory rate, tidal volume, airway pressure, and oxygen saturation.
6. The method according to claim 1, characterized in that The method also includes a process of training a respiratory pattern prediction network under cardiac conditions, comprising: During a preset time period of a ventilator-assisted user, the heart state at each detection moment is collected to obtain a state mark corresponding to each detection moment; the heart state includes cardiac arrest and non-cardiac arrest state; the non-cardiac arrest state is represented by the cardiac arrest probability corresponding to the electrocardiogram signal at the collection moment; the collection moment represents the time when a specific non-cardiac arrest state is collected; the arrest probability represents the probability of cardiac arrest within a preset time after the electrocardiogram signal appears, and multiple detection moments are arranged in sequence; In a preset continuous time period of the ventilator-assisted user, the second interaction parameter actually occurring in the ventilator at each detection moment is collected to obtain a training sample sequence; Marking the training sample sequence with the state mark corresponding to each detection moment to obtain a training sample sequence carrying the mark; The long short-term memory network is trained using a plurality of the labeled training sample sequences to obtain the respiratory pattern prediction network under the cardiac state.
7. The method according to claim 6, characterized in that The process of training the long short-term memory network with a single labeled training sample sequence includes: For any specific detection moment among the different detection moments, inputting the second interaction parameter corresponding to the specific detection moment into the current cell state of the long short-term memory network through an input gate of the current cell state; Performing a forget operation on the previous cell state of the long short-term memory network through a forget gate of the current cell state to obtain a long-term memory sample; Calculate the previous cell state through the output gate of the previous cell state of the long short-term memory network to obtain a second hidden state vector; fusing the second hidden state vector and the second interaction parameter through an input gate of the current state calculation network to obtain a short-term memory sample; Fusing the long-term memory sample and the short-term memory sample, updating a previous cell state of the long short-term memory network, and obtaining a current cell state of the long short-term memory network; Processing the current cell state through an output gate of the current cell state to obtain a third hidden state vector; Outputting a predicted probability according to the third hidden state vector; Calculate the predicted probability and the loss value of the state mark corresponding to the specific detection moment; The output gate, the forget gate, the input gate, and the parameters of the output layer of the current state computing network are adjusted according to the loss value so that the long short-term memory network converges.
8. A cardiac arrest prediction device, characterized in that: Set in an electronic device, the device includes: A parameter acquisition module is used to acquire a first interaction parameter actually occurring in the ventilator at intervals during the process of using the ventilator to assist the user in breathing; the first interaction parameter refers to a parameter that measures the human body's acceptance of a specific oxygen input by the ventilator; A state updating module, configured to input the first interaction parameter collected at the current time as event information into a respiratory pattern prediction network under a cardiac state constructed based on a long short-term memory network, and update a target cell state of the respiratory pattern prediction network under the cardiac state at the current moment; The output module is used to output the risk probability calculated by the respiratory pattern prediction network under the cardiac state, wherein the risk probability is the probability of cardiac arrest occurring at the next moment determined based on the current respiratory pattern represented by the target cell state.
9. An electronic device, characterized in that: The method comprises at least one processor and at least one memory connected to the processor; the memory stores program instructions for being executed by the processor, and the processor calls the program instructions to execute any one of the methods described in claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A program is stored on the storage medium, and the stored program includes a method that can be loaded by a processor and process any one of claims 1 to 7.
Citation Information
Patent Citations
Sudden cardiac arrest grading response early warning method and system based on wearable device
CN115844348A
Sensing respiratory parameters as indicators of cardiac arrest events
CN117202843A
Predictive model for adverse patient outcomes
US20210225517A1
Cited By
Heterogeneous computing power platform load prediction method
CN120523608A
A heterogeneous computing power platform load prediction method
CN120523608B