# US 2025/0166820 A1 · Electrocardiogram (ecg) signal classification method based on contrastive learning and multi-scale feature extraction

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0166820 A1
- Document ID: US20250166820A1
- Status: Published application
- Kind: A1
- Application number: 18/664,289
- Filed: 2024-05-15
- Published: 2025-05-22
- Earliest claimed: 2023-11-16
- Assignees: Qilu University of Technology (Shandong Academy of Sciences); Shandong Artificial Intelligence Institute; Shandong Computer Science Center (National Supercomputing Center In Jinan)
- Applicants: Qilu University of Technology (Shandong Academy of Sciences); Shandong Artificial Intelligence Institute; Shandong Computer Science Center (National Supercomputing Center In Jinan)
- Inventors: Minglei SHU; Luyao LI; Pengyao XU; Shuwang ZHOU; Zhaoyang LIU
- Web page: https://patentgrep.com/patent/US20250166820A1

## CPC

- G16H 50/20: for computer-aided diagnosis, e.g. based on medical expert systems
- Y02A 90/10: Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
- G16H: HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- Y02A: TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE

## Abstract

An electrocardiogram (ECG) signal classification method based on contrastive learning and multi-scale feature extraction are provided. A squeeze-and-excitation—residual networks with next-generation aggregated transformations—context-aware network (SE-ResNeXt-CAN) network model includes a shallow feature extraction module, a first squeeze-and-excitation residual module (SERM), a second SERM, a first context-aware residual module (CARM), and a second CARM. Through the combination and optimization of these modules, the SE-ResNeXt-CAN network model adaptively learns a correlation between channels, and expands a receptive field to fully capture a key feature, improving the performance and generalization ability of an ECG signal classification task.

## Claims

### Claim 1

An electrocardiogram (ECG) signal classification method based on contrastive learning and multi-scale feature extraction, comprising the following steps:
a) dividing an ECG signal dataset into K batches, each of the K batches comprising T signals forming an ECG signal set X, X={X1, X2, . . . , Xi, . . . , XT}, wherein Xi denotes an i-th ECG signal, i∈{1, . . . ,T};
b) performing data augmentation on the i-th ECG signal Xi to acquire a sample XiM1;
c) constructing a squeeze-and-excitation—residual network with next-generation aggregated transformations—context-aware network (SE-ResNeXt-CAN) network model, comprising a shallow feature extraction module, a first squeeze-and-excitation residual module (SERM), a second SERM, a first context-aware residual module (CARM), and a second CARM, wherein the residual network is constructed such that the first SERM receives an output of the shallow feature extraction module as an input, the second SERM receives an output of the first SERM as an input, the first CARM receives an output of the second SERM as an input, and the second CARM receives an output of the first CARM as an input;
d) inputting the sample XiM1 into the shallow feature extraction module of the SE-ResNeXt-CAN network model to acquire a feature ƒ1;
e) inputting the feature ƒ1 into the first SERM of the SE-ResNeXt-CAN network model to acquire a feature ƒ2;
f) inputting the feature ƒ2 into the second SERM of the SE-ResNeXt-CAN network model to acquire a feature ƒ3;
g) inputting the feature ƒ3 into the first CARM of the SE-ResNeXt-CAN network model to acquire a feature ƒ4;
h) inputting the feature ƒ4 into the second CARM of the SE-ResNeXt-CAN network model to acquire a feature ƒ5;
i) constructing a first multilayer perceptron, comprising a flattening layer, a first fully connected layer, and a second fully connected layer in sequence; and inputting the feature ƒ5 into the first multilayer perceptron to acquire a feature hi;
j) training the SE-ResNeXt-CAN network model to acquire an optimized SE-ResNeXt-CAN network model;
k) dividing a new ECG signal dataset into K batches, each of the K batches comprising T signals forming an ECG signal set Y, Y={Y1, Y2, . . . , Yi, . . . , YN}, wherein Yi denotes an i-th ECG signal, i∈{1, . . . ,T}; and
n) inputting the i-th ECG signal Yi into the optimized SE-ResNeXt-CAN network model to acquire a feature ƒ5′; constructing a second multilayer perceptron, comprising a flattening layer, a first fully connected layer, a rectified linear unit (Relu) activation function layer, and a second fully connected layer in sequence; inputting the feature ƒ5′ into the second multilayer perceptron to acquire a feature ƒ5″; and inputting the feature ƒ5″ into a softmax activation function to acquire a probability distribution Zi of the i-th ECG signal Yi, wherein the probability distribution Zi is a classification result of the ECG signal;
wherein the step d) comprises:
d-1) constructing the shallow feature extraction module of the SE-ResNeXt-CAN network model, comprising a convolutional layer, a Batch Norm layer, a Relu activation function, and a Dropout layer in sequence; and inputting the sample XiM1 into the shallow feature extraction module to acquire the feature ƒ1;
wherein the step e) comprises:
e-1) constructing the first SERM of the SE-ResNeXt-CAN network model, comprising a residual module (RM) and an excitation and convolution module;
e-2) constructing the RM of the first SERM, comprising a first branch and a second branch; constructing the first branch of the RM, comprising a first convolutional layer, a second convolutional layer, a first batch normalization (BN) layer, a Relu activation function, a third convolutional layer, a second BN layer, and a Dropout layer in sequence; inputting the feature ƒ1 into the first branch of the RM to acquire a feature ƒ12; constructing the second branch of the RM, comprising a max pooling layer and a convolutional layer in sequence; inputting the feature ƒ1 into the second branch of the RM to acquire a feature ƒ22; and adding the feature ƒ12 and the feature ƒ22 to acquire a feature rm1;
e-3) constructing the excitation and convolution module, comprising a first convolutional layer, a first SE module, a second convolutional layer, a second SE module, a third convolutional layer, and a third SE module in sequence; and inputting the feature ƒ1 into the excitation and convolution module to acquire a feature ƒ32; and
e-4) adding the feature rm1 and the feature ƒ32 to acquire the feature ƒ2;
wherein the step f) comprises:
f-1) constructing the second SERM of the SE-ResNeXt-CAN network model, comprising a RM and an excitation and convolution module;
f-2) constructing the RM of the second SERM, comprising a first branch and a second branch; constructing the first branch of the RM, comprising a first convolutional layer, a second convolutional layer, a first BN layer, a Relu activation function, a third convolutional layer, a second BN layer, and a Dropout layer in sequence; inputting the feature ƒ2 into the first branch of the RM to acquire a feature ƒ13; constructing the second branch of the RM, comprising a max pooling layer and a convolutional layer in sequence; inputting the feature ƒ2 into the second branch of the RM to acquire a feature ƒ23; and adding the feature ƒ13 and the feature ƒ23 to acquire a feature rm2;
f-3) constructing the excitation and convolution module, comprising a first convolutional layer, a first SE module, a second convolutional layer, a second SE module, a third convolutional layer, and a third SE module in sequence; and inputting the feature ƒ2 into the excitation and convolution module to acquire a feature ƒ33; and
f-4) adding the feature rm2 and the feature ƒ33 to acquire the feature ƒ3;
wherein the step g) comprises:
g-1) constructing the first CARM of the SE-ResNeXt-CAN network model, comprising a RM, a dilated convolution module, and a channel attention module;
g-2) constructing the RM of the first CARM, comprising a first branch and a second branch; constructing the first branch of the RM, comprising a first convolutional layer, a BN layer, a first Relu activation function, a second convolutional layer, a second Relu activation function, and a Dropout layer in sequence; inputting the feature ƒ3 into the first branch of the RM to acquire a feature ƒ14; constructing the second branch of the RM, comprising a convolutional layer; inputting the feature ƒ3 into the second branch of the RM to acquire a feature ƒ24; adding the feature ƒ14 and the feature ƒ24 to acquire a feature rm3;
g-3) constructing the dilated convolution module of the first CARM, comprising a first dilated convolution layer, a first convolutional layer, a second dilated convolution layer, a second convolutional layer, and a Relu activation function in sequence; inputting the feature ƒ3 into the dilated convolution module to acquire a feature ƒ34; and adding the feature rm3 and the feature ƒ34 to acquire a feature pcdc1;
g-4) constructing the channel attention module of the first CARM, comprising a convolutional layer, an average pooling layer, a first fully connected layer, and a second fully connected layer in sequence; and inputting the feature ƒ3 into the channel attention module to acquire a feature ƒ44; and
g-5) multiplying the feature pcdc1 by the feature ƒ44 to acquire the feature ƒ4;
wherein the step h) comprises:
h-1) constructing the second CARM of the SE-ResNeXt-CAN network model, comprising a RM, a dilated convolution module, and a channel attention module;
h-2) constructing the RM of the second CARM, comprising a first branch and a second branch; constructing the first branch of the RM, comprising a first convolutional layer, a BN layer, a first Relu activation function, a second convolutional layer, a second Relu activation function, and a Dropout layer in sequence; inputting the feature ƒ4 into the first branch of the RM to acquire a feature ƒ15; constructing the second branch of the RM, comprising a convolutional layer; inputting the feature ƒ4 into the second branch of the RM to acquire a feature ƒ25; adding the feature ƒ15 and the feature ƒ25 to acquire a feature rm4;
h-3) constructing the dilated convolution module of the second CARM, comprising a first dilated convolution layer, a first convolutional layer, a second dilated convolution layer, a second convolutional layer, and a Relu activation function in sequence; inputting the feature ƒ4 into the dilated convolution module to acquire a feature ƒ35; and adding the feature rm4 and the feature ƒ35 to acquire a feature pcdc2;
h-4) constructing the channel attention module of the second CARM, comprising a convolutional layer, an average pooling layer, a first fully connected layer, and a second fully connected layer in sequence; and inputting the feature ƒ4 into the channel attention module to acquire a feature ƒ45; and
h-5) multiplying the feature pcdc2 by the feature ƒ45 to acquire the feature ƒ5.

### Claim 2 (depends on 1)

The ECG signal classification method based on the contrastive learning and the multi-scale feature extraction according to claim 1, wherein in the step a), the ECG signal dataset is a PTB-XL dataset, and the T signals in each of the K batches are sampled at a rate of 500 Hz, with duration of 10 s.

### Claim 3 (depends on 1)

The ECG signal classification method based on the contrastive learning and the multi-scale feature extraction according to claim 1, wherein the step b) comprises:
b-1) generating, by an np.random.normal function in Python, Gaussian noise with a mean of 0, a variance of 0.01, and a same size as the i-th ECG signal Xi; and
b-2) adding the Gaussian noise to the i-th ECG signal Xi to acquire the sample XiM1.

### Claim 4

(canceled)

### Claim 5

(canceled)

### Claim 6

(canceled)

### Claim 7

(canceled)

### Claim 8

(canceled)

### Claim 9 (depends on 1)

The ECG signal classification method based on the contrastive learning and the multi-scale feature extraction according to claim 1, wherein the step j) comprises: training, by an adaptive moment estimation (Adam) optimizer, the SE-ResNeXt-CAN network model through an NT-Xent loss function to acquire the optimized SE-ResNeXt-CAN network model.

### Claim 10 (depends on 1)

The ECG signal classification method based on the contrastive learning and the multi-scale feature extraction according to claim 1, wherein in the step k), the new ECG signal dataset is a China Physiological Signal Challenge (CPSC) dataset, and the signals in each of the batches are sampled at a rate of 500 Hz, with duration of 10 s.
