ECG signal atrial fibrillation detection system, method and electronic equipment
Patent Information
- Application Number
- CN202511039884.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-07-28
AI Technical Summary
这样,时间窗的长度就决定了房颤检测的最小分辨率,例如,使用一个10秒长的时间窗口可以检测出持续时间大于或等于10秒的房颤片段,但却难以检测出持续时间小于10秒的房颤片段,导致房颤检测的时间分辨率不足,从而无法精确识别房颤起止时刻
[0025]1、本发明提供了一种心电信号房颤检测系统,提供了一种双导联编码模块与注意力机制相结合的Y型检测网络,基于UNet结构,同一层级的两个编码分别通过空间通道混合注意力模块与对应层级的解码器相连,第一导联编码模块和第二导联编码模块在最后一级所得的深层特征相融合后逐级进行解码,通过分类器后,即可得到待检测的M导联心电信号中每个采样点是否属于房颤信号的分类结果;通过逐采样点检测,能够清楚地确定房颤信号的起止时刻,能够在保证房颤检测的稳定性和准确性的前提下,提高房颤检测的时间分辨率,实现房颤起止时刻的准确标定;与此同时,本发明的其中一个导联编码模块的输入为待检测的多导联心电信号,另一个导联编码模块的输入为m导联心电信号,m导联心电信号包括:从待检测的M导联心电信号中提取的m个预设采集部位处的心电信号;m个预设采集部位在系统的训练过程和推理过程中保持一致,从而保证这m个导联采集位置处的心电信号的特征在训练过程中被增强,在检测过程(推理过程)中,既关注了当前待检测的M导联心电信号相对系统训练所采用的训练集的个性差异,也关注了二者之间的共性,能够在适用于不同导联数的心电信号检测,泛化能力较强,能够更好地满足临床需求。
Smart Images

Figure CN121040922B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electrocardiogram analysis technology, and more specifically, relates to an atrial fibrillation detection system, method and electronic device. Background Technology
[0002] Atrial fibrillation (AF) is one of the most dangerous arrhythmias, a leading cause of various heart-related complications such as stroke and heart failure, and even carries a risk of death. Early treatment of AF can effectively prevent these complications. However, the early stages of AF are paroxysmal and sporadic, making them difficult to detect and identify accurately. Therefore, long-term monitoring and recording of the patient's electrocardiogram (ECG) signals are required, and these signals must be analyzed by a professional clinician for diagnosis and detection. This process is typically very time-consuming and labor-intensive, placing a significant workload on clinicians. Therefore, more efficient and accurate automated methods for AF detection are needed to reduce the workload of clinicians and improve their efficiency.
[0003] Existing methods for atrial fibrillation (AF) detection using ECG signals rely on traditional machine learning algorithms such as random forests and SVMs. These methods typically require complex and tedious feature extraction operations to achieve even moderately good performance. In contrast, deep learning methods can automatically extract effective representational features from the raw signal without requiring human intervention. Therefore, applying deep learning-based models to AF detection holds promise for achieving a more efficient and higher-performance AF detection method.
[0004] However, in existing deep learning-based atrial fibrillation (AF) detection methods, researchers treat AF detection as a classification problem. They typically use a fixed-length time window to sequentially extract a large number of segments from ECG recordings, and then use specific detection methods to distinguish whether each segment is AF or not. Thus, the length of the time window determines the minimum resolution of AF detection. For example, a 10-second time window can detect AF segments with a duration of 10 seconds or more, but it struggles to detect AF segments with a duration of less than 10 seconds, resulting in insufficient temporal resolution and an inability to accurately identify the onset and termination times of AF. Shortening the time window can improve temporal accuracy to some extent, but this also leads to excessively short segments, increasing the false positive rate and affecting the stability and accuracy of AF detection. Meanwhile, most existing models are only applicable to a fixed number of leads, and the number of leads in commonly used public datasets differs from that of routine clinical ECG equipment, requiring further improvement in generalization ability. Therefore, the temporal accuracy, precision, and generalization ability of existing AF detection methods still need further optimization to accurately identify the onset and termination times of AF. Summary of the Invention
[0005] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides an atrial fibrillation detection system, method and electronic device for electrocardiogram signals. The purpose is to improve the temporal resolution of atrial fibrillation detection, achieve accurate calibration of the start and end times of atrial fibrillation, and enhance its generalization ability across different lead numbers, so as to better meet clinical needs, while ensuring the stability and accuracy of atrial fibrillation detection.
[0006] To achieve the above objectives, the present invention provides an atrial fibrillation detection system based on electrocardiogram signals, comprising:
[0007] The first lead encoding module includes: N cascaded first encoders and a downsampling unit positioned between two adjacent first encoders, used to extract N features of the m-lead ECG signal at different scales, denoted as follows from largest to smallest: The features extracted by the first encoder of the i-th level; i = 1, 2, ..., N; N is a positive integer; the above m-lead ECG signals include: ECG signals at m preset acquisition sites extracted from the M-lead ECG signals to be detected; the above m preset acquisition sites remain consistent during the training and inference processes of the system; 0 < m < M; M ≥ 2;
[0008] The second-lead encoding module includes: N cascaded second encoders and a downsampling unit positioned between two adjacent second encoders, used to extract N features of different scales from the aforementioned M-lead ECG signal, denoted in descending order of scale as follows: Features extracted by the second encoder at level i;
[0009] The decoding module includes: N cascaded decoders and an upsampling unit positioned between adjacent decoders; the i-th stage decoder is connected to the (N-i+1)-th stage first encoder and the (N-i+1)-th stage second encoder via a spatial channel hybrid attention module; the spatial channel hybrid attention module connected to the i-th stage first encoder is used to perform [further processing] based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The spatial channel hybrid attention module, connected to the second encoder of the i-th stage, is used to perform attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The first-level decoder is used for... and Features and enhanced features after concatenation along the channel dimension Decoding is performed to obtain the first decoded feature; the (N-j+1)th level decoder is used to obtain the enhanced feature based on the Nj-th decoded feature. Decode the feature to obtain the (N-j+1)th decoded feature; j = N-1, N-2, ..., 2, 1;
[0010] A classifier is used to obtain the corresponding atrial fibrillation detection result based on the Nth decoded feature; the atrial fibrillation detection result includes: the classification result of whether each sampling point in the M-lead ECG signal belongs to the atrial fibrillation signal.
[0011] More preferably, the first lead encoding module further includes: a first feature mapping unit connected before the first encoder of the first stage, used to extract the initial features of the m-lead ECG signal;
[0012] The second lead encoding module also includes a second feature mapping unit connected before the first-level second encoder, used to extract the initial features of the M-lead ECG signal.
[0013] More preferably, the above-mentioned m preset collection sites include: the fourth intercostal space at the left sternal border, and / or the pathway from the right upper limb to the left lower limb.
[0014] More preferably, the M-lead ECG signal is a signal obtained by sampling the original acquired M-lead ECG signal using a fixed-size time window starting from the initial moment of the signal.
[0015] More preferably, the M-lead ECG signal is obtained by standardizing the original acquired M-lead ECG signal and then sampling it from the initial moment of the signal using a fixed-size time window.
[0016] More preferably, the above-mentioned atrial fibrillation detection system based on electrocardiogram signals is trained in the following manner:
[0017] Obtain the training set; the training samples in the training set are ECG signal samples in lead M', and the corresponding labels include: whether each sampling point in the multi-lead ECG signal sample belongs to the true result of atrial fibrillation signal; where M'≥2;
[0018] Each training sample in the training set is input into the ECG signal atrial fibrillation detection system to obtain the corresponding atrial fibrillation detection result. The ECG signal atrial fibrillation detection system is trained by minimizing the difference loss between the obtained atrial fibrillation detection result and the corresponding label.
[0019] Secondly, the present invention provides a method for detecting atrial fibrillation using electrocardiogram signals, comprising:
[0020] The ECG signal to be detected in lead M is input into the ECG signal atrial fibrillation detection system provided in the first aspect of the present invention to obtain the corresponding atrial fibrillation detection result; M≥2.
[0021] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the atrial fibrillation detection method for electrocardiogram signals provided in the second aspect of the present invention.
[0022] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device containing the storage medium to perform the atrial fibrillation detection method provided in the second aspect of the present invention.
[0023] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the atrial fibrillation detection method provided in the second aspect of the present invention.
[0024] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:
[0025] 1. This invention provides an atrial fibrillation detection system based on electrocardiogram (ECG) signals. It offers a Y-shaped detection network combining a dual-lead coding module and an attention mechanism, based on a UNet structure. Two encoders at the same level are connected to the corresponding level decoders via a spatial channel hybrid attention module. The first and second lead coding modules fuse the deep features obtained at the last level and then decode step-by-step. After passing through a classifier, the classification result of whether each sampling point in the M-lead ECG signal belongs to an atrial fibrillation signal can be obtained. By detecting each sampling point, the start and end times of the atrial fibrillation signal can be clearly determined. This improves the temporal resolution of atrial fibrillation detection while ensuring its stability and accuracy, achieving accurate calibration of the start and end times of atrial fibrillation. Meanwhile, the input of one lead encoding module of the present invention is the multi-lead ECG signal to be detected, and the input of the other lead encoding module is the m-lead ECG signal. The m-lead ECG signal includes ECG signals extracted from the M-lead ECG signal to be detected at m preset acquisition sites. The m preset acquisition sites remain consistent during the system's training and inference processes, thereby ensuring that the characteristics of the ECG signals at these m lead acquisition sites are enhanced during training. During the detection process (inference process), both the individual differences of the current M-lead ECG signal to be detected relative to the training set used for system training and the commonalities between the two are considered. This allows for ECG signal detection with different numbers of leads, strong generalization ability, and better meets clinical needs.
[0026] 2. Furthermore, the atrial fibrillation detection system for electrocardiogram signals provided by the present invention further includes a first lead encoding module: a first feature mapping unit connected before the first encoder of the first stage, used to extract initial features of the m-lead electrocardiogram signal; and a second lead encoding module: a second feature mapping unit connected before the second encoder of the first stage, used to extract initial features of the M-lead electrocardiogram signal; thus, it can map low-dimensional multi-lead electrocardiogram signals to higher feature dimensions, thereby further enhancing the feature representation capability.
[0027] 3. Further, in the atrial fibrillation detection system for electrocardiogram signals provided by the present invention, the above-mentioned m preset acquisition sites include: the fourth intercostal space at the left sternal border, and / or the pathway from the right upper limb to the left lower limb; wherein, the fourth intercostal space at the left sternal border is close to the right atrium, and atrial electrical activity can be directly recorded. In atrial fibrillation, the electrocardiogram signal at this location often shows more obvious f waves, especially coarse fibrillation (f wave amplitude > 0.1mV). At the same time, the electrocardiogram signal at this location also helps to distinguish between atrial fibrillation with irregular f waves and atrial flutter with regular sawtooth patterns. The axis of the pathway from the right upper limb to the left lower limb is basically aligned with the direction of atrial depolarization. Therefore, the P wave is usually most prominent in the ECG signal of this pathway under sinus rhythm. In atrial fibrillation, the P wave disappears and is replaced by irregular f waves (fibrillation waves). The ECG signal of the pathway from the right upper limb to the left lower limb can often clearly show these low-amplitude f waves, allowing for long-term monitoring (e.g., Holter monitoring) and facilitating the capture of paroxysmal atrial fibrillation. Meanwhile, the core characteristic of atrial fibrillation is irregular RR intervals. The QRS complex of the ECG signal from the pathway from the right upper limb to the left lower limb is usually morphologically stable, facilitating accurate measurement of RR interval irregularities. Therefore, selecting ECG signals from these acquisition sites can further improve the accuracy of atrial fibrillation detection. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the results of the atrial fibrillation detection system based on electrocardiogram signals provided in an embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram of the actual atrial fibrillation detection results of the test sample provided in the embodiments of the present invention;
[0030] Figure 3 This is a schematic diagram showing the atrial fibrillation detection results obtained by using the ECG signal atrial fibrillation detection system provided by this invention to detect a test sample;
[0031] Figure 4 This is a schematic diagram of the atrial fibrillation detection results obtained by using an existing atrial fibrillation signal classification model to detect test samples. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0033] To achieve the above objectives, the present invention provides an atrial fibrillation detection system based on electrocardiogram signals, comprising:
[0034] The first lead encoding module includes: N cascaded first encoders and a downsampling unit positioned between two adjacent first encoders for extracting N features of the m-lead ECG signal at different scales, denoted as follows from largest to smallest: The features extracted by the first encoder of the i-th level; i = 1, 2, ..., N; N is a positive integer; the M-lead ECG signals to be detected include: ECG signals from M acquisition sites; the above m-lead ECG signals include: ECG signals from m preset acquisition sites extracted from the M-lead ECG signals to be detected; the above m preset acquisition sites remain consistent during the system's training and inference processes; m is a positive integer; 0 < m < M; M ≥ 2;
[0035] The second-lead encoding module includes: N cascaded second encoders and a downsampling unit positioned between adjacent second encoders, used to extract N features of different scales from the M-lead ECG signal, denoted as follows from largest to smallest: Features extracted by the second encoder at level i;
[0036] The decoding module includes: N cascaded decoders and an upsampling unit positioned between adjacent decoders; the i-th stage decoder is connected to the (N-i+1)-th stage first encoder and the (N-i+1)-th stage second encoder via a spatial channel hybrid attention module; the spatial channel hybrid attention module connected to the i-th stage first encoder is used to perform [further processing] based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The spatial channel hybrid attention module, connected to the second encoder of the i-th stage, is used to perform attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The first-level decoder is used for... and Features and enhanced features after concatenation along the channel dimension Decoding is performed to obtain the first decoded feature; the (N-j+1)th level decoder is used to obtain the enhanced feature based on the Nj-th decoded feature. Decode the feature to obtain the (N-j+1)th decoded feature; j = N-1, N-2, ..., 2, 1;
[0037] A classifier is used to obtain the corresponding atrial fibrillation detection result based on the Nth decoded feature; the atrial fibrillation detection result includes: the classification result of whether each sampling point in the M-lead ECG signal belongs to the atrial fibrillation signal.
[0038] It should be noted that the encoder mentioned above can be any type of encoder, such as a Transformer encoder, a GRU encoder, or other encoders; no limitation is made here. The decoder mentioned above can be any type of decoder, such as a Transformer decoder, a GRU decoder, or other encoders; no limitation is made here. The spatial channel hybrid attention module can be any type of spatial channel hybrid attention module, such as a CBAM module, a BAM module, an scSE module, a DAN module, etc.; no limitation is made here, but a CBAM module is preferred. The classifier mentioned above can be any type of classifier, such as a fully connected layer, an SVM, a convolutional layer, a Dense layer, an MLP, a Linear layer, etc.; no limitation is made here, but a fully connected layer is preferred.
[0039] In one optional implementation, the first lead encoding module further includes: a first feature mapping unit connected before the first encoder of the first stage, used to extract the initial features of the m-lead ECG signal;
[0040] The second lead encoding module also includes a second feature mapping unit connected before the first-level second encoder, used to extract the initial features of the M-lead ECG signal.
[0041] In the above process, the feature mapping unit maps low-dimensional multi-lead ECG signals to higher feature dimensions, thereby enhancing the representation capability of the features.
[0042] In one optional implementation, the aforementioned m preset collection sites include: the fourth intercostal space at the left sternal border, and / or the pathway from the right upper limb to the left lower limb. Specifically, when m=1, the aforementioned m preset collection sites include: the fourth intercostal space at the left sternal border, or the pathway from the right upper limb to the left lower limb; when m≥2, the aforementioned m preset collection sites include one or more of: the fourth intercostal space at the left sternal border and the pathway from the right upper limb to the left lower limb.
[0043] In one alternative implementation, the M-lead ECG signal is a signal obtained by sampling the original acquired M-lead ECG signal using a fixed-size time window starting from the initial moment of the signal.
[0044] In one alternative implementation, the M-lead ECG signal is a signal obtained by standardizing the original acquired M-lead ECG signal and then sampling it from the initial moment of the signal using a fixed-size time window.
[0045] It should be noted that the standardization method can be zero-mean standardization, maximum-minimum standardization, mean centering, etc., and no specific method is specified here.
[0046] It should be noted that the aforementioned encoding module, decoding module, spatial channel hybrid attention module, and classifier can be an existing pre-trained module, or they can be trained together end-to-end; no limitation is made here. Preferably, in an optional implementation, the aforementioned ECG signal atrial fibrillation detection system is trained using a pre-collected training set; the training samples in the training set are ECG signal samples in lead M', and the corresponding labels include: whether each sampling point in the multi-lead ECG signal samples belongs to the true result of atrial fibrillation signal; wherein, M'≥2;
[0047] Specifically, the aforementioned atrial fibrillation detection system based on electrocardiogram signals was trained in the following manner:
[0048] Obtain the training set; input each training sample in the training set into the ECG signal atrial fibrillation detection system to obtain the corresponding atrial fibrillation detection result; train the ECG signal atrial fibrillation detection system by minimizing the difference loss between the obtained atrial fibrillation detection result and the corresponding label.
[0049] It should be noted that the above-mentioned difference loss can be achieved using cross-entropy loss function, mean squared error loss function, mean absolute error loss function, Huber loss function, etc., and no specific method is specified here.
[0050] The number of leads M' in the ECG signal samples of lead M' in the training set can be the same as or different from the number of leads M in the ECG signal samples of lead M to be detected during the inference process; no restriction is imposed here.
[0051] It should be noted that the value of m is determined based on the actual number of leads in the ECG detection device, ensuring that the value is the same during the training and application phases. Generally, M is 2 or 12. Preferably, in one optional implementation, when M is 2, m is 1; when M is 12, m is 2. This design is more flexible and has stronger generalization ability. For example, when the atrial fibrillation detection system is trained using a two-lead ECG signal dataset, m is 1. When the obtained model is used for atrial fibrillation detection with 12-lead ECG signals, m can also be 1, achieving the same high detection accuracy and temporal resolution.
[0052] To further illustrate the atrial fibrillation detection system for electrocardiogram signals provided by the present invention, a specific embodiment is described in detail below:
[0053] Considering that there is usually some noise in the original multi-lead ECG signals, the original multi-lead ECG signals are normalized with zero mean to obtain normalized ECG signals, which can suppress the influence of noise to a certain extent and improve the generalization ability of the ECG signal atrial fibrillation detection system. For the normalized ECG signals, a fixed-size time window is used to sample from the initial moment of the signal to obtain a series of multi-lead ECG signals.
[0054] In this embodiment, the dataset used includes 23 two-lead ECG signal recordings (referred to as the original multi-lead ECG signals) lasting approximately 10 hours. These ECG signals were sampled at a frequency of 250 Hz. After zero-mean standardization, signal samples were extracted from these ECG signals starting from their initial time using a fixed-length time window (8 seconds in this embodiment). After each sample extraction, the time window was shifted forward by one window size for the next extraction, achieving non-overlapping sampling. Sampling ended when the remaining data length of the signal sequence was less than the size of the time window, thus obtaining multiple multi-lead ECG signal samples, which served as training samples in the training set. In this embodiment, the time window length was 1024, and the duration of each sample was approximately 4 seconds.
[0055] The same processing is applied to the atrial fibrillation labeling of the original multi-lead ECG signals (including whether each sampling point in the original multi-lead ECG signal belongs to the true atrial fibrillation signal) using a window of the same length, resulting in a sample label for each multi-lead ECG signal sample. Thus, the length of the multi-lead ECG signal sample is consistent with the length of its label, meaning that each sampling point in the sample has a corresponding label. In this embodiment, the dimension of each multi-lead ECG signal sample is 1024×2 (1024 is the signal length, 2 is the number of signal leads), and the corresponding label dimension is 1024×1.
[0056] Each training sample in the training set is input into the ECG signal atrial fibrillation detection system to obtain the corresponding atrial fibrillation detection result. The ECG signal atrial fibrillation detection system is trained by minimizing the difference loss between the obtained atrial fibrillation detection result and the corresponding label. In this embodiment, the loss function used to measure the difference loss is the cross-entropy loss function. During the training process, the Adam optimizer is used to update the parameters of the ECG signal atrial fibrillation detection system.
[0057] In this embodiment, the multi-lead ECG signal to be detected is a two-lead ECG signal. For example... Figure 1As shown, the ECG signal atrial fibrillation detection system is a Y-shaped detection network that combines a dual-encoding module with an attention mechanism. Based on the UNet structure, the two encoders at the same level are connected to the corresponding level decoders through a spatial channel hybrid attention module. The deep features obtained from the last level of the dual-encoding module are fused together and then decoded layer by layer by the decoding module.
[0058] Specifically, the ECG signal atrial fibrillation detection system includes: a first lead encoding module, a second lead encoding module, a decoding module, and a classifier;
[0059] The first lead encoding module includes: N cascaded first encoders, a first feature mapping unit connected before the first-level first encoder, and a downsampling unit set between two adjacent first encoders; the second lead encoding module includes: N cascaded second encoders, a second feature mapping unit connected before the first-level second encoder, and a downsampling unit set between two adjacent second encoders; the i-th level decoder is connected to the (N-i+1)-th level first encoder and the (N-i+1)-th level second encoder through a spatial channel hybrid attention module; i = 1, 2, ..., N; N is a positive integer.
[0060] In this embodiment, the input to the first lead encoding module is a single-lead ECG signal (i.e., m=1) selected from the two-lead ECG signals to be detected. The first lead encoding module is used to extract N features of the single-lead ECG signal at different scales, denoted as follows from largest to smallest: The first feature mapping unit is used to extract the initial features of the single-lead ECG signal; the first encoder is used to encode the features of the input; the features extracted by the i-th level first encoder are... The downsampling unit is used to compress and extract signal features.
[0061] The input to the second-lead encoding module is the two-lead ECG signal to be detected. The second-lead encoding module is used to extract N features at different scales from the two-lead ECG signal to be detected, denoted as follows from largest to smallest: The second feature mapping unit is used to extract the initial features of the two-lead ECG signal to be detected; the second encoder is used to encode the features of the input; the features extracted by the i-th stage second encoder are... The upsampling unit is used to reconstruct the features of the compressed signal;
[0062] The spatial channel hybrid attention module connected to the first encoder of the i-th stage is used to perform attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The spatial channel hybrid attention module, connected to the second encoder of the i-th stage, is used to perform attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The first-level decoder is used to... and Features and enhanced features after concatenation along the channel dimension After superposition, decoding is performed to obtain the first decoded feature; the (N-j+1)th stage decoder is used to combine the Nj-th decoded feature and the enhanced feature. After superposition, decoding is performed to obtain the (N-j+1)th decoded feature; j = N-1, N-2, ..., 2, 1; in this embodiment, N = 4.
[0063] The classifier is used to map the Nth decoded feature to the corresponding atrial fibrillation detection result; the atrial fibrillation detection result includes: the classification result of whether each sampling point in the M-lead ECG signal belongs to the atrial fibrillation signal.
[0064] In this embodiment, the first feature mapping unit and the second feature mapping unit include a 16×1×32 single-layer convolution; both the first encoder and the second encoder include two cascaded encoding units; the encoding unit includes: a cascaded convolutional layer, a batch normalization layer, an activation layer and a dropout layer; by stacking two convolutional modules, more complex and advanced features can be extracted, which is beneficial for capturing basic information from the input data.
[0065] In each encoder stage, the convolutional layers in each encoding unit have the same convolutional size; the number of convolutional kernels in each encoder stage is double that of the previous encoder stage; the dimensions of the convolutional layers in the first encoder stage are 16×1×32. The downsampling unit is a Maxpool layer, used to halve the feature length of the signal samples. The decoding process of the decoding module is the reverse of the encoding process. The decoder consists of two cascaded decoding units; each decoding unit includes: cascaded convolutional layers, batch normalization layers, activation layers, and dropout layers; the convolutional layers in each decoding unit in each decoder stage have the same convolutional size; the number of convolutional kernels in each encoder stage is double that of the next encoder stage. During the encoding stage, the convolutional kernels in the encoder are doubled level by level, and the feature length is halved using a Maxpool layer with a stride of 2; while in the decoding stage, the process is reversed, using upsampling layers to double the feature length, resulting in the extracted features being concatenated level by level. To improve the robustness of the model, a Dropout layer is connected after each convolutional module in the decoding stage. The spatial channel hybrid attention module is a CBAM model; each spatial channel hybrid attention module assigns different weights to the features of each layer to achieve feature enhancement; the classifier has a convolution size of 16×1×1 and an output dimension of 1024×1, obtaining the classification result of whether each sampling point in the M-lead ECG signal belongs to the atrial fibrillation signal.
[0066] In this embodiment, 200,000 two-lead ECG signal samples and corresponding labels were extracted from 23 ECG signal recordings (raw multi-lead ECG signals) lasting 10 hours. To verify the effectiveness of the proposed atrial fibrillation signal segmentation model, 10-fold cross-validation was performed on the extracted two-lead ECG signal samples. Specifically, the extracted two-lead ECG signal samples were first randomly divided into ten equal parts, and one part was used as the test set, while the remaining nine parts were used as the training set. Then, the ECG signal atrial fibrillation detection system was trained using samples from the training set and tested on the test set. Finally, the average result of the ten tests was calculated. On these raw multi-lead ECG signals, the ECG signal atrial fibrillation detection system achieved a sensitivity of 99.4% and a specificity of 99.5%. To verify the applicability and generalization ability of the method of the present invention, experiments were also conducted on 10,000 cases of 12-lead static ECG data. The results showed that the ECG signal atrial fibrillation detection system could also achieve an atrial fibrillation detection accuracy of 97.7%.
[0067] like Figure 2 The image shown is a schematic diagram of the actual atrial fibrillation detection results for the test sample. Figure 3 This is a schematic diagram showing the atrial fibrillation detection results obtained by using the electrocardiogram signal atrial fibrillation detection system provided by this invention to detect a test sample. Figure 4 This diagram illustrates the atrial fibrillation (AF) detection results obtained by using existing AF signal classification models on test samples. As can be seen from the diagram, existing AF signal classification models generally categorize test samples as non-AF. However, the ECG signal AF detection system of this invention can effectively distinguish whether AF occurs at each sampling point, thus accurately determining the start and end times of AF, making it suitable for the field of ECG analysis technology.
[0068] In summary, the detection resolution of this invention is independent of the time window length; using a time window of any length, the obtained atrial fibrillation detection resolution can be accurate to each sampling point of the electrocardiogram signal. Furthermore, this invention is applicable to data acquired by electrocardiogram devices with different leads, and is also suitable for various Holter monitors and static electrocardiogram devices capable of acquiring electrocardiogram signals, without requiring additional signal processing steps.
[0069] Secondly, the present invention provides a method for detecting atrial fibrillation using electrocardiogram signals, comprising:
[0070] The ECG signal to be detected in lead M is input into the ECG signal atrial fibrillation detection system provided in the first aspect of the present invention to obtain the corresponding atrial fibrillation detection result, thereby determining whether the ECG signal in lead M contains an atrial fibrillation signal and the start and end times of the atrial fibrillation signal, so as to achieve higher detection resolution and time accuracy; wherein, M≥2.
[0071] The related technical solutions are the same as those provided in the first aspect of this invention for the atrial fibrillation detection system of electrocardiogram signals, and are not limited here.
[0072] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the atrial fibrillation detection method for electrocardiogram signals provided in the second aspect of the present invention.
[0073] The related technical solutions are the same as the atrial fibrillation detection method for electrocardiogram signals provided in the second aspect of this invention, and are not limited here.
[0074] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device containing the storage medium to perform the atrial fibrillation detection method provided in the second aspect of the present invention.
[0075] The related technical solutions are the same as the atrial fibrillation detection method provided in the second aspect of this invention, and are not limited here.
[0076] Fifthly, the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the atrial fibrillation detection method provided in the second aspect of the present invention.
[0077] The related technical solutions are the same as the atrial fibrillation detection method provided in the second aspect of this invention, and are not limited here.
[0078] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A cardiac signal atrial fibrillation detection system, characterized in that, include: The first lead encoding module includes: N cascaded first encoders and a downsampling unit positioned between two adjacent first encoders, used to extract N features of the m-lead ECG signal at different scales, denoted as follows from largest to smallest: ; For the first i Features extracted by the first encoder in stage 1; N is a positive integer; the m-lead ECG signal includes: ECG signals extracted from the M-lead ECG signal to be detected at m preset acquisition sites; the m preset acquisition sites remain consistent during the system's training and inference processes; 0 < m < M; M ≥ 2; The second-lead encoding module includes: N cascaded second encoders and a downsampling unit disposed between two adjacent second encoders, used to extract N features of the M-lead ECG signal at different scales, denoted in descending order of scale as follows: ; For the first i Features extracted by the second encoder; The decoding module includes: N cascaded decoders and an upsampling unit disposed between two adjacent decoders; i The level decoder is respectively connected to the N-th level decoder. i +1 level first encoder and N- i +1 level second encoder is connected via spatial channel hybrid attention module; and with the first i The spatial channel hybrid attention module connected to the first encoder is used to perform spatial channel hybrid attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. ; and the i The spatial channel hybrid attention module connected to the second encoder is used to perform spatial channel hybrid attention based on the spatial channel hybrid attention mechanism. Perform feature enhancement to obtain enhanced features. The first-level decoder is used for... and Features and enhanced features after concatenation along the channel dimension , Decode the feature to obtain the first decoded feature; the Nth feature... -j +1 level decoder is used based on the N-th level j Decoding features and enhancement features , Decode to obtain the Nth... -j +1 decoding feature; ; A classifier is used to obtain the corresponding atrial fibrillation detection result based on the Nth decoded feature; the atrial fibrillation detection result includes: the classification result of whether each sampling point in the M-lead ECG signal belongs to the atrial fibrillation signal.
2. The atrial fibrillation detection system based on electrocardiogram signals according to claim 1, characterized in that, The first lead encoding module further includes: a first feature mapping unit connected before the first encoder of the first stage, used to extract the initial features of the m-lead electrocardiogram signal; The second lead encoding module further includes a second feature mapping unit connected before the first-level second encoder, used to extract the initial features of the M-lead ECG signal.
3. The atrial fibrillation detection system based on electrocardiogram signals according to claim 1, characterized in that, The m preset collection sites include: the fourth intercostal space at the left sternal border, and / or the pathway from the right upper limb to the left lower limb.
4. The atrial fibrillation detection system based on any one of claims 1-3, characterized in that, The M-lead ECG signal is obtained by sampling the original M-lead ECG signal using a fixed-size time window starting from the initial moment of the signal.
5. The atrial fibrillation detection system based on any one of claims 1-3, characterized in that, The M-lead ECG signal is obtained by standardizing the original M-lead ECG signal and then sampling it from the initial moment of the signal using a fixed-size time window.
6. The atrial fibrillation detection system based on any one of claims 1-3, characterized in that, The atrial fibrillation detection system based on electrocardiogram signals was trained in the following manner: Obtain a training set; the training samples in the training set are ECG signal samples in lead M', and the corresponding labels include: whether each sampling point in the ECG signal sample in lead M' belongs to the true result of atrial fibrillation signal; where M'≥2; Each training sample in the training set is input into the ECG signal atrial fibrillation detection system to obtain the corresponding atrial fibrillation detection result. The ECG signal atrial fibrillation detection system is trained by minimizing the difference loss between the obtained atrial fibrillation detection result and the corresponding label.
7. A method for processing electrocardiogram (ECG) signals, characterized in that, include: The ECG signal to be detected in lead M is input into the ECG signal atrial fibrillation detection system according to any one of claims 1-6 to obtain the corresponding atrial fibrillation detection result; M≥2.
8. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the electrocardiogram signal processing method of claim 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program is run by a processor, it controls the device containing the storage medium to perform the electrocardiogram signal processing method of claim 7.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the electrocardiogram signal processing method of claim 7.
Citation Information
Patent Citations
Twelve-lead electrocardiosignal automatic classification method based on double attention mechanism
CN115568860A
Multi-lead pulse signal intelligent identification method and system based on deep learning
CN117281528A