Atrial fibrillation classification method, electronic device, readable storage medium and program product
By using multi-scale convolution and attention mechanisms of AI networks to process ECG signal data, the problems of large computational load and low accuracy in atrial fibrillation classification in existing technologies have been solved, achieving efficient and accurate atrial fibrillation classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHERN MEDICAL UNIVERSITY
- Filing Date
- 2025-04-17
- Publication Date
- 2026-04-14
AI Technical Summary
Existing methods for classifying atrial fibrillation using neural networks involve large computational loads and have low accuracy.
An AI network is employed, including a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module. Feature data is extracted through multi-scale convolution, and channel and spatial attention are extracted by combining depthwise separable convolution and attention processing. Atrial fibrillation is classified using bidirectional long short-term memory layers and fully connected layers.
It improves the accuracy and generalization ability of atrial fibrillation classification, reduces the complexity and computational load of the model, and enhances the ability to process electrocardiogram signal data.
Smart Images

Figure CN120123912B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of artificial intelligence and medical data analysis technology. Specifically, this disclosure relates to an atrial fibrillation classification method, an electronic device, a readable storage medium, and a program product. Background Technology
[0002] Atrial fibrillation (AF) is the most common sustained arrhythmia. Its detection, diagnosis and management are costly. In the diagnosis and management of AF, a standard 12-lead electrocardiogram or a single-lead electrocardiogram (≥30s) can be used to diagnose AF. At the same time, mobile health and artificial intelligence (AI) technologies can be used for AF screening and risk prediction.
[0003] With the development of technology, deep learning, as an important branch of artificial intelligence, has been applied in various fields of the medical industry. Deep learning enables machines to analyze and learn by studying the inherent patterns and representational layers of sample data, allowing for disease diagnosis and assessment. Deep learning is a machine learning method based on artificial neural networks. Classic models include feedforward neural networks, convolutional neural networks, recurrent neural networks, and long short-term memory networks. With the development of deep learning technology, new models and methods such as the Transformer model with attention mechanisms, generative adversarial networks, and graph neural networks have emerged, enhancing the capabilities of deep learning.
[0004] However, existing methods for classifying atrial fibrillation using neural networks involve large computational loads and have low accuracy. Summary of the Invention
[0005] This disclosure provides an atrial fibrillation classification method, an electronic device, a readable storage medium, and a program product to address at least one of the aforementioned technical problems. The technical solution is as follows:
[0006] In a first aspect, embodiments of this disclosure provide an atrial fibrillation classification method, which uses an artificial intelligence (AI) network to classify electrocardiogram (ECG) signal data to obtain classification information related to atrial fibrillation;
[0007] The AI network includes a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module;
[0008] The classification and processing of electrocardiogram signal data includes:
[0009] The multi-scale convolution module extracts feature data at at least two scales from the electrocardiogram signal data.
[0010] The first feature processing module performs depthwise separable convolution processing on the feature data, and performs channel attention and spatial attention processing to obtain the first feature.
[0011] The second feature processing module extracts a second feature, including contextual information, based on the first feature.
[0012] The classification module determines classification information related to atrial fibrillation based on the second feature.
[0013] In one feasible embodiment, the first feature processing module includes at least one sub-module consisting of a depthwise separable convolutional unit and an attention unit, wherein the at least one sub-module includes at least two cascaded and residually connected depthwise separable convolutional units.
[0014] The step of performing depthwise separable convolution on the feature data through the first feature processing module, and then performing channel attention and spatial attention processing to obtain the first feature includes:
[0015] The depthwise separable convolutional unit is used to perform depthwise convolution and pointwise convolution on the input features.
[0016] The attention unit performs channel attention and spatial attention processing on the input features.
[0017] In the residual connection structure, the output of the previous unit is accumulated onto the output of the cascaded unit and used as the input of the next unit.
[0018] In one feasible embodiment, the second feature processing module includes at least one bidirectional long short-term memory layer;
[0019] The step of extracting a second feature, including contextual information, based on the first feature through the second feature processing module includes:
[0020] Context processing is performed based on the first feature through at least one bidirectional long short-term memory layer.
[0021] In one feasible embodiment, the second feature processing module further includes an attention layer disposed after the bidirectional long short-term memory layer;
[0022] The attention layer is used to perform global attention processing on the output of the bidirectional long short-term memory layer.
[0023] In one feasible embodiment, the classification module includes at least one fully connected layer;
[0024] The step of determining classification information related to atrial fibrillation based on the second feature through the classification module includes:
[0025] By using the at least one fully connected layer, feature mapping with each heart rhythm category is performed based on the second feature to determine classification information related to atrial fibrillation.
[0026] In one feasible embodiment, the electrocardiogram signal data includes single-lead data;
[0027] The classification information related to atrial fibrillation includes one of the following:
[0028] Multi-category information, including at least one category of atrial fibrillation, sinus bradycardia, supraventricular tachycardia, and atrial bigeminy;
[0029] The information is classified into two categories: atrial fibrillation and non-atrial fibrillation.
[0030] In one feasible embodiment, the AI network is trained by the following operations:
[0031] Acquire sample data; the sample data includes electrocardiogram signal sample data with rhythm tags;
[0032] Select data from any lead of the electrocardiogram signal sample data to obtain single-lead sample data;
[0033] Based on the rhythm label, the single-lead sample data is segmented to obtain several signal segments of preset length;
[0034] For each signal segment, denoising and normalization are performed to obtain training data, and a corresponding category label is determined for each training data.
[0035] The AI network is trained based on the training data and its category labels.
[0036] In a second aspect, embodiments of this disclosure provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect and any embodiment thereof.
[0037] Thirdly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect and any of its embodiments.
[0038] Fourthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect and any of its embodiments.
[0039] The beneficial effects of the technical solutions provided in this disclosure are:
[0040] This disclosure provides an atrial fibrillation (AF) classification method. It utilizes an AI network to classify electrocardiogram (ECG) signal data, obtaining AF-related classification information. The AI network architecture provided in this disclosure includes a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module. Specifically, the multi-scale convolution module extracts features from the input ECG signal data, obtaining feature data at at least two scales. Then, the first feature processing module performs depthwise separable convolution on the feature data, applying channel attention and spatial attention to obtain a first feature. Next, the second feature processing module extracts a second feature, including contextual information, based on the first feature. Finally, the classification module determines the AF-related classification information based on the second feature. In this embodiment, by extracting feature data at different scales as the basis for subsequent operations, the feature representation can be enriched, and the accuracy of atrial fibrillation classification results can be improved. By using a hybrid processing of depthwise separable convolution and attention, the model complexity can be reduced while effectively improving network performance. In addition, the processing of channel attention and spatial attention can improve the model's classification accuracy and generalization ability. On this basis, obtaining contextual information from the features can effectively improve the model's expressive ability. Furthermore, classification based on these extracted features is beneficial to improving the model's generalization ability and accuracy in processing electrocardiogram signal data. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0042] Figure 1 A flowchart of an atrial fibrillation classification method provided in this embodiment of the disclosure;
[0043] Figure 2 A simplified structural diagram of an AI network provided in an embodiment of this disclosure;
[0044] Figure 3 This is a schematic diagram of the structure of a depth-separable convolutional module provided in an embodiment of the present disclosure;
[0045] Figure 4 This is a schematic diagram of the structure of an AI network provided in an embodiment of the present disclosure;
[0046] Figure 5a An electrocardiogram of a patient in normal condition is provided as an embodiment of this disclosure;
[0047] Figure 5b An electrocardiogram (ECG) of a patient during the onset of atrial fibrillation is provided in an embodiment of this disclosure;
[0048] Figure 6A schematic diagram of an average confusion matrix provided in an embodiment of this disclosure;
[0049] Figure 7 A schematic diagram of a confusion matrix provided in an embodiment of this disclosure;
[0050] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0051] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0052] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the illustrated feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0053] The term "based on" as used in the various embodiments of this disclosure can be interpreted as meaning that the premises, conditions, or information upon which it is based are not unique, but at least one or a part of them. That is, it indicates that at least one explicit basis exists, and does not exclude other possible basis.
[0054] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0055] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0056] The following describes the atrial fibrillation classification method provided in the embodiments of this disclosure.
[0057] Specifically, such as Figure 1 As shown, the atrial fibrillation classification method includes using an AI network to classify electrocardiogram signal data and obtain classification information related to atrial fibrillation.
[0058] Optionally, the electrocardiogram (ECG) signal data may include data acquired via an electrocardiogram. An ECG is a graphical representation of the weak electrical signals generated during the contraction and relaxation of the heart muscle by placing electrodes on the body surface, amplifying and recording these signals. These signals are presented in waveform form and contain information about heart activity.
[0059] Optionally, the AI network can classify atrial fibrillation based on multi-lead data or single-lead data. In this embodiment, to reduce computational complexity and streamline the model, single-lead data is used as the input to the AI network. When processing single-lead data, the AI network can analyze the data more quickly due to the relatively small data volume, thus improving the efficiency of atrial fibrillation classification. The single-lead data can be data from one lead selected from the acquired electrocardiogram (ECG) signal data.
[0060] Optionally, the ECG signal data can be pre-processed. For example, a recorded data point with a duration of 24 hours (this is just one example; it could be longer). After being processed into individual lead data through single-lead selection, it can be segmented, such as into signal segments of 5 seconds or other specific time lengths, to improve the model's processing efficiency and reduce complexity. Furthermore, to improve classification accuracy, the data can be denoised and normalized.
[0061] Optionally, the ECG signal data input to the model may also include auxiliary data, such as user data corresponding to the single-lead data in the above embodiments, which may include information such as age, gender, and genetic history. User data, as auxiliary input to the AI network, can improve classification accuracy.
[0062] Optional, such as Figure 2As shown, the AI network can include a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module. The multi-scale convolution module extracts multi-scale features, which effectively enriches feature expression, broadens the coverage of subsequent feature extraction, and reduces information loss. In atrial fibrillation classification, considering local details (such as smaller rhythm changes) while considering global information (such as large rhythm variations) effectively improves the network's capabilities, enabling the AI network to better capture information from the data. The first feature processing module can be configured with a lightweight design to reduce the number of parameters and computational load while maintaining high performance. The second feature processing module can be configured to process the contextual information of ECG signals, effectively adapting to the processing of complex sequence data of ECG signals and improving the generalization ability and accuracy of ECG signal data processing. The classification module can be configured with a design to assist in improving classification accuracy, such as processing the rich features obtained through fully connected layers to obtain more accurate classification results.
[0063] Optionally, the classification information related to atrial fibrillation includes multi-class information, which may include at least one classification of atrial fibrillation, sinus bradycardia, supraventricular tachycardia, and atrial bigeminy. It is understood that this can be a classification of multiple different abnormal heart rhythms. For example, it can be identified using labels, such as configuring a category label for each heart rhythm category and outputting the results in the form of category labels.
[0064] Optionally, the classification information related to atrial fibrillation includes binary classification information, which can include classification information for atrial fibrillation or non-atrial fibrillation. Figure 5a This shows a patient's normal heart rhythm record (not atrial fibrillation). Figure 5b The image shows a patient's atrial fibrillation episode record; the voltage on the vertical axis represents the voltage value of the electrocardiogram signal, in millivolts (mV).
[0065] In one feasible embodiment, the electrocardiogram signal data is classified and processed, including S101 to S104:
[0066] S101. Using the multi-scale convolution module, extract feature data at least two scales from the electrocardiogram signal data.
[0067] For example, such as Figure 4As shown, a multi-scale convolutional module can include at least two branches, each corresponding to a convolutional block. Each branch can use convolutional kernels of different sizes (such as 3×3, 5×5, 7×7, etc.) or different dilation rates to extract features. Small convolutional kernels can capture local details, while large convolutional kernels or dilated convolutions capture global context. Features at different scales can then be fused through concatenation or weighted summation to form a comprehensive feature representation, i.e., feature data. Optionally, each convolutional block can include two one-dimensional convolutional layers and two pooling layers, with at least one normalization layer and at least one activation layer cascaded after the convolutions. Multi-scale features can be extracted under different convolutional kernel sizes, enriching the feature representation. The pooling layers can be max pooling layers, used to select the maximum value within the receptive field as the output.
[0068] Optionally, after the ECG signal data is processed by a multi-scale convolution module to obtain features at at least two scales, it can be spliced along the channel dimension and then output to subsequent network modules for processing.
[0069] S102. The first feature processing module performs depthwise separable convolution on the feature data and performs channel attention and spatial attention processing to obtain the first feature.
[0070] Optional, such as Figure 4 As shown, the first feature processing module may include depthwise separable convolutional units (such as depthwise separable convolutional blocks 1, 2...10) and attention units, such as CBAM (Convolutional Block AttentionModule), a lightweight attention mechanism module that combines channel attention and spatial attention.
[0071] Optionally, a depthwise separable convolutional unit can be composed of a cascaded depthwise convolution (such as Depthwise Convolution, which can convolution each input channel individually to extract spatial features) and a pointwise convolution (such as Pointwise Convolution, which can mix channel information). Each convolution is followed by at least one normalization layer (such as Bn, Batch Normalization) and at least one activation layer (such as ReLU6, Rectified LinearUnit 6, an improved activation function that limits input values to between 0 and 6). Figure 3 As shown, the design of depthwise separable convolutional units can reduce model complexity and improve model processing efficiency.
[0072] Optionally, the attention unit can be composed of cascaded channel attention blocks and spatial attention blocks, calculating weight information in the channel dimension and spatial dimension respectively to focus on important features and improve feature representation ability.
[0073] S103. The second feature processing module extracts a second feature, including contextual information, based on the first feature.
[0074] Optionally, considering that ECG signal data involves complex sequence data, to better represent features, a network capable of extracting contextual information can be configured to capture local and global, short-term and long-term dependencies. For example, convolutional neural networks (CNNs) and their variants (such as pyramid pooling), recurrent neural networks (RNNs) and their variants (such as BiLSTM), self-attention mechanisms, and Transformer architectures can be configured to extract contextual information.
[0075] S104. The classification module determines classification information related to atrial fibrillation based on the second feature.
[0076] Optionally, the classification module, as the output module of the AI network, is responsible for classification based on the extracted features. Located at the end of the AI network, it receives features from the preceding network layers and outputs the classification results. For example, the classification module may include fully connected layers, or other types of layers, such as a softmax layer. In this embodiment, the processing of the softmax layer can distinguish multiple heart rhythm categories, i.e., perform a multi-classification task. Alternatively, it may be a sigmoid layer. In this embodiment, the processing of the sigmoid layer can distinguish whether atrial fibrillation has occurred, i.e., perform a binary classification task.
[0077] In one feasible embodiment, such as Figure 4 As shown, the first feature processing module includes at least one sub-module consisting of a depthwise separable convolutional unit and an attention unit, wherein at least one sub-module includes at least two cascaded and residually connected depthwise separable convolutional units.
[0078] For example, the first feature processing module may include multiple sets of sub-modules, such as Figure 4 In this module, depthwise separable convolutional blocks 1, 2, and CBAM constitute the first sub-module; depthwise separable convolutional blocks 3, 4, and CBAM constitute the second sub-module; and depthwise separable convolutional blocks 5 through 10 and CBAM constitute the third sub-module. The sequence number of each depthwise separable convolutional block is related to its position within the given space. Figure 4 The order of the sorting from left to right is corresponding.
[0079] Optionally, to avoid network degradation and improve model expressiveness, a residual connection structure is also configured in the third submodule. For example... Figure 4 As shown, the output of depthwise separable convolution block 6 is accumulated onto the output of depthwise separable convolution block 8 and combined as the input of depthwise separable convolution block 9; correspondingly, the input of depthwise separable convolution block 9 is accumulated onto the output of depthwise separable convolution block 10 and combined as the input of its subsequent CBAM module.
[0080] Optionally, in S102, the first feature processing module performs depthwise separable convolution on the feature data and performs channel attention and spatial attention processing to obtain the first feature, including steps A1 to A2:
[0081] Step A1: Perform depthwise convolution and pointwise convolution on the input features using the depthwise separable convolution unit.
[0082] Step A2: The input features are processed by the attention unit through channel attention and spatial attention.
[0083] In the residual connection structure, the output of the previous unit is accumulated onto the output of the cascaded unit and used as the input of the next unit.
[0084] Optional, such as Figure 4 As shown, the first submodule consists of a depthwise separable convolutional block 1, a depthwise separable convolutional block 2, and a CBAM module, all cascaded together. The second submodule uses the output of the first submodule as input for feature processing and includes a depthwise separable convolutional block 3, a depthwise separable convolutional block 4, and a CBAM module, also cascaded together. The third submodule includes six cascaded depthwise separable convolutional blocks and a CBAM module, configured with a residual structure. The output of depthwise separable convolutional block 6 can be accumulated to the output of depthwise separable convolutional block 8 and used as input to depthwise separable convolutional block 9. The input of depthwise separable convolutional block 9 can be accumulated to the output of depthwise separable convolutional block 10 and used as input to the CBAM module.
[0085] In this embodiment, channel attention and spatial attention mechanisms are combined to improve the model's classification accuracy and generalization ability. In addition, the design incorporates depthwise separable convolutional units and attention units, which can deepen the network while reducing model complexity.
[0086] In one feasible embodiment, the second feature processing module includes at least one bidirectional long short-term memory layer.
[0087] Optionally, in S103, the second feature processing module extracts a second feature including context information based on the first feature, including step B1: performing context processing based on the first feature through the at least one bidirectional long short-term memory layer.
[0088] Optional, such as Figure 4 As shown, the second feature processing module is designed with a bidirectional long short-term memory (BiLSTM) layer. Through BiLSTM processing, the contextual information of the electrocardiogram signal can be focused on, and the long-term dependency features of the sequence can be extracted.
[0089] Optionally, the designed BiLSTM layer can improve the model's expressive power. BiLSTM can effectively capture the contextual information of sequence data and extract key features, which are then passed to the classification module (such as a fully connected layer), enabling the classification module to perform more accurate classification or regression based on these rich features. This network structure design allows the entire AI network to better adapt to complex sequence data such as ECG signal data, improving the model's generalization ability and accuracy in processing ECG signal data.
[0090] Optional, such as Figure 4 As shown, BiLSTM layers can be designed to capture information from sequence data in two directions (forward and backward), such as capturing future information and capturing past information. This bidirectional information capture capability enables AI networks to have stronger expressive power and improves the temporal analysis capabilities of ECG signal data.
[0091] Optionally, the second feature processing module also includes an attention layer positioned after the bidirectional long short-term memory layer, such as... Figure 4 The Global Attention module is shown. This attention layer performs global attention processing on the output of the bidirectional long short-term memory layer.
[0092] Optionally, global attention processing can calculate the weight of each feature, allowing the model to focus on more important information when processing sequence data. Configuring a global attention layer after the BiLSTM layer can help the model more comprehensively understand the inherent patterns and structure of the sequence data by calculating the correlation between each feature and the entire sequence, thereby improving subsequent atrial fibrillation classification tasks.
[0093] In this embodiment of the disclosure, although the addition of the global attention layer increases the complexity of the model, the global attention layer can improve the efficiency of the model by giving more weight to important features. For example, when processing long sequence data of electrocardiogram signals, the global attention layer can guide the model to focus only on features that are valuable for the classification of atrial fibrillation, thereby reducing unnecessary computation.
[0094] In one feasible embodiment, such as Figure 4 As shown, the classification module includes at least one fully connected layer.
[0095] Optionally, in S104, the classification module determines classification information related to atrial fibrillation based on the second feature, including: using the at least one fully connected layer to perform feature mapping with each rhythm category based on the second feature to determine classification information related to atrial fibrillation.
[0096] Optionally, fully connected layers can fuse features extracted from preceding network layers and map them to the label space of samples (such as arrhythmia categories) for classification.
[0097] For example, network layers (such as convolutional layers, pooling layers, etc.) configured before fully connected layers can extract features from the input data and represent them as two-dimensional feature maps (matrices). The fully connected layers then fuse the features extracted from the preceding layers, such as connecting each node to all nodes in the previous layer, performing a linear transformation using weight matrices and bias vectors to convert the feature map into a one-dimensional vector, and then converting each element of the one-dimensional vector into a probability value based on activation functions such as the softmax function. This probability value indicates the likelihood that the input data belongs to each heart rhythm category.
[0098] In the embodiments disclosed herein, such as Figure 4 As shown, the ECG signal is processed by a multi-scale convolution module to obtain features at least two scales. After being concatenated along the channel dimension, the features are input into subsequent network blocks. The first feature processing module consists of two depthwise separable convolutional units stacked together with one layer of CBAM units. The third sub-module consists of six layers of depthwise separable convolutional blocks cascaded with one layer of CBAM, where the last four depthwise separable convolutional units are residually connected in pairs. The second feature processing module consists of BiLSTM and global attention, and its output is used as the input to the classification module. The classification module performs the final classification through two fully connected layers.
[0099] The following is combined Figure 4 The AI network architecture provided in this public embodiment is illustrated by example.
[0100] For example, the network consists of two parts, one of which is used for feature extraction, such as... Figure 4The FeatureExtractor section shown extracts relevant feature representations from the input data for use in subsequent tasks (such as classification); the other section is used for classification, such as... Figure 4 The Classification section shown.
[0101] The network input data can be a heart rate dataset containing 3840 data points (e.g., Input 1). 3840).
[0102] The feature extraction part includes the multi-scale convolution module (such as Multi-Conv), the first feature processing module (such as the part composed of Depthwise Block and CBAM) and the second feature processing module (such as the part composed of BiLSTM and Global Attention) described in the above embodiments.
[0103] The classification component includes the fully connected layer (such as FC) described in the above embodiments. For example, the data input to the FC for processing includes a multiplication operation performed on the output of the BiLSTM and the output of Global Attention (such as...). Figure 4 middle" The result obtained is that the weights calculated based on global attention are multiplied by the feature map obtained by BiLSTM processing, and the weighted feature map is used as the input of FC.
[0104] The network's output data can be classification results, such as AF (atrial fibrillation) and NSR (normal sinus rhythm).
[0105] The training process of the AI network provided in the embodiments of this disclosure will be described below.
[0106] In one feasible embodiment, the AI network is trained through the following steps C1 to C5:
[0107] Step C1: Obtain sample data; the sample data includes electrocardiogram signal sample data with rhythm tags.
[0108] Step C2: Select data from any lead in the ECG signal sample data to obtain single-lead sample data.
[0109] Step C3: Based on the rhythm label, the single-lead sample data is segmented to obtain several signal segments of preset length.
[0110] Step C4: Denoise and normalize each signal segment to obtain training data, and determine the corresponding category label for each training data.
[0111] Step C5: Train the AI network based on the training data and its category labels.
[0112] Optionally, a certain amount of ECG signal data with rhythm labels can be collected. Data from one lead can be selected to form a single-lead dataset. The data is then categorized according to the rhythm label and segmented into segments of a certain length. After excluding severely noisy segments, the remaining ECG segments are denoised and normalized, and the corresponding category label for each signal segment is determined. The processed data is then divided into training, validation, and test sets. The training set is input into the model for model fitting and network weight adjustment. The validation set is used to adjust hyperparameters so that the model performs better on the test set. The test set is used to evaluate the model's performance.
[0113] The effects achievable by the embodiments of this disclosure will be explained below with reference to experimental data.
[0114] ECG data were collected from the public database LTAFDB (Long Term AF Database), which contains 84 two-lead ECG data points from 84 patients, each data point being approximately 24 hours long. Data was segmented based on rhythm annotations (such as the rhythm labels in the example above), and noise segments were excluded, denoised, and normalized, resulting in 133,240 30-second ECG segments. Each segment was assigned a category label, including 65,314 atrial fibrillation segments and 67,926 normal segments. The training, validation, and test sets were divided in an 8:1:1 ratio, ensuring no overlap of patients across the three datasets.
[0115] The model was trained using the Adam optimizer, with data augmentation through random shifts and random noise, and 10-fold cross-validation was performed. On the test set, the average classification accuracy was 96.10%, the average recall was 93.86%, and the average F1 score was 95.77%. The average confusion matrix is shown below. Figure 6 As shown. To evaluate the model's generalization ability, an external test set was used. Data was obtained from the public database MIT-BIH AFDB (MIT-BIH AF Database, MIT-BIH Atrial Fibrillation Database), and the same data processing was performed to obtain 20,485 30-second ECG segments. The trained model was then tested, and the accuracy rate was 92.98%. The confusion matrix is shown below. Figure 7 As shown. It is understandable that... Figure 6 The image shows the average confusion matrix of the test set in the 10-fold cross-validation of the training dataset, which represents the average of the ten results. Figure 7 The diagram shows the confusion matrix of the external test set, illustrating the case corresponding to a single result.
[0116] Experimental results show that the model designed in this invention can classify atrial fibrillation well and has good generalization ability.
[0117] It should be noted that, in the optional embodiments of this disclosure, the information involved (such as electrocardiogram signal data) requires the permission or consent of the user when applied to specific products or technologies. Furthermore, the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this disclosure involve data related to the user, this data must be obtained with the user's authorization and consent, and in accordance with the relevant laws, regulations, and standards of the country and region.
[0118] This disclosure provides an electronic device, specifically a medical device. The host of this device includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of an atrial fibrillation classification method. Compared with related technologies, this method can achieve: classifying electrocardiogram (ECG) signal data using an AI network to obtain classification information related to atrial fibrillation. The AI network architecture provided in this disclosure may include a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module. Specifically, the multi-scale convolution module can extract features from the input ECG signal data to obtain feature data at at least two scales. Then, the first feature processing module can perform depthwise separable convolution on the feature data and perform channel attention and spatial attention processing to obtain a first feature. Furthermore, the second feature processing module can extract a second feature, including contextual information, based on the first feature. Finally, the classification module determines the classification information related to atrial fibrillation based on the second feature. In this embodiment, by extracting feature data at different scales as the basis for subsequent operations, the feature representation can be enriched, and the accuracy of atrial fibrillation classification results can be improved. By using a hybrid processing of depthwise separable convolution and attention, the model complexity can be reduced while effectively improving network performance. In addition, the processing of channel attention and spatial attention can improve the model's classification accuracy and generalization ability. On this basis, obtaining contextual information from the features can effectively improve the model's expressive ability. Furthermore, classification based on these extracted features is beneficial to improving the model's generalization ability and accuracy in processing electrocardiogram signal data.
[0119] In one alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this disclosure.
[0120] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0121] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0122] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0123] The memory 4003 is used to store computer programs that execute embodiments of the present disclosure, and is controlled by the processor 4001 to execute them. The processor 4001 is used to execute the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0124] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0125] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0126] The terms “first,” “second,” “third,” “fourth,” “1,” “2,” etc. (if present) in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in a sequence other than that shown in the figures or text.
[0127] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0128] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for classifying atrial fibrillation, characterized in that, By using artificial intelligence (AI) networks, electrocardiogram (ECG) signal data is classified and processed to obtain classification information related to atrial fibrillation. The AI network includes a multi-scale convolution module, a first feature processing module, a second feature processing module, and a classification module; The classification and processing of electrocardiogram signal data includes: The multi-scale convolution module extracts feature data at at least two scales from the electrocardiogram signal data. The first feature processing module performs depthwise separable convolution on the feature data and performs channel attention and spatial attention processing to obtain the first feature. The second feature processing module extracts a second feature, including contextual information, based on the first feature. The classification module determines classification information related to atrial fibrillation based on the second feature. The first feature processing module includes three cascaded sub-modules. The first sub-module consists of a depthwise separable convolutional block 1, a depthwise separable convolutional block 2, and a convolutional block attention module 1. The second sub-module consists of a depthwise separable convolutional block 3, a depthwise separable convolutional block 4, and a convolutional block attention module 2. The third sub-module consists of a depthwise separable convolutional block 5, a depthwise separable convolutional block 6, a depthwise separable convolutional block 7, a depthwise separable convolutional block 8, a depthwise separable convolutional block 9, a depthwise separable convolutional block 10, and a convolutional block attention module 3. The output of depthwise separable convolutional block 6 is accumulated onto the output of depthwise separable convolutional block 8 and combined as the input of depthwise separable convolutional block 9. The input of depthwise separable convolutional block 9 is accumulated onto the output of depthwise separable convolutional block 10 and combined as the input of convolutional block attention module 3. The second feature processing module includes at least one bidirectional long short-term memory layer.
2. The method according to claim 1, characterized in that, The step of performing depthwise separable convolution on the feature data through the first feature processing module, and then performing channel attention and spatial attention processing to obtain the first feature includes: The input features are processed by depthwise separable convolutional blocks, which perform depthwise convolution and pointwise convolution. The input features are processed with channel attention and spatial attention through the convolutional block attention module.
3. The method according to claim 1, characterized in that, The step of extracting a second feature, including contextual information, based on the first feature through the second feature processing module includes: Context processing is performed based on the first feature through at least one bidirectional long short-term memory layer.
4. The method according to claim 3, characterized in that, The second feature processing module also includes an attention layer located after the bidirectional long short-term memory layer; The attention layer is used to perform global attention processing on the output of the bidirectional long short-term memory layer.
5. The method according to claim 1, characterized in that, The classification module includes at least one fully connected layer; The step of determining classification information related to atrial fibrillation based on the second feature through the classification module includes: By using the at least one fully connected layer, feature mapping with each heart rhythm category is performed based on the second feature to determine classification information related to atrial fibrillation.
6. The method according to any one of claims 1 to 5, characterized in that, The electrocardiogram signal data includes single-lead data; The classification information related to atrial fibrillation includes one of the following: Multi-category information, including at least one category of atrial fibrillation, sinus bradycardia, supraventricular tachycardia, and atrial bigeminy; The information is classified into two categories: atrial fibrillation and non-atrial fibrillation.
7. The method according to claim 1, characterized in that, The AI network was trained through the following operations: Acquire sample data; the sample data includes electrocardiogram signal sample data with rhythm tags; Select data from any lead of the electrocardiogram signal sample data to obtain single-lead sample data; Based on the rhythm label, the single-lead sample data is segmented to obtain several signal segments of preset length. For each signal segment, denoising and normalization are performed to obtain training data, and a corresponding category label is determined for each training data. The AI network is trained based on the training data and its category labels.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Burn deep artificial intelligence identification method and system based on deep learning model
CN117612704A
Partial discharge fault type classification method based on GAN adversarial network and CNN-BiLSTM-Attention mechanism
CN119249227A