The invention discloses a pulse Jaccard attention and twin network-based electrocardiogram classification method, which comprises the following steps of: acquiring an original electrocardiogram
signal, performing
cascade filtering on the original electrocardiogram
signal, mapping the filtered
signal to a
dynamic range matched with an LIF
neuron membrane potential threshold value by utilizing a self-adaptive threshold value
normalization algorithm, obtaining a normalized signal, inputting the normalized signal into a pulse
encoder, and outputting the normalized signal into a twin network; a
pulse sequence is obtained, and the
pulse sequence is input into the twinborn double-
branch pulse neural network with the shared weight; based on the output of the twinborn double-
branch pulse neural network, calculating the total loss by utilizing a joint
loss function, updating network parameters through back propagation, obtaining the trained twinborn double-
branch pulse neural network, performing anomaly classification on the real-time electrocardiogram signal, and outputting an anomaly result. According to the method, the event-driven characteristic of the
spiking neural network, the high discrimination ability of the Jaccard attention mechanism and the
small sample learning ability of the twin network are utilized, so that the robustness of the model in a
small sample scene is enhanced.