Electrocardiogram characteristic signal extraction method and terminal

By combining filtering, amplification and feature point detection algorithms with an adaptive threshold algorithm, the problem of inaccurate detection of ECG signal feature data is solved, and complete and accurate extraction of ECG signals is achieved, providing data support for heart health analysis.

CN115828056BActive Publication Date: 2025-09-26FUQING BRANCH OF FUJIAN NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211013188.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-09-26
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

Existing technologies have difficulty in accurately and completely detecting the characteristic data of electrocardiogram signals, especially when faced with muscle noise, motion artifacts, baseline drift and electromagnetic field interference, resulting in unreliable electrocardiogram signal results.

Method used

The filter preprocessing, square function amplification, moving window integration algorithm and feature point detection algorithm are combined with the adaptive threshold algorithm. The ECG signal is processed through bandpass filter and differential filter. The feature point detection algorithm such as the threshold adaptive algorithm of R wave, P wave, T wave, S wave and Q wave is used to determine whether the ECG signal meets the feature point detection conditions.

Benefits of technology

It achieves accurate and complete detection of electrocardiogram signals, provides an analysis basis for the relationship between heartbeat and electrocardiogram, and provides reliable feature data for heart health assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115828056B_ABST
    Figure CN115828056B_ABST
Patent Text Reader

Abstract

The present invention relates to an electrocardiogram feature signal extraction method and terminal, which obtain an input electrocardiogram signal; filter and preprocess the electrocardiogram signal; amplify the electrocardiogram signal using a square function, and process the electrocardiogram signal using a moving window integration algorithm; sequentially detect the electrocardiogram signal using a feature point detection algorithm, wherein the types of feature point detection algorithms include R wave peak point detection algorithm, P wave peak point detection algorithm, T wave peak point detection algorithm, S wave valley point detection algorithm, and Q wave valley point detection algorithm; during the process of detecting the electrocardiogram signal, an adaptive threshold value corresponding to the type of feature point detection algorithm is obtained using a threshold adaptive algorithm, and whether the electrocardiogram signal meets the preset detection conditions of the feature point detection algorithm is determined. The electrocardiogram signal that meets the preset detection conditions is used as a feature point peak value / feature point valley value and is saved. Therefore, the present invention can accurately and completely detect the feature data of the electrocardiogram signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram signals, and in particular to an electrocardiogram characteristic signal extraction method and terminal. Background Art

[0002] Arrhythmia refers to abnormalities in heart rate or rhythm, both congenital and acquired. Mild cases can cause dizziness, chest tightness, and palpitations, while severe cases can be life-threatening and require immediate medical attention. The most common medical test for arrhythmia is the electrocardiogram (ECG). Due to individual patient variability, doctors make subjective judgments and treatments, which requires experience. Therefore, automated ECG analysis is essential. ECG signals reflect the electrical signals of the human heart during exercise. Studying the characteristics of ECG signals is a key tool for understanding the rhythmic patterns of the heart and its health.

[0003] ECG signals are often affected by muscle noise, motion artifacts, baseline wander, and electromagnetic interference. Failure to detect the R wave or detection failure can lead to unreliable ECG results. The amplitude threshold method cannot adequately eliminate signal noise when detecting QRS waves. The Pan-Tompkins method helps reduce motion artifacts and baseline wander but cannot eliminate high-frequency noise. While using digital filters for QRS wave enhancement can improve the signal-to-noise ratio, this method relies heavily on the order and properties of the digital filter. Neural networks can also be used for ECG signal extraction, but they struggle to handle noise. Combining bandpass filters with hidden Markov models can be used for ECG signal extraction, but hidden Markov models are susceptible to noise and baseline wander. While the singularity method is feasible for QRS wave detection, it also struggles to handle noise.

[0004] The electrocardiogram signal is a record of the changes in the current during the periodic movement of the human heart. Before the heart contracts, there is the conduction stimulation of the electrical signal, and then there is the physical deformation movement. Figure 1 As shown in the figure, a normal heart beat cycle includes a normal electrocardiogram waveform produced by the electrical activity of the atrium. Its characteristic signals include P wave, PR interval, PR segment, QRS complex, ST segment, T wave, QT interval, etc. Its specific characteristics are as follows:

[0005] (1) P wave, which reflects the changes in cardiac potential during the depolarization of the two atria. From the perspective of the heart's movement cycle, the P wave time stage is in the contraction stage of the heartbeat, but has not yet begun to contract.

[0006] (2) The PR interval refers to the time between the start of the P wave and the start of the QRS complex. It represents the time required for the electrical current generated by the sinoatrial node to pass through the atria, atrioventricular junction, atrioventricular node and its branches to the ventricles and cause ventricular excitation. The PR interval also occurs during the contraction phase of the heartbeat.

[0007] (3) QRS complex, which reflects the changes in the potential movement during the depolarization of the two ventricles. The QRS complex has a relatively obvious feature in the electrocardiogram signal waveform, which contains three closely connected potential fluctuations: the first is a downward wave called the Q wave; the second is an upward high and sharp R wave; and the last is a downward S wave. During the heartbeat, the QRS wave corresponds to the contraction phase when the heart undergoes a large deformation.

[0008] (4) ST segment refers to the portion of the waveform between the end of the QRS complex and the beginning of the T wave. During this phase, the ventricles are depolarized but repolarization has not yet begun. Therefore, there is no potential change between the ventricles, and the waveform returns to a flat state, generally flush with the baseline. Corresponding to the deformation state of the beating heart, the heart begins to recover during this phase, that is, the heart begins to relax.

[0009] (5) T wave, which reflects the changes in current during the repolarization of the two ventricles. The direction of the T wave is consistent with the direction of the R wave of the QRS complex, and the R wave is generally considered to be the main wave of the QRS complex. In the cardiac cycle, the T wave corresponds to the diastole phase, during which the heart returns to its original shape.

[0010] (6) QT interval refers to the waveform from the end of the QRS complex to the end of the T wave. It represents the total time required for the ventricles to begin depolarization and complete repolarization. When the heart rate increases, the QT interval shortens, and when the heart rate slows, the QT interval lengthens.

[0011] The electrocardiogram (ECG) signal is a readily available bioelectrical signal that can provide important information about cardiac abnormalities. Extensive research has been conducted in the field of ECG signal processing, and many mature feature extraction techniques have been proposed. The fast Fourier transform (FFT), a typical signal processing method, suffers from the large space required by short data records, making it difficult to capture changes in the dominant frequency of ventricular fibrillation over short time periods. Furthermore, the presence of finite epochs in the data generating frequency components during analysis does not correspond to those in the discrete spectrum, resulting in an increased number of spectral peaks. These drawbacks reduce the FFT's ability to resolve two closely spaced time-frequency regions. While applying a window function can mitigate this limitation, it also reduces the FFT's resolution. The continuous wavelet transform (CWT) has been developed as a method for obtaining signal synchronization and high-resolution time-frequency information. In ECG signal processing, the multi-level decomposition of the wavelet transform can accurately define the number and location of QRS complexes. Despite its significant advantages, the wavelet transform approach may not perform correctly under certain conditions. The presence of arrhythmias can limit the efficiency of wavelet transforms. This can lead to inaccurate QRS complex detection, and using a three-lead ECG signal acquisition system can result in the loss of important signal information. Therefore, accurately and completely detecting the characteristic data of the ECG signal has become an urgent problem. Summary of the Invention

[0012] (1) Technical issues to be resolved

[0013] In order to solve the above-mentioned problems in the prior art, the present invention provides an electrocardiogram characteristic signal extraction method and terminal, which can accurately and completely detect the characteristic data of the electrocardiogram signal.

[0014] (2) Technical solution

[0015] In order to achieve the above object, a technical solution adopted by the present invention is: a method for extracting electrocardiogram characteristic signals, comprising:

[0016] S1, obtain the input electrocardiogram signal;

[0017] S2. performing filtering preprocessing on the electrocardiogram signal;

[0018] S3, amplifying the electrocardiogram signal using a square function, and processing the electrocardiogram signal using a moving window integration algorithm;

[0019] S4. Detect the electrocardiogram signal in sequence using a feature point detection algorithm, where the types of feature point detection algorithms include an R wave peak point detection algorithm, a P wave peak point detection algorithm, a T wave peak point detection algorithm, an S wave trough point detection algorithm, and a Q wave trough point detection algorithm;

[0020] During the process of detecting the electrocardiogram signal, a threshold adaptive algorithm is used according to the type of the feature point detection algorithm to obtain an adaptive threshold corresponding to the type, and it is judged whether the electrocardiogram signal meets the preset detection conditions of the feature point detection algorithm. The preset detection conditions include the detection conditions for whether the feature point meets the adaptive threshold. The electrocardiogram signal that meets the preset detection conditions is used as the feature point peak value / feature point valley value and is saved.

[0021] Another technical solution adopted by the present invention is: an electrocardiogram characteristic signal extraction terminal, including a memory, a processor and a computer program stored in the memory and runnable on the processor, and the processor implements the above-mentioned electrocardiogram characteristic signal extraction method when executing the computer program.

[0022] (3) Beneficial effects

[0023] The present invention has the beneficial effect of determining whether the ECG signal meets preset detection conditions after filtering and amplifying it based on an adaptive threshold algorithm and a feature point detection algorithm. The determined ECG signal can then be saved as the peak / valley values ​​of the feature points. Consequently, the present invention can accurately and completely detect the feature data of the ECG signal, providing a basis for further analysis and research on the relationship between heartbeats and ECGs, and providing a data foundation for simulations of feature data-driven heartbeats. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a schematic diagram introduced in the background technology;

[0025] Figure 2 This is a flow chart of a method for extracting electrocardiogram characteristic signals according to the present invention;

[0026] Figure 3 A flowchart of the overall solution of an electrocardiogram feature signal extraction method of the present invention;

[0027] Figure 4 This is a flow chart of a feature point detection algorithm of a method for extracting electrocardiogram feature signals according to the present invention;

[0028] Figure 5 This is a flow chart of an R wave peak point detection algorithm according to an embodiment;

[0029] Figure 6 This is a structural block diagram of an electrocardiogram characteristic signal extraction terminal of the present invention;

[0030] [Description of Reference Numerals]

[0031] 1. An electrocardiogram characteristic signal extraction terminal; 2. A memory; 3. A processor. DETAILED DESCRIPTION

[0032] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.

[0033] Please refer to Figures 2 to 5 As shown, a method for extracting electrocardiogram characteristic signals includes:

[0034] S1, obtain the input electrocardiogram signal;

[0035] S2. performing filtering preprocessing on the electrocardiogram signal;

[0036] S3, amplifying the electrocardiogram signal using a square function, and processing the electrocardiogram signal using a moving window integration algorithm;

[0037] S4. Detect the electrocardiogram signal in sequence using a feature point detection algorithm, where the types of feature point detection algorithms include an R wave peak point detection algorithm, a P wave peak point detection algorithm, a T wave peak point detection algorithm, an S wave trough point detection algorithm, and a Q wave trough point detection algorithm;

[0038] During the process of detecting the electrocardiogram signal, a threshold adaptive algorithm is used according to the type of the feature point detection algorithm to obtain an adaptive threshold corresponding to the type, and it is judged whether the electrocardiogram signal meets the preset detection conditions of the feature point detection algorithm. The preset detection conditions include the detection conditions for whether the feature point meets the adaptive threshold. The electrocardiogram signal that meets the preset detection conditions is used as the feature point peak value / feature point valley value and is saved.

[0039] As can be seen from the foregoing description, the present invention has the beneficial effect of determining whether the ECG signal, after filtering and amplifying it, satisfies preset detection conditions based on an adaptive threshold algorithm and a feature point detection algorithm, thereby storing the determined ECG signal as a feature point peak / valley. Consequently, the present invention accurately and completely detects the characteristic data of the ECG signal, providing a basis for further analysis and research on the relationship between heartbeats and ECGs, and providing a data foundation for simulations driven by characteristic data.

[0040] Furthermore, the S2 includes:

[0041] The electrocardiogram signal is processed by a bandpass filter, and then the electrocardiogram signal is subjected to differential filtering to obtain the change of the electrocardiogram signal in each waveform stage. The formula of the differential filtering is as follows:

[0042]

[0043] Wherein, x is the original electrocardiogram signal, n is the serial number of the original electrocardiogram signal x, and y(n) represents the electrocardiogram signal obtained after the original electrocardiogram signal is filtered.

[0044] From the above description, we can see that the bandpass filter is used to reduce the influence of muscle noise, 60Hz interference, baseline drift and T wave interference on the ECG signal, while the breeze filter can obtain the changes of the ECG signal in each waveform stage to ensure the reliability of subsequent detection calculations.

[0045] Furthermore, the step of amplifying the electrocardiogram signal using a square function in S3 includes:

[0046] The electrocardiogram signal obtained after filtering is squared point by point using a square function, and the square function formula is as follows:

[0047] y1(n1)=[x1(n1)] 2

[0048] Wherein, x1 is the electrocardiogram signal obtained after filtering, n1 is the serial number of the electrocardiogram signal obtained after filtering, and y1(n1) represents the amplified electrocardiogram signal;

[0049] In S3, a moving window integration algorithm is used to process the electrocardiogram signal and the following formula is used for calculation:

[0050]

[0051] Where N is the number of samples in the integration window, x2 represents the amplified ECG signal, and y2(n2) represents the processed ECG signal.

[0052] As can be seen from the above description, by applying a square function to the filtered ECG signal point by point, we can ensure that all ECG data points are positive and amplified, making the ECG feature points more distinct and facilitating subsequent detection and calculation of feature points. The purpose of the moving window integration algorithm is to obtain the slope of the R wave and its corresponding waveform characteristics.

[0053] Furthermore, the S4 includes:

[0054] S41, R wave peak point detection:

[0055] The threshold adaptive algorithm includes an R wave threshold algorithm. The R wave threshold obtained by the R wave threshold algorithm is: half of the average value of the maximum peak value of each integration window in the electrocardiogram,

[0056] Then, the electrocardiogram signal samples that are greater than the R wave threshold and that are greater than the previous electrocardiogram signal sample and the next electrocardiogram signal are determined as R wave peak points one by one. The specific calculation formula is as follows:

[0057]

[0058] Where x3(k3) is the processed ECG signal sample, k3 represents the sampling instance of the ECG signal, and th is the calculated R-wave threshold.

[0059] Furthermore, after S41, the step further includes:

[0060] S42. The number of R wave peak points is i. The distance between adjacent R wave peak points is called the RR wave peak point interval. The average RR wave peak point interval is calculated as follows:

[0061] The calculation formula of the heart beat frequency is as follows:

[0062]

[0063] Among them, f s is the signal sampling frequency, and r is the heart rate. As can be seen from the above description, if the interval between the peak values ​​of the collected RR waves differs significantly from the average RR wave peak interval, it can be diagnosed as an arrhythmia, which can serve as a basis for pathological research. The calculated heart rate can also be used as a criterion for assessing heart health.

[0064] Furthermore, the P wave peak point detection algorithm includes: obtaining an electrocardiogram signal with a maximum peak to the left of an R wave peak point in the electrocardiogram, and the electrocardiogram signal satisfies less than th, and determining it as a P wave peak point;

[0065] The T wave peak point detection algorithm includes: obtaining an electrocardiogram signal with the maximum peak value to the right of the R wave peak point in the electrocardiogram, and the electrocardiogram signal satisfies that it is less than th, and determining it as the T wave peak point;

[0066] It also includes the test of the determined P wave peak point and T wave peak point:

[0067] Determine whether the distances between the R wave peak point and the adjacent detected P wave peak point and T wave peak point do not exceed 30% of the RR wave peak interval. If so, add the values ​​of all P wave peak points and T wave peak points and take the average value, and check one by one whether the difference between the value of the P wave peak point and the value of the T wave peak point and the average value is within a preset range;

[0068] If so, it indicates that the P wave peak point / T wave peak point has passed the detection;

[0069] If not, the P wave peak point / T wave peak point is marked.

[0070] From the above description, it can be seen that the P-wave peak point and the T-wave peak point can be determined and detected to ensure the accuracy of feature point acquisition.

[0071] Furthermore, the threshold adaptive algorithm includes an S wave threshold algorithm, and the S wave threshold obtained by the S wave threshold algorithm is half of the minimum trough value in the electrocardiogram.

[0072] Then the electrocardiogram signal sample that is smaller than the S wave threshold and also smaller than the previous electrocardiogram signal sample and the next electrocardiogram signal is an S wave valley point. The specific calculation formula is as follows:

[0073]

[0074] Where x4(k4) is the processed ECG signal sample, k4 represents the sampling instance of the ECG signal, and minth is the calculated S wave threshold.

[0075] Furthermore, the Q wave peak point detection includes:

[0076] Then the electrocardiogram signal sample that is greater than the S wave threshold and is less than the previous electrocardiogram signal sample and the next electrocardiogram signal is a Q wave valley point. The specific formula is as follows:

[0077]

[0078] Among them, x5(k5) is the processed ECG signal sample, and k5 represents the sampling instance of the ECG signal;

[0079] It also includes the test of the determined Q valley point:

[0080] Add up the values ​​of all Q wave valley points and take the average value, and check one by one whether the difference between the value of the Q wave valley point and the average value is within a preset range;

[0081] If so, it indicates that the Q wave valley value point has passed the detection;

[0082] If not, the Q wave valley point is marked.

[0083] Please refer to Figure 6 As shown, an electrocardiogram characteristic signal extraction terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned electrocardiogram characteristic signal extraction method is implemented.

[0084] Example 1

[0085] Please refer to Figures 2 to 5 As shown, a method for extracting electrocardiogram characteristic signals is characterized by comprising:

[0086] S1, obtain the input electrocardiogram signal;

[0087] Among them, the present invention takes the 12-lead method of the internationally accepted standard to obtain the input normal electrocardiogram waveform as an example, requiring the electrocardiogram signal to be a raw format signal. This type of electrocardiogram signal is a horizontal scanning signal stored in time sequence, specifically manifested as a continuous waveform on the time axis. If it is not in this format, format conversion is required.

[0088] S2. Filter preprocessing is performed on the electrocardiogram signal. The initial electrocardiogram signal often contains noise. If the noise is not filtered out, it will have a great impact on the subsequent feature point detection. The filtering process includes bandpass filtering and differential filtering, as follows:

[0089] Processing the electrocardiogram signal through a bandpass filter to reduce the effects of muscle noise, 60 Hz interference, baseline drift, and T wave interference;

[0090] Then, the electrocardiogram signal is subjected to differential filtering to obtain the change of the electrocardiogram signal in each waveform stage. The differential filtering is performed using a five-point derivative transfer function, and its formula is as follows:

[0091]

[0092] Where x is the original ECG signal, n is the serial number of the original ECG signal x, and y(n) represents the ECG signal obtained by filtering the original ECG signal. The frequency response of this derivative is almost linear between DC and 30 Hz, which means that it approximates the ideal derivative within this range.

[0093] S3, amplifying the electrocardiogram signal using a square function, and processing the electrocardiogram signal using a moving window integration algorithm;

[0094] Wherein, the amplifying the electrocardiogram signal using a square function in S3 includes:

[0095] The electrocardiogram signal obtained after filtering is squared point by point using a square function, and the square function formula is as follows:

[0096] y1(n1)=[x1(n1)] 2

[0097] Where x1 is the ECG signal obtained after filtering, n1 is the serial number of the ECG signal obtained after filtering, and y1(n1) represents the amplified ECG signal. In this way, all ECG signal data are positive, and the data output after differential processing is nonlinearly amplified to strengthen the influence on the higher ECG signal frequency, that is, to strengthen the influence on the R wave peak point in the ECG signal.

[0098] In S3, a moving window integration algorithm is used to process the electrocardiogram signal, the purpose of which is to obtain the slope of the R wave and its corresponding waveform characteristic information, which is calculated using the following formula:

[0099]

[0100] Here, N is the number of samples in the integration window, x² represents the amplified ECG signal, and y²(n²) represents the processed ECG signal. The number of samples plays a crucial role in this processing stage. Generally speaking, the window width should be approximately the same as the widest possible QRS complex. If the integration window is too wide, the waveform may confuse the QRS and T waves; if it is too narrow, some QRS complexes may produce multiple peaks in the waveform. This can significantly complicate the subsequent QRS detection process. The window width is generally determined based on the experience of the operator who sets it and can be adjusted. For a sampling strategy with a sampling frequency of 200 Hz, the window sampling width is equal to the sampling width of 30 ECG signals, which is generally 150 ms.

[0101] S4. Detect the electrocardiogram signal in sequence using a feature point detection algorithm, where the types of feature point detection algorithms include an R wave peak point detection algorithm, a P wave peak point detection algorithm, a T wave peak point detection algorithm, an S wave trough point detection algorithm, and a Q wave trough point detection algorithm;

[0102] During the process of detecting the electrocardiogram signal, a threshold adaptive algorithm is used according to the type of the feature point detection algorithm to obtain an adaptive threshold corresponding to the type, and it is judged whether the electrocardiogram signal meets the preset detection conditions of the feature point detection algorithm. The preset detection conditions include the detection conditions for whether the feature point meets the adaptive threshold. The electrocardiogram signal that meets the preset detection conditions is used as the feature point peak value / feature point valley value and is saved.

[0103] Wherein, the S4 includes:

[0104] S41, R wave peak point detection:

[0105] The threshold adaptive algorithm includes an R wave threshold algorithm. The R wave threshold obtained by the R wave threshold algorithm is: half of the average value of the maximum peak value of each integration window in the electrocardiogram,

[0106] Then, the electrocardiogram signal samples that are greater than the R wave threshold and that meet the requirement of being greater than the previous electrocardiogram signal sample and the next electrocardiogram signal sample are determined as R wave peak points one by one. The specific calculation formula is as follows:

[0107]

[0108] Wherein, x3(k3) is the processed ECG signal sample, k3 represents the sampling instance of the ECG signal, and th is the calculated R wave threshold.

[0109] Specifically, if Figure 5 As shown, when comparing and detecting ECG signal samples to determine the R-wave peak, the counter d is first initialized to 0ms and incremented by 1 to determine whether the above formula is met. If the current x(d) does not meet the above formula, the counter d is incremented by 1 and the above formula is repeated. If it does, the current x(d) is determined to be the R-wave peak, and the counter is incremented by 150ms (this value is only an example, i.e., a value close to the next R-wave peak is taken and can be set adaptively by the user). Because the next R-peak will not occur within such a short time interval, this will minimize the possibility of R-peak detection errors. When all sample points have passed the procedure, that is, when d is greater than or equal to the sample length of the ECG signal, the detection algorithm stops.

[0110] S42. The number of R wave peak points is i. The distance between adjacent R wave peak points is called the RR wave peak point interval. The average RR wave peak point interval is calculated as follows:

[0111] The calculation formula of the heart beat frequency is as follows:

[0112]

[0113] Among them, f s is the sampling frequency of the signal, and r is the heart beat frequency. S43, P wave peak point detection and T wave peak point detection:

[0114] The P wave peak point detection algorithm includes: obtaining an electrocardiogram signal with the largest peak value to the left of the R wave peak point in the electrocardiogram, and the electrocardiogram signal satisfies the condition that it is less than th, and determining it as the P wave peak point;

[0115] The T wave peak point detection algorithm includes: obtaining an electrocardiogram signal with the maximum peak value to the right of the R wave peak point in the electrocardiogram, and the electrocardiogram signal satisfies that it is less than th, and determining it as the T wave peak point;

[0116] It also includes the test of the determined P wave peak point and T wave peak point:

[0117] Determine whether the distances between the R wave peak point and the adjacent detected P wave peak point and T wave peak point do not exceed 30% of the RR wave peak interval. If so, add the values ​​of all P wave peak points and T wave peak points and take the average value, and check one by one whether the difference between the value of the P wave peak point and the value of the T wave peak point and the average value is within a preset range;

[0118] If so, it indicates that the P wave peak point / T wave peak point has passed the detection;

[0119] If not, the P wave peak point / T wave peak point is marked.

[0120] S44, S valley point detection:

[0121] The threshold adaptive algorithm includes an S wave threshold algorithm, and the S wave threshold obtained by the S wave threshold algorithm is half of the minimum trough value in the electrocardiogram.

[0122] Then the electrocardiogram signal sample that is smaller than the S wave threshold and also smaller than the previous electrocardiogram signal sample and the next electrocardiogram signal is an S wave valley point. The specific calculation formula is as follows:

[0123]

[0124] Where x4(k4) is the processed ECG signal sample, k4 represents the sampling instance of the ECG signal, and minth is the calculated S wave threshold.

[0125] S45, Q valley point detection:

[0126] The Q wave peak point detection includes:

[0127] Then the electrocardiogram signal sample that is greater than the S wave threshold and is less than the previous electrocardiogram signal sample and the next electrocardiogram signal is a Q wave valley point. The specific formula is as follows:

[0128]

[0129] Among them, x5(k5) is the processed ECG signal sample, and k5 represents the sampling instance of the ECG signal;

[0130] It also includes the test of the determined Q valley point:

[0131] Add up the values ​​of all Q wave valley points and take the average value, and check one by one whether the difference between the value of the Q wave valley point and the average value is within a preset range;

[0132] If so, it indicates that the Q wave valley value point has passed the detection;

[0133] If not, the Q wave valley point is marked.

[0134] Example 2

[0135] Please refer to Figure 3 , an electrocardiogram characteristic signal extraction terminal 1, including a memory 2, a processor 3 and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 implements the steps in the first embodiment when executing the computer program.

[0136] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for extracting electrocardiogram characteristic signals, characterized in that: include: S1, obtain the input electrocardiogram signal; S2. performing filtering preprocessing on the electrocardiogram signal; S3, amplifying the electrocardiogram signal using a square function, and processing the electrocardiogram signal using a moving window integration algorithm; S4. Detect the electrocardiogram signal in sequence using a feature point detection algorithm, where the types of feature point detection algorithms include an R wave peak point detection algorithm, a P wave peak point detection algorithm, a T wave peak point detection algorithm, an S wave trough point detection algorithm, and a Q wave trough point detection algorithm; In the process of detecting the electrocardiogram signal, a threshold adaptive algorithm is used according to the type of the feature point detection algorithm to obtain an adaptive threshold corresponding to the type, and whether the electrocardiogram signal meets a preset detection condition of the feature point detection algorithm is determined, wherein the preset detection condition includes a detection condition for whether the feature point meets the adaptive threshold, and the electrocardiogram signal that meets the preset detection condition is used as a feature point peak value / feature point valley value and is saved; Obtain an electrocardiogram signal with the largest peak value to the left of the R wave peak point in the electrocardiogram, and if the electrocardiogram signal satisfies less than th, determine it as the P wave peak point, where th is the calculated R wave threshold; The T wave peak point detection algorithm includes: obtaining an electrocardiogram signal with the maximum peak value to the right of the R wave peak point in the electrocardiogram, and the electrocardiogram signal satisfies that it is less than th, and determining it as the T wave peak point; It also includes the test of the determined P wave peak point and T wave peak point: Determine whether the distances between the R wave peak point and the adjacent detected P wave peak point and T wave peak point do not exceed 30% of the RR wave peak interval. If so, add the values ​​of all P wave peak points and T wave peak points and take the average value, and check one by one whether the difference between the value of the P wave peak point and the value of the T wave peak point and the average value is within a preset range; If so, it indicates that the P wave peak point / T wave peak point has passed the detection; If not, the P wave peak point / T wave peak point is marked.

2. The electrocardiogram characteristic signal extraction method according to claim 1, characterized in that: The S2 includes: The electrocardiogram signal is processed by a bandpass filter, and then the electrocardiogram signal is subjected to differential filtering to obtain the change of the electrocardiogram signal in each waveform stage. The formula of the differential filtering is as follows: Wherein, x is the original electrocardiogram signal, n is the serial number of the original electrocardiogram signal x, and y(n) represents the electrocardiogram signal obtained after the original electrocardiogram signal is filtered.

3. The electrocardiogram characteristic signal extraction method according to claim 2, characterized in that: The step of amplifying the electrocardiogram signal using a square function in step S3 includes: The electrocardiogram signal obtained after filtering is squared point by point using a square function, and the square function formula is as follows: y1(n1)=[x1(n1)] 2 Wherein, x1 is the electrocardiogram signal obtained after filtering, n1 is the serial number of the electrocardiogram signal obtained after filtering, and y1(n1) represents the amplified electrocardiogram signal; In S3, a moving window integration algorithm is used to process the electrocardiogram signal and the following formula is used for calculation: Where N is the number of samples in the integration window, x2 represents the amplified ECG signal, and y2(n2) represents the processed ECG signal.

4. The electrocardiogram characteristic signal extraction method according to claim 3, characterized in that: The S4 includes: S41, R wave peak point detection: The threshold adaptive algorithm includes an R wave threshold algorithm. The R wave threshold obtained by the R wave threshold algorithm is: half of the average value of the maximum peak value of each integration window in the electrocardiogram, Then, the electrocardiogram signal samples that are greater than the R wave threshold and that are greater than the previous electrocardiogram signal sample and the next electrocardiogram signal are determined as R wave peak points one by one. The specific calculation formula is as follows: Wherein, x3(k3) is the processed ECG signal sample, k3 represents the sampling instance of the ECG signal, and th is the calculated R wave threshold.

5. The electrocardiogram characteristic signal extraction method according to claim 4, characterized in that: The S41 further includes: S42. The number of R wave peak points is i. The distance between adjacent R wave peak points is called the RR wave peak point interval. The average RR wave peak point interval is calculated as follows: The formula for calculating heart rate is as follows: Among them, f s is the sampling frequency of the signal, and r is the heart beat frequency.

6. The electrocardiogram characteristic signal extraction method according to claim 4, characterized in that: The threshold adaptive algorithm includes an S wave threshold algorithm, and the S wave threshold obtained by the S wave threshold algorithm is half of the minimum trough value in the electrocardiogram; Then the electrocardiogram signal sample that is smaller than the S wave threshold and also smaller than the previous electrocardiogram signal sample and the next electrocardiogram signal is an S wave valley point. The specific calculation formula is as follows: Where x4(k4) is the processed ECG signal sample, k4 represents the sampling instance of the ECG signal, and minth is the calculated S wave threshold.

7. The electrocardiogram characteristic signal extraction method according to claim 6, characterized in that: The Q wave peak point detection includes: Then the electrocardiogram signal sample that is greater than the S wave threshold and is less than the previous electrocardiogram signal sample and the next electrocardiogram signal is a Q wave valley point. The specific formula is as follows: Among them, x5(k5) is the processed ECG signal sample, and k5 represents the sampling instance of the ECG signal; It also includes the test of the determined Q valley point: Add up the values ​​of all Q wave valley points and take the average value, and check one by one whether the difference between the value of the Q wave valley point and the average value is within a preset range; If so, it indicates that the Q wave valley value point has passed the detection; If not, the Q wave valley point is marked.

8. An electrocardiogram characteristic signal extraction terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electrocardiogram characteristic signal extraction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, device and equipment for determining key points in electrocardiogram data

    CN111067511A

  • Method, system and device and medium for detecting starting point and ending point of electrocardiogram feature

    CN113786202A