The automatic detection of arrhythmia is of great significance for the early prevention and diagnosis of cardiovascular diseases. Traditional arrhythmia diagnosis is limited by expert knowledge and complex algorithms, and lacks multi-dimensional feature representation capabilities, which is not suitable for wearable electrocardiogram (ECG) monitoring equipment. This study proposed a feature extraction method based on autoregressive moving average (ARMA) model fitting. Different types of heartbeats were used as model inputs, and the characteristic of fast and smooth signal was used to select the appropriate order for the arrhythmia signal to perform coefficient fitting, and complete the ECG feature extraction. The feature vectors were input to the support vector machine (SVM) classifier and K-nearest neighbor classifier (KNN) for automatic ECG classification. MIT-BIH arrhythmia database and MIT-BIH atrial fibrillation database were used to verify in the experiment. The experimental results showed that the feature engineering composed of the fitting coefficients of the ARMA model combined with the SVM classifier obtained a recall rate of 98.2% and a precision rate of 98.4%, and the F1 index was 98.3%. The algorithm has high performance, meets the needs of clinical diagnosis, and has low algorithm complexity. It can use low-power embedded processors for real-time calculations, and it’s suitable for real-time warning of wearable ECG monitoring equipment.
Electrocardiogram (ECG) can visually reflect the physiological electrical activity of human heart, which is important in the field of arrhythmia detection and classification. To address the negative effect of label imbalance in ECG data on arrhythmia classification, this paper proposes a nested long short-term memory network (NLSTM) model for unbalanced ECG signal classification. The NLSTM is built to learn and memorize the temporal characteristics in complex signals, and the focal loss function is used to reduce the weights of easily identifiable samples. Then the residual attention mechanism is used to modify the assigned weights according to the importance of sample characteristic to solve the sample imbalance problem. Then the synthetic minority over-sampling technique is used to perform a simple manual oversampling process on the Massachusetts institute of technology and Beth Israel hospital arrhythmia (MIT-BIH-AR) database to further increase the classification accuracy of the model. Finally, the MIT-BIH arrhythmia database is applied to experimentally verify the above algorithms. The experimental results show that the proposed method can effectively solve the issues of imbalanced samples and unremarkable features in ECG signals, and the overall accuracy of the model reaches 98.34%. It also significantly improves the recognition and classification of minority samples and has provided a new feasible method for ECG-assisted diagnosis, which has practical application significance.