| Objective: Electrocardiogram(ECG)is a commonly used in clinical diagnosis and treatment method.Abnormal waveform of ECG is usually manifested as arrhythmia,which is common in daily life and is a high incidence of cardiovascular disease.There are two methods for automatic detection of ECG,which are traditional method and deep learning method.The traditional method needs to extract the features manually,the process is cumbersome and the result is not ideal.Deep learning method can automatically extract features and classify them end-to-end,which is very simple.At present,the data samples in most studies are mainly single-label samples,which involve fewer categories of ECG,while in real life,an abnormal ECG record is often accompanied by the occurrence of multiple diseases.Therefore,the purpose of this study is to use the deep learning method to carry out end-to-end automatic classification task of abnormal ECG based on data samples closer to actual clinical practice.Compared with the previous single-label task,this study belongs to multi-label and multi-classification task.Methods: The ECG data were collected from the Engineering Research Center of Mobile Health Management System,Ministry of Education,Hangzhou Normal University.The sample is 8-lead data with sampling rate of 500 Hz and unit voltage of 4.88μV.In addition,one sample in the sample has at least one label,there are 34 categories,and the distribution is uneven.The basic network model frameworks adopted in this paper are ResNet 35 and ResNet 51 respectively,thefive different Attention mechanisms are CAM,SAM,CBAM,MAM and MTAM proposed in this paper.MAM mechanism can be used to capture cross-channel information of data,while MTAM mechanism can not only extract channel information and spatial information from the data,but also integrate channel and spatial information to a certain extent.Through the combination of different Attention Mechanism and different ResNet frameworks,the ECG data were automatically classified.In addition,as we know,ECG data is a time series.Therefore,in order to further enhance the sequence of data,this paper proposes to add Timeflag data before data is put into the network,that is,the data obtained by normalized processing of natural number sequence.Result: By combining the ResNet framework with different Attention Mechanisms,the results showed that ResNet 35 performed better than ResNet 51 under the same conditions.The overall F1 value of the ResNet 35+ CBAM model was 0.917,and the overall F1 value of the ResNet 35+MTAM model was 0.916.After timeflag was added,the F1 value of ResNet 35+CBAM+ timeflag model and ResNet 35+MTAM+timeflag model both reached 0.923.In addition,the Weighted avg F1 value of the ResNet 35+MTAM model is 0.960 by using the Classificatio_report function in Sklearn.Conclusion: Compared with the ResNet 51 model,the ResNet 35 model is more suitable for the data processing in this paper.At the same time,the performance of the model is significantly improved after the addition of Attention Mechanism and timeflag.In addition,through comparative experiments,the effect of CBAM mechanism is better than that of CAM and SAM,and MTAM mechanism can produce the similar effect of CBAM mechanism on the model.The MTAM mechanism and timeflag proposed in this paper have great advantages in processing time series data. |