Atrial fibrillation detection method and device, electronic equipment and storage medium

By analyzing the changes in the RR interval ratio and RR entropy of electrocardiogram signals, removing QRST waves and performing clustering, and combining R wave and P wave characteristics, atrial fibrillation signals are accurately identified, solving the problem of false detection in existing technologies and improving the accuracy of atrial fibrillation detection.

CN116269253BActive Publication Date: 2026-07-10WUHAN ZHONGQI BIOLOGICAL MEDICAL ELECTRONICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN ZHONGQI BIOLOGICAL MEDICAL ELECTRONICS
Filing Date
2023-03-16
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing electrocardiogram signal analysis methods cannot accurately identify atrial fibrillation signals and are prone to misdiagnosing non-atrial fibrillation arrhythmias as atrial fibrillation.

Method used

By acquiring electrocardiogram signals, the ratio change of adjacent RR intervals and RR entropy are determined, QRST waves are removed, atrial signals are clustered, and combined with the R wave distribution pattern and P wave detection, it is determined whether atrial fibrillation signals exist.

Benefits of technology

It improves the accuracy of ECG signal classification, avoids misclassification of non-atrial fibrillation types, and enhances the accuracy of atrial fibrillation detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116269253B_ABST
    Figure CN116269253B_ABST
Patent Text Reader

Abstract

The application provides an atrial fibrillation detection method and device, electronic equipment and storage medium, the method comprises the following steps: acquiring an electrocardiosignal; determining the ratio change of adjacent RR intervals in the electrocardiosignal; equally spacing the multiple RR intervals in the electrocardiosignal into multiple groups, determining the RR interval distribution probability in each group, and determining the RR entropy based on the distribution probability; determining the R wave distribution rule in the electrocardiosignal based on the ratio change of adjacent RR intervals and the RR entropy; removing the QRST wave in the electrocardiosignal to obtain an atrial signal, clustering the atrial segments in the atrial signal, and obtaining the P wave detection condition in the electrocardiosignal based on the clustering category of the atrial segments; and determining whether there is an atrial fibrillation signal in the electrocardiosignal based on the R wave distribution rule and the P wave detection condition. The application can solve the technical problem that the atrial fibrillation signal in the electrocardiosignal cannot be accurately judged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biosignal recognition technology, specifically to a method, device, electronic device, and storage medium for atrial fibrillation detection. Background Technology

[0002] Current technical solutions, when analyzing and interpreting electrocardiogram (ECG) signals, essentially only apply simple threshold judgments to various waveform features. For example, they assess the width of the QRS complex, the amplitude difference of the TR wave, the ratio of PR waves, or the ST segment characteristics. These judgments themselves do not have a clear connection to the main characteristics of clinical atrial fibrillation ECGs; they are merely simple superposition judgments. Furthermore, some features not unique to atrial fibrillation are used as important diagnostic criteria. Therefore, current technical solutions cannot accurately identify atrial fibrillation signals in ECG signals. Summary of the Invention

[0003] In view of this, it is necessary to provide an atrial fibrillation detection method, device, electronic device, and storage medium to solve the technical problem of being unable to accurately determine atrial fibrillation signals in electrocardiogram signals.

[0004] To achieve the above objectives, the present invention provides a method for detecting atrial fibrillation, comprising:

[0005] Acquire electrocardiogram (ECG) signals;

[0006] Determine the changes in the ratio of adjacent RR intervals in the electrocardiogram signal;

[0007] The multiple RR intervals in the electrocardiogram signal are divided into multiple groups at equal intervals, the RR interval distribution probability in each group is determined, and the RR entropy is determined based on the distribution probability.

[0008] Based on the changes in the ratio of adjacent RR intervals and the RR entropy, the distribution pattern of the R wave in the electrocardiogram signal is determined;

[0009] The QRST wave in the electrocardiogram signal is removed to obtain the atrial signal, and the atrial segments in the atrial signal are clustered. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained.

[0010] Based on the R-wave distribution pattern and the P-wave detection, it is determined whether atrial fibrillation signals are present in the electrocardiogram signal.

[0011] Furthermore, the step of dividing the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals includes:

[0012] The M RR intervals in the electrocardiogram signal are divided into n groups at equal intervals;

[0013] Where n = 1 + [log2]M ], M>2.

[0014] Further, the step of dividing the M RR intervals in the electrocardiogram signal into n groups at equal intervals includes:

[0015] The region between the maximum and minimum RR intervals in the electrocardiogram signal is divided into n groups at equal intervals.

[0016] Further, determining the RR entropy based on the probability distribution includes:

[0017] The RR entropy is determined based on the following formula:

[0018]

[0019] Among them, SE RR Let p(i) be the RR entropy, and p(i) be the RR interval distribution probability of the i-th group.

[0020] Further, the step of removing the QRST wave from the electrocardiogram signal to obtain the atrial signal includes:

[0021] Noise is removed from the electrocardiogram signal to obtain a preprocessed signal;

[0022] The preprocessed signal is subjected to heartbeat segmentation and heartbeat clustering to obtain heartbeat cluster categories;

[0023] The heartbeat template is selected from the heartbeat clustering categories;

[0024] Based on the aforementioned heartbeat template, the QRST wave in the electrocardiogram signal is removed by heartbeat to obtain the atrial signal.

[0025] Further, the step of clustering atrial segments in the atrial signal and obtaining the P-wave detection status in the electrocardiogram signal based on the clustering categories of the atrial segments includes:

[0026] Atrial segments with a similarity greater than a preset similarity threshold are selected from the atrial signals and clustered to obtain the cluster categories of the atrial segments;

[0027] Select the target category from the clustering categories of the atrial segments that reach the target number of heartbeats, and use the average number of heartbeats for each heartbeat in the target category as the target heartbeat template;

[0028] Based on the morphology of the target heartbeat template, the P wave detection status in the electrocardiogram signal is obtained.

[0029] Further, determining whether atrial fibrillation signals exist in the electrocardiogram signal based on the R-wave distribution pattern and the P-wave detection includes:

[0030] If the distribution pattern of the R wave meets the preset distribution threshold range, and the P wave detection results indicate that there is no P wave in the electrocardiogram signal, then the presence of atrial fibrillation signal in the electrocardiogram signal is determined.

[0031] The present invention also provides an atrial fibrillation detection device, comprising:

[0032] The acquisition module is used to acquire electrocardiogram (ECG) signals;

[0033] The first determining module is used to determine the change in the ratio of adjacent RR intervals in the electrocardiogram signal;

[0034] The second determining module is used to divide the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals, determine the RR interval distribution probability in each group, and determine the RR entropy based on the distribution probability.

[0035] The third determining module is used to determine the distribution pattern of the R wave in the electrocardiogram signal based on the change in the ratio of the adjacent RR intervals and the RR entropy.

[0036] The clustering module is used to remove the QRST wave from the electrocardiogram signal to obtain the atrial signal, and to cluster the atrial segments in the atrial signal. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained.

[0037] The fourth determining module is used to determine whether atrial fibrillation signals exist in the electrocardiogram signal based on the R-wave distribution pattern and the P-wave detection status.

[0038] The present invention also provides an electronic device, including a memory and a processor, wherein,

[0039] The memory is used to store programs;

[0040] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the atrial fibrillation detection method as described in any of the preceding claims.

[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the atrial fibrillation detection method described in any of the preceding claims.

[0042] The beneficial effects of the above implementation are as follows: The atrial fibrillation detection method, device, electronic device, and storage medium provided by the present invention acquire an electrocardiogram (ECG) signal; determine the ratio change of adjacent RR intervals in the ECG signal; divide multiple RR intervals in the ECG signal into multiple groups at equal intervals, determine the RR interval distribution probability in each group, and determine the RR entropy based on the distribution probability; determine the R wave distribution pattern in the ECG signal based on the ratio change of adjacent RR intervals and the RR entropy; remove the QRST wave from the ECG signal to obtain the atrial signal, and cluster the atrial segments in the atrial signal; obtain the P wave detection status in the ECG signal based on the clustering category of the atrial segments; and determine whether atrial fibrillation signals exist in the ECG signal based on the R wave distribution pattern and the P wave detection status.

[0043] Compared to existing technologies that rely solely on the RR interval for atrial fibrillation diagnosis, leading to misdiagnosis of other types of arrhythmias as atrial fibrillation, this invention takes into account the disappearance of P waves during atrial fibrillation. Therefore, it can accurately identify atrial fibrillation-related ECG signals, avoiding the misclassification of non-atrial fibrillation abnormal rhythms such as tachycardia, bradycardia, and arrhythmias as atrial fibrillation, thus improving the accuracy of ECG signal classification.

[0044] Secondly, during the process of removing the QRST wave, for the signal segment obtained by subtracting the template signal from the original ECG signal, only the information at both ends is retained, and the signal in the middle is set to zero. In the process of removing the QRST wave to the greatest extent, the information at the junction of the P wave and the QRTS wave is also retained.

[0045] This invention combines the main characteristics of the electrocardiogram (ECG) signal during atrial fibrillation (AF) with the disappearance of the P wave and absolute unequal RR intervals as the primary criteria. It also sets specific conditions for determining the disappearance of the P wave and absolute unequal RR intervals. By combining the characteristic statistical values ​​of the R wave with the presence of the P wave, the presence of AF is determined. Using these key characteristics as the criteria significantly improves the accuracy of AF detection. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a schematic flowchart of an embodiment of the atrial fibrillation detection method provided by the present invention;

[0048] Figure 2 A schematic diagram of the process for determining the distribution pattern of R-waves provided by this invention;

[0049] Figure 3 The present invention provides a schematic diagram of the RR interval ratio variation, a special RR entropy schematic diagram, and a combined schematic diagram of the R-wave distribution law;

[0050] Figure 4 This is a schematic diagram of the process for removing QRST waves provided by the present invention;

[0051] Figure 5 This is a schematic diagram of the process for detecting the presence of a P wave provided by the present invention;

[0052] Figure 6 This is a schematic diagram of the atrial fibrillation signal determination process provided by the present invention;

[0053] Figure 7 This is a schematic diagram of QRST clustering provided by the present invention;

[0054] Figure 8 This is a schematic diagram of the QRST template provided by the present invention;

[0055] Figure 9 This is a schematic diagram of atrial signals provided by the present invention;

[0056] Figure 10 This is a schematic diagram of the P-wave template provided by the present invention;

[0057] Figure 11 This is a schematic diagram of the non-P-wave template provided by the present invention;

[0058] Figure 12 This is a schematic flowchart of an embodiment of the atrial fibrillation detection device provided by the present invention;

[0059] Figure 13 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0061] In the description of the embodiments of this application, unless otherwise stated, "a plurality of" means two or more.

[0062] In this embodiment of the invention, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, apparatus, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product or device.

[0063] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.

[0064] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0065] This invention provides a method, apparatus, electronic device, and storage medium for detecting atrial fibrillation, which are described below.

[0066] like Figure 1 As shown, the present invention provides a method for detecting atrial fibrillation, comprising:

[0067] Step 110: Obtain electrocardiogram (ECG) signals.

[0068] It is understandable that electrocardiogram (ECG) signals can be collected using an ECG signal transducer.

[0069] Step 120: Determine the change in the ratio of adjacent RR intervals in the electrocardiogram signal.

[0070] It is understandable that atrial fibrillation can be described as having absolutely unequal RR intervals. If the arrangement of the R sequences in the electrocardiogram (ECG) signal is regular, then the distribution of RR intervals will also be regular. If the distribution of the R sequences in the ECG signal is irregular, it can manifest as absolutely unequal RR intervals.

[0071] Unequal distribution of RR intervals can manifest as a disordered and irregular distribution of RR interval lengths. This is reflected in the ratio of adjacent RR intervals as follows:

[0072]

[0073] or,

[0074]

[0075] Where i>1, 0.5<threshold≤1, when RR(i) with a threshold RR interval ratio (usually taken as 50%) satisfies the above conditions, it can be determined that one of the conditions for RR intervals to be absolutely unequal is met.

[0076] The change in the ratio of adjacent RR intervals is related to the time axis of the electrocardiogram signal. That is, it is used to judge the irregularity of the R wave distribution; the more points that meet the corresponding threshold, the more irregular the R wave distribution.

[0077] Step 130: Divide the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals, determine the RR interval distribution probability in each group, and determine the RR entropy based on the distribution probability.

[0078] It is understandable that RRs are assigned to n regions, and then, for the i-th interval, the number of RR intervals in the interval is denoted as m. i The probability distribution in that interval is the number of heartbeats in that interval divided by the total number of heartbeats, i.e. If the RR intervals are uniformly distributed, then the probabilities of each interval are respectively

[0079] In some embodiments, dividing the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals includes:

[0080] The M RR intervals in the electrocardiogram signal are divided into n groups at equal intervals;

[0081] Where n = 1 + [log2] M ], M>2.

[0082] Understandably, for a signal with M RR intervals, it needs to be divided into n groups. The range of n is determined according to Sturges' rule, i.e., n = 1 + log2M. Generally, a sufficiently large n is chosen to take into account the diversity of values ​​that the variable can take.

[0083] In some embodiments, dividing the M RR intervals in the electrocardiogram signal into n groups at equal intervals includes:

[0084] The region between the maximum and minimum RR intervals in the electrocardiogram signal is divided into n groups at equal intervals.

[0085] Understandably, here the RR interval is distributed into n equally spaced regions, with the starting and ending points being the minimum and maximum RR intervals, respectively. The size of this equal spacing is:

[0086]

[0087] The specific RR entropy is independent of the signal's temporal structure and depends only on the data's probability distribution. If the data points of an electrocardiogram (ECG) signal are randomly shuffled chronologically, the specific RR entropy calculated in this case remains unchanged.

[0088] In some embodiments, determining the RR entropy based on the distribution probability includes:

[0089] The RR entropy is determined based on the following formula:

[0090]

[0091] Among them, SE RR Let p(i) be the RR entropy, and p(i) be the RR interval distribution probability of the i-th group.

[0092] It is understandable that when the difference in RR intervals is small, SE RR =0, otherwise, SE RR The value is relatively large. The special RR entropy range is 0 ≤ SE. RR ≤1.

[0093] When the RR intervals with a threshold RR entropy (the threshold is usually 50%) satisfy the above conditions, it is one of the conditions that can be used to determine that the RR intervals satisfying this condition are absolutely unequal.

[0094] Step 140: Based on the changes in the ratio of adjacent RR intervals and the RR entropy, determine the distribution pattern of the R wave in the electrocardiogram signal.

[0095] It is understandable that atrial fibrillation is an ectopic rhythm. When atrial fibrillation occurs, the RR interval in the electrocardiogram (ECG) signal changes, becoming extremely irregular compared to a normal ECG signal. Therefore, two detection criteria were designed: changes in the ratio of adjacent RR intervals and special RR entropy. The RR interval ratio pattern is related to the time axis of the signal. That is, it judges the irregularity of the R wave distribution density; the more points that meet the corresponding threshold, the more irregular the R wave distribution. The special RR entropy is independent of the time structure of the signal and only related to the probability distribution of the data. In other words, if the data points of an ECG signal are randomly shuffled in chronological order, the special RR entropy calculated at that point remains unchanged. The more points that meet the special RR entropy, the more irregular the R wave distribution. This paper verifies the condition of absolute inequality from different perspectives, improving the robustness of the entire algorithm in judging the condition of absolute inequality of RR intervals. When both of the above conditions are met simultaneously, the signal segment satisfies one of the conditions for the presence of atrial fibrillation. The specific process for determining the R wave distribution pattern is as follows: Figure 2 As shown.

[0096] Figure 3This diagram illustrates a combination of RR interval ratio changes, special RR entropy, and R-wave distribution patterns. Based on empirical values, the data is grouped into sets of 64 RR intervals. The horizontal axis represents the number of groups, and the horizontal lines in the first two sub-graphs are threshold lines. For each group, when both the RR interval ratio change and the special RR entropy exceed their respective set thresholds, it indicates that the R-wave distribution pattern meets the absolute inequality condition, and the value in the third sub-graph is 1, indicating that this signal segment is an atrial fibrillation signal. Conversely, if any value in the first two sub-graphs does not reach the threshold, it indicates that the R-wave distribution pattern in this group does not meet the absolute inequality condition, and the value is 0, indicating that this signal segment is not an atrial fibrillation signal.

[0097] Step 150: Remove the QRST wave from the ECG signal to obtain the atrial signal. Then, cluster the atrial segments in the atrial signal, and based on the clustering categories of the atrial segments, obtain the P wave detection status in the ECG signal.

[0098] Understandably, when atrial fibrillation occurs, the atrial characteristics manifest as the disappearance of P waves in the electrocardiogram (ECG) signal, replaced by f waves of varying sizes and shapes. Since f waves have smaller amplitudes than QRS complexes and lack a specific pattern, it's more effective to look for the presence of normal P waves than to determine the presence of f waves. Therefore, detecting the absence of P waves can be used as part of the atrial fibrillation detection process.

[0099] An electrocardiogram (ECG) signal reflects the bioelectrical changes during the generation, propagation, and recovery of cardiac excitation throughout each cardiac cycle. The QRST wave is generated during ventricular depolarization and repolarization, while the P wave is generated during atrial activity. Since atrial fibrillation primarily manifests as abnormal atrial activity, and the QRST wave generated by ventricular activity has a relatively large amplitude, its presence can significantly interfere with P wave detection. Therefore, it is necessary to first eliminate the QRST wave. The specific procedure for removing the QRST wave from the ECG signal is as follows: Figure 4 As shown.

[0100] In some embodiments, clustering atrial segments in the atrial signal and obtaining P-wave detection information in the electrocardiogram signal based on the clustering categories of the atrial segments includes:

[0101] Atrial segments with a similarity greater than a preset similarity threshold are selected from the atrial signals and clustered to obtain the cluster categories of the atrial segments;

[0102] Select the target category from the clustering categories of the atrial segments that reach the target number of heartbeats, and use the average number of heartbeats for each heartbeat in the target category as the target heartbeat template;

[0103] Based on the morphology of the target heartbeat template, the P wave detection status in the electrocardiogram signal is obtained.

[0104] It is understandable that each person's electrocardiogram (ECG) signal is unique, with a high degree of consistency in waveforms. Therefore, the atrial signals in a typical ECG signal also exhibit consistency. However, atrial fibrillation presents with f waves of varying sizes and morphologies. Thus, when clustering atrial segments, the presence of P waves can be distinguished based on the different clustering results. Specific methods for detecting the presence of P waves include... Figure 5 As shown.

[0105] This invention removes ventricular interference while preserving atrial signal characteristics to the maximum extent. It utilizes multiple templates for ECG signal morphology, and these templates can expand and contract according to the amplitude changes at the peak of the current heartbeat. The segment obtained by subtracting the template from the original signal retains the first and last portions of the signal and includes a percentage coefficient. Heartbeat segmentation selects RR... min The length of the segment will retain part of the original signal in the middle of each heartbeat; these methods can preserve the information of the atrial signal more flexibly and completely.

[0106] Step 160: Based on the R wave distribution pattern and the P wave detection, determine whether atrial fibrillation signal exists in the electrocardiogram signal.

[0107] It is understandable that when an electrocardiogram (ECG) signal meets both of the above conditions simultaneously, i.e., the P wave is absent and the R wave distribution pattern meets the thresholds, then the ECG signal is determined to be an atrial fibrillation signal.

[0108] This invention primarily extracts features from the waveform characteristics of electrocardiogram (ECG) signals and progressively screens these features, such as the disappearance of the P wave characteristic of atrial fibrillation (AF) and the specific distribution pattern of the R wave. When these features exhibit a corresponding pattern in specific leads, the presence of AF in the ECG signal can be effectively determined. The specific process for AF diagnosis is as follows: Figure 6 As shown.

[0109] In some embodiments, removing the QRST wave from the electrocardiogram signal to obtain the atrial signal includes:

[0110] Noise is removed from the electrocardiogram signal to obtain a preprocessed signal;

[0111] The preprocessed signal is subjected to heartbeat segmentation and heartbeat clustering to obtain heartbeat cluster categories;

[0112] The heartbeat template is selected from the heartbeat clustering categories;

[0113] Based on the aforementioned heartbeat template, the QRST wave in the electrocardiogram signal is removed by heartbeat to obtain the atrial signal.

[0114] It is understandable that each person's electrocardiogram (ECG) signal is unique, and when not interfered with, the waveforms before and after are highly consistent. Therefore, in the scheme of removing the QRST wave, the heartbeat characteristics of the current ECG signal are selected as the template, and elimination is carried out beat by beat. The implementation method is as follows:

[0115] Preprocess the waveform of the ECG signal. Here, the key is to eliminate the three major noises of the ECG signal, namely baseline drift, power frequency interference, and interference caused by electromyogram noise.

[0116] Quality judgment, delete non-ECG signals, and obtain the preprocessed signal. The purpose is to delete non-ECG signal segments. For example, the "straight line" caused by lead detachment, and the "pulse" caused by poor electrode contact. The quality assessment here is to evaluate the waveform of the ECG signal according to certain rules, and the obtained quality assessment result is presented in the form of a percentage.

[0117] Use conventional means to find the position of the R-wave peak point. For example, use the method of Pan and Tompkins to extract the R wave.

[0118] Heartbeat segmentation. Sort the RR interval segments in ascending order of length, take the mode of the first 30% of the RR intervals, and in special cases, the average value can be taken, denoted as RR min . Segment the ECG signal according to the R wave, and the length of each heartbeat is RR min , and the specific wave band is centered on the R wave, and 0.3 and 1.0 times of RR are taken before and after respectively min .

[0119] [[ID=二十一]]Heartbeat clustering. Cluster the heartbeat segments, and judge the similarity degree according to signal correlation, the difference between signals, spectral analysis, etc. The number of categories obtained by clustering is denoted as Q, and the size of Q is related to the similarity degree specified by the threshold. At the same time, it can be obtained that there are X in the i-th category i (i = 1, 2,..., Q) heartbeats, and the template T of the i-th category i will be the average of X i heartbeats. Figure 7 For the QRST clustering effect diagram, the abscissa is the number of sampling points.

[0120] Select several heartbeat templates. Take the heartbeat clustering categories corresponding to d% (0 < d < 100) of the total number of heartbeats M as the heartbeat templates. For example, sort X i from largest to smallest, and take the heartbeat template corresponding to X1 as the first template. If X1 / M < d%, then take the heartbeat template corresponding to X2 as the second template. If (X1 + X2) / M < d%, continue to take down until (X1 + X2 +... + X q ) / M > d%, and at this time, q heartbeat templates are selected. Figure 8This is the rendering of the QRST template, with the abscissa being the number of sampling points.

[0121] Delete the QRST wave beat by beat. Among the q heart beat templates, select the template T that is closest to the current heart beat. The selected template T can be expanded along with the height of the R peak of this heart beat. The expansion method is proportional expansion in terms of length and width. The template T will be enlarged or reduced. At this time, use the waveform fitting method to supplement the missing points or delete the redundant points. At this time, the length of the template T is no longer RR min , so when the template T is enlarged, still taking R as the standard, take 0.3 and 0.7 times of RR before and after respectively min . When the template T is reduced, fill 0 for the insufficient part, and finally keep the length as RR min . According to this rule, delete the QRST wave beat by beat.

[0122] Obtain the atrial signal. When segmenting the heart beat, select a length of RR min in order to retain the atrial signal. There will be a part of the original electrocardiogram signal between each heart beat that does not participate in the QRST wave deletion, which maximally ensures the original characteristics of this segment of the signal. At the same time, after deleting the QRST wave for each heart beat segment, a signal segment with a length of RR min is obtained. At this time, retain the signals at the head and tail a% (0 < d < 10) of this signal, and the rest is 0. This is also to ensure the integrity of the atrial signal. Figure 9 This is the rendering of the atrial signal obtained after deleting the QRST wave beat by beat and setting the middle signal segment to 0, with the abscissa being the number of sampling points.

[0123] Select the atrial segment: The atrial segment is marked by the segment where the above atrial signal is 0. The segment between every two straight lines with an amplitude of 0 is the atrial segment.

[0124] Cluster the atrial segments: Here, cluster the newly obtained atrial segments. The similarity requirement for clustering here is relatively high (greater than 80%). When the number of types of clustering categories is relatively large, it means that the P-wave waveforms vary greatly, and this will be the case when irregular f waves appear. So when there are many types, it is very likely that some heart beats are non-P waves. When the number of types of clustering categories is relatively small, it means that the P-wave waveforms vary little. In both cases, it is necessary to further analyze the morphology of the template.

[0125] Select several templates: Select the types in the clustering category whose quantity is greater than 5% of the total number of heart beats, and judge the heart beats corresponding to this template for the following operations. Similar to the above QRST wave, after clustering, take the average heart beat of each type of heart beat as the template.

[0126] Morphological assessment: At this point, the amplitude and morphological characteristics of the P wave in different leads are considered for assessment. For example, the amplitude should not exceed 0.25mV in limb leads and 0.2mV in chest leads. If these conditions are not met simultaneously, the P wave is considered absent. If some patterns are met, it indicates the presence of a P wave in some heartbeats. Figure 10 , 11 The image shows the selected P-wave template from file 201 in the MIT-BIH database. Figure 10 The image shown is a template identified as a P wave. Figure 11 The image shown is a non-P-wave template. The sampling rate of this signal is 360Hz, so the number of P-wave sampling points here is 54. Figure 10 and Figure 11 The x-axis represents the number of sampling points.

[0127] It should be noted that the location of atrial fibrillation can be determined based on the position of the heartbeat where the P wave disappears.

[0128] In some embodiments, determining whether atrial fibrillation signals exist in the electrocardiogram signal based on the R-wave distribution pattern and the P-wave detection includes:

[0129] If the distribution pattern of the R wave meets the preset distribution threshold range, and the P wave detection results indicate that there is no P wave in the electrocardiogram signal, then the presence of atrial fibrillation signal in the electrocardiogram signal is determined.

[0130] Understandably, when an electrocardiogram (ECG) signal simultaneously meets both of the above conditions—that is, the P wave is absent and the R wave distribution pattern satisfies each threshold—then the ECG signal is determined to be an atrial fibrillation signal. The specific flowchart is as follows: Figure 6 As shown.

[0131] In summary, the atrial fibrillation detection method provided by this invention includes: acquiring an electrocardiogram (ECG) signal; determining the change in the ratio of adjacent RR intervals in the ECG signal; dividing multiple RR intervals in the ECG signal into multiple groups at equal intervals, determining the RR interval distribution probability in each group, and determining the RR entropy based on the distribution probability; determining the R wave distribution pattern in the ECG signal based on the change in the ratio of adjacent RR intervals and the RR entropy; removing the QRST wave from the ECG signal to obtain an atrial signal, and clustering the atrial segments in the atrial signal, obtaining the P wave detection status in the ECG signal based on the clustering category of the atrial segments; and determining whether an atrial fibrillation signal exists in the ECG signal based on the R wave distribution pattern and the P wave detection status.

[0132] Compared to existing technologies that rely solely on the RR interval for atrial fibrillation diagnosis, leading to misdiagnosis of other types of arrhythmias as atrial fibrillation, this invention takes into account the disappearance of P waves during atrial fibrillation. Therefore, it can accurately identify atrial fibrillation-related ECG signals, avoiding the misclassification of non-atrial fibrillation abnormal rhythms such as tachycardia, bradycardia, and arrhythmias as atrial fibrillation, thus improving the accuracy of ECG signal classification.

[0133] Secondly, this invention better preserves the original characteristics of the atrial signal. On the one hand, during the removal of the QRST wave, for the signal segment obtained by subtracting the template signal from the original ECG signal, only the information at both ends is retained, while the signal in the middle is zeroed out. This maximizes the removal of the QRST wave while preserving the information at the boundary between the P wave and the QRST wave. On the other hand, RR is taken... min As the length of the heartbeat segments, some of the original signal between each segment is excluded from the QRST wave removal process, thus preserving the original characteristics of the atrial signal to the greatest extent. This lays the foundation for accurately determining the presence of the P wave.

[0134] Furthermore, the template selection in this invention is more flexible. Rules for template selection are established based on clustering patterns, ensuring the removal of some abnormal QRSTs. Simultaneously, the template can be scaled up or down according to the amplitude of the current heartbeat R-peak during calculation. These measures will improve the QRST removal effect.

[0135] This invention combines the main characteristics of electrocardiogram (ECG) signals during atrial fibrillation (AF) with the disappearance of the P wave and absolute inequality of the RR intervals as the primary criteria. It also sets specific conditions for determining the disappearance of the P wave and the absolute inequality of the RR intervals. By combining the characteristic statistical values ​​of the R wave with the presence of the P wave, the presence of AF is determined. Using these main characteristics as the criteria significantly improves the accuracy of AF detection, accurately identifying AF signals in the ECG signal.

[0136] like Figure 12 As shown, the present invention also provides an atrial fibrillation detection device 1200, comprising:

[0137] Acquisition module 1210 is used to acquire electrocardiogram signals;

[0138] The first determining module 1220 is used to determine the change in the ratio of adjacent RR intervals in the electrocardiogram signal;

[0139] The second determining module 1230 is used to divide the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals, determine the RR interval distribution probability in each group, and determine the RR entropy based on the distribution probability.

[0140] The third determining module 1240 is used to determine the distribution pattern of the R wave in the electrocardiogram signal based on the change in the ratio of the adjacent RR intervals and the RR entropy.

[0141] Clustering module 1250 is used to remove QRST waves from the electrocardiogram signal to obtain atrial signals, and to cluster atrial segments in the atrial signals. Based on the clustering categories of the atrial segments, the detection status of P waves in the electrocardiogram signal is obtained.

[0142] The fourth determining module 1260 is used to determine whether atrial fibrillation signal exists in the electrocardiogram signal based on the R wave distribution pattern and the P wave detection status.

[0143] The atrial fibrillation detection device provided in the above embodiments can realize the technical solutions described in the above atrial fibrillation detection method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above atrial fibrillation detection method embodiments, and will not be repeated here.

[0144] like Figure 13 As shown, the present invention also provides an electronic device 1300. The electronic device 1300 includes a processor 1301, a memory 1302, and a display 1303. Figure 13 Only some components of the electronic device 1300 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0145] In some embodiments, memory 1302 may be an internal storage unit of electronic device 1300, such as a hard disk or memory of electronic device 1300. In other embodiments, memory 1302 may also be an external storage device of electronic device 1300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 1300.

[0146] Furthermore, the memory 1302 may include both internal storage units of the electronic device 1300 and external storage devices. The memory 1302 is used to store application software and various types of data installed on the electronic device 1300.

[0147] In some embodiments, processor 1301 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 1302 or process data, such as the atrial fibrillation detection method of the present invention.

[0148] In some embodiments, display 1303 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1303 is used to display information from electronic device 1300 and to display a visual user interface. Components 1301-1303 of electronic device 1300 communicate with each other via a system bus.

[0149] In some embodiments of the present invention, when the processor 1301 executes the atrial fibrillation detection program in the memory 1302, the following steps can be implemented:

[0150] Acquire electrocardiogram (ECG) signals;

[0151] Determine the changes in the ratio of adjacent RR intervals in the electrocardiogram signal;

[0152] The multiple RR intervals in the electrocardiogram signal are divided into multiple groups at equal intervals, the RR interval distribution probability in each group is determined, and the RR entropy is determined based on the distribution probability.

[0153] Based on the changes in the ratio of adjacent RR intervals and the RR entropy, the distribution pattern of the R wave in the electrocardiogram signal is determined;

[0154] The QRST wave in the electrocardiogram signal is removed to obtain the atrial signal, and the atrial segments in the atrial signal are clustered. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained.

[0155] Based on the R-wave distribution pattern and the P-wave detection, it is determined whether atrial fibrillation signals are present in the electrocardiogram signal.

[0156] It should be understood that when the processor 1301 executes the atrial fibrillation detection program in the memory 1302, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0157] Furthermore, the embodiments of the present invention do not specifically limit the type of the electronic device 1300 mentioned. The electronic device 1300 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1300 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0158] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the atrial fibrillation detection method provided by the methods described above, the method comprising:

[0159] Acquire electrocardiogram (ECG) signals;

[0160] Determine the changes in the ratio of adjacent RR intervals in the electrocardiogram signal;

[0161] The multiple RR intervals in the electrocardiogram signal are divided into multiple groups at equal intervals, the RR interval distribution probability in each group is determined, and the RR entropy is determined based on the distribution probability.

[0162] Based on the changes in the ratio of adjacent RR intervals and the RR entropy, the distribution pattern of the R wave in the electrocardiogram signal is determined;

[0163] The QRST wave in the electrocardiogram signal is removed to obtain the atrial signal, and the atrial segments in the atrial signal are clustered. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained.

[0164] Based on the R-wave distribution pattern and the P-wave detection, it is determined whether atrial fibrillation signals are present in the electrocardiogram signal.

[0165] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0166] The atrial fibrillation detection method, apparatus, electronic device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting atrial fibrillation, characterized in that, include: Acquire electrocardiogram (ECG) signals; Determine the changes in the ratio of adjacent RR intervals in the electrocardiogram signal; The multiple RR intervals in the electrocardiogram signal are divided into multiple groups at equal intervals, the RR interval distribution probability in each group is determined, and the RR entropy is determined based on the distribution probability. Based on the changes in the ratio of adjacent RR intervals and the RR entropy, the distribution pattern of the R wave in the electrocardiogram signal is determined; The QRST wave in the electrocardiogram signal is removed to obtain the atrial signal, and the atrial segments in the atrial signal are clustered. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained. Based on the R-wave distribution pattern and the P-wave detection, determine whether atrial fibrillation signals are present in the electrocardiogram signal; The step of dividing the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals includes: The M RR intervals in the electrocardiogram signal are divided into n groups at equal intervals; Where n = 1 + [log2] M ], M>2; The determination of RR entropy based on the probability distribution includes: The RR entropy is determined based on the following formula: in, SE RR Let p(i) be the RR entropy, and p(i) be the RR interval distribution probability of the i-th group; The process of removing the QRST wave from the electrocardiogram signal to obtain the atrial signal includes: Noise is removed from the electrocardiogram signal to obtain a preprocessed signal; The RR interval segments are sorted in ascending order of length. The mode or average of the first 30% of the RR intervals is taken and denoted as RRmin. Using RRmin as the length, the preprocessed signal is subjected to heartbeat segmentation and heartbeat clustering to obtain heartbeat cluster categories. Select a heartbeat template from the aforementioned heartbeat clustering categories; For the current heartbeat, select the template that is closest to the current heartbeat from the heartbeat templates, and scale the selected template proportionally according to the R peak amplitude of the current heartbeat. Based on the expanded template, the QRST wave in the electrocardiogram signal is deleted by heart-to-heart imaging to obtain a signal segment with a length of RRmin; The signal segment is retained at a preset ratio at the beginning and end, and the rest is set to zero to obtain the atrial signal.

2. The atrial fibrillation detection method according to claim 1, characterized in that, The step of dividing the M RR intervals in the electrocardiogram signal into n groups at equal intervals includes: The region between the maximum and minimum RR intervals in the electrocardiogram signal is divided into n groups at equal intervals.

3. The atrial fibrillation detection method according to claim 1, characterized in that, The step of clustering atrial segments in the atrial signal and obtaining the P-wave detection status in the electrocardiogram signal based on the clustering categories of the atrial segments includes: Atrial segments with a similarity greater than a preset similarity threshold are selected from the atrial signals and clustered to obtain the cluster categories of the atrial segments; Select the target category from the clustering categories of the atrial segments that reach the target number of heartbeats, and use the average number of heartbeats for each heartbeat in the target category as the target heartbeat template; Based on the morphology of the target heartbeat template, the P wave detection status in the electrocardiogram signal is obtained.

4. The atrial fibrillation detection method according to any one of claims 1-3, characterized in that, The determination of whether atrial fibrillation signals exist in the electrocardiogram signal based on the R-wave distribution pattern and the P-wave detection includes: If the distribution pattern of the R wave meets the preset distribution threshold range, and the P wave detection results indicate that there is no P wave in the electrocardiogram signal, then the presence of atrial fibrillation signal in the electrocardiogram signal is determined.

5. An atrial fibrillation detection device, characterized in that, include: The acquisition module is used to acquire electrocardiogram (ECG) signals; The first determining module is used to determine the change in the ratio of adjacent RR intervals in the electrocardiogram signal; The second determining module is used to divide the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals, determine the RR interval distribution probability in each group, and determine the RR entropy based on the distribution probability. The third determining module is used to determine the distribution pattern of the R wave in the electrocardiogram signal based on the change in the ratio of the adjacent RR intervals and the RR entropy. The clustering module is used to remove the QRST wave from the electrocardiogram signal to obtain the atrial signal, and to cluster the atrial segments in the atrial signal. Based on the clustering category of the atrial segments, the detection status of the P wave in the electrocardiogram signal is obtained. The fourth determining module is used to determine whether atrial fibrillation signals exist in the electrocardiogram signal based on the R wave distribution pattern and the P wave detection status. The step of dividing the multiple RR intervals in the electrocardiogram signal into multiple groups at equal intervals includes: The M RR intervals in the electrocardiogram signal are divided into n groups at equal intervals; Where n = 1 + [log2] M ], M>2; The determination of RR entropy based on the probability distribution includes: The RR entropy is determined based on the following formula: in, SE RR Let p(i) be the RR entropy, and p(i) be the RR interval distribution probability of the i-th group; The process of removing the QRST wave from the electrocardiogram signal to obtain the atrial signal includes: Noise is removed from the electrocardiogram signal to obtain a preprocessed signal; The RR interval segments are sorted in ascending order of length. The mode or average of the first 30% of the RR intervals is taken and denoted as RRmin. Using RRmin as the length, the preprocessed signal is subjected to heartbeat segmentation and heartbeat clustering to obtain heartbeat cluster categories. Select a heartbeat template from the aforementioned heartbeat clustering categories; For the current heartbeat, select the template that is closest to the current heartbeat from the heartbeat templates, and scale the selected template proportionally according to the R peak amplitude of the current heartbeat. Based on the expanded template, the QRST wave in the electrocardiogram signal is deleted by heart-to-heart imaging to obtain a signal segment with a length of RRmin; The signal segment is retained at a preset ratio at the beginning and end, and the rest is set to zero to obtain the atrial signal.

6. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the atrial fibrillation detection method as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the atrial fibrillation detection method as described in any one of claims 1 to 4.