Data processing method for heart rate monitoring system
The heart rate monitoring system addresses data acquisition and processing challenges through multi-channel sensors, parallel amplification and filtering, data fusion, and comprehensive analysis, ensuring accurate and timely health monitoring.
Patent Information
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- HEBEI NET NEW DIGITAL TECH CO LTD
- Filing Date
- 2025-01-02
- Publication Date
- 2026-06-03
AI Technical Summary
Existing heart rate monitoring systems face challenges in accurately acquiring and processing heart rate data due to biocompatibility issues with sensors, interference from electromagnetic and motion artifacts, and the need for reliable data transmission and analysis to support clinical decision-making.
A data processing method for a heart rate monitoring system using multi-channel electrocardiogram sensors, parallel amplification and filtering, data fusion with MATLAB, comprehensive data analysis including R-wave detection and heart rate variability analysis, and an alarm system for abnormal patterns.
Ensures accurate and reliable heart rate monitoring by improving data quality, reducing interference, and providing timely alerts for potential health issues, enhancing clinical support.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure belongs to the technical field of data processing, and in particular to a data processing method for a heart rate monitoring system. BACKGROUND
[0002] In clinical practice, a heart rate, as a vital physiological parameter, not only reflects the operating state of the heart, but also is a key index to evaluate the overall health. A heart rate monitoring system plays a key role in terms of diagnosis and monitoring of cardiovascular diseases, evaluation of drug efficacy, physiological monitoring during surgery, evaluation of the rehabilitation progress, and monitoring of stress and pressure responses.
[0003] However, at present, the heart rate monitoring system is used to process the heart rate data, which faces a series of challenges. First, one of the challenges is the accuracy of acquiring the original heart rate data of a patient. The heart rate monitoring system acquires the original heart rate data of a patient through a sensor, but the selection of the sensor directly affects the quality of data. Considering that different patients have different body types, skin types and physiological conditions, the sensor needs to be able to adapt to these differences. Therefore, there are challenges in terms of biocompatibility. In addition, there are some problems in data acquisition and transmission, such as delay and loss. How to ensure that these data are accurately and consistently transmitted to the heart rate monitoring system is also a challenge.
[0004] Second, the acquired data need to be processed, and the purpose of processing is to accurately identify real heartbeat signals and eliminate noises and false signals. However, due to the existence of factors such as electromagnetic interference, motion artifact, electromyography interference, baseline drift, respiratory movement and environmental noise, the acquired data are distorted. How to effectively reduce the influence of these interference factors on the signals through data processing and ensure that the high-quality signal enters the subsequent processing stage is an important challenge.
[0005] Finally, the processing of digital data is also a key issue. After being preprocessed, the data type is changed from an analog data signal to a digital data signal. In many clinical and monitoring scenarios, more accurate heart rate data and analysis results are needed, so that medical staff can make medical decisions quickly. It is also a challenging task to better extract the heart rate value and the complex heart rate variability information from digital data.
[0006] To sum up, in view of the challenges faced by the heart rate monitoring system in terms of data processing, an effective data processing method is needed to ensure accurate and reliable monitoring and reading of the heart rate data, thus providing more reliable support for clinical practice. SUMMARY
[0007] The purpose of the present disclosure is to provide a data processing method for a heart rate monitoring system in view of the above problems in the prior art.
[0008] The purpose of the present disclosure can be achieved by the following technical scheme. A data processing method for a heart rate monitoring system is provided. The method is used in the heart rate monitoring system. The heart rate monitoring system includes a power supply device, an information acquisition device, an information conditioning module, a data fusion unit, a data analysis module, an abnormal detection alarm module, a display unit and a storage unit.
[0009] The method includes the following steps.
[0010] SI, information acquisition: the information acquisition device acquires original heart rate data of a patient and captures an electrical activity of the heart of the patient to obtain analog heart rate data information, wherein the information acquisition device operates in the mode of synchronous acquisition of multi-channel electrocardiogram information to improve the accuracy and reliability of the acquired data, and the information acquisition device includes a plurality of electrode heart rate sensors.
[0011] The electrode heart rate sensors are used for heart rate acquisition, mainly because the electrode heart rate sensors can be in direct contact with the skin and accurately capture the electrical activity of the heart. This sensor can provide high-quality electrocardiogram (ECG) signals, which is very important for monitoring the health of the heart. The usage of a plurality of electrode heart rate sensors is to increase the accuracy and reliability of data. Different channels can capture signals from different positions of the body, which can reduce the influence of noise and provide more comprehensive information of the electrical activity of the heart, thus enabling data analysis to be more accurate and comprehensive.
[0012] S2, information conditioning: the information conditioning module carries out amplification, filtering and data type conversion processing on the analog heart rate data.
[0013] The information conditioning module includes an information amplification unit and an information filtering unit, wherein the information amplification unit and the information filtering unit are connected in parallel.
[0014] The information amplification unit includes an information amplifier and an information amplification analog / digital converter, wherein the information amplifier is configured to amplify the analog heart rate data information to ensure that the quality of the analog heart rate data information is not reduced; the information amplification analog / digital converter is configured to convert the analog heart rate data information amplified by the information amplifier into digital data information; and the digital datatype number is Class-1 signal.
[0015] The information filtering unit includes a filter component and a filtering analog / digital converter, wherein the filter component is configured to filter noise and interference in non-heart rate information frequency bands in the analog heart rate data information; the filtering analog / digital converter is configured to convert the analog data information filtered by the filter component into digital data information; and the digital data type number is Class-2 signal.
[0016] The information amplification unit and the information filtering unit are connected in parallel; instead of being connected in series traditionally, in which the traditional method is to carry out amplification first and then carry out filtering processing. The reason is that the design of parallel connection allows the information amplification unit and the information filtering unit to operate at the same time, instead of being processed sequentially, which can improve the processing speed and efficiency. In the traditional series design, the signal is amplified first and then filtered, which may lead to the noise contained in the amplified signal being enhanced together, and may cause filtering to be more difficult. Through parallel processing, the signal can be amplified and noise can be filtered at the same time, ensuring that high-quality signals enter the subsequent processing stage.
[0017] S3, data fusion: the digital data of Class-1 signal and the digital data of Class-2 signal are fused by the data fusion unit to obtain comprehensive heart rate digital data.
[0018] The data fusion unit is configured with a digital signal fusion microprocessor, and the function of the data fusion unit is realized based on fusion MATLAB software.
[0019] The function of the data fusion unit is realized using the following steps:
[0020] Al, receiving data: receiving digital data of Class-1 signal transmitted by the information amplification analog / digital converter and digital data of Class-2 signal transmitted by the filtering analog / digital converter;
[0021] A2, time stamp alignment: in digital signal processor, aligning the digital data of Class-1 signal with the digital data of Class-2 signal according to time stamp information to keep the consistency of the digital data in time;
[0022] A3, fusion: using a strategy of fusing optimal parts of the digital data of Class-1 signal and the digital data of Class-2 signal to obtain comprehensive heart rate digital data;
[0023] A4, output: transmitting the information of the comprehensive heart rate digital data to the data analysis module.
[0024] Data fusion is to integrate information from different sources to obtain more accurate and comprehensive heart rate data. The optimal part of the digital data of Class-1 signal and the optimal part of the digital data of Class-2 signal are fused, so as to ensure that the final heart rate digital data not only contains enough details, but also removes possible interference and noise. The MATLAB software is selected for data fusion because MATLAB provides a powerful tool for data processing and analysis, especially in terms of signal processing and digital data analysis. The advanced mathematical function of the MATLAB enables the MATLAB to be an ideal choice to realize a complex data fusion strategy.
[0025] S4, data analysis: the data analysis module is used to sequentially carry out R-wave detection, heart rate calculation and heart rate variability analysis on the comprehensive heart rate digital data.
[0026] The data analysis module includes a data analysis microprocessor, an R-wave detection unit, a heart rate calculation unit and a heart rate variability analysis unit; wherein the R-wave detection unit, the heart rate calculation unit and the heart rate variability analysis unit are integrated in the data analysis microprocessor.
[0027] The operating steps of the data analysis module are as follows:
[0028] Bl, R-wave detection: transmitting the comprehensive heart rate digital data to the R-wave detection unit, using the R-wave detection unit to identify an R-wave of the comprehensive heart rate digital data, and outputting R-wave position information, wherein the R-wave is a peak of ventricular contraction; and the function of the R-wave detection unit is realized based on R-wave detection MATLAB software;
[0029] B2, heart rate calculation: receiving, by the heart rate calculation unit, the R-wave position information output by the R-wave detection unit, and calculating an RR interval by using the R-wave position information to obtain a heart rate value, wherein the RR interval is the time interval between two consecutive R-waves; and the function of the heart rate calculation unit is realized based on heart rate calculation software with a Python editor;
[0030] B3, heart rate variability analysis: after carrying out time domain, frequency domain and nonlinear analysis on the RR interval, extracting heart rate variability (HRV) index by the heart rate variability analysis unit, wherein the HRV index includes a time domain index, a frequency domain index and a non-linear analysis index.
[0031] The time domain index includes a Standard Deviation of Normal to Normal Intervals (SDNN), a Root Mean Square of Successive Differences (RMSSD), NN50 and pNN50; the SDNN is the standard deviation of the RR interval, which reflects the overall variability of the heartbeat interval; the RMSSD is the root mean square of successive RR interval differences, which reflects the rapidly changing heart rate variability and is related to parasympathetic nerve activity; NN50 is the number of times that the difference between adjacent RR intervals exceeds 50ms; and pNN50 is the percentage of NN50 in the total heartbeat, which reflects the rapid change of the heart rate.
[0032] The frequency domain index includes a low frequency (LF), a high frequency (HF) and an LF / HF ratio; the LF is a low frequency component, which reflects a combined effect of a sympathetic nerve and a parasympathetic nerve; the HF is a high frequency component, which reflects parasympathetic nerve activity, especially heart rate variability related to breathing; and the LF / HF ratio is the ratio of the LF to the HF, which is used to evaluate the balance between the sympathetic nerve and the parasympathetic nerve.
[0033] The non-linear analysis index includes a Poincare plot index, a sample entropy index and a detrending fluctuation analysis index; the Poincare plot index is a scatter plot used to visualize the change of the RR interval, and the Poincare plot index includes an SD1 principal axis and an SD2 principal axis, the SD1 principal axis represents the short-term variability of the heart rate; and the SD2 principal axis represents the long-term variability of the heart rate.
[0034] The sample entropy index is configured to measure the degree of controlling the heart rate by a cardiac autonomic nervous system; the detrending fluctuation analysis index includes a fluctuation standard deviation and a fluctuation amplitude, the fluctuation standard deviation is expressed as the degree of change in heart rate variability; and the fluctuation amplitude is a measure of the amplitude of the heart rate in different time periods.
[0035] The MATLAB software is used in R-wave detection because of its powerful signal processing capability, which can effectively identify and analyze R-waves in ECG signals. The toolbox and the function library provided by the MATLAB can easily realize the accurate detection of R-waves. For heart rate calculation, the software with a Python editor is used because Python is flexible and easy to use. Python has rich data analysis and processing libraries, such as NumPy and SciPy, which can be easily used for heart rate calculation and heart rate variability analysis. The wide application and the community support of Python also mean that resources and plug-ins can be easily obtained to meet the specific needs of the project.
[0036] In the data processing method for the heart rate monitoring system, the power supply device includes a main power supply interface, a rechargeable battery module and a charging control unit.
[0037] The main power supply interface is configured to connect an external power supply and supply power to the heart rate monitoring system through the main power supply interface when the external power supply is available.
[0038] The rechargeable battery module includes at least one rechargeable battery, which is configured to supply power to the heart rate monitoring system when the external power supply is unavailable; the rechargeable battery module uses an automatic switching mechanism, which automatically detects the state of the external power supply, automatically switches to the main power supply interface for power supply when the external power supply is available, and automatically switches to the rechargeable battery module for power supply when the external power supply is unavailable.
[0039] When the heart rate monitoring system supplies power through the main power supply interface, the charging control unit is used to automatically charge the rechargeable battery module to ensure the sufficient charge of the rechargeable battery.
[0040] In Step SI, the materials of the electrode heart rate sensor include silver and silver chloride, in which silver acts as the main material of the electrode heart rate sensor, a layer of silver chloride film is coated on the surface of silver, the silver chloride film is used to stabilize the potential of the contact interface between the electrode heart rate sensor and human skin, reduce electrode potential drift and electrode polarization, and improve the accuracy and stability of measurement; the electrode heart rate sensors are distributed along a conduction path of an electrocardiogram signal according to an anatomical structure of a human body and electrophysiological characteristics of the heart, and the sampling frequency of the electrode heart rate sensor is 300Hz to 1000Hz to capture all information of the electrocardiogram signal.
[0041] Silver: silver has a very high conductivity, so as to become an ideal choice for electrode materials. This is because high conductivity means that electrical signals can be transmitted from the skin surface to the monitoring device more effectively. In addition, silver has a relatively good biocompatibility, which is very important for reducing skin irritation and allergic reactions.
[0042] A silver chloride film: a layer of silver chloride film is coated on the surface of silver, mainly to establish a stable interface between the silver electrode and human skin. Silver chloride helps to reduce electrode potential drift and electrode polarization. Potential drift and polarization will affect the accuracy of measurement. By using silver chloride film, these problems can be significantly reduced to ensure the accuracy and stability of heart rate measurement.
[0043] The distribution of the electrode heart rate sensors follows an anatomical structure of a human body and the electrophysiological characteristics of the heart, which mainly lies in the following content. The conduction path of the electrocardiogram signals refers to the natural flow direction of electrical activity of the heart, starting from a sinoatrial node (the natural pacing point of the heart), passing through atrium, reaching atrioventricular node, and then passing through His bundle and ventricular wall muscles. The electrodes are arranged along this path, which can capture the whole picture of the electrical activity of the heart to the maximum extent, including all important electrocardiogram (ECG) waveforms.
[0044] An anatomical structure of a human body: the placement of electrodes also takes into account the anatomical structure of a human body, such as the layout of a chest and the position of limbs, in order to ensure that electrocardiogram signals can be captured from different angles and positions, thus providing a more comprehensive data analysis basis.
[0045] The sampling frequency is selected based on the spectrum of electrocardiogram signals and the necessary time resolution. Most of the main frequency components of electrocardiogram signals are between 0.05Hz and 100Hz, but in order to capture more subtle electrocardiogram details and ensure the high-quality reproduction of the signals, the sampling frequency needs to be much higher than twice the highest frequency of the signals (according to Nyquist theorem).
[0046] 300Hz: this is the lowest sampling frequency, which is enough to capture important information of most electrocardiogram signals and is suitable for general heart rate monitoring and analysis.
[0047] 1000Hz: a higher sampling frequency can provide more subtle electrocardiogram data, so thus allowing the detection and analysis of rapidly changing electrocardiogram events (such as arrhythmia) to be more accurate. This is especially important for advanced cardiac monitoring applications, such as detailed Heart Rate Variability (HRV) analysis.
[0048] The abnormal detection alarm module includes an abnormal detection microprocessor, an abnormal pattern recognition unit and an alarm unit, wherein the abnormal pattern recognition unit and the alarm unit are integrated in the abnormal detection microprocessor.
[0049] The abnormal pattern recognition unit is configured to detect whether the heart rate value and the HRV index are abnormal; and the abnormal pattern recognition unit is provided with a fault-tolerant mechanism, and sets a time window T to activate an alarm when abnormal data is continuously monitored to exceed T.
[0050] The function of the abnormal pattern recognition unit is realized using the following steps: setting the threshold: setting the threshold of the normal range value of the heart rate, setting the threshold of the normal value of the HRV index and setting the threshold of T value; judging whether it is abnormal by comparing the heart rate value and the threshold of the normal range value of the heart rate, and comparing the HRV index and the threshold of the normal value of the HRV index; and if the abnormal time exceeds the threshold of T value, activating an alarm.
[0051] The alarm mode of the alarm unit includes a conventional alarm and a remote alarm, wherein the conventional alarm is at least one of a sound alarm, a visual alarm and a vibration alarm, and the remote alarm is to send alarm information to a preset mobile phone or medical monitoring center through a network.
[0052] The reasons of providing a fault-tolerant mechanism are as follows. False positives are reduced: in the monitoring of the heart rate and the heart rate variability (HRV), there may be accidental fluctuations or short-term abnormal situations in data readings, which does not always indicate that there are real problems. By setting a time window T, the fault-tolerant mechanism requires activating an alarm when abnormal data is continuously monitored to exceed a certain time threshold T, which helps to distinguish accidental data abnormal situations from persistent abnormal patterns that may indicate health problems, thus reducing false positives resulted from short-term fluctuations or accidental events.
[0053] The robustness of the system is enhanced. The fault-tolerant mechanism enables the system to better cope with noise and temporary interference and improve its stability and reliability under various conditions. By allowing a certain degree of data fluctuation, rather than immediately reacting to every reading that exceeds the preset threshold, the system can identify the real abnormal pattern more accurately.
[0054] The reasons of providing a remote alarm are as follows. Timeliness: the remote alarm sends alarm information to a preset mobile phone or medical monitoring center through a network, which can ensure that even if the user cannot directly perceive the alarm (such as sleeping or being unconscious), the potential health risks can be notified to the family members of the user or medical professionals in time. This timeliness is crucial for a quick response in an emergency, which may save lives in some cases.
[0055] The monitoring scope is extended, in which the function of the remote alarm allows monitoring data and alarm notifications to be conveyed to family members or medical service providers who care about the health of the user without geographical restrictions, thus extending the scope of health monitoring and emergency response. This is especially important for users who need continuous health monitoring, such as the elderly, those with chronic illnesses, or those in recovery.
[0056] The response efficiency is improved, in which the alarm information is sent to the medical monitoring center, so that rapid diagnosis and treatment recommendations for abnormal situations can be achieved, and the efficiency of medical response can be improved. Medical professionals can quickly evaluate the situations and guide users to take appropriate actions or directly arrange emergency services when necessary.
[0057] The display unit is configured to display the data in the heart rate monitoring system to a user in a visual form, and the display content of the display unit includes a heart rate curve, a current heart rate value and an HRV index; and the display unit has the function of reviewing historical data to help users and medical professionals understand the changing trend of heart health of a patient.
[0058] In the above data processing method for the heart rate monitoring system, in Step S2, the information amplifier is specifically an instrumentation amplifier, and the operating parameters of the instrumentation amplifier are as follows: a gain is set to 100 to 1000 times; and an input impedance is greater than 1MQ to reduce a signal loss from the human body to an input end of the information amplifier;
[0059] an input equivalent noise voltage is lower than 1 OuV RMS, which is used to reduce the noise introduced by the information amplifier itself and ensure the accurate amplification of weak electrocardiogram signals;
[0060] a common-mode rejection ratio is higher than lOOdB to suppress common-mode signals resulted from improper placement of the electrode sensor or power line interference;
[0061] the filter component includes a high-pass filter, a notch filter and a low-pass filter, wherein the high-pass filter is connected in series with the notch filter, and the notch filter is connected in series with the low-pass filter;
[0062] the high-pass filter has a cut-off frequency of 0.5Hz, which is used to remove low-frequency noise and baseline drift, while retaining the low-frequency component of the electrocardiogram signal;
[0063] the center frequency of the notch filter is set as the frequency of the local power supply to eliminate the power line interference;
[0064] the low-pass filter has a cut-off frequency of 250 to 300Hz, which is used to eliminate electrical interference or an electromyographic signal, while ensuring that the high-frequency components of the electrocardiogram signal are not weakened.
[0065] In the above data processing method for the heart rate monitoring system, in A3 of Step S3, the specific process of realizing the fusion function is as follows:
[0066] A3.1, importing data: importing the digital data of Class-1 signal and the digital data of Class-2 signal into the fusion MATLAB software by a data acquisition tool in the fusion MATLAB software;
[0067] A3.2, defining an optimality criterion: selecting a signal-to-noise ratio as the optimality evaluation criterion;
[0068] A3.3, segmenting signals: segmenting Class-1 signal and Class-2 signal into several segments by the buffer function of the fusion MATLAB software; wherein the specific operation of segmenting signals is as follows:
[0069] A3.3.1, using the buffer function for Class-1 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 1, and each column of the matrix 1 represents a segment;
[0070] A3.3.2, using the buffer function for Class-2 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 2, and each column of the matrix 2 represents a segment;
[0071] the value of n is 180 to 600;
[0072] A3.3.3, processing a remainder: if a signal length is not divisible by n, the last segment reaching a specified length through zero padding to ensure that the lengths of all segments are consistent;
[0073] A3.4, calculating the optimality of each segment: for each segment, using the signal-to-noise ratio as the standard to calculate the optimality; wherein the specific operation is as follows:
[0074] A3.4.1, traversing segments: traversing each segment of Class-1 signal and each segment of Class-2 signal, respectively, and the process of traversing segments is realized by traversing the index number of each segment, and the index number represents the number of columns of the segments in the matrix to which the segments belong;
[0075] A3.4.2, calculating a signal-to-noise ratio: for each traversed segment, using the snr function in the fusion MATLAB software to calculate the signal-to-noise ratio;
[0076] A3.4.3, storing a result: storing the signal-to-noise ratio of each segment in a corresponding array, for the segment of Class-1 signal, storing the signal-to-noise ratio in array snrl; and for the segments of Class-2 signal, storing the signal-to-noise ratio in the array snr2;
[0077] A3.5, selecting an optimal segment: for each segment, comparing the optimality of Class-1 signal and the optimality of Class-2 signal, and selecting the optimal segment; wherein the specific operation is as follows:
[0078] A3.5.1, initializing an optimal segment matrix: creating an optimal segment matrix with the same size as the matrices of the segments of Class-1 signal and segments of Class-2 signal, into which the selected optimal segments are stored;
[0079] A3.5.2, traversing each segment: traversing each segment of Class-1 signal and Class-2 signal by loops, and processing the current segment index in each loop;
[0080] A3.5.3, comparing a signal-to-noise ratio: for each segment, comparing the signal-to-noise ratio of Class-1 signal and the signal-to-noise ratio of Class-2 signal;
[0081] A3.5.4, selecting an optimal segment: if the signal-to-noise ratio of the current segment of Class-1 signal is higher than the corresponding segment of Class-2 signal, selecting the segment of Class-1 signal as the optimal segment, otherwise selecting the segment of Class-2 signal;
[0082] A3.5.5, storing an optimal segment: storing the selected optimal segment in the initialized optimal segment matrix, which is corresponding to the currently processed segment index;
[0083] A3.6, reconstructing a signal: reconnecting the selected optimal segments into a complete signal by splicing, wherein the specific operation is as follows:
[0084] A3.6.1, initializing a signal: creating an empty array into which the final reconstructed signals are stored;
[0085] A3.6.2, traversing the selected segments: traversing the optimal segments one by one in chronological order;
[0086] A3.6.3, splicing signal segments: splicing each selected optimal segment in chronological order; and obtaining a reconstructed signal;
[0087] A3.7, smoothing: processing the reconstructed signal by a sliding averaging method to realize smooth transition, wherein the specific operation is as follows:
[0088] A3.7.1, determining the smoothing window size: setting a window size as m, wherein m is the number of continuous data points during smoothing; and the value of m is 5 to 20;
[0089] A3.7.2, applying the sliding averaging method: using the smooth data function in the fusion MATLAB software to process the reconstructed signal using the sliding averaging method, wherein the sliding averaging operation is based on the previously set window size m, and the value of each point is updated as a new signal value by calculating the mean value of all data points in the window to obtain the comprehensive heart rate digital data.
[0090] The reasons of selecting the buffer function to segment signals are as follows. Adaptability and flexibility: the buffer function is a powerful tool in MATLAB for segmenting one-dimensional signals into a plurality of segments of a fixed length. The buffer function is selected to segment signals because the buffer function can easily process signals of various lengths and divide the signals into segments of a predetermined length, which is very useful for subsequent processing and analysis. Data management is simplified: the signal is segmented into a matrix form, each column represents a segment, which can simplify data management and operation. This structure facilitates segment-by-segment analysis and processing, such as calculating the signal-to-noise ratio and selecting the optimal segment. Efficiency: the buffer function directly supports various signal processing functions including zero padding, so that signal segments with different lengths can be processed efficiently and uniformly.
[0091] The reasons of segmenting signals are as follows: manageability, in which signals are segmented, so that data can be processed and analyzed at a finer granularity, which improves the manageability of processing; performance optimization, in which the segmented signal can be evaluated and optimized for each segment separately, so as to realize optimization processing and reconstruction in the whole signal, which is helpful to improve the quality of the final signal.
[0092] The reasons why the value of n is 180 to 600 are as follows. This range is determined based on the characteristics of the signal and the processing requirements. A longer segment can retain more signal information, which is helpful to evaluate the characteristics of the signal more accurately, such as calculating the signal-to-noise ratio. At the same time, this range also ensures that the segment is long enough to contain enough data points for effective statistical analysis, but not so long that processing becomes inefficient.
[0093] The reasons of using the signal-to-noise ratio as the standard to calculate the optimality are as follows. The signal-to-noise ratio is an important index to measure the signal quality, which can objectively reflect the ratio of useful information to noise in the signal. The signal-to-noise ratio is selected as the optimality standard, which can ensure that the selected segment has a relatively high signal quality, thus improving the overall quality of the reconstructed signal.
[0094] The reasons of selecting the smoothdata function are as follows. Flexibility and efficiency: the smoothdata function supports a plurality of smoothing technologies, allowing users to select the most appropriate smoothing method according to specific needs. The flexibility ensures efficient and effective data smoothing in different application scenarios. Ease of use: the smoothdata function simplifies the data smoothing process, and users can quickly obtain smoothed data by simply specifying the window size or the smoothing method, which reduces the complexity of data processing and improves operating efficiency.
[0095] m value is selected as 5 to 20. The range of the window size balances the smoothing effect and the reservation of signal details. The window whose size is too small may not smooth the noise effectively, while the window whose size is too large may lead to the loss of useful details of the signal. Selecting the range of 5 to 20 provides a reasonable compromise, thus ensuring effective noise suppression while retaining enough signal details.
[0096] In the above data processing method for the heart rate monitoring system, in B1 of Step S4, the specific steps of R-wave detection are as follows:
[0097] B1.1, importing data: importing the comprehensive heart rate digital data transmitted from the data fusion unit by using the load or readtable function in the R-wave detection MATLAB software;
[0098] Bl.2, normalization: normalizing the comprehensive heart rate digital data by using the normalize function in the R-wave detection MATLAB software;
[0099] B1.3, determining the R-wave position information: using the findpeaks function in the R-wave detection MATLAB software to process the normalized comprehensive heart rate digital data to obtain the R-wave position information;
[00100] wherein the findpeaks function is used to identify a local maximum for the R-wave peak detection, and in the calculation process of the findpeaks function, a minimum peak is set as O.lmV to 0.2mV, and a minimum peak spacing is 240 to 2000 ms.
[00101] Normalization is a key step in the R-wave detection process. The main reasons are as follows: the data scale is unified, in which the amplitude of the heart rate signal varies from person to person, even the same person will be different in the measurement at different time, the normalize function can unify the data to the same scale, which is helpful for setting parameters in subsequent processing steps to be more unified and standardized; the calculation performance is improved, in which after normalization, the unified data scale can improve its accuracy and efficiency when using the findpeaks function to identify the local maximum; the deviation in data is reduced, in which normalization can reduce the deviation resulted from large differences in dimensions or ranges in data, so that the data processing process is more stable and errors are reduced.
[00102] The findpeaks function is an effective tool to detect the local maximum, which is suitable for R-wave detection. The reasons are as follows: the R-waves with obvious characteristics, in which the R-wave is a positive peak with obvious characteristics in electrocardiogram (ECG), and the findpeaks can effectively identify these local maximum, thus positioning the R-waves; parameter adjustability, in which the findpeaks function allows users to set the minimum peak height and the minimum distance between peaks according to the actual signal characteristics, which provides flexibility for the accurate detection of the R-waves.
[00103] Minimum peak (0. ImV to 0.2mV): this range is based on the general amplitude of the normal electrocardiogram R-wave. A minimum peak height is set, which can help to eliminate the small amplitude fluctuation resulted from noise or other non-R-wave waveforms, and ensure that the actual R-wave is detected instead of noise.
[00104] The reasons of setting the minimum peak interval of 240 to 2000ms are as follows: the reflection of the heart rate range, in which the heart rate range of normal adults is about 60 to 100 beats / min, the corresponding R-R interval (that is, the interval between two consecutive R-waves) is 600 to 1000 milliseconds, but the heart rate can change due to exercise, stress, disease or other conditions, the heart rate can be significantly increased especially in high-intensity exercise or certain pathological conditions, and the corresponding R-R interval is shortened; including the fastest heartbeat, in which the lower limit of the minimum peak interval is set as 240ms, and the heartbeat equivalent to 250 beats / min can be captured, which takes into account the highest heart rate that the human body may reach in extreme cases; exclusion of abnormal heartbeats, in which the maximum interval is set as 2000ms to include bradycardia, wherein the heart rate may drop to 30 beats / min, and the corresponding R-R interval is 2000ms, which ensures the detection of R-waves with normal heart rates and most abnormal heart rates, including very slow heartbeats; elimination of noise and false peaks, in which in ECG signal analysis, a reasonable peak spacing range is set, which can help distinguish the real heartbeat signal from noise or false peaks (such as signals generated by electrode movement and muscle tremor, etc.), and is helpful to improve the accuracy and reliability of R-wave detection; adaptability to diverse application scenarios, in which this range allows the findpeaks function to be used in a variety of different scenarios, including resting state, different intensity of exercise, and R-wave detection under various cardiac pathological conditions, which provides enough flexibility to adapt to the heart rate changes between individuals and the heart rate changes of the same individual under different conditions.
[00105] In the above data processing method for the heart rate monitoring system, in B2 of Step S4, the specific process of the heart rate calculation is as follows:
[00106] B2.1, importing: importing a NumPy library and a SciPy library for data processing in the Python editor, and importing the find peaks function from the SciPy library, wherein the NumPy library is used to support a dimensional array and a matrix operation, and the find peaks function is the function to find the local maximum of a one-dimensional array, which is used to detect the R-wave in data;
[00107] B2.2, receiving R-wave position information from the R-wave detection unit: importing an np.array function from the NumPy library, and converting the R-wave position information obtained from the R-wave detection unit into a NumPy array by the np.array function, wherein NumPy array stores all detected R-wave positions, and each element in the NumPy array represents an R-wave position;
[00108] B2.3, calculating the time interval between two consecutive R-waves by calculating the difference of the R-wave position array: importing an np.diff function from the NumPy library, and using the np.diff function to calculate the difference between consecutive elements in the array, wherein the calculated result is the RR time interval; and the RR time interval is the time interval between two consecutive R-waves;
[00109] B2.4, calculating the heart rate value:
[00110] B2.4.1, determining the sampling frequency: the sampling frequency is 300 to 1000Hz, and the sampling frequency is the number of data sampling points recorded every second;
[00111] B2.4.2, converting to seconds: converting the RR time interval from the number of sampling points to seconds;
[00112] B2.4.3, calculating the mean value: calculating the mean time length of all RR intervals by using the np.mean function of the NumPy library;
[00113] B2.4.4, obtaining the heart rate value by dividing 60 by the mean time length, wherein the heart rate value is the number of heartbeats per minute;
[00114] B2.5, outputting the heart rate value: outputting the heart rate value by using the print function in Python, wherein the output heart rate value keeps two decimal places.
[00115] The NumPy array provides an efficient way to store and operate a large amount of data. Compared with a Python native list, the NumPy array is more efficient in numerical calculation, supports more mathematical operations, and can be indexed and sliced more conveniently.
[00116] The reason of using the difference method is that the difference can directly give the variation between consecutive elements in the array, which is very convenient in calculating the time interval between two consecutive R-waves. By calculating the difference of the R-wave position array, the interval between every two adjacent R-waves, that is, the RR time interval, can be quickly obtained.
[00117] The np.mean function is selected to calculate the mean time length of all RR intervals because np.mean is a quick and concise method provided by NumPy to calculate the mean value of the array. In heart rate calculation, the mean heart rate is usually concerned. Therefore, it is a direct and effective method to calculate the mean value of all RR intervals.
[00118] In the above data processing method for the heart rate monitoring system, in B3 of Step S4, the time domain index is obtained based on the time domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the time domain index is as follows:
[00119] B3.tl, importing data: importing RR interval data into the time domain analysis software configured with the Python editor, and importing the NumPy library into the Python editor;
[00120] B3.t2, calculating the time domain index: SDNN: calculating the standard deviation of all RR intervals by using the std function in the NumPy library to obtain the SDNN value;
[00121] RMSSD: using numpy.diff in the NumPy library to calculate the difference between consecutive RR intervals; using numpy.mean in the NumPy library to calculate the mean value of the squared differences; and using numpy.sqrt in the NumPy library to calculate the square root of the mean value and obtain the RMSSD value;
[00122] NN50: using the numpy.diff function in the NumPy library to calculate the difference of consecutive RR intervals; using the numpy.abs function in the NumPy library to calculate an absolute value of the difference; using the numpy.sum function in the NumPy library to count the times when the absolute value is greater than 50ms and obtain the NN50 value;
[00123] pNN50: dividing NN50 by the total number of RR intervals and multiplying the result by 100 to obtain the percentage value of pNN50.
[00124] In the above data processing method for the heart rate monitoring system, in B3 of Step S4, the frequency domain index is obtained based on the frequency domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the frequency domain index is as follows:
[00125] B3.F1, importing: importing the NumPy library and the SciPy library into the Python editor, and loading RR interval data: importing the RR interval data into the time domain analysis software;
[00126] B3.F2, interpolation:
[00127] B3.F2.1, defining the sampling rate: taking the value of the sampling rate as 2 to 4Hz, and generating 2 to 4 data points every second;
[00128] B3.F2.2, calculating the interpolated time points: using the numpy.cumsum function in the NumPy library to calculate a cumulative sum, converting the RR interval array into a time array, and then generating time vectors at equal intervals according to the defined sampling rate, wherein the time vector covers the whole time range from 0 second to the last RR interval time point;
[00129] B3.F2.3, interpolation: performing linear interpolation by using the numpy.interp function of the NumPy library, wherein the interp function interpolates the original data points at new time points to obtain the heart rate time series data at equal intervals;
[00130] B3.F3, detrending: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;
[00131] B3.F4, using a Welch method to calculate a power spectral density: the Welch method includes the following contents:
[00132] B3.F4.1, segmenting signals: segmenting the heart rate time series data at equal intervals into a plurality of overlapping segments with the same length;
[00133] B3.F4.2, applying a window function: applying a Hanning window function to each segment to reduce the discontinuity at both ends of the signal;
[00134] B3.F4.3, fast Fourier transform: performing fast Fourier transform on the segments processed by each window function, converting a time domain signal into a frequency domain signal, and generating the frequency spectrum of each segment;
[00135] B3.F4.4, calculating the power spectral density: squaring the frequency spectrum of each segment to obtain the power spectral density of each segment, wherein the power spectral density reflects the power distribution of the signal at different frequencies;
[00136] B3.F4.5, averaging the power spectral density: averaging the power spectral density of all segments at the same frequency point to obtain the average power spectral density of the whole time series;
[00137] wherein the Welch method is realized by using a scipy signal welch function in the SciPy library, when calling the welch function, the parameters of the Welch function are set as follows: the sampling rate of data is 2 to 4 Hz; the length of each segment is 256 to 1024 data points; and the number of overlapping data points between adjacent segments is 40% to 50% of the length of each segment;
[00138] B3 .F5, extracting the frequency domain index:
[00139] LF: filtering out the frequency points at 0.04 to 0.15 Hz and the corresponding average power spectral density values, and then performing integration by using a numpy.trapz function in the Numpy library to obtain the LF;
[00140] HF: filtering out the frequency points at 0.15 to 0.4 Hz and the corresponding average power spectral density values, and then performing integration by using the numpy.trapz function in the Numpy library to obtain the HF;
[00141] LF / HF ratio: obtaining the LF / HF ratio by dividing the LF by the HF.
[00142] In Step B3.F2.1, the sampling rate is 2 to 4Hz, because according to Nyquist theorem, in order to capture the highest frequency component of the signal without distortion, the sampling frequency should be at least twice the highest frequency component in the signal. In the HRV analysis, considering that the upper limit of the high frequency component is 0.4Hz, the sampling rate of 2 to 4Hz exceeds the theoretical minimum requirement of 0.8Hz, which is enough to capture the main changes of the heart rate.
[00143] The reason of selecting the function is that the numpy.interp function directly supports linear interpolation, and it is easy to use, which can efficiently generate time series at equal intervals from the original RR interval data at unequal intervals.
[00144] The reasons of using the linear detrending method are as follows: eliminating the linear trend, in which the heart rate time series data may contain a linear trend, the trend may be resulted from physiological changes due to long-term recording or drift of a device, and the removal of these trends is helpful to concentrate on analyzing the pure heart rate variability; maintaining other characteristics of data, in which the linear detrending is a relatively mild processing method, which can effectively remove the linear part of data without affecting the periodic components or other non-linear characteristics of data.
[00145] In Step B3.F4.5, the sampling rate is 2 to 4Hz in order to keep consistent with the sampling rate in Step B3.F2.1.
[00146] The length of each segment is 256 to 1024 data points. It is very important to select the appropriate segment length to balance the time resolution and the frequency resolution. The longer segment provides a better frequency resolution, but the time resolution is lower. Shorter segments do the opposite, and this range allows a balance to be found in different application scenarios.
[00147] The number of overlapping data points between adjacent segments is 40% to 50% of the length of each segment: overlapping is used to reduce information loss resulted from segmentation and enhance the smoothness of spectrum estimation. The ratio can achieve a good balance between reducing variance and maintaining sufficient data independence.
[00148] In the above data processing method for the heart rate monitoring system, in B3 of Step S4, the non-linear analysis index is obtained based on the non-linear analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the non-linear analysis index is as follows:
[00149] B3.n.l, importing the NumPy library, the Matplotlib library, the HeartPy library and the SciPy library into the Python editor;
[00150] B3.n.2, obtaining the Poincare plot index: using the numpy.array function in the NumPy library to convert the RR interval data into the NumPy array, and obtaining the current RR interval and the subsequent RR interval data by performing a slicing operation on the NumPy array;
[00151] calculating the difference between the current RR interval and the subsequent RR interval as a first-order difference of the RR interval;
[00152] taking the first-order difference as an x coordinate and the value of the first-order difference delayed by one step as a y coordinate to obtain the scatter data in the Poincare plot;
[00153] using the scatter function in the Matplotlib library to draw a scatter plot by fitting a curve, where the x coordinate represents the first-order difference of the current RR interval, the y coordinate represents the first-order difference of the subsequent RR interval, the scatter size is set as 8 to 12, and the scatter shape is an ellipse shape; the transparency is 0.5 to 0.8; and the length of a minor axis and the length of a major axis in the ellipse are taken as the values of the SD1 principal axis and the SD2 principal axis, respectively;
[00154] B3.n.3, calculating the sample entropy index: loading the heart rate time series data at equal intervals; using the sample entropy function in the HeartPy library to calculate the heart rate time series data at equal intervals, and obtaining the sample entropy index;
[00155] B3.n.4, obtaining the detrending fluctuation analysis index: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;
[00156] calculating the fluctuation standard deviation: using the numpy.std function in the NumPy library to calculate the standard deviation of the heart rate time series with linear trend removed; and obtaining the fluctuation standard deviation;
[00157] fluctuation amplitude analysis: using the numpy.max and numpy.min functions in the NumPy library to find the maximum value and the minimum value of the heart rate time series data with linear trend removed, and taking the difference between the maximum value and the minimum value as the index of amplitude change to obtain the fluctuation amplitude.
[00158] The trend and distribution characteristics of data can be displayed more clearly by fitting a curve, especially in the case of a large number of scattered points. The Poincare plot is used to analyze the data of the heart rate variability. The distribution law of data points can be observed more intuitively by fitting a curve, so as to evaluate and analyze the characteristics of the heart rate variability.
[00159] The scatter size is selected to highlight the data points in the chart, so that it is easy to observe and analyze the data points. The size range of 8 to 12 can effectively display the data without exaggerating or narrowing the data points, so as not to make the chart too crowded or chaotic.
[00160] An ellipse shape is selected as the scatter shape to better reflect the correlation and the distribution law between data points. The ellipse shape can more accurately express the relationship between data points. Especially when the ellipse shape is used to represent the distribution of RR interval data in the Poincare plot, the ellipse shape can better highlight the characteristics of data.
[00161] The transparency of 0.5 to 0.8 is set to reduce visual clutter in the case of dense data points and enable the chart to be clearer and easier to read. The adjustment of transparency allows the overlapping data points to be identified more easily and helps to observe the density distribution of data.
[00162] In the above data processing method for the heart rate monitoring system, a try-catch structure is used to wrap a code block in the programs of the R-wave detection MATLAB software, the heart rate calculation software, the fusion MATLAB software, the time domain analysis software, the frequency domain analysis software and the non-linear analysis software, and the try-catch structure is an abnormal processing mechanism; the try-catch structure includes a try block and a catch block; when the program executes the code in the try block, if an abnormal situation occurs, the abnormal situation will be caught, the program will not crash immediately, and the control flow will jump to the corresponding catch block; and in the code of the catch block, a developer defines an error processing method when an abnormal situation occurs, including recording error information and notifying users.
[00163] The reasons of using the try-catch structure are as follows: abnormal processing, in which in the software development process, it is impossible to predict and avoid all possible abnormal situations, and the try-catch structure can capture abnormal situations and provide corresponding processing methods to prevent the program from crashing or producing unpredictable behaviors due to abnormal situations; error recording and notification, in which through the code in the catch block, a developer can define an error processing method, such as recording error information into a log file, displaying error prompt information to users or notifying relevant personnel by email, which is helpful to find and solve problems in time.
[00164] Compared with the prior art, the data processing method for the heart rate monitoring system has the following beneficial effects.
[00165] 1. The electrocardiogram signals are acquired stably and efficiently: a plurality of electrode heart rate sensors are used to acquire electrocardiogram signals, which ensures the high-quality acquisition of electrocardiogram signals. The material selection and the layout of electrode heart rate sensors consider the use of silver and silver chloride films, as well as an anatomical structure of a human body and electrophysiological characteristics of the heart, which ensures the stability of electrocardiogram signal acquisition.
[00166] 2. The information conditioning has an optimal design: the information amplification unit and the information filtering unit are connected in parallel, instead of being connected in series traditionally. The data processing speed and efficiency are improved. This design allows information amplification and filtering to be carried out at the same time, which effectively reduces the influence of noise on the signal and ensures the high-quality signals in the subsequent processing stage.
[00167] 3. The accuracy of data fusion is improved: the data fusion unit is used to fuse different types of signals, which ensures the accuracy and comprehensiveness of the comprehensive heart rate digital data. By fusing the optimal parts of different types of signals, the potential interference and noise are eliminated, and the reliability of the heart rate data is improved.
[00168] 4. Multi-level data analysis is carried out: the data analysis module includes R-wave detection, heart rate calculation and heart rate variability analysis, which provides a comprehensive evaluation of heart health. Tools such as MATLAB and Python editors are used to ensure the efficiency and accuracy of data analysis.
[00169] 5 An abnormal detection alarm mechanism is provided: the abnormal detection alarm module can identify the abnormal heart rate and HRV index. The fault-tolerant mechanism and the time window are provided, so that the abnormal alarm resulted from abnormal factors is reduced. The alarm methods are diverse, including sound alarm, visual alarm, vibration alarm and sending alarm information through the network, which improves the perception and response capability of patients and medical professionals to abnormal situations.
[00170] 6. The continuity of data processing is ensured: the power supply system includes a main power supply interface and a rechargeable battery module, and is provided with an automatic switching mechanism, which ensures that the power supply system can still operate normally when the external power supply is unavailable during data processing. The automatic charging function of the charging control unit ensures the sufficient charge of the rechargeable battery and enhances the stability and durability of the data processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[00171] FIG. lisa flowchart of a data processing method according to the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[00172] The following are specific embodiments of the present disclosure, and the technical scheme of the present disclosure will be further described with reference to the attached drawings, but the present disclosure is not limited to these embodiments.
[00173] As shown in FIG. 1, Embodiment 1 is shown.
[00174] A data processing method for a heart rate monitoring system is provided, wherein the method is used in the heart rate monitoring system, and the heart rate monitoring system includes a power supply device, an information acquisition device, an information conditioning module, a data fusion unit, a data analysis module, an abnormal detection alarm module, a display unit and a storage unit.
[00175] The power supply device includes a main power supply interface, a rechargeable battery module and a charging control unit.
[00176] The main power supply interface is configured to connect an external power supply and supply power to the heart rate monitoring system through the main power supply interface when the external power supply is available.
[00177] The rechargeable battery module includes at least one rechargeable battery, which is configured to supply power to the heart rate monitoring system when the external power supply is unavailable; the rechargeable battery module uses an automatic switching mechanism, which automatically detects the state of the external power supply, automatically switches to the main power supply interface for power supply when the external power supply is available, and automatically switches to the rechargeable battery module for power supply when the external power supply is unavailable.
[00178] When the heart rate monitoring system supplies power through the main power supply interface, the charging control unit is used to automatically charge the rechargeable battery module to ensure the sufficient charge of the rechargeable battery.
[00179] The abnormal detection alarm module includes an abnormal detection microprocessor, an abnormal pattern recognition unit and an alarm unit, wherein the abnormal pattern recognition unit and the alarm unit are integrated in the abnormal detection microprocessor.
[00180] The abnormal pattern recognition unit is configured to detect whether the heart rate value and the HRV index are abnormal; and the abnormal pattern recognition unit is provided with a fault-tolerant mechanism, and sets a time window T to activate an alarm when abnormal data is continuously monitored to exceed T.
[00181] The function of the abnormal pattern recognition unit is realized using the following steps: setting the threshold: setting the threshold of the normal range value of the heart rate, setting the threshold of the normal value of the HRV index and setting the threshold of T value; judging whether it is abnormal by comparing the heart rate value and the threshold of the normal range value of the heart rate, and comparing the HRV index and the threshold of the normal value of the HRV index; and if the abnormal time exceeds the threshold of T value, activating an alarm.
[00182] The alarm mode of the alarm unit includes a conventional alarm and a remote alarm, wherein the conventional alarm is at least one of a sound alarm, a visual alarm and a vibration alarm, and the remote alarm is to send alarm information to a preset mobile phone or medical monitoring center through a network.
[00183] The display unit is configured to display the data in the heart rate monitoring system to a user in a visual form, and the display content of the display unit includes a heart rate curve, a current heart rate value and an HRV index; and the display unit has the function of reviewing historical data to help users and medical professionals understand the changing trend of heart health of a patient.
[00184] The method includes the following steps.
[00185] SI, information acquisition: the information acquisition device acquires original heart rate data of a patient and captures an electrical activity of the heart of the patient to obtain analog heart rate data information, wherein the information acquisition device operates in the mode of synchronous acquisition of multi-channel electrocardiogram information to improve the accuracy and reliability of the acquired data, and the information acquisition device includes a plurality of electrode heart rate sensors.
[00186] The materials of the electrode heart rate sensor include silver and silver chloride, in which silver acts as the main material of the electrode heart rate sensor, a layer of silver chloride film is coated on the surface of silver, the silver chloride film is used to stabilize the potential of the contact interface between the electrode heart rate sensor and human skin, reduce electrode potential drift and electrode polarization, and improve the accuracy and stability of measurement; the electrode heart rate sensors are distributed along a conduction path of an electrocardiogram signal according to an anatomical structure of a human body and electrophysiological characteristics of the heart, and the sampling frequency of the electrode heart rate sensor is 300Hz to 1000Hz to capture all information of the electrocardiogram signal.
[00187] S2, information conditioning: the information conditioning module is used to carry out amplification, filtering and data type conversion processing on the analog heart rate data.
[00188] The information conditioning module includes an information amplification unit and an information filtering unit, wherein the information amplification unit and the information filtering unit are connected in parallel.
[00189] The information amplification unit includes an information amplifier and an information amplification analog / digital converter, wherein the information amplifier is configured to amplify the analog heart rate data information to ensure that the quality of the analog heart rate data information is not reduced; the information amplification analog / digital converter is configured to convert the analog heart rate data information amplified by the information amplifier into digital data information; and the digital datatype number is Class-1 signal.
[00190] The information filtering unit includes a filter component and a filtering analog / digital converter, wherein the filter component is configured to filter noise and interference in non-heart rate information frequency bands in the analog heart rate data information; the filtering analog / digital converter is configured to convert the analog data information filtered by the filter component into digital data information; and the digital data type number is Class-2 signal.
[00191] The information amplifier is specifically an instrumentation amplifier, and the operating parameters of the instrumentation amplifier are as follows: a gain is set to 100 to 1000 times; and an input impedance is greater than 1MQ to reduce a signal loss from the human body to an input end of the information amplifier.
[00192] An input equivalent noise voltage is lower than lOpV RMS, which is used to reduce the noise introduced by the information amplifier itself and ensure the accurate amplification of weak electrocardiogram signals.
[00193] A common-mode rejection ratio is higher than lOOdB to suppress common-mode signals resulted from improper placement of the electrode sensor or power line interference.
[00194] The filter component includes a high-pass filter, a notch filter and a low-pass filter, wherein the high-pass filter is connected in series with the notch filter, and the notch filter is connected in series with the low-pass filter.
[00195] The high-pass filter has a cut-off frequency of 0.5Hz, which is used to remove low-frequency noise and baseline drift, while retaining the low-frequency component of the electrocardiogram signal.
[00196] The center frequency of the notch filter is set as the frequency of the local power supply to eliminate the power line interference.
[00197] The low-pass filter has a cut-off frequency of 250 to 300Hz, which is used to eliminate electrical interference or an electromyographic signal, while ensuring that the high-frequency components of the electrocardiogram signal are not weakened.
[00198] S3, data fusion: the digital data of Class-1 signal and the digital data of Class-2 signal are fused by the data fusion unit to obtain comprehensive heart rate digital data.
[00199] The data fusion unit is configured with a digital signal fusion microprocessor, and the function of the data fusion unit is realized based on fusion MATLAB software.
[00200] The function of the data fusion unit is realized using the following steps.
[00201] Al, receiving data: digital data of Class-1 signal transmitted by the information amplification analog / digitai converter and digital data of Class-2 signal transmitted are received by the filtering analog / digital converter.
[00202] A2, time stamp alignment: in digital signal processor, the digital data of Class-1 signal is aligned with the digital data of Class-2 signal according to time stamp information to keep the consistency of the digital data in time.
[00203] A3, fusion: a strategy of fusing optimal parts of the digital data of Class-1 signal and the digital data of Class-2 signal is used to obtain comprehensive heart rate digital data.
[00204] The specific process of realizing the fusion function is as follows:
[00205] A3.1, importing data: importing the digital data of Class-1 signal and the digital data of Class-2 signal into the fusion MATLAB software by a data acquisition tool in the fusion MATLAB software;
[00206] A3.2, defining an optimality criterion: selecting a signal-to-noise ratio as the optimality evaluation criterion;
[00207] A3.3, segmenting signals: segmenting Class-1 signal and Class-2 signal into several segments by the buffer function of the fusion MATLAB software; wherein the specific operation of segmenting signals is as follows:
[00208] A3.3.1, using the buffer function for Class-1 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 1, and each column of the matrix 1 represents a segment;
[00209] A3.3.2, using the buffer function for Class-2 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 2, and each column of the matrix 2 represents a segment;
[00210] the value of n is 180 to 600;
[00211] A3.3.3, processing a remainder: if a signal length is not divisible by n, the last segment reaching a specified length through zero padding to ensure that the lengths of all segments are consistent;
[00212] A3.4, calculating the optimality of each segment: for each segment, using the signal-to-noise ratio as the standard to calculate the optimality; wherein the specific operation is as follows:
[00213] A3.4.1, traversing segments: traversing each segment of Class-1 signal and each segment of Class-2 signal, respectively, and the process of traversing segments is realized by traversing the index number of each segment, and the index number represents the number of columns of the segments in the matrix to which the segments belong;
[00214] A3.4.2, calculating a signal-to-noise ratio: for each traversed segment, using the snr function in the fusion MATLAB software to calculate the signal-to-noise ratio;
[00215] A3.4.3, storing a result: storing the signal-to-noise ratio of each segment in a corresponding array, for the segment of Class-1 signal, storing the signal-to-noise ratio in array snrl; and for the segments of Class-2 signal, storing the signal-to-noise ratio in the array snr2;
[00216] A3.5, selecting an optimal segment: for each segment, comparing the optimality of Class-1 signal and the optimality of Class-2 signal, and selecting the optimal segment; wherein the specific operation is as follows:
[00217] A3.5.1, initializing an optimal segment matrix: creating an optimal segment matrix with the same size as the matrices of the segments of Class-1 signal and segments of Class-2 signal, into which the selected optimal segments are stored;
[00218] A3.5.2, traversing each segment: traversing each segment of Class-1 signal and Class-2 signal by loops, and processing the current segment index in each loop;
[00219] A3.5.3, comparing a signal-to-noise ratio: for each segment, comparing the signal-to-noise ratio of Class-1 signal and the signal-to-noise ratio of Class-2 signal;
[00220] A3.5.4, selecting an optimal segment: if the signal-to-noise ratio of the current segment of Class-1 signal is higher than the corresponding segment of Class-2 signal, selecting the segment of Class-1 signal as the optimal segment, otherwise selecting the segment of Class-2 signal;
[00221] A3.5.5, storing an optimal segment: storing the selected optimal segment in the initialized optimal segment matrix, which is corresponding to the currently processed segment index;
[00222] A3.6, reconstructing a signal: reconnecting the selected optimal segments into a complete signal by splicing, wherein the specific operation is as follows:
[00223] A3.6.1, initializing a signal: creating an empty array into which the final reconstructed signals are stored;
[00224] A3.6.2, traversing the selected segments: traversing the optimal segments one by one in chronological order;
[00225] A3.6.3, splicing signal segments: adding each selected optimal segment to the end of the reconstructed signal in chronological order; and obtaining a reconstructed signal;
[00226] A3.7, smoothing: processing the reconstructed signal by a sliding averaging method to realize smooth transition, wherein the specific operation is as follows:
[00227] A3.7.1, determining the smoothing window size: setting a window size as m, wherein m is the number of continuous data points during smoothing; and the value of m is 5 to 20;
[00228] A3.7.2, applying the sliding averaging method: using the smooth data function in the fusion MATLAB software to process the reconstructed signal using the sliding averaging method, wherein the sliding averaging operation is based on the previously set window size m, and the value of each point is updated as a new signal value by calculating the mean value of all data points in the window to obtain the comprehensive heart rate digital data.
[00229] A4, output: the information of the comprehensive heart rate digital data is transmitted to the data analysis module.
[00230] S4, data analysis: the data analysis module is used to sequentially carry out R-wave detection, heart rate calculation and heart rate variability analysis on the comprehensive heart rate digital data.
[00231] The data analysis module includes a data analysis microprocessor, an R-wave detection unit, a heart rate calculation unit and a heart rate variability analysis unit; wherein the R-wave detection unit, the heart rate calculation unit and the heart rate variability analysis unit are integrated in the data analysis microprocessor.
[00232] The operating steps of the data analysis module are as follows.
[00233] Bl, R-wave detection: the comprehensive heart rate digital data is transmitted to the R-wave detection unit, the R-wave detection unit is used to identify an R-wave of the comprehensive heart rate digital data, and R-wave position information is output, wherein the R-wave is a peak of ventricular contraction; and the function of the R-wave detection unit is realized based on R-wave detection MATLAB software.
[00234] The specific steps of R-wave detection are as follows:
[00235] Bl.l, importing data: importing the comprehensive heart rate digital data transmitted from the data fusion unit by using the load or readtable function in the R-wave detection MATLAB software;
[00236] B1.2, normalization: normalizing the comprehensive heart rate digital data by using the normalize function in the R-wave detection MATLAB software;
[00237] B1.3, determining the R-wave position information: using the findpeaks function in the R-wave detection MATLAB software to process the normalized comprehensive heart rate digital data to obtain the R-wave position information;
[00238] wherein the findpeaks function is used to identify a local maximum for the R-wave peak detection, and in the calculation process of the findpeaks function, a minimum peak is set as O.lmV to 0.2mV, and a minimum peak spacing is 240 to 2000 ms.
[00239] B2, heart rate calculation: the heart rate calculation unit receives the R-wave position information output by the R-wave detection unit, and calculates an RR interval by using the R-wave position information to obtain a heart rate value, wherein the RR interval is the time interval between two consecutive R-waves; and the function of the heart rate calculation unit is realized based on heart rate calculation software with a Python editor.
[00240] The specific process of the heart rate calculation is as follows:
[00241] B2.1, importing: importing a NumPy library and a SciPy library for data processing in the Python editor, and importing the fmd_peaks function from the SciPy library, wherein the NumPy library is used to support a dimensional array and a matrix operation, and the find_peaks function is the function to find the local maximum of a one-dimensional array, which is used to detect the R-wave in data;
[00242] B2.2, receiving R-wave position information from the R-wave detection unit: importing an np.array function from the NumPy library, and converting the R-wave position information obtained from the R-wave detection unit into a NumPy array by the np.array function, wherein NumPy array stores all detected R-wave positions, and each element in the NumPy array represents an R-wave position;
[00243] B2.3, calculating the time interval between two consecutive R-waves by calculating the difference of the R-wave position array: importing an np.diff function from the NumPy library, and using the np.diff function to calculate the difference between consecutive elements in the array, wherein the calculated result is the RR time interval; and the RR time interval is the time interval between two consecutive R-waves;
[00244] B2.4, calculating the heart rate value:
[00245] B2.4.1, determining the sampling frequency: the sampling frequency is 300 to 1000Hz, and the sampling frequency is the number of data sampling points recorded every second;
[00246] B2.4.2, converting to seconds: converting the RR time interval from the number of sampling points to seconds;
[00247] B2.4.3, calculating the mean value: calculating the mean time length of all RR intervals by using the np.mean function of the NumPy library;
[00248] B2.4.4, obtaining the heart rate value by dividing 60 by the mean time length, wherein the heart rate value is the number of heartbeats per minute;
[00249] B2.5, outputting the heart rate value: outputting the heart rate value by using the print function in Python, wherein the output heart rate value keeps two decimal places.
[00250] B3, heart rate variability analysis: after carrying out time domain, frequency domain and non-linear analysis on the RR interval, the heart rate variability analysis unit extracts heart rate variability (HRV) index, wherein the HRV index includes a time domain index, a frequency domain index and a non-linear analysis index.
[00251] The time domain index includes a Standard Deviation of Normal to Normal Intervals (SDNN), a Root Mean Square of Successive Differences (RMSSD), NN50 and pNN50; the SDNN is the standard deviation of the RR interval, which reflects the overall variability of the heartbeat interval; the RMSSD is the root mean square of successive RR interval differences, which reflects the rapidly changing heart rate variability and is related to parasympathetic nerve activity; NN50 is the number of times that the difference between adjacent RR intervals exceeds 50ms; and pNN50 is the percentage of NN50 in the total heartbeat, which reflects the rapid change of the heart rate.
[00252] The time domain index is obtained based on the time domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the time domain index is as follows:
[00253] B3.tl, importing data: importing RR interval data into the time domain analysis software configured with the Python editor, and importing the NumPy library into the Python editor;
[00254] B3.t2, calculating the time domain index: SDNN: calculating the standard deviation of all RR intervals by using the std function in the NumPy library to obtain the SDNN value;
[00255] RMSSD: using numpy.diff in the NumPy library to calculate the difference between consecutive RR intervals; using numpy.mean in the NumPy library to calculate the mean value of the squared differences; and using numpy.sqrt in the NumPy library to calculate the square root of the mean value and obtain the RMSSD value;
[00256] NN50: using the numpy.diff function in the NumPy library to calculate the difference of consecutive RR intervals; using the numpy.abs function in the NumPy library to calculate an absolute value of the difference; using the numpy.sum function in the NumPy library to count the times when the absolute value is greater than 50ms and obtain the NN50 value;
[00257] pNN50: dividing NN50 by the total number of RR intervals and multiplying the result by 100 to obtain the percentage value of pNN50.
[00258] The frequency domain index includes a low frequency (LF), a high frequency (HF) and an LF / HF ratio; the LF is a low frequency component, which reflects a combined effect of a sympathetic nerve and a parasympathetic nerve; the HF is a high frequency component, which reflects parasympathetic nerve activity, especially heart rate variability related to breathing; and the LF / HF ratio is the ratio of the LF to the HF, which is used to evaluate the balance between the sympathetic nerve and the parasympathetic nerve.
[00259] The frequency domain index is obtained based on the frequency domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the frequency domain index is as follows:
[00260] B3.F1, importing: importing the NumPy library and the SciPy library into the Python editor, and loading RR interval data: importing the RR interval data into the time domain analysis software;
[00261] B3.F2, interpolation:
[00262] B3.F2.1, defining the sampling rate: taking the value of the sampling rate as 2 to 4Hz, and generating 2 to 4 data points every second;
[00263] B3.F2.2, calculating the interpolated time points: using the numpy.cumsum function in the NumPy library to calculate a cumulative sum, converting the RR interval array into a time array, and then generating time vectors at equal intervals according to the defined sampling rate, wherein the time vector covers the whole time range from 0 second to the last RR interval time point;
[00264] B3.F2.3, interpolation: performing linear interpolation by using the numpy.interp function of the NumPy library, wherein the interp function interpolates the original data points at new time points to obtain the heart rate time series data at equal intervals;
[00265] B3.F3, detrending: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;
[00266] B3.F4, using a Welch method to calculate a power spectral density: the Welch method includes the following contents:
[00267] B3.F4.1, segmenting signals: segmenting the heart rate time series data at equal intervals into a plurality of overlapping segments with the same length;
[00268] B3.F4.2, applying a window function: applying a Hanning window function to each segment to reduce the discontinuity at both ends of the signal;
[00269] B3.F4.3, fast Fourier transform: performing fast Fourier transform on the segments processed by each window function, converting a time domain signal into a frequency domain signal, and generating the frequency spectrum of each segment;
[00270] B3.F4.4, calculating the power spectral density: squaring the frequency spectrum of each segment to obtain the power spectral density of each segment, wherein the power spectral density reflects the power distribution of the signal at different frequencies;
[00271] B3.F4.5, averaging the power spectral density: averaging the power spectral density of all segments at the same frequency point to obtain the average power spectral density of the whole time series;
[00272] wherein the Welch method is realized by using a scipy. signal, welch function in the SciPy library, when calling the welch function, the parameters of the Welch function are set as follows: the sampling rate of data is 2 to 4 Hz; the length of each segment is 256 to 1024 data points; and the number of overlapping data points between adjacent segments is 40% to 50% of the length of each segment;
[00273] B3 .F5, extracting the frequency domain index:
[00274] LF: filtering out the frequency points at 0.04 to 0.15 Hz and the corresponding average power spectral density values, and then performing integration by using a numpy.trapz function in the Numpy library to obtain the LF;
[00275] HF: filtering out the frequency points at 0.15 to 0.4 Hz and the corresponding average power spectral density values, and then performing integration by using the numpy.trapz function in the Numpy library to obtain the HF;
[00276] LF / HF ratio: obtaining the LF / HF ratio by dividing the LF by the HF.
[00277] The non-linear analysis index includes a Poincare plot index, a sample entropy index and a detrending fluctuation analysis index; the Poincare plot index is a scatter plot used to visualize the change of the RR interval, and the Poincare plot index includes an SD1 principal axis and an SD2 principal axis, the SD1 principal axis represents the short-term variability of the heart rate; and the SD2 principal axis represents the long-term variability of the heart rate.
[00278] The sample entropy index is configured to measure the degree of controlling the heart rate by a cardiac autonomic nervous system; the detrending fluctuation analysis index includes a fluctuation standard deviation and a fluctuation amplitude, the fluctuation standard deviation is expressed as the degree of change in heart rate variability; and the fluctuation amplitude is a measure of the amplitude of the heart rate in different time periods.
[00279] The non-linear analysis index is obtained based on the non-linear analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the non-linear analysis index is as follows:
[00280] B3.n.l, importing the NumPy library, the Matplotlib library, the HeartPy library and the SciPy library into the Python editor;
[00281] B3.n.2, obtaining the Poincare plot index: using the numpy.array function in the NumPy library to convert the RR interval data into the NumPy array, and obtaining the current RR interval and the subsequent RR interval data by performing a slicing operation on the NumPy array;
[00282] calculating the difference between the current RR interval and the subsequent RR interval as a first-order difference of the RR interval;
[00283] taking the first-order difference as an x coordinate and the value of the first-order difference delayed by one step as a y coordinate to obtain the scatter data in the Poincare plot;
[00284] using the scatter function in the Matplotlib library to draw a scatter plot by fitting a curve, where the x coordinate represents the first-order difference of the current RR interval, the y coordinate represents the first-order difference of the subsequent RR interval, the scatter size is set as 8 to 12, and the scatter shape is an ellipse shape; the transparency is 0.5 to 0.8; and the length of a minor axis and the length of a major axis in the ellipse are taken as the values of the SD1 principal axis and the SD2 principal axis, respectively;
[00285] B3.n.3, calculating the sample entropy index: loading the heart rate time series data at equal intervals; using the sample entropy function in the HeartPy library to calculate the heart rate time series data at equal intervals, and obtaining the sample entropy index;
[00286] B3.n.4, obtaining the detrending fluctuation analysis index: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;
[00287] calculating the fluctuation standard deviation: using the numpy.std function in the NumPy library to calculate the standard deviation of the heart rate time series with linear trend removed; and obtaining the fluctuation standard deviation;
[00288] fluctuation amplitude analysis: using the numpy.max and numpy.min functions in the NumPy library to find the maximum value and the minimum value of the heart rate time series data with linear trend removed, and taking the difference between the maximum value and the minimum value as the index of amplitude change to obtain the fluctuation amplitude.
[00289] A try-catch structure is used to wrap a code block in the programs of the R-wave detection MATLAB software, the heart rate calculation software, the fusion MATLAB software, the time domain analysis software, the frequency domain analysis software and the non-linear analysis software, and the try-catch structure is an abnormal processing mechanism; the try-catch structure includes a try block and a catch block; when the program executes the code in the try block, if an abnormal situation occurs, the abnormal situation will be caught, the program will not crash immediately, and the control flow will jump to the corresponding catch block; and in the code of the catch block, a developer defines an error processing method when an abnormal situation occurs, including recording error information and notifying users.
[00290] Embodiment 2: the specific process of realizing the fusion function is as follows.
[00291] A3.1, importing data: the digital data of Class-1 signal and the digital data of Class-2 signal are imported into the MATLAB by a data acquisition tool in the MATLAB software.
[00292] A3.2, defining an optimality criterion: a signal-to-noise ratio is selected as the optimality evaluation criterion.
[00293] A3.3, segmenting signals: two signals are segmented into several segments by the buffer function of the MATLAB; wherein the specific operation is as follows.
[00294] segmentLength = n;
[00295] signal 1 Segments = buffer!signal 1, segmentLength);
[00296] sign al 2 Segments = buffer(signal2, segmentLength);
[00297] where segmentLength is the length of each segment to be segmented, and n indicates that each segment contains n data points.
[00298] signail Segments = buffer (signal 1, segmentLength) is applied to Class-1 signal, signail is the original digital data of Class-1 signal to be segmented, which is a one-bit array including several data points, signal 1 Segments is the output of the buffer function, which is a matrix. Each column of the matrix represents a segment after the signal 1 is segmented. When the length of signal 1 is not divisible by segmentLength, the last segment is subject to zero padding to reach the specified length.
[00299] signal2Segments = buffer (signal 2, segmentLength) is applied to Class-2 signal, signal 2 is the original digital data of Class-2 signal to be segmented, which is a one-bit array including several data points, si gnal2 Segments is the output of the buffer function, which is a matrix. Each column of the matrix represents a segment after the signal2 is segmented. When the length of signal2 is not divisible by segmentLength, the last segment is subject to zero padding to reach the specified length.
[00300] The buffer function is used to segment two long signals, signail and signal2, into several segments with the length of segmentLength, which are stored in the matrices of signal 1 Segments and signal2Segments, respectively.
[00301] A3.4, calculating the optimality of each segment: for each segment, the signal-to-noise ratio is used as the standard to calculate the optimality; wherein the specific operation is as follows.
[00302] snrl = arrayfun(@(x) snr(signallSegments(:,x)), l:size(signall Segments,2))
[00303] snr2 = arrayfun(@(x) snr(signal2Segments(:,x)), l:size(signal2Segments,2));
[00304] where arrayfun is a function in MATLAB, which is used to traverse each segment of the signal and apply the snr function to each segment to calculate the signal-to-noise ratio.
[00305] @(x) is an anonymous function syntax in MATLAB. @(x) defines an anonymous function with x as a variable, and x represents the index number of the signal segment.
[00306] snr(signallSegments(:,x)) is to call the snr function of MATLAB to calculate the signal-to-noise ratio of Class-1 signal segments, where signal lSegments(:,x) represents the x-th column extracted from the signal 1 Segments matrix, the x-th column is the x-th segment of Class-1 signal, and the snr function will return the signal-to-noise ratio value of the x-th segment. l:size(signallSegments,2) is an integer sequence from 1 to the number of columns in the signal 1 Segments matrix, which represents the index number of Class-1 signal segments. size(signall Segments,2) calculates the number of columns of signal 1 Segments, which represents the total number of segments into which Class-1 signal is segmented.
[00307] snr(signal2Segments(:,x)) is to call the snr function of MATLAB to calculate the signal-to-noise ratio of Class-2 signal segment, where signal2Segments(:,x) represents the x-th column extracted from the signal2Segments matrix, the x-th column is the x-th segment of Class-2 signal, and the snr function will return the signal-to-noise ratio value of the x-th segment. 1 :size(signal2Segments,2) is an integer sequence from 1 to the number of columns in the signal2Segments matrix, which represents the index number of Class-2 signal segments. size(signal2Segments,2) calculates the number of columns of signal2Segments, which represents the total number of segments into which Class-2 signal is segmented.
[00308] snrl and snr2 are arrays, which indicate that the signal-to-noise ratios of all segments of Class-1 signal and Class-2 signal are calculated and stored, in which snrl stores the signal-to-noise ratio of each segment of Class-1 signal, and snr2 stores the signal-to-noise ratio of each segment of Class-2 signal.
[00309] A3.5, selecting an optimal segment: for each segment, the optimality of Class-1 signal and the optimality of Class-2 signal are compared, and the optimal segment is selected; wherein the specific operation is as follows.
[00310] selectedSegments = zeros(size(signal 1 Segments));
[00311] fori = l:size(signall Segments, 2)
[00312] if snrl(i) >snr2(i)
[00313] selectedSegments(:,i) = signal lSegments(:,i);
[00314] else
[00315] selectedSegments(:,i) = signa!2Segments(:,i);
[00316] end
[00317] end
[00318] where selectedSegments = zeros(size(signal 1 Segments)) indicates that a matrix with the same size as signal 1 Segments is initialized to store the selected optimal segments;
[00319] for i = l:size(signall Segments, 2) indicates that each signal type is traversed through a for loop, in which i is the index of the data type currently being processed;
[00320] if snrl(i) >snr2(i) indicates that if the snr of the i-th segment of Class-1 signal is greater than the i-th segment of Class-2 signal;
[00321] selectedSegments(:,i) = signal 1 Segments(:,i) indicates that the i-th segment of Class-1 signal is selected as the optimal segment;
[00322] else
[00323] selectedSegments(:,i) = signa!2Segments(:,i) indicates that: otherwise, the i-th segment of Class-2 signal is selected as the optimal segment.
[00324] A3.6, reconstructing a signal: the selected optimal segments are reconnected into a complete signal by splicing, wherein the specific operation is as follows.
[00325] mergedSignal = reshape!selectedSegments, [], 1); in which the selectedSegments is a matrix, which contains all the segments selected as optimal; the reshape function is used to reconstruct the selectedSegments matrix into a single column vector. The process of reconstructing a single column vector is to connect all the selected optimal segments in sequence to form a continuous signal. [] in reshape(selectedSegments, [], 1) indicates that the size of this dimension is automatically calculated, so as to rearrange all elements of selectedSegments into a column vector, and 1 indicates that there is only one column of final column vectors.
[00326] A3.7, smoothing: the sliding averaging technique is used to process the discontinuity at the merged point to realize smooth transition, wherein the specific operation is as follows:
[00327] windowSize = m;
[00328] mergedSignalSmooth = smoothdata(mergedSignal, 'movmean', windowSize);
[00329] windowSize = m indicates that the window size used when smoothing is set, and the window size is set as m. When smoothing is performed, the mean value of m consecutive data points is calculated every time. windowSize is passed as a parameter to define the number of adjacent points in the sliding averaging.
[00330] smoothdata is a built-in function for data smoothing in MATLAB, and mergedSignal is the merged signal to be processed, 'movmean' specifies the smoothing method as the sliding averaging method.
[00331] Embodiment 3: the process of the heart rate value calculation is as follows.
[00332] B2.1, a NumPy library and a SciPy library for data processing are imported in the Python editor. The specific operation is as follows:
[00333] mport numpy as np
[00334] from scipy. signal import fmd_peaks
[00335] where import numpy as np: this line of codes indicates that the NumPy library has been imported, which is called np for short. Numpy is a library of Python, which is used to support the dimensional array and the matrix operation, provides a mathematical function library for the array operation, and is used for data processing and mathematical operations during heart rate calculation.
[00336] from scipy. signal import find_peaks: this line of codes indicates that the find_peaks function is imported from the signal module of Scipy; fmd_peaks is a function used to find the local maximum of a one-dimensional array, which is used to detect the R-wave in data analysis.
[00337] B2.2, the R-wave position information is received from the R-wave detection unit; wherein the specific operation is as follows:
[00338] rw-avepositions = np.array([...])
[00339] where np.array([...]) is a function of the NumPy library, which is used to create an array. The np.array () function is used to convert the R-wave position information into the NumPy array. Each element in the NumPy array represents an R-wave position, and the R-wave position data is transmitted by the R-wave detection unit.
[00340] r_wave_positions is a variable name, which is used to store the NumPy array created by the np.array () function. The NumPy array contains the position information of all detected R-waves.
[00341] [...]: is a placeholder, which indicates the actual R-wave position data filling position.
[00342] B2.3, the time interval between two consecutive R-waves is calculated by calculating the difference of the R-wave position array, wherein the specific steps are as follows:
[00343] rrintervals = np.diff(r_wave_positions),
[00344] where np.diff (...) is a function in the NumPy library, which is used to calculate the difference between consecutive elements in the array. Specifically, np.diff(arr) will return a new array, and each element in the new array is the difference between adjacent elements in the original array.
[00345] r_wave_positions is an array, which contains the R-wave position information and represents the specific position index of the R-wave in heart data.
[00346] rr intervals = ...: the function of this line of codes is to calculate the time interval between two consecutive R-waves, that is, the RR interval. The result calculated by np.diff(r_wave_positions) is the RR interval. The rr intervals variable is assigned as the result of the position difference of the R-wave, which is an interval array between two consecutive R-waves.
[00347] B2.4, the heart rate can be calculated by the following formula: heart rate (times / min) = (60 \ div mean value of the RR intervals), wherein the specific steps are as follows:
[00348] fs = x
[00349] rr_intervals_seconds = rr intervals / fs
[00350] average rr interval = np.mean(rr intervals seconds)
[00351] heart rate = 60 / average rr interval
[00352] where fs is the sampling frequency, and this value depends on the specific parameters of the data acquisition device;
[00353] rrintervalsseconds = rrintervals / fs
[00354] rr intervals seconds is a new variable, which is used to store the RR interval time converted into seconds;
[00355] rr intervals: this is the interval between two consecutive R-waves obtained by calculation, and the unit is the number of sampling points;
[00356] / : this is a division operator, which is used to convert the RR interval into seconds by dividing the RR interval by the sampling frequency (fs);
[00357] averagerrinterval = np.mean(rr intervals seconds)
[00358] average rr interval is a variable, which is used to store the mean value of the RR intervals in unit of seconds;
[00359] np.mean () is a function of the NumPy library, which is used to calculate the mean value of given data, and is used to calculate the mean value of all elements in the rr intervals seconds array, in order to calculate the mean time length of all RR intervals;
[00360] rr intervals seconds: this is the RR interval time array converted into seconds;
[00361] heart rate = 60 / average_rr_interval: heart rate: this is used as a variable to store the calculated heart rate, and the unit is the number of heartbeats per minute. I', this is a division operator, which is used to calculate the heart rate; average rr interval: this is the average value of the RR interval.
[00362] B2.5, outputting the heart rate value: the heart rate value is output by using the print function in Python, wherein the output heart rate value keeps two decimal places.
[00363] The specific embodiments described herein are only illustrative of the spirit of the present disclosure. Those skilled in the technical field to which the present disclosure belongs can make various modifications or supplements to the described specific embodiments or substitute the described specific embodiments in a similar way, which will not deviate from the spirit of the present disclosure or go beyond the defined scope. Although the present disclosure has been illustrated and described in detail in the drawings and the foregoing description, such illustration and description are to be regarded as illustrative or exemplary, rather than restrictive. It should be understood that changes and modifications can be made by those skilled in the art within the scope of the following claims. In particular, the present disclosure covers other embodiments having any combination of features from the different embodiments described above. As far as the expression "generally" or "substantially" is used, the present disclosure should be understood as disclosing that these features and values are also fully satisfied without the foregoing characterization as "generally" or "substantially".
[00364] In the description of the present disclosure, it should be noted that unless otherwise specified and limited, the terms "installation", "linkage" and "connection" should be broadly understood, which, for example, can be fixed connection, detachable connection or integrated connection; or mechanical connection or electrical connection; or direct connection, or indirect connection through an intermediate medium, or communication inside two elements. Forthose skilled in the art, the specific meanings of the above terms in the present disclosure can be understood in specific situations.
Claims
WHAT IS CLAIMED IS:
1. A data processing method for a heart rate monitoring system, wherein the method is used in the heart rate monitoring system, and the heart rate monitoring system comprises a power supply device, an information acquisition device, an information conditioning module, a data fusion unit, a data analysis module, an abnormal detection alarm module, a display unit and a storage unit;wherein the method comprises the following steps:SI, information acquisition: acquiring original heart rate data of a patient and capturing an electrical activity of the heart of the patient by the information acquisition device to obtain analog heart rate data information, wherein the information acquisition device operates in the mode of synchronous acquisition of multi-channel electrocardiogram information to improve the accuracy and reliability of the acquired data, and the information acquisition device comprises a plurality of electrode heart rate sensors;S2, information conditioning: carrying out amplification, filtering and data type conversion processing on the analog heart rate data by the information conditioning module;the information conditioning module comprises an information amplification unit and an information filtering unit, wherein the information amplification unit and the information filtering unit are connected in parallel;the information amplification unit comprises an information amplifier and an information amplification analog / digital converter, wherein the information amplifier is configured to amplify the analog heart rate data information to ensure that the quality of the analog heart rate data information is not reduced; the information amplification analog / digital converter is configured to convert the analog heart rate data information amplified by the information amplifier into digital data information; and the digital datatype number is Class-1 signal;the information filtering unit comprises a filter component and a filtering analog / digital converter, wherein the filter component is configured to filter noise and interference in non-heart rate information frequency bands in the analog heart rate data information; the filtering analog / digital converter is configured to convert the analog data information filtered by the filter component into digital data information; and the digital data type number is Class-2 signal;S3, data fusion: fusing the digital data of Class-1 signal and the digital data of Class-2 signal by the data fusion unit to obtain comprehensive heart rate digital data;the data fusion unit is configured with a digital signal fusion microprocessor, and the function of the data fusion unit is realized based on fusion MATLAB software;the function of the data fusion unit is realized using the following steps:Al, receiving data: receiving digital data of Class-1 signal transmitted by the information amplification analog / digital converter and digital data of Class-2 signal transmitted by the filtering analog / digital converter;A2, time stamp alignment: in digital signal processor, aligning the digital data of Class-1 signal with the digital data of Class-2 signal according to time stamp information to keep the consistency of the digital data in time;A3, fusion: using a strategy of fusing optimal parts of the digital data of Class-1 signal and the digital data of Class-2 signal to obtain comprehensive heart rate digital data;A4, output: transmitting the information of the comprehensive heart rate digital data to the data analysis module;S4, data analysis: using the data analysis module to sequentially carry out R-wave detection, heart rate calculation and heart rate variability analysis on the comprehensive heart rate digital data;the data analysis module comprises a data analysis microprocessor, an R-wave detection unit, a heart rate calculation unit and a heart rate variability analysis unit; wherein the R-wave detection unit, the heart rate calculation unit and the heart rate variability analysis unit are integrated in the data analysis microprocessor;the operating steps of the data analysis module are as follows:Bl, R-wave detection: transmitting the comprehensive heart rate digital data to the R-wave detection unit, using the R-wave detection unit to identify an R-wave of the comprehensive heart rate digital data, and outputting R-wave position information, wherein the R-wave is a peak of ventricular contraction; and the function of the R-wave detection unit is realized based on R-wave detection MATLAB software;B2, heart rate calculation: receiving, by the heart rate calculation unit, the R-wave position information output by the R-wave detection unit, and calculating an RR interval by using the R-wave position information to obtain a heart rate value, wherein the RR interval is the time interval between two consecutive R-waves; and the function of the heart rate calculation unit is realized based on heart rate calculation software with a Python editor;B3, heart rate variability analysis: after carrying out time domain, frequency domain and nonlinear analysis on the RR interval, extracting heart rate variability (HRV) index by the heart rate variability analysis unit, wherein the HRV index comprises a time domain index, a frequency domain index and a non-linear analysis index;the time domain index comprises a Standard Deviation of Normal to Normal Intervals (SDNN), a Root Mean Square of Successive Differences (RMSSD), NN50 and pNN50; the SDNN is the standard deviation of the RR interval, which reflects the overall variability of the heartbeat interval; the RMSSD is the root mean square of successive RR interval differences, which reflects the rapidly changing heart rate variability and is related to parasympathetic nerve activity; NN50 is the number of times that the difference between adjacent RR intervals exceeds 50ms; and pNN50 is the percentage of NN50 in the total heartbeat, which reflects the rapid change of the heart rate;the frequency domain index comprises a low frequency (LF), a high frequency (HF) and an LF / HF ratio; the LF is a low frequency component, which reflects a combined effect of a sympathetic nerve and a parasympathetic nerve; the HF is a high frequency component, which reflects parasympathetic nerve activity, especially heart rate variability related to breathing; and the LF / HF ratio is the ratio of the LF to the HF, which is used to evaluate the balance between the sympathetic nerve and the parasympathetic nerve;the non-linear analysis index comprises a Poincare plot index, a sample entropy index and a detrending fluctuation analysis index; the Poincare plot index is a scatter plot used to visualize the change of the RR interval, and the Poincare plot index comprises an SD1 principal axis and an SD2 principal axis, the SD1 principal axis represents the short-term variability of the heart rate; and the SD2 principal axis represents the long-term variability of the heart rate;the sample entropy index is configured to measure the degree of controlling the heart rate by a cardiac autonomic nervous system; the detrending fluctuation analysis index comprises a fluctuation standard deviation and a fluctuation amplitude, the fluctuation standard deviation is expressed as the degree of change in heart rate variability; and the fluctuation amplitude is a measure of the amplitude of the heart rate in different time periods.
2. The data processing method for the heart rate monitoring system according to claim 1, wherein the power supply device comprises a main power supply interface, a rechargeable battery module and a charging control unit;the main power supply interface is configured to connect an external power supply and supply power to the heart rate monitoring system through the main power supply interface when the externalpower supply is available;the rechargeable battery module comprises at least one rechargeable battery, which is configured to supply power to the heart rate monitoring system when the external power supply is unavailable; the rechargeable battery module uses an automatic switching mechanism, which automatically detects the state of the external power supply, automatically switches to the main power supply interface for power supply when the external power supply is available, and automatically switches to the rechargeable battery module for power supply when the external power supply is unavailable;when the heart rate monitoring system supplies power through the main power supply interface, the charging control unit is used to automatically charge the rechargeable battery module to ensure the sufficient charge of the rechargeable battery;in Step SI, the materials of the electrode heart rate sensor comprise silver and silver chloride, in which silver acts as the main material of the electrode heart rate sensor, a layer of silver chloride film is coated on the surface of silver, the silver chloride film is used to stabilize the potential of the contact interface between the electrode heart rate sensor and human skin, reduce electrode potential drift and electrode polarization, and improve the accuracy and stability of measurement; the electrode heart rate sensors are distributed along a conduction path of an electrocardiogram signal according to an anatomical structure of a human body and electrophysiological characteristics of the heart, and the sampling frequency of the electrode heart rate sensor is 300Hz to 1000Hz to capture all information of the electrocardiogram signal;the abnormal detection alarm module comprises an abnormal detection microprocessor, an abnormal pattern recognition unit and an alarm unit, wherein the abnormal pattern recognition unit and the alarm unit are integrated in the abnormal detection microprocessor;the abnormal pattern recognition unit is configured to detect whether the heart rate value and the HRV index are abnormal; and the abnormal pattern recognition unit is provided with a fault-tolerant mechanism, and sets a time window T to activate an alarm when abnormal data is continuously monitored to exceed T;the function of the abnormal pattern recognition unit is realized using the following steps: setting the threshold: setting the threshold of the normal range value of the heart rate, setting the threshold of the normal value of the HRV index and setting the threshold of T value; judging whether it is abnormal by comparing the heart rate value and the threshold of the normal range value of the heart rate, and comparing the HRV index and the threshold of the normal value of the HRV index; and if the abnormal time exceeds the threshold of T value, activating an alarm;the alarm mode of the alarm unit comprises a conventional alarm and a remote alarm, wherein the conventional alarm is at least one of a sound alarm, a visual alarm and a vibration alarm, and the remote alarm is to send alarm information to a preset mobile phone or medical monitoring center through a network;the display unit is configured to display the data in the heart rate monitoring system to a user in a visual form, and the display content of the display unit comprises a heart rate curve, a current heart rate value and an HRV index; and the display unit has the function of reviewing historical data to help users and medical professionals understand the changing trend of heart health of a patient.
3. The data processing method for the heart rate monitoring system according to claim 1, wherein in Step S2, the information amplifier is specifically an instrumentation amplifier, and the operating parameters of the instrumentation amplifier are as follows: a gain is set to 100 to 1000 times; and an input impedance is greater than 1MQ to reduce a signal loss from the human body to an input end of the information amplifier;an input equivalent noise voltage is lower than lOpV RMS, which is used to reduce the noise introduced by the information amplifier itself and ensure the accurate amplification of weakelectrocardiogram signals;a common-mode rejection ratio is higher than lOOdB to suppress common-mode signals resulted from improper placement of the electrode sensor or power line interference;the filter component comprises a high-pass filter, a notch filter and a low-pass filter, wherein the high-pass filter is connected in series with the notch filter, and the notch filter is connected in series with the low-pass filter;the high-pass filter has a cut-off frequency of 0.5Hz, which is used to remove low-frequency noise and baseline drift, while retaining the low-frequency component of the electrocardiogram signal;the center frequency of the notch filter is set as the frequency of the local power supply to eliminate the power line interference;the low-pass filter has a cut-off frequency of 250 to 300Hz, which is used to eliminate electrical interference or an electromyographic signal, while ensuring that the high-frequency components of the electrocardiogram signal are not weakened.
4. The data processing method for the heart rate monitoring system according to claim 1, wherein in A3 of Step S3, the specific process of realizing the fusion function is as follows:A3.1, importing data: importing the digital data of Class-1 signal and the digital data of Class-2 signal into the fusion MATLAB software by a data acquisition tool in the fusion MATLAB software;A3.2, defining an optimality criterion: selecting a signal-to-noise ratio as the optimality evaluation criterion;A3.3, segmenting signals: segmenting Class-1 signal and Class-2 signal into several segments by the buffer function of the fusion MATLAB software; wherein the specific operation of segmenting signals is as follows:A3.
3. fusing the buffer function for Class-1 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 1, and each column of the matrix 1 represents a segment;A3.3.2, using the buffer function for Class-2 signal, and segmenting Class-1 signals into several segments with a length of n, wherein several segments are combined into a matrix 2, and each column of the matrix 2 represents a segment;the value of n is 180 to 600;A3.3.3, processing a remainder: if a signal length is not divisible by n, the last segment reaching a specified length through zero padding to ensure that the lengths of all segments are consistent;A3.4, calculating the optimality of each segment: for each segment, using the signal-to-noise ratio as the standard to calculate the optimality; wherein the specific operation is as follows:A3.4.1, traversing segments: traversing each segment of Class-1 signal and each segment of Class-2 signal, respectively, and the process of traversing segments is realized by traversing the index number of each segment, and the index number represents the number of columns of the segments in the matrix to which the segments belong;A3.4.2, calculating a signal-to-noise ratio: for each traversed segment, using the snr function in the fusion MATLAB software to calculate the signal-to-noise ratio;A3.4.3, storing a result: storing the signal-to-noise ratio of each segment in a corresponding array, for the segment of Class-1 signal, storing the signal-to-noise ratio in array snrl; and for the segments of Class-2 signal, storing the signal-to-noise ratio in the array snr2;A3.5, selecting an optimal segment: for each segment, comparing the optimality of Class-1 signal and the optimality of Class-2 signal, and selecting the optimal segment; wherein the specific operation is as follows:A3.5.1, initializing an optimal segment matrix: creating an optimal segment matrix with the same size as the matrices of the segments of Class-1 signal and segments of Class-2 signal, into whichthe selected optimal segments are stored;A3.5.2, traversing each segment: traversing each segment of Class-1 signal and Class-2 signal by loops, and processing the current segment index in each loop;A3.5.3, comparing a signal-to-noise ratio: for each segment, comparing the signal-to-noise ratio of Class-1 signal and the signal-to-noise ratio of Class-2 signal;A3.5.4, selecting an optimal segment: if the signal-to-noise ratio of the current segment of Class-1 signal is higher than the corresponding segment of Class-2 signal, selecting the segment of Cl ass-1 signal as the optimal segment, otherwise selecting the segment of Class-2 signal;A3.5.5, storing an optimal segment: storing the selected optimal segment in the initialized optimal segment matrix, which is corresponding to the currently processed segment index;A3.6, reconstructing a signal: reconnecting the selected optimal segments into a complete signal by splicing, wherein the specific operation is as follows:A3.6.1, initializing a signal: creating an empty array into which the final reconstructed signals are stored;A3.6.2, traversing the selected segments: traversing the optimal segments one by one in chronological order;A3.6.3, splicing signal segments: adding each selected optimal segment to the end of the reconstructed signal in chronological order; and obtaining a reconstructed signal;A3.7, smoothing: processing the reconstructed signal by a sliding averaging method to realize smooth transition, wherein the specific operation is as follows:A3.7.1, determining the smoothing window size: setting a window size as m, wherein m is the number of continuous data points during smoothing; and the value of m is 5 to 20;A3.7.2, applying the sliding averaging method: using the smooth data function in the fusion MATLAB software to process the reconstructed signal using the sliding averaging method, wherein the sliding averaging operation is based on the previously set window size m, and the value of each point is updated as a new signal value by calculating the mean value of all data points in the window to obtain the comprehensive heart rate digital data.
5. The data processing method for the heart rate monitoring system according to claim 1, wherein in Bl of Step S4, the specific steps of R-wave detection are as follows:Bl.l, importing data: importing the comprehensive heart rate digital data transmitted from the data fusion unit by using the load or readtable function in the R-wave detection MATLAB software;B1.2, normalization: normalizing the comprehensive heart rate digital data by using the normalize function in the R-wave detection MATLAB software;B1.3, determining the R-wave position information: using the findpeaks function in the R-wave detection MATLAB software to process the normalized comprehensive heart rate digital data to obtain the R-wave position information;wherein the findpeaks function is used to identify a local maximum for the R-wave peak detection, and in the calculation process of the findpeaks function, a minimum peak is set as O.lmV to 0.2mV, and a minimum peak spacing is 240 to 2000 ms.
6. The data processing method for the heart rate monitoring system according to claim 1, wherein in B2 of Step S4, the specific process of the heart rate calculation is as follows:B2.1, importing: importing a NumPy library and a SciPy library for data processing in the Python editor, and importing the find_peaks function from the SciPy library, wherein the NumPy library is used to support a dimensional array and a matrix operation, and the find_peaks function is the function to find the local maximum of a one-dimensional array, which is used to detect the R-wave in data;B2.2, receiving R-wave position information from the R-wave detection unit: importing an np.array function from the NumPy library, and converting the R-wave position information obtainedfrom the R-wave detection unit into a NumPy array by the np.array function, wherein NumPy array stores all detected R-wave positions, and each element in the NumPy array represents an R-wave position;B2.3, calculating the time interval between two consecutive R-waves by calculating the difference of the R-wave position array: importing an np.diff function from the NumPy library, and using the np.diff function to calculate the difference between consecutive elements in the array, wherein the calculated result is the RR time interval; and the RR time interval is the time interval between two consecutive R-waves;B2.4, calculating the heart rate value:B2.4.1, determining the sampling frequency: the sampling frequency is 300 to 1000Hz, and the sampling frequency is the number of data sampling points recorded every second;B2.4.2, converting to seconds: converting the RR time interval from the number of sampling points to seconds;B2.4.3, calculating the mean value: calculating the mean time length of all RR intervals by using the np.mean function of the NumPy library;B2.4.4, obtaining the heart rate value by dividing 60 by the mean time length, wherein the heart rate value is the number of heartbeats per minute;B2.5, outputting the heart rate value: outputting the heart rate value by using the print function in Python, wherein the output heart rate value keeps two decimal places.
7. The data processing method for the heart rate monitoring system according to claim 1, wherein in B3 of Step S4, the time domain index is obtained based on the time domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the time domain index is as follows:B3.tl, importing data: importing RR interval data into the time domain analysis software configured with the Python editor, and importing the NumPy library into the Python editor;B3.t2, calculating the time domain index: SDNN: calculating the standard deviation of all RR intervals by using the std function in the NumPy library to obtain the SDNN value;RMSSD: using numpy.diff in the NumPy library to calculate the difference between consecutive RR intervals; using numpy.mean in the NumPy library to calculate the mean value of the squared differences; and using numpy.sqrt in the NumPy library to calculate the square root of the mean value and obtain the RMSSD value;NN50: using the numpy.diff function in the NumPy library to calculate the difference of consecutive RR intervals; using the numpy.abs function in the NumPy library to calculate an absolute value of the difference; using the numpy.sum function in the NumPy library to count the times when the absolute value is greater than 50ms and obtain the NN50 value;pNN50: dividing NN50 by the total number of RR intervals and multiplying the result by 100 to obtain the percentage value of pNN50.
8. The data processing method for the heart rate monitoring system according to claim 1, wherein in B3 of Step S4, the frequency domain index is obtained based on the frequency domain analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the frequency domain index is as follows:B3.F1, importing: importing the NumPy library and the SciPy library into the Python editor, and loading RR interval data: importing the RR interval data into the time domain analysis software;B3.F2, interpolation:B3.F2.1, defining the sampling rate: taking the value of the sampling rate as 2 to 4Hz, and generating 2 to 4 data points every second;B3.F2.2, calculating the interpolated time points: using the numpy.cumsum function in theNumPy library to calculate a cumulative sum, converting the RR interval array into a time array, and then generating time vectors at equal intervals according to the defined sampling rate, wherein the time vector covers the whole time range from 0 second to the last RR interval time point;B3.F2.3, interpolation: performing linear interpolation by using the numpy.interp function of the NumPy library, wherein the interp function interpolates the original data points at new time points to obtain the heart rate time series data at equal intervals;B3.F3, detrending: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;B3 ,F4, using a Welch method to calculate a power spectral density: the Welch method comprises the following contents:B3.F4.1, segmenting signals: segmenting the heart rate time series data at equal intervals into a plurality of overlapping segments with the same length;B3.F4.2, applying a window function: applying a Hanning window function to each segment to reduce the discontinuity at both ends of the signal;B3.F4.3, fast Fourier transform: performing fast Fourier transform on the segments processed by each window function, converting a time domain signal into a frequency domain signal, and generating the frequency spectrum of each segment;B3.F4.4, calculating the power spectral density: squaring the frequency spectrum of each segment to obtain the power spectral density of each segment, wherein the power spectral density reflects the power distribution of the signal at different frequencies;B3.F4.5, averaging the power spectral density: averaging the power spectral density of all segments at the same frequency point to obtain the average power spectral density of the whole time series;wherein the Welch method is realized by using a scipy. signal .welch function in the SciPy library, when calling the welch function, the parameters of the Welch function are set as follows: the sampling rate of data is 2 to 4 Hz; the length of each segment is 256 to 1024 data points; and the number of overlapping data points between adjacent segments is 40% to 50% of the length of each segment;B3.F5, extracting the frequency domain index:LF: filtering out the frequency points at 0.04 to 0.15 Hz and the corresponding average power spectral density values, and then performing integration by using a numpy.trapz function in the Numpy library to obtain the LF;HF: filtering out the frequency points at 0.15 to 0.4 Hz and the corresponding average power spectral density values, and then performing integration by using the numpy.trapz function in the Numpy library to obtain the HF;LF / HF ratio: obtaining the LF / HF ratio by dividing the LF by the HF.
9. The data processing method for the heart rate monitoring system according to claim 8, wherein in B3 of Step S4, the non-linear analysis index is obtained based on the non-linear analysis software with the Python editor configured by the heart rate variability analysis unit; and the specific process of obtaining the non-linear analysis index is as follows:B3.n.l, importing the NumPy library, the Matplotlib library, the HeartPy library and the SciPy library into the Python editor;B3.n.2, obtaining the Poincare plot index: using the numpy.array function in the NumPy library to convert the RR interval data into the NumPy array, and obtaining the current RR interval and the subsequent RR interval data by performing a slicing operation on the NumPy array;calculating the difference between the current RR interval and the subsequent RR interval as a first-order difference of the RR interval;taking the first-order difference as an x coordinate and the value of the first-order difference delayed by one step as a y coordinate to obtain the scatter data in the Poincare plot;using the scatter function in the Matplotlib library to draw a scatter plot by fitting a curve, where the x coordinate represents the first-order difference of the current RR interval, the y coordinate represents the first-order difference of the subsequent RR interval, the scatter size is set as 8 to 12, and the scatter shape is an ellipse shape; the transparency is 0.5 to 0.8; and the length of a minor axis and the length of a major axis in the ellipse are taken as the values of the SD1 principal axis and the SD2 principal axis, respectively;B3.n.3, calculating the sample entropy index: loading the heart rate time series data at equal intervals; using the sample entropy function in the HeartPy library to calculate the heart rate time series data at equal intervals, and obtaining the sample entropy index;B3.n.4, obtaining the detrending fluctuation analysis index: importing the detrend function in the SciPy library, and using the detrend function to process the heart rate time series data at equal intervals in a linear detrending manner to obtain the heart rate time series with linear trend removed;calculating the fluctuation standard deviation: using the numpy std function in the NumPy library to calculate the standard deviation of the heart rate time series with linear trend removed; and obtaining the fluctuation standard deviation;fluctuation amplitude analysis: using the numpy.max and numpy.min functions in the NumPy library to find the maximum value and the minimum value of the heart rate time series data with linear trend removed, and taking the difference between the maximum value and the minimum value as the index of amplitude change to obtain the fluctuation amplitude.
10. The data processing method for the heart rate monitoring system according to claim 9, wherein a try-catch structure is used to wrap a code block in the programs of the R-wave detection MATLAB software, the heart rate calculation software, the fusion MATLAB software, the time domain analysis software, the frequency domain analysis software and the non-linear analysis software, and the try-catch structure is an abnormal processing mechanism; the try-catch structure comprises a try block and a catch block; when the program executes the code in the try block, if an abnormal situation occurs, the abnormal situation will be caught, the program will not crash immediately, and the control flow will jump to the corresponding catch block; and in the code of the catch block, a developer defines an error processing method when an abnormal situation occurs, comprising recording error information and notifying users.