CN109820501B - Electrocardiosignal R wave identification method and device and computer equipment - Google Patents

Electrocardiosignal R wave identification method and device and computer equipment Download PDF

Info

Publication number
CN109820501B
CN109820501B CN201910291457.5A CN201910291457A CN109820501B CN 109820501 B CN109820501 B CN 109820501B CN 201910291457 A CN201910291457 A CN 201910291457A CN 109820501 B CN109820501 B CN 109820501B
Authority
CN
China
Prior art keywords
wave
peak
distance range
rising edge
falling edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910291457.5A
Other languages
Chinese (zh)
Other versions
CN109820501A (en
Inventor
钱春强
苏红宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Flexible Electronics Technology of THU Zhejiang
Original Assignee
Institute of Flexible Electronics Technology of THU Zhejiang
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Flexible Electronics Technology of THU Zhejiang filed Critical Institute of Flexible Electronics Technology of THU Zhejiang
Publication of CN109820501A publication Critical patent/CN109820501A/en
Application granted granted Critical
Publication of CN109820501B publication Critical patent/CN109820501B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The method for identifying the electrocardiosignal R wave comprises the steps of filtering an electrocardiosignal to eliminate high-frequency noise burr and baseline drift, identifying wave peaks based on the change of slope of sampling points, calculating the heights of rising edges and falling edges corresponding to the wave peaks, identifying the R wave well based on the average height accumulation of the wave peaks in a first distance range and the first wave peak of an intermediate wave, and utilizing the electrocardiosignal by the characteristics of the R wave.

Description

Electrocardiosignal R wave identification method and device and computer equipment
Technical Field
The application relates to the technical field of electrocardiosignal detection, in particular to an electrocardiosignal R wave identification method, an electrocardiosignal R wave identification device and computer equipment.
Background
An electrocardiogram is made up of a series of wave groups, each representing each cardiac cycle. One wave group includes P waves, QRS complexes, T waves, and U waves. (1) P wave: activation of the heart originates from the sinus node and then conducts to the atrium. The P-wave is generated by atrial depolarization and is the first wave in each wave group that reflects the depolarization of the left and right atrium. The front half represents the right atrium and the rear half represents the left atrium. (2) QRS complex: a typical QRS complex consists of three closely connected waves, the first downward wave being called the Q wave, and a high-pointed standing wave following the Q wave being called the R wave, the downward wave following the R wave being called the S wave. Because of their close association and reflection of ventricular electrical activation processes, they are collectively referred to as the QRS complex. This wave packet reflects the depolarization of the left and right ventricles. (3) T wave: the T wave follows the S-T segment and is a relatively low and longer-lived wave that results from ventricular repolarization. (4) U wave: the U wave is positioned behind the T wave and is comparatively low, and the occurrence mechanism is not completely clear. Is generally considered to be the "post-excitation potential" of myocardial activation.
The electrocardiosignals collected by the human body contain noise: baseline drift, power frequency interference, electrode motion-induced artifacts, and electrode contact noise. In the existing heart rate calculation method, in order to avoid the influence of noise on the result, noise reduction is generally carried out through band-pass filtering; then, deriving the filtered signal to obtain slope information of the QRS complex; then taking absolute value or square of slope signal; and then the signal of the last step is smoothly averaged by a moving average window. Then, a rule for complex QRS detection is set. The rules as in Open Source ECG Analysis Software are: 1. ignoring all peaks less than 196ms (306 bpm) before and after the large peak; 2. if a peak is detected, checking whether the original signal contains positive and negative slopes at the same time, if so, determining that the peak is the peak, and if not, determining that the peak represents baseline drift; 3. setting a detection threshold, if the peak value is larger than the threshold, determining the detection threshold as a QRS complex, otherwise, determining the detection threshold as noise; 4. if no QRS is detected within 1.5 times RR spacing, but there is a peak with a value greater than half the detection threshold, and the peak is at least 360ms after the previously detected QRS, then the peak is considered to be the QRS complex.
As can be seen from the above-mentioned detection rule of QRS complex, the rule of R wave identification in the prior art is complex, and the baseline drift in a certain frequency range can affect the result of the algorithm; at the same time, a threshold value needs to be preset, but for actually measured electrocardiographic data, the electrocardiographic signal intensities measured by different people are different, which may cause difficulty in preset threshold value.
Disclosure of Invention
Based on this, it is necessary to provide an R-wave identification method, apparatus, computer device and storage medium for electrocardiographic signals, which are necessary to solve the technical problems that the rule for R-wave identification in the prior art is complicated, the algorithm is affected by baseline drift, and the threshold value is set in advance for different people.
A method of identification of an electrocardiographic signal R wave, the method comprising: obtaining wave peaks in electrocardiosignals; acquiring rising edges and falling edges of the wave peaks; acquiring the heights of the rising edge and the falling edge of the wave crest; and determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
In one embodiment, the electrocardiographic signal is filtered prior to obtaining the peaks in the electrocardiographic signal, including high pass filtering and low pass filtering.
In one embodiment, acquiring peaks in the electrocardiographic signal includes: acquiring a waveform slope of an electrocardiosignal; and determining the wave crest in the electrocardiosignal according to the change of the slope.
In one embodiment, acquiring the rising and falling edges of the peak includes: acquiring a waveform slope of an electrocardiosignal; and determining the rising edge and the falling edge of the wave crest according to the waveform slope.
In one embodiment, acquiring the heights of the rising and falling edges of the peak includes; determining the starting point and the ending point of the rising edge and the starting point and the ending point of the falling edge according to the change of the slope; calculating the height of the rising edge according to the starting point and the ending point of the rising edge; the height of the falling edge is calculated according to the starting point and the ending point of the falling edge.
In one embodiment, determining the R-wave according to the heights of the rising edge and the falling edge corresponding to the peak includes: and judging whether the intermediate wave in the first distance range is an R wave or not according to a preset rule in the first distance range.
In one embodiment, a first peak size of the intermediate wave within a first distance range is obtained; obtaining peak average height accumulation in a first distance range; and if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave.
In one embodiment, any peak is taken as an intermediate wave in a first distance range, and whether the intermediate wave in the first distance range is an R wave is judged.
An electrocardiographic signal R-wave identification device, the device comprising: the wave crest acquisition module acquires wave crests in the electrocardiosignals; the waveform acquisition module acquires the rising edge and the falling edge of the wave crest; the height acquisition module acquires the heights of the rising edge and the falling edge of the wave crest; and the R wave identification module is used for determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method for identifying an R-wave of an electrocardiographic signal when the computer program is executed.
According to the electrocardiosignal R wave identification method, the electrocardiosignal R wave identification device and the electrocardiosignal R wave identification computer equipment, the electrocardiosignals are filtered to eliminate high-frequency noise burrs and baseline drift, the wave peaks are identified based on the change of the slope of the sampling points, the heights of the rising edges and the falling edges corresponding to the wave peaks are calculated, the R wave can be well identified based on the average height accumulation amount of the wave peaks in the first distance range and the first wave peak size of the intermediate wave, the utilization of the electrocardiosignals can be realized by the characteristics of the R wave, the algorithm is simple, the result is not influenced by the baseline drift, the accuracy is higher, meanwhile, the threshold value is not required to be preset according to personal conditions, and the universality is better.
Drawings
FIG. 1 is a flow chart of a method for identifying R waves of a central electric signal according to one embodiment;
FIG. 2 is a block diagram of a central electric signal R wave recognition device according to an embodiment;
FIG. 3 is an internal block diagram of a computer device in one embodiment;
FIG. 4 is a diagram of the original electrocardiographic signal when performing algorithm verification;
FIG. 5 is a graph of an electrocardiosignal with a signal-to-noise ratio of 10db after Gaussian white noise is added during algorithm verification;
FIG. 6 is a graph of an electrocardiosignal with a signal-to-noise ratio of 6db after Gaussian white noise is added during algorithm verification;
FIG. 7 is a graph of an electrocardiosignal with a signal to noise ratio of 1db after Gaussian white noise is added during algorithm verification;
FIG. 8 (a) is a schematic diagram showing the error detection rate as a function of the signal-to-noise ratio when the Pan-Tompkins algorithm is adopted to perform electrocardiosignal R-wave identification;
FIG. 8 (b) is a schematic diagram showing the error detection rate as a function of the signal-to-noise ratio when the electrocardiosignal R wave identification is performed by adopting the application;
fig. 8 (c) is a schematic diagram of the error detection rate along with the change of the signal to noise ratio when the band-pass filtering parameter adopting the Pan-Tompkins algorithm is adopted to perform electrocardiosignal R wave identification;
fig. 9 (a) is a schematic diagram of the change of the omission factor with the signal-to-noise ratio when the Pan-Tompkins algorithm is adopted to perform electrocardiosignal R wave identification;
FIG. 9 (b) is a schematic diagram showing the variation of the omission factor with the signal-to-noise ratio when the application is used for carrying out the R wave recognition of the electrocardiosignal;
fig. 9 (c) is a schematic diagram of the change of the omission factor with the signal-to-noise ratio when the electrocardiosignal R-wave identification is performed by adopting the band-pass filtering parameters of the Pan-Tompkins algorithm.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In the present embodiment, the electrocardiographic signal R wave identification is achieved by the method of the following steps.
Step S100: and obtaining the wave crest in the electrocardiosignal.
And sampling the electrocardiosignal through a certain sampling frequency, and arranging the acquired sample points according to the time sequence to form the waveform of the electrocardiosignal. The peak is the maximum point of the amplitude in a wavelength range, and the signal with the maximum amplitude in the wavelength range in the electrocardiosignal waveform is obtained as the peak in the electrocardiosignal.
In this embodiment, the peak of the electrocardiographic signal is obtained according to the waveform slope of the electrocardiographic signal, which specifically includes the following steps.
Step S101: the waveform slope of the cardiac electrical signal is obtained.
The waveform slope of the electrocardiosignal is obtained by calculating the slope between sampling points. Specifically, let the electrocardiosignal be v, the distance between the electrocardiosignal sample point and the sample point be 1, and the difference between the current sample point value v [ n ] and the previous sample point value v [ n-1] be the slope of the current sample point:
Δν[n]=ν[n]-ν[n-1](1)。
step S102: and determining the peak of the electrocardiosignal according to the change of the slope.
Specifically, the slope of the sample point at the current time is positive, i.e., Δν [ n ] >0, and the slope of the next sample Δν [ n+1] <0, then the sample point at the current time is a peak of the electrocardiographic signal.
In an embodiment, the electrocardiographic signal is filtered, including high-pass filtering and low-pass filtering, before the peaks in the electrocardiographic signal are acquired. Firstly, low-pass filtering is carried out, and the cut-off frequency is generally 40Hz and is used for eliminating high-frequency noise burrs possibly existing on R waves; high pass filtering is performed again, typically taking a cut-off frequency of 0.5Hz, to eliminate baseline wander.
In this embodiment, the peak position is located based on the change of the positive and negative slope of the waveform, if there is noise burr on the R wave, the algorithm will recognize the noise burr as a small waveform, so the final result may be that the R wave is recognized as a series of small waveforms respectively, which results in that the R wave cannot be located. In this embodiment, the low pass eliminates noise glitches on the R wave, and the filtering degree is not as great as Pan-Tompkins, so that the waveform characteristics of the QRS wave are prevented from being changed too much due to the band-pass filtering, and the subsequent QRS complex recognition analysis is prevented from being affected.
Step S200: and acquiring the rising edge and the falling edge of the wave crest.
Any wave crest is composed of a rising edge and a falling edge, and the rising edge and the falling edge of the wave crest are obtained, namely whether the current sample point is located at the rising edge or the falling edge is judged. Specifically, the difference between the current sample point and the previous sample point is calculated, if the difference is positive, the rising edge of the peak is obtained, and if the difference is negative, the falling edge of the peak is obtained, namely, the judgment rules of the rising edge and the falling edge are as follows:
step S300: and acquiring the heights of the rising edge and the falling edge of the wave crest.
Any one complete wave peak is formed by waveforms among a starting point of a rising edge, an ending point of the rising edge, a starting point of a falling edge and an ending point of the falling edge, wherein the starting point of the rising edge and the starting point of the falling edge are the same sample point, and the heights of the rising edge and the falling edge waveforms are calculated.
In one embodiment, the starting point and the ending point of the rising edge and the starting point and the ending point of the falling edge are determined according to the change of the slope; calculating the height of the rising edge according to the starting point and the ending point of the rising edge; the height of the falling edge is calculated according to the starting point and the ending point of the falling edge. Specifically, if the difference between the sample value at the previous time and the sample value at the current time is negative, i.e. Δv [ n ] <0, and the difference between the sample value at the current time and the sample value at the next time is positive, i.e. Δv [ n+1] >0, the current sample point n is the starting point of the rising edge of the peak, and is also the ending point of the falling edge of the previous peak; if the difference between the sample value at the previous moment and the sample value at the current moment is positive, i.e. Deltav [ n ] >0, and the difference between the sample value at the current moment and the sample value at the next moment is negative, i.e. Deltav [ n+1] <0, the current sample point n is the ending point of the rising edge of the wave crest and is also the starting point of the falling edge of the wave crest.
In one embodiment, the height of the i-th peak rising edge is the accumulation of the adjacent sample point difference between the rising edge starting point and the rising edge ending point, i.e.:
wherein n=n i Indicating the start point of the rising edge. n=n i+1 Is the peak position, i.e., indicates the rising edge termination point.
The height of the falling edge of the ith peak is the accumulation of the difference value of the adjacent sample points between the starting point and the ending point of the falling edge, namely:
wherein n=n i+1 For peak position, i.e. representing the start of the falling edge, n=n i+2 Is the termination point of the falling edge. Because of Deltav [ n ]]<0, the negative sign is given in the formula (4) so that the obtained falling edge height is positive.
Step S400: and determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
And the rising edge and the falling edge corresponding to the wave crest are the rising edge and the falling edge forming the wave crest.
In an embodiment, in the first distance range, whether the intermediate wave in the first distance range is an R wave is determined according to a preset rule. The preset rule is related to the height characteristics of the wave crest. Specifically, the method comprises the following steps.
Step S401: a first peak size of the intermediate wave within a first distance range is obtained.
The first peak is the sum of the rising edge and the falling edge corresponding to the peak, namely
Δh[i]=Δh up [i]+Δh down [i] (5)。
Step S402: and obtaining the peak average height accumulation in the first distance range.
And acquiring the peak average height accumulated quantity in the first distance range according to the first peak size. Specifically, the first peak size of each peak in the first distance range is added to obtain the total peak height accumulation in the first distance range, and divided by the number of peaks in the first distance range, so as to obtain the average height accumulation of a plurality of peaks in the first distance range.
Specifically, the second peak size of the ith peak is:
the second peak size is the sum of the first peak sizes from the first peak to the ith peak of the electrocardiosignal.
Therefore, the total height accumulation of the peaks in the first distance range is H, centering on the t-th peak of the peaks in the middle of the first distance range c [t+w]-H c [t-w]. . The half width of the first distance range is w, the width of the first distance range is 2w, and generally w is greater than 5, that is, the number of characteristic waves PQRST waves of the electrocardiosignal in the first distance range is greater than 5.
Averaging peak sizes of 2w+1 waves in a first distance range
In an embodiment, the total cumulative amount of the heights of the peaks in the first distance range may also be obtained by accumulating the differences between all adjacent sample points in the first distance range.
Step S403: and if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave.
If the first peak size of the intermediate wave in the first distance range is greater than the average height accumulation, i.eThe intermediate wave is judged to be an R wave.
In an embodiment, any peak in the electrocardiograph signal obtained in step S100 is taken as an intermediate wave in the first distance range, and whether the intermediate wave is an R wave is determined, so that all R waves in the electrocardiograph signal are identified.
In an embodiment, the instantaneous heart rate may also be calculated from the time difference between two adjacent R-wave peaks. Specifically, the peak time t R [p]P represents the p-th R peak, and the corresponding first peak size h R [p]The instantaneous heart rate is
In an embodiment, the identification of other characteristic waves of the electrocardiographic signal, such as P-waves, T-waves, U-waves, etc., can also be achieved by the method, and the heart rate is calculated using the identified characteristic waves.
According to the R wave identification method of the electrocardiosignal, the electrocardiosignal is filtered to eliminate high-frequency noise burrs and baseline drift, the wave crest is identified based on the change of the slope of the sampling point, the heights of the rising edge and the falling edge corresponding to the wave crest are calculated, the R wave can be well identified based on the average height accumulation amount of the wave crest in the first distance range and the first wave crest size of the intermediate wave, the utilization of the electrocardiosignal can be realized by the characteristics of the R wave, the algorithm is simple, the result is not influenced by the baseline drift, the accuracy is higher, the threshold value is not required to be preset according to personal conditions, and the universality is better.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 2, there is provided an electrocardiographic signal R-wave recognition device, including:
the wave crest acquisition module acquires wave crests in the electrocardiosignals;
the waveform acquisition module acquires the rising edge and the falling edge of the wave crest;
the height acquisition module acquires the heights of the rising edge and the falling edge of the wave crest;
and the R wave identification module is used for determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
The electrocardiosignal R wave recognition device further comprises a filtering module, wherein the filtering module is used for filtering the electrocardiosignals before the peaks in the electrocardiosignals are obtained, the filtering module further comprises a high-pass filtering unit and a low-pass filtering unit, the high-pass filtering unit is used for conducting high-pass filtering on the electrocardiosignals, and the low-pass filtering unit is used for conducting low-pass filtering on the electrocardiosignals.
For specific limitations of the electrocardiographic signal R-wave recognition device, reference may be made to the above limitation of the electrocardiographic signal R-wave recognition method, and no further description is given here. All or part of each module in the electrocardiosignal R wave identification device can be realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an R-wave identification method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 3 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: obtaining wave peaks in electrocardiosignals; acquiring rising edges and falling edges of the wave peaks; acquiring the heights of the rising edge and the falling edge of the wave crest; and determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
In one embodiment, the processor when executing the computer program further performs the steps of: filtering the electrocardiosignal before obtaining the wave crest in the electrocardiosignal, including high-pass filtering and low-pass filtering.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring peaks in the electrocardiographic signals includes: acquiring a waveform slope of an electrocardiosignal; and determining the wave crest in the electrocardiosignal according to the change of the slope.
In one embodiment, the processor when executing the computer program further performs the steps of: the step of obtaining the rising edge and the falling edge of the wave crest comprises the following steps: acquiring a waveform slope of an electrocardiosignal; and determining the rising edge and the falling edge of the wave crest according to the waveform slope.
In one embodiment, the processor when executing the computer program further performs the steps of: determining the starting point and the ending point of the rising edge and the starting point and the ending point of the falling edge according to the change of the slope; calculating the height of the rising edge according to the starting point and the ending point of the rising edge; the height of the falling edge is calculated according to the starting point and the ending point of the falling edge.
In one embodiment, the processor when executing the computer program further performs the steps of: and judging whether the intermediate wave in the first distance range is an R wave or not according to a preset rule in the first distance range.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a first peak size of an intermediate wave in a first distance range; acquiring peak average height accumulation in a first distance range; and if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave.
In one embodiment, the processor when executing the computer program further performs the steps of: and judging whether the intermediate wave in the first distance range is an R wave or not by taking any wave crest as the intermediate wave in the first distance range.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: obtaining wave peaks in electrocardiosignals; acquiring rising edges and falling edges of the wave peaks; acquiring the heights of the rising edge and the falling edge of the wave crest; and determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest.
In one embodiment, the computer program when executed by the processor further performs the steps of: filtering the electrocardiosignal before obtaining the wave crest in the electrocardiosignal, including high-pass filtering and low-pass filtering.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring peaks in the electrocardiographic signals includes: acquiring a waveform slope of an electrocardiosignal; and determining the wave crest in the electrocardiosignal according to the change of the slope.
In one embodiment, the computer program when executed by the processor further performs the steps of: the step of obtaining the rising edge and the falling edge of the wave crest comprises the following steps: acquiring a waveform slope of an electrocardiosignal; and determining the rising edge and the falling edge of the wave crest according to the waveform slope.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining the starting point and the ending point of the rising edge and the starting point and the ending point of the falling edge according to the change of the slope; calculating the height of the rising edge according to the starting point and the ending point of the rising edge; the height of the falling edge is calculated according to the starting point and the ending point of the falling edge.
In one embodiment, the computer program when executed by the processor further performs the steps of: and judging whether the intermediate wave in the first distance range is an R wave or not according to a preset rule in the first distance range.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a first peak size of an intermediate wave in a first distance range; acquiring peak average height accumulation in a first distance range; and if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave.
In one embodiment, the computer program when executed by the processor further performs the steps of: and judging whether the intermediate wave in the first distance range is an R wave or not by taking any wave crest as the intermediate wave in the first distance range.
Through verification, the method, the device, the computer equipment and the storage medium for identifying the R wave of the electrocardiosignal are simple in algorithm, the result is not influenced by baseline drift, the method is more accurate, meanwhile, a threshold value is not required to be preset according to personal conditions, and the universality is better. The specific verification process is as follows: the standard database MIT-BIH Arrhythmia Database is adopted for verification, and because the R wave positions of the electrocardiograph data of the database are marked manually, the method can be used for verification of the method, namely the R wave positions obtained by a comparison algorithm and the R wave positions marked manually, and the detection rate of the R wave is calculated to verify the feasibility of the method. The selected signal numbers are 100, 101, 103, 107, 109. The original signals are regarded as clean signals without noise, and then Gaussian white noise is added into the clean signals to realize signals with different signal to noise ratios. The signal to noise ratio of the inspected signal is-10 db, the original electrocardiosignals are shown in fig. 3, and the electrocardiosignals with the signal to noise ratios of 10db,6db and 1db are respectively shown in fig. 4-6, so that the noise is larger and larger along with the reduction of the signal to noise ratio.
According to the specification in YY0885-2013 dynamic electrocardiograph system safety and basic performance special requirement of pharmaceutical industry standard of the people's republic of China, an R wave matching window of 150ms is set, namely, the manually marked R position is in the range of 150ms in half width, the R wave position obtained by an algorithm is matched with the R wave matching window, and the R wave position represents detection of normal heart beat, otherwise, the heart beat is missed. If the R wave obtained by the algorithm is not matched with the R wave marked manually in the matching window, the heart beat is detected by mistake. Let TP be the number of beats detected normally, FN be the number of beats missed, FP be the number of beats missed.
The omission factor P m And error detection rate P w Respectively is
The algorithm result is compared with the classical R wave detection Pan-Tompkins algorithm result, and the flow of the Pan-Tompkins algorithm comprises the following steps: 1.5-15Hz band-pass filtering, 2. Deriving, 3. Squaring, 4. Window-shifting integration, 5. Finding peak position, 6. Setting double threshold to detect R wave position.
In the verification example, two filtering parameters are taken: 1. the cut-off frequencies of the low-pass filtering and the high-pass filtering are respectively 40Hz and 0.5Hz;2. low-pass and high-pass filtering parameters of Pan-Tompkins are used. The half width w of the window in step 3 is taken to be 10, and the algorithm results in the results shown in fig. 7 and 8. As a result of the first filtering parameter, the false detection rate is zero when the signal-to-noise ratio SNR is more than or equal to 0db, and is continuously increased when the signal-to-noise ratio is further reduced. When the signal-to-noise ratio SNR is more than or equal to 0db, the omission ratio is lower than 5%, and although the omission ratio is increased and then decreased with further reduction of the signal-to-noise ratio, the error detection ratio is increased. The result of the second filtering parameter is slightly higher than the first sub-wave parameter, but the false detection rate is almost zero except SNR = -10 db. Therefore, if the same filtering parameters of Pan-Tompkins are adopted in the algorithm, the false detection rate can be controlled to be low even under the condition of poor signal-to-noise ratio, but the false detection rate is higher than the original wider band-pass filtering parameters (first filtering parameters). As a result of the Pan-Tompkins algorithm, the omission ratio of R waves is controlled to be better, but when the signal to noise ratio is lower, the omission ratio is obviously increased and is obviously higher than that of the patent algorithm. Therefore, when noise exists in the electrocardiosignal and the signal-to-noise ratio is low, the R wave detection result is better than that of the Pan-Tompkins algorithm.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (8)

1. A method for identifying an R wave of an electrocardiograph signal, the method comprising:
obtaining wave peaks in electrocardiosignals;
acquiring rising edges and falling edges of the wave peaks;
acquiring the heights of the rising edge and the falling edge of the wave crest;
determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest;
wherein, the determining the R wave according to the heights of the rising edge and the falling edge corresponding to the peak includes: judging whether the intermediate wave in the first distance range is an R wave according to a preset rule in the first distance range, wherein the method specifically comprises the following steps of:
acquiring the first peak size of the intermediate wave in a first distance range, wherein the first peak size is the sum of rising edge and falling edge heights corresponding to the peak;
acquiring peak average height accumulation in a first distance range;
if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave;
wherein obtaining the peak average height accumulation in the first distance range includes:
adding the first wave peak sizes of each wave peak in the first distance range to obtain total wave peak height accumulation amount in the first distance range, dividing the total wave peak height accumulation amount by the number of wave peaks in the first distance range, and calculating to obtain average height accumulation amounts of a plurality of wave peaks in the first distance range.
2. The method of claim 1, wherein filtering the electrocardiographic signal prior to acquiring peaks in the electrocardiographic signal comprises high pass filtering and low pass filtering.
3. The method of claim 1, wherein acquiring peaks in the electrocardiographic signal comprises:
acquiring a waveform slope of an electrocardiosignal;
and determining the wave crest in the electrocardiosignal according to the change of the slope.
4. A method according to claim 3, wherein obtaining the rising and falling edges of the peaks comprises:
and determining the rising edge and the falling edge of the wave crest according to the waveform slope.
5. The method of claim 4, wherein obtaining the heights of the rising and falling edges of the peak comprises; determining the starting point and the ending point of the rising edge and the starting point and the ending point of the falling edge according to the change of the slope;
calculating the height of the rising edge according to the starting point and the ending point of the rising edge;
the height of the falling edge is calculated according to the starting point and the ending point of the falling edge.
6. The method of claim 1, wherein any peak is taken as an intermediate wave of a first distance range, and determining whether the intermediate wave of the first distance range is an R wave.
7. An electrocardiographic signal R-wave recognition device, the device comprising:
the wave crest acquisition module acquires wave crests in the electrocardiosignals;
the waveform acquisition module acquires the rising edge and the falling edge of the wave crest;
the height acquisition module acquires the heights of the rising edge and the falling edge of the wave crest;
the R wave identification module is used for determining R waves according to the heights of the rising edge and the falling edge corresponding to the wave crest;
the R wave identification module is specifically used for:
acquiring the first peak size of the intermediate wave in a first distance range, wherein the first peak size is the sum of rising edge and falling edge heights corresponding to the peak;
acquiring peak average height accumulation in a first distance range;
if the first peak size of the intermediate wave in the first distance range is larger than the peak average height accumulation amount in the first distance range, the intermediate wave in the first distance range is an R wave;
wherein obtaining the peak average height accumulation in the first distance range includes:
adding the first wave peak sizes of each wave peak in the first distance range to obtain total wave peak height accumulation amount in the first distance range, dividing the total wave peak height accumulation amount by the number of wave peaks in the first distance range, and calculating to obtain average height accumulation amounts of a plurality of wave peaks in the first distance range.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
CN201910291457.5A 2018-11-12 2019-04-11 Electrocardiosignal R wave identification method and device and computer equipment Active CN109820501B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811339640X 2018-11-12
CN201811339640 2018-11-12

Publications (2)

Publication Number Publication Date
CN109820501A CN109820501A (en) 2019-05-31
CN109820501B true CN109820501B (en) 2023-11-28

Family

ID=66874450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910291457.5A Active CN109820501B (en) 2018-11-12 2019-04-11 Electrocardiosignal R wave identification method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN109820501B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113180644B (en) * 2021-04-29 2022-05-10 福州大学 Gait event point detection method based on angular velocity signals
CN113197584A (en) * 2021-04-30 2021-08-03 扬州大学 QRS wave group identification method based on difference zero-crossing detection method
CN113288169B (en) * 2021-05-26 2024-05-17 东软集团股份有限公司 Waveform identification method, device and equipment for electrocardiographic waveform signals
CN114124622B (en) * 2022-01-27 2022-05-17 天津大学 Data identification processing system for silent communication
CN115886834B (en) * 2022-11-11 2024-06-25 研祥智慧物联科技有限公司 ECG (electrocardiogram) data peak detection method and device and computer equipment
CN118364233A (en) * 2023-08-01 2024-07-19 珠海精实测控技术股份有限公司 Waveform segmentation processing device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6070097A (en) * 1998-12-30 2000-05-30 General Electric Company Method for generating a gating signal for cardiac MRI
KR20130085632A (en) * 2012-01-20 2013-07-30 경북대학교 산학협력단 R-peak detection method of ecg signal using adaptive local threshold
KR20140087918A (en) * 2012-12-31 2014-07-09 부산대학교 산학협력단 System and method for detecting r wave of ecg signal based on som
CN104173043A (en) * 2014-09-04 2014-12-03 东莞理工学院 Electrocardiogram (ECG) data analysis method suitable for mobile platform
CN105411579A (en) * 2015-12-28 2016-03-23 中科院微电子研究所昆山分所 Electrocardiogram R wave detecting method and device
CN107233093A (en) * 2017-05-23 2017-10-10 安徽华米信息科技有限公司 Detection method, device and the electronic equipment of R ripples
CN107374619A (en) * 2017-06-20 2017-11-24 重庆工业职业技术学院 A kind of R ripples method for quickly identifying
CN108272451A (en) * 2018-02-11 2018-07-13 上海交通大学 A kind of QRS wave recognition methods based on improvement wavelet transformation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6070097A (en) * 1998-12-30 2000-05-30 General Electric Company Method for generating a gating signal for cardiac MRI
KR20130085632A (en) * 2012-01-20 2013-07-30 경북대학교 산학협력단 R-peak detection method of ecg signal using adaptive local threshold
KR20140087918A (en) * 2012-12-31 2014-07-09 부산대학교 산학협력단 System and method for detecting r wave of ecg signal based on som
CN104173043A (en) * 2014-09-04 2014-12-03 东莞理工学院 Electrocardiogram (ECG) data analysis method suitable for mobile platform
CN105411579A (en) * 2015-12-28 2016-03-23 中科院微电子研究所昆山分所 Electrocardiogram R wave detecting method and device
CN107233093A (en) * 2017-05-23 2017-10-10 安徽华米信息科技有限公司 Detection method, device and the electronic equipment of R ripples
CN107374619A (en) * 2017-06-20 2017-11-24 重庆工业职业技术学院 A kind of R ripples method for quickly identifying
CN108272451A (en) * 2018-02-11 2018-07-13 上海交通大学 A kind of QRS wave recognition methods based on improvement wavelet transformation

Also Published As

Publication number Publication date
CN109820501A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN109820501B (en) Electrocardiosignal R wave identification method and device and computer equipment
US7412282B2 (en) Algorithms for detecting cardiac arrhythmia and methods and apparatuses utilizing the algorithms
US8396541B2 (en) Signal analysis of cardiac and other patient medical signals
US10506939B2 (en) Matching and tracking time sequences of heart activation
CN101828917B (en) Method and system for extracting electrocardiosignal characteristic
CN111134659B (en) Method and device for detecting P wave and T wave in electrocardiosignal
CN112528783B (en) Electrocardiogram and heart beat data clustering method, device, electronic equipment and medium
CN113786200B (en) Electrocardiosignal processing method, electrocardiosignal processing device, electrocardiosignal processing equipment and readable medium
US8684942B2 (en) System for cardiac impairment detection based on signal regularity
CN110448289B (en) Heart Rate Variability (HRV) analysis method, device, storage medium and equipment
CN111419212A (en) Method and device for processing electrocardiogram data, storage medium and computer equipment
CN107622259B (en) T wave detection method, electrocardiogram data analysis method and device
Alcaraz et al. Dynamic time warping applied to estimate atrial fibrillation temporal organization from the surface electrocardiogram
Gupta et al. A derivative-based approach for QT-segment feature extraction in digitized ECG record
CN109259750B (en) Heart rate calculation method and device, computer equipment and storage medium
US11730417B2 (en) Apparatus and method for detecting R peak of ECG signal using adaptive median filter
CN113499082A (en) QRS complex detection method, electrocardiogram detection device and readable storage medium
US20120136580A1 (en) System and Method for Analyzing an Electrophysiological Signal
CN114788704A (en) QRS wave identification method, device, equipment and storage medium in electrocardiogram signal
CN110477904B (en) House flapping signal detection method and device
CN115770054A (en) Electrocardiosignal processing method, portable electrocardiosignal acquisition equipment and storage medium
CN112438735B (en) Electrocardiogram P wave detection method, analysis device and storage medium
JP2001504722A (en) Statistical mapping of the physiological state of the mammalian heart
CN113749665B (en) Method, device, equipment and medium for capturing abnormal index
CN113080995B (en) Tachycardia attribute identification method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant