Forehead electroencephalogram rhythm-driven sleep state staging method based on multi-dimensional features
By performing multi-dimensional feature extraction and support vector machine classification on the frontal EEG signal, automatic staging of sleep states with high accuracy is achieved, solving the problem of low accuracy of sleep states in the prior art.
Patent Information
- Application Number
- CN202411967588.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art has problems of low accuracy, long time consumption and difficulty in widely used in daily care at home in terms of sleep state staging.
The sleep state staging method driven by prefrontal EEG rhythm based on multidimensional features is adopted. By preprocessing the prefrontal EEG signal, rhythm wave extraction, time domain characteristics, power spectral density and multi-scale entropy calculations, it is combined with a support vector machine (SVM) to perform automatic staging.
Real-time monitoring and automatic classification of sleep states is achieved, including deep sleep, light sleep and awakening, with high accuracy, with an average accuracy rate of 88.1%, significantly higher than other research methods.
Smart Images

Figure CN119837545A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electroencephalogram signal processing in the field of digital signal processing, and in particular to technologies related to sleep monitoring and classification, and specifically is a sleep state staging method driven by frontal electroencephalogram rhythm based on multi-dimensional features. Background Art
[0002] As people pay more attention to healthy living, monitoring and improving sleep quality has become an important research direction. Sleep is an important physiological process for humans, and humans spend one-third of their lives in resting sleep. Sleep is essential for human health and life. High-quality sleep has many functions, such as improving the human immune system, balancing hormones in the body to promote metabolism, improving learning ability and enhancing memory. In addition, in the sleeping state, the brain's response to external stimuli is reduced, and lesions are easier to detect than in the awake state. Therefore, studying sleep also has important clinical value for the prevention and diagnosis of brain diseases.
[0003] However, human sleep is a complex physiological process, usually including multiple stages, each with specific characteristics and functions. Sleep state classification is an important basis for detecting and treating diseases related to sleep disorders. At present, nocturnal polysomnography (PSG) is the main basis for doctors to visually interpret sleep stages, including multiple signals such as electroencephalogram, electrocardiogram, electromyogram, electrooculogram, etc. Traditional sleep staging requires trained experts to perform manual visual interpretation, which is not only time-consuming and labor-intensive, but also limited by the expert's interpretation level. According to surveys, even sleep experts with many years of clinical staging experience have an average accuracy rate of only about 82%, and each interpretation takes about 2.5 to 4 hours of work. In addition, large PSG equipment is also difficult to be widely used in daily home care. However, with the increasing attention paid to sleep, the development of a portable, fast, real-time and accurate sleep staging system has become the current mainstream requirement. Summary of the invention
[0004] The present invention aims to provide a sleep state staging method driven by frontal EEG rhythm based on multi-dimensional features. The present invention can monitor and automatically classify an individual's sleep state in real time, including deep sleep (N3), light sleep (N1 and N2), wakefulness (w), and rapid eye movement (REM), with high accuracy.
[0005] Technical solution: A sleep state staging method driven by frontal EEG rhythm based on multi-dimensional features, comprising the following steps:
[0006] Step 1, prepare a sleep physiological signal data set; the sleep physiological signal data set includes sleep physiological signals of multiple subjects, and the data sample of each subject includes an electrooculogram signal, a frontal electroencephalogram signal and a sleep stage mark; the sleep stage mark is a sleep stage mark performed according to the AASM standard;
[0007] Step 2: Preprocessing of frontal EEG signals;
[0008] Step 3: Extract rhythmic waves from frontal EEG signals:
[0009] Step 4, respectively calculating the time domain eigenvalues, eigenvalues based on power spectrum density, and eigenvalues based on multi-scale entropy of the frontal EEG signal and the electrooculogram signal;
[0010] Step 5: Send the eigenvalues calculated in step 4 to the SVM support vector machine for automatic staging, and finally optimize the eigenvalue group to obtain the automatically predicted sleep staging result.
[0011] Furthermore, the sleep stage markers in step 1 include wakefulness W, non-rapid eye movement sleep NREM, and rapid eye movement sleep REM, and the non-rapid eye movement sleep NREM includes stages N1, N2, and N3.
[0012] Furthermore, in step 2, preprocessing of the frontal EEG signal includes: intercepting effective data of the sleep state and wavelet threshold denoising.
[0013] Furthermore, in step 4, the time domain feature values of the frontal EEG signal and the electrooculogram signal include:
[0014] The time domain features of the frontal EEG signal include range, mean, variance, standard deviation, peak count, zero crossing number and differential variance;
[0015] The time domain features of electrooculogram signals include range, mean, variance, standard deviation, peak count, zero crossing number and differential variance, large eye movement detection and large eye movement differential variance removal;
[0016] The large eye movement detection refers to identifying large eye movement events and counting them through the time domain characteristics of the electrooculogram signal; the large eye movement removal differential variance refers to calculating the differential variance of the remaining signals after removing large eye movement events from a segment of the eye movement signal.
[0017] Furthermore, in step 4, the eigenvalues based on the power spectrum density include:
[0018] 1) The characteristic values of the frontal EEG signal based on power spectral density include: the power proportion of delta wave, theta wave, alpha wave, beta wave, spindle wave, k complex wave, sawtooth wave, and F δ / θ 、F θ / α 、F α / β、F (θ+δ) / (α+β) Four power ratios;
[0019] 2) The characteristic values of the electrooculogram signal based on the power spectral density include the slow eye movement power ratio F slow-eye and rapid eye movement power ratio F rapid-eye ;
[0020] In step 4, the eigenvalue based on multi-scale entropy:
[0021] Based on the eigenvalue of multi-scale entropy, specifically, a sample entropy-based method is used to calculate the multi-scale entropy of the frontal EEG signal; when calculating the multi-scale entropy, the window length m, the distance threshold r and the scale factor range are: r=0.1SD~0.25SD, the scale factor is 9 to 13, m does not exceed 3, and SD refers to the standard deviation of the time series signal.
[0022] Furthermore, the sleep state staging method further includes:
[0023] Step 6, calculate the sleep quality evaluation index and score the sleep quality;
[0024] Step 7: Generate a visual sleep quality report based on the sleep stage change graph of the person to be tested, the proportion of each sleep period, the sleep quality score result calculated in step 6, and the doctor's advice.
[0025] Furthermore, in step 6, the sleep quality evaluation indicators include total sleep time, sleep latency duration, REM latency duration, N1, N2, N3 and REM ratios, sleep efficiency and wakefulness ratio;
[0026] 1) Count the number of each stage during sleep;
[0027] Get the number of occurrences of N1, N2, N3 and REM stages, the number of awakenings in the deep sleep stage N3 N_awakel, the number of awakenings in the light sleep stage N1 and N2 N_awake2; the duration of the sleep latency L_N, the duration of the REM latency L_R;
[0028] 2) Calculate the proportion of N1, N2, N3 and REM, sleep efficiency and wakefulness ratio;
[0029] The duration of each sleep stage N1, N2, N3 and REM, that is, the number of times each stage appears multiplied by the duration of each frame; the proportion of each sleep stage, that is, the number of times each stage appears compared to the total number of times all stages appear;
[0030] Sleep efficiency SE, that is, the proportion of total sleep time to total time, is calculated as follows:
[0031] SE=T_sleep / T_all
[0032] Where, SE is the sleep efficiency; T_sleep is the total sleep time, which refers to the total duration of N1, N2, N3 and REM; T_all is the total time, which refers to the total duration of W, N1, N2, N3 and REM;
[0033] The wakefulness ratio, that is, the ratio of wakefulness time to total sleep and wakefulness time, is calculated as follows:
[0034] ASR=T_awake / (T_awake+T_sleep)
[0035] Among them, ASR is the awakening ratio, T_awake is the total awakening time;
[0036] 3) Set the normal range value and scoring interval for each indicator, and score according to the normal range value and scoring interval for each indicator.
[0037] Furthermore, step 7 is specifically as follows:
[0038] 1) Using the method of step 2 to step 4, the subject's frontal EEG signal and eye contact signal are processed to obtain characteristic values, the characteristic values are sent to the SVM support vector machine trained in step 5 to obtain the sleep stage results, and a sleep stage change diagram is constructed;
[0039] 2) Calculate the sleep quality evaluation index and score the sleep quality according to step 6 to obtain the proportion of each sleep period and the sleep quality score;
[0040] 3) Generate a visual sleep quality report based on the sleep stage change graph, the proportion of each sleep period, the sleep quality score calculated in step 6, and the doctor's advice.
[0041] Compared with the prior art, the present invention has the following advantages:
[0042] First: The present invention designs a method for automatically staging sleep states based on forehead sleep EEG rhythmic wave signals. Compared with the traditional PSG sleep EEG signal collection, it is simpler, can facilitate the subjects to rest normally, and collect more accurate EEG signals, so it is more helpful for the collection of experimental data and the improvement of the accuracy of subsequent classification, and has certain application value.
[0043] Second: The GA-SVM sleep staging method used in the present invention achieved an average accuracy of 88.1%, which is significantly higher than the accuracy of similar studies in recent years. Judging from the literature using the same Sleep-EDF dataset in recent years, researchers have made various attempts in the field of automatic sleep staging, including the use of new models and algorithms, and proposed innovative methods to solve the problem of sample imbalance. However, the staging accuracy of most studies failed to exceed 85%. By comparing with these methods, the staging method of the present invention has a significant improvement in accuracy, demonstrating its superiority in processing complex EEG signals and improving staging accuracy.
[0044] Third: The present invention can also provide intuitive feedback to users, helping them understand their own sleep quality and status, thereby improving their sleeping habits. Through accurate sleep data analysis and automated scoring, the present invention can not only provide a comprehensive and scientific sleep quality assessment, but also play an important role in the early identification of sleep disorders and personalized medical advice. Its advantages lie in high efficiency, automation, personalized assessment, and support for big data analysis, which makes the present invention have great application potential in the fields of sleep monitoring, health management, and medical research. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a schematic diagram of the sleep stage classification standards;
[0046] Figure 2 This is a schematic diagram of the process of automatic sleep EEG staging;
[0047] Figure 3 It is the data statistics of the five-fold cross-validation group;
[0048] Figure 4 The sample is the original signal collected and the preprocessed wavelet denoising result.
[0049] Figure 5 The waves of each frequency band obtained by FIR bandpass filter;
[0050] Figure 6 This is a schematic diagram of a large eye movement event;
[0051] Figure 7 This is a schematic diagram comparing typical REM signals and non-REM signals;
[0052] Figure 8 It is a line graph of the classification accuracy of the multi-domain feature algorithm for each period;
[0053] Fig. 9 This is a sample report on a patient's sleep quality assessment. DETAILED DESCRIPTION
[0054] The technical solution of the present invention is described in detail below through embodiments, but the protection scope of the present invention is not limited to the embodiments.
[0055] like Figure 1 This is the sleep EEG staging standard for this experiment. Figure 2 The process of automatic sleep EEG staging mainly includes the following steps:
[0056] First, the EEG signal after wavelet threshold denoising is passed through the FIR bandpass filter to extract the rhythm wave, and then the time domain eigenvalue, eigenvalue based on power spectrum density, and eigenvalue based on multi-scale entropy are calculated respectively. Finally, the calculated eigenvalue is sent to the SVM support vector machine for automatic stage division, and finally the eigenvalue group is optimized to obtain the automatic prediction result for evaluation and analysis. Specifically, each step is described as follows:
[0057] Step 1: Prepare the sleep physiological signal dataset.
[0058] The sleep physiological signal dataset prepared in this embodiment is selected from the PhysionetSleep-EDF dataset of the Massachusetts Institute of Technology, which provides 197 PSGs (polysomnograms) from two different studies, namely (1) PSG records of sleep of healthy individuals, with a total of 153 PSGs; and (2) a study on the effects of temazepam on sleep, in which two control groups were recorded for each subject, with a total of 44 PSGs.
[0059] In the Physionet Sleep-EDF dataset, each PSG includes EEG (electroencephalogram, including Fpz-Cz and Pz-Oz), EOG (electro-oculogram), EMG (mandibular electromyography) and event markers. Each PSG in this dataset is also manually labeled with sleep stages frame by frame by trained sleep staging experts according to the R&K standard (Rechtschaffen and Kales standard).
[0060] Event marking refers to sleep stage marking according to AASM standards. For marking according to AASM standards, see Figure 1 The full name of the AASM guidelines is the American Academy of Sleep Medicine guidelines. The sleep stages of the AASM guidelines include wakefulness (W), non-rapid eye movement sleep (NREM, including stages N1, N2, and N3), and rapid eye movement sleep (REM).
[0061] Since the sample records numbered 13, 36, and 52 were incomplete, they were excluded and the data of 150 subjects were selected from 153 PSG records to construct a sleep physiological signal dataset. The data sample of each subject included electrooculogram signals, frontal EEG signals, and sleep stage markers; each sample included 30 minutes of wakefulness before and after sleep.
[0062] Step 2: Preprocessing of frontal EEG signals.
[0063] 1) If Figure 3 As shown, in this embodiment, 150 EDF data subjects in the sleep physiological signal dataset are randomly divided into five groups, each group contains 30 EDF data subjects, and a 5-fold cross validation based on subjects is performed. This means that all data of the same subject will not appear in both the training set and the test set.
[0064] 2) Preprocess the frontal EEG signals in the sleep physiological signal data set in step 1 to reduce the interference of electrocardiogram and electromyography and improve the classification recognition rate. The preprocessing mainly includes intercepting effective data of sleep state, reducing the sampling rate, and wavelet threshold denoising.
[0065] like Figure 4 As shown, wavelet threshold denoising is a widely used signal processing method for removing noise components in signals, and has low entropy and multi-resolution characteristics. In this embodiment, the db4 wavelet basis function commonly used in EEG signals is used, and an effective soft threshold method is applied for denoising. In order to retain useful signal information to the greatest extent during the denoising process and adapt to the complex frequency structure of EEG signals, this embodiment selects a 7-layer wavelet decomposition, followed by signal reconstruction.
[0066] Step 3: Extract rhythmic waves from the frontal EEG signal.
[0067] like Figure 5 As shown, examples of Delta, Theta, Alpha, Beta, spindle wave, k-complex wave and sawtooth wave waveforms in various frequency bands obtained by using FIR bandpass filter. The rhythm wave extraction of this embodiment is realized by using the FIR digital filter method. FIR digital filter has the advantages of not introducing phase distortion, precise control of frequency response, low output delay, flexibility and stability. It can accurately control the frequency band range of rhythm waves to make it close to the ideal characteristics. Its working principle is to perform convolution operation on the input signal and the impulse response of the filter. The impulse response of the filter is used as the weight coefficient of the filter, multiplied and added with the corresponding part of the input signal to obtain the output signal of the filter. Let H d (e jω ) is the frequency response characteristic of an ideal filter, then its unit impulse response is:
[0068]
[0069] In the formula, h d (n) represents the unit impulse response, e jωn represents the frequency component of the signal, n represents the number of discrete signal sampling points, e jω represents the amplitude and phase of the frequency, and ω represents the angular frequency.
[0070] Next, we need to truncate h d (n), this process can be achieved through different methods, such as window function method, frequency sampling method and optimization method, etc. This experiment uses the window function method to achieve it. Commonly used window functions include Hanning window, Hamming window, Kaysel window, Blackman window, etc. The Kaysel window was selected in this experiment. Its advantage is that it can flexibly control the frequency response characteristics of the filter by adjusting the shape parameters. By increasing the shape parameters, higher sidelobe attenuation can be achieved, thereby improving the frequency selection performance of the filter, which makes the Kaysel window commonly used in applications that require higher frequency selection performance. The expression of the Kaysel window is:
[0071]
[0072] Where N represents the length of the selected window function ω(n). I0(β) is a first-order deformed Bessel function of zero order. The ratio of the main lobe width and the side lobe attenuation can be changed by adjusting the β parameter. Generally, the range of β is [4, 9]. Then h(n) = h d (n)ω(n) is the unit pulse response sequence of the target filter, and satisfies h(n)=±h(N-1-n) to ensure its linear phase characteristic. Its frequency response is:
[0073]
[0074] In this way, the ideal frequency response H(e jω ).
[0075] Step 4: Calculate the time domain eigenvalues, eigenvalues based on power spectrum density, and eigenvalues based on multi-scale entropy of the frontal EEG signal and the electrooculogram signal respectively:
[0076] Each frame of signal uses FIR bandpass filter to filter out 7 kinds of rhythmic waves. Each rhythmic wave has 7 time domain eigenvalues, totaling 49 time domain eigenvalues. At the same time, each frame of signal also has 11 power spectrum density eigenvalues and 5 multi-scale entropy eigenvalues. The electrooculogram signal has 9 time domain eigenvalues and 2 power spectrum density eigenvalues. Each frame of signal has a total of 76 eigenvalues.
[0077] Step 4.1: Calculate the time domain eigenvalues.
[0078] 1) The time domain features used in frontal EEG signals include range, mean, variance, standard deviation, peak count, zero crossing number, and differential variance.
[0079] 2) In addition to the range, mean, variance, standard deviation, peak count, zero crossing number, and differential variance of the electrooculogram signal, the present invention also introduces two time-domain feature values of the electrooculogram signal: large eye movement detection and large eye movement differential variance removal.
[0080] Large eye movement detection: Figure 6 As shown in the figure, large eye movement detection is to identify large eye movement events through the time domain characteristics of the electrooculogram signal and count them. In large eye movement detection, it is still necessary to set the amplitude threshold and time threshold. Here, the amplitude threshold is set to 120μV, and the time threshold is set to 1.5 seconds, that is, two adjacent maximum and minimum points are screened out. If the time distance between the two points is within 1.5 seconds and the range is greater than 120μV, then it is recorded as a large eye movement event. The total number of large eye movements is expressed as F blink .
[0081] Remove large eye movement difference variance: Figure 7 As shown, this characteristic value is an innovative characteristic value adopted by the present invention, that is, after removing large eye movement events from a segment of eye movement signal, the differential variance of the remaining signal is calculated. After comparing a large number of samples, it is found that after removing the electrooculogram signal of the large eye movement event interval in the REM period, the remaining part is smoother than the non-REM period, so the differential variance can be used to describe this quantity. The above rules can be clearly found by selecting typical REM and non-REM periods for comparison. The deleted segment is the part between the opposite extreme points in the large eye movement event and the 0.5 second range before and after, and the first-order difference at the breakpoint is recorded as 0. The differential variance of the remaining part of the electrooculogram signal is calculated, and the quantity is expressed as F sdv .
[0082] Step 4.2: Calculate the eigenvalues based on the power spectral density.
[0083] 1) Calculate the eigenvalues of the frontal EEG signal based on the power spectral density.
[0084] The present invention uses the Yule-Walker method when estimating the power spectral density. The Yule-Walker method is a classic method for estimating the parameters of an autoregressive (AR) model. It is based on the sample estimated value of the autocovariance function and obtains the parameter estimation of the AR model by solving the Yule-Walker equations. The Yule-Walker method only requires sample data and does not require assumptions about the probability distribution of the data, and is applicable to various types of time series data. When the sample size is large enough, the parameter estimation of the Yule-Walker method is consistent, that is, it can converge to the true parameter value. In the present invention, by evaluating the influence of the AR order on the power density progress, the AR order is taken as 50. In MATLAB, the pyulear function can be used to conveniently estimate the power spectrum using the Yule-Walker method. In order to eliminate the differences in individual power spectral densities to a certain extent, the present invention introduces the concept of power proportion. The power proportions of δ wave, θ wave, α wave, β wave, spindle wave, k complex wave, and sawtooth wave are taken as characteristic values. At the same time, in order to improve the accuracy, the relative power ratio proposed by Mikkelsen is further introduced as the characteristic value, which is defined as follows:
[0085]
[0086]
[0087]
[0088]
[0089] Where P([a, b]) represents the power in the frequency range aHz to bHz, F δ / θ Indicates the ratio of Delta to Theta band power, F θ / α Indicates the ratio of Theta to Alpha band power, F α / β Indicates the ratio of Alpha to Beta band power, F (θ+δ) / (α+β) It represents the power ratio of slow waves (Delta+Theta) to fast waves (Alpha+Beta).
[0090] 2) Calculate the eigenvalues of the electrooculogram signal based on the power spectral density.
[0091] The characteristic value calculation of the present invention also introduces the electrooculogram signal channel, which is to more accurately distinguish the REM period (rapid eye movement period), W period (wakefulness period) and other periods (non-rapid eye movement period). The characteristic values used are the slow eye movement power ratio and the rapid eye movement power ratio, which are defined as follows:
[0092]
[0093]
[0094] Among them, F slow-eye It indicates the ratio of the energy of the electrooculogram signal in the 0.5-2Hz band to the total energy (0.5-30Hz), reflecting the proportion of low-frequency electrooculogram activity in the total signal. rapid-eye It represents the ratio of the energy of the electrooculogram signal in the 2-5Hz band to the total energy (0.5-30Hz), reflecting the proportion of medium-frequency electrooculogram activity.
[0095] Step 4.3, calculate the multi-scale entropy of the frontal EEG signal;
[0096] Because this article has five sets of cross-validation data, five multi-scale entropies, that is, five sample entropies, are calculated.
[0097] Multiscale entropy is a method for analyzing the complexity and irregularity of time series. It calculates the sample entropy of the signal at different time scales to reveal the dynamic characteristics of the signal at different scales. In the above steps, the rhythmic waves of each frequency band have been decomposed using an FIR bandpass filter, and the result will be used as the result of sub-signal decomposition for the calculation of multiscale entropy in this step. Then for each sub-signal, its sample entropy or approximate entropy needs to be calculated. As an information entropy measurement method, sample entropy has the advantages of non-parametricity, sensitivity, robustness and intuitive interpretation in signal analysis and pattern recognition. Therefore, the present invention adopts a method based on sample entropy to calculate multiscale entropy.
[0098] For a time series of N points {x(n)} = x(1), x(2), ..., x(N), the sample entropy is calculated as follows:
[0099] (1) Sequence segmentation
[0100] A vector sequence of dimension m is formed by sequence number in Represents m consecutive x values starting from the i-th point.
[0101] (2) Calculate distance
[0102] remember Representation vector and The Chebyshev distance, that is, the maximum difference between two points in each coordinate dimension, is expressed as:
[0103]
[0104] (3) Calculate similarity
[0105] For a given statistics and Distance The number less than or equal to r is the approximate number and is recorded as For 1≤i≤Nm, define It is the ratio of the approximate quantity to the total quantity, that is, the approximate proportion, and its expression is:
[0106]
[0107] And define φ m,r for:
[0108]
[0109] (4) Similarly, increasing the dimension to m+1, we have
[0110]
[0111]
[0112] (5) Calculate the sample entropy, which is expressed as
[0113]
[0114] (6) When N is a finite value, it can be estimated using the following formula
[0115]
[0116] In fact, It represents the conditional probability that the m+1th point in the time series also satisfies the distance threshold r under the condition that all m points in the time series satisfy the distance threshold r.
[0117] When calculating the multi-scale entropy, three parameters need to be considered, namely the window length m, the distance threshold r and the scale factor. In general, m does not take a value greater than 3. In order to make the dynamic reconstruction of the joint probability contain more information, m is taken as 2 here. According to the theoretical analysis of Pincus et al., it is concluded that when r = 0.1SD ~ 0.25SD, the sample entropy is more effective. For the scale factor, according to the experimental conclusions of Liang et al., the multi-scale entropy value with a scale of 9 to 13 is the best choice for distinguishing the accuracy of each sleep period. After continuous testing, the present invention selects a set of parameter settings with a higher accuracy, taking r = 0.2SD and the scale factor as 12. SD refers to the standard deviation of a time series signal, which is a statistic that measures the degree of discreteness of signal data.
[0118] Step 5, the eigenvalues calculated in step 4 are sent to the SVM support vector machine for automatic staging, and finally the eigenvalue group is optimized to obtain the automatically predicted sleep staging result.
[0119] Through step 5, each feature value is automatically classified into the corresponding sleep stage of the AASM standard. The sleep stages of the AASM standard include wakefulness (W), non-rapid eye movement sleep (NREM, including N1, N2, N3), and rapid eye movement sleep (REM).
[0120] like Figure 8 The line graph of the classification accuracy of the multi-domain feature algorithm for each stage shows that the GA-SVM sleep staging method adopted by the present invention has achieved an average accuracy of 88.1%, which is significantly higher than the accuracy of similar studies in recent years. Judging from the literature using the same Sleep-EDF data set in recent years, researchers have made various attempts in the field of automatic sleep staging, including the use of new models and algorithms, and proposed innovative methods to solve the problem of sample imbalance. However, the staging accuracy of most studies failed to exceed 85%. By comparison with these methods, the staging method of the present invention has a significant improvement in accuracy, demonstrating its superiority in processing complex EEG signals and improving staging accuracy.
[0121] Step six, calculate commonly used sleep quality evaluation indicators and score the sleep quality.
[0122] First, count the number of stages during sleep. Obtain the number of occurrences of N1, N2, N3 and REM stages, the number of two types of awakenings N_awake1 and N_awake2, the total duration of awakening T_awake, L_N and L_R record the duration of sleep latency and REM latency respectively. N_awake1 refers to the number of awakenings in the deep sleep stage (N3 stage), and N_awake2 refers to the number of awakenings in the light sleep stage (such as N1 and N2 stages).
[0123] Sleep latency refers to the time from the start of recording to the first entry into the non-awakening stage, the transition time from wakefulness to the non-awakening stage. The non-awakening stage refers to any non-awakening sleep stage, usually N1, and may directly enter the deeper sleep stage N2 or N3.
[0124] REM latency refers to the time from the start of recording to the first entry into the rapid eye movement (REM) stage.
[0125] 2) Then, calculate the duration of each sleep stage (N1, N2, N3 and REM), that is, the number of times each stage appears multiplied by the duration of each frame. Calculate the proportion of each sleep stage, that is, the number of times each stage appears compared to the total number of times all stages appear. Calculate the sleep efficiency and wakefulness ratio.
[0126] Sleep efficiency (SE) is the ratio of total sleep time to total sleep time. It is defined as follows:
[0127] SE=T_sleep / T_all
[0128] Where SE is the sleep efficiency; T_sleep is the total sleep time, which refers to the total duration of N1, N2, N3 and REM; T_all is the total time, which refers to the total duration of W, N1, N2, N3 and REM.
[0129] The Arousal Ratio (ASR) is the ratio of wakefulness time to total sleep and wakefulness time. It is defined as follows:
[0130] ASR=T_awake / (T_awake+T_sleep)
[0131] Among them, ASR is the awakening ratio, and T_awake is the total awakening time.
[0132] 3) Next, set the sleep quality assessment score range (C1 to C6):
[0133] C1: Calculates a score based on total sleep time, ranging from 40 to 100. Longer sleep time gives a higher score.
[0134] C2: The score is calculated based on the proportion of each sleep stage (N1, N2, N3, REM) using a voting method. The higher the voting score, the better the sleep quality.
[0135] C3: The score is calculated based on sleep efficiency (SE), ranging from 40 to 100.
[0136] C4: The score is calculated based on the sleep latency (L_N), with shorter latencies receiving higher scores.
[0137] C5: The score is calculated based on REM latency (L_R), with shorter REM latency receiving higher scores.
[0138] C6: The score is calculated based on the arousal ratio (ASR), with lower arousal ratios receiving higher scores.
[0139] Finally, the weighted sum of each score (C1 to C6) is performed to obtain the total score S, and a sleep quality assessment report is generated. The weight of each score is different, and the final total score combines multiple sleep quality indicators. According to the scores of each sleep indicator, the possible sleep-related diseases of the subjects are evaluated and medical advice is given. The specific diseases and suggestions are as follows: If the total sleep time is too long or too short, it may be related to depression, autonomic nervous system disorders, etc.; if the sleep efficiency is low, it may indicate insomnia or depression; if the proportion of N1, N2, N3, REM and other stages is abnormal, it may indicate sleep apnea, narcolepsy and other diseases; according to the scores of sleep latency, REM latency, wakefulness ratio, etc., professional physicians can give more detailed medical advice later, such as improving lifestyle, re-monitoring, combining clinical diagnosis, etc.
[0140] Step 7: Generate a visual sleep quality report based on the sleep stage change graph of the person to be tested, the proportion of each sleep period, the sleep quality score calculated in step 6, and the doctor's advice.
[0141] 1) Using the methods of steps 2 to 4 above, Zhang San's frontal EEG signals and EOG signals are processed to obtain eigenvalues, and the eigenvalues are sent to the SVM support vector machine trained in step 5 to obtain the sleep stage results, and a sleep stage change diagram is constructed.
[0142] 2) Calculate the sleep quality evaluation index and score the sleep quality according to step 6 to obtain the proportion of each sleep period and the sleep quality score.
[0143] 3) Comprehensive sleep stage change chart, the proportion of each sleep period, sleep quality score results and physician recommendations are generated, such as Fig. 9 Visual sleep quality report shown.
[0144] The present invention adopts a multi-domain feature fusion algorithm to extract more comprehensive and effective features from EEG signals. Through multi-faceted technical optimization, high-precision sleep staging is achieved. At the same time, based on the excellent performance of the previous automatic staging, the commonly used sleep quality evaluation indicators are calculated to achieve front-end visualization. Specifically, based on the forehead EEG signals and EOG signals of the Sleep-EDF public data set, an automatic sleep staging algorithm is combined with wavelet threshold denoising and support vector machine classification. Multi-domain features include 76 eigenvalues such as time domain, power spectrum, and multi-scale entropy. Especially for the REM period, the feature of "removing large eye movement differential variance" is innovatively introduced to improve the classification accuracy of the REM period. This multi-domain feature algorithm design greatly improves the accuracy of sleep staging and the applicability of the system. This provides an innovative and efficient solution for sleep state monitoring.
[0145] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes in form and details may be made without departing from the spirit and scope of the present invention.
Claims
1. A sleep state staging method driven by frontal EEG rhythm based on multi-dimensional features, characterized in that: The steps include: Step 1, prepare a sleep physiological signal data set; the sleep physiological signal data set includes sleep physiological signals of multiple subjects, and the data sample of each subject includes an electrooculogram signal, a frontal electroencephalogram signal and a sleep stage mark; the sleep stage mark is a sleep stage mark performed according to the AASM standard; Step 2: Preprocessing of frontal EEG signals; Step 3: Extract rhythmic waves from frontal EEG signals: Step 4, respectively calculating the time domain eigenvalues, eigenvalues based on power spectrum density, and eigenvalues based on multi-scale entropy of the frontal EEG signal and the electrooculogram signal; Step 5: Send the eigenvalues calculated in step 4 to the SVM support vector machine for automatic staging, and finally optimize the eigenvalue group to obtain the automatically predicted sleep staging result.
2. The sleep state staging method according to claim 1, characterized in that: In step 1, the sleep stage markers include wakefulness W, non-rapid eye movement sleep NREM, and rapid eye movement sleep REM, and the non-rapid eye movement sleep NREM includes stages N1, N2, and N3.
3. The sleep state staging method according to claim 1, characterized in that: In step 2, the preprocessing of the frontal EEG signal includes: intercepting effective data of the sleep state and wavelet threshold denoising.
4. The sleep state staging method according to claim 1, characterized in that: In step 4, the time domain feature values of the frontal EEG signal and the electrooculogram signal include: The time domain features of the frontal EEG signal include range, mean, variance, standard deviation, peak count, zero crossing number and differential variance; The time domain features of electrooculogram signals include range, mean, variance, standard deviation, peak count, zero crossing number and differential variance, large eye movement detection and large eye movement differential variance removal; The large eye movement detection refers to identifying large eye movement events and counting them through the time domain characteristics of the electrooculogram signal; the large eye movement removal differential variance refers to calculating the differential variance of the remaining signals after removing large eye movement events from a segment of the eye movement signal.
5. The sleep state staging method according to claim 1, characterized in that: In step 4, the eigenvalues based on the power spectral density include: 1) The characteristic values of the frontal EEG signal based on power spectral density include: the power proportion of delta wave, theta wave, alpha wave, beta wave, spindle wave, k complex wave, sawtooth wave, and F δ / θ 、F θ / α 、F α / β 、F (θ+δ) / (α+β) Four power ratios; F δ / θ 、F θ / α 、F α / β 、F (θ+δ) / (α+β) The calculation formula is as follows: Among them, P([a,b]) represents the power in the frequency range aHz~bHz, F δ / θ Indicates the ratio of Delta to Theta band power, F θ / α Indicates the ratio of Theta to Alpha band power, F α / β Indicates the ratio of Alpha to Beta band power, F (θ+δ) / (α+β) It represents the power ratio of slow waves Delta and Theta to fast waves Alpha and Beta; 2) The characteristic values of the electrooculogram signal based on the power spectral density include the slow eye movement power ratio F slow-eye and rapid eye movement power ratio F rapid-eye , the calculation formula is as follows: Among them, F slow-eye It represents the ratio of the energy of the electrooculogram signal in the 0.5-2Hz band to the total energy in the 0.5-30Hz band; F rapid-eye It represents the ratio of the energy of the electrooculogram signal in the 2-5Hz band to the total energy of 0.5-30Hz.
6. The sleep state staging method according to claim 1, characterized in that: In step 4, based on the characteristic value of multi-scale entropy, specifically, a method based on sample entropy is used to calculate the multi-scale entropy of the frontal EEG signal; when calculating the multi-scale entropy, the window length m, the distance threshold r and the scale factor range are: r=0.1SD~0.25SD, the scale factor is 9 to 13, m does not exceed 3, and SD refers to the standard deviation of the time series signal.
7. The sleep state staging method according to claim 1, characterized in that: Also includes: Step 6, calculate the sleep quality evaluation index and score the sleep quality; Step 7: Generate a visual sleep quality report based on the sleep stage change graph of the person to be tested, the proportion of each sleep period, the sleep quality score result calculated in step 6, and the doctor's advice.
8. The sleep state staging method according to claim 7, characterized in that: In step 6, the sleep quality evaluation indicators include total sleep time, sleep latency duration, REM latency duration, N1, N2, N3 and REM ratio, sleep efficiency and wakefulness ratio; The specific method in step 6 is: 1) Count the number of each stage during sleep; Get the number of occurrences of N1, N2, N3 and REM stages, the number of awakenings N_awake1 in the deep sleep stage N3, the number of awakenings N_awake2 in the light sleep stage N1 and N2; the duration of the sleep latency L_N, the duration of the REM latency L_R; 2) Calculate the proportion of N1, N2, N3 and REM, sleep efficiency and wakefulness ratio; The duration of each sleep stage N1, N2, N3 and REM, that is, the number of times each stage appears multiplied by the duration of each frame; The proportion of each sleep stage, that is, the number of times each stage appears compared to the total number of times all stages appear; Sleep efficiency SE, that is, the ratio of total sleep time to total time, is calculated as follows: SE=T_sleep / T_all Where, SE is the sleep efficiency; T_sleep is the total sleep time, which refers to the total duration of N1, N2, N3 and REM; T_all is the total time, which refers to the total duration of W, N1, N2, N3 and REM; The wakefulness ratio, that is, the ratio of wakefulness time to total sleep and wakefulness time, is calculated as follows: ASR=T_awake / (T_awake+T_sleep) Among them, ASR is the awakening ratio, T_awake is the total awakening time; 3) Set the normal range value and scoring interval for each indicator, and score according to the normal range value and scoring interval for each indicator.
9. The sleep state staging method according to claim 7, characterized in that: Step 7 is as follows: 1) Using the method of step 2 to step 4, the subject's frontal EEG signal and eye contact signal are processed to obtain characteristic values, the characteristic values are sent to the SVM support vector machine trained in step 5 to obtain the sleep stage results, and a sleep stage change diagram is constructed; 2) Calculate the sleep quality evaluation index and score the sleep quality according to step 6 to obtain the proportion of each sleep period and the sleep quality score; 3) Generate a visual sleep quality report based on the sleep stage change graph, the proportion of each sleep period, the sleep quality score calculated in step 6, and the doctor's advice.
Citation Information
Patent Citations
Automatic sleep stage classification method based on dual character filtering
CN104970773A
Sleep state classification method and system based on entropy feature and support vector machine
CN108968915A
Sleep staging method and related equipment
CN109044280A
Automatic sleep staging method based on multi-feature fusion
CN118436312A
Cited By
Rodent automatic sleep staging method and system and storage medium
CN120257176A
Evaluation method and system for improving postoperative sleep of elderly patient through nerve block analgesia
CN121439268A
Sleep quality monitoring and analysis method, device and equipment based on non-invasive brain-computer interface and storage medium
CN121845615A