A P-wave feature point detection and optimization method based on phase transformation method
The P-wave feature point detection method based on the phase transformation method solves the problem of low detection accuracy of P-wave feature points in electrocardiograms, achieves accurate positioning and optimization of P-wave waveform feature points, and is suitable for automatic processing of massive ECG data. analysis, improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202211060334.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing technology has low accuracy and high complexity in detecting P wave feature points in electrocardiograms, and cannot meet the application scenarios of massive electrocardiogram diagnosis. In particular, it is difficult to detect the starting point, peak, and end point of P wave, resulting in detection accuracy and real-time Poor sex.
A P-wave feature point detection method based on the phase transformation method is adopted to improve the detection accuracy of P-wave waveform feature points through waveform area positioning, phase transformation amplification, potential peak and start and end point detection, and comprehensive optimization of results. Specific steps include locating the P wave area, applying the phase transformation method to convert the ECG signal into the phase complex space, retaining the waveform shape and size information, detecting local extreme points, optimizing the potential peak and starting and ending point positions to ensure the accuracy of the detection results.
It significantly improves the detection accuracy of P-wave waveform feature points (waveform peak, starting point, end point), is suitable for automatic analysis of massive ECG data, and reduces the cost and workload of manual chart reading.
Smart Images

Figure CN115644798B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electrocardiogram signal processing, and in particular to a P wave feature point detection and optimization method based on a phase conversion method. Background Art
[0002] As the aging of my country's population accelerates, the prevalence of cardiovascular diseases continues to rise, bringing about an increasing demand for ECG testing. With the development of mobile medical telemedicine technology, portable and miniaturized ECG testing equipment has expanded the use scenarios of ECG testing and extended the monitoring time of ECG testing, thus bringing about a huge amount of ECG data. The traditional model of manual reading, analysis and diagnosis, and reporting can no longer cope with the huge amount of ECG data. Automatic analysis algorithms that assist in reading are increasingly being applied to the processing and analysis of ECG data, reducing the workload of ECG reading physicians, improving the efficiency of ECG report issuance, and reducing the cost of manual reading.
[0003] The P wave of the electrocardiogram reflects the atrial depolarization process. By locating the starting and ending feature points of its waveform, various parameters such as the P wave duration, amplitude, and PR interval can be extracted, providing an important basis for further analysis of arrhythmias, which is of great significance for the automatic analysis and diagnosis algorithm of the electrocardiogram. Since the P wave has low frequency, low amplitude, and diverse shapes, and may overlap with other waveforms, the detection of its starting, peak, and end feature points has always been the end point and difficulty of the automatic electrocardiogram analysis algorithm. Current electrocardiogram feature point detection technologies, such as the common low-pass difference method and wavelet transform method, have low detection accuracy or high complexity and poor real-time performance, and cannot be used in massive electrocardiogram diagnosis application scenarios. Summary of the invention
[0004] In order to overcome the shortcomings of the existing technology, the present invention provides an electrocardiogram feature point detection and optimization method based on the phase transformation method, which can improve the accuracy of detecting the characteristic points of the P wave waveform (waveform peak, starting point, and end point).
[0005] The technical solution adopted by the present invention to solve its technical problem is:
[0006] A P-wave characteristic point detection and optimization method based on phase transformation method comprises the following steps:
[0007] 1) Waveform area positioning: According to the order of appearance of P, QRS, and T waves, and based on the start and end points of adjacent QRS wave groups, locate the segment where the P wave is located. The process is as follows: the starting, ending, and peak characteristic points of the nth QRS wave group are recorded as R on (n), R off (n),R peak (n), the distance from the current R peak to the previous R peak is the current RR interval RRI n ; Locate the nth waveform area as [R off(n)+thresh1*RRI n+1 , R off (n)+thresh2*RRI n+1 ], where thresh1 and thresh2 are natural numbers ranging from 0 to 1; according to the positioning area, the original ECG data segment is segmented to obtain the ECG data segment ecgSeg where the waveform is located;
[0008] 2) Phase transformation application: Apply the phase transformation method to the ECG data in the P wave area, transform each ECG signal sampling point into the phase complex space, retain the waveform shape information Ψn and size ratio information Mn, and amplify the slight waveform variation in the original signal; specifically:
[0009] Ψn:
[0010] Mn:
[0011] Where k represents the sampling point location, reflects the shape information of the kth sampling point, M[k] reflects the size ratio information of the kth sampling point; ecgSeg[k] represents the ECG data of the kth point; R v Can be set to different values, indicating the degree to which the waveform is amplified in phase space;
[0012] 3) Potential peak detection: According to the shape information Ψn retained in 2), find local extreme points; according to the Mn information, arrange the local extreme points from large to small as the potential peak feature point position sequence, and record peakCandi[i] as the i-th local extreme point, i = 1, 2, ... I;
[0013] 4) Potential start and end point detection: With the peak point detected in 3) as the center and winLen as the search window length, locate the area TM where the waveform start and end feature points are located; determine the area where the peak point and the corresponding start and end point are located, apply phase transformation to the area, and calculate the first-order difference diffTM of the phase space signal; detect the potential waveform start and end feature points based on the extreme value point, zero crossing point, and intersection point of the phase transformation signal Ψn with the original signal of diffTM;
[0014] 5) Comprehensive optimization of detection results: Determine whether the waveform feature point in 4) overlaps with the previous T wave. If so, i=i+1, and take the next potential peak point in the peakCandi[i] sequence as the starting point, and continue step 4) until a qualified waveform feature point is detected or the peakCandi[i] sequence is traversed.
[0015] Furthermore, in step 4), the signal segment TM is intercepted forward with peakCandi[i] as the center and winLen_on as the lengthon [i], as the waveform starting point search area; with peakCandi[i] as the center and winLen_off as the length, intercept the signal segment TM backward off [i], as the waveform end point search area; starting from the i-th potential peak point, if TM on [i] or TM off If the [i] segment exceeds the ecgSeg range, then i = i + 1, and the search for the next potential peak point continues, and the area where its corresponding start and end points are located is calculated until the search window is within the ecgSeg segment. In this case, the potential peak point is determined to be the waveform peak point peak, and the area where its corresponding waveform start and end points are located is recorded as TM on ,TM off ; If there is still no segment that meets the requirements after all potential peak points are searched, no waveform feature points are detected in this segment;
[0016] TM on ,TM off The phase transformation is applied to the region, denoted by R vd is the real part, and according to the calculation method 2), the signal after phase transformation is obtained Calculate the first-order difference of the phase signal, denoted as diffTM on 、diffTM off ; remember diffTM on The maximum point is the potential waveform starting point onCandi1; find From the start to the zero crossing point of the onCandi1 area, if it exists, update onCandi1; record diffTM off Find the potential waveform termination point offCandi1; From offCandi1 to the zero-crossing point in the end area, if it exists, update offCandi1; if it exists, record the first intersection point of the phase signal Ψn and the original signal in 2) as the potential waveform starting point onCandi2, and the second intersection point as the potential waveform ending point offCandi2; record the average of onCandi1 and onCandi2 as the final potential starting feature point on, and the average of offCandi1 and offCandi2 as the final potential ending feature point off.
[0017] The present invention locates the electrocardiogram waveform area, applies phase transformation to amplify the waveform, detects potential feature points and optimizes the final feature point position, and finally obtains the start and end points and peak feature points of the electrocardiogram P wave, and improves the accuracy of electrocardiogram waveform feature point detection.
[0018] The beneficial effects of the present invention are mainly manifested in: improving the accuracy of detecting characteristic points of the P wave waveform (waveform peak value, starting point, and end point). BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a P-wave characteristic point detection and optimization method based on a phase transformation method of the present invention;
[0020] Figure 2 It is a schematic diagram of positioning the P wave waveform area of an electrocardiogram provided by the present invention;
[0021] Figure 3 The present invention provides an electrocardiogram P wave waveform segment, a segment after step 2) phase transformation is applied, and a schematic diagram of step 3) potential peak position;
[0022] Figure 4 It is a schematic diagram of a phase signal and its first-order difference segment in step 4) provided by the present invention;
[0023] Figure 5 It is a schematic diagram of the detection results of a section of P wave characteristic points provided by the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described below in conjunction with the accompanying drawings.
[0025] Reference Figure 1 to Figure 5 A P-wave feature point detection and optimization method based on phase transformation method locates the ECG waveform area, applies phase transformation to amplify the waveform, detects potential feature points and optimizes the final feature point position. Finally, the start and end points and peak feature points of the ECG P wave can be obtained, and the accuracy of ECG waveform feature point detection can be improved.
[0026] like Figure 1 As shown, the present invention provides a P-wave feature point detection and optimization method based on the phase transformation method, which includes the following steps: 1) waveform area positioning; 2) phase transformation application; 3) potential peak feature point detection; 4) potential start and end feature point detection; 5) comprehensive optimization of detection results.
[0027] Further, in the waveform region positioning step, if Figure 2 As shown, the starting, ending, and peak feature points of the nth QRS complex are recorded as Ron(n), Roff(n), and Rpeak(n), and the distance from the current R peak to the previous R peak is recorded as the current RR interval RRIn; the nth waveform area is located as [Roff(n)+thresh1*RRIn+1, Roff(n)+thresh2*RRIn+1], where thresh1 and thresh2 are natural numbers ranging from 0 to 1; the area is located, the original ECG data segment is segmented, and the ECG data segment ecgSeg where the waveform is located is obtained (for example Figure 2 The fragment in the box);
[0028] Furthermore, in the phase transformation application step, the phase transformation method is applied to the ecgSeg segment to transform each ECG signal sampling point into the phase complex space, retain the waveform shape Ψn and size ratio Mn information, and amplify the slight waveform variation in the original signal. The specific formula is as follows:
[0029] Ψn:
[0030] Mn:
[0031] Where k represents the sampling point location, reflects the shape information of the kth sampling point, M[k] reflects the size ratio information of the kth sampling point; ecgSeg[k] represents the ECG data of the kth point; R v Can be set to different values, indicating the degree to which the waveform is amplified in the phase space; the signal after phase transformation is Figure 3 As shown;
[0032] Furthermore, in the potential peak feature point detection step, Figure 3 As shown, according to the local extreme value points of the phase signal Ψn, the potential peak feature points are determined, and the local extreme value points are arranged from large to small as the potential peak feature point position sequence, and peakCandi[i] is denoted as the i-th local extreme value point, i=1,2,…I;
[0033] Furthermore, in the potential start and end feature point detection step, Figure 4 As shown, with peakCandi[i] as the center and winLen_on as the length, the signal segment TM is intercepted forward on [i], as the waveform starting point search area; with peakCandi[i] as the center and winLen_off as the length, intercept the signal segment TM backward off [i], as the waveform end point search area; starting from the i-th potential peak point, if TM on [i] or TM off If the [i] segment exceeds the ecgSeg range, then i = i + 1, and the search for the next potential peak point continues, and the area where its corresponding start and end points are located is calculated until the search window is within the ecgSeg segment. In this case, the potential peak point is determined to be the waveform peak point peak, and the area where its corresponding waveform start and end points are located is recorded as TM on ,TM off ; If there is still no segment that meets the requirements after all potential peak points are searched, then no waveform feature points are detected in this segment; TM on ,TM off The phase transformation is applied to the region, denoted by R vd is the real part, according to the phase transformation formula, we get the signal after phase transformation Calculate the first-order difference of the phase signal, denoted as diffTM on 、diffTM off (like Figure 4 As shown); note diffTM on The maximum point is the potential waveform starting point onCandi1; find From the start to the zero crossing point of the onCandi1 area, if it exists, update onCandi1; record diffTM off Find the potential waveform termination point offCandi1; From offCandi1 to the zero-crossing point in the end area, if it exists, update offCandi1; if it exists, record Figure 3 The first intersection point between Ψn and the original signal is the potential waveform starting point onCandi2, and the second intersection point is the potential waveform ending point offCandi2; the average of onCandi1 and onCandi2 is the final potential starting feature point on, and the average of offCandi1 and offCandi2 is the final potential ending feature point off;
[0034] Furthermore, in the comprehensive optimization step of the detection result, it is determined whether the current waveform feature point overlaps with the previous T wave. If so, i=i+1, and the process returns to the potential peak feature point detection step. The next potential peak point in the peakCandi[i] sequence is used as the starting point, and the potential start and end feature point detection step is continued until a qualified waveform feature point is detected or the peakCandi[i] sequence is traversed. Figure 5 As shown, the result of detecting a section of P wave characteristic points according to the present invention is demonstrated.
[0035] Based on the above method, the present invention is verified on the open source database QT Database dataset of PhysioNet, and the detection results of P wave peak feature points are compared with other state-of-art methods. The results are shown in Table 1, from which it can be seen that our method has obvious performance advantages. Table 1 is a performance comparison of the detection results of P wave peak feature points on the QT Database dataset.
[0036]
[0037]
[0038] Table 1
[0039] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.
Claims
1. A P-wave feature point detection and optimization method based on phase transformation method, characterized in that: The method comprises the following steps: 1) Waveform area positioning: According to the order of appearance of P, QRS, and T waves, the position of the P wave segment is located according to the start and end points of the adjacent QRS wave group. The process is: the starting, ending, and peak characteristic points of the nth QRS wave group are recorded as R on (n), R off (n),R peak (n), the distance from the current R peak to the previous R peak is the current RR interval RRI n ; Locate the nth waveform area as [R off (n)+thresh1*RRI n+1 , R off (n)+thresh2*RRI n+1 ], where thresh1 and thresh2 are natural numbers ranging from 0 to 1; according to the positioning area, the original ECG data segment is segmented to obtain the ECG data segment ecgSeg where the waveform is located; 2) Phase transformation application: Apply the phase transformation method to the ECG data in the P wave area, transform each ECG signal sampling point into the phase complex space, retain the waveform shape information Ψn and size ratio information Mn, and amplify the slight waveform variation in the original signal; specifically: Ψn: Mn: Where k represents the sampling point location, reflects the shape information of the kth sampling point, M[k] reflects the size ratio information of the kth sampling point; ecgSeg[k] represents the ECG data of the kth point; R v Can be set to different values, indicating the degree to which the waveform is amplified in phase space; 3) Potential peak detection: According to the shape information Ψn retained in 2), find local extreme points; according to the Mn information, arrange the local extreme points from large to small as the potential peak feature point position sequence, and record peakCandi[i] as the i-th local extreme point, i = 1, 2, ... I; 4) Potential start and end point detection: With the peak point detected in 3) as the center and winLen as the search window length, locate the area TM where the waveform start and end feature points are located; determine the area where the peak point and the corresponding start and end point are located, apply phase transformation to the area, and calculate the first-order difference diffTM of the phase space signal; detect the potential waveform start and end feature points based on the extreme value point, zero crossing point, and intersection point of the phase transformation signal Ψn with the original signal of diffTM; 5) Comprehensive optimization of detection results: Determine whether the waveform feature point in 4) overlaps with the previous T wave. If so, i=i+1, and take the next potential peak point in the peakCandi[i] sequence as the starting point, and continue step 4) until a qualified waveform feature point is detected or the peakCandi[i] sequence is traversed.
2. A P-wave feature point detection and optimization method based on phase transformation method as claimed in claim 1, characterized in that: In step 4), the signal segment TM is intercepted forward with peakCandi[i] as the center and winLen_on as the length. on [i], as the waveform starting point search area; with peakCandi[i] as the center and winLen_off as the length, intercept the signal segment TM backward off [i], as the waveform end point search area; starting from the i-th potential peak point, if TM on [i] or TM off If the [i] segment exceeds the ecgSeg range, then i = i + 1, and the search for the next potential peak point continues, and the area where its corresponding start and end points are located is calculated until the search window is within the ecgSeg segment. In this case, the potential peak point is determined to be the waveform peak point peak, and the area where its corresponding waveform start and end points are located is recorded as TM on ,TM off ; If there is still no segment that meets the requirements after all potential peak points are searched, no waveform feature points are detected in this segment; TM on ,TM off The phase transformation is applied to the region, denoted by R vd is the real part, and according to the calculation method 2), the signal after phase transformation is obtained Calculate the first-order difference of the phase signal, denoted as diffTM on 、diffTM off ; remember diffTM on The maximum point is the potential waveform starting point onCandi1; find From the start to the zero crossing point of the onCandi1 area, if it exists, update onCandi1; record diffTM off Find the potential waveform termination point offCandi1; From offCandi1 to the zero-crossing point in the end area, if it exists, update offCandi1; if it exists, record the first intersection point of the phase signal Ψn and the original signal in 2) as the potential waveform starting point onCandi2, and the second intersection point as the potential waveform ending point offCandi2; record the average of onCandi1 and onCandi2 as the final potential starting feature point on, and the average of offCandi1 and offCandi2 as the final potential ending feature point off.
