| CPC A61B 5/349 (2021.01) [A61B 5/308 (2021.01); A61B 5/7203 (2013.01); G16H 50/20 (2018.01)] | 9 Claims | 

| 
               1. A few-shot electrocardiogram (ECG) signal classification method based on an improved Siamese network, comprising the following steps: 
              a) acquiring n original ECG signals to form an original ECG signal set D, D={(x1, y1), (x2, y2), . . . , (xi, yi), . . . , (xn, yn)}, wherein xi denotes an i-th original ECG signal, and yi denotes a class label corresponding to the i-th original ECG signal xi, i∈{1, . . . , n}; 
                b) preprocessing the original ECG signal set D to remove noise in the n original ECG signals, thereby acquiring a clean ECG signal set D′, D′={(x′1, y1), (x′2, y2), . . . , (x′i, yi), . . . , (x′n, yn)}, wherein x′i denotes an i-th clean ECG signal; 
                c) normalizing the i-th clean ECG signal x′i to acquire a normalized ECG signal x″i; and performing zero-padding in an end of a sequence of the normalized ECG signal x″i if a length of the sequence of the normalized ECG signal x″i is less than Lmax, wherein the length of the sequence of the normalized ECG signal x″i is equal to Lmax, and a normalized ECG signal set D″ is acquired, D″={(x″1, y1), (x″2, y2), . . . , (x″i, yi), . . . , (x″n, yn)}; 
                d) creating a sample pair set P based on the normalized ECG signal set D″, 
              ![]() yi−1 denotes a class label corresponding to an (i−1)-th original ECG signal xi−1; and there are M sample pairs in the sample pair set P, 
              ![]() e) constructing a few-shot classification model, and inputting a sample pair ((x′i, x′i+1),Y′) from the sample pair set P into the few-shot classification model to acquire a similarity score Ew(x″i, x″i+1); 
                f) training, by an adaptive moment estimation (Adam) optimizer, the few-shot classification model through a loss function L to acquire an optimized few-shot classification model; 
                g) randomly sampling K ECG signals from each of N classes in a Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) dataset to form a support set Ssupport, Ssupport={(s1, a1), (s2, a2), . . . , (si, ai), . . . , (sNK, aNK)}, wherein S; denotes an i-th ECG signal, and ai denotes a class label corresponding to the i-th ECG signal si, i∈{1, . . . , NK}; 
                h) randomly sampling Q ECG signals from each of the N classes in the MIT-BIH dataset to form a set Squery, Squery={(q1, b1), (q2, b2), . . . , (qi, bi), . . . , (qNQ, bNQ)}, wherein qi denotes an i-th ECG signal, and bi denotes a class label corresponding to the i-th ECG signal qi, i∈{1, . . . , NQ}; 
                i) replacing the i-th original ECG signal xi with the i-th ECG signal si, and repeating the steps b) and c) to acquire an i-th normalized ECG signal s″i, wherein a normalized support set S″support is acquired, S″support={(s″1, a1), (s″2, a2), . . . , (s″i, ai), . . . , (s″NK, aNK)}; and replacing the i-th original ECG signal xi with the i-th ECG signal qi, and repeating the steps b) and c) to acquire an i-th normalized ECG signal q″i, a normalized query set S″query is acquired, S″query={(q″1, b1), (q″2, b2), . . . , (q″i, bi), . . . , (q″NQ, bNQ)}; and 
                j) inputting the i-th normalized ECG signal s″i and the i-th normalized ECG signal q″i into the optimized few-shot classification model to acquire a classification result. 
               |