Sleep state staging method and system based on single-channel EEG and acceleration
Through the sleep state staging method based on single-channel EEG and acceleration, the problems of insufficient sleep state staging accuracy and high equipment cost in the prior art are solved, and high accuracy and low-cost sleep state staging are achieved.
Patent Information
- Application Number
- CN202311133625.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-09-04
AI Technical Summary
The prior art has problems such as insufficient accuracy, large data demand, high equipment cost and cumbersome detection process in EEG signal analysis and sleep state staging.
The sleep state staging method based on single-channel EEG and acceleration is adopted. By obtaining EEG signals and acceleration information, the trained sleep staging model is used for analysis and prediction, and the accuracy of the prediction results is improved through the acceleration correction and smooth correction module.
It improves the accuracy of sleep staging, reduces equipment costs, simplifies the detection process, and achieves efficient sleep state staging.
Smart Images

Figure CN117204863B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of signal feature analysis, and relates to a sleep state staging method and system based on single-channel electroencephalogram and acceleration. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of modern society, people's life pressure is increasing, and more and more people have sleep disorders to varying degrees.
[0004] In recent years, with the development of machine learning (deep learning), sleep staging technology based on classification has also developed rapidly towards high accuracy and portability. EEG ( Electroencephalogram , brain wave) signals are divided into 30-second intervals; features are extracted through time domain, frequency domain or time-frequency domain methods, and then the extracted features are sent to the machine learning model or the original signal is directly sent to the deep learning model for classification.
[0005] However, so far, the application of EEG sleep staging still has the following difficulties to be overcome:
[0006] First, EEG signals are typical non-stationary signals that contain a large amount of information. The statistical information contained in the signal is random at different times, which increases the difficulty of EEG signal analysis and feature extraction. At the same time, the accuracy of classic machine learning algorithms is not so satisfactory.
[0007] Second, although deep learning has high accuracy, in order to achieve high performance, deep networks require very large data sets. However, in many fields, obtaining data sets is not so easy, and it is expensive and time-consuming.
[0008] Third, sleep disorders are hidden and not easy to detect. Patients often don’t know that they have sleep disorders. A sleep disorder test requires going to the hospital, and the testing process is cumbersome, which leads many patients to be unwilling to go for the test. Summary of the invention
[0009] In order to solve the above problems, the present invention proposes a sleep state staging method and system based on single-channel EEG and acceleration. The present invention can improve the accuracy of sleep staging and reduce equipment costs.
[0010] According to some embodiments, the present invention adopts the following technical solutions:
[0011] A sleep state staging method based on single-channel EEG and acceleration includes the following steps:
[0012] Obtain the EEG signal and acceleration information to be measured of a single EEG channel;
[0013] The trained sleep staging model is used to analyze the acquired EEG signals to be tested, and the sleep stages to which each period of the acquired EEG signals to be tested belongs are predicted;
[0014] Based on the acquired acceleration, the prediction results are corrected;
[0015] The training process of the sleep staging model includes: obtaining a sample data set, wherein the sample data set includes sample EEG signals of multiple sleep periods and corresponding label information;
[0016] Preprocessing each sample EEG signal;
[0017] The preprocessed signal is windowed and segmented into multiple sleep segments, and each sleep segment is assigned corresponding label information;
[0018] The power spectral density, time-domain statistical parameters, fluidity and complexity of each sleep segment are calculated to achieve feature extraction;
[0019] The constructed sleep staging model is trained using the extracted features and their corresponding label information.
[0020] A sleep state staging system based on single-channel EEG and acceleration, comprising:
[0021] A signal acquisition unit, used to obtain the EEG signal to be measured and acceleration information of a single EEG channel;
[0022] A prediction unit is used to analyze the acquired EEG signal to be tested by using the trained sleep staging model, and predict the sleep stage to which each period of the acquired EEG signal to be tested belongs;
[0023] A state correction unit, used for correcting the prediction result based on the acquired acceleration;
[0024] Also includes:
[0025] A sample acquisition unit, used to acquire a sample data set, wherein the sample data set includes sample EEG signals of multiple sleep periods and corresponding label information;
[0026] A preprocessing unit, used for preprocessing each sample EEG signal;
[0027] A windowing and segmenting unit is used to perform windowing and segmenting on the preprocessed signal, dividing it into a plurality of sleep segments, and each sleep segment is assigned corresponding label information;
[0028] A feature extraction unit, used to calculate the power spectrum density, time domain statistical parameters, fluidity and complexity of each sleep segment respectively, to achieve feature extraction;
[0029] The training unit is used to train the constructed sleep staging model using the extracted features and their corresponding label information.
[0030] As an optional implementation, the sample EEG signals in the sample data set all include single-channel EEG sample signals, and the label information includes multiple EEG signals, which are respectively used to identify the EEG signals representing the wakefulness period, light sleep stage I, light sleep stage II, deep sleep period and rapid eye movement period.
[0031] As an optional implementation, the pre-processing unit includes a filtering module, specifically including a notch filtering module, a high-pass filtering module and a low-pass filtering module, and the three modules are connected in series.
[0032] As an optional implementation, the windowing and segmentation unit includes a slicing module and a labeling module. The slicing module is used to slice the preprocessed signal into non-overlapping slices according to a set duration as a sleep segment; the labeling module is used to add a corresponding label to each sleep segment, and the label is the corresponding label information of each sample EEG signal in the sample acquisition unit.
[0033] As an optional implementation, the feature extraction unit includes a power spectrum density calculation module, and the specific process for calculating the power spectrum density of each sleep segment includes: N Data x ( n )=0,1,2… N -1 share L Each segment has M Data, No. i Segment data is represented as: x i ( n )= x ( n + i * M - M ), 0≤ n ≤ M- 1, i =1,2…, L ;
[0034] Then the window function w ( n ) is added to each data segment and the corresponding periodogram is obtained. i The periodogram of the segment is:
[0035] ,i =1,2…, L ;
[0036] In the formula U is called the normalization factor,
[0037] ,
[0038] The final power spectrum estimate is:
[0039] .
[0040] As an optional implementation, the feature extraction unit also includes a time domain statistical information calculation module, which is used to calculate the mean, standard deviation, root mean square, peak-to-peak value, skewness, kurtosis, peak factor, margin factor, and pulse index of the corresponding sleep segments.
[0041] As an optional implementation, the feature extraction unit also includes Hjorth Parameter calculation module, used to calculate the fluidity and complexity of each sleep segment:
[0042]
[0043]
[0044] in, For liquidity, For complexity, is the variance, for The first-order difference signal.
[0045] As an optional embodiment, the sleep staging model is a random forest classifier.
[0046] As an optional implementation, the state correction unit includes an acceleration correction module, which is used to determine that the current sleep state is a wakeful period if the statistical average value of the combined acceleration of a certain sleep segment in the current sleep segment is greater than a set value.
[0047] As an optional implementation, the state correction unit further includes a smooth correction module for correcting the sleep state of the sleep segment with a mutation to a normal state if there is a sleep segment with a predicted sleep state smaller than a set value in a plurality of consecutive sleep segments with a mutation.
[0048] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps in the described method.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The present invention filters the original single-channel EEG signal; then segments the filtered signal, and calculates the characteristics of the segmented signal in the time domain and frequency domain; then the patient's single-channel time-frequency characteristics are sent to the random forest classifier as a prediction model, and finally a state correction operation is added. After training, it can be used K The performance of the model was evaluated by fold cross validation. After the test, the accuracy of the event-based single-channel sleep staging model can reach 86%. After training and saving the best sleep staging model, the state correction operation can be added to directly identify the EEG signal to achieve the purpose of sleep state staging.
[0051] The present invention is implemented using a software program without the need to add additional large-scale equipment or components. Only processing equipment / computers and EEG acquisition equipment are required, which reduces the investment in expensive sleep diagnostic instruments, can easily realize sleep staging, improve the accuracy of sleep staging and reduce equipment costs.
[0052] The present invention comprehensively considers the power spectral density, time domain statistical parameters, fluidity and complexity of the sleep segments, takes into account various characteristics of the sleep segments, and can ensure the accuracy of feature extraction and prediction results.
[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0055] Figure 1 Schematic diagram of the module structure of the sleep staging system based on single-channel EEG and acceleration in this embodiment;
[0056] Figure 2 This is a schematic diagram of the overall sleep staging process of this embodiment;
[0057] Figure 3 This is a filtering schematic diagram of this embodiment;
[0058] Figure 4 A schematic diagram of windowing and segmentation in this embodiment;
[0059] Figure 5 A schematic diagram of the characteristic calculation of this embodiment;
[0060] Figure 6 Schematic diagram of the structure of the feature extraction unit of this embodiment;
[0061] Figure 7 is a schematic diagram of a training unit in this embodiment;
[0062] Figure 8 For this embodiment ACC Schematic diagram of state correction;
[0063] Fig. 9 This is a schematic diagram of smoothing rule correction in this embodiment. DETAILED DESCRIPTION
[0064] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0065] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0066] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0067] Embodiment 1
[0068] A sleep state staging system based on single-channel EEG and acceleration removes environmental and equipment interference by filtering the sample channel signal and the EEG signal to be tested. The feature set is constructed based on the time domain and frequency domain, with fewer parameters, fast speed and high accuracy, which improves the accuracy and efficiency of sleep staging prediction.
[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0070] like Figure 1 As shown, the sleep state staging system based on single-channel EEG and acceleration of the present invention includes: a sample acquisition unit, a filtering unit, a windowing segmentation unit, a feature extraction unit, a training unit, a verification unit, a signal acquisition unit, a prediction unit, and a state correction unit.
[0071] The sample acquisition unit is used to acquire a sample data set. The sample data set includes sample EEG signals of multiple patients in multiple historical time periods and label information of each sample EEG signal; each sample EEG signal includes a sample channel signal of a single EEG channel. The label information includes' SleepstageW '、' Sleepstage 1',' Sleepstage 2',' Sleepstage 3',' SleepstageR ',' SleepstageW 'Indicates that the corresponding sample EEG signal is an EEG signal during the awake period,' Sleepstage 1' means the corresponding sample EEG signal is the EEG signal of light sleep stage I,' Sleepstage 2' indicates that the corresponding sample EEG signal is the EEG signal of the shallow sleep stage II,' Sleepstage 3' indicates that the corresponding sample EEG signal is the EEG signal of deep sleep period,' SleepstageR 'Indicates that the corresponding sample EEG signal is a rapid eye movement EEG signal;
[0072] The filtering unit ( Figure 3 ) is connected to the sample acquisition unit, and the filtering unit is used to perform notch filtering, high-pass filtering, and low-pass filtering on each sample channel signal for any patient in each time period to obtain a filtered data set corresponding to each sample channel signal.
[0073] The windowing segmentation unit ( Figure 4 ) is connected to the filtering unit, and is used to determine the data of the corresponding period according to the filtered data and the label for the corresponding sleep period of any patient, and specifically add the corresponding label to the filtered signal in segments of 30 seconds, wherein the label is the corresponding label information of each sample EEG signal in the sample acquisition unit;
[0074] The feature extraction unit ( Figure 6 ) is connected to the windowing segmentation unit, and the feature extraction unit is used to perform feature calculation for every 30-second segment of any patient to obtain a feature set of the corresponding segment ( Figure 5 ).
[0075] The training unit ( Figure 7 ) are respectively connected to the feature extraction unit and the verification unit, and the training unit is used to train the classifier used according to the sample feature set of each patient in each time period and the label information of the sample EEG signal corresponding to each sample feature set to obtain a sleep staging model;
[0076] The verification unit is used to detect the effect of the trained model. K The model that passed the validation was used as the final sleep stage model.
[0077] The signal acquisition unit is used to collect the EEG signals and accelerations to be measured of each EEG channel of the patient in real time during the current period.
[0078] The filtering unit is connected to the signal acquisition unit and is used to filter each sample channel signal for each time period of any patient, specifically including notch filtering, high-pass filtering, and low-pass filtering, to obtain a filtered signal corresponding to each sample channel signal;
[0079] The windowing and segmenting unit is connected to the filtering unit, and is used to divide the filtered signal into segments of 30 seconds each for the corresponding sleep period of any patient.
[0080] The feature extraction unit is connected to the windowing and segmenting unit, and is used to perform feature calculation for every 30-second segment of any patient to obtain a feature set of the corresponding segment.
[0081] The prediction unit is connected to the training unit and the feature extraction unit respectively, and is used to determine which period of the sleep state the current time period belongs to according to the feature set of the feature calculation unit.
[0082] The state correction unit ( Figure 8 , Fig. 9 ) is connected to the prediction unit and is used to correct the sleep state predicted by the prediction unit. Specifically, it includes two parts: an acceleration correction module and a smoothing correction module;
[0083] Specifically, the acceleration correction module uses acceleration to determine whether the current sleep state is a wakeful period. If the statistical average value of the combined acceleration value in the current segment is greater than a set value, the current sleep state is determined to be a wakeful period.
[0084] The smooth correction module corrects the sleep state by removing abnormal state mutations. For example, if a deep sleep suddenly appears between two wakeful states, we believe that this sleep state needs to be corrected. We use three wakeful states to replace the original wakeful, deep sleep, and wakeful. The overall correction rules are as follows: A , B , A ]→[ A , A , A ],[ A , B , B , A , A ]→[ A , A , A , A , A ],in A Represents the general judgment of sleep state, B Represents the sleep state of a mutation.
[0085] This embodiment only processes the original EEG signal through the time domain and frequency domain, and uses the parameters of the time domain and frequency domain as the only input features of the classifier. The time domain and frequency domain features have the advantages of convenient calculation and small amount of calculation, thereby greatly speeding up the calculation speed.
[0086] In addition, a random forest classifier is used to determine sleep status. The implementation of the random forest classifier is relatively simple, and it is not so sensitive to unbalanced data sets. It has a fast training speed and is easy to make into a parallel method. The model has a strong generalization ability, which can improve the real-time performance of sleep state staging and the accuracy of sleep state prediction.
[0087] Furthermore, the sample acquisition unit includes: an initial sample acquisition module and a single-channel extraction module.
[0088] The initial sample acquisition module is used to acquire initial sample channel signals of multiple EEG channels of multiple patients in a historical continuous period of time.
[0089] In this embodiment, the initial sample acquisition module acquires Sleep _ EDF Scalp EEG database. Select two EEG channels common to all patients ( F - C , Pz - Oz ).
[0090] Since the data of the wakefulness period during sleep is much more than that of other sleep states, we first remove some of the EEG data of the wakefulness period. Sleep _ E The scalp EEG database contains 2 data for each patient. edf Files, one is the original EEG, EMG, respiration and other data, and the other is the label file corresponding to the original data.
[0091] Specifically, when collecting EEG data, the electrodes are placed on the scalp according to the international 10-20 standard, and the sampling frequency is 100. Hz .
[0092] The single-channel extraction module is connected to the initial sample acquisition module, and the single-channel extraction module is used to extract the single-channel EEG data in the original data. Specifically, F - C The data is extracted and the channel data is saved as . npz Format of the file.
[0093] Furthermore, the filtering unit includes: a notch filtering module, a high-pass filtering module and a low-pass filtering module, such as Figure 3 shown.
[0094] The notch filter module is connected to the sample acquisition unit, and is used to perform notch filtering on the channel signal for the signal of any patient in each time period, so as to remove power frequency interference.
[0095] The high-pass filter module is connected to the notch filter module. The high-pass filter module is used to perform high-pass filtering on the channel signal for each patient's signal in each period, thereby removing the DC component. Specifically, the high-pass cutoff frequency is 0.1 Hz .
[0096] The low-pass filter module is connected to the high-pass filter module. The low-pass filter module is used to perform high-pass filtering on the channel signal for each period of any patient, thereby removing high-frequency components unrelated to sleep. Specifically, the low-pass cutoff frequency is 30 Hz .
[0097] Furthermore, the windowing and segmenting unit includes: a slicing module and a labeling module, such as Figure 4 shown.
[0098] The slicing module is connected to the filtering unit, and is used to slice the initial sample single-channel EEG signal according to a set time interval for any patient's filtered single-channel EEG signal to obtain single-channel EEG data corresponding to the sleep state. In this embodiment, the set time interval is 30 seconds.
[0099] Specifically, the single-channel EEG data were sliced into 30-second segments without overlap, and 10 hours of EEG data were divided into 1200 small samples of 30 seconds each, thus obtaining sample channel signals of 1200 time periods.
[0100] The labeling module is connected to the slicing module, and is used to label the sample EEG signals of each patient at each time period, and determine the label information corresponding to each sample EEG signal.
[0101] Furthermore, the feature extraction unit includes: a power spectrum density calculation module, a time domain statistical information calculation module and Hjorth Parameter calculation module, such as Figure 6 shown.
[0102] The power spectrum density calculation module is used to calculate the power spectrum density of the corresponding sleep segment. welch The power spectral density is calculated by first converting the length N Data x ( n )=0,1,2… N -1 share L Each segment has M Data, No. iSegment data is represented as: x i ( n )= x ( n + i * M - M ), 0≤ n ≤ M- 1, i =1,2…, L
[0103] Then the window function w ( n ) is added to each data segment and the corresponding periodogram is obtained. i The periodogram of the segment is:
[0104] , i =1,2…, L
[0105] In the formula U is called the normalization factor,
[0106]
[0107] The final power spectrum estimate is:
[0108]
[0109] Specifically, in this embodiment, after filtering the original waveform, select 0.1-30 Hz The frequency range is divided into 5 bands. delta (0.1-4.5 Hz )、 theta (4.5-8.5 Hz )、 alpha (8.5-11.5 Hz )、 Sigma (11.5-15.5 Hz )、 beta (11.5-30 Hz ), after calculating the power spectrum density, the power spectrum density in the corresponding frequency range is averaged as the frequency domain feature. The time domain statistical information calculation module is used to calculate the time domain statistical parameters of the corresponding sleep segment, and the parameters involved include: the mean, standard deviation, root mean square, peak-to-peak value, skewness, kurtosis, peak factor, margin factor, pulse index, etc. of the corresponding sleep segment.
[0110] The mean refers to the average amplitude of the segment, and the calculation formula is:
[0111]
[0112] The standard deviation reflects the degree of dispersion among individuals in a group, and the calculation formula is:
[0113]
[0114] is the average value among individuals in the group.
[0115] The root mean square represents the effective value of the current segment, and the calculation formula is:
[0116] The peak-to-peak value represents the extreme degree of the peak in the waveform, and the calculation formula is:
[0117]
[0118] Skewness is used to measure the asymmetry of the probability distribution of the current segment, and the calculation formula is:
[0119] Kurtosis is used to test the degree to which the signal deviates from the normal distribution. The calculation formula is:
[0120]
[0121] The crest factor characterizes the prominence of the signal, and the calculation formula is:
[0122]
[0123] The margin factor represents the degree of signal mutation, and the calculation formula is:
[0124]
[0125] The pulse index is the ratio of the maximum value to the average value in the signal, which reflects the degree of change of the signal. The calculation formula is:
[0126] .
[0127] Said Hjorth The parameter calculation module is used to calculate the fluidity and complexity of the corresponding sleep segment. The calculation formula is:
[0128]
[0129]
[0130] For liquidity, For complexity, is the variance, for The first-order difference signal.
[0131] Furthermore, the training unit is used to train the classifier used according to the sample feature sets of each patient at each time period and the label information of the sample EEG signals corresponding to each sample feature set to obtain a sleep staging model, such as Figure 7 shown.
[0132] In order to further improve the accuracy, the sleep state staging system based on single-channel EEG and acceleration of the present invention also includes a state correction unit. The state correction unit is connected to the prediction unit and is used to post-process the prediction results. The state correction unit includes two parts, one is the acceleration correction module (such as Figure 8 As shown in Figure 2), the second is the smoothing correction module (as shown in Figure 2). Fig. 9 as shown).
[0133] Specifically, the acceleration correction module uses acceleration to determine whether the current sleep state is awake. If the statistical average value of the combined acceleration in the current segment is greater than 1.2 g , then the current sleep state is determined to be the awake period, that is: , then the current state is determined to be awake period, x , y , z Represents the acceleration values of the three axes respectively. n is the number of samples collected.
[0134] The smooth correction module corrects the sleep state by removing abnormal state mutations. For example, if a deep sleep suddenly appears between two wakeful states, we believe that this sleep state needs to be corrected. We use three wakeful states to replace the original wakeful, deep sleep, and wakeful. The overall correction rules are as follows: A , B , A ]→[ A , A , A ],[ A , B , B , A , A ]→[ A , A , A , A , A ],in A Represents the general judgment of sleep state, B Represents the sleep state of a mutation.
[0135] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of one or more computer-usable storage media (including but not limited to disk storage, CD - ROM , optical storage, etc.).
[0136] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0140] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A sleep state staging method based on single-channel EEG and acceleration, characterized in that: The following steps are involved: Obtain the EEG signal and acceleration information to be measured of a single EEG channel; The trained sleep staging model is used to analyze the acquired EEG signals to be tested, and the sleep stages to which each period of the acquired EEG signals to be tested belongs are predicted; Based on the acquired acceleration, the prediction results are corrected; If the statistical average value of the combined acceleration of a certain sleep segment in the current sleep segment is greater than the set value, the current sleep state is determined to be a wakeful period; If there is a sudden change in the predicted sleep state of a plurality of consecutive sleep segments that is less than the set value, the sleep state of the sleep segment with the sudden change is corrected to a normal state; The training process of the sleep staging model includes: obtaining a sample data set, wherein the sample data set includes sample EEG signals of multiple sleep periods and corresponding label information; Preprocessing each sample EEG signal; The preprocessed signal is windowed and segmented into multiple sleep segments, and each sleep segment is assigned corresponding label information; The power spectral density, time-domain statistical parameters, fluidity and complexity of each sleep segment are calculated to achieve feature extraction; The specific process of calculating the power spectral density of each sleep segment includes: N Data x ( n )=0,1,2… N -1 share L Each segment has M Data, i Segment data is represented as: x i ( n )= x ( n + i * M - M ), 0≤ n ≤ M- 1, i =1,2…, L ; Then the window function w ( n ) is added to each data segment and the corresponding periodogram is obtained. i The periodogram of the segment is: , i =1,2…, L ; In the formula U is called the normalization factor, , The final power spectrum estimate is: ; The constructed sleep staging model is trained using the extracted features and their corresponding label information; The sample EEG signals in the sample data set all include single-channel EEG sample signals, and the label information includes multiple EEG signals respectively used to identify EEG signals representing the wakefulness period, light sleep stage I, light sleep stage II, deep sleep period and rapid eye movement period.
2. A sleep state staging system based on single-channel EEG and acceleration, characterized in that: include: A signal acquisition unit, used to obtain the EEG signal to be measured and acceleration information of a single EEG channel; A prediction unit is used to analyze the acquired EEG signal to be tested by using the trained sleep staging model, and predict the sleep stage to which each period of the acquired EEG signal to be tested belongs; A state correction unit, used for correcting the prediction result based on the acquired acceleration; The state correction unit includes an acceleration correction module, which is used to determine that the current sleep state is a wakeful period if the statistical average value of the combined acceleration of a certain sleep segment in the current sleep segment is greater than a set value; It also includes a smooth correction module, which is used to correct the sleep state of the sleep segment with a sudden change to a normal state if there is a sleep segment with a predicted sleep state less than a set value in a plurality of consecutive sleep segments; Also includes: A sample acquisition unit, used to acquire a sample data set, wherein the sample data set includes sample EEG signals of multiple sleep periods and corresponding label information; A preprocessing unit, used for preprocessing each sample EEG signal; A windowing and segmenting unit is used to perform windowing and segmenting on the preprocessed signal, dividing it into a plurality of sleep segments, and each sleep segment is assigned corresponding label information; A feature extraction unit, used to calculate the power spectrum density, time domain statistical parameters, fluidity and complexity of each sleep segment respectively, to achieve feature extraction; The feature extraction unit includes a power spectrum density calculation module, and the specific process for calculating the power spectrum density of each sleep segment includes: N Data x ( n )=0,1,2… N -1 share L Each segment has M Data, i Segment data is represented as: x i ( n )= x ( n + i * M - M ), 0≤ n ≤ M- 1, i =1,2…, L ; Then the window function w ( n ) is added to each data segment and the corresponding periodogram is obtained. i The periodogram of the segment is: , i =1,2…, L ; In the formula U is called the normalization factor, , The final power spectrum estimate is: ; A training unit, used to train the constructed sleep staging model using the extracted features and their corresponding label information; The sample EEG signals in the sample data set all include single-channel EEG sample signals, and the label information includes multiple EEG signals respectively used to identify EEG signals representing the wakefulness period, light sleep stage I, light sleep stage II, deep sleep period and rapid eye movement period.
3. A sleep state staging system based on single-channel EEG and acceleration as claimed in claim 2, characterized in that: The pre-processing unit includes a filtering module, specifically including a notch filtering module, a high-pass filtering module and a low-pass filtering module, and the three modules are connected in series.
4. A sleep state staging system based on single-channel EEG and acceleration as claimed in claim 2, characterized in that: The windowing and segmenting unit includes a slicing module and a labeling module, wherein the slicing module is used to slice the sample single-channel EEG signal without overlap according to the set duration as a sleep segment after the preprocessed signal; The labeling module is used to add corresponding labels to each sleep segment, and the labels are corresponding label information of each sample EEG signal in the sample acquisition unit.
5. The sleep state staging system based on single-channel EEG and acceleration as claimed in claim 2, characterized in that: The feature extraction unit also includes a time domain statistical information calculation module, which is used to calculate the mean, standard deviation, root mean square, peak-to-peak value, skewness, kurtosis, peak factor, margin factor, and pulse index of the corresponding sleep segments.
6. A sleep state staging system based on single-channel EEG and acceleration as claimed in claim 5, characterized in that: The feature extraction unit also includes Hjorth Parameter calculation module, used to calculate the fluidity and complexity of each sleep segment: in, For liquidity, For complexity, is the variance, for The first-order difference signal.
7. A terminal device, characterized in that: The method comprises a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store a plurality of instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps in the method described in claim 1.
Citation Information
Patent Citations
Sleep stage classification method and device based on sleep EEG (electroencephalogram) signals
CN105615834A
Electroencephalogram signal processing method and epilepsy detection system
CN109431497A
Sleep stage detection device, sleep stage calculation device, and sleep stage detection system
JP2013121489A