A method and device for predicting respiratory rate in shipboard environment
By using deep learning technology to construct a respiratory rate prediction method in a shipboard environment, and utilizing ECG and PPG signals, the problem of rapid and accurate respiratory rate measurement in a shipboard environment is solved, and convenient and intelligent respiratory rate detection is achieved.
Patent Information
- Application Number
- CN202410898770.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-07-05
AI Technical Summary
Existing technologies make it difficult to quickly and accurately measure a patient's respiratory rate in a shipboard environment. Due to limited medical equipment, harsh environment, cramped space and budget constraints, medical means are unable to effectively detect respiratory rate.
A respiratory rate prediction method based on deep learning technology was adopted. Electrocardiogram (ECG) and photoplethysmography (PPG) signals were used. After Capnobase training data set screening and preprocessing, a respiratory rate prediction model was constructed. The model included an encoding layer, an Inception module, a long short-term memory recurrent network, and a convolutional layer. The model was deployed on a Raspberry Pi platform for prediction.
It realizes fast, accurate, portable, adaptable and low-cost respiratory rate measurement, integrates convenience and intelligence, reduces errors and integrates early warning systems to prevent or reduce the harm of accidents.
Smart Images

Figure CN118873116B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical health, and in particular to a method and device for predicting respiratory rate in a shipboard environment. Background Art
[0002] Seafarers, as essential workers at sea, face unique challenges in their work environment, limited mobility, and a lack of regular exercise and recreational activities. This puts them at high risk of accidental injuries and various illnesses at work. Providing seafarers with convenient and effective medical services is crucial for protecting their health and safety.
[0003] Currently, conventional medical applications have been developed to predict respiratory rate based on electrocardiogram (ECG) or photoplethysmography (PPG) signals. Respiratory-related signals (such as tidal volume) can be extracted from the raw ECG or PPG signals, including baseline drift (BW), amplitude modulation (AM), and frequency modulation (FM). Key features are extracted from the respiration-related signals using various signal processing methods in the time or frequency domains, and the respiration rate (RR) is estimated based on these features. Finally, the estimated RRs are combined to improve prediction accuracy.
[0004] Respiratory rate (RR) is a widely used health monitoring indicator. When a crew member experiences health issues, accurately measuring their respiratory rate is crucial for disease detection and diagnosis. However, due to limited medical equipment, harsh environmental conditions, cramped space, and budget constraints, existing medical methods often cannot quickly and accurately measure a patient's respiratory rate, creating challenges for onboard medical care. Summary of the Invention
[0005] In light of the shortcomings of existing technologies, the present invention provides a method and device for predicting respiratory rate in shipboard environments. This method utilizes relatively easy-to-measure electrocardiogram (ECG) and photoplethysmography (PPG) signals to measure a patient's respiratory rate. This solution offers advantages such as speed, accuracy, portability, strong adaptability, and affordability.
[0006] A method for predicting respiratory rate in a shipboard environment comprises the following steps:
[0007] Based on the public data set Capnobase, basic physiological data of the personnel is obtained, including electrocardiogram information, photoplethysmography information, and respiratory rate information. After screening the basic physiological data of the personnel, model training data is obtained and preprocessed;
[0008] A respiratory rate prediction model is trained based on the preprocessed training data, the respiratory rate prediction model including a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. The ECG information and photoplethysmography information data are encoded in the coding layer and used as the input signal of the first Inception module. The output signal of the first Inception module is used as the input signal of the second Inception module. The input signal of the second Inception module is input into the third Inception module on the one hand and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module. The output signal of the third Inception module is used as the input signal of the fourth Inception module. The output signal of the fourth Inception module is input into the convolutional layer.
[0009] Obtain real ECG information and photoplethysmography information and input them into the trained respiratory rate prediction model;
[0010] The output result of the convolutional layer of the respiratory rate prediction model is obtained as the respiratory rate prediction result.
[0011] Furthermore, the basic physiological data of the personnel are screened, including: deleting all non-adult data in the Capnobase data set.
[0012] Furthermore, the preprocessing includes:
[0013] Performing peak detection on the ECG information, obtaining the average value of all pulse waveforms to construct a template;
[0014] Calculate the Pearson correlation coefficient between the template and each pulse waveform;
[0015] The signals with a PPG signal correlation coefficient greater than or equal to 0.86 were considered acceptable signals, and the signals with an ECG signal correlation coefficient greater than or equal to 0.66 were considered acceptable signals.
[0016] Furthermore, the preprocessing further includes: extracting respiration-related information from the acceptable ECG signal and the acceptable PPG signal using an FIR bandpass filter.
[0017] Furthermore, the electrocardiogram information is collected by an ADS1293 sensor; and the photoplethysmography information is collected by a MAX30102 sensor.
[0018] Furthermore, the respiratory rate prediction model is trained on a PC and deployed on a Raspberry Pi platform after training.
[0019] The present invention also discloses a device for predicting respiratory rate in a shipboard environment, which is implemented based on the above prediction method and includes:
[0020] A training data acquisition unit is configured to acquire basic physiological data of a person based on the public data set Capnobase, the basic physiological data including electrocardiogram information, photoplethysmography information, and respiratory rate information, filter the basic physiological data, acquire model training data, and preprocess the model training data;
[0021] A model training unit, which is used to train a respiratory rate prediction model based on preprocessed training data, the respiratory rate prediction model including a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. The ECG information and photoplethysmography information data coding layer is encoded as the input signal of the first Inception module, the output signal of the first Inception module is used as the input signal of the second Inception module, the input signal of the second Inception module is input into the third Inception module on the one hand, and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module, the output signal of the third Inception module is used as the input signal of the fourth Inception module, and the output signal of the fourth Inception module is input into the convolutional layer;
[0022] A unit for acquiring data to be predicted, which is used to obtain real ECG information and photoplethysmography information and input them into the trained respiratory rate prediction model;
[0023] A prediction result output unit is used to obtain the output result of the convolutional layer of the respiratory rate prediction model as the respiratory rate prediction result.
[0024] Compared with the prior art, the present invention has the following advantages:
[0025] This method uses a deep learning-based approach to measure a patient's respiratory rate using relatively easy-to-measure electrocardiogram (ECG) and photoplethysmography (PPG) signals. This approach offers advantages such as speed, accuracy, portability, strong adaptability, and affordability.
[0026] This invention combines convenience and intelligence, targeting specialized work groups and possessing significant development potential and application prospects. The AI system's powerful data analysis capabilities enable intelligent decision-making, error reduction, and the integration of early warning systems to prevent or mitigate the harm of accidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 This is a flow chart of a method for predicting respiratory rate in a shipboard environment according to the present invention.
[0029] Figure 2 This is the electrocardiogram signal collected by ADS1293 in the embodiment of the present invention.
[0030] Figure 3 It is the PPG signal collected by the Max3010 sensor in the embodiment of the present invention.
[0031] Figure 4 It is the PPG template evaluation signal in the embodiment of the present invention.
[0032] Figure 5 This is the ECG template evaluation signal in an embodiment of the present invention. Figure 6 This is the respiratory rate prediction model architecture in an embodiment of the present invention.
[0033] Figure 7 This is a system architecture diagram for implementing respiratory rate prediction in a shipboard environment according to an embodiment of the present invention.
[0034] Figure 8 : This is a structural diagram of the ADS1293 sensor in an embodiment of the present invention, where a is a schematic diagram of a 3-lead connection method and b is a schematic diagram of a 5-lead connection method.
[0035] Figure 9 This is the graphical interface of the data acquisition program in the embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0037] like Figure 1 As shown, the present invention provides a method for predicting respiratory rate in a shipboard environment, comprising the following steps:
[0038] S1. Based on the public data set Capnobase, basic physiological data of the personnel are obtained. The basic physiological data include electrocardiogram information, photoplethysmography information, and respiratory rate information. After screening the basic physiological data of the personnel, model training data is obtained and preprocessed.
[0039] Specifically, the objects of data collection in the present invention include basic information of seafarers (name, age) and basic physiological information (ECG, PPG). The present invention is committed to monitoring the basic health status of seafarers and complying with the General Data Protection Regulation (GDPR) to handle and protect the confidentiality of basic physiological data. In the embodiment of the present invention, patient data is collected to provide direct healthcare services, but when required by law, this information can be disclosed with consent or for legitimate reasons that can prove public interest. Public interests include the safety of other crew members on board. These data may include demographic data, such as date of birth, and patient health information recorded in coded form. ECG signals and PPG signals are collected by ADS1293 sensors and Max3010 sensors, respectively. Figure 2 The figure shows ECG data collected by a single ADS1293 device for leads I, II, and V. The sensor generates an ECG signal with an amplitude of 2mV at a rate of 60 beats per minute. Figure 3 Shows the PPG signal collected by the Max3010 sensor.
[0040] Since the present invention aims to evaluate the respiratory rate of seafarers at sea, this embodiment uses the Capnobase dataset as the training dataset and excludes all non-adult data (<18 years old) in the Capnobase dataset.
[0041] Due to the characteristics of the ship's environment, such as shaking and instability, signal acquisition is affected by noise such as baseline drift, transient noise interference, power supply interference, and muscle artifacts, resulting in low signal quality. Low-quality signals not only fail to accurately extract relevant feature information, but also are not conducive to model accuracy analysis. Therefore, in this system, the SQI method is used to evaluate signal quality using corresponding templates extracted from ECG and PPG data respectively. The SQI method is particularly suitable for signals collected under dynamic and motion conditions. Specifically, the following operations are performed on the ECG signal and PPG signal respectively:
[0042] First, perform peak detection and take the average value of all pulse waveforms to construct a template. Specifically, perform peak detection on a section of ECG (PPG) signal. Take the average value of the distance between all adjacent peaks as the length of the template signal. With each peak as the center, the template signal length extracts the pulse waveform of each peak. Figure 4-5 The ECG (PPG) template data extracted in the embodiment of the present invention is given.
[0043] Then, the Pearson correlation coefficient between the template and each pulse waveform is calculated according to the following formula: A coefficient greater than or equal to 0.86 indicates that the signal is acceptable, and a correlation coefficient greater than or equal to 0.66 indicates that the ECG signal is acceptable.
[0044]
[0045] Among them, X i Y is the horizontal coordinate of the signal currently being processed (ECG or PPG), i is the horizontal coordinate of the signal currently being processed, is the horizontal coordinate of the template signal, is the vertical coordinate of the template signal, and n is the signal length.
[0046] ECG and PPG signals contain a large amount of non-respiratory components, so a 0.1-0.6 Hz bandpass filter is used to extract respiratory-related information. All data is then divided into 8-second samples, and 0-1 normalization is performed within the samples.
[0047] S2. Train a respiratory rate prediction model based on the preprocessed training data, where the respiratory rate prediction model includes a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. Encode the electrocardiogram information and photoplethysmography information data in the coding layer and use them as the input signal of the first Inception module. The output signal of the first Inception module serves as the input signal of the second Inception module. The input signal of the second Inception module is input into the third Inception module on the one hand and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module. The output signal of the third Inception module serves as the input signal of the fourth Inception module. The output signal of the fourth Inception module is input into the convolutional layer.
[0048] Specifically, the respiratory rate prediction model in the present invention is as follows Figure 6As shown, it consists of an encoding layer (Embedding), an Inception module, a long short-term memory recursive network (LSTM) and a convolutional layer (Conv). The encoding layer accepts a physiological signal sequence of size 320 (8s*40Hz)×32. The encoding layer performs encoding operations along each dimension by a one-dimensional convolution kernel of size 3. The second layer is the Inception module, which is derived from GoogLeNet. The embodiment of this application modifies part of the network in GoogLeNet to be more in line with this system. Specifically, each Inception module is implemented by four parallel dilated convolutions, and the dilation ratios are 2, 4, 8, and 16, respectively. Subsequently, the feature vectors are merged after convolution and the feature dimension downsampling operation is implemented by the convolution layer. After the two Inception modules, an LSTM layer is passed so that the model can learn the long-term dependencies in the sequence. The Inception module composed of deconvolution implements the feature upsampling operation. Finally, after two convolution layers, a respiratory waveform prediction signal of size 320 (8s*40Hz)×1 is obtained.
[0049] S3, obtaining real ECG information and photoplethysmography information, and inputting them into the trained respiratory rate prediction model;
[0050] S4. Obtain an output result of the convolutional layer of the respiratory rate prediction model as a respiratory rate prediction result.
[0051] The scheme and effects of the present invention are further described below based on specific application examples.
[0052] This embodiment provides a system for implementing the above detection method. Figure 7 As shown in the figure, the entire system consists of an Arduino development board, a Max30102 sensor, an ADS1293 sensor, a Raspberry Pi, and a deep learning network. The system is centered around the Raspberry Pi. The Max30102 and ADS1293 sensors collect blood oxygen and heart rate data, respectively, and transmit them to the Raspberry Pi. The data is then predicted by the deep learning model embedded in the Raspberry Pi and displayed through a graphical user interface.
[0053] Furthermore, the MAX30102 sensor, launched in 2016 by Maxim Integrated, is a biosensor with an integrated pulse and heart rate monitor. The sensor includes two LEDs, a photodiode, and an 18-bit ADC converter, enabling signal amplification and filtering. The sensor utilizes a 1.8V core power supply, a 3.3V LED power supply, and a standard I2C-compatible communication interface.
[0054] The sensor is based on the difference in the absorption coefficients of hemoglobin (Hb) and oxyhemoglobin (HbO2) for different wavelengths of light. Blood with high oxygen content absorbs more infrared light, while blood with low oxygen content absorbs more red light. In areas of the body where the skin is thin enough and there are blood vessels underneath, this difference can be used to determine oxygen saturation. The specific implementation is as follows:
[0055] (1) Place the sensor on the finger or earlobe, where the skin is thinner, allowing both spectra to easily penetrate the tissue.
[0056] (2) Light source emission: MAX30102 has built-in red (RED) and infrared (IR) LED light sources, which irradiate the body's tissues through the skin.
[0057] (3) Photodiode reception: The photodiode receives light reflected from the tissue and converts it into an electrical signal.
[0058] (4) Signal processing: The received optical signal is processed by the analog front end and digital signal processing module, including filtering, amplification, analog-to-digital conversion and other processes.
[0059] (5) The calculation method of blood oxygen saturation SPO2 is as follows:
[0060]
[0061] Furthermore, the ECG sensor used in this system is the ADS1293 sensor produced by Texas Instruments Semiconductor. This sensor can simultaneously output 3 channels, 24-bit high-resolution digital ECG. In addition, the ADS1293 also includes functions such as AC / DC disconnection detection, battery power monitoring, and self-diagnosis alarm. This project uses 3-lead and 5-lead connection methods to measure ECG signals. The connection method is as follows Figure 8 The lead calculation is as follows:
[0062] Lead I=LA–RA# formula (2)
[0063] Lead II=LL–RA# formula (3)
[0064] Lead V=V1–WCT# formula (4)
[0065] Here, Leas X refers to lead X (X = I, II, V), and LA, RA, LL, V1, and WCT refer to the pins of the ADS1293 sensor.
[0066] Arduino is an open-source platform based on the ATmega328 microcontroller for building and programming electronics. It features 14 digital input / output pins, 6 analog inputs, a 16MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. The Arduino environment is open-source and easy to use, written in Java and based on Processing and other open-source software. Arduino runs on various platforms, including Windows, Mac OS X, and Linux. This system uses an Arduino as a slave computer to collect ECG signals. Table 1 lists the connections between the Max30102 sensor and the Arduino development board.
[0067] Table 1: Max30102 and Arduino connection table
[0068]
[0069] The Raspberry Pi used in the embodiment of this application is an ARM Cortex-A72 architecture with a quad-core processor, a 1.5GHz main frequency, and a Linux operating system. Due to its simplicity, ease of use, economy, and powerful performance, the Raspberry Pi has been widely used in various embedded systems in the Internet of Things. The model that has been trained on the PC needs to be deployed to the Raspberry Pi platform. To ensure that the model is not limited by the platform memory, all data is resampled to 40Hz. To do this, the following steps need to be performed in sequence:
[0070] (1) The trained model parameters are saved as a .pth file in PyTorch format;
[0071] (2) Install the PyTorch deep learning framework and other necessary Python packages on the Raspberry Pi platform;
[0072] (3) Load the weight file in the Raspberry Pi and test it.
[0073] The graphical interface built in this embodiment is as follows Figure 9 shown.
[0074] The present invention also discloses a device for predicting respiratory rate in a shipboard environment, which is implemented based on the above prediction method and includes:
[0075] A training data acquisition unit is configured to acquire basic physiological data of a person based on the public data set Capnobase, the basic physiological data including electrocardiogram information, photoplethysmography information, and respiratory rate information, filter the basic physiological data, acquire model training data, and preprocess the model training data;
[0076] A model training unit, which is used to train a respiratory rate prediction model based on preprocessed training data, the respiratory rate prediction model including a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. The ECG information and photoplethysmography information data coding layer is encoded as the input signal of the first Inception module, the output signal of the first Inception module is used as the input signal of the second Inception module, the input signal of the second Inception module is input into the third Inception module on the one hand, and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module, the output signal of the third Inception module is used as the input signal of the fourth Inception module, and the output signal of the fourth Inception module is input into the convolutional layer;
[0077] A unit for acquiring data to be predicted, which is used to obtain real ECG information and photoplethysmography information and input them into the trained respiratory rate prediction model;
[0078] A prediction result output unit is used to obtain the output result of the convolutional layer of the respiratory rate prediction model as the respiratory rate prediction result.
[0079] As for an embodiment of a respiratory rate prediction device for a shipboard environment of the present invention, since it corresponds to the embodiment of a respiratory rate prediction method for a shipboard environment above, the description is relatively simple. For relevant similarities, please refer to the description of the part in the embodiment of the respiratory rate prediction method for a shipboard environment above, which will not be described in detail here.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting respiratory rate in a shipboard environment, characterized in that: The following steps are involved: Based on the public data set Capnobase, basic physiological data of the personnel is obtained, including electrocardiogram information, photoplethysmography information, and respiratory rate information. After screening the basic physiological data of the personnel, model training data is obtained and preprocessed; A respiratory rate prediction model is trained based on the preprocessed training data, the respiratory rate prediction model including a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. The ECG information and photoplethysmography information data are encoded in the coding layer and used as the input signal of the first Inception module. The output signal of the first Inception module is used as the input signal of the second Inception module. The input signal of the second Inception module is input into the third Inception module on the one hand and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module. The output signal of the third Inception module is used as the input signal of the fourth Inception module. The output signal of the fourth Inception module is input into the convolutional layer. Obtain real ECG information and photoplethysmography information and input them into the trained respiratory rate prediction model; The output result of the convolutional layer of the respiratory rate prediction model is obtained as the respiratory rate prediction result.
2. The method for predicting respiratory rate in a shipboard environment according to claim 1, characterized in that: The basic physiological data of the person is screened, including: deleting all non-adult data in the Capnobase dataset.
3. The method for predicting respiratory rate in a shipboard environment according to claim 1, characterized in that: The pretreatment includes: Performing peak detection on the ECG information, obtaining the average value of all pulse waveforms to construct a template; Calculate the Pearson correlation coefficient between the template and each pulse waveform; The signals with a PPG signal correlation coefficient greater than or equal to 0.86 were considered acceptable signals, and the signals with an ECG signal correlation coefficient greater than or equal to 0.66 were considered acceptable signals.
4. The method for predicting respiratory rate in a shipboard environment according to claim 3, characterized in that: The preprocessing further includes: extracting respiration-related information from the acceptable ECG signal and the acceptable PPG signal using an FIR bandpass filter.
5. The method for predicting respiratory rate in a shipboard environment according to claim 1, characterized in that: The electrocardiogram information is collected by an ADS1293 sensor; the photoplethysmography information is collected by a MAX30102 sensor.
6. The method for predicting respiratory rate in a shipboard environment according to claim 1, characterized in that: The respiratory rate prediction model is trained on a PC and deployed on a Raspberry Pi platform after training.
7. A device for predicting respiratory rate in a shipboard environment, implemented based on the prediction method of claim 1, characterized in that: include: A training data acquisition unit is configured to acquire basic physiological data of a person based on the public data set Capnobase, the basic physiological data including electrocardiogram information, photoplethysmography information, and respiratory rate information, filter the basic physiological data, acquire model training data, and preprocess the model training data; A model training unit, which is used to train a respiratory rate prediction model based on preprocessed training data, the respiratory rate prediction model including a coding layer, first to fourth Inception modules, a long short-term memory recursive network, and a convolutional layer. The ECG information and photoplethysmography information data coding layer is encoded as the input signal of the first Inception module, the output signal of the first Inception module is used as the input signal of the second Inception module, the input signal of the second Inception module is input into the third Inception module on the one hand, and into the long short-term memory recursive network on the other hand. The output signal of the long short-term memory recursive network is input into the third Inception module, the output signal of the third Inception module is used as the input signal of the fourth Inception module, and the output signal of the fourth Inception module is input into the convolutional layer; A unit for acquiring data to be predicted, which is used to obtain real ECG information and photoplethysmography information and input them into the trained respiratory rate prediction model; A prediction result output unit is used to obtain the output result of the convolutional layer of the respiratory rate prediction model as the respiratory rate prediction result.
Citation Information
Patent Citations
Respiratory rate estimation method and apparatus, and wearable device
CN108937937A
Method for monitoring respiratory rate of human body in resting state based on multi-feature fusion
CN113892939A