Electrocardiogram characteristic starting point and end point detection method, system, device and medium

文档序号:1958722 发布日期:2021-12-14 浏览:19次 中文

阅读说明:本技术 一种心电图特征起点和终点检测方法、系统、装置及介质 (Electrocardiogram characteristic starting point and end point detection method, system, device and medium ) 是由 李桂香 许为康 徐飞 谭仲威 唐元梁 雷鹏 姚立平 于 2021-08-17 设计创作,主要内容包括:本发明提供的一种心电图特征起点和终点检测方法、系统、装置及介质,方法包括获取心电数据,对所述心电数据进行去噪处理得到第一滤波信号;对所述第一滤波信号进行分解,将分解后的信号富集得到若干子波;根据QRS复合波特征以及心电图时域特征,通过若干有限区域窗确定所述子波的位置与峰值;根据所述峰值与所述有限区域窗中的点的斜率,根据所述斜率绝对最值定位得到所述子波的起点以及终点;方法可以实现对心电图特征波的起点和终点的准确检测,方法能够便于准确地提取心电诊断需要的时间和幅值特征,为心电的诊断和心电自动诊断系统研发及相关疾病的识别诊断提供基础,因此可广泛应用于心电数据处理技术领域。(The invention provides a method, a system, a device and a medium for detecting an electrocardiogram characteristic starting point and an electrocardiogram characteristic end point, wherein the method comprises the steps of obtaining electrocardiogram data, and carrying out denoising processing on the electrocardiogram data to obtain a first filtering signal; decomposing the first filtering signal, and enriching the decomposed signal to obtain a plurality of wavelets; determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics; according to the slope of the peak value and the point in the limited area window, positioning according to the absolute maximum of the slope to obtain the starting point and the end point of the wavelet; the method can accurately detect the starting point and the end point of the characteristic wave of the electrocardiogram, can conveniently and accurately extract the time and amplitude characteristics required by the electrocardiogram diagnosis, provides a basis for the development of the electrocardiogram diagnosis and the electrocardiogram automatic diagnosis system and the identification and diagnosis of related diseases, and can be widely applied to the technical field of electrocardiogram data processing.)

1. A method for detecting an electrocardiogram characteristic starting point and an electrocardiogram characteristic end point is characterized by comprising the following steps:

acquiring electrocardiogram data, and carrying out denoising processing on the electrocardiogram data to obtain a first filtering signal;

decomposing the first filtering signal, and enriching the decomposed signal to obtain a plurality of wavelets;

determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

calculating the slope of the peak value and a point in the finite region window, and primarily positioning according to the absolute maximum of the slope to obtain a starting point and an end point of the wavelet;

and correcting the starting point and the end point of the wavelet by adopting the limited region window and a preset threshold according to the time domain characteristics of the wavelet.

2. The method of claim 1, wherein before the step of determining the location and peak of said wavelet through several finite region windows based on the QRS complex features and the time domain features of the electrocardiogram, the method further comprises the steps of:

determining a window threshold value of the limited region window, and determining an amplitude threshold value of the wavelet;

and deleting false detection values in the wavelets according to the window threshold and the amplitude threshold.

3. The method of claim 2, wherein said wavelets include R-waves, Q-waves, S-waves, P-waves and T-waves;

the method comprises the following steps of determining the positions and peak values of the wavelets through a plurality of limited region windows according to QRS complex wave characteristics and electrocardiogram time domain characteristics, wherein the steps comprise:

according to the QRS complex characteristics, determining the R wave position and the R wave peak value according to the absolute maximum value in a first finite region window;

setting a second finite region window according to the R wave position, and determining a Q wave position, a Q wave peak value, an S wave position and an S wave peak value according to an absolute maximum value in the second finite region window;

setting a third finite area window according to the electrocardiogram time domain characteristics and the Q wave position, and positioning according to an absolute maximum value in the third finite area window to obtain a P wave position and a P wave peak value;

and setting a fourth limited area window according to the electrocardiogram time domain characteristics and the S wave position, and positioning according to the absolute maximum value in the fourth limited area window to obtain the T wave position and the T wave peak value.

4. The method as claimed in claim 3, wherein when said wavelet is P-wave, said initial positioning according to the absolute maximum of said slope is used to obtain the start point and end point of said wavelet, which comprises the following steps:

setting a fifth finite area window by taking the P wave position as a base point;

calculating the slope between the point in the fifth finite area window and the P wave peak value point, and positioning according to the absolute maximum value of the slope to obtain a P wave starting point and a P wave terminal point;

and correcting the P wave starting point and the P wave end point according to the amplitude threshold value.

5. The method as claimed in claim 3, wherein when said wavelet is T-wave, the initial location according to the absolute maximum of said slope is used to obtain the start point and end point of said wavelet, which comprises the following steps:

setting a sixth finite area window by taking the T wave position as a base point;

calculating the slope between the point in the sixth finite area window and the T wave peak value point, and positioning according to the absolute maximum value of the slope to obtain a T wave starting point and a T wave terminal point;

and correcting the T wave starting point and the T wave end point according to the amplitude threshold value.

6. The method as claimed in claim 3, wherein when said wavelet is a QRS complex composed of R wave, Q wave and S wave, said initial positioning according to the absolute maximum of said slope is used to obtain the start point and end point of said wavelet, comprising the following steps:

setting a seventh finite area window by taking the Q wave position as a base point;

calculating the slope of the point in the seventh finite area window and the Q wave peak point, and positioning according to the absolute maximum value of the slope to obtain the starting point of the QRS complex;

setting an eighth finite area window by taking the S wave position as a base point;

and calculating the slope of the point in the eighth finite area window and the S wave peak point, and positioning according to the absolute maximum value of the slope to obtain the end point of the QRS complex.

7. The method as claimed in claim 6, wherein said preliminary positioning according to the absolute maximum of the slope is used to obtain the start point and the end point of the wavelet, further comprising the following steps:

and correcting the starting point of the QRS complex and the end point of the QRS complex according to the window threshold and the amplitude threshold.

8. An electrocardiogram feature start and end point detection system, comprising:

the signal acquisition unit is used for acquiring the electrocardio data and carrying out denoising processing on the electrocardio data to obtain a first filtering signal;

the signal decomposition unit is used for decomposing the first filtering signal and enriching the decomposed signal to obtain a plurality of wavelets; the characteristic extraction unit is used for determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

and the waveform positioning unit is used for carrying out primary positioning according to the absolute maximum and minimum of the slope of the peak value and the midpoint of the limited region window to obtain the starting point and the end point of the wavelet.

9. An electrocardiogram feature start and end point detection device, comprising:

at least one processor;

at least one memory for storing at least one program;

when executed by the at least one processor, cause the at least one processor to perform a method for electrocardiographic feature start and end point detection according to any one of claims 1-7.

10. A storage medium having stored therein a processor-executable program, wherein the processor-executable program, when executed by a processor, is configured to execute a method for detecting a start point and an end point of an electrocardiogram feature according to any one of claims 1-7.

Technical Field

The invention relates to the technical field of electrocardiogram data processing, in particular to a method, a system, a device and a medium for detecting an electrocardiogram characteristic starting point and an electrocardiogram characteristic end point.

Background

Electrocardiography (ECG) analysis is one of the most commonly used examinations in the prevention of heart diseases, and can also help doctors diagnose heart vascular diseases such as arrhythmia, myocardial ischemia, and myocardial infarction. The time characteristic and the amplitude characteristic of the electrocardiogram characteristic wave are the main basis of clinical diagnosis. The accurate extraction of characteristic waves such as P, Q, R, S, T waves and the like in the electrocardiosignals and the starting point and the end point thereof is the premise of extracting diagnosis indexes such as electrocardio time and amplitude characteristics and the like. Currently, most of the characteristic wave detection is only limited to the identification of the characteristic wave. In the characteristic wave detection, the R wave detection is the premise of all characteristic wave detection, and the accuracy of the R wave detection directly influences the detection of other characteristic waves, so that the extraction accuracy of time and amplitude characteristics is influenced. After R waves and other characteristic waves are accurately detected and identified, the reliable detection of the starting point and the end point of the characteristic waves is always a difficult problem due to the complicated types of electrocardiograms with arrhythmia and the tiny and changeable amplitudes of the electrocardio characteristic waves. At present, most of methods for detecting a starting point and an end point of a characteristic wave aim at detecting a single characteristic wave starting point, and mainly comprise a derivative method and a local search threshold method based on a characteristic wave peak value.

The scheme of extracting the start point and the end point of the characteristic wave of the electrocardiogram at present is basically to extract the start point and the end point of a single characteristic wave, and the detection of the start point and the end point of all the characteristic waves cannot be realized, and the adopted derivation method or the local search threshold value method can cause error detection because the characteristic wave of the arrhythmia electrocardiogram may have abnormal forms such as double peaks and the like, and the accuracy of the start point and the end point of the characteristic wave obtained by detection is influenced, and further the extraction of time and amplitude characteristics is influenced.

Disclosure of Invention

In view of the above, to at least partially solve one of the above technical problems, embodiments of the present invention provide a method for detecting a start point and an end point of an electrocardiogram feature, which has a higher accuracy and a faster response speed, and a system, an apparatus and a storage medium capable of implementing the method.

In a first aspect, the present application provides a method for detecting an electrocardiogram feature start point and end point, which includes the steps of:

acquiring electrocardiogram data, and carrying out denoising processing on the electrocardiogram data to obtain a first filtering signal;

decomposing the first filtering signal, and enriching the decomposed signal to obtain a plurality of wavelets;

determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

calculating the slope of the peak value and the midpoint of the limited region window, and primarily positioning according to the absolute maximum of the slope to obtain the starting point and the end point of the wavelet;

and correcting the starting point and the end point of the wavelet by adopting the limited region window and a preset threshold according to the time domain characteristics of the wavelet.

In a possible embodiment of the solution of the present application, before the step of determining the location and peak of the wavelet through several finite area windows based on the QRS complex feature and the time domain feature of the electrocardiogram, the method further comprises the following steps:

determining a window threshold value of the limited region window, and determining an amplitude threshold value of the wavelet;

and deleting false detection values in the wavelets according to the window threshold and the amplitude threshold.

In one possible embodiment of the present disclosure, the wavelets include R-waves, Q-waves, S-waves, P-waves, and T-waves;

the method comprises the following steps of determining the positions and peak values of the wavelets through a plurality of limited region windows according to QRS complex wave characteristics and electrocardiogram time domain characteristics, wherein the steps comprise:

according to the QRS complex characteristics, determining the R wave position and the R wave peak value according to the absolute maximum value in a first finite region window;

setting a second finite region window according to the R wave position, and determining a Q wave position, a Q wave peak value, an S wave position and an S wave peak value according to an absolute maximum value in the second finite region window;

setting a third finite area window according to the electrocardiogram time domain characteristics and the Q wave position, and positioning according to an absolute maximum value in the third finite area window to obtain a P wave position and a P wave peak value;

and setting a fourth limited area window according to the electrocardiogram time domain characteristics and the S wave position, and positioning according to the absolute maximum value in the fourth limited area window to obtain the T wave position and the T wave peak value.

In a possible embodiment of the present application, when the wavelet is a P-wave, the preliminary positioning according to the absolute maximum of the slope to obtain the start point and the end point of the wavelet includes the following steps:

setting a fifth finite area window by taking the P wave position as a base point;

calculating the slope between the point in the fifth finite area window and the P wave peak value point, and positioning according to the absolute maximum value of the slope to obtain a P wave starting point and a P wave terminal point;

and correcting the P wave starting point and the P wave end point according to the amplitude threshold value.

In a possible embodiment of the present application, when the wavelet is a T-wave, the initial point and the end point of the wavelet are obtained by performing preliminary positioning according to the absolute maximum of the slope, which includes the following steps:

setting a sixth finite area window by taking the T wave position as a base point;

calculating the slope between the point in the sixth finite area window and the T wave peak value point, and positioning according to the absolute maximum value of the slope to obtain a T wave starting point and a T wave terminal point;

and correcting the T wave starting point and the T wave end point according to the amplitude threshold value.

In a possible embodiment of the present disclosure, when the wavelet is a QRS complex composed of an R wave, a Q wave, and an S wave, the preliminary positioning according to the absolute maximum of the slope to obtain the start point and the end point of the wavelet includes the following steps:

setting a seventh finite area window by taking the Q wave position as a base point;

calculating the slope of the point in the seventh finite area window and the Q wave peak point, and positioning according to the absolute maximum value of the slope to obtain the starting point of the QRS complex;

setting an eighth finite area window by taking the S wave position as a base point;

and calculating the slope of the point in the eighth finite area window and the S wave peak point, and positioning according to the absolute maximum value of the slope to obtain the end point of the QRS complex.

In a possible embodiment of the present disclosure, the preliminary positioning according to the absolute maximum of the slope to obtain the start point and the end point of the wavelet further includes the following steps:

and correcting the starting point of the QRS complex and the end point of the QRS complex according to the window threshold and the amplitude threshold.

In a second aspect, the present invention further provides an electrocardiogram characteristic start point and end point detection system, which includes:

the signal acquisition unit is used for acquiring the electrocardio data and carrying out denoising processing on the electrocardio data to obtain a first filtering signal;

the signal decomposition unit is used for decomposing the first filtering signal and enriching the decomposed signal to obtain a plurality of wavelets;

the characteristic extraction unit is used for determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

and the waveform positioning unit is used for carrying out primary positioning according to the slope between the peak value and the midpoint of the limited region window and the absolute maximum of the slope to obtain the starting point and the end point of the wavelet.

In a third aspect, the present invention provides an electrocardiogram characteristic start point and end point detection apparatus, including:

at least one processor;

at least one memory for storing at least one program;

when the at least one program is executed by the at least one processor, the at least one processor is caused to execute any one of the electrocardiogram feature start and end point detection methods of the first aspect.

In a fourth aspect, the present invention also provides a storage medium, in which a processor-executable program is stored, and the processor-executable program is used for executing the method in the first aspect when being executed by a processor.

Advantages and benefits of the present invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention:

according to the technical scheme, the characteristic wave energy is enriched, and the characteristic wave is extracted by combining a window self-adaptive threshold value; on the basis of extracting the wave peak values and positions of a plurality of wavelets capable of representing the electrocardio characteristics, the interval slope maximum value method is combined with the threshold value method of the starting point and the end point window for correction, so that the accurate detection of the starting point and the end point of the wavelets is realized, the time and amplitude characteristics required by the electrocardio diagnosis are conveniently and accurately extracted, and a foundation is provided for the electrocardio diagnosis, the research and development of an electrocardio automatic diagnosis system and the identification and diagnosis of related diseases.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a flowchart illustrating steps of a method for detecting start and end points of ECG features according to an embodiment of the present invention;

FIG. 2 is a graph of II lead electrocardiographic waveforms recorded as 100 in the MIT-BIH database in accordance with an embodiment of the present invention;

FIG. 3 is a graph of post-II lead electrocardiographically filtered waveforms recorded as 100 in the MIT-BIH database in accordance with an embodiment of the present invention;

FIG. 4 is a waveform diagram illustrating the determination of the peak and location of the R-wave in an embodiment of the present invention;

FIG. 5 is a waveform diagram illustrating the determination of the peak and location of the Q-wave in an embodiment of the present invention;

FIG. 6 is a waveform diagram illustrating the determination of the peak and location of the S-wave in an embodiment of the present invention;

FIG. 7 is a waveform diagram illustrating the determination of the peak and location of a P-wave in an embodiment of the present invention;

FIG. 8 is a waveform diagram illustrating the determination of the peak and location of a T-wave in an embodiment of the present invention;

FIG. 9 is a waveform diagram illustrating the determination of the location of the start of a P-wave in accordance with an embodiment of the present invention;

FIG. 10 is a waveform diagram illustrating the determination of the P-wave endpoint location in accordance with an embodiment of the present invention;

FIG. 11 is a waveform diagram illustrating the determination of the location of the start of a T-wave in accordance with an embodiment of the present invention;

FIG. 12 is a waveform diagram illustrating the determination of the T-wave endpoint location in accordance with an embodiment of the present invention;

fig. 13 is a waveform diagram of extracting the position of the start of QRS wave in the embodiment of the present invention;

fig. 14 is a waveform diagram of extracting the QRS wave end position in the embodiment of the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

The technical scheme aims to solve the limitation of the existing characteristic wave starting point and ending point detection method, and the characteristic wave and the electrocardio characteristic wave corrected by the interval threshold are extracted based on the wavelet transformation enriched characteristic wave energy combined with the window self-adaptive threshold, so that the characteristic wave peak value and the position are extracted by the accurate extraction method, then the interval slope maximum value method combined with the starting point and ending point window threshold is adopted for correction based on the extracted characteristic wave peak value and the position, the accurate detection of the starting point and the ending point of the P wave, the QRS wave group and the T wave is realized, the time and amplitude characteristics required by the electrocardio diagnosis are conveniently and accurately extracted, and a foundation is provided for the research and development of an electrocardio diagnosis system and the identification and diagnosis of related diseases.

In view of the drawbacks in the prior art pointed out in the background art, as shown in fig. 1, in one aspect, the present disclosure provides a method for detecting an electrocardiogram characteristic starting point and ending point, which includes steps S100-S500:

s100, acquiring electrocardio data, and performing denoising processing on the electrocardio data to obtain a first filtering signal;

specifically, the embodiment selects the electrocardio data acquired by the acquisition devices such as the sensor, and the like, and firstly carries out wavelet filtering to denoise the electrocardio data; for example, the lowest 2 layers of detail coefficients are set to zero, and the highest layers of approximate coefficients are set to 0, so as to filter out major noises such as myoelectric noise, baseline drift, power frequency noise and the like, and obtain a filter signal which is relatively pure and can keep the original electrocardiographic waveform.

Exemplarily, as shown in fig. 2, in the embodiment, an electrocardiographic data MLII limb lead with data recorded as 100 in the MIT-BIH database is selected, 8-layer wavelet transform is performed by adopting sym8 wavelet basis, the 1 st-2 th layer of detail coefficient is set to zero, and the 8 th layer of approximate coefficient is set to 0, so as to remove major noises such as myoelectric noise, baseline drift, power frequency noise and the like in the electrocardiographic signal, and obtain a filtered signal which is relatively smooth and pure and can maintain the original electrocardiographic waveform as shown in fig. 3.

S200, decomposing the first filtering signal, and enriching the decomposed signal to obtain a plurality of wavelets; the wavelets in the embodiment include R waves, Q waves, S waves, P waves and T waves.

Specifically, a filtered signal of the denoised original electrocardiographic waveform is decomposed, detail coefficient layers enriched with energy of R waves, Q waves, S waves, P waves and T waves are respectively selected to respectively reserve corresponding layer coefficients to filter the original signal, four operations are carried out on the filtered signal to obtain a waveform diagram respectively enriched with energy of the R waves, the Q waves, the S waves, the P waves and the T waves, other waveforms are filtered, other characteristic waves are eliminated, and only the position values of the R waves, the Q waves, the S waves, the P waves and the T waves are respectively reserved.

For example, in the embodiment, the filtered signal obtained in step S100 is subjected to 8-layer wavelet decomposition, and the filtered electrocardiographic signals obtained in layers 3 to 5 after filtering detail coefficients containing more R-wave energy are retained are subjected to four arithmetic operations, such that the signal a is d3 filtered signal + d4 filtered signal + d5 filtered signal, and the signal B is d4 filtered signal (d3 filtered signal + d5 filtered signal)/2n(n is an integer value not exceeding the number of wavelet layers), C-signal-a-signal-B-signal to enrich the R-wave energy. Secondly, 8 layers of wavelet decomposition are carried out on the electrocardiosignals obtained in the step S100, the electrocardiosignals after detail coefficient filtration which contain more Q, S wave energy in the 2 nd layer to the 5 th layer are retained and added, and Q, S wave energy in the waveform is enhanced. Finally, 8 layers of wavelet decomposition are carried out on the electrocardiosignals obtained in the step S100, the electrocardiosignals after detail coefficient filtration which contain more P, T wave energy in the 6 th layer and the 7 th layer are reserved are added, and P, T wave energy in the waveform is enhanced.

S300, determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

specifically, in the embodiment, according to the QRS complex characteristics, a fixed window sliding method and a maximum value in a fixed window are adopted to determine a high-value threshold, the R wave is extracted and positioned, the R wave position and the peak value are extracted, and a false detection value is deleted by adopting a threshold method. According to the normal time domain characteristics of the QRS wave of the electrocardio-complex wave, the position of the R wave is used as a base point, front and rear limited area windows are set, the minimum value in the windows is respectively solved, and the Q, S wave position and the peak value are obtained through positioning. According to the normal time domain characteristics of the electrocardiogram, setting a front limited region window by taking the Q wave position as a base point, solving the maximum value in the window, positioning to obtain a P wave position and a peak value, and correcting the P wave by adopting an interval threshold value method; setting a rear limited area window by taking the S wave position as a base point, solving the maximum value in the window, positioning to obtain the T wave position and the peak value, and correcting the T wave by adopting an interval threshold value method.

S400, calculating the slope of the peak value and a point in a limited area window, and positioning according to the absolute maximum of the slope to obtain the starting point and the end point of the wavelet;

s500, according to the time domain characteristics of the wavelets, correcting the starting point and the end point of the wavelets by adopting the limited region window and a preset threshold value.

Specifically, in the embodiment, a P-wave starting point and an end point are determined firstly, based on a P-wave position and a peak value, according to a P-wave normal time domain feature, a front limited area window and a rear limited area window are set by taking the P-wave position as a base point, the maximum value and the minimum value of the slope of a point in the window and the P-wave peak value point are determined respectively, the positions and the amplitudes of the P-wave starting point and the end point are obtained through positioning, a fixed window is selected based on the P-wave starting point and the end point respectively according to an electrocardiogram normal time domain feature, and a threshold value is set to correct the positions of the P-wave starting point and the end point.

Secondly, determining a T wave starting point and a T wave end point, setting a front limited area window and a rear limited area window by taking the T wave position as a base point according to the normal time domain characteristics of the T wave based on the T wave peak value and the position, respectively solving the maximum value and the minimum value of the slope of the point in the window and the T wave peak value point, positioning to obtain the positions and the amplitudes of the T starting point and the T wave end point, respectively selecting a fixed window based on the T wave starting point and the T wave end point according to the normal time domain characteristics of the electrocardiogram, and setting a threshold value to correct the positions of the T wave starting point and the T wave end point.

Then, determining a QRS complex, namely a starting point and an end point of a QRS complex composed of an R wave, a Q wave and an S wave, based on a Q wave peak value and a Q wave peak position, setting a front limited region window by taking the Q wave position as a base point according to QRS wave time domain characteristics, determining the negative maximum value of the slope of a point in the window and the Q wave peak value point, further positioning to obtain the QRS wave starting point position and the amplitude, based on electrocardiogram normal time domain characteristics, setting a rear limited region window by taking the S wave position as a base point, determining the maximum value of the slope of the point in the window and the S wave peak value point, positioning to obtain the QRS wave end point position and the amplitude, respectively selecting a fixed window based on the Q wave starting point and the S wave end point according to QRS electrocardiogram normal time domain characteristics, and setting a threshold value to correct the QRS wave starting point and the end point position. In some alternative embodiments, the method further comprises steps S210-S220, before step S300 of determining the location and peak of the wavelet through several finite region windows based on the QRS complex features and the time domain features of the electrocardiogram:

s210, determining a window threshold of a limited region window, and determining an amplitude threshold of a wavelet;

s220, deleting false detection values in the wavelets according to the window threshold and the amplitude threshold;

specifically, in the embodiment, the false detection value extracted in step S200 is deleted by using a threshold method. As shown in fig. 4, exemplarily, based on the electrocardiogram after the enrichment of R wave energy, the maximum value is determined in the window according to the characteristics of the electrocardiogram QRS complex and then the fixed window width and step length are both 200points, the value of 60% of the maximum value is used as the threshold, the threshold in each window is set by window sliding, the R wave is extracted by an adaptive threshold method, and then the false-detected R wave is removed according to 40% of the normal RR interval and 1/10 of the average value of the R wave amplitude.

In some alternative embodiments, the step S300 of determining the location and peak of the wavelet through several finite region windows according to the QRS complex features and the time domain features of the electrocardiogram includes the following steps S310-S340:

s310, determining the position of an R wave and the peak value of the R wave according to the maximum value in the first finite region window according to the QRS complex characteristics;

in the embodiment, the window width and the step length of the first finite area window are set to be 200points, the threshold value in each window is set through window sliding, the R wave is extracted by the self-adaptive threshold method, and the position and the peak value of the R wave are determined.

S320, setting a second finite region window according to the R wave position, and determining a Q wave position, a Q wave peak value, an S wave position and an S wave peak value according to the minimum value in the second finite region window;

wherein the second finite field window width and step size in the embodiment are both set to 36 points. As shown in fig. 5 and 6, specifically, after R wave is positioned, the same principle as that for R wave positioning is applied, then based on the electrocardiogram after wave energy is enriched with Q, S wave energy, according to the normal time domain characteristics of QRS wave of electrocardiograph complex wave, based on the R wave position, the window of limited region before setting is [ R position-36, R ], and the window of limited region after setting [ R position, R position +36], respectively determining the minimum value in the window, positioning to obtain Q, S wave, and determining the Q wave position, Q wave peak value, S wave position and S wave peak value.

S330, setting a third finite area window according to the electrocardiogram time domain characteristics and the Q wave position, and positioning according to the maximum value in the third finite area window to obtain a P wave position and a P wave peak value;

s340, setting a fourth limited area window according to the electrocardiogram time domain characteristics and the S wave position, and positioning according to the maximum value in the fourth limited area window to obtain a T wave position and a T wave peak value;

wherein, the third finite area window width and the step length in the embodiment are both set to 72 points; the fourth finite field window width and step size is 159 points. As shown in fig. 7, specifically, as with the Q, S wave positioning principle, based on the electrocardiogram after enriching P, T wave energy, according to the normal time domain characteristics of the QRS wave of the electrocardiograph complex wave, the position of the Q wave is used as a base point, a window [ Q position-72, Q position ] in the front finite region is set, the maximum value in the window is determined, and the P wave is obtained by positioning; as shown in fig. 8, using the S-wave position as a base point, setting a window [ S position, S position +159] of a subsequent finite region, determining a maximum value in the window, and positioning to obtain a T-wave; and then determining and obtaining the maximum value in a fixed window based on the P, T wave position respectively according to the normal time domain characteristics, and correcting the P wave and the T wave.

In some alternative embodiments, the method calculates the slope of the peak and the midpoint of the window of the limited region, and obtains the start point and the end point of the wavelet by positioning according to the absolute maximum of the slope in step S400, which includes steps S410-S440:

s410, setting a fifth finite area window by taking the P wave position as a base point; positioning according to the absolute maximum value of the slope between the point in the fifth finite area window and the peak point of the P wave to obtain a P wave starting point and a P wave terminal point; and correcting the P wave starting point and the P wave end point according to the amplitude threshold value.

Wherein, the fifth finite area window width and the step size in the embodiment are both set to 25 points. Specifically, in the embodiment, based on the P-wave position and the peak value, according to the normal time domain feature of the P-wave, the P-wave position is used as a base point, a front finite region window [ P position-25, P ] is set, a rear finite region window [ P position, P position +25] is used as a base point, the maximum value and the minimum value of the slope of the point in the window and the P-wave peak value point are respectively determined, the position of the starting point and the end point of the P-wave and the amplitude value of the P-wave are obtained by positioning, as shown in fig. 9, then according to the normal time domain feature of the electrocardiogram, a fixed window [ P starting point position-30, P starting point position ] is selected, as shown in fig. 10, a threshold value is set as the P starting point position amplitude value to correct the P-wave starting point position, a fixed window [ P end point position, P end point position +25] is selected, and a threshold value is set as the P end point position amplitude value to correct the P-wave end point position to determine the starting point and the end point of the P-wave.

S420, setting a sixth finite area window by taking the T wave position as a base point; positioning according to the absolute maximum value of the slope between the point in the sixth finite area window and the T wave peak value point to obtain a T wave starting point and a T wave terminal point; and correcting the T wave starting point and the T wave end point according to the amplitude threshold value.

Wherein, the width and the step size of the sixth finite area window in the embodiment are both set to 54 points; specifically, in the embodiment, based on the T wave position and the peak value, according to the normal time domain feature of the T wave, the T wave position is used as a base point, a front finite region window [ T wave position-54, T wave position ], a rear finite region window [ T position, T position +54], the maximum value and the minimum value of the slope of the point in the window and the T wave peak value point are respectively determined, the T wave start point, end point position and amplitude are obtained by positioning, as shown in fig. 11, then according to the normal time domain feature of the electrocardiogram, a fixed window [ T start point position-30, T start point position ] is selected, as shown in fig. 12, a threshold value is set as the T start point position amplitude value to correct the T wave start point position, a fixed window [ T end point position, T end point position +45] is selected, and a threshold value is set as the T wave end point position amplitude value to correct the T wave end point position, so as to determine the T wave start point and end point.

S430, setting a seventh finite area window by taking the Q wave position as a base point; positioning to obtain a starting point of the QRS complex according to the negative maximum value of the slope of the point in the seventh finite area window and the peak value point of the Q wave;

s440, setting an eighth finite area window by taking the S wave position as a base point; and positioning to obtain the end point of the QRS complex according to the maximum slope value of the point in the eighth finite area window and the peak value point of the Q wave.

Also, embodiments are based on a window threshold and an amplitude threshold for the start of a QRS complex and the end of a QRS complex.

Wherein, as shown in fig. 13 and 14, the seventh finite area window width and step size in the embodiment are both set to 20 points; the sixth finite area window width and step size in the example are both set to 36 points. Specifically, based on the Q wave peak value and the position, according to the QRS wave time domain characteristics, the Q wave position is used as a base point, a front limited region window [ Q wave position-20, Q wave position ] is set, the negative maximum value of the slope of the point in the window and the Q wave peak value point is determined, the QRS wave starting point position and the amplitude value are obtained through positioning, according to the electrocardiogram normal time domain characteristics, the S wave position is used as a base point, a rear limited region window [ S wave position, S wave position +36] is set, the maximum value of the slope of the point in the window and the S wave peak value point is determined, the QRS wave end point position and the amplitude value are obtained through positioning, according to the electrocardiogram QRS normal time domain characteristics, a fixed window [ Q wave starting point position-25, Q wave starting point position ] is selected, the threshold value is set to be half of the maximum slope value, the point with the slope of the QRS wave starting point position value larger than the threshold value is found, the QRS wave starting point position is corrected, the fixed window [ S wave end point position is selected, and S wave end position +10], setting a threshold value as an amplitude value of the S wave end position, searching a larger value, and correcting the end position.

In a second aspect, an embodiment of the present application further provides an electrocardiogram feature start point and end point detection system, which includes:

the signal acquisition unit is used for acquiring the electrocardio data and carrying out denoising processing on the electrocardio data to obtain a first filtering signal;

the signal decomposition unit is used for decomposing the first filtering signal and enriching the decomposed signal to obtain a plurality of wavelets;

the characteristic extraction unit is used for determining the positions and peak values of the wavelets through a plurality of limited region windows according to the QRS complex wave characteristics and the electrocardiogram time domain characteristics;

and the waveform positioning unit is used for positioning according to the slope of the peak value and the midpoint of the limited region window and the absolute maximum of the slope to obtain the starting point and the end point of the wavelet.

Based on the detection system, the complete implementation process of the technical scheme of the application is as follows:

in the embodiment, firstly, the MLII limb lead electrocardio recorded as 100 in MIT-BIH is selected, the electrocardiosignal is filtered by adopting sym8 wavelet basis function, and main noises such as myoelectric noise, baseline drift, power frequency noise and the like can be filtered by setting the layer with the lowest detail coefficient of 2 to zero and the layer with the highest approximate coefficient to 0, so that a pure and smooth filtering signal capable of keeping the original electrocardio waveform is obtained; then 8 layers of wavelet decomposition are carried out on the original electrocardiosignals, the enrichment of the energy of each characteristic wave is realized by selecting a detail coefficient layer for characteristic wave energy enrichment and carrying out four-fold operation, then characteristic waves such as P, Q, R, S, T waves and the like are positioned by combining a sliding window self-adaptive threshold method, and the positions and peak values of the extracted characteristic waves are corrected based on the normal time domain characteristics of the electrocardio, and the positions and peak values of the characteristic baud points are corrected.

After P, Q, R, S, T wave and other characteristic wave positions and peak values are positioned, based on P wave and T wave characteristic wave positions and peak values respectively, according to the normal time domain characteristics of each characteristic wave, taking the characteristic wave position as a base point, setting front and rear limited area windows, respectively solving the maximum value and the minimum value of the slope of a point in the window and the peak value point of the characteristic wave, positioning to obtain the starting point and the end point positions and the amplitude values of the P wave and the T wave, then selecting a fixed window according to the normal time domain characteristics of an electrocardiogram, setting a threshold value to correct the positioned starting point and the end point positions of the P wave and the T wave, and realizing the accurate positioning of the starting point and the end point positions of the P wave and the T wave and the accurate calculation of the amplitude values of the characteristic wave; based on the Q wave peak value and the Q wave position, according to QRS wave time domain characteristics, setting a front limited area window by taking the Q wave position as a base point, solving the negative maximum value of the slope of the point in the window and the Q wave peak value point, positioning to obtain the QRS wave starting point position and the amplitude, setting a rear limited area window by taking the S wave position as the base point, solving the maximum value of the slope of the point in the window and the S wave peak value point, positioning to obtain the QRS wave end point position and the amplitude, selecting a fixed window according to electrocardiogram QRS normal time domain characteristics, setting a threshold value to correct the starting point position and the end point position of the QRS characteristic wave, and realizing the accurate positioning of the starting point position and the end point position of the characteristic wave P wave and T wave and the accurate calculation of the amplitude.

In addition, the embodiment can also realize energy enrichment by performing four arithmetic operations on wavelet filtering and energy distribution of electrocardiosignals in detail coefficients based on wavelet decomposition, then realize self-adaptive threshold extraction of characteristic waves by combining a sliding window and a threshold in the window, and correct the positions and peak values of the extracted characteristic waves based on normal time domain characteristics of electrocardio, so that the positions of the characteristic waves in the electrocardiogram can be accurately positioned, the peak values of the characteristic waves can be obtained, and the problem of missing detection/false detection in the conventional characteristic wave extraction method can be well solved. After the characteristic wave is positioned, based on the position, the peak value and the normal time domain characteristics of the characteristic wave, the interval slope maximum value method is adopted to position the starting point and the end point of the characteristic wave, the extracted positions of the starting point and the end point of the characteristic wave are corrected by combining a window threshold value method according to the characteristics of the starting point and the end point in the electrocardiosignal, so that the starting point and the end point of the characteristic wave are accurately positioned, the problem that the conventional detection method for the starting point and the end point of the characteristic wave only aims at single limitation of detection of the starting point and the end point of a certain characteristic wave, and the problem that the adopted derivation method or the local search threshold value method can cause false detection due to the possible abnormal forms of double peaks and the like of the characteristic wave of arrhythmia electrocardiogram are solved, and a basis is provided for subsequently and accurately extracting the time and amplitude characteristics of the electrocardio diagnosis, developing research and development of an electrocardio automatic diagnosis system and identifying and diagnosing related diseases.

In a third aspect, the present disclosure further provides an electrocardiogram feature start point and end point detection apparatus, which includes at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor is caused to execute a method for detecting an electrocardiogram feature start point and end point as in the second aspect.

An embodiment of the present invention further provides a storage medium, in which a program is stored, and the program is executed by a processor to implement the method in the first aspect.

From the above specific implementation process, it can be concluded that the technical solution provided by the present invention has the following advantages or advantages compared to the prior art:

1. according to the technical scheme, energy enrichment is realized by performing four arithmetic operations on wavelet filtering and energy distribution of electrocardiosignals in detail coefficients based on wavelet decomposition, and then adaptive threshold extraction characteristic waves are realized by combining a sliding window and a threshold in the window; and based on the normal time domain characteristics of the electrocardio, the positions and peak values of the extracted characteristic waves are corrected, so that the positions of all the characteristic waves in the electrocardiogram can be accurately positioned, the peak values of the characteristic waves can be obtained, and the problems of missing detection or false detection in the conventional characteristic wave extraction method can be better solved.

2. According to the technical scheme, the starting point and the end point of the characteristic wave are positioned by adopting an interval slope maximum value method based on the position of the characteristic wave, the peak value and the normal time domain characteristics, the positions of the extracted starting point and the extracted end point of the characteristic wave are corrected by combining a characteristic wave starting point or end point window threshold value method according to the characteristics of the starting point and the end point in an electrocardiosignal, so that the starting point and the end point of the characteristic wave are accurately positioned, and the problems that the existing characteristic wave starting point and end point detection method only aims at single limitation of detection of the starting point and the end point of a certain characteristic wave, and misdetection caused by abnormal forms such as double peaks and the like possibly existing in the characteristic wave of arrhythmia due to an adopted derivation method or a local search threshold value method are solved.

In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.

Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and/or features may be integrated in a single physical device and/or software module, or one or more of the functions and/or features may be implemented in a separate physical device or software module. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus will be understood within the ordinary skill of an engineer in view of the attributes, functionality, and internal relationships of the modules herein disclosed. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.

The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:头部动作和脑电信号的复合采集装置、方法及系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!