Dynamic electrocardiogram wave band analysis method
Through the DeepFilter model and cache queue technology, the accuracy problem of traditional ECG band analysis in dynamic situations is solved, efficient identification and analysis of dynamic ECG is achieved, and the influence of human body differences and interference is overcome.
Patent Information
- Application Number
- CN202410929722.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-27
AI Technical Summary
The traditional ECG band analysis method reduces the analysis accuracy due to human body differences and interference under dynamic conditions, and it is difficult to achieve real-time dynamic analysis.
The DeepFilter model is used to remove baseline drift and smooth filtering of dynamic ECG data. The data is gradually analyzed through the cache queue, the differential value is calculated and non-zero differentials are filtered, and the ECG waveform characteristics are identified by combining PQRST wave group analysis.
It improves the accuracy and real-time performance of ECG waveform analysis, overcomes the influence of human body differences and interference, and achieves effective analysis of dynamic ECG.
Smart Images

Figure CN118697360A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram waveform recognition, and in particular to a dynamic electrocardiogram wave band analysis method. Background Art
[0002] Traditional ECG band analysis methods usually use heartbeat detection algorithms to identify the starting and ending points of each heartbeat before R wave detection and peak location. However, due to individual differences, even in a quiet state, the ECG data of healthy people also have certain differences, such as differences in amplitude, P wave, T wave, etc. However, the ECG data will be more disturbed in dynamic conditions, which will undoubtedly affect the analysis accuracy of ECG waveform data. In addition, ECGs are usually obtained under long-term monitoring. If real-time ECGs are to be analyzed, they need to be segmented, rather than caching all ECG data first and then analyzing them one by one. Therefore, attention should also be paid to how to achieve dynamic analysis of ECGs. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a dynamic electrocardiogram band analysis method.
[0004] The objective of the present invention is achieved through the following technical solutions: A dynamic electrocardiogram band analysis method comprises the following steps: S1: Obtain the sampling data of the dynamic electrocardiogram to be analyzed, and add it to the cache queue to be analyzed; S2: Determine whether the cache has reached the analyzable quantity threshold t. If not, return to step S1 to continue adding new data. If yes, extract t data points from the cache. S3: Using the DeepFilter model to remove baseline drift and smooth filter t ECG data points; S4: Calculate the differential of the processed ECG waveform, filter the non-zero differential and T wave differential, and output the maximum differential value set of each non-zero segment; S5: Determine whether the number of differentials is greater than zero. If not, return to step S1 to continue adding new data. If yes, continue to step S6; S6: Perform PQRST wave group analysis on the ECG waveform according to the differential maximum value set of each non-zero segment output, and store the recognition result in the PQRST wave group information result; S7: Erasing the analyzed ECG data in the cache queue, returning to and looping through steps S1-S6.
[0005] Furthermore, the analyzable quantity threshold t is set to 1024, and 1024 data points include at least two complete cardiac cycles.
[0006] Furthermore, the DeepFilter model includes several cascaded filtering modules and convolution layers, and the filtering module is used to aggregate the output results of the input image data calculated by convolution kernels of different scales and different activation modes; the scale sizes are 3, 5, 9, and 15 respectively, and the activation modes include linear activation and nonlinear activation.
[0007] Furthermore, the differential of the calculated ECG waveform specifically includes: Obtain an ECG data graph after removing baseline drift and smoothing filtering, where the horizontal axis of the ECG data graph represents time and the vertical axis represents voltage; The continuous ECG data is differentiated at every 4 time intervals to obtain a differential value representing the slope information of the ECG data, and a differential curve of the ECG data is drawn according to the differential value.
[0008] Furthermore, the specific steps of filtering non-zero differentials include: The 1 / 2 of the second largest differential value of the current segment of ECG in the differential curve is used as the threshold to filter the differentials of P and T waves; Calculate the average value of the time span of the non-zero differential to filter out the ECG that changes suddenly and quickly in the ECG; The segment with the largest horizontal span and the fastest change is determined as the RS segment.
[0009] Furthermore, the T wave differential filtering method is: The non-zero waveforms with a heart rate BMP greater than 200 between two adjacent non-zero waveforms are screened out, and the waveform with a larger span in the horizontal direction is marked as a suspected T wave; Determine the amplitudes of the two non-zero waveforms, and determine whether the amplitude of the waveform with a larger horizontal span is less than half of the amplitude of the waveform with a smaller horizontal span. If so, determine that the suspected T wave is a T wave, otherwise, invalidate the ECG data and remove it from the cache queue.
[0010] Furthermore, the specific steps of performing PQRST wave group analysis on the ECG waveform according to the output differential maximum value set of each non-zero segment include: In the differential maximum value set, find the point with the maximum amplitude in every 0.1s time period, record it as the R wave position, and the amplitude of the R wave is represented by r; Find the trough point closest to the current R wave position at 1 / 2r ahead of the R wave position as the Q wave position; Find the trough point closest to the current R wave position at 1 / 2r behind the R wave position as the S wave position; Find the wave peak point closest to the R wave position within the 1 / 2r position range ahead of the R wave position as the suspected P wave position; determine whether the peak-to-peak value of the P wave suspected position and the Q wave position is greater than 3% of the peak-to-peak value of the R wave position and the Q wave position. If so, the suspected P wave position is determined to be the P wave position; The maximum peak point in the data from the S wave position to the position 1 / 2r behind the R wave position is taken as the T wave.
[0011] The beneficial effects of the present invention are: The present invention effectively combines artificial intelligence with traditional methods, provides a method for dynamically acquiring data cache to analyze ECG data, and solves the problem of inaccurate ECG wave analysis caused by human body differences based on the characteristics of artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a schematic diagram of the cardiac cycle analysis process of the present invention; Figure 2 It is a schematic diagram of each data processing process in the present invention; Figure 3 It is the DeepFilter network structure; Figure 4 It is the result of data file processed by DeepFilter network structure; Figure 5 is the differential result of the central electrical waveform of the present invention; Figure 6 This is the identification result of the PQRST wave group analysis in the present invention. DETAILED DESCRIPTION
[0013] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0014] See also Figure 1-Figure 6 , the present invention provides a technical solution: A dynamic electrocardiogram band analysis method, such as Figure 1 and Figure 2 , including the following steps: S1: Obtain the sampling data of the dynamic electrocardiogram to be analyzed and add it to the cache queue to be analyzed; S2: Determine whether the cache has reached the analyzable quantity threshold t. If not, return to step S1 to continue adding new data. If yes, extract t data points from the cache. Furthermore, the analyzable quantity threshold t is calculated based on the frequency of the ECG collector that obtains the dynamic ECG data to be analyzed. In this embodiment, the analyzable quantity threshold t is set to 1024, and 1024 data points include at least two complete cardiac cycles. Taking the GECG-100 ECG collector as an example, its sampling frequency is 256Hz, so the time for one reasoning analysis is 2s. If a person's ECG has an abnormal situation at a certain time (no ECG within 2s), then missed detection will occur. At this time, there will be many situations for the interception of the cardiac cycle within 2s, which may include less than 2 complete cardiac cycles. Therefore, the value of the analyzable quantity threshold t is set to 1024 in this embodiment. The present invention can extend the time to 4s by reasoning on 1024 data. According to the estimation of the ECG law of normal people, at least 2 complete cardiac cycles will appear, which can ensure better completion of the heartbeat classification of the entire cardiac cycle.
[0015] S3: Using the DeepFilter model to remove baseline drift and smooth filter t ECG data points; In order to solve the problem that the original data often has baseline drift and interference caused by hardware failure, which causes waveform distortion, this embodiment uses the DeepFilter model to infer the ECG data to remove the baseline drift and perform smoothing filtering. Figure 3 The DeepFilter model shown in the figure includes several cascaded filtering modules and convolutional layers.
[0016] In this embodiment, Figure 3 , the convolution kernel size of the convolution layer is k=9, the number of filter modules MKLNAL is 6, where N is the number of convolution filters in MKLNAL; the filter module MKLNAL is used to aggregate the output results of the input image data calculated by convolution kernels of different scales and different activation modes; the scale sizes are 3, 5, 9, and 15 respectively, and the activation modes include linear activation and nonlinear activation, wherein the larger the scale setting, the easier it is to use to analyze low-frequency signals.
[0017] DeepFilter can handle baseline drift and smoothing filtering very well. The data processed by the DeepFilter model is as follows: Figure 4 , which provides great help for subsequent ECG cycle analysis, heart rate analysis and arrhythmia analysis, and can greatly increase its success rate.
[0018] S4: Calculate the differential of the processed ECG waveform, filter the non-zero differential and T wave differential, and output the maximum differential value set of each non-zero segment; Furthermore, the differential of the calculated ECG waveform specifically includes: Obtain an ECG data graph after removing baseline drift and smoothing filtering, where the horizontal axis of the ECG data graph represents time and the vertical axis represents voltage; The continuous ECG data is differentiated every 4 time intervals to obtain the differential value representing the slope information of the ECG data. The differential curve of the ECG data is drawn according to the differential value. The differential processing result is as follows: Figure 5 shown.
[0019] The specific steps of filtering non-zero differentials include: The 1 / 2 of the second largest differential value of the current segment of ECG in the differential curve is used as the threshold to filter the differentials of P and T waves; Calculate the average value of the time span of the non-zero differential to filter out the ECG that changes suddenly and quickly in the ECG; The segment with the largest horizontal span and the fastest change is determined as the RS segment.
[0020] Furthermore, the T wave differential filtering method is: The non-zero waveforms with a heart rate BMP greater than 200 between two adjacent non-zero waveforms are screened out, and the waveform with a larger span in the horizontal direction is marked as a suspected T wave; Determine the amplitudes of the two non-zero waveforms, and determine whether the amplitude of the waveform with a larger horizontal span is less than half of the amplitude of the waveform with a smaller horizontal span. If so, determine that the suspected T wave is a T wave, otherwise, invalidate the ECG data and remove it from the cache queue.
[0021] S5: Determine whether the number of differentials is greater than zero. If not, return to step S1 to continue adding new data. If yes, continue to step S6; S6: Perform PQRST wave group analysis on the ECG waveform according to the differential maximum value set of each non-zero segment output, and store the recognition result in the PQRST wave group information result. The specific steps include: In the differential maximum value set, find the point with the maximum amplitude in every 0.1s time period, record it as the R wave position, and the amplitude of the R wave is represented by r; Find the trough point closest to the current R wave position at 1 / 2r ahead of the R wave position as the Q wave position; Find the trough point closest to the current R wave position at 1 / 2r behind the R wave position as the S wave position; Find the peak point closest to the R wave position within the 1 / 2r position range in front of the R wave position as the suspected P wave position; determine whether the peak-to-peak value of the P wave suspected position and the Q wave position is greater than 3% of the peak-to-peak value of the R wave position and the Q wave position. If so, the suspected P wave position is determined to be the P wave position; because the P wave is the judgment condition for atrial flutter and atrial fibrillation, it is very important whether it can be detected in arrhythmia analysis.
[0022] The maximum peak point in the data from the S wave position to the 1 / 2R position behind the R wave position is taken as the T wave. The T wave can be used as a standard to judge whether the cardiac cycle analysis is complete.
[0023] The identification results of PQRST wave group analysis are as follows Figure 6 shown.
[0024] S7: Erase the analyzed ECG data in the cache queue, return and loop through steps S1-S6. After each analysis is completed, check the cache queue to be analyzed. If there are still more than 1024 data points, recursive analysis will be performed until the analysis is completed, that is, loop through steps S1-S6.
[0025] In step S7, the ECG data that have been analyzed in the cache queue are erased. After the analysis of one cardiac cycle is completed, the data position to be erased is calculated from all cardiac cycles. Considering that no cardiac cycle can be missed, the data from the 1 / 2 position to the end of the last RR interval of one analysis is left for the next analysis, that is, the last QRS wave is left for analysis each time.
[0026] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A dynamic electrocardiogram band analysis method, characterized in that: The following steps are involved: S1: Obtain the sampling data of the dynamic electrocardiogram to be analyzed and add it to the cache queue to be analyzed; S2: Determine whether the cache has reached the analyzable quantity threshold t. If not, return to step S1 to continue adding new data. If yes, extract t data points from the cache. S3: Using the DeepFilter model to remove baseline drift and smooth filter t ECG data points; S4: Calculate the differential of the processed ECG waveform, filter the non-zero differential and T wave differential, and output the maximum differential value set of each non-zero segment; S5: Determine whether the number of differentials is greater than zero. If not, return to step S1 to continue adding new data. If yes, continue to step S6; S6: Perform PQRST wave group analysis on the ECG waveform according to the differential maximum value set of each non-zero segment output, and store the recognition result in the PQRST wave group information result; S7: Erasing the analyzed ECG data in the cache queue, returning to and looping through steps S1-S6.
2. A dynamic electrocardiogram band analysis method according to claim 1, characterized in that: The analyzable quantity threshold t is set to 1024, and 1024 data points include at least two complete cardiac cycles.
3. A dynamic electrocardiogram band analysis method according to claim 1, characterized in that: The DeepFilter model includes several cascaded filter modules and convolution layers. The filter module is used to aggregate the output results of the input image data calculated by convolution kernels of different scales and activation modes; the scale sizes are 3, 5, 9, and 15 respectively, and the activation modes include linear activation and nonlinear activation.
4. The method for analyzing dynamic electrocardiogram bands according to claim 1, characterized in that: The differential of the ECG waveform after the calculation process specifically includes: Obtain an ECG data graph after removing baseline drift and smoothing filtering, where the horizontal axis of the ECG data graph represents time and the vertical axis represents voltage; The continuous ECG data is differentiated at every 4 time intervals to obtain a differential value representing the slope information of the ECG data, and a differential curve of the ECG data is drawn according to the differential value.
5. A dynamic electrocardiogram band analysis method according to claim 4, characterized in that: The specific steps of filtering non-zero differentials include: The 1 / 2 of the second largest differential value of the current segment of ECG in the differential curve is used as the threshold to filter the differentials of P and T waves; Calculate the average value of the time span of the non-zero differential to filter out the ECG that changes suddenly and quickly in the ECG; The segment with the largest horizontal span and the fastest change is determined as the RS segment.
6. A dynamic electrocardiogram band analysis method according to claim 5, characterized in that: The T wave differential filtering method is: The non-zero waveforms with a heart rate BMP greater than 200 between two adjacent non-zero waveforms are screened out, and the waveform with a larger span in the horizontal direction is marked as a suspected T wave; Determine the amplitudes of the two non-zero waveforms, and determine whether the amplitude of the waveform with a larger horizontal span is less than half of the amplitude of the waveform with a smaller horizontal span. If so, determine that the suspected T wave is a T wave, otherwise, invalidate the ECG data and remove it from the cache queue.
7. A dynamic electrocardiogram band analysis method according to claim 6, characterized in that: The specific steps of performing PQRST wave group analysis on the ECG waveform according to the differential maximum value set of each non-zero segment output include: In the differential maximum value set, find the point with the maximum amplitude in every 0.1s time period, record it as the R wave position, and the amplitude of the R wave is represented by r; Find the trough point closest to the current R wave position at 1 / 2r ahead of the R wave position as the Q wave position; Find the trough point closest to the current R wave position at 1 / 2r behind the R wave position as the S wave position; Find the wave peak point closest to the R wave position within the 1 / 2r position range ahead of the R wave position as the suspected P wave position; determine whether the peak-to-peak value of the P wave suspected position and the Q wave position is greater than 3% of the peak-to-peak value of the R wave position and the Q wave position. If so, the suspected P wave position is determined to be the P wave position; The maximum peak point in the data from the S wave position to the position 1 / 2r behind the R wave position is taken as the T wave.
Citation Information
Cited By
Data analysis method, equipment, electronic device, and storage media
TWI909785B
