当代社会睡眠问题日益突出, 及时检测评估睡眠质量有助于诊断睡眠疾病. 针对目前市面上睡眠监测类产品发展参差不齐的现状, 本文搭建了一个基于双通道脑电信号的在线实时睡眠分期系统, 利用第三方接口脑环获取脑电数据, 结合CNN-BiLSTM神经网络模型, 在PC电脑端实现了在线的实时睡眠分期与音乐调控功能. 系统使用基于卷积神经网络CNN和双向长短时记忆神经网络BiLSTM相结合的算法模型对脑电信号进行自动特征提取, CNN能够提取高阶特征, BiLSTM可以捕捉睡眠数据前后的依赖性和关联性, 睡眠分期准确率更高. 实验结果表明, 本文算法模型在Sleep-EDF公共数据集上的四分类任务中取得了92.33%的分期准确率, 其Kappa系数为0.84, 本系统的实时睡眠分期功能在自采集睡眠数据分期实验中取得79.17%的分期准确率, 其Kappa系数为0.70. 相比其他睡眠监测类产品, 本系统睡眠分期准确率更高, 应用场景更多样, 实时性和可靠性强, 并且可以根据分期结果对用户进行相应的音乐调控, 改善用户睡眠质量.
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.