A digital electrocardiogram waveform recognition and time limit parameter measurement method
By using digital electrocardiogram waveform recognition and time limit parameter calculation methods, combined with the cardiologist's interpretation of the waveform, a holistic analysis of the P-QRS-T wave was achieved, solving the problem of multi-lead electrocardiogram signal processing in existing technologies and improving the accuracy and efficiency of electrocardiogram diagnosis.
Patent Information
- Application Number
- CN202211507268.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Existing automated electrocardiogram (ECG) analysis technologies cannot effectively process transient and fleeting fine structural information in multi-lead ECG signals, and deep learning methods rely excessively on labeled databases, making them unsuitable for comprehensive symptom analysis of single-lead and multi-lead ECG data.
A digital electrocardiogram waveform recognition and time limit parameter calculation method is adopted. By reading signals, locating waveforms, and calculating time limit parameters, combined with the cardiologist's interpretation of the waveform, a holistic analysis of P-QRS-T waves is achieved. This method is applicable to single-lead and multi-lead electrocardiogram data.
It enables accurate waveform localization and feature calculation of single-lead and multi-lead ECG data, improving the efficiency and accuracy of ECG diagnosis. It is applicable to primary hospitals in resource-scarce areas and enhances the level of heart disease diagnosis.
Smart Images

Figure CN115844416B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic electrocardiogram (ECG) diagnosis technology, specifically relating to a method for digital ECG waveform recognition and time limit parameter calculation. Background Technology
[0002] Cardiovascular diseases are characterized by rapid onset, rapid changes in condition, and high mortality rates, placing constant mental stress and high workload on medical staff in clinical practice. For Holter monitoring, doctors need to read up to 24 hours of ECG data, analyze it, and issue a diagnosis. Hospitals typically use a 12-lead ECG monitoring method, collecting 12 ECG data points from different locations simultaneously. Each heartbeat constitutes a cardiac cycle, which consists of the P wave, QRS complex, and T wave. Doctors must identify abnormal waveforms in abnormal cycles and manually calculate parameters such as the PR interval, QT interval, and heart rate to aid in diagnosis. This process, coupled with prolonged ECG reading, can easily cause visual fatigue and loss of concentration, potentially leading to missed crucial diagnostic details. In addition, due to various factors such as economy and geography, advanced medical technology cannot be popularized at the same speed in all regions, resulting in significant differences in the quality and quantity of new medical information received by different regions. This is especially true in some remote rural areas of my country, where many medical workers have little knowledge of modern medical technology due to objective limitations, there is a large shortage of experienced electrocardiogram (ECG) physicians, and most community doctors are unable to accurately measure and diagnose a routine 12-lead ECG.
[0003] Therefore, an automated diagnostic method that helps doctors quickly locate effective ECG waveforms and calculate key parameters is crucial. This method not only shortens the time doctors spend reviewing ECGs and improves their efficiency, but also, in resource-scarce underdeveloped areas, provides expert-level ECG-assisted diagnosis, effectively enhancing the diagnostic capabilities of primary hospitals in diagnosing cardiac diseases through ECG analysis. Existing automated ECG analysis technologies can be broadly categorized into two types. One type involves traditional methods, including feature extraction and feature classification or regression. These methods primarily extract waveform features, such as the R wave and QRS complex, calculate physiological parameters like the RR interval based on the waveform, and then input the extracted features into a classifier for classification. This type of method has shown good results in identifying arrhythmias. The other type utilizes deep learning networks, such as AlexNet and VGG, which learn from labeled databases to classify arrhythmias and heartbeats. Because feature extraction and classification using deep learning networks are achieved through automated learning, this type of method can more effectively utilize information from the data for more complex ECG data analysis.
[0004] However, both of the above methods have some drawbacks: For the first type, most current methods are generally singular, applicable only to the detection of a single waveform in the feature extraction step, such as locating the QRS complex or identifying the P wave alone. There is currently no technology that treats the P wave, QRS complex, T wave, and J point location as a whole. Separate waveform identification leads to the inability to simultaneously calculate subsequent parameters such as heart rate, PR interval, QT interval, and QRS duration, or it may sacrifice or interfere with the integrity of other waveforms for classification calculations. Therefore, this type of method has low accuracy and cannot handle complex ECG data. For the second type of method, methods involving deep learning require support from large, labeled databases, making them unsuitable for clinical applications. Furthermore, most convolutional networks currently used in ECG analysis process single-lead or dual-lead ECG data, failing to effectively handle the transient and subtle structural information in multi-lead ECG signals. Therefore, this type of method has limited clinical application value, and no method has yet emerged that is applicable to both single-lead and multi-lead ECGs. Summary of the Invention
[0005] The purpose of this invention is to provide a method for digital electrocardiogram (ECG) waveform recognition and time-limit parameter calculation, overcoming the shortcomings of existing technologies. This invention provides a set of methods applicable to single-lead and multi-lead ECG data, independent of labeled databases, analyzing the P-QRS-T waves as a whole, and simultaneously processing waveform localization and feature calculation. This invention effectively solves the problem of inaccurate analysis accuracy due to single waveform localization, and the application limitations of deep learning methods that rely excessively on specific databases, hindering their application in clinical and comprehensive ECG analysis.
[0006] This invention proposes a method for digital electrocardiogram (ECG) waveform recognition and time-limit parameter calculation. By transforming the ECG reading process of ECG physicians into a machine learning approach, it achieves intelligent ECG analysis. Following the ECG reading process of ECG physicians, the method includes a signal reading method, a set of waveform localization methods, and a set of time-limit parameter calculation methods. The specific steps are as follows:
[0007] (1): Signal reading method
[0008] ECG data is acquired from decimal row vector storage, and the acquired data is denoised. The denoising process includes Gaussian filtering, intermediate moving mean differentiation, and mean filtering.
[0009] (1.1): Read the ECG data, as shown in formula (A1):
[0010] β i =a i ·μ (A1)
[0011] Where: β i : Values of each output sample point; μ: Accuracy of the acquisition device; α i : The values of each input sample point;
[0012] (1.2): The signal denoising uses a denoising filter, which is a 15-bit weighted Gaussian filter that follows a standard normal distribution. It has the function of eliminating ECG signal fluctuation noise, i.e., high-frequency signals. The ECG acquisition data in step (1.1) is denoised and filtered as shown in formula (B1):
[0013]
[0014] β m ~N(μ, σ 2 )
[0015] β i : Values of each input sample point; m: Total number of sample points in the m-th period; β m : Coefficient of normal distribution; w: Window width; di : The value of each output sample point;
[0016] (2): Waveform positioning method
[0017] The ECG acquisition data after noise reduction and filtering in step (1.2) is located. The location method includes multiple location methods for P wave, QRS complex, T wave and J point. Specifically, it includes a P wave location method model, a QRS complex location method model, a T wave location method model and a J point location method model to realize the location function of P wave, QRS complex, T wave and J point.
[0018] (a) First, determine the baseline of the QRS wave. (b) Then, locate the QRS wave based on this baseline, i.e., first locate the starting point of the Q wave, then locate the ending point of the S wave, and finally locate the R wave based on the position of QS. (c) Then, determine the baselines of the P wave and T wave. (d) Then, locate the P wave and T wave based on this baseline, i.e., first determine the position of the P wave in this cycle based on the RR interval and the starting point of the Q wave in the next cycle, then locate the starting and ending points of the P wave based on the P wave position and the baseline in this step; then determine the position of the T wave in this cycle based on the RR interval and the ending point of the S wave in the previous cycle. (e) Finally, combine the Gaussian filtered data with the algorithm improved by moving integral to locate the position of point J, because one of the prerequisites for calculating the QRS wave duration is the determination of the position of point J.
[0019] (2.1) The QRS group positioning method model includes a set of bandpass filtering methods, an intermediate moving average method, a QRS group baseline method, a correction value method, a set of Q point positioning methods, a set of S point positioning methods, an R wave positioning method, and a Q wave origin positioning method, so as to realize the positioning function of QRS group;
[0020] (2.1.1) The data from step (1.2) is filtered according to (C1). The set of bandpass filtering methods is as follows:
[0021]
[0022] (2.1.2) Filter the data from step (2.1.1). The intermediate moving average method is as follows:
[0023]
[0024] w: window width; c: low-pass filter output data; i: i-th sample point;
[0025] (2.1.3) Calculate the data from step (2.1.2). The QRS group baseline method is as follows:
[0026]
[0027] n: Number of data sample points; g: Output of formula (C2);
[0028] (2.1.4) Calculate the correction value for the data from step (2.1.3). The calculation method for the correction value is as follows:
[0029] x i =c i -L Ⅰ (C4)
[0030] c: Output of the low-pass filter; i: The i-th sample point;
[0031] (2.1.5) Perform Q-point localization on the data from step (2.1.4). The calculation method for the set of Q-point localizations includes a differential algorithm, a square algorithm, an integral algorithm, and a Q-point localization algorithm to achieve the Q-point localization function. The steps are as follows:
[0032] (2.1.5.1) Filter the data from step (2.1.4). The differential method is as follows:
[0033]
[0034] ΔT: Sampling frequency; x: Output data of the differential filter (calculated using formula (C4))
[0035] (2.1.5.2) Filter the data from step (2.1.5.1). The square method is as follows:
[0036] x i =x i 2 (C6)
[0037] x: Output data of the differential filter (Formula (C5));
[0038] (2.1.5.3) Filter the data from step (2.1.5.2). The integration method is as follows:
[0039]
[0040] w: window width; x: output data of the differentiating filter;
[0041] (2.1.5.4) Calculate the data from step (2.1.5.3). The Q-point positioning method is as follows:
[0042]
[0043] J: Periodic sequence; ∈R * x: Output data of the differential filter; i: The i-th sample point; t: The time interval between two data points;
[0044] (2.1.6) The set of S-point localization methods includes a filtering algorithm and an S-point localization algorithm to realize the function of S-point localization;
[0045] (2.1.6.1) Filter the data in formula (B1). One filtering method is as follows:
[0046] x i =α·(x i-1 +d i -d i-1 (C9)
[0047] α∈(0,1); d: Gaussian filter input data; i: the i-th sample point;
[0048] (2.1.6.2) Calculate the data from step (2.1.6.1). The method for locating point S is as follows:
[0049]
[0050] w: Window width; x: Output data of the filter (Formula (C9)); J: Periodic sequence; i: The i-th sample point; n: Total number of sample points;
[0051] (2.1.6.3) Calculate the data in formula (B1) to obtain an R-wave location method, which is used to realize the R-wave positioning function; the method is as follows:
[0052]
[0053] x: Output data of the Gaussian filter; i: The i-th sample point; J: Periodic sequence; Q: Q-wave start position; S: S-wave end position;
[0054] (2.1.6.4) Calculate the data in formula (B1) to obtain a Q-wave initiation location method, which is used to locate the Q-wave initiation. The method is as follows:
[0055]
[0056] A function of the Q wave; L Ⅰ The number calculated by formula (C3); J: periodic sequence; i: sample point position;
[0057] (2.2) The P-wave positioning algorithm model includes a P-wave baseline algorithm, a P-wave positioning algorithm, and a P-wave start-point and end-point positioning algorithm to achieve the positioning function of P-waves; it includes the following steps:
[0058] (2.2.1) The P-wave baseline method is calculated by combining the data from formulas (B1) and (C12) as follows:
[0059]
[0060] d: Output data of the Gaussian filter; x: Data points of the QRS group; N: Number of sample points involved in the calculation; i: The i-th sample point;
[0061] (2.2.2) Calculate the data from formula (B1). The P-wave localization method is as follows:
[0062]
[0063] d: Output data of the Gaussian filter; J: Periodic sequence; R: R-wave position; q: Q-wave start point; i: i-th sample point;
[0064] (2.2.3) Calculate the data from formulas (B1) and (D2) to obtain the following method for locating the start and end points of a P-wave:
[0065]
[0066] P-wave data function; L Ⅱ : P wave baseline; I, II: P wave onset and end; P J P-wave; J-wave: periodic sequence;
[0067] (2.3) The T-wave localization method model includes a T-wave baseline algorithm, a T-wave localization algorithm, and a T-wave endpoint localization algorithm to achieve T-wave localization; it includes the following steps:
[0068] (2.3.1) Calculate the data from formulas (B1) and (C12) to obtain a T-wave baseline method as follows:
[0069]
[0070] d: Output data of Gaussian filter; x: QRS group data; J: Periodic sequence; N: Actual amount of data calculated; n: Total number of sample points; i: The i-th sample point;
[0071] (2.3.2) Calculate the data from formulas (B1) and (C12) to obtain a T-wave localization method as follows:
[0072]
[0073] d: Output data of Gaussian filter; i: i-th sample point; J: Periodic sequence; R: R-wave position;
[0074] (3) Time Limit Parameter Calculation Method
[0075] Based on the waveform positioning method in step (2), the positions of the P wave, QRS complex, T wave, and J point are located, and then the relevant time limit parameters are calculated using step (3). This calculation method includes a method for calculating the PR interval, a method for calculating the QRS duration, a method for calculating the QT interval, and a method for calculating the heart rate, so as to realize the function of calculating the PR interval, QRS duration, QT interval, and heart rate.
[0076] (3.1) The calculation method for a PR interval is as follows: The data from formulas (B1), (C12), and (E2) are used to calculate the PR interval.
[0077]
[0078] The position of the first cycle of an effective P wave; N: the number of effective PR intervals; The starting position of the Q wave in each cycle; The starting position of the P wave in each cycle;
[0079] (3.2) The method for calculating the QRS time limit includes a method for calculating point J and a method for calculating the QRS group time limit, which are used to realize the functions of locating the position of point J and calculating the QRS time limit;
[0080] (3.2.1) Filter the data in formula (C12) as follows:
[0081]
[0082] Gaussian filtered data function; L Ⅰ : represents the baseline value of the QRS wave; i: the i-th sample point;
[0083] Position of the S-wave in the Jth cycle;
[0084] (3.2.2) Calculate the data from formulas (B1), (C12), and (F2) as follows:
[0085]
[0086] N: Number of sample points in the QRS complex in each period; J: Periodic sequence; The position of point J in the Jth cycle; The corresponding Q-wave starting position in the Jth cycle; The R-wave amplitude corresponding to the Jth period; δ: is a constant; (3.3) Calculate the data from formulas (B1), (C12), and (E2) as follows:
[0087]
[0088] T-wave location; Q wave initiation point; N: effective number of QRS waves;
[0089] (3.4) Calculate the data from formula (C12) to achieve the function of calculating heart rate; one method for calculating heart rate is as follows:
[0090]
[0091] The amplitude of the R-wave in the Jth period; The location of point J where the last valid R wave was located; The Q wave initiation point of the cycle containing the first effective R wave; J: cycle sequence.
[0092] In this invention, formulas A1-B1 represent signal reading methods, formulas C1-E2 represent waveform localization methods, and formulas F1-F5 represent parameter calculation methods. The prerequisite for parameter calculation is determining the waveform position under correct signal reading; determining the waveform position also helps doctors achieve intelligent auxiliary diagnosis. The accuracy of waveform localization can be adjusted based on the parameter calculation results. Therefore, waveform localization and parameter calculation are closely linked. Compared with existing technologies, the beneficial effects of this invention are: First, there are many patents for methods based on the detection of various ECG signal waveforms, especially the detection of the QRS complex. However, methods applicable to both single-lead and multi-lead ECGs, and methods that can be performed step-by-step during ECG waveform localization and feature calculation without sacrificing, interfering with, or altering other characteristic waveforms, and applicable to both normal and diseased ECG waveform localization and monitoring analysis, are limited in research if feature location cannot be simultaneously determined. This prevents the simultaneous execution of subsequent related calculations (heart rate, PR interval, QT interval, QRS duration). In other words, there is a lack of research on methods that can simultaneously address the localization and feature calculation of various waveforms in both normal and diseased ECGs without being overly complex and possessing clinical application value. Secondly, this approach addresses the problem of limited or nonexistent clinical application value due to single-lead waveform localization, and the limitation of deep learning methods that over-rely on specific databases, hindering single-lead and multi-lead analysis. Therefore, this combined method can handle the localization and parameter calculation of key characteristic waveforms in single-lead, multi-lead, or twelve-lead digital ECG data under conditions of incomplete labeled databases. Attached Figure Description
[0093] To provide a more intuitive and visual understanding of each technical feature and the overall technical solution of the invention, accompanying drawings are provided below to aid in further understanding of this application. This application is not limited to providing examples.
[0094] Figure 1 It consists of the existing typical ECG signal and its main components.
[0095] Figure 2 This is a flowchart of the electrocardiogram data analysis method provided in an embodiment of the present invention.
[0096] Figure 3 This is a diagram showing the processing results provided in an embodiment of the present invention.
[0097] Figure 4 This is a result diagram of step AA1 in an embodiment of the present invention.
[0098] Figure 5 This is a result diagram of step AB1 in an embodiment of the present invention.
[0099] Figure 6This is a diagram showing the results of steps AC1 to AC12 in an embodiment of the present invention.
[0100] Figure 7 These are the results of steps AD1 to AD3 in the embodiments of the present invention.
[0101] Figure 8 This is a result diagram of steps AE1 to AE2 in an embodiment of the present invention.
[0102] Figure 9 These are the results of steps AF1 to AF5 in the embodiments of the present invention. Detailed Implementation
[0103] The invention will now be further described with reference to the accompanying drawings.
[0104] Example 1: This invention relates to a method for denoising, waveform localization, and feature calculation of electrocardiogram signals. It is a set of combined methods, including a method for reading clinical data, a denoising filter method with 15-bit weights and following a standard normal distribution, a method for calculating multiple localization points of P wave, QRS complex, T wave, and J point, and multiple methods for calculating PR interval, QRS duration, QT interval, and heart rate.
[0105] The results obtained by performing data processing using this method are as follows: Figure 3 As shown.
[0106] The specific implementation steps of this method include the following:
[0107] I. Denoising of ECG Signals
[0108] The method for reading clinical data has the function of reading twelve-lead electrocardiogram signals acquired by an electrocardiogram acquisition device and converting them into row vector data storage, including the following steps:
[0109] Step AA1: Read the collected data, as follows:
[0110] β l =a i μ
[0111] μ: Accuracy of data acquisition equipment
[0112] Where: a i The values of each input data point are 10s of data sampled at a 500Hz sampling rate, i = 1 to 5000; the accuracy of the acquisition device is 2.44µV.
[0113] Depending on the different ECG data acquisition devices, the accuracy can be obtained directly from the device itself.
[0114] The 15-bit weighted denoising filter method that follows a standard normal distribution has the function of eliminating fluctuation noise in ECG signals, i.e., high-frequency signals, and includes the following steps:
[0115] Step AB1: Perform noise reduction filtering on the data from step AA1, as follows:
[0116]
[0117] β m ~N(μ, σ 2 )
[0118] Wherein: in this embodiment, the input is 5000 sample points; i: 1~5000; w=300; β m ~(0,1) distribution.
[0119] Specifically, the method for reading clinical data has the function of reading twelve-lead ECG signals acquired by an ECG acquisition device and converting them into row vector data storage. Depending on the ECG data acquisition device, the accuracy can be directly obtained from the device. The result of step AA1 is as follows: Figure 4 As shown.
[0120] Specifically, the 15-bit weighted denoising filter method following a standard normal distribution has the function of eliminating fluctuation noise in ECG signals, i.e., high-frequency signals. μ, σ 2 These are two parameters of a normal distribution; they only need to conform to a normal distribution when set. The result of step AB1 is as follows: Figure 5 As shown.
[0121] II. Waveform Positioning
[0122] The aforementioned multiple positioning methods for P-wave, QRS complex, T-wave, and J-point include a QRS complex positioning method model, a P-wave positioning method model, a T-wave positioning method model, and a J-point positioning method model, to achieve the positioning functions of P-wave, QRS complex, T-wave, and J-point;
[0123] The QRS group localization method model includes a set of bandpass filtering methods, an intermediate moving average method, a QRS group baseline method, a correction value method, a set of Q-point localization methods, a set of S-point localization methods, an R-wave localization method, and a Q-wave origin localization method, in order to realize the localization function of QRS groups.
[0124] The QRS group localization method includes the following steps:
[0125] Step AC1: Filter the data from step AB1. The bandpass filtering method is as follows:
[0126]
[0127] Wherein: In this embodiment, ΔT = 500Hz; High-pass f c =3 / 25; low-pass f c =1 / 25; d = output data of step B1; i = 1~5000.
[0128] Specifically, in step AC1, based on the longest time limit of the QRS group, the high-pass filter formula in the formula uses f... c =25 / 3Hz; f in the low-pass filter formula c =25Hz. This bandpass filter can preserve the eigenfrequency of the QRS group and effectively remove noise.
[0129] Step AC2: Filter the data from step AC1 using the intermediate moving average method as follows:
[0130]
[0131] w: Window width
[0132] Wherein: in this embodiment w = 300; i = 1 ~ 5000; c: output data of step C1.
[0133] Specifically, the window width in step AC2 is in the range of 150 to 400, and its purpose is to find the approximate location of the QRS wave.
[0134] Step AC3: Calculate the data from step AC2 using the QRS group baseline method as follows:
[0135]
[0136] n: Data sample points
[0137] Wherein: in this embodiment, n = 5000; i = 1 to 5000; g: output data of step C2.
[0138] Step AC4: Calculate the correction value. One method for calculating the correction value is as follows:
[0139] x i =c i -L Ⅰ
[0140] Where: in this embodiment, i = 1 to 5000; c is the output value of formula C1; L Ⅰ The output of step C3. The set of Q-point localization methods includes a differential method, a square method, an integral method, and a Q-point localization method to achieve the Q-point localization function. The steps are as follows:
[0141] Step AC5: Filter the data from step AC4. One differential method is as follows:
[0142]
[0143] Wherein: in this embodiment, ΔT = 500Hz; i = 1 to 5000.
[0144] Specifically, steps AC3-AC5 are used to find the equilibrium position of the QRS wave and the change of the wave group relative to the equilibrium position; in step AC5, ΔT is the sampling frequency of the input signal, which can be substituted according to the sampling frequency of different devices.
[0145] Step AC6: Filter the data from step AC5 using the square method described below:
[0146] x i =x i 2
[0147] Where: in this embodiment, x on the right side of the formula is the output data of formula C5; i = 1 to 5000;
[0148] Step AC7: Filter the data from step AC6. One integration method is as follows:
[0149]
[0150] Where: in this embodiment, w = 300; i = 1 to 5000; x on the right side of the formula is the output data of formula C6.
[0151] Step AC8: Calculate the data from step AC7. The Q-point location method is as follows:
[0152]
[0153] J: Periodic sequence; ∈R * ;
[0154] Where: in this embodiment, x is the output data of the integral filter of formula (C7); i = 1 to 5000; J = 1 to 10; ∈ = 0.2.
[0155] Formula AC8 is a differential algorithm. First, each data point is divided into J periods according to the heartbeat, and then the Q wave is located for each period.
[0156] Specifically, steps AC6-AC8 are used to determine the Q wave initiation point; ω in step AC7 represents the window width.
[0157] The aforementioned set of S-point localization methods includes a filtering method and an S-point localization method to achieve the function of S-point localization;
[0158] Step AC9: Filter the data from step AB1. One filtering method is as follows:
[0159] x i =α·(x i-1 +d i -d i-1 )
[0160] α∈(0,1);
[0161] Where: in this embodiment, i = 1 to 5000; d is the output data of step B1.
[0162] The calculation of formula AC9 is based on the characteristics of S-waves, which have a sudden change before the end. An algorithm was designed to locate the position of this sudden change.
[0163] Step AC10: Calculate the data from step AC9. The method for locating point S is as follows:
[0164]
[0165] W: Window width; x: Output data of the filter (Formula C9); J: Periodic sequence; i: Sample point position;
[0166] Wherein: in this embodiment, w = 300; J = 1 to 10; n = 5000; i = 1 to 5000; x is the output data of step C9.
[0167] Formula (C10) is a mean averaging algorithm. First, the output data of formula (C9) is divided into J periods according to the heartbeat. Then, the data in each period is averaged. Finally, the position of the maximum value of the data in each period is found.
[0168] Specifically, steps AC9 and AC10 determine the S-wave endpoint; in the formula of step AC10, ω represents the window width, J represents the period sequence, and n represents the maximum value of the data points in that period. Step AC11 calculates the data from step AB1 to establish an R-wave location method, which is used to locate the R-wave; the method is as follows:
[0169]
[0170] x: Output data of the Gaussian filter; i: Sample point position; J: Periodic sequence; Q: Q-wave start position; S: S-wave end position;
[0171] Wherein: in this embodiment, x is the output data of formula (B1); i = 1 to 5000; J = 1 to 10; Q is the positioning point calculated by formula (C8); S is the positioning point calculated by formula (C10).
[0172] In formula (C11), firstly, the Gaussian filtered data is divided into J periods according to the heartbeat. Then, after determining the endpoints of the Q wave and S wave, the maximum value of the modulus of the data at the two point positions is taken.
[0173] Step AC12: Calculate the data from step AB1 to implement the Q-wave origin location method, which is used to locate the Q-wave origin. The method is as follows:
[0174]
[0175] A function of the Q wave; L Ⅰ The number calculated by formula (C3); J: periodic sequence;
[0176] In this embodiment, The output of formula (C8) consists of 5000 data points, divided into 10 periods; L Ⅰ The number calculated by formula (C3) is the baseline of the QRS group.
[0177] Formula (C12) determines the starting point of the Q wave by calculating the intersection of the Q wave with the baseline of the QRS complex.
[0178] Specifically, steps AC1-AC12 are used to determine the QRS complex; the results are as follows: Figure 6 As shown.
[0179] The aforementioned P-wave localization method model includes a P-wave baseline method, a P-wave localization method, and a P-wave initiation and termination localization method to achieve P-wave localization functionality; it includes the following steps:
[0180] Step AD1: Calculate the data from steps AB1 and AC12. The P-wave baseline method is as follows:
[0181]
[0182] d: Data output by formula (B1); x: Data points calculated by formulas (C12) and (C10); N: Number of sample points involved in the calculation;
[0183] Wherein: in this embodiment and x J , where Q-wave origin and J-wave origin are the data points, respectively; d is the data output by the Gaussian filter; and N is the number of data points actually involved in the calculation.
[0184] The premise of formula (D1) is that, firstly, the cycle is divided according to the heartbeat, then the QRS complex is filtered according to formulas (C1-C10) and (C12), and the filtered data is then averaged using formula D1 to determine the P wave baseline value.
[0185] Specifically, the formula in step AD1 is used to determine the equilibrium position of the P-wave; N represents the total number of data points for the P-wave.
[0186] Step AD2: Calculate the data from step AB1. The P-wave localization method is as follows:
[0187]
[0188] d: Gaussian filtered data; J: Periodic sequence; R: R-wave position; q: Q-wave starting point; Wherein: In this embodiment, d is the output data of formula B1; γ = 0.3; J = 10; x q : The starting position of the Q wave in each cycle; R J : The position of the R wave in each cycle.
[0189] To use formula (D2), firstly, the Gaussian filtered data is divided into J cycles according to the heartbeat. Then, the starting positions of the R wave and Q wave in each cycle are determined according to formula (C1-C12). Finally, the P wave is selected based on the amplitude of the located P wave.
[0190] Step AD3: Calculate the data from steps AB1 and AD2. The method for locating the start and end points of a P-wave is as follows:
[0191]
[0192] P-wave data function; L Ⅱ : P wave baseline; I, II: P wave onset and end; P J P wave; J: periodic sequence
[0193] Wherein: J = 10 in this embodiment; the P-wave data function is the output data of formula (D2); the P-wave baseline is the output value of formula D2.
[0194] To use formula (D3), first, calculate the P wave baseline; then locate the P wave position based on the heart rate; finally, locate the left and right sides of the P wave relative to the zero point of the P wave baseline.
[0195] Specifically, in formulas AD2 and AD3, J represents the period sequence in which the P wave belongs, and L in formula AD3... ⅡIndicates the P-wave baseline; steps AD1-AD3 are used to determine the P-wave; the results are as follows: Figure 7 As shown.
[0196] The T-wave localization method model includes a T-wave baseline method, a T-wave localization method, and a T-wave endpoint localization method to achieve T-wave localization; it includes the following steps:
[0197] Step AE1: Calculate the data from steps AB1 and AC12. The T-wave baseline method is as follows:
[0198]
[0199] d: Gaussian filter output data; x: QRS group data; J: periodic sequence; N: actual calculated data volume;
[0200] Wherein: In this embodiment, d is the output data of formula B1; i = 1 to 5000; J = 1 to 10; x is the data calculated by formulas (C1) to (C12).
[0201] Regarding the use of formula (E1), this formula is an algorithm for calculating the T-wave baseline. First, the original data needs to be preprocessed and divided into periods according to heartbeats. Then, QRS wave features are extracted. Finally, the actual data volume of each period is calculated according to the periodic sequence based on the remaining data, and the mean is calculated to obtain the result. Step AE2: Calculate the data from steps AB1 and AC12. The T-wave localization method is as follows:
[0202]
[0203] d: Output data of Gaussian filter; i: Data point position; J: Periodic sequence; R: R-wave position;
[0204] Wherein: In this embodiment, d is the output data of formula B1, with a total of 5000 values; J = 10; i = 1 to 5000; R is the R-wave position located by formula (C11).
[0205] For formula (E2), the raw data first needs to be preprocessed, then the cycle is divided according to the heartbeat, and then the R wave is feature extracted. The T wave is then extracted based on the R wave position (formula C11) and the J point position (formula F2). Specifically, in step AE1, N in the formula represents the total number of T wave data points, and L... Ⅱ This represents the T-wave baseline; in step AE2, J represents the period sequence in which the wave belongs; steps E1-E2 determine the T-wave; the results are as follows. Figure 8 As shown.
[0206] The methods for calculating the PR interval, QRS duration, QT interval, and heart rate include a method for calculating the PR interval, a method for calculating the QRS duration, a method for calculating the QT interval, and a method for calculating the heart rate, to achieve the function of calculating the PR interval, QRS duration, QT interval, and heart rate; including the following steps AF1 to AF5:
[0207] Step AF1: Calculate the data from steps AB1, AC12, and AE2. The PR interval method is as follows:
[0208]
[0209] The position of the first cycle of an effective P wave; N: the number of effective PR intervals; The starting position of the Q wave in each cycle; The starting position of the P wave in each cycle;
[0210] In this embodiment, J = 10, the P-wave starting point is the output data of formula D3, the Q-wave starting point is the output data of formula C12, and N is the actual number of sample points calculated between the P and Q-wave starting points for each cycle. The method for calculating the QRS time limit includes a method for calculating the J-point and a method for calculating the QRS time limit, used to locate the J-point and calculate the QRS time limit.
[0211] Step AF2: Filter the data from step AC12 as follows:
[0212]
[0213] Gaussian filtered data function; L Ⅰ : represents the baseline value of the QRS wave; i: the location of the sample point; Position of the S-wave in the Jth cycle;
[0214] In this embodiment, For the output data of formula B1, L Ⅰ S is the result of formula C3. J The positioning result is for formula (C10), where J = 1 to 10; i = 1 to 5000.
[0215] To use formula (F2), firstly, the original data needs to be preprocessed, then divided into periods according to heartbeats, then the baseline of the QRS wave is calculated and the position of the S wave in each period is located, and finally the J point is located in each period.
[0216] Step AF3: Calculate the data from steps AB1, AC12, and AF2 as follows:
[0217]
[0218] J: Periodic sequence; The position of point J in the Jth cycle; The corresponding Q-wave starting position in the Jth cycle; The R-wave amplitude corresponding to the J-th cycle; δ: is a constant;
[0219] In this embodiment, J = 1 to 10; The positioning results for formulas (F2) and (C12); δ = 0.7; R-wave amplitude value for each of the 10 cycles.
[0220] The calculation of the QRS duration requires the original data to be preprocessed, firstly divided into periods, and then subsequent calculations are performed in each period; firstly, the effective period is selected based on the R wave amplitude, then the J point and Q wave start point in each effective period are extracted, and finally the QRS duration is calculated.
[0221] Step AF4: Calculate the data from steps AB1, AC12, and AE2 as follows:
[0222]
[0223] T-wave location; Q wave start point; N: effective period number. Wherein: In this embodiment... The result of step AE2, The result of step AC12 is N, which is the effective period of the heartbeat, obtained during the calculation.
[0224] For the use of formula (F4), after the original data is preprocessed and divided into periods, the effective period is first extracted based on the R wave amplitude, and then the T wave and Q wave starting points of each effective period are extracted based on formula (E2) and formula (C12). Finally, the average value of the QT time limit of each effective period is calculated.
[0225] Step AF5: Calculate the data from step AC12 to achieve the function of calculating heart rate; one method for calculating heart rate is as follows:
[0226]
[0227] The amplitude of the R-wave in the Jth period; The location of point J where the last valid R wave was located; The starting point of the Q wave in the cycle containing the first effective R wave;
[0228] In this embodiment, The result of formula C11 is J = 10. The result of formula F2, The result of formula C12 is δ = 0.7.
[0229] The use of formula (F5) requires the following steps after preprocessing the original data and dividing it into periods: first, extract the R wave; then, extract the effective period based on the R wave amplitude; then, locate the Q wave start point and J point of each period using formulas F2 and C12, as well as other formulas related to these two formulas; and finally, calculate the heart rate.
[0230] Specifically, in steps AF1, AF3, and AF4, N represents the total number of sample points included in each interval; in steps AF3 and AF5, J represents the period sequence; the function of steps AF1-AF5 is to calculate the PR interval, QRS duration, QT interval, and heart rate based on the waveform localization results; the results are as follows... Figure 9 As shown.
Claims
1. A method for digital electrocardiogram waveform recognition and time limit parameter calculation, characterized in that: This paper proposes a method based on electrocardiogram (ECG) reading techniques employed by ECG physicians. This method transforms the physician's interpretation of ECGs into a machine-based approach, thereby achieving intelligent ECG analysis. Following the physician's interpretation method, the approach includes a signal reading method, a set of waveform localization methods, and a set of time-limit parameter calculation methods. The specific steps are as follows: (1): Signal reading method ECG data is acquired from decimal row vector storage, and the acquired data is denoised. The denoising process includes Gaussian filtering, intermediate moving mean differentiation, and mean filtering. (1.1): Read the ECG data, formula (A1): b i =a i ·m (A1) Where: β i : Values of each output sample point; μ: Accuracy of the acquisition device; α i : The values of each input sample point; (1.2): The signal denoising uses a denoising filter, which is a 15-bit weighted Gaussian filter that follows a standard normal distribution. It has the function of eliminating the fluctuation noise of the ECG signal, i.e., the high-frequency signal. The ECG data acquired in step (1.1) is denoised using formula (B1): b m ~N(μ,σ 2 ) β i : Values of each input sample point; m: Total number of sample points in the m-th period; β m : Coefficient of normal distribution; w: Window width; d i : The value of each output sample point; (2): Waveform positioning method The ECG acquisition data after noise reduction and filtering in step (1.2) is used for localization. The localization method includes multiple localization algorithms for P wave, QRS complex, T wave and J point. Specifically, it includes a P wave localization method model, a QRS complex localization method model, a T wave localization method model and a J point localization method model to realize the localization function of P wave, QRS complex, T wave and J point. (a) First, determine the baseline of the QRS wave. (b) Then, locate the QRS wave based on the baseline, i.e., first locate the starting point of the Q wave, then locate the ending point of the S wave, and finally locate the R wave based on the position of QS. (c) Then, determine the baseline of the P wave and T wave. (d) Then, locate the P wave and T wave based on the baseline, i.e., first determine the position of the P wave in the current cycle based on the RR interval and the starting point of the Q wave in the next cycle, then locate the starting and ending points of the P wave based on the P wave position and the baseline in this step; then determine the position of the T wave in the current cycle based on the RR interval and the ending point of the S wave in the previous cycle. (e) Finally, locate the position of the J point by combining the Gaussian filtered data with the improved algorithm of moving integral. The location of the J point is a prerequisite for the subsequent calculation of the QRS wave duration. (2.1) The QRS group positioning method model includes a set of bandpass filtering methods, an intermediate moving average method, a QRS group baseline method, a correction value method, a set of Q point positioning methods, a set of S point positioning methods, an R wave positioning method, and a Q wave origin positioning method, so as to realize the positioning function of QRS group; (2.1.1) The data from step (1.2) is filtered according to (C1). The set of bandpass filtering methods is as follows: (2.1.2) Filter the data from step (2.1.1). The intermediate moving average method is as follows: w: window width; c: low-pass filter output data; i: i-th sample point; (2.1.3) Calculate the data from step (2.1.2). The QRS group baseline method is as follows: n: Number of data sample points; g: Output of formula (C2); (2.1.4) Calculate the correction value for the data from step (2.1.3). The calculation method for the correction value is as follows: x i =c i -L Ⅰ (C4) c: Output data of the low-pass filter; i: The i-th sample point; (2.1.5) Perform Q-point localization on the data from step (2.1.4). The calculation method for the set of Q-point localizations includes a differential algorithm, a square algorithm, an integral algorithm, and a Q-point localization algorithm to achieve the Q-point localization function. The steps are as follows: (2.1.5.1) Filter the data from step (2.1.4). The differential method is as follows: ΔT: Sampling frequency; x: Output data of the differential filter (calculated using formula (C4)); (2.1.5.2) Filter the data from step (2.1.5.1). The square method is as follows: x i =x i 2 (C6) x: Output data of the differential filter (Formula (C5)); (2.1.5.3) Filter the data from step (2.1.5.2). The integration method is as follows: w: window width; x: output data of the differentiating filter; (2.1.5.4) Calculate the data from step (2.1.5.3). The Q-point positioning method is as follows: J: Periodic sequence; ∈R * x: Output data of the differential filter; i: The i-th sample point; t: The time interval between two data points; (2.1.6) The set of S-point localization methods includes a filtering algorithm and an S-point localization algorithm to realize the function of S-point localization; (2.1.6.1) Filter the data in formula (B1). One filtering method is as follows: x i =α·(x i-1 +d i -d i-1 ) (C9) α∈(0,1); d: output data of Gaussian filter; i: the i-th sample point; (2.1.6.2) Calculate the data from step (2.1.6.1) to obtain the S-point positioning method. as follows: w: Window width; x: Output data of the differential filter (Formula (C9)); J: Periodic sequence; i: The i-th sample point; n: Total number of sample points; (2.1.6.3) Calculate the data in formula (B1) to obtain an R-wave location method, which is used to realize the R-wave positioning function; the method is as follows: x: Output data of the differential filter; i: i-th sample point; J: Periodic sequence; Q: Q-wave start position; S: S-wave end position; (2.1.6.4) Calculate the data in formula (B1) to obtain a Q-wave initiation location method, which is used to locate the Q-wave initiation. The method is as follows: A function of the Q wave; L Ⅰ The number calculated by formula (C3); J: periodic sequence; i: the i-th sample point; (2.2) The P-wave positioning algorithm model includes a P-wave baseline algorithm, a P-wave positioning algorithm, and a P-wave start-point and end-point positioning algorithm to achieve the positioning function of P-waves; it includes the following steps: (2.2.1) The P-wave baseline method is calculated by combining the data from formulas (B1) and (C12) as follows: d: Output data of the Gaussian filter; x: Data points of the QRS group; N: Number of sample points involved in the calculation; i: The i-th sample point; (2.2.2) Calculate the data from formula (B1). The P-wave localization method is as follows: d: Output data of the Gaussian filter; J: Periodic sequence; R: R-wave position; q: Q-wave start point; i: i-th sample point; (2.2.3) Calculate the data from formulas (B1) and (D2) to obtain the following method for locating the start and end points of a P-wave: P-wave data function; L Ⅱ : P wave baseline; I, II: P wave onset and end; P J P-wave; J-wave: periodic sequence; (2.3) The T-wave localization method model includes a T-wave baseline algorithm, a T-wave localization algorithm, and a T-wave endpoint localization algorithm to achieve T-wave localization; it includes the following steps: (2.3.1) Calculate the data from formulas (B1) and (C12) to obtain a T-wave baseline method as follows: d: Output data of Gaussian filter; x: QRS group data; J: Periodic sequence; N: Actual calculated data volume; n: Total number of sample points; i: The i-th sample point; (2.3.2) Calculate the data from formulas (B1) and (C12) to obtain a T-wave localization method as follows: d: Output data of the Gaussian filter; i: The i-th sample point; J: Periodic sequence; R: R-wave position; (3) Time Limit Parameter Calculation Method Based on the waveform positioning method in step (2), the positions of the P wave, QRS complex, T wave, and J point are located, and then the relevant time limit parameters are calculated using step (3). This calculation method includes a method for calculating the PR interval, a method for calculating the QRS duration, a method for calculating the QT interval, and a method for calculating the heart rate, so as to realize the function of calculating the PR interval, QRS duration, QT interval, and heart rate. (3.1) The calculation method for a PR interval is as follows: The data from formulas (B1), (C12), and (E2) are used to calculate the PR interval. The position of the first cycle of an effective P wave; N: the number of effective PR intervals; The starting position of the Q wave in each cycle; The starting position of the P wave in each cycle; (3.2) The method for calculating QRS time limit includes a method for calculating point J and a method for calculating QRS group time limit, which are used to realize the functions of locating the position of point J and calculating QRS time limit; (3.2.1) Filter the data in formula (C12) as follows: Gaussian filtered data function; L Ⅰ : represents the baseline value of the QRS wave; i: the i-th sample point; Position of the S-wave in the Jth cycle; (3.2.2) Calculate the data from formulas (B1), (C12), and (F2) as follows: N: Number of sample points in the QRS complex in each period; J: Periodic sequence; The position of point J in the Jth cycle; The corresponding Q-wave starting position in the Jth cycle; The R-wave amplitude corresponding to the J-th cycle; δ: is a constant; (3.3) Calculate the data from formulas (B1), (C12), and (E2) as follows: T-wave location; Q wave initiation point; N: effective number of QRS waves; (3.4) Calculate the data from formula (C12) to achieve the function of calculating heart rate; one method for calculating heart rate is as follows: The R-wave amplitude value of the Jth period; The location of point J where the last valid R wave was located; The Q wave initiation point of the cycle containing the first effective R wave; J: cycle sequence.
Citation Information
Patent Citations
Electrocardiosignal acquisition system and method
CN111248896A