US 12,290,386 B1
Multi-lead electrocardiogram (ECG) signal classification method based on self-supervised learning
Yinglong Wang, Jinan (CN); Wei Liu, Jinan (CN); Minglei Shu, Jinan (CN); Pengyao Xu, Jinan (CN); Shuwang Zhou, Jinan (CN); and Zhaoyang Liu, Jinan (CN)
Assigned to QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES), Jinan (CN); and SHANDONG COMPUTER SCIENCE CENTER (NATIONAL SUPERCOMPUTING CENTER IN JINAN), Jinan (CN)
Filed by Qilu University of Technology (Shandong Academy of Sciences), Jinan (CN); and SHANDONG COMPUTER SCIENCE CENTER (NATIONAL SUPERCOMPUTING CENTER IN JINAN), Jinan (CN)
Filed on May 15, 2024, as Appl. No. 18/664,341.
Claims priority of application No. 202311479336.6 (CN), filed on Nov. 8, 2023.
Int. Cl. A61B 5/00 (2006.01); G06N 3/0895 (2023.01); G16H 50/20 (2018.01)
CPC A61B 5/7267 (2013.01) [G06N 3/0895 (2023.01); G16H 50/20 (2018.01)] 9 Claims
OG exemplary drawing
 
1. A multi-lead electrocardiogram (ECG) signal classification method based on self-supervised learning, comprising the following steps:
a) acquiring original ECG signal data X;
b) preprocessing the original ECG signal data X to acquire a preprocessed ECG signal X′;
c) constructing a data augmentation unit, inputting the preprocessed ECG signal X′ into the data augmentation unit, and outputting an augmented positive sample Xa and an augmented negative sample Ya;
d) constructing an encoder module; inputting the augmented positive sample Xa into the encoder module, and outputting an encoded sequence Xc; and inputting the augmented negative sample Ya into the encoder module, and outputting an encoded sequence Yc;
e) constructing a feature dimensionality reconstruction module; inputting the encoded sequence Xc into the feature dimensionality reconstruction module, and outputting a dimensionality-reconstructed lead feature Xg; and inputting the encoded sequence Yc into the feature dimensionality reconstruction module, and outputting a dimensionality-reconstructed lead feature Yg;
f) training, by an adaptive moment estimation (Adam) optimizer, the encoder module through a contrastive learning loss to acquire a trained encoder module;
g) replacing the original ECG signal data X in the step b) with ECG signal data Z that needs classification, and repeating the step b) to acquire a preprocessed ECG signal Z′;
h) inputting the preprocessed ECG signal Z′ into the trained encoder module, and outputting an encoded sequence Zc;
i) replacing the encoded sequence Xc in the step e) with the encoded sequence Zc, and repeating the step e) to acquire a dimensionality-reconstructed lead feature Zg; and
j) acquiring a final class based on the dimensionality-reconstructed lead feature Zg;
wherein the step d) comprises:
d-1) constructing the encoder module, comprising a one-dimensional convolutional layer, a time-domain fusion module temporal convolutional fusion network (TCFN), an average pooling layer, and a Dropout layer;
d-2) inputting the augmented positive sample Xa into the one-dimensional convolutional layer, and outputting a feature Xc1; and inputting the augmented negative sample Ya into the one-dimensional convolutional layer, and outputting a feature Yc1;
d-3) dividing the TCFN into a first branch, a second branch, and a third branch;
d-4) constructing the first branch, comprising a first convolutional block, a second convolutional block, a third convolutional block, and a fourth convolutional block, wherein each of the first convolutional block, the second convolutional block, the third convolutional block, and the fourth convolutional block comprises a first convolutional layer, a second convolutional layer, a BatchNormal1d layer, a rectified linear unit (ReLU) layer, a MaxPool1d layer, and a Dropout layer in sequence; inputting the feature Xc1 into the first convolutional block in the first branch, and outputting a feature Xc11; inputting the feature Xc11 into the second convolutional block in the first branch, and outputting a feature Xc12; inputting the feature Xc12 into the third convolutional block in the first branch, and outputting a feature outputting a feature Xc13; inputting the feature Xc13 into the fourth convolutional block in the first branch, and outputting a feature Xc1′; inputting the feature Yc1 into the first convolutional block in the first branch, and outputting a feature Yc11; inputting the feature Yc11 into the second convolutional block in the first branch, and outputting a feature Yc12; inputting the feature Yc12 into the third convolutional block in the first branch, and outputting a feature Yc13; and inputting the feature Yc13 into the fourth convolutional block in the first branch, and outputting a feature Yc1′,
d-5) constructing the second branch, comprising a lead memory block (LM_Block) and a skip connection module, wherein the LM_Block comprises a global pooling layer, a long short-term memory (LSTM) layer, a one-dimensional convolutional layer, and a ReLU activation function in sequence; inputting the feature Xc1 into the LM_Block, and outputting a feature Xc11; inputting the feature Xc11 and the feature Xc1 into the skip connection module for a first addition operation to acquire a feature Xc1″; inputting the feature Yc1 into the LM_Block, and outputting a feature Yc11; and inputting the feature Yc11 and the feature Yc1 into the skip connection module for a second addition operation to acquire a feature Yc1″;
d-6) constructing the third branch, comprising an attention module, a first one-dimensional convolutional layer, a second one-dimensional convolutional layer, a third one-dimensional convolutional layer, and a maximum pooling layer; inputting the feature Xc1 into the attention module, and performing, by a torch.nn.MultiheadAttention function in Python programming language, a first attention operation on the feature Xc1 to obtain a first resulting feature; inputting the first resulting feature into the first one-dimensional convolutional layer, the second one-dimensional convolutional layer, the third one-dimensional convolutional layer, and the maximum pooling layer in sequence, and outputting an encoded sequence Xc1′″; inputting the feature Yc1 into the attention module, and performing, by the torch.nn.MultiheadAttention function in Python programming language, a second attention operation on the feature Yc1 to obtain a second resulting feature; and inputting the second resulting feature into the first one-dimensional convolutional layer, the second one-dimensional convolutional layer, the third one-dimensional convolutional layer, and the maximum pooling layer in sequence, and outputting an encoded sequence Yc1′″; and
d-7) subjecting the feature Xc1′, the feature Xc1″, and the encoded sequence Xc1′″ to addition and averaging to acquire a feature Xc2; subjecting the feature Yc1′, the feature Yc1″, and the encoded sequence Yc1′″ to addition and averaging to acquire a feature Yc2; inputting the feature Xc2 into the average pooling layer and the Dropout layer of the encoder module in sequence, and outputting the encoded sequence Xc; and inputting the feature Yc2 into the average pooling layer and the Dropout layer of the encoder module in sequence, and outputting the encoded sequence Yc.