Abstract:Sleep staging is the basis of sleep data analysis. Given the dependence on manual extraction, the inefficiency of manual classification, and the inaccuracy of automatic sleep staging of current sleep staging methods, this paper proposes a method that combines two deep-learning neural networks, namely the convolutional neural network (CNN) and the bidirectional long-short memory neural network (BiLSTM), and uses electroencephalogram (EEG) data to conduct automatic sleep staging. This algorithm can extractmelspectrograms toobtain the original EEG dataand uses CNN and BiLSTM to extractfeatures in the time domain and the frequency domain. CNN can extract the high-level features of sleep signals, and BiLSTM can improvethe accuracy of automatic sleep staging when combinedwith the correlation of sleep data of different stages. The experimental results show that the proposed methodachievesan average accuracy of 89.0% in the three-state sleep staging task on the Sleep-EDF dataset. Compared with the traditional staging model based on statistical rules, this model is simpler, more accurate, and more efficient and has better generalization performance. The proposed algorithm is suitable for nonlinear, unstable, and non-stationary EEG data and effectively improves the accuracy of the results of the automatic sleep staging model. It possesses practical value in modern sleep medicine, sleep disorders, and other research.