Sleep period detection device and equipment
By designing a sleep period detection device that combines EEG signals and Eophthalmic signals, the oversampling technology makes the sample data consistent, solving the problem of low accuracy of sleep period detection in the existing technology, and achieving higher sleep stages accuracy.
Patent Information
- Application Number
- CN202310964669.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the accuracy of sleep detection by extracting features and combining machine learning is not high.
A sleep period detection device was designed to obtain EEG signals and EEG signals through the data acquisition module and input them into the sleep period detection model. The model is based on sample EEG signals and EEG signals, and their corresponding real sleep tags. Training to get. The device introduces electroophthalmic signals as auxiliary indicators and makes the sample data of different sleep period types consistent through oversampling.
The accuracy of sleep staging is improved, and the detection accuracy of the detection model is enhanced by introducing electroophthalmic signals and oversampling technology.
Smart Images

Figure CN119423683A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a sleep period detection device and equipment. Background Art
[0002] Traditional sleep staging is manually annotated by professional sleep physicians based on polysomnography (PSG). PSG is divided into 30-second periods, and then the whole night of sleep is divided into five stages: wake, non-rapid eye movement (N1, N2, N3) and rapid eye movement (REM). However, the PSG acquisition process is cumbersome, has strict environmental requirements, and manual annotation is inefficient, time-consuming, and arduous.
[0003] Therefore, researchers have used feature extraction combined with machine learning to detect sleep periods. However, these methods of extracting features and combining them with machine learning to detect sleep periods still have the problem of low detection accuracy. Summary of the invention
[0004] The present application provides a sleep period detection device and equipment to solve the problem that the existing technology uses feature extraction combined with machine learning to detect sleep periods, which has a low detection accuracy.
[0005] The present application provides a sleep period detection device, comprising:
[0006] A data acquisition module, used to acquire the EEG signal and the EOG signal of the target object during the sleep period to be detected;
[0007] A detection module, used for inputting the EEG features of the EEG signal and the EOG features of the EOG signal into a sleep period detection model to obtain a sleep period detection result output by the sleep period detection model;
[0008] Among them, the sleep period detection model is obtained by training based on sample EEG signals and sample EOG signals, as well as real sleep labels of the same sleep period corresponding to the sample EEG signals and the sample EOG signals; the sample EEG signals are obtained by oversampling sample EEG continuous signals with different sleep period types, and the number of sample EEG signals of different sleep period types after oversampling is consistent; the sample EOG signals are obtained by oversampling sample EOG continuous signals with different sleep period types, and the number of sample EOG signals of different sleep period types after oversampling is consistent.
[0009] In one embodiment, the sleep epoch detection model is trained based on the following steps:
[0010] Based on a preset time window, the sample EEG continuous signal and the sample EOG continuous signal are respectively divided to obtain original sample EEG signals of different sleep period types and original sample EOG signals of different sleep period types;
[0011] Performing feature extraction on each original sample EEG signal and each original sample EOG signal respectively to obtain an original sample EEG feature corresponding to each original sample EEG signal and an original sample EOG feature corresponding to each original sample EOG signal;
[0012] Determine the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature;
[0013] The sleep period detection model is trained based on the sample EEG signal, the sample EOG signal, and the real sleep labels of the same sleep period corresponding to the sample EEG signal and the sample EOG signal.
[0014] In one embodiment, the determining the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature includes:
[0015] Oversampling each original sample EEG feature to obtain a plurality of sample EEG features with an increased number of samples;
[0016] Performing oversampling processing on each of the original sample electrooculographic features to obtain a plurality of sample electrooculographic features with an increased number of samples;
[0017] The sample EEG features and sample EO features that belong to the same sleep period type among the multiple sample EO features and the multiple sample EEG features are determined as the sample EEG signals and the sample EO signals.
[0018] In one embodiment, the oversampling of each original sample EEG feature includes:
[0019] Determine a first dangerous class sample in the EEG feature of each original sample; the first dangerous class sample represents a first minority class sample around the sample, and the sample exceeding the first set threshold belongs to the first majority class sample; the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first majority class sample is greater than the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first minority class sample;
[0020] Oversampling is performed on each of the first-hazardous samples.
[0021] In one embodiment, the oversampling of each original sample electrooculographic feature includes:
[0022] Determine a second dangerous class sample in each of the original sample electrooculogram features; the second dangerous class sample represents a second minority class sample around the sample, and the sample exceeding the second set threshold belongs to the second majority class sample; the total number of samples of the original sample electrooculogram features of the sleep period type corresponding to the second majority class sample is greater than the total number of samples of the original sample electrooculogram features of the sleep period type corresponding to the second minority class sample;
[0023] Oversampling is performed on each of the second-hazardous category samples.
[0024] In one embodiment, the method of dividing the sample EEG continuous signal and the sample EOG continuous signal based on a preset time window to obtain original sample EEG signals of different sleep period types and original sample EOG signals of different sleep period types includes:
[0025] respectively performing band-pass filtering on the sample EEG continuous signal and the sample EOG continuous signal;
[0026] Based on the preset time window, the sample EEG continuous signal and the sample EOG continuous signal after bandpass filtering are divided respectively to obtain the original sample EEG signal and the original sample EOG signal.
[0027] In one embodiment, before the method of dividing the sample EEG continuous signal and the sample EOG continuous signal based on the preset time window to obtain the original sample EEG signals of different sleep period types and the original sample EOG signals of different sleep period types, it also includes:
[0028] Performing independent component analysis on the sample EEG continuous signal;
[0029] The sample EEG continuous signal and the sample electrooculogram continuous signal after independent component analysis are filtered.
[0030] In one embodiment, the EEG features include: EEG signal time domain features, EEG signal frequency domain features, EEG signal time-frequency domain features, and / or EEG signal nonlinear features;
[0031] The electrooculogram features include: electrooculogram signal time domain features, electrooculogram signal frequency domain features, electrooculogram signal time-frequency domain features, and / or electrooculogram signal nonlinear features.
[0032] The present application also provides a wearable sleep-aiding device.
[0033] In one embodiment, the wearable sleep aid device is a head-mounted sleep aid.
[0034] The sleep period detection device and equipment provided by the present application obtains the EEG signal and EOG signal of the target object during the sleep period to be detected through a data acquisition module, and inputs the EEG features of the EEG signal and the EOG features of the EOG signal into a sleep period detection model through a detection module to obtain the sleep period detection result output by the sleep period detection model. The present application introduces EOG signals as auxiliary indicators for sleep staging, and at the same time makes the sample data of different sleep period types consistent through oversampling, thereby improving the accuracy of sleep staging. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 is a structural schematic diagram of a sleep period detection device provided by the present application;
[0037] Figure 2 It is a schematic diagram of the principle of Borderline SMOTE oversampling provided by this application;
[0038] Figure 3 It is a flowchart of the sleep period detection method provided by the present application;
[0039] Figure 4 It is a schematic diagram of the structure of the wearable sleep aid device provided in this application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] Combine the following Figure 1-Figure 4 The sleep period detection device of the present application is described.
[0042] Specifically, the present application provides a sleep period detection device, referring to Figure 1 , Figure 1 It is a structural schematic diagram of the sleep period detection device provided by the present application.
[0043] The sleep period detection device provided in the embodiment of the present application includes:
[0044] The data acquisition module 100 is used to acquire the EEG signal and the EOG signal of the target object during the sleep period to be detected;
[0045] It should be noted that the target subjects refer to the individuals who are being studied or monitored during sleep, that is, the participants who collect EEG and EOG signals.
[0046] The sleep period to be detected includes five periods:
[0047] (1) Wake phase: refers to the sleep cycle in the wakeful state, that is, the state in which people are awake and conscious;
[0048] Non-Rapid Eye Movement (NREM), including N1, N2, and N3:
[0049] (2) Stage N1: The transitional stage of sleep, which usually lasts for a few minutes. During the transitional stage of sleep, people enter a light sleep, begin to relax, and are easily disturbed by the outside world.
[0050] (3) Stage N2: Moderate sleep stage, accounting for 50% to 60% of total sleep time. In the moderate sleep stage, heart rate and breathing slow down, the body further relaxes, and eye movements decrease.
[0051] (4) Stage N3: Deep sleep stage, accounting for 10% to 25% of total sleep time. In the deep sleep stage, body muscles relax and brain electrical activity slows down.
[0052] (5) Rapid Eye Movement (REM): A special sleep stage named after the rapid eye movement during this stage. REM usually occurs in the second half of the sleep cycle and is a relatively active sleep stage.
[0053] It should be further explained that in the EEG (Electroencephalogram) sleep staging, the EEGs of the N1 stage and the REM stage are very similar, so it is difficult to accurately distinguish the two stages by relying solely on EEG signals. In order to more accurately stage sleep, the embodiment of the present application introduces electrooculogram signals as an important auxiliary indicator. In the REM stage, the eyeballs will quickly rotate horizontally and vertically. This eye movement will trigger the activity of the eyelid muscles and produce characteristic signals in the EEG. By recording the EEG signals and the electrooculogram signals at the same time, the changes in the electrooculogram signals can be used to assist in determining whether the REM stage has been entered, thereby more accurately staging sleep.
[0054] Obtain the EEG and EOG signals of the target object during the sleep period to be detected, for example, obtain the EEG and EOG signals from the Sleep_EDF polysomnography database, which records 44 PSG sleep records, including EEG, EOG, and electromyographic signals, etc., with a sampling frequency of 100 Hz. The embodiment of the present application uses 2-lead EOG signals and 1-lead EOG signals.
[0055] Optionally, the following method can be used to obtain EEG signals and EOG signals:
[0056] EEG signal acquisition: Use an electroencephalogram instrument or device to record the EEG signal of the target subject. For example, by placing multiple electrodes on the scalp to record brain electrical activity. Alternatively, by inserting fine needle electrodes into specific areas of the scalp and brain to record more precise EEG signals.
[0057] EOG signal acquisition: used to record the target subject's electrooculogram (EOG) activity in order to monitor eye movements and eyelid movements. For example, by placing electrodes around the eyelids or on the jaw, EOG activity is recorded. Alternatively, a specialized eye-tracking instrument is used to monitor the target subject's eye movements.
[0058] A detection module 200, for inputting the EEG features of the EEG signal and the EOG features of the EOG signal into a sleep period detection model, and obtaining a sleep period detection result output by the sleep period detection model;
[0059] It should be noted that the sleep period detection model is trained based on sample EEG signals and sample EOG signals, as well as real sleep labels of the same sleep period corresponding to the sample EEG signals and the sample EOG signals; the sample EEG signals are obtained by oversampling sample EEG continuous signals with different sleep period types, and the number of sample EEG signals of different sleep period types after oversampling is the same; the sample EOG signals are obtained by oversampling sample EEG continuous signals with different sleep period types, and the number of sample EOG signals of different sleep period types after oversampling is the same.
[0060] After obtaining the EEG signal and the EOG signal, the EEG features of the EEG signal and the EOG features of the EOG signal are extracted respectively, and then the EEG features of the EEG signal and the EOG features of the EOG signal are input into the sleep period detection model to obtain the sleep period detection result output by the sleep period detection model. Referring to Table 1, Table 1 shows the sleep period detection results of sleep detection using different methods.
[0061] Table 1
[0062]
[0063] It can be seen from Table 1 that the accuracy of sleep period detection using electroencephalogram (EEG) signal + electrooculogram (EOG) signal + SMOTE oversampling algorithm is the highest.
[0064] The sleep period detection device provided in the embodiment of the present application obtains the EEG signal and the EOG signal of the target object during the sleep period to be detected through the data acquisition module, and inputs the EEG features of the EEG signal and the EOG features of the EOG signal into the sleep period detection model through the detection module to obtain the sleep period detection result output by the sleep period detection model. The embodiment of the present application introduces the EOG signal as an auxiliary indicator for sleep staging, and at the same time makes the sample data of different sleep period types consistent through oversampling, thereby improving the accuracy of sleep staging.
[0065] In one embodiment, the sleep epoch detection model is trained based on the following steps:
[0066] Step 10, based on a preset time window, respectively dividing the sample EEG continuous signal and the sample EOG continuous signal to obtain original sample EEG signals of different sleep period types and original sample EOG signals of different sleep period types;
[0067] Step 20, performing feature extraction on each original sample EEG signal and each original sample EOG signal, respectively, to obtain an original sample EEG feature corresponding to each original sample EEG signal, and an original sample EOG feature corresponding to each original sample EOG signal;
[0068] Step 30, determining the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature;
[0069] Step 40: training the sleep period detection model based on the sample EEG signal, the sample EOG signal, and the real sleep labels of the same sleep period corresponding to the sample EEG signal and the sample EOG signal.
[0070] It should be noted that after obtaining the sample EEG continuous signal and the sample EOG continuous signal, these signals need to be preprocessed.
[0071] Specifically, independent component analysis is performed on the sample EEG continuous signal, wherein independent component analysis (ICA) is used to extract independent components or source signals from mixed signals.
[0072] For example, the sample EEG continuous signal is first preprocessed, including noise removal, filtering and artifact reduction. Optionally, it can also include removing electrooculogram (EOG) and electromyography (EMG) interference, as well as baseline drift and motion artifact correction. Then, the preprocessed sample EEG continuous signal is constructed into a mixed model, assuming that the observed sample EEG continuous signal is a linear combination of multiple independent source signals. Further, the independent component analysis algorithm is applied to decompose the mixed model to estimate the source signal and the mixing matrix, and the independent component corresponding to the source signal of interest is selected according to the characteristics of the signal and the research purpose, wherein the component may correspond to different EEG activities, such as alpha rhythm, beta rhythm, etc. Finally, the extracted independent components are subjected to subsequent analysis, such as spectrum analysis, time-frequency analysis, coherence analysis, etc., to further study the characteristics of the source signal and the relationship with other signals.
[0073] The sample EEG continuous signal and the sample electrooculogram continuous signal after independent component analysis are filtered. For example, the sample EEG continuous signal and the unprocessed sample electrooculogram continuous signal after independent component analysis are simultaneously bandpass filtered, wherein the filtering range is: low-pass filtering 0.5 Hz, high-pass filtering 30 Hz.
[0074] Furthermore, based on a preset time window (such as a window size of 30 seconds), the sample EEG continuous signal and the sample EOG continuous signal after bandpass filtering are divided to obtain original sample EEG signals and original sample EOG signals.
[0075] Feature extraction is performed on each original sample EEG signal and each original sample EOG signal respectively to obtain the original sample EEG feature corresponding to each original sample EEG signal and the original sample EOG feature corresponding to each original sample EOG signal. The EEG feature includes: EEG signal time domain feature, EEG signal frequency domain feature, EEG signal time-frequency domain feature, and / or EEG signal nonlinear feature; the EOG feature includes: EOG signal time domain feature, EOG signal frequency domain feature, EOG signal time-frequency domain feature, and / or EOG signal nonlinear feature.
[0076] For example, referring to Table 2 and Table 3, Table 2 is an EEG feature extraction table, and Table 3 is an EOG feature extraction table.
[0077] Table 2
[0078]
[0079]
[0080] Table 3
[0081]
[0082] Among them, Table 4 is an EEG frequency band division table, which is used to divide the slow delta, fast delta, theta, alpha, sigma, beta and other bands of EEG signals.
[0083] Table 4
[0084]
[0085]
[0086] Furthermore, a sleep period detection model is trained based on the sample EEG signals, the sample EOG signals, and the real sleep labels of the same sleep period corresponding to the sample EEG signals and the sample EOG signals.
[0087] For example, when using the XGBoost algorithm for model training, the parameters needed can be divided into three categories: General Parameters, which are used to set the overall function; Booster Parameters, which are used to select the booster (tree or regression) for each step; Learning Task Parameters, which are used to guide the execution of the optimization task.
[0088] The general parameters of the XGBoost algorithm mainly include: booster, silent and nthread; the boost parameters include: eta, min_child_weight, max_depth, gamma, subsample and colsample_bytree, etc.; the learning task parameters mainly include objective, eval_metric and seed. Parameter optimization is an important step in the training and learning of classification algorithms. Therefore, it is necessary to find suitable parameters to improve the performance of the algorithm.
[0089] The embodiment of the present application adopts the grid search method to automatically optimize the selection of parameters, wherein the grid search method is similar to the working principle of the greedy algorithm. During training, the parameters that can make the state reach the optimal state are selected and automatically optimized, and the optimization is performed in a certain order. After the optimization of the previous parameter is completed, the parameters that most affect the model are selected from the remaining parameters that need to be optimized to start optimization. Among them, the selection of parameters automatically optimized by the grid search method includes the following steps:
[0090] Step 1: Import the classification model XGBoost and the sklean library related to the experiment;
[0091] Step 2: Import the GridSerchCV grid search algorithm model from the sklean library;
[0092] Step 3: Enter the max_depth, min_child_weight, gamma, subsample, and colsample_bytree parameters that need to be adjusted;
[0093] Step 4: Create a GridSerchCV model and set the parameters;
[0094] Step 5: Optimize the parameters of the algorithm model generated in step 4 and obtain the optimal parameter values after training.
[0095] The embodiment of the present application introduces electrooculogram signals as an auxiliary indicator for sleep staging, and at the same time makes the sample data of different sleep period types consistent through oversampling. Based on this, the detection accuracy of the trained sleep period detection model is high, thereby improving the accuracy of sleep staging.
[0096] In one embodiment, the determining the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature includes:
[0097] Step 301, performing oversampling processing on each original sample EEG feature to obtain a plurality of sample EEG features with an increased number of samples;
[0098] Step 302, performing oversampling processing on each of the original sample electrooculographic features to obtain a plurality of sample electrooculographic features with an increased number of samples;
[0099] Step 303: Determine the sample EEG features and sample EO features that belong to the same sleep period type among the multiple sample EO features and the multiple sample EEG features as the sample EEG signals and the sample EO signals.
[0100] Specifically, the first dangerous class sample in each original sample EEG feature is determined, and then each first dangerous class sample is oversampled. The first dangerous class sample represents the first minority class sample around the sample, and the samples exceeding the first set threshold belong to the first majority class sample; the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first majority class sample is greater than the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first minority class sample;
[0101] Determine the second dangerous class samples in each original sample electrooculographic feature, and then perform oversampling processing on each second dangerous class sample. The second dangerous class samples represent the second minority class samples around the sample, and the samples exceeding the second set threshold belong to the second majority class samples; the total number of samples of the original sample electrooculographic features of the sleep period type corresponding to the second majority class samples is greater than the total number of samples of the original sample electrooculographic features of the sleep period type corresponding to the second minority class samples.
[0102] For example, the Borderline SMOTE algorithm is used for oversampling. The idea of the Borderline SMOTE algorithm is to divide minority samples into three categories: safe samples, dangerous samples, and suspicious samples. Safe means that half or more of the samples around the sample are minority samples, such as Figure 2 Midpoint A; Danger means that half or more of the samples around the sample are majority class samples, that is, boundary samples, such as Figure 2 Midpoint B; Noise means that the samples are surrounded by majority class samples, which are considered as noise, such as Figure 2 Midpoint C, and the Borderline SMOTE algorithm oversamples Danger.
[0103] Among them, the basic principle of Borderline SMOTE algorithm is:
[0104] (1) For each sample x in the minority class, the distance from it to all samples in the minority class sample set is calculated using the Euclidean distance as the criterion to obtain its k nearest neighbor samples.
[0105] (2) According to the sample imbalance ratio, a sampling ratio is set to determine the sampling rate N. For each minority class sample x, N samples of class B are randomly selected from its k nearest neighbor samples. Assume that the selected nearest neighbor sample is x. n .
[0106] (3) For each randomly selected neighbor sample x n , respectively, construct new samples with the original samples according to the following formula:
[0107] x new =x+λ×(x n -x);
[0108] Here, λ is a random number between [0, 1], which is used to control the position of the synthetic sample. The closer λ is to 0, the closer the new sample will be to x; the closer λ is to 1, the closer the new sample will be to x. n .
[0109] The embodiment of the present application makes the sample data of different sleep period types consistent through oversampling, thereby increasing the number of minority samples, changing the distribution of training data, reducing data imbalance, and thus improving the accuracy of sleep staging.
[0110] In order to further analyze and explain the sleep period detection device proposed in this application, refer to Figure 3 And the following examples.
[0111] 1. Use 2-lead EEG signals and 1-lead EOG signals;
[0112] 2. Perform data preprocessing on EEG and EOG signals, including deleting missing or unrecognizable data, filtering according to EEG frequency bands, and dividing time windows;
[0113] 3. Extract features from the EEG and EOG signals after data preprocessing, including extracting time domain features, frequency features, time-frequency domain features, and nonlinear features;
[0114] 4. To address the imbalance problem of sleep stage categories, the Borderline SMOTE oversampling algorithm is used to oversample the EEG signals and EOG signals. The basic principle of the Borderline SMOTE algorithm is to increase the number of minority samples, change the distribution of training data, and eliminate or reduce data imbalance.
[0115] 5. Input the sampled data into the XGBoost classifier, and output the sleep staging results through the XGBoost classifier.
[0116] The embodiment of the present application introduces electrooculogram signals as an auxiliary indicator for sleep staging, and at the same time makes the sample data of different sleep period types consistent through oversampling, thereby improving the accuracy of sleep staging.
[0117] Figure 4 The following is a schematic diagram of a wearable sleep aid device. Figure 4 As shown, the wearable sleep aid device may include: a processor 410, a communications interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communications interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430.
[0118] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0119] In one embodiment, the wearable sleeping aid device is a head-mounted sleeping aid.
[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A sleep period detection device, characterized in that: include: A data acquisition module, used to acquire the EEG signal and the EOG signal of the target object during the sleep period to be detected; A detection module, used for inputting the EEG features of the EEG signal and the EOG features of the EOG signal into a sleep period detection model to obtain a sleep period detection result output by the sleep period detection model; Among them, the sleep period detection model is obtained by training based on sample EEG signals and sample EOG signals, as well as real sleep labels of the same sleep period corresponding to the sample EEG signals and the sample EOG signals; the sample EEG signals are obtained by oversampling sample EEG continuous signals with different sleep period types, and the number of sample EEG signals of different sleep period types after oversampling is consistent; the sample EOG signals are obtained by oversampling sample EOG continuous signals with different sleep period types, and the number of sample EOG signals of different sleep period types after oversampling is consistent.
2. The sleep period detection device according to claim 1, characterized in that: The sleep epoch detection model is trained based on the following steps: Based on a preset time window, the sample EEG continuous signal and the sample EOG continuous signal are respectively divided to obtain original sample EEG signals of different sleep period types and original sample EOG signals of different sleep period types; Performing feature extraction on each original sample EEG signal and each original sample EOG signal respectively to obtain an original sample EEG feature corresponding to each original sample EEG signal and an original sample EOG feature corresponding to each original sample EOG signal; Determine the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature; The sleep period detection model is trained based on the sample EEG signal, the sample EOG signal, and the real sleep labels of the same sleep period corresponding to the sample EEG signal and the sample EOG signal.
3. The sleep period detection device according to claim 2, characterized in that: The determining of the sample EEG signal and the sample EOG signal based on the oversampling processing result of each original sample EEG feature and the oversampling processing result of each original sample EOG feature comprises: Oversampling each original sample EEG feature to obtain a plurality of sample EEG features with an increased number of samples; Performing oversampling processing on each of the original sample electrooculographic features to obtain a plurality of sample electrooculographic features with an increased number of samples; The sample EEG features and sample EO features that belong to the same sleep period type among the multiple sample EO features and the multiple sample EEG features are determined as the sample EEG signals and the sample EO signals.
4. The sleep period detection device according to claim 3, characterized in that: The oversampling process of each original sample EEG feature comprises: Determine a first dangerous class sample in the EEG feature of each original sample; the first dangerous class sample represents a first minority class sample around the sample, and the sample exceeding the first set threshold belongs to the first majority class sample; the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first majority class sample is greater than the total number of samples of the original sample EEG feature of the sleep period type corresponding to the first minority class sample; Oversampling is performed on each of the first-hazardous samples.
5. The sleep period detection device according to claim 3, characterized in that: The oversampling process of each original sample electrooculographic feature comprises: Determine a second dangerous class sample in each of the original sample electrooculogram features; the second dangerous class sample represents a second minority class sample around the sample, and the sample exceeding the second set threshold belongs to the second majority class sample; the total number of samples of the original sample electrooculogram features of the sleep period type corresponding to the second majority class sample is greater than the total number of samples of the original sample electrooculogram features of the sleep period type corresponding to the second minority class sample; Oversampling is performed on each of the second-hazardous category samples.
6. The sleep period detection device according to claim 2, characterized in that: The method of dividing the sample EEG continuous signal and the sample EOG continuous signal based on the preset time window to obtain original sample EEG signals of different sleep period types and original sample EOG signals of different sleep period types includes: respectively performing band-pass filtering on the sample EEG continuous signal and the sample EOG continuous signal; Based on the preset time window, the sample EEG continuous signal and the sample EOG continuous signal after bandpass filtering are divided respectively to obtain the original sample EEG signal and the original sample EOG signal.
7. The sleep period detection device according to claim 1, characterized in that: Before the method of dividing the sample EEG continuous signal and the sample EOG continuous signal based on the preset time window to obtain the original sample EEG signals of different sleep period types and the original sample EOG signals of different sleep period types, the method further includes: Performing independent component analysis on the sample EEG continuous signal; The sample EEG continuous signal and the sample electrooculogram continuous signal after independent component analysis are filtered.
8. The sleep period detection device according to any one of claims 1 to 7, characterized in that: The EEG features include: EEG signal time domain features, EEG signal frequency domain features, EEG signal time-frequency domain features, and / or EEG signal nonlinear features; The electrooculogram features include: electrooculogram signal time domain features, electrooculogram signal frequency domain features, electrooculogram signal time-frequency domain features, and / or electrooculogram signal nonlinear features.
9. A wearable sleep aid device, characterized in that: A sleep period detection device comprising the sleep period detection device according to any one of claims 1 to 8.
10. The wearable sleep aid device according to claim 9, characterized in that: The wearable sleeping aid device is a head-mounted sleeping aid.
Citation Information
Patent Citations
Algorithm for automatically staging sleep
CN111631688A
Automatic sleep staging and migration method based on deep neural network
CN112869711A
Sleep staging method, system and device and medium
CN115969329A
Sleep staging result determination method and device, equipment and medium
CN116421152A