CN113995421A - Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal - Google Patents

Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal Download PDF

Info

Publication number
CN113995421A
CN113995421A CN202111130838.9A CN202111130838A CN113995421A CN 113995421 A CN113995421 A CN 113995421A CN 202111130838 A CN202111130838 A CN 202111130838A CN 113995421 A CN113995421 A CN 113995421A
Authority
CN
China
Prior art keywords
deep learning
sleep
forehead
electroencephalogram
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111130838.9A
Other languages
Chinese (zh)
Inventor
曹琪琪
刘冰
万力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Rouling Technology Co ltd
Original Assignee
Zhejiang Rouling Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Rouling Technology Co ltd filed Critical Zhejiang Rouling Technology Co ltd
Priority to CN202111130838.9A priority Critical patent/CN113995421A/en
Publication of CN113995421A publication Critical patent/CN113995421A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation
    • A61B5/4812Detecting sleep stages or cycles
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device

Abstract

The invention discloses a deep learning algorithm for sleep stage by using a forehead single-channel electroencephalogram signal, which comprises the steps of establishing a training model and finally outputting and predicting, and is characterized in that: the establishment of the training model comprises three stages of Fp1-Fp2 electroencephalogram data acquisition, 30s segmentation processing and deep learning network establishment, and finally the training model is established; and acquiring Fp1-Fp2 electroencephalogram data and performing 30s segmentation processing on the final output prediction, and then sending the processed signals into the established deep learning model to obtain the final output prediction. The invention has the beneficial effects that: the deep learning model is used, a CNN and Bi-LSTM framework is adopted, time cost of manual feature definition is saved, accuracy is improved, meanwhile, in order to improve classification accuracy of non-equilibrium data, a weight cross entropy loss function is used, and results prove that sleep stage accuracy can be improved for the non-equilibrium data under the condition of not performing any data enhancement.

Description

Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal
Technical Field
The invention relates to a deep learning algorithm for sleep stages, in particular to a deep learning algorithm for sleep stages by applying forehead single-channel electroencephalogram signals, and belongs to the technical field of sleep stages.
Background
Sleep monitoring is one of the very important daily monitoring items as well as daily physiological index monitoring such as heart rate, blood oxygen and blood pressure, and the sleep monitoring is not only required by people suffering from sleep disorder, but also comprises a plurality of common people and some chronic patients. Sleep staging based on electroencephalogram is much more accurate than methods based on electrocardio or pulse rate, body movement and the like. At present, a method for sleep monitoring based on electroencephalogram signals is mainly based on multiple channels, such as electroencephalogram signals (EEG), electro-oculogram signals (EOG), electromyogram signals (EMG) and the like, or single channels based on the position of a parietal middle axis, such as single-channel electroencephalogram signals of Fpz-Oz, Pz-Cz and the like.
Multichannel methods, such as hospital sleep Polygraph (PSG), using channels that are distributed over the head and various parts of the body; while the apical-medial-axis single-channel approach uses the Fpz-Cz or Pz-Oz channels. The two methods have inconvenience for sleep monitoring of ordinary people, are complicated in wearing mode, and even influence sleep, and aiming at solving the problems, the invention adopts a single-channel electroencephalogram signal (Fp1-Fp2) based on the forehead leaf to realize sleep stage deep learning.
Disclosure of Invention
The invention aims to solve the problems and provide a deep learning algorithm for sleep stage by applying a forehead single-channel electroencephalogram signal.
The invention realizes the aim through the following technical scheme, applies a deep learning algorithm of a prefrontal single-channel electroencephalogram signal to sleep stages, comprises the establishment of a training model and the final output prediction, and is characterized in that: the establishment of the training model comprises three stages of Fp1-Fp2 electroencephalogram data acquisition, 30s segmentation processing and deep learning network establishment, and finally the training model is established;
and acquiring Fp1-Fp2 electroencephalogram data and performing 30s segmentation processing on the final output prediction, and then sending the processed signals into the established deep learning model to obtain the final output prediction.
Preferably, the Fp1-Fp2 electroencephalogram data are acquired by placing flexible patch electrodes at the positions of Fp1-Fp2 of the prefrontal lobes of the human brain to acquire electroencephalogram signals; and meanwhile, the PSG equipment is worn to collect data, and then the data collected by the PSG equipment is labeled, and the label is used as a label for model training.
Preferably, the 30s segmentation processing is to perform 30s signal segmentation processing on each segment of the original electroencephalogram signal; and extracting the label corresponding to the label.
Preferably, the deep learning network is built by using a PyTorch deep learning framework, and the deep learning network structure comprises two stages of representation learning and sequence learning;
the characterization learning stage is used for extracting time-invariant features in a sleep stage, and the sequence learning stage is used for learning time information in sleep.
Preferably, the characterization learning phase comprises the following steps;
the first step is as follows: firstly, processing an input original signal by using a layer of 64-channel convolution layer and a pooling layer;
the second step is that: then, in order to prevent overfitting, a Dropout layer is added, the Dropout can set the probability of discarding the neurons in the network layer, and a certain proportion of the neurons can be discarded after setting, so that the overfitting problem is relieved;
the third step: then, feature learning is carried out by using a convolution layer with three layers of 128 channels;
the fourth step: finally, a max-pool layer is used to reduce the feature size, and a Dropout layer is used to prevent over-fitting.
Preferably, the sequence learning stage is to use only one bidirectional LSTM network layer, and then a Dropout layer to prevent overfitting;
and finally, outputting the output layer of the sleep stage by using a softmax function.
Preferably, after the deep learning network is built, the acquired signals are divided into four categories, namely a clear-headed category, a rapid eye movement period, a light sleep category and a deep sleep category according to the correspondingly labeled tags; and then, the original electroencephalogram data and the corresponding labels are sent to a deep learning model for training.
Preferably, in the training process, a back propagation algorithm and an Adam random optimization algorithm are used, iteration is continuously performed through a network until the optimal accuracy value and loss value are reached, and at the moment, the training model is stored;
and when the sleep categories are divided, a weight cross entropy loss function is adopted to divide the intervals.
Preferably, the stored training model is a deep learning model;
and then, collecting new Fp1-Fp2 electroencephalogram data, then carrying out 30s segmentation processing, finally directly sending the processed segmentation data into the deep learning model for prediction, and giving a prediction result according to the model.
The invention has the beneficial effects that: 1. the Fp1-Fp2 forehead single-channel brain electricity adopted by the invention is positioned at the forehead of the brain, the collection electrode uses a flexible patch electrode, and is very light and thin, so that the collection and wearing are very convenient for a wearer, and the wearing is almost senseless and cannot influence the night sleep of the wearer.
2. The invention uses a deep learning model and adopts CNN and Bi-LSTM frames, thereby saving the time cost of manually defining characteristics, improving the accuracy, and simultaneously using a weight cross entropy loss function to improve the classification accuracy of the unbalanced data.
Drawings
FIG. 1 is a flow chart of the final output prediction of the present invention;
FIG. 2 is a flow chart of model training according to the present invention;
FIG. 3 is a deep learning model framework of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-3, a deep learning algorithm for sleep stages by applying a prefrontal single-channel electroencephalogram signal includes the establishment of a training model and the final output prediction, and is characterized in that: the establishment of the training model comprises three stages of Fp1-Fp2 electroencephalogram data acquisition, 30s segmentation processing and deep learning network establishment, and finally the training model is established;
and finally, acquiring the Fp1-Fp2 electroencephalogram data, performing 30s segmentation processing, and then sending the processed signals into the established deep learning model to obtain the final output prediction.
The acquisition of Fp1-Fp2 electroencephalogram data is that a flexible patch electrode is placed at the position of Fp1-Fp2 of the forehead of a human brain to acquire an electroencephalogram signal; and meanwhile, the PSG equipment is worn to collect data, and then the data collected by the PSG equipment is labeled, and the label is used as a label for model training.
The 30s segmentation processing is to perform 30s signal segmentation processing on each segment of the original electroencephalogram signal; and extracting the label corresponding to the label.
The method comprises the steps of building a deep learning network by using a PyTorch deep learning frame, wherein the deep learning network structure comprises two stages of representation learning and sequence learning;
(PyTorch is an open-source Python machine learning library, is used for applications such as natural language processing and the like based on Torch, and can be regarded as numpy with GPU support and a powerful deep neural network with automatic derivation function).
The deep learning network is constructed by using a combination framework of a convolutional network (CNN) and a Long short-term memory (LSTM).
The characterization learning stage is to extract time-invariant features in the sleep stage, the sequence learning stage is to learn time information in sleep, such as a sleep transition principle, a sleep expert uses a sleep transition rule to determine the possibility of a next sleep stage based on the sleep features of a previous stage, and the whole network framework is shown in fig. 3.
The characterization learning phase comprises the following steps;
the first step is as follows: firstly, processing an input original signal by using a layer of 64-channel convolution layer and a pooling layer;
the second step is that: then, in order to prevent overfitting, a Dropout layer is added, the Dropout can set the probability of discarding the neurons in the network layer, and a certain proportion of the neurons can be discarded after setting, so that the overfitting problem is relieved;
the third step: then, feature learning is carried out by using a convolution layer with three layers of 128 channels;
the fourth step: finally, a max-pool layer is used to reduce the feature size, and a Dropout layer is used to prevent over-fitting.
In the sequence learning stage, only one bidirectional LSTM (LSTM is short for long-time memory) network layer (Bi-LSTM for short) is used, and then a Dropout layer for preventing overfitting is added;
and finally, outputting the output layer of the sleep stage by using a softmax function.
After the deep learning network is built, dividing the acquired signals into four categories of clear-headed, rapid eye movement, light-sleeping and deep-sleeping according to the correspondingly labeled tags; and then, the original electroencephalogram data and the corresponding labels are sent to a deep learning model for training.
In the training process, continuously iterating through a network by using a back propagation algorithm and an Adam random optimization algorithm until the optimal accuracy value and loss value are reached, and storing the training model at the moment;
when the sleep categories are divided, a weight cross entropy loss function is adopted to divide the intervals;
the sleep data set is a non-equilibrium data set, and in order to improve the accuracy of sleep staging, a weight cross entropy loss function is used in the network training process; the weight of the category having a relatively small data amount is set to be relatively large.
The stored training model is the deep learning model;
then, collecting new Fp1-Fp2 electroencephalogram data, then carrying out 30s segmentation processing, finally directly sending the processed segmentation data into the deep learning model for prediction, and giving a prediction result according to the model;
according to the prediction result given by the model, the sleep stage chart can be drawn.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (9)

1. The deep learning algorithm for sleep stage by using the prefrontal single-channel electroencephalogram signal comprises the establishment of a training model and the final output prediction, and is characterized in that: the establishment of the training model comprises three stages of Fp1-Fp2 electroencephalogram data acquisition, 30s segmentation processing and deep learning network establishment, and finally the training model is established;
and acquiring Fp1-Fp2 electroencephalogram data and performing 30s segmentation processing on the final output prediction, and then sending the processed signals into the established deep learning model to obtain the final output prediction.
2. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 1, characterized in that: the Fp1-Fp2 electroencephalogram data are acquired by placing flexible patch electrodes at the positions of Fp1-Fp2 of the forehead of a human brain to acquire electroencephalogram signals; and meanwhile, the PSG equipment is worn to collect data, and then the data collected by the PSG equipment is labeled, and the label is used as a label for model training.
3. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 1, characterized in that: the 30s segmentation processing is to perform 30s signal segmentation processing on each segment of the original electroencephalogram signal; and extracting the label corresponding to the label.
4. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 1, characterized in that: the method comprises the steps that a deep learning network is built by using a PyTorch deep learning frame, and the deep learning network structure comprises two stages of representation learning and sequence learning;
the characterization learning stage is used for extracting time-invariant features in a sleep stage, and the sequence learning stage is used for learning time information in sleep.
5. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 4, characterized in that: the characterization learning phase comprises the following steps;
the first step is as follows: firstly, processing an input original signal by using a layer of 64-channel convolution layer and a pooling layer;
the second step is that: then, in order to prevent overfitting, a Dropout layer is added, the Dropout can set the probability of discarding the neurons in the network layer, and a certain proportion of the neurons can be discarded after setting, so that the overfitting problem is relieved;
the third step: then, feature learning is carried out by using a convolution layer with three layers of 128 channels;
the fourth step: finally, a max-pool layer is used to reduce the feature size, and a Dropout layer is used to prevent over-fitting.
6. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 4, characterized in that: in the sequence learning stage, only one bidirectional LSTM network layer is used, and then a Dropout layer for preventing overfitting is added;
and finally, outputting the output layer of the sleep stage by using a softmax function.
7. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 4, characterized in that: after the deep learning network is built, dividing the acquired signals into four categories of clear-headed, rapid eye movement, light-sleeping and deep-sleeping according to the correspondingly labeled tags; and then, the original electroencephalogram data and the corresponding labels are sent to a deep learning model for training.
8. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 7, characterized in that: in the training process, a back propagation algorithm and an Adam random optimization algorithm are used, iteration is continuously carried out through a network until the optimal accuracy value and loss value are reached, and at the moment, the training model is stored;
and when the sleep categories are divided, a weight cross entropy loss function is adopted to divide the intervals.
9. The deep learning algorithm for sleep staging using forehead single-channel electroencephalogram signals according to claim 8, characterized in that: the stored training model is a deep learning model;
and then, collecting new Fp1-Fp2 electroencephalogram data, then carrying out 30s segmentation processing, finally directly sending the processed segmentation data into the deep learning model for prediction, and giving a prediction result according to the model.
CN202111130838.9A 2021-09-26 2021-09-26 Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal Pending CN113995421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111130838.9A CN113995421A (en) 2021-09-26 2021-09-26 Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111130838.9A CN113995421A (en) 2021-09-26 2021-09-26 Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal

Publications (1)

Publication Number Publication Date
CN113995421A true CN113995421A (en) 2022-02-01

Family

ID=79921725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111130838.9A Pending CN113995421A (en) 2021-09-26 2021-09-26 Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal

Country Status (1)

Country Link
CN (1) CN113995421A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114366038A (en) * 2022-02-17 2022-04-19 重庆邮电大学 Sleep signal automatic staging method based on improved deep learning algorithm model

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110897639A (en) * 2020-01-02 2020-03-24 清华大学深圳国际研究生院 Electroencephalogram sleep staging method based on deep convolutional neural network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110897639A (en) * 2020-01-02 2020-03-24 清华大学深圳国际研究生院 Electroencephalogram sleep staging method based on deep convolutional neural network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114366038A (en) * 2022-02-17 2022-04-19 重庆邮电大学 Sleep signal automatic staging method based on improved deep learning algorithm model
CN114366038B (en) * 2022-02-17 2024-01-23 重庆邮电大学 Sleep signal automatic staging method based on improved deep learning algorithm model

Similar Documents

Publication Publication Date Title
CN107495962B (en) Sleep automatic staging method for single-lead electroencephalogram
CN110765920B (en) Motor imagery classification method based on convolutional neural network
Li et al. Densely feature fusion based on convolutional neural networks for motor imagery EEG classification
CN109394209B (en) Personalized emotion adjusting system and method for pregnant woman music treatment
CN107402635B (en) Mental health adjusting method and system combining brain waves and virtual reality
CN103372258A (en) Insomnia treatment instrument and insomnia treatment method
US20220265218A1 (en) Real-time evaluation method and evaluation system for group emotion homogeneity
CN111956219A (en) Electroencephalogram signal-based emotion feature identification method and system and emotion feature identification and adjustment system
CN113303814B (en) Single-channel ear electroencephalogram automatic sleep staging method based on deep transfer learning
CN115153463A (en) Training method of sleep state recognition model, and sleep state recognition method and device
An et al. Electroencephalogram emotion recognition based on 3D feature fusion and convolutional autoencoder
CN104793493A (en) Semi-automatic sleep staging device based on realtime neutral network
CN114145745B (en) Graph-based multitasking self-supervision emotion recognition method
CN114081439A (en) Brain-like algorithm for sleep staging by applying prefrontal single-channel electroencephalogram signals
CN113995421A (en) Deep learning algorithm for sleep stage by using forehead single-channel electroencephalogram signal
Pratiwi et al. EEG-based happy and sad emotions classification using LSTM and bidirectional LSTM
CN108491792B (en) Office scene human-computer interaction behavior recognition method based on electro-oculogram signals
CN114145744A (en) Cross-device forehead electroencephalogram emotion recognition method and system
Li et al. Driver distraction from the EEG perspective: A review
CN112328072A (en) Multi-mode character input system and method based on electroencephalogram and electrooculogram
CN115640827B (en) Intelligent closed-loop feedback network method and system for processing electrical stimulation data
Rammy et al. Sequence-to-sequence deep neural network with spatio-spectro and temporal features for motor imagery classification
Jiang et al. Electroencephalogram signals emotion recognition based on convolutional neural network-recurrent neural network framework with channel-temporal attention mechanism for older adults
CN110916688A (en) Method for monitoring emotion based on artificial intelligence technology
JIANG et al. Electroencephalogram Signals Emotion Recognition Based on CNN-RNN Framework with Channel-Temporal Attention Mechanism for Older Adults

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination