Automatic detection method for electrocardiosignal T wave and end point thereof

文档序号:40147 发布日期:2021-09-28 浏览:51次 中文

阅读说明:本技术 一种心电信号t波及其终点自动检测方法 (Automatic detection method for electrocardiosignal T wave and end point thereof ) 是由 张瑞 薛渊元 李朵 宋江玲 于 2021-06-28 设计创作,主要内容包括:本发明公开一种心电信号T波及其终点自动检测方法。首先,采用小波分解和软阈值相结合的方法对原始心电信号进行预处理;其次,利用小波变换和拟合法对预处理后的心电信号进行重构和拟合,进而采用模极大值和阈值法实现R峰检测和漏检误检的修正;再次,以R峰位置点为起点,结合窗口搜索法、极值法和黎曼和等方法实现T峰检测;最后,以所获得的T峰位置点为基准,根据T峰波形特点和T波终点局部变化趋势,利用求导法和阈值法定位候选的T波终点,并对其进行修正,以获得更为准确的T波终点。本发明提供了一种计算复杂度低、自动检测准确率高、易于推广的T波及其终点检测方法,该方法亦可用于心电信号其他波形起止点的检测。(The invention discloses an automatic detection method for an electrocardiosignal T wave and an end point thereof. Firstly, preprocessing an original electrocardiosignal by adopting a method of combining wavelet decomposition and a soft threshold; secondly, reconstructing and fitting the preprocessed electrocardiosignals by utilizing a wavelet transform and fitting method, and further realizing the correction of R peak detection and missed detection false detection by adopting a modulus maximum value and threshold value method; thirdly, taking the R peak position point as a starting point, and combining a window searching method, an extreme value method, a Riemann sum method and the like to realize T peak detection; and finally, with the obtained T peak position point as a reference, positioning the candidate T wave terminal by using a derivation method and a threshold method according to the waveform characteristics of the T peak and the local change trend of the T wave terminal, and correcting the candidate T wave terminal to obtain a more accurate T wave terminal. The invention provides a T wave and end point detection method thereof, which has low calculation complexity, high automatic detection accuracy and easy popularization, and the method can also be used for detecting start and stop points of other waveforms of electrocardiosignals.)

1. An automatic detection method for electrocardiosignal T wave and end point thereof is characterized in that the method can obtain a T peak of a heart signal sequence to be detected and a T wave end point position point set; the method comprises the following steps:

step 1, preprocessing an electrocardiosignal sequence to be detected to obtain a preprocessed electrocardiosignal sequence with noise removed;

step 2, obtaining a plurality of R peak position points from the preprocessed electrocardiosignal sequence to obtain an R peak position point set;

step 3, obtaining each T peak position point by using an extreme value principle according to each R peak position point in the R peak position point set obtained in the step 2 so as to obtain a T peak position point set;

and 4, obtaining each T wave terminal point position point by an inflection point search method according to each T peak position point in the T peak position point set obtained in the step 3 so as to obtain a T wave terminal point position point set.

2. The method according to claim 1, wherein the step 2 comprises:

step 2.1, decomposing the preprocessed electrocardiosignal sequence by adopting wavelet transform to obtain a plurality of decomposition layers; selecting a wavelet coefficient corresponding to a decomposition layer according to the frequency band range of the QRS complex, and reconstructing a signal of the decomposition layer according to the wavelet coefficient to obtain a reconstructed electrocardiosignal sequence;

2.2, selecting an edge wave peak point of the reconstructed electrocardiosignal sequence, and fitting the edge wave peak point by a curve fitting method to obtain a fitted electrocardiosignal sequence; in the fitted electrocardiosignal sequence, calculating all local extreme points in the fitted electrocardiosignal sequence by using a mode maximum method to obtain a local extreme point set;

step 2.3, in the local extreme point set, taking the local extreme point as a center, windowing the reconstructed electrocardiosignal sequence to obtain an electrocardiosignal fragment sequence;

step 2.4, selecting a position point corresponding to the maximum amplitude value in each electrocardiosignal segment sequence to obtain a candidate R peak position point set;

and 2.5, obtaining an R peak position point set according to the candidate R peak position point set.

3. The method for automatically detecting the T wave of the electrocardiosignal and the end point thereof as claimed in claim 2, wherein the step 2.5 comprises:

step 2.5.1, calculating a horizontal distance value between two adjacent R peak position points in the candidate R peak position point set to obtain a plurality of RR intervals, wherein each RR interval corresponds to two R peak position points;

step 2.5.2, find in RR interval sequence greater than first threshold THRrr1Finding a section of missed electrocardiosignal subsequence corresponding to the RR interval in the electrocardiosignal sequence; repeatedly executing the step until all the missed electrocardiosignal subsequences are found; wherein the first threshold THRrr11.0 fs, fs is the electrocardiosignal sampling rate and the unit is Hz;

step 2.5.3, in each section of missed detection electrocardiosignal subsequence, taking a position point corresponding to the maximum amplitude value as a new R peak position point, and adding the position point into a candidate R peak position point set to obtain a new candidate R peak position point sequence after inserting the missed detection point;

step 2.5.4, calculating a horizontal distance value between two adjacent R peak position points in the new candidate R peak position point set to obtain a plurality of new RR intervals, wherein each new RR interval corresponds to two R peak position points;

step 2.5.5, find less than second threshold THR in the new RR interval sequencerr2Finding two corresponding R peak position points on the electrocardiosignal sequence to obtain a plurality of primary error detection R peak position points; repeatedly executing the step until all the primary selection false detection R peak position points are found; wherein the second threshold THRrr2Fs is 0.6 x fs, fs is the electrocardiosignal sampling rate and has the unit of Hz;

and 2.5.6, comparing the amplitudes of the two R peak position points corresponding to the new RR interphase smaller than the second threshold, deleting the false detection R peak position points corresponding to the points with smaller amplitudes, and obtaining a new R peak position point set after the false detection points are removed, thereby obtaining a finally determined R peak position point set.

4. The method for automatically detecting the T wave of the electrocardiosignal and the end point thereof as claimed in claim 1, wherein the step 3 comprises:

step 3.1, calculating a horizontal distance value between two adjacent R peak position points in the R peak position point set to obtain an RR interval;

step 3.2, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing backward according to the T wave position characteristics and the time length to obtain a preselected T wave fragment sequence;

step 3.3, Riemann and S from R peak to S peak are calculatedRSRiemann and S of a preselected T-wave segment sequenceTAnd the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the pre-selected T wave segment sequences; comparing S with SRSIf S > SRSIf the T wave is a forward wave; if S is less than SRSIf the T wave is the inverted wave, the T wave is the inverted wave;

step 3.4, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of T peak search intervals; if the T wave is a forward wave, detecting a position point corresponding to the maximum amplitude value in each search interval by using a maximum value method to obtain a plurality of T peak position points; if the T wave is an inverted wave, detecting a position point corresponding to the minimum amplitude value in each search interval by using a minimum value method to obtain a plurality of T peak position points; and finally obtaining a T peak position point set.

5. The method according to claim 4, wherein the window-added search interval in step 3.2 is [ R ]v+t1×fs,Rv+t1×fs+N]Wherein R isvDenotes the R peak position point, NIndicating the length of the preselected T band, N ═ T0X fs, fs is the sampling rate in Hz, t0∈(0.05,0.10),t1E (0.15,0.25) in s.

6. The method for automatically detecting the T wave of the electrocardiosignal and the end point thereof as claimed in claim 4, wherein the step 3.3 comprises:

step 3.3.1, in the R peak position point set, taking each R peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of S peak search intervals, detecting a position point corresponding to a minimum amplitude value in each S peak search interval by using a minimum value method to obtain a plurality of S peak position points, and further obtaining an S peak position point set; the S peak search interval in step 3.3.1 is [ R ]v,Rv+ts×fs]Wherein R isvDenotes the R peak position point, tsE (0.06,0.16), with the unit of s, fs is the sampling rate, and the unit is Hz;

step 3.3.2, Riemann and S from R peak to S peak are calculatedRSRiemann sum S of preselected T bandT

Wherein the content of the first and second substances,the number of subintervals divided in the electrocardio segment sequence corresponding to the R peak to the S peak is taken as the number of sample points, delta XRSjIs the length of the jth subinterval of the electrocardio segment sequence from the R peak to the S peak, SRSjIts corresponding amplitude value;

wherein the content of the first and second substances,m is the number of subintervals divided in the sequence of preselected T-wave segments, where the number of sample points, Δ X, is takenTjIs the length of the jth subinterval of the electrocardio segment sequence corresponding to the preselected T wave plate segment sequence, FTjIts corresponding amplitude value;

step 3.3.3, calculating the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the preselected T wave segment sequence; wherein S is SRS+ST

Step 3.3.4, compare S with SRSIf S > SRSIf the T wave is a forward wave; if S is less than SRSAnd the T wave is an inverted wave.

7. The method according to claim 4, wherein the T peak search interval in step 3.4 is T peak search intervalWherein R isvThe R peak position point is shown, and RR is RR interval.

8. The method according to claim 4, wherein the step 4 comprises:

step 4.1, finding each T peak position point in the T peak position point set obtained in the step 3 in the preprocessed electrocardiosignal sequence, taking each T peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of first search intervals, detecting a position point corresponding to an inflection point in each first search interval by using a derivation method, and obtaining an ith T wave end point candidate position point T (i);

step 4.2, judging whether the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than a threshold value THR, wherein THR is a positive number and the unit is a position point;

if the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than the threshold THR, taking the unit as the number of position points, taking the ith T wave endpoint candidate position point as a starting point, carrying out windowing backwards to obtain a plurality of second search intervals, detecting an inflection point position point in each second search interval by using a derivation method, and calculating an amplitude corresponding to the inflection point position point; if the T wave is a forward wave, taking an inflection point position point with the minimum amplitude and the horizontal distance between the second search interval and the T peak larger than a threshold THR as an ith T wave end point modified position point; if the T wave is an inverted wave, taking an inflection point position point with the maximum amplitude and the horizontal distance between the second search interval and the T peak larger than a threshold THR as an ith T wave end point modified position point; otherwise, taking the ith T-wave terminal point candidate position point as the position point after the ith T-wave terminal point correction;

and 4.3, repeatedly executing the steps 4.1-4.2 until all the position points after the T wave end point correction are obtained, and obtaining a T wave end point position point set.

9. The method according to claim 8, wherein in step 4.1, the first search interval is [ T ] Tv,Tv+t2*fs]Wherein T isvDenotes the T peak position point, T2E (0.1,0.2) in units of s, fs representing the electrocardiosignal sampling rate in units of Hz.

10. The method according to claim 8, wherein in step 4.2, the threshold THR ═ T is set as T, and the end point is automatically detected3Fs, wherein fs represents the rate of sampling of the cardiac signal, t3E (0.05,0.1) and the unit is s; the second search interval in step 4.2 is [ T ]end(i),Tend(i)+t4*fs]Wherein T isend(i) Indicates the ith candidate T wave end point, T4E (0.1,0.15) in s.

Technical Field

The invention relates to an automatic detection method of an electrocardiosignal, in particular to an automatic detection method of an electrocardiosignal T wave and an end point thereof.

Background

The electrocardiosignal is a curve which is recorded by an electrocardiograph through an electrode plate placed on the surface of a human body and can reflect the electrical activity of the heart, is a low-signal-to-noise-ratio non-stable physiological signal, and has strong randomness and weak strength. The electrocardiosignal is in periodic variation, one heartbeat is a cardiac cycle, and the electrocardiosignal is composed of main characteristic waves such as a P wave, a QRS wave group, a T wave and the like. The T wave represents the repolarization wave of the ventricles and can reflect the potential change in the repolarization process of the left and right ventricular muscles. Clinically, the abnormal change of the electrocardiosignals is an important index for doctors to diagnose heart diseases, so that the accurate positioning of the T waves in the electrocardiosignals has very important diagnostic value. However, the conventional manual detection of characteristic waves by means of professional knowledge and diagnosis experience of doctors has strong subjectivity, is time-consuming, is easy to make judgment mistakes, and can cause a series of problems of difficulty in hospitalization, high treatment cost and the like due to serious imbalance of medical resources.

With the rapid development of advanced technologies such as artificial intelligence, big data, computer technology, mobile internet and the like, researchers begin to pay attention to the research on intelligent analysis and processing of medical data, and a set of effective solutions is provided for the problems. In view of the above, the invention designs an automatic detection algorithm for the T wave and the end point thereof, studies the characteristics and the variation trend of the T wave and the end point thereof in the electrocardiosignals, and realizes the automatic detection of the T wave and the end point thereof by combining a machine learning method, so as to solve the false detection phenomena existing in the detection of the inverted T wave in the abnormal electrocardiosignals and the detection of the end point of the T wave, thereby improving the detection accuracy.

Disclosure of Invention

Aiming at the defects and shortcomings in the prior art, the invention provides an automatic detection method of a T wave of an electrocardiosignal and an end point thereof, which realizes the automatic detection of the T wave and the end point thereof by deeply excavating and depicting the waveform characteristics of the T peak in a mass of electrocardiosignals and the local variation trend of the end point of the T wave and combining a machine learning method.

In order to achieve the purpose, the invention adopts the following technical scheme:

an automatic detection method for electrocardiosignal T wave and end point thereof can obtain a T peak of a heart signal sequence to be detected and a T wave end point position point set; the method comprises the following steps:

step 1, preprocessing an electrocardiosignal sequence to be detected to obtain a preprocessed electrocardiosignal sequence with noise removed;

step 2, obtaining a plurality of R peak position points from the preprocessed electrocardiosignal sequence to obtain an R peak position point set;

step 3, obtaining each T peak position point by using an extreme value principle according to each R peak position point in the R peak position point set obtained in the step 2 so as to obtain a T peak position point set;

and 4, obtaining each T wave terminal point position point by an inflection point search method according to each T peak position point in the T peak position point set obtained in the step 3 so as to obtain a T wave terminal point position point set.

The invention also comprises the following technical characteristics:

specifically, the step 2 includes:

step 2.1, decomposing the preprocessed electrocardiosignal sequence by adopting wavelet transform to obtain a plurality of decomposition layers; selecting a wavelet coefficient corresponding to a decomposition layer according to the frequency band range of the QRS complex, and reconstructing a signal of the decomposition layer according to the wavelet coefficient to obtain a reconstructed electrocardiosignal sequence;

2.2, selecting an edge wave peak point of the reconstructed electrocardiosignal sequence, and fitting the edge wave peak point by a curve fitting method to obtain a fitted electrocardiosignal sequence; in the fitted electrocardiosignal sequence, calculating all local extreme points in the fitted electrocardiosignal sequence by using a mode maximum method to obtain a local extreme point set;

step 2.3, in the local extreme point set, taking the local extreme point as a center, windowing the reconstructed electrocardiosignal sequence to obtain an electrocardiosignal fragment sequence;

step 2.4, selecting a position point corresponding to the maximum amplitude value in each electrocardiosignal segment sequence to obtain a candidate R peak position point set;

and 2.5, obtaining an R peak position point set according to the candidate R peak position point set.

Specifically, the step 2.5 includes:

step 2.5.1, calculating a horizontal distance value between two adjacent R peak position points in the candidate R peak position point set to obtain a plurality of RR intervals, wherein each RR interval corresponds to two R peak position points;

step 2.5.2, find in RR interval sequence greater than first threshold THRrr1Finding a section of missed electrocardiosignal subsequence corresponding to the RR interval in the electrocardiosignal sequence; repeatedly executing the step until all the missed electrocardiosignal subsequences are found; wherein the first threshold THRrr11.0 fs, fs is the electrocardiosignal sampling rate and the unit is Hz;

step 2.5.3, in each section of missed detection electrocardiosignal subsequence, taking a position point corresponding to the maximum amplitude value as a new R peak position point, and adding the position point into a candidate R peak position point set to obtain a new candidate R peak position point sequence after inserting the missed detection point;

step 2.5.4, calculating a horizontal distance value between two adjacent R peak position points in the new candidate R peak position point set to obtain a plurality of new RR intervals, wherein each new RR interval corresponds to two R peak position points;

step 2.5.5, find less than second threshold THR in the new RR interval sequencerr2Finding two corresponding R peak position points on the electrocardiosignal sequence to obtain a plurality of primary error detection R peak position points; repeatedly executing the step until all the primary selection false detection R peak position points are found; wherein the second threshold THRrr2Fs is 0.6 x fs, fs is the electrocardiosignal sampling rate and has the unit of Hz;

and 2.5.6, comparing the amplitudes of the two R peak position points corresponding to the new RR interphase smaller than the second threshold, deleting the false detection R peak position points corresponding to the points with smaller amplitudes, and obtaining a new R peak position point set after the false detection points are removed, thereby obtaining a finally determined R peak position point set.

Specifically, the step 3 includes:

step 3.1, calculating a horizontal distance value between two adjacent R peak position points in the R peak position point set to obtain an RR interval;

step 3.2, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing backward according to the T wave position characteristics and the time length to obtain a preselected T wave fragment sequence;

step 3.3, Riemann and S from R peak to S peak are calculatedRSRiemann and S of a preselected T-wave segment sequenceTAnd the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the pre-selected T wave segment sequences; comparing S with SRSIf S is large or small>SRSIf the T wave is a forward wave; if S<SRSIf the T wave is the inverted wave, the T wave is the inverted wave;

step 3.4, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of T peak search intervals; if the T wave is a forward wave, detecting a position point corresponding to the maximum amplitude value in each search interval by using a maximum value method to obtain a plurality of T peak position points; if the T wave is an inverted wave, detecting a position point corresponding to the minimum amplitude value in each search interval by using a minimum value method to obtain a plurality of T peak position points; and finally obtaining a T peak position point set.

Specifically, the search interval for windowing in step 3.2 is [ Rv+t1×fs,Rv+t1×fs+N]Wherein R isvDenotes the R peak position point, N denotes the length of the preselected T band, and N ═ T0X fs, fs is the sampling rate in Hz, t0∈(0.05,0.10),t1E (0.15,0.25) in s.

Specifically, the step 3.3 includes:

step 3.3.1, in the R peak position point set, taking each R peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of S peak search intervals, detecting a position point corresponding to a minimum amplitude value in each S peak search interval by using a minimum value method to obtain a plurality of S peak position points, and further obtaining an S peak position point set; the S peak search interval in step 3.3.1 is [ R ]v,Rv+ts×fs]Wherein R isvDenotes the R peak position point, tsE (0.06,0.16), with the unit of s, fs is the sampling rate, and the unit is Hz;

step 3.3.2, calculate the R peak toRiemann of S Peak and SRSRiemann sum S of preselected T bandT

Wherein the content of the first and second substances,the number of subintervals divided in the electrocardio segment sequence corresponding to the R peak to the S peak is taken as the number of sample points, delta XRSjIs the length of the jth subinterval of the electrocardio segment sequence corresponding to the R peak to the S peak, FRSjIts corresponding amplitude value;

wherein the content of the first and second substances,m is the number of subintervals divided in the sequence of preselected T-wave segments, where the number of sample points, Δ X, is takenTjIs the length of the jth subinterval of the electrocardio segment sequence corresponding to the preselected T wave plate segment sequence, FTjIts corresponding amplitude value;

step 3.3.3, calculating the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the preselected T wave segment sequence; wherein S is SRS+ST

Step 3.3.4, compare S with SRSIf S is large or small>SRSIf the T wave is a forward wave; if S<SRSAnd the T wave is an inverted wave.

Specifically, the T peak search interval in step 3.4 isWherein R isvThe R peak position point is shown, and RR is RR interval.

Specifically, the step 4 includes:

step 4.1, finding each T peak position point in the T peak position point set obtained in the step 3 in the preprocessed electrocardiosignal sequence, taking each T peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of first search intervals, detecting a position point corresponding to an inflection point in each first search interval by using a derivation method, and obtaining an ith T wave end point candidate position point T (i);

step 4.2, judging whether the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than a threshold value THR, wherein THR is a positive number and the unit is a position point;

if the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than the threshold THR, taking the unit as the number of position points, taking the ith T wave endpoint candidate position point as a starting point, carrying out windowing backwards to obtain a plurality of second search intervals, detecting an inflection point position point in each second search interval by using a derivation method, and calculating an amplitude corresponding to the inflection point position point; if the T wave is a forward wave, taking an inflection point position point with the minimum amplitude and the horizontal distance between the second search interval and the T peak larger than a threshold THR as an ith T wave end point modified position point; if the T wave is an inverted wave, taking an inflection point position point with the maximum amplitude and the horizontal distance between the second search interval and the T peak larger than a threshold THR as an ith T wave end point modified position point; otherwise, taking the ith T-wave terminal point candidate position point as the position point after the ith T-wave terminal point correction;

and 4.3, repeatedly executing the steps 4.1-4.2 until all the position points after the T wave end point correction are obtained, and obtaining a T wave end point position point set.

Specifically, in step 4.1, the first search interval is [ Tv,Tv+t2*fs]Wherein T isvDenotes the T peak position point, T2E (0.1,0.2) in units of s, fs representing the electrocardiosignal sampling rate in units of Hz.

10. The method according to claim 8, wherein in step 4.2, the threshold THR ═ T is set as T, and the end point is automatically detected3Fs, wherein fs represents the rate of sampling of the cardiac signal, t3E (0.05,0.1) and the unit is s; the second search interval in step 4.2 is [ T ]end(i),Tend(i)+t4*fs]Wherein T isend(i) Indicates the ith candidate T wave end point, T4E (0.1,0.15) in s.

Compared with the prior art, the invention has the beneficial technical effects that:

1. the invention provides an efficient self-adaptive electrocardiosignal T peak automatic detection method, which takes an R peak as a starting point, integrates a window search method, an extreme method, a Riemann sum method and other methods, and completes the detection of the T peak based on the time domain change characteristics of electrocardiosignals, and the method has low calculation complexity and realizes the improvement of the real-time performance of the detection method; further, aiming at the electrocardiosignals with abnormal T wave inversion, low flatness, high sharpness and the like, the electrocardiosignals are corrected by false detection according to the local change trend and waveform characteristics of the T wave of the electrocardiosignals so as to finally determine the accurate position of the T peak, and the method greatly improves the detection accuracy rate; the dynamic threshold in the method is set for each current electrocardiosignal sequence (namely, the threshold is different for different electrocardiosignals), so that the method has strong self-adaptability;

2. the method takes the T peak as a reference, integrates methods such as a derivation method, a windowing search method and a threshold value method, effectively avoids the defects of repeated search, complex calculation, poor robustness and the like, and further improves the accuracy and the real-time performance of the detection of the electrocardiosignals with the burr phenomenon. In addition, the method is easy to be popularized and applied to automatic detection of start and stop points of other characteristic waves of the electrocardiosignals.

Drawings

Fig. 1 is a comparison diagram before and after denoising of an electrocardiographic signal according to an embodiment of the present invention.

FIG. 2 is a schematic diagram of missed R peak locations provided in an embodiment of the present invention.

Fig. 3 is a schematic diagram of the detection position of the R peak obtained after inserting the missing detection R peak position point provided in one embodiment of the present invention.

Fig. 4 is a schematic diagram of the false detection R peak position point provided in an embodiment of the present invention.

Fig. 5 is a schematic diagram of the detection position of the R peak obtained after the false detection R peak position point is removed in one embodiment of the present invention.

Fig. 6 is a schematic diagram of the detection results of the R peak and the S peak provided in one embodiment of the present invention.

Fig. 7 is a schematic diagram of the positive T peak detection result provided in one embodiment of the present invention.

Fig. 8 is a schematic diagram of inverted T peak detection results provided in one embodiment of the present invention.

FIG. 9 is a graphical representation of the low flat T peak detection results provided in one embodiment of the present invention.

Fig. 10 is a schematic diagram of the detection result of the high sharp T peak provided in one embodiment of the present invention.

Fig. 11 is a schematic diagram of forward T-wave endpoint false detection provided in an embodiment of the present invention.

Fig. 12 is a schematic diagram of the forward T-wave endpoint false detection correction provided in an embodiment of the present invention.

FIG. 13 is a schematic diagram of inverted T-wave endpoint false detection provided in an embodiment of the present invention.

FIG. 14 is a schematic diagram of the inverted T-wave endpoint false detection correction provided in one embodiment of the present invention.

FIG. 15 is a schematic diagram of a characteristic wave of an electrocardiographic signal.

Detailed Description

In accordance with the above technical solutions, the following drawings and detailed description are used to specifically describe the present invention, and it should be noted that the present invention is not limited to the following specific embodiments, and all equivalent changes based on the technical solutions of the present application fall into the protection scope of the present invention.

The following definitions or conceptual connotations relating to the present invention are provided for illustration:

QRS complex: as shown in fig. 15, the QRS complex is a group of closely connected complexes consisting of 3 waves of downward Q wave, upward R wave and downward S wave, and the time width is 0.06-0.1S.

R wave, R peak, S wave, S peak: as shown in fig. 15, the R wave is the first highest positive wave in the QRS complex, and the R peak is the peak value of the R wave; the S wave is the first negative wave after the R wave, and the S peak is the wave peak value of the S wave.

T wave: as shown in fig. 15, the T wave is a blunt circular wave with a lower amplitude and a longer wave width after the R wave, and represents the repolarization of the ventricle, the time width of the T wave is 0.05s to 0.25s, and the voltage amplitude is not lower than 1/10 of the R wave in the same lead.

T peak: the T peak is the peak of the T wave, which is located after the R peak as shown in fig. 15.

Baseline drift frequency distribution range: 0.15Hz to 2Hz, and is mainly distributed at 0.15 Hz.

Power frequency interference frequency distribution range: 50/60 Hz.

In the embodiment of the present invention, forward from a certain position point refers to a direction opposite to the sampling direction of the electrocardiographic signal, and backward refers to a direction the same as the sampling direction of the electrocardiographic signal.

The invention discloses an automatic detection method for electrocardiosignal T waves and end points thereof, which comprises the following steps:

step 1, preprocessing an electrocardiosignal sequence to be detected to obtain a preprocessed electrocardiosignal sequence with noise removed;

in this step, common methods for preprocessing the electrocardiographic signal include a digital band-pass filter, empirical mode decomposition, wavelet decomposition, and the like. In order to improve the denoising performance, the invention adopts a wavelet decomposition method, selects different wavelet basis functions such as db4, Haar, sym8, coif5 and the like to carry out a plurality of experiments, combines the characteristics of noise contained in the electrocardiosignals, takes a signal-to-noise ratio (SNR) and a minimum Mean Square Error (MSE) as evaluation indexes, and finally selects a coif5 wavelet basis function to remove baseline drift, electromyographic interference and power frequency interference in the electrocardiosignals.

Optionally, step 1 specifically includes:

step 1.1, performing wavelet decomposition on an electrocardiosignal sequence to be detected to obtain J-layer signals, wherein the number of decomposition layers is J, and J is more than or equal to 2; obtaining J-layer signals, wherein each layer signal comprises a plurality of subband signals;

step 1.2, selecting a layer where the electrocardiosignal base line is located according to the base line drift frequency range of the electrocardiosignal, calculating the base line of the electrocardiosignal, further removing the base line drift, and reconstructing the electrocardiosignal to obtain an electrocardiosignal sequence after the base line drift is removed;

and step 1.3, denoising the electrocardiosignal sequence with the baseline drift removed by using a wavelet soft threshold method according to the frequency ranges of the electromyographic interference and the power frequency interference to obtain the preprocessed electrocardiosignal sequence.

In this embodiment, before and after denoising the electrocardiographic signal, for example, as shown in fig. 1, first, baseline wander removal processing is performed on the electrocardiographic signal sequence to be detected in fig. 1(a) to obtain the electrocardiographic signal sequence after baseline wander removal shown in fig. 1(b), and then, denoising is performed on the electrocardiographic signal sequence after baseline wander removal to obtain the denoised electrocardiographic signal sequence shown in fig. 1 (c).

Step 2, obtaining a plurality of R peak position points from the preprocessed electrocardiosignal sequence to obtain an R peak position point set, and specifically executing the following steps:

step 2.1, decomposing the preprocessed electrocardiosignal sequence by adopting wavelet transform to obtain a plurality of decomposition layers; selecting a wavelet coefficient corresponding to a decomposition layer according to the frequency band range of the QRS complex, and reconstructing a signal of the decomposition layer according to the wavelet coefficient to obtain a reconstructed electrocardiosignal sequence;

2.2, selecting an edge wave peak point of the reconstructed electrocardiosignal sequence, and fitting the edge wave peak point by a curve fitting method to obtain a fitted electrocardiosignal sequence; in the fitted electrocardiosignal sequence, calculating all local extreme points in the fitted electrocardiosignal sequence by using a mode maximum method to obtain a local extreme point set;

step 2.3, in the local extreme point set, taking the local extreme point as a center, windowing the reconstructed electrocardiosignal sequence to obtain an electrocardiosignal fragment sequence;

step 2.4, selecting a position point corresponding to the maximum amplitude value in each electrocardiosignal segment sequence to obtain a candidate R peak position point set;

step 2.5, obtaining an R peak position point set according to the candidate R peak position point set;

optionally, step 2.5 specifically includes:

step 2.5.1, calculating a horizontal distance value between two adjacent R peak position points in the candidate R peak position point set to obtain a plurality of RR intervals, wherein each RR interval corresponds to two R peak position points;

step 2.5.2, find in RR interval sequence greater than first threshold THRrr1Finding a section of missed electrocardiosignal subsequence corresponding to the RR interval in the electrocardiosignal sequence; repeatedly executing the step until all the missed electrocardiosignal subsequences are found;

wherein the first threshold THRrr11.0 fs, fs is the electrocardiosignal sampling rate and the unit is Hz;

step 2.5.3, in each section of missed detection electrocardiosignal subsequence, taking a position point corresponding to the maximum amplitude value as a new R peak position point, and adding the position point into a candidate R peak position point set to obtain a new candidate R peak position point sequence after inserting the missed detection point;

step 2.5.4, calculating a horizontal distance value between two adjacent R peak position points in the new candidate R peak position point set to obtain a plurality of new RR intervals, wherein each new RR interval corresponds to two R peak position points;

step 2.5.5, find less than second threshold THR in the new RR interval sequencerr2Finding two corresponding R peak position points on the electrocardiosignal sequence to obtain a plurality of primary error detection R peak position points; repeatedly executing the step until all the primary selection false detection R peak position points are found;

wherein the second threshold THRrr2Fs is 0.6 x fs, fs is the electrocardiosignal sampling rate and has the unit of Hz;

step 2.5.6, comparing the amplitudes of two R peak position points corresponding to the new RR interphase smaller than the second threshold, deleting the false detection R peak position points corresponding to the points with smaller amplitudes, and obtaining a new R peak position point set after the false detection points are removed; and obtaining a finally determined R peak position point set.

In this embodiment, as shown in fig. 2, a schematic diagram of all R peak position points in a candidate R peak position point set in an electrocardiographic signal is obtained, and a signal point corresponding to a circle point in the diagram is an R peak position point. And calculating the horizontal distance between two adjacent R peaks to obtain a plurality of RR intervals. In this embodiment, the RR interval between the 1 st R peak position point and the 2 nd R peak position point is 1535, which is greater than the first threshold 1000, and indicates that there is a missing R peak position point between the 1 st R peak position point and the 2 nd R peak position point, and the electrocardiograph signal segment included in the 1 st RR interval formed by the two R peaks is used as a missing R peak electrocardiograph signal subsequence;

and searching a position point corresponding to the maximum amplitude in the missing detection R peak electrocardiosignal subsequence, taking the position point as a new candidate R peak position point, inserting the position point into the original candidate R peak position point sequence, and obtaining a new candidate R peak position point set after inserting the missing detection point as shown in figure 3.

In this embodiment, as shown in fig. 4, a schematic diagram of all candidate R peak position points in a new candidate R peak position point set in an electrocardiographic signal is obtained, and a signal point corresponding to a circle point in the diagram is an R peak position point. And calculating the horizontal distance between two adjacent R peaks to obtain a plurality of RR intervals. In this embodiment, the RR interval between the 5 th R peak and the 6 th R peak is 468, which is smaller than the second threshold 600, indicating that the 5 th R peak position point and the 6 th R peak position point may be false detection R peak position points. Comparing the amplitudes of the 5R peak position points and the 6 th R peak position point, the result shows that the amplitude of the 6 th R peak position point is smaller than the amplitudes of the 5R peak position points, so that the 6 th R peak position point is the determined false detection R peak position point, and is removed, and the corrected false detection missing R peak position point set shown in FIG. 5 is obtained.

Step 3, obtaining each T peak position point by using an extreme value principle according to each R peak position point in the R peak position point set obtained in the step 2, so as to obtain the T peak position point set, and specifically executing the following steps:

step 3.1, calculating a horizontal distance value between two adjacent R peak position points in the R peak position point set to obtain an RR interval;

step 3.2, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing backward according to the T wave position characteristics and the time length to obtain a preselected T wave fragment sequence;

step 3.3, Riemann and S from R peak to S peak are calculatedRSRiemann and S of a preselected T-wave segment sequenceTAnd the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the pre-selected T wave segment sequences; judging whether T wave is inverted or not, and comparing S with SRSIf S is large or small>SRSIf the T wave is a forward wave; if S<SRSIf the T wave is the inverted wave, the T wave is the inverted wave;

step 3.4, in the R peak position point set, taking each R peak position point as a starting point, and carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of T peak search intervals; if the T wave is a forward wave, detecting a position point corresponding to the maximum amplitude value in each search interval by using a maximum value method to obtain a plurality of T peak position points; if the T wave is an inverted wave, detecting a position point corresponding to the minimum amplitude value in each search interval by using a minimum value method to obtain a plurality of T peak position points; and finally obtaining a T peak position point set.

Optionally, the search interval in step 3.2 is [ Rv+t1×fs,Rv+t1×fs+N]Wherein R isvDenotes the R peak position point, N denotes the length of the preselected T band, and N ═ T0X fs, fs is the sampling rate in Hz, t0∈(0.05,0.10),t1E (0.15,0.25) in s.

Optionally, the step 3.3 of determining whether the T wave is inverted specifically includes:

step 3.3.1, in the R peak position point set, taking each R peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of S peak search intervals, detecting a position point corresponding to a minimum amplitude value in each search interval by using a minimum value method to obtain a plurality of S peak position points, and further obtaining an S peak position point set;

step 3.3.2, Riemann and S from R peak to S peak are calculatedRSRiemann sum S of preselected T bandT

Wherein the content of the first and second substances,the number of subintervals divided in the electrocardio segment sequence corresponding to the R peak to the S peak is taken as the number of sample points, delta XRSjIs the length of the jth subinterval of the electrocardio segment sequence corresponding to the R peak to the S peak, FRSjIts corresponding amplitude value;

wherein the content of the first and second substances,m is the number of subintervals divided in the sequence of preselected T-wave segments, where the number of sample points, Δ X, is takenTjIs the length of the jth subinterval of the electrocardio segment sequence corresponding to the preselected T wave plate segment sequence, FTjIts corresponding amplitude value;

step (ii) of3.3.3, calculating the total Riemann and S of the electrocardio segment sequences from the R peak to the S peak and the preselected T wave segment sequence; wherein S is SRS+ST

Step 3.3.4, compare S with SRSIf S is large or small>SRSIf the T wave is a forward wave; if S<SRSAnd the T wave is an inverted wave.

Optionally, the S peak search interval in step 3.3.1 is [ Rv,Rv+ts×fs]Wherein R isvDenotes the R peak position point, tsE (0.06,0.16) in units of s, fs in sampling rate, Hz.

Optionally, the T peak search interval in step 3.4 isWherein R isvThe R peak position point is shown, and RR represents RR interval.

In this embodiment, all the R peaks and S peaks in the electrocardiographic signal are obtained as shown in fig. 6, the dots in the figure represent the R peak position points obtained in step 2, and the hexagram represents the S peak position points.

In this embodiment, all R peaks and positive T peaks in the electrocardiographic signal are obtained as shown in fig. 7, a dot in the graph represents the position point of the R peak obtained in step 2, and a diamond represents the position point of the T peak. In this embodiment, the R peak to S peak Riemann and S are calculated for each cardiac cycleRSPreselecting the T-wave plate segment sequence Riemann sum STAnd their overall Riemann sum S, comparison SRSAnd S, both have S>SRSTherefore, a window is added after the R peak to search for a maximum to detect the T peak.

In this embodiment, all R peaks and inverted T peaks in the electrocardiographic signal are obtained as shown in fig. 8, a dot in the graph represents the R peak position point obtained in step 2, and a diamond represents the T peak position point. In this embodiment, the R peak to S peak Riemann and S are calculated for each cardiac cycleRSPreselection of the T-band Riemann sum STAnd their overall Riemann sum S, comparison SRSAnd S, both have S<SRSTherefore, the T peak is detected by windowing and searching the minimum value after the R peak.

In this embodiment, all of the R peak, the low flat T peak (fig. 9) and the high sharp T peak (fig. 10) in the electrocardiographic signal are obtained as shown in fig. 9-10, the dots in the graph represent the position points of the R peak obtained in step 2, and the diamonds represent the position points of the T peak.

Step 4, obtaining each T wave end point position point by an inflection point search method according to each T peak position point in the T peak position point set obtained in the step 3, so as to obtain a T wave end point position point set, and specifically executing the following steps:

step 4.1, finding each T peak position point in the T peak position point set obtained in the step 3 in the preprocessed electrocardiosignal sequence, taking each T peak position point as a starting point, carrying out windowing processing on the preprocessed electrocardiosignal sequence backwards to obtain a plurality of first search intervals, detecting a position point corresponding to an inflection point in each first search interval by using a derivation method, and obtaining an ith T wave end point candidate position point T (i);

step 4.2, judging whether the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than a threshold value THR, wherein THR is a positive number and the unit is a position point;

(1) if the horizontal distance between the ith T wave endpoint candidate position point and the ith T peak is smaller than the threshold THR, taking the unit as the number of position points, taking the ith T wave endpoint candidate position point as a starting point, carrying out windowing backwards to obtain a plurality of second search intervals, detecting an inflection point position point in each second search interval by using a derivation method, and calculating the amplitude corresponding to the inflection point position point. If the T wave is a forward wave, taking an inflection point position point with the minimum amplitude and the horizontal distance between the second search interval and the T peak larger than a threshold THR as an ith T wave end point modified position point; and if the T wave is an inverted wave, taking the inflection point position point with the maximum amplitude and the horizontal distance between the inflection point position point and the T peak in the second search interval larger than the threshold THR as the position point after the ith T wave end point is corrected.

(2) Otherwise, taking the ith T-wave end point candidate position point as the position point after the ith T-wave end point correction.

And 4.3, repeatedly executing the steps 4.1-4.2 until all the position points after the T wave end point correction are obtained, and obtaining a T wave end point position point set.

OptionallyAnd the first T wave end point search interval in the step 4.1 is [ T ]v,Tv+t2*fs]Wherein T isvDenotes the T peak position point, T2E (0.1,0.2) in units of s, fs representing the electrocardiosignal sampling rate in units of Hz.

Optionally, the threshold THR ═ t in step 4.23Fs, wherein fs represents the rate of sampling of the cardiac signal, t3E (0.05,0.1) and the unit is s;

optionally, the second T-wave endpoint search interval in step 4.2 is [ Tend(i),Tend(i)+t4*fs]Wherein T isend(i) Indicates the ith candidate T wave end point, T4E (0.1,0.15) in s.

In this embodiment, as shown in fig. 11 (the T wave is a forward wave) and fig. 13 (the T wave is an inverted wave), positions of end points of all candidate T waves are obtained, a dot in the figure represents a position point of the R peak obtained in step 2, a diamond represents a position point of the T peak obtained in step 3, and the first star on the right side of the T peak is a position point of the end point of the candidate T wave.

In this embodiment, as shown in fig. 12 (the T wave is a forward wave) and fig. 14 (the T wave is an inverted wave), positions of all final T-wave end points are obtained, in the figure, a diamond represents a T-peak position point obtained in step 3, a first star on the right side of the T-peak is a candidate T-wave end point, and a first triangle on the right side of the T-peak is a T-wave end point finally determined after correction. And calculating the horizontal distance between the candidate T wave terminal point and the T peak, and comparing the horizontal distance with the threshold THR. In fig. 12, the horizontal distance between the 1 st candidate T-wave end point and the 1 st T-peak is 52, and the horizontal distance between the 2 nd candidate T-wave end point and the 2 nd T-peak is 40, which is smaller than the threshold 80, and therefore the T-wave end point is considered as a false detection point. Then, taking the candidate T wave terminal point as a starting point, searching a rear windowing, performing secondary windowing correction, and selecting an inflection point position point with the smallest amplitude as a corrected T wave terminal point, wherein the horizontal distance between the second search window and the T peak is greater than a threshold THR; in fig. 14, the horizontal distance between the 1 st candidate T-wave end point and the 1 st T-peak is 43, and the horizontal distance between the 2 nd candidate T-wave end point and the 2 nd T-peak is 56, which is smaller than the threshold 80, and therefore the T-wave end point is considered as a false detection point. And then searching a backward windowing by taking the candidate T wave end point as a starting point, carrying out secondary windowing correction, and selecting an inflection point position point with the maximum amplitude and the horizontal distance between the second search window and the T peak to be greater than a threshold THR as a corrected T wave end point.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种心血管监测可穿戴设备及其使用方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!