| Sleep is an important physiological activity,and its quality is closely related to the health of the human body.A good sleep can make people refreshed and full of vitality,while a bad sleep will not only make people listless,but also induce various diseases.Therefore,it is very important to monitor and analyze the sleeping situation.Sleep staging is an essential step before sleep analysis.The traditional sleep staging research has great difficulties due to the disadvantages of large equipment and limited space.However,research on sleep staging based on ECG signals overcomes these difficulties and is easy to record and analyze and facilitate daily monitoring.Based on the above reasons,ECG signal is used as the only source signal flow to study sleep staging.The main contents are as follows.1.Using the internationally recognized MIT-BIH database,ECG data and sleep staging data were taken as basic data.First,a series of pre-processing is performed on the data.Secondly,feature extraction of ECG signals was carried out on this basis,and two 5-minute heart rate variability feature extraction time windows were proposed on the basis of existing literature research.Finally,training sets and test sets were divided based on stratified sampling and subject-specific and subject-independent sleep model training programs for subsequent model research.2.Support vector machine and random forest sleep staging model were constructed based on the features obtained from the two feature extraction windows and the different combinations of the two model training schemes to realize the two-stage and three-stage automatic sleep staging.In the construction of support vector machine and random forest sleep staging model,the grid search algorithm is used to optimize the hyperparameters.In this process,the classification effects of different feature extraction windows,different model training schemes and different staging standards are compared respectively.The results show that: the feature extraction method based on the 30-second five-minute time windows is similar to the 30-second centered model;the performance of the subject-specific model is better than that of the subject-independent model,but the latter is more practical.Under the premise of other conditions being the same,the effect of two-stage sleep staging was stronger than three-stage sleep staging.The SVM and RF automatic sleep staging methods proposed in this part can be applied to different staging standards and have high accuracy and consistency for different subjects.3.Based on the advantages of 1D-CNN algorithm and feature fusion method,a1D-CNN feature fusion sleep staging model was proposed.In addition,continuous optimization of fusion parameters was carried out in the subject-specific model scheme,and two staging and three staging were carried out in the cross-validation process,achieving the highest accuracy of 86.3% and 83.7%,respectively.This part makes a comparison with the simple 1D-CNN sleep staging model,the machine learning sleep staging model mentioned in the second part and the deep learning sleep staging based on SLPDB.The results show that: the proposed model can be used for sleep staging and can effectively improve the staging accuracy.It is also suitable for subjects with two staging standards and different staging standards,providing a reference for family sleep monitoring.In general,the sleep staging method based on machine learning and deep learning in this paper can be applied to two staging standards and different subjects,and can effectively improve the staging accuracy,which has practical application value for sleep staging. |