Abstract:Sleep problems are becoming increasingly prominent in contemporary society. Timely detection and evaluation of sleep quality can help diagnose sleep diseases. In view of the uneven development of sleep monitoring products on the market, this study builds an online real-time sleep staging system based on dual-channel EEG signals, which uses the third-party interface brain ring to obtain EEG data, and the study combines with a CNN-BiLSTM neural network model to realize online real-time sleep staging and music regulation on the personal computer (PC). The system uses the algorithm model based on both a convolutional neural network (CNN) and a bidirectional long short-term memory (BiLSTM) neural network to automatically extract features of EEG signals. CNN can extract high-order features, and BiLSTM can capture the dependence and correlation of data before and after sleep, which makes the accuracy of sleep staging higher. The experimental results show that the proposed algorithm model achieves a staging accuracy of 92.33% and a Kappa coefficient of 0.84 in the four-classification task on the Sleep-EDF public data set. The real-time sleep staging function of the system achieves a staging accuracy of 79.17% in a self-collected sleep data staging experiment, with a Kappa coefficient of 0.70. Compared with other sleep monitoring products, this system has higher accuracy in sleep staging, diversified application scenarios, and strong real-time capability and reliability. Besides, it can regulate music for users according to the staging results to improve the sleep quality of users.