A sleep quality assessment system based on global slow waves
By using a global slow-wave assessment system, combined with multi-location EEG signal acquisition and an improved matching tracking algorithm, the problem of inaccurate global slow-wave assessment in existing technologies has been solved, achieving more accurate sleep quality assessment and a user-friendly monitoring experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2023-06-15
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, sleep quality assessment methods are mainly based on local slow waves, which cannot fully reflect global slow wave information, resulting in low assessment accuracy and an inability to intuitively reflect brain activity status.
A sleep quality assessment system based on global slow waves is designed. EEG signals are collected from multiple preset locations, including the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG). The Potato algorithm is used to remove artifacts and perform data segmentation. An improved matching pursuit algorithm is used to detect global slow waves. A machine learning model is used to divide sleep stages and extract features. The system comprehensively evaluates sleep quality based on subjective and objective data.
It achieves more accurate sleep quality assessment, reduces local storage pressure, allows users to operate independently, provides hospital-level precision sleep monitoring, and offers a good interactive experience.
Smart Images

Figure CN116649913B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sleep quality assessment, specifically relating to a sleep quality assessment system based on global slow waves. Background Technology
[0002] Sleep plays a vital role in health, and sufficient sleep duration and high-quality sleep are essential for efficient sleep. Currently, sleep problems are becoming increasingly serious and urgently need to be addressed. However, in today's fast-paced and highly competitive society, achieving sufficient sleep duration is difficult; therefore, improving sleep quality is a more feasible approach to addressing current sleep problems. Adult nighttime sleep follows a cycle, each cycle including the wakefulness period (W), rapid eye movement (REM) sleep, non-rapid eye movement (NREM) stage 1 (NREM1), non-rapid eye movement (NREM2) sleep, and non-rapid eye movement (NREM3) sleep, lasting 90-120 minutes. During NREM3, brain activity generates a special electrical signal, known as slow waves due to its low frequency (0.5-4 Hz).
[0003] Modern neuroscience indicates that slow waves are closely related to sleep quality. Based on their location, slow waves can be categorized into local slow waves and global slow waves. Local slow waves occur in a specific area, usually caused by local inhibition or regulation in that area. An increase in local slow waves can promote memory retention. Global slow waves, on the other hand, occur throughout the entire cerebral cortex, usually caused by synchronous activity in the cortex. An increase in global slow waves can promote memory consolidation and retrieval. Global slow waves typically accompany the onset of deep sleep and are considered a marker of deep sleep. Compared to local slow waves, global slow waves contain more comprehensive information and better reflect the brain activity state of subjects during sleep. Therefore, accurately detecting global slow waves and calculating parameters based on them to assess sleep quality is of great significance.
[0004] Currently, most sleep quality assessments rely on motion signals and cardiopulmonary information collected by accelerometers in mobile phones or wristwatches during sleep. This method has low accuracy and fails to directly reflect slow-wave data. While some recent studies have considered slow-wave data for sleep quality assessment, they only collect localized slow-wave data from limited locations, failing to capture global slow-wave activity and thus providing an insufficiently comprehensive assessment of brain activity during sleep. Summary of the Invention
[0005] To address the aforementioned problems in the existing technology, this invention provides a sleep quality assessment system based on global slow waves. The technical problem to be solved by this invention is achieved through the following technical solution:
[0006] A sleep quality assessment system based on global slow waves includes: a user terminal and a cloud platform. The user terminal includes a user device and a terminal device.
[0007] The user equipment includes: a data acquisition module for acquiring EEG signals from multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG) of the target sleep period; a preprocessing module for performing interference filtering, artifact detection and labeling, and data segmentation on the acquired EEG signals to obtain preprocessed EEG signals; and a storage module for storing the preprocessed EEG signals and transmitting them to the terminal device.
[0008] The terminal device includes: a control module for transmitting data with the acquisition module and the cloud; a questionnaire collection module for publishing sleep questionnaires and receiving user responses to obtain scale data; a user feedback module for collecting user opinions and suggestions and optimizing the system; and a visualization module for visualizing the data.
[0009] The cloud platform includes: a feature extraction module, used to divide the preprocessed EEG signal into sleep stages, perform slow-wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and take the slow waves detected simultaneously by all channels as global slow waves; perform feature extraction on the preprocessed EEG signal and the global slow waves respectively to obtain basic parameters and slow-wave parameters; a parameter calculation module, used to obtain a subjective score based on the scale data, an objective score based on the basic parameters and the slow-wave parameters, and a sleep score based on the subjective score and the objective score; a sleep quality assessment module, used to obtain a sleep quality assessment result based on the sleep score; and a sleep report generation module, used to generate a sleep report based on the sleep quality assessment result; and the cloud platform returns the sleep score, the sleep quality assessment result, and the sleep report as analysis data to the terminal device.
[0010] In one embodiment of the present invention, the multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography, and electromyography include:
[0011] The preset locations corresponding to the frontal lobe include FP2 and FP1 in the 10-20 system;
[0012] The preset position corresponding to electrooculography includes E2 in the 10-20 system;
[0013] The preset locations corresponding to electromyography include Chinz in the 10-20 system;
[0014] The preset locations corresponding to the temporal lobe include preset points B1, B2, B3, and B4 of the target ear; wherein the target ear is the left or right ear; B1 is located above the front of the target ear; B2 is located at the hairline above the target ear; B3 is located at the mastoid process of the target ear; and B4 is located at a preset distance below the mastoid process of the target ear, wherein the preset distance ranges from 2 to 3 cm.
[0015] In one embodiment of the present invention, the preprocessing module performs interference filtering, artifact detection and labeling, and data segmentation on the obtained EEG signal to obtain a preprocessed EEG signal, including:
[0016] After removing power frequency interference from the obtained EEG signal, a preset filter is used to filter it, retaining the signals within the preset EEG frequency range and the preset EMG frequency range, thus obtaining the interference-removed filtered EEG signal.
[0017] The artifacts in the de-interference filtered EEG signal are detected and marked using a Potato-based artifact processing algorithm to obtain the artifact-processed EEG signal.
[0018] The EEG signal after artifact processing is divided into epochs to obtain the preprocessed EEG signal.
[0019] In one embodiment of the present invention, the step of detecting and labeling artifacts in the interference-removing filtered EEG signal using a Potato-based artifact processing algorithm to obtain the artifact-processed EEG signal includes:
[0020] Based on the Potato algorithm, the EEG signal after interference removal and filtering is segmented using a data window, and the covariance matrix, reference covariance matrix, distance between the covariance matrix and the reference covariance matrix, and artifact threshold are calculated sequentially for each window of data.
[0021] For each obtained window data, based on the comparison relationship between the distance between its covariance matrix and the reference covariance matrix and the artifact threshold, it is determined whether the window data is an artifact, and it is marked accordingly. The artifact-processed EEG signal is obtained from all the marked window data.
[0022] In one embodiment of the present invention, the feature extraction module divides the preprocessed EEG signal into sleep stages, performs slow wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and takes the slow waves detected simultaneously by all channels as global slow waves, including:
[0023] The pre-trained classification model is used to divide the preprocessed EEG signals into sleep stages, resulting in EEG signals with sleep stage labels. The sleep stages include five stages: wake, N1, N2, N3, and rem. The classification model is built based on machine learning methods and is trained on sample sleep EEG signals with sleep stage labels.
[0024] The sleep EEG signals marked as non-artifacts and labeled with sleep stages N2 and N3 after the sleep stages are divided are taken as specific sleep EEG signals. Slow waves in the specific sleep EEG signals are detected according to an improved matching tracking algorithm based on a pre-built dictionary. The basis functions of the pre-built dictionary are restricted to preset functions that are similar to the slow wave morphology of sleep.
[0025] Slow waves detected simultaneously by all channels are considered as global slow waves.
[0026] In one embodiment of the present invention, the dictionary construction process includes:
[0027] The basis functions of the dictionary are restricted to Gabor functions that resemble the morphology of slow-wave sleep, and their standard formula is: Where K(γ) represents the normalization coefficient; Y = {u,ω,s,φ}; u represents the center position of the Gabor function; ω represents the angular frequency of the Gabor function; s represents the scale parameter of the Gabor function; φ represents the phase parameter of the Gabor function;
[0028] The parameters of the Gabor function are set using the characteristics of slow-wave sleep, where the parameters of the Gabor function include Y.
[0029] In one embodiment of the present invention, detecting slow waves in the specific sleep EEG signal according to an improved matching pursuit algorithm based on a pre-built dictionary includes:
[0030] The specific sleep EEG signals are received using a sliding window;
[0031] The zero-crossing points that meet the requirements are detected from the obtained window signals and used as candidate points;
[0032] Remove candidate points whose negative-to-positive zero crossover frequency does not meet the threshold requirement;
[0033] The remaining candidate points are processed using a matching pursuit algorithm and the dictionary to determine the atom that best matches the current residual signal;
[0034] Based on the relationship between the maximum scalar product corresponding to the atom that best matches the current residual signal and the pre-set scalar product threshold, it is determined whether the retained candidate point is a slow wave.
[0035] In one embodiment of the present invention, the process by which the feature extraction module extracts features from the preprocessed EEG signal and the global slow wave to obtain basic parameters and slow wave parameters includes:
[0036] Feature extraction is performed on the preprocessed EEG signals to obtain basic parameters including sleep duration, sleep latency, sleep continuity, and sleep efficiency.
[0037] Feature extraction is performed on the global slow waves to obtain slow wave parameters including slow wave frequency, slow wave density, slow wave duration, slow wave relative amplitude, and slow wave slope.
[0038] In one embodiment of the present invention, the process of the parameter calculation module obtaining a subjective score based on the scale data, obtaining an objective score based on the baseline parameters and the slow-wave parameters, and obtaining a sleep score based on the subjective score and the objective score includes:
[0039] The subjective score is calculated by summing the scores of each item in the scale data;
[0040] Substitute each item in the basic parameters into the preset basic parameter calculation formula to obtain the basic parameter score;
[0041] Substitute each item in the slow wave parameters into the preset slow wave parameter calculation formula to obtain the slow wave parameter score;
[0042] Substitute the basic parameter score and the slow wave parameter score into the preset objective score calculation formula to obtain the objective score;
[0043] The subjective score and the objective score are substituted into a preset sleep score calculation formula to obtain the sleep score.
[0044] In one embodiment of the present invention, the preset basic parameter calculation formula includes:
[0045] Score f =ω1×T1-ω2×T2-ω3×T3+ω4×η
[0046] Among them, Score f The basic parameter scores are represented by T1, T2, T3, and η. T1 represents sleep duration, T2 represents sleep latency, T3 represents sleep continuity, η represents sleep efficiency, and ω1, ω2, ω3, and ω4 represent the weights of each basic parameter.
[0047] The preset slow wave parameter calculation formula includes:
[0048] Score SW=ω5×w+ω6×ρ+ω7×t+ω8×v+ω9×k *
[0049] Among them, Score SW The slow wave parameter score is represented by: w; slow wave frequency; ρ; slow wave density; t; slow wave duration; v; and relative slow wave amplitude. * ω5 represents the slow wave slope; ω6, ω7, ω8, and ω9 represent the weights corresponding to each slow wave parameter.
[0050] The preset objective score calculation formula includes:
[0051] Score obj =ω f ×Score f +ω SW ×Score SW
[0052] Among them, Score obj Indicates the objective score; ω f and ω SW These represent the weights corresponding to the basic parameter score and the slow wave parameter score, respectively.
[0053] The preset sleep score calculation formula includes:
[0054] SleepScore total =ω subj ×Score subj +ω obj ×Score obj
[0055] Among them, SleepScore total Score represents sleep score; subj Indicates subjective score; ω subj and ω obj These represent the weights corresponding to the subjective score and the objective score, respectively.
[0056] The beneficial effects of this invention are:
[0057] This invention provides a sleep quality assessment system based on global slow-wave sleep. Compared to existing technologies that use local slow-wave sleep, this system offers more accurate sleep quality assessment. Furthermore, it considers both subjective (i.e., questionnaires) and objective (i.e., sleep parameters) data, providing a more comprehensive assessment of sleep quality parameters and a complete sleep quality scoring system, resulting in more accurate assessment results. Simultaneously, the system utilizes cloud storage and cloud computing for data processing, reducing the pressure on local storage. The device is entirely user-controlled, providing hospital-level precision sleep monitoring and assessment without the need for professional medical personnel, offering tight control and a superior user experience. Attached Figure Description
[0058] Figure 1 This is a schematic diagram of the structure of a sleep quality assessment system based on global slow waves provided in an embodiment of the present invention;
[0059] Figure 2 This is a schematic diagram showing the location of the 10-20 system;
[0060] Figure 3 This is a schematic diagram of the temporal lobe corresponding to a preset position in an embodiment of the present invention;
[0061] Figure 4 This is a hardware schematic diagram of the frontal lobe portion in the acquisition module of an embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of the APP interaction process of the terminal device in an embodiment of the present invention;
[0063] Figure 6 This is a schematic diagram of the classification process of the classification model in an embodiment of the present invention;
[0064] Figure 7 This is a standard waveform diagram for slow waves;
[0065] Figure 8 This is a dictionary diagram of an embodiment of the present invention;
[0066] Figure 9 This is a schematic diagram of the slow-wave detection process according to an embodiment of the present invention;
[0067] Figure 10 A schematic diagram illustrating the calculation parameters for sleep scores in an embodiment of the invention;
[0068] Figure 11 A simplified schematic diagram of the workflow of the global slow-wave sleep quality assessment system according to an embodiment of the invention. Detailed Implementation
[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] like Figure 1 As shown in the embodiment of the present invention, a sleep quality assessment system based on global slow waves includes: a user terminal and a cloud terminal. The user terminal includes a user device and a terminal device.
[0071] The user equipment includes: an acquisition module for acquiring EEG signals from multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG) during the target sleep period; a preprocessing module for filtering, artifact detection, and data segmentation of the acquired EEG signals to obtain preprocessed EEG signals; and a storage module for storing the preprocessed EEG signals and transmitting them to the terminal device.
[0072] The terminal equipment includes: a control module for data transmission with the data acquisition module and the cloud; a questionnaire collection module for issuing sleep questionnaires and receiving user responses to obtain scale data; a user feedback module for collecting user opinions and suggestions and optimizing the system; and a visualization module for visualizing the data.
[0073] The cloud-based system includes: a feature extraction module for dividing preprocessed EEG signals into sleep stages, performing slow-wave detection on specific EEG signals within the resulting sleep stage-divided EEG signals, and using slow waves detected simultaneously from all channels as global slow waves; feature extraction is performed on the preprocessed EEG signals and global slow waves to obtain basic parameters and slow-wave parameters; a parameter calculation module for obtaining subjective scores based on scale data, objective scores based on basic parameters and slow-wave parameters, and sleep scores based on subjective and objective scores; a sleep quality assessment module for obtaining sleep quality assessment results based on sleep scores; and a sleep report generation module for generating sleep reports based on sleep quality assessment results. The cloud-based system returns the sleep scores, sleep quality assessment results, and sleep reports as analytical data to the terminal device.
[0074] The following is a separate explanation of each part.
[0075] (a) User equipment
[0076] (1) Acquisition Module
[0077] This module is used to collect EEG signals from multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG) during the sleep period of the target subject.
[0078] Global slow waves and local slow waves are two common waveforms in sleep EEG signals, with global slow waves characterized by their simultaneous presence in various locations of the cerebral cortex. Therefore, when designing a global slow wave signal detection system, it is necessary to consider how to simultaneously acquire EEG signals from two geographically distant regions, while also ensuring portability and comfort. This invention proposes a method for simultaneously acquiring signals from the frontal and temporal lobes to more accurately detect global slow waves. The key to this design is the selection of two geographically distant locations, for example, a distance greater than a preset distance, which can be specifically set according to different target areas to capture slow wave signals from various locations in the cerebral cortex. When electrodes in both locations simultaneously detect slow waves, it can be considered that global slow waves have been detected. Compared with traditional global slow wave detection methods, the design of this invention has higher accuracy and reliability, and better meets the actual needs of the subjects being tested. Furthermore, this design is portable and comfortable, allowing for convenient use in different situations and environments, and providing a more convenient and efficient tool for sleep research.
[0079] Specifically, the acquisition module can directly acquire the electroencephalogram (EEG) signals of the target during sleep. The target can include humans.
[0080] Typically, the acquisition module consists of a series of electrodes placed close to the scalp at various preset locations. These electrodes detect electrical signals generated by brain activity during sleep. Multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG) can be designed based on the locations established by existing virtual EEG positioning systems. These virtual EEG positioning systems can include 10-10, 10-20, and 64-lead systems, among others; no specific limitation is imposed here. The number of acquisition channels can be determined according to actual needs. The sampling rate can also be set as needed; no limitation is imposed here.
[0081] For example, in one optional implementation, multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography, and electromyography include:
[0082] The preset locations corresponding to the frontal lobe include FP2 and FP1 in the 10-20 system;
[0083] The preset position corresponding to electrooculography includes E2 in the 10-20 system;
[0084] The preset locations corresponding to electromyography include Chinz in the 10-20 system;
[0085] The preset locations corresponding to the temporal lobe include preset points B1, B2, B3, and B4 of the target ear; where the target ear is either the left or right ear; B1 is located on the upper front side of the target ear; B2 is located at the hairline above the target ear; B3 is located at the mastoid process of the target ear; and B4 is located at a preset distance below the mastoid process of the target ear, with the preset distance ranging from 2 to 3 cm.
[0086] It is understandable that each preset location corresponds to one channel. FP2 and FP1 are two-channel frontal lobe signal acquisition; E2 is electrooculography (EOG) signal acquisition; Chinz is electromyography (EMG) signal acquisition; B1, B2, B3, and B4 are four-channel temporal lobe signal acquisition. This embodiment of the invention uses a total of eight channels to acquire information from the frontal and temporal lobes, as well as EMG and EEG data, and integrates the EEG signals acquired from various locations to obtain global slow-wave information.
[0087] For the locations defined in system 10-20, please refer to [link / reference needed]. Figure 2 Understanding. For the presupposed location corresponding to the temporal lobe, please refer to [link / reference needed]. Figure 3 Understood, this diagram uses the right ear as an example. It's also understood that during the data acquisition process, the aforementioned preset positions are the electrode positions.
[0088] The frontal lobe portion and central control unit can be integrated into a single unit. Temporal lobe, electrooculography (EOG), and electromyography (EMG) acquisition can be achieved using flexible circuitry. A hardware schematic of the frontal lobe portion of the acquisition module can be found in [reference needed]. Figure 4 understand.
[0089] Of course, the acquisition module in this embodiment of the invention is not limited to those shown above.
[0090] (2) Preprocessing module
[0091] In one optional implementation, the preprocessing module performs interference filtering, artifact detection and labeling, and data segmentation on the obtained EEG signal to obtain a preprocessed EEG signal, including:
[0092] 1) After removing power frequency interference from the obtained EEG signal, a preset filter is used for filtering to retain the signal within the preset EEG frequency range and the preset EMG frequency range, thus obtaining the interference-free filtered EEG signal.
[0093] The power frequency interference can be 50 Hz, etc. Preset filters can be selected as needed, such as bandpass filters or fifth-order Butterworth filters. The preset EEG and EMG frequency ranges to be retained can also be set as needed; for example, the preset EEG frequency range can be 0.35–35 Hz, and the preset EMG frequency range can be 10–100 Hz, etc., while signals at other frequencies are removed.
[0094] 2) The artifacts in the EEG signal after interference removal filtering are detected and marked using the Potato algorithm-based artifact removal algorithm to obtain the artifact-removed EEG signal.
[0095] Artifact removal can mark irrelevant interference data to improve the accuracy of subsequent sleep stage segmentation and slow wave waveform detection.
[0096] The Potato algorithm is a distance-based clustering algorithm that uses Riemannian geometry to calculate the distance between covariance matrices. It clusters similar covariance matrices into a single class, thereby obtaining a reference covariance matrix. The Potato algorithm can improve the accuracy and robustness of noise detection and has high applicability and reliability for processing multi-channel physiological signal data.
[0097] The present invention provides a new artifact processing algorithm based on the Potato algorithm.
[0098] In one optional implementation, an artifact detection algorithm based on the Potato algorithm is used to detect and label artifacts in the interference-removing filtered EEG signal to obtain an artifact-removed EEG signal, including:
[0099] Based on the Potato algorithm, the EEG signal after interference removal filtering is segmented using a data window, and the covariance matrix, reference covariance matrix, distance between the covariance matrix and the reference covariance matrix, and artifact threshold are calculated sequentially for each window of data.
[0100] For each obtained window data, based on the comparison relationship between the distance between its covariance matrix and the reference covariance matrix and the artifact threshold, it is determined whether the window data is an artifact, and it is marked accordingly. The artifact-processed EEG signal is obtained from all the marked window data.
[0101] The above process may specifically include the following steps:
[0102] Step a1: Use a data window of a preset size to segment the EEG signal after interference removal and filtering to obtain the window data corresponding to the current iteration;
[0103] The preset size of the data window can be set according to the required size of the data to be cut, such as 5 seconds.
[0104] It is understandable that the EEG signals after interference removal filtering slide into the data window in chronological order. When the size of the incoming data reaches the preset size of the data window, a data segmentation is performed to obtain one window of data. Therefore, as the EEG signals after interference removal filtering continuously enter the data window, several window data points can be segmented. In this embodiment of the invention, one window of data corresponds to one iteration. The following explanation uses the window data corresponding to the current iteration as an example to illustrate the subsequent steps.
[0105] Step a2: Calculate the covariance matrix of the window data corresponding to the current iteration;
[0106] Specifically, let E be the matrix corresponding to the EEG signal after interference removal filtering in the (x+1)th data window. x+1 The formula for calculating its covariance matrix is:
[0107]
[0108] Where, ∑ x+1 Let represent the covariance matrix of the data for the (x+1)th data window in the current iteration. For multi-channel signal data, the covariance matrix is a symmetric positive definite matrix that describes the relationship between different channels; N represents the data length of the EEG signal after interference removal filtering for the (x+1)th data window; E x+1 T E represents x+1 The transpose of .
[0109] Step a3: Based on the Potato algorithm, the covariance matrix corresponding to the current iteration, and the input reference covariance matrix, calculate the reference covariance matrix corresponding to the current iteration; where, for the first iteration, the input reference covariance matrix is the covariance matrix corresponding to the first iteration, and for any iteration starting from the second iteration, the input reference covariance matrix is the latest reference covariance matrix obtained after the previous iteration.
[0110] This step uses the Potato algorithm to cluster the covariance matrices of all data windows, grouping similar covariance matrices into one class to obtain a reference covariance matrix. It also employs an iterative clustering approach, adaptively adjusting the reference covariance matrix in different iterations.
[0111] The formula for calculating the reference covariance matrix corresponding to the current iteration is:
[0112]
[0113] in, This represents the reference covariance matrix corresponding to the current iteration; Indicates the input reference covariance matrix; Σ x+1This represents the covariance matrix of the window data corresponding to the current iteration.
[0114] For the first iteration, the input reference covariance matrix is the covariance matrix corresponding to the first iteration. For any iteration starting from the second iteration, the input reference covariance matrix is the latest reference covariance matrix obtained after the previous iteration.
[0115] Step a4: Based on the joint eigenvalues of the covariance matrix and the reference covariance matrix corresponding to the current iteration, calculate the Euclidean distance corresponding to the current iteration to characterize the distance between the corresponding covariance matrix and the reference covariance matrix in the current iteration.
[0116] For the covariance matrix of the window data corresponding to the current iteration, this step uses a Riemannian geometry algorithm to calculate its distance to the corresponding reference covariance matrix. Specifically, calculating the distance between two covariance matrices requires performing a logarithmic transformation on the eigenvalues of the covariance matrices, and then calculating the Euclidean distance between the eigenvalues. Therefore, this step first calculates the joint eigenvalue λ of the covariance matrix corresponding to the current iteration and the reference covariance matrix. i , it is The i-th eigenvalue, therefore, for the window data corresponding to the current iteration, there are multiple λ values. i .
[0117] Then, the Euclidean distance is calculated using the following formula:
[0118]
[0119] Where, d x+1 This represents the Euclidean distance corresponding to the current iteration.
[0120] Step a5: Determine the artifact threshold to be used in the current iteration based on the currently obtained Euclidean distance set;
[0121] The Euclidean distance set contains the Euclidean distances calculated for each non-artifact window of data. For the first iteration, the current Euclidean distance set is the set of Euclidean distances corresponding to all data windows, assuming that all data are non-artifacts. For each iteration starting from the second iteration, the current Euclidean distance set is the Euclidean distance set most recently determined in the previous iteration. Please refer to the relevant description below for understanding this point.
[0122] In one optional implementation, determining the artifact threshold for the current iteration based on the currently obtained Euclidean distance set includes:
[0123] ① Calculate the mean and standard deviation of all Euclidean distances in the currently obtained Euclidean distance set;
[0124] Specifically, the mean can be represented as μ, and the standard deviation can be represented as σ.
[0125] ②The sum of twice the standard deviation and the mean is determined as the artifact threshold to be used in the current iteration.
[0126] The artifact threshold used in the current iteration can be expressed as th x+1 ,th x+1 =μ+2σ.
[0127] Step a6: Determine whether the Euclidean distance corresponding to the current iteration is greater than the artifact threshold used in the current iteration; if not, proceed to step a7; if yes, proceed to step a8.
[0128] Specifically, this step is to determine whether d exists. x+1 >th x+1 .
[0129] Step a7: Mark the window data corresponding to the current iteration as non-artifacts, use the reference covariance matrix corresponding to the current iteration as the latest reference covariance matrix obtained after the current iteration, and add the Euclidean distance corresponding to the current iteration to the currently obtained Euclidean distance set to complete the update of the reference covariance matrix and the Euclidean distance set, and execute step a2 for the next window data.
[0130] If d x+1 ≤th x+1 The window data corresponding to the current iteration is marked as non-artifact, and the reference covariance matrix corresponding to the current iteration is used as the latest reference covariance matrix obtained after the current iteration, which is then used as the input reference covariance matrix for the next iteration. Simultaneously, the Euclidean distance corresponding to the current iteration is added to the currently obtained Euclidean distance set, so that the Euclidean distance set obtained in the next iteration contains that Euclidean distance.
[0131] Step a8: Mark the window data corresponding to the current iteration as an artifact, do not update the reference covariance matrix and the Euclidean distance set, and execute step a2 for the next window data.
[0132] If d x+1 >th x+1The window data corresponding to the current iteration is marked as an artifact, and the reference covariance matrix is not updated; that is, the reference covariance matrix calculated for the current iteration is not used as the input reference covariance matrix for the next iteration. Simultaneously, the Euclidean distance set is not updated; that is, the Euclidean distance corresponding to the current iteration is not added to the Euclidean distance set.
[0133] It is understood that after obtaining each window data in the embodiments of the present invention, covariance matrix calculation, reference covariance matrix calculation, Euclidean distance calculation, artifact threshold determination, Euclidean distance judgment, and artifact / non-artifact labeling are performed, and then the above processing process is performed again for the next window data obtained in step a1.
[0134] 3) Perform epoch division on the artifact-processed EEG signals to obtain preprocessed EEG signals.
[0135] The epoch division can be completed according to a set duration, such as 30 seconds, and the specific duration can be selected as needed. There are no restrictions here.
[0136] (3) Storage module
[0137] The storage module can temporarily store the preprocessed EEG signals locally and can transmit the preprocessed EEG signals to the terminal device via wireless transmission methods such as Bluetooth or WIFI for further processing by the terminal device.
[0138] (II) Terminal Equipment
[0139] The terminal device can be a mobile phone, etc., and the specific execution process can be completed through an app on the mobile phone. The various modules of the terminal device are as follows:
[0140] (1) Control Module
[0141] The control module is the primary means of connection between the terminal device and the user device. It transmits data to the acquisition module in the user device and allows adjustment of acquisition parameters such as sampling rate and sampling time, enabling more flexible and efficient use of the acquisition module. Simultaneously, the control module is responsible for data transmission to the cloud, sending preprocessed EEG signals and scale data, and receiving analysis data returned from the cloud for further visualization. Scale data will be described later.
[0142] (2) Questionnaire collection module
[0143] The questionnaire collection module allows users to submit sleep questionnaires via a mobile app. These questionnaires can use metrics such as the Pittsburgh Sleep Quality Index and the Epworth Sleepiness Scale, serving as important references for subjective assessment of sleep quality. The questionnaires can be submitted each morning upon waking, allowing for subsequent cloud-based analysis along with nighttime sleep EEG data to generate a sleep quality score. Alternatively, questionnaires can be submitted at any time of day to obtain recent sleep data for further assessment, which is also reasonable.
[0144] Once a sleep questionnaire is published, user responses can be received, thus obtaining scale data.
[0145] (3) User Feedback Module
[0146] For example, the user feedback module can be used to collect user opinions and suggestions about the app, the data collection module, etc., and optimize the system based on the user feedback information, continuously improving the device and the interaction platform, thereby providing a better sleep quality assessment experience.
[0147] (4) Visualization module
[0148] The visualization module displays data including cloud-returned analysis data, sleep questionnaires, and more. This data can be visualized through graphs and tables, allowing users to easily view and obtain a more intuitive assessment of their sleep quality. These graphs and tables can include not only daily sleep data but also sleep trends over a period of time, such as weeks or months. Visualization configurations can be customized to meet specific data display needs.
[0149] For information on the interaction process of the APP on the terminal device, please refer to Figure 5 To understand, the left image shows the interaction with the device, and the right image shows a visual representation of sleep data to show sleep trends, etc. Of course, the interaction with the terminal device's APP is not limited to what is shown above. It can also display parameter adjustments for the data collection module and sleep questionnaires, etc. The specific settings can be configured according to the APP's usage requirements, and detailed illustrations are not provided here.
[0150] (III) Cloud
[0151] (1) Feature extraction module
[0152] The function of this module can be divided into two parts. The first part is to divide the preprocessed EEG signal into sleep stages, perform slow wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and take the slow waves detected by all channels at the same time as global slow waves. The second part is to extract features from the preprocessed EEG signal and global slow waves respectively to obtain basic parameters and slow wave parameters.
[0153] Regarding the first part, in one optional implementation, the feature extraction module divides the preprocessed EEG signal into sleep stages, performs slow-wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and takes the slow waves detected simultaneously by all channels as the global slow waves, including:
[0154] I) The pre-trained classification model is used to divide the pre-processed EEG signal into sleep stages, resulting in EEG signals with sleep stage labels.
[0155] Specifically, according to the sleep stage classification standards established by the American Academy of Sleep Medicine (AASM), sleep stages can be divided into five stages: wake, N1, N2, N3, and REM (rapid eye movement). N1, N2, and N3 together, or all of them, belong to the NREM (non-rapid eye movement) stage. For details, please refer to the relevant technical explanations. Therefore, in this embodiment of the invention, the sleep stages include five stages: wake, N1, N2, N3, and REM.
[0156] The classification model is built using machine learning methods and is trained on sleep EEG signals from samples labeled with sleep stages.
[0157] The sample sleep EEG signals were acquired using an acquisition module, and then processed through interference filtering, artifact detection and labeling, and data segmentation. The sleep stages were known, and the sleep stage segmentation and labeling could be achieved by methods such as manual labeling or other algorithm labeling.
[0158] This classification model can be implemented using existing neural network models. For example, in one possible implementation, the structure of the classification model can be built by embedding multiple Support Vector Machines (SVMs) into a decision tree framework to achieve multi-class classification. The classification process of this model can be found in [link to relevant documentation]. Figure 6 understand, Figure 6 This is a schematic diagram illustrating the classification process of a classification model as an example in an embodiment of the present invention.
[0159] First, for example, the constructed classification model can be trained and tested using data from the public dataset MASS. Specifically, 80% of the data in the dataset can be used for training, and the remaining 20% can be used for testing to verify the model's classification effectiveness. Of course, the ratio of training to testing sets is not limited to 8:2 and can be chosen appropriately based on the situation. The training process of the classification model can be implemented based on the training process of existing machine learning models or neural network models, which will not be described in detail here.
[0160] Figure 6 In this context, EEG, EOG, and EMG data refer to the EEG signals input into the classification model.
[0161] The feature extraction and dimensionality reduction section refers to the extraction of 102 features for each sleep stage, including time-domain features, frequency-domain features, and nonlinear features. After extracting all features, the feature space was reduced to 32 features by removing outlier features (outlier features are those whose values are twice as high as the standard deviation of all values of the same feature in the same class) and features that were not significant enough in the standard t-test in the statistical analysis.
[0162] In the feature subset selection part, a standard forward process selection method is used to find a small feature subset in the high-dimensional feature space that has a significant impact on model performance. Specifically, this forward process selection method is applied to each node of the decision tree to select the best feature subset for each SVM. Once the decision tree has set the optimal parameters and data features for each SVM, the sleep data can be divided into stages to obtain the predicted sleep stage labels.
[0163] The classification model achieved an average accuracy of 80.77% using 10-fold cross-validation, and an average accuracy of 80.49% on the test set. This demonstrates that the classification model has good accuracy in segmenting sleep stages.
[0164] The above-described classification model is merely an optional example and is not intended to limit the classification model of the embodiments of the present invention. The classification model of the embodiments of the present invention can be implemented using any model capable of dividing the EEG signals during sleep into sleep stages, and no specific form is limited here.
[0165] II) After dividing the sleep stages, the sleep EEG signals marked as non-artifacts and labeled as sleep stages N2 and N3 are taken as specific sleep EEG signals. Slow waves in specific sleep EEG signals are detected according to an improved matching tracking algorithm based on a pre-built dictionary.
[0166] Slow-wave sleep (SWS) refers to stage N3 sleep, a deep sleep stage characterized by low-frequency, high-amplitude slow waves on the electroencephalogram (EEG). While some slow waves also occur in stage N2, they are less abundant than in stage N3. Therefore, slow-wave detection primarily targets stage N3 sleep, but stage N2 slow waves are also used as supplementary references. Thus, this embodiment of the invention only uses sleep EEG signals marked as non-artifacts and labeled with sleep stages N2 and N3 as specific sleep EEG signals for slow-wave detection.
[0167] It is understandable that the EEG signals after sleep stage segmentation all contain non-artifact / artifact markers and sleep stage labels. Therefore, this step only needs to check the markers and sleep stage labels in the input EEG signals after sleep stage segmentation. Those that meet the above requirements are identified as specific sleep EEG signals for subsequent processing.
[0168] The Matched Pursuit (MPP) algorithm is a commonly used signal processing algorithm, primarily used to extract target signals from noisy backgrounds. The basic idea of the MPP algorithm is to convolve the target signal with a set of filters to obtain a filtered output signal. Then, by analyzing the filtered output signal, relevant features of the target signal are extracted, enabling functions such as signal detection, recognition, and localization.
[0169] In this embodiment of the invention, the slow-wave detection module improves the matching pursuit algorithm by selecting a more accurate dictionary, forming an improved matching pursuit algorithm. This algorithm identifies and extracts sleep slow waves from the sleep EEG signals input to the slow-wave detection module. This improved matching pursuit algorithm significantly improves computational efficiency while ensuring detection accuracy. The core idea of this improved matching pursuit algorithm is to approximate the signal through linear combinations of atoms in the constructed dictionary; therefore, one of the core aspects of this improved matching pursuit algorithm is the selection of the dictionary.
[0170] To facilitate understanding of the improved matching and tracking algorithm proposed in this embodiment of the invention, the dictionary construction process will be explained first.
[0171] In this embodiment of the invention, the basis functions of the pre-constructed dictionary are limited to preset functions similar to the slow-wave morphology of sleep. The preset functions can be selected appropriately as needed. For example, the preset functions may include Gabor functions, etc.
[0172] Taking the Gabor function as an example, in one optional implementation, the dictionary construction process includes:
[0173] 1) Restrict the basis functions of the dictionary to Gabor functions with morphology similar to slow waves during sleep, the standard formula of which is:
[0174] Where K(γ) represents the normalization coefficient; Y = {u,ω,s,φ}; u represents the center position of the Gabor function; ω represents the angular frequency of the Gabor function; s represents the scale parameter of the Gabor function; φ represents the phase parameter of the Gabor function;
[0175] Specifically, the dictionary in this embodiment of the invention uses a set of Gabor functions. These basis functions can provide optimal time-frequency resolution. Using Gabor functions, it is easy to obtain basis functions similar to the typical waveform of slow waves, and they can reproduce most of the basic morphological characteristics of sleep slow waves. The standard waveform of slow waves is as follows: Figure 7 As shown in the figure, the horizontal axis represents time in seconds (sec); the vertical axis represents voltage in microvolts (μV); A, B, C, D, and E represent the corresponding distances; negative peak represents a negative peak value; positive peak represents a positive peak value; mid-crossing represents a zero-crossing point; and Start and End represent the start and end points of the waveform, respectively.
[0176] 2) The parameters of the Gabor function are set using the characteristics of slow sleep waves, where the parameters of the Gabor function include Y.
[0177] Because the basis functions of the dictionary are restricted to Gabor functions that are similar in shape to slow sleep waves, it is necessary to use the characteristics of slow sleep waves to set the parameters Y = {u, ω, s, φ}, etc.
[0178] In one optional implementation, the parameters of the Gabor function are set using the characteristics of slow sleep waves, including:
[0179] (1) Setting As the angular frequency of the Gabor function, where F s The sampling rate is f, which is determined according to the frequency range of standard sleep slow waves as f∈[0.5,2]Hz, and the step size is set to 0.1Hz;
[0180] Specifically, since the frequency of standard sleep slow waves is between 0.5 and 2 Hz, therefore... f∈[0.5,2]Hz, with a step size of 0.1Hz, is used as the frequency of the Gabor function.
[0181] (2) Each sleep slow wave is detected as a separate time period, and one sleep slow wave represents only one oscillation. Therefore, the scaling parameter of the Gabor function is set as follows:
[0182] Specifically, the idea behind this guideline is to ensure that the Gabor function has a duration of one oscillation period at the frequency of sleep slow waves. In other words, the Gabor function should be able to capture the entire oscillation of sleep slow waves within its duration. By setting the scaling parameter s in this way, it can be ensured that the Gabor function has an appropriate duration to capture sleep slow waves.
[0183] (3) For each frequency value, choose a separate value for ω(f) and s(f) to ensure that the exponential component of the Gabor function and the frequency of the cosine function are compatible;
[0184] Specifically, embodiments of the present invention also require ensuring that the frequencies of the exponential component and the cosine function of the Gabor function are compatible. For each frequency value, a separate value for ω(f) and s(f) needs to be selected. This is because the Gabor function contains two important parts: the exponential component and the cosine function. The exponential component, often referred to as the Gaussian envelope, controls the time and frequency characteristics of the Gabor function, while the cosine function controls its phase characteristics. By adjusting the parameters of the Gabor function, the frequencies of its exponential component and cosine function are made compatible.
[0185] (4) Set phase parameters And the step size is To ensure that the positive and negative oscillation amplitudes of the Gabor function are large enough to capture the negative and positive deflections of the slow wave sleep signal;
[0186] Specifically, in sleep slow-wave signals, negative and positive deflections occur; that is, the signal first deflects downwards and then upwards. To ensure that the Gabor function can capture these two deflections, this embodiment of the invention requires setting appropriate phase parameters. In the slow-wave detection module, the phase parameter φ is fixed at... and Between, that is: And let the step size be By limiting the phase of the Gabor function within this range, we can ensure that the positive and negative oscillation amplitudes of the Gabor function are sufficiently large.
[0187] This allows us to capture the negative and positive deflections of slow-wave sleep signals.
[0188] (5) To ensure that the center position of the Gabor function matches the zero point between the negative and positive deflections of sleep slow waves, the formula is used. Calculate the center position of the Gabor function;
[0189] Specifically, in sleep slow-wave signals, sleep slow waves typically appear at the zero-crossing position between the negative and positive deflections of the signal. Therefore, embodiments of the present invention aim for the Gabor function to have the same negative to positive zero-crossing position to better capture sleep slow-wave signals. Thus, in sleep slow-wave detection, the above formula can be used to calculate the center position of the Gabor function. Here, z represents the negative to positive zero-crossing position in the signal; ω(f) is the angular frequency of the Gabor function; and φ is the phase parameter of the Gabor function. This formula ensures that the center position of the Gabor function matches the zero-crossing position between the negative and positive deflections of the sleep slow wave. Since sleep slow-wave signals only appear at the zero-crossing position between the negative and positive deflections of the signal, embodiments of the present invention only need to consider the negative to positive zero-crossing position of the signal as candidate points.
[0190] In summary, by selecting appropriate Gabor function parameters and calculating the center position of the Gabor function, this invention can construct a dictionary matrix containing only those similar to the slow-wave morphology of sleep, thereby improving the accuracy and efficiency of slow-wave sleep detection. The final dictionary image is shown below. Figure 8 As shown.
[0191] The above describes the dictionary construction process of this invention. The improved matching pursuit algorithm of this invention is implemented using the traditional matching pursuit algorithm and this dictionary. The improved matching pursuit algorithm will be described next.
[0192] Global slow waves are associated with promoting memory consolidation and retrieval and are considered a marker of deep sleep; therefore, accurate detection of global slow waves is one of the key aspects of this invention. A significant characteristic of global slow waves is the ability to detect them simultaneously across various electrode regions of the brain. However, the signal amplitude at some electrodes shows an overall decreasing trend. Therefore, traditional slow wave detection algorithms based on amplitude thresholds have significant limitations. Based on this, this invention employs a detection algorithm based on signal waveforms, which not only has higher computational efficiency and accuracy but also better identifies low-amplitude global slow waves. In summary, it may include the following steps:
[0193] 1. A sliding window receives specific sleep EEG signals;
[0194] 2. Detect the zero-crossing points that meet the requirements from the obtained window signal and use them as candidate points;
[0195] 3. Remove candidate points whose negative-to-positive zero crossover frequency does not meet the threshold requirement;
[0196] 4. The remaining candidate points are processed using a matching pursuit algorithm and a dictionary to determine the atom that best matches the current residual signal;
[0197] 5. The relationship between the maximum scalar product corresponding to the atom that best matches the current residual signal and the pre-set scalar product threshold determines whether the retained candidate point is a slow wave.
[0198] To facilitate understanding of the execution process of steps 1 to 5 above, the specific steps and related explanations are given below, including:
[0199] Step b1: Receive specific sleep EEG signals using a sliding window of preset duration and perform filtering to obtain the current window signal;
[0200] The preset duration and the filter used for filtering can be selected as needed and are not restricted here. For example, the preset duration can be 30 seconds, and the filter can be a Butterworth filter, etc.
[0201] Here is an example of this step: Set the sliding window to 30 seconds and the overlap to 2 seconds, and receive specific sleep EEG signals; then use a 5th-order Butterworth bandpass filter to bandpass filter the received specific sleep EEG signals, with a filtering range of 0.5-35Hz. The overlap function allows signals at the edges of the window to also be detected.
[0202] Step b2: Detect all zero-crossing points in the current window signal and select the zero-crossing points that change from negative to positive as candidate points;
[0203] Step b3: For each candidate point obtained, calculate the frequency f of the negative to positive zero crossover point within a preset time length near that candidate point. zero ;
[0204] The preset time length can be 2 seconds, etc., and is not limited here. Taking this as an example, f zero The calculation process can be as follows: f is obtained by calculating the ratio of the number of all candidate points appearing in the vicinity of the candidate point within 2 seconds to the length of the 2-second data. zero .
[0205] Step b4, determine f zero Is it greater than a given threshold? If yes, proceed to step b5; otherwise, proceed to step b6.
[0206] Because f zero The magnitude of this value reflects whether there is a slow oscillation signal near the current candidate point. If too many zero-crossing points appear in a short period of time, it is considered that there is no slow wave and it needs to be excluded. Therefore, if this value is greater than a given threshold, the candidate point is removed.
[0207] The given threshold can be 4, etc., and there is no restriction here.
[0208] Step b5: Remove the candidate point;
[0209] Step b6: Determine the candidate point as a retained candidate point;
[0210] Step b7: For each retained candidate point obtained from the current window signal, process it using the matching pursuit algorithm and dictionary, select the atom with the largest scalar product as the atom that best matches the current residual signal, and update the current residual signal using the obtained largest scalar product;
[0211] For each retained candidate point, the process of using the matching pursuit algorithm and the previously defined dictionary, i.e., processing with the improved matching pursuit algorithm, is as follows:
[0212] First, iterate through all the atoms in the dictionary. For each atom in the dictionary, compare it with the current residual signal R. n (y) Perform dot product (inner product), i.e., calculate scalar product |<ω i ,R n (y)>|, where ω i R represents atoms in a dictionary. n (y) represents the current residual signal. In this step, we need to find a scalar product |<ω. i ,R n (y)>|maximizes the atom, in other words, finding the atom that best matches the current residual signal. At this point, the maximum scalar product k = |<ω can be obtained. n ,R n (y)>|. The atom with the largest scalar product is selected as the atom that best matches the current residual signal. The residual signal refers to the difference between the input and predicted signals; for details, please refer to the matching pursuit algorithm explanation, which will not be elaborated upon here.
[0213] To perform subsequent iterations, the residual signal needs to be updated. Specifically, the found atom ω... n Multiply it by its corresponding scalar product k, and then from the current residual signal ω n Subtract this product from the result. This will give you the new residual signal:
[0214] R n+1 (y)=R n (y)- <R n (y),ω n >ω n
[0215] Repeat the above process until the condition of the minimum residual energy threshold is met. This condition refers to the stopping condition of this iterative process. During the iteration, the lower the residual, the better the match. When the residual energy falls below a certain threshold, the iteration stops.
[0216] Please refer to the matching pursuit algorithm for details on this step; it will not be explained in detail here.
[0217] Step b8: Determine whether the obtained maximum scalar product is greater than the preset scalar product threshold; if not, proceed to step b9; if yes, proceed to step b10.
[0218] The preset scalar product threshold can be set as needed, such as 40, and there is no restriction here.
[0219] Step b9: Determine that the candidate point to be retained is not a slow wave, execute step b7, and after the candidate points to be retained obtained from the current window signal have been traversed, execute step b1;
[0220] If the obtained maximum scalar product is less than or equal to a preset scalar product threshold, it is determined that the waveform of the candidate point does not represent a slow sleep wave. Therefore, the candidate point is not a slow wave, and step b7 can be executed to determine the next candidate point obtained from the current window signal. Furthermore, if the candidate points obtained from the current window signal have been traversed, step b1 is executed to obtain the next window signal for processing after step b1.
[0221] Step b10: Add the reserved candidate point to the candidate slow wave list, execute step b7, and after the reserved candidate points obtained from the current window signal have been traversed, execute step b1;
[0222] If the maximum scalar product obtained is greater than a preset scalar product threshold, the candidate point to be retained is added to the candidate slow wave list. Then, step b7 can be executed to determine the next candidate point to be retained from the current window signal. Similarly, if the candidate points to be retained from the current window signal have been traversed, step b1 is executed to obtain the next window signal for processing after step b1.
[0223] Step b11: Filter the signal near each reserved candidate point in the candidate slow wave list to a preset frequency range, set the start point of the slow wave to the first zero-crossing point from positive to negative before the reserved candidate point, set the end point to the first zero-crossing point after the reserved candidate point, and determine whether its duration is within the preset duration. If so, determine the corresponding waveform as a slow wave.
[0224] This step involves slow-wave extraction and verification. The preset frequency range and preset duration can be set as needed; for example, the preset frequency range can be 0.5–4 Hz, and the preset duration can be 0.5–2 seconds.
[0225] The slow-wave detection process in this embodiment of the invention can be found in [reference needed]. Figure 9 I understand, and I will not repeat the explanation here.
[0226] The improved matching pursuit algorithm proposed in this invention constructs a dictionary by restricting the basis functions to preset functions similar to the slow-wave morphology of sleep. This dictionary is then combined with the traditional matching pursuit algorithm to complete slow-wave sleep detection. This detection algorithm, utilizing slow-wave shape, not only significantly reduces labor costs but also boasts high efficiency, accuracy, and reliability in slow-wave sleep detection. Because the algorithm's detection process relies on waveform rather than rigid amplitude indicators, it is also suitable for populations with lower amplitude, thus having a wider range of applications.
[0227] III) Slow waves detected simultaneously by all channels are treated as global slow waves.
[0228] Specifically, after detecting slow waves in all channels, by combining the detection results of the temporal lobe and the frontal lobe, the slow waves that are detected simultaneously in all EEG channels are selected as global slow waves and proceed to the next step of processing.
[0229] Regarding the second part, in one optional implementation, the feature extraction module performs feature extraction on the preprocessed EEG signal and global slow wave to obtain basic parameters and slow wave parameters, including:
[0230] ① Feature extraction is performed on the preprocessed EEG signals to obtain basic parameters including sleep duration, sleep latency, sleep continuity, and sleep efficiency;
[0231] ② Feature extraction is performed on the global slow waves to obtain slow wave parameters including slow wave frequency, slow wave density, slow wave duration, slow wave relative amplitude, and slow wave slope.
[0232] Of course, other data from sleep EEG can also be extracted for subsequent sleep quality assessment.
[0233] (2) Parameter Calculation Module
[0234] This module calculates the parameters needed for sleep quality assessment and obtains a sleep score. The calculated parameters can also be returned to an app on the terminal device to generate visual sleep quality trend charts, etc.
[0235] In one optional implementation, the parameter calculation module obtains a subjective score based on scale data, an objective score based on baseline parameters and slow-wave parameters, and a sleep score based on the subjective and objective scores, including:
[0236] ① Calculate the subjective score by summing the scores of each item in the scale data;
[0237] It is understandable that the user's answer options for different questions in the scale data can correspond to different scores. Therefore, a total score can be calculated according to the scoring rules of the sleep questionnaire used. Since the sleep questionnaire represents the user's subjective assessment of sleep quality, it is called a subjective score.
[0238] ② Substitute each item in the basic parameters into the preset basic parameter calculation formula to obtain the basic parameter score;
[0239] In this embodiment of the invention, the preset formulas for calculating basic parameters, slow wave parameters, objective scores, and sleep scores can be reasonably set according to the factors used, such as by using the weighted summation principle. No specific restrictions are imposed here.
[0240] In one optional implementation, the preset basic parameter calculation formula includes:
[0241] Score f =ω1×T1-ω2×T2-ω3×T3+ω4×η
[0242] The formula is obtained after normalizing the basic parameters, and the score is... f The values represent the basic parameter scores; T1 represents sleep duration, which can be the time to fall asleep each night, including the time to fall asleep and the time to wake up; T2 represents sleep latency, which is the time required to transition from a waking state to a sleep state; T3 represents sleep continuity, which can be the number of times and the duration of wake-ups during the night; η represents sleep efficiency, which is the ratio of sleep time to bedtime; ω1, ω2, ω3, and ω4 represent the weights corresponding to each basic parameter, which can be set by the user or determined based on the baseline model and the user's personalized sleep data.
[0243] ③ Substitute each item in the slow wave parameter into the preset slow wave parameter calculation formula to obtain the slow wave parameter score;
[0244] In one optional implementation, the preset slow-wave parameter calculation formula includes:
[0245] Score SW =ω5×w+ω6×ρ+ω7×t+ω8×v+ω9×k *
[0246] The formula is obtained by normalizing the slow wave parameters, and the score is... SW The slow wave parameter score is represented by: w; slow wave frequency; ρ; slow wave density; t; slow wave duration; v; and relative slow wave amplitude. *ω5 represents the slow wave slope; ω6, ω7, ω8, and ω9 represent the weights corresponding to each slow wave parameter, which can be set by the user or determined based on the baseline model and the user's personalized sleep data.
[0247] ④ Substitute the basic parameter score and the slow wave parameter score into the preset objective score calculation formula to obtain the objective score;
[0248] The preset objective score calculation formula includes:
[0249] Score obj =ω f ×Score f +ω SW ×Score SW
[0250] Among them, Score obj Indicates the objective score; ω f and ω SW These represent the weights corresponding to the basic parameter score and the slow wave parameter score, respectively.
[0251] ⑤ Substitute the subjective score and objective score into the preset sleep score calculation formula to obtain the sleep score.
[0252] The preset sleep score calculation formula includes:
[0253] SleepScore total =ω subj ×Score subj +ω obj ×Score obj
[0254] Among them, SleepScore total Score represents sleep score; subj Indicates subjective score; ω subj and ω obj These represent the weights corresponding to subjective and objective scores, respectively, which can be set by the user or determined based on the baseline model.
[0255] For details on the parameters used to calculate sleep scores, please refer to [link / reference]. Figure 10 understand.
[0256] (3) Sleep quality assessment module
[0257] Specifically, the sleep quality assessment module obtains personalized sleep quality assessment results based on sleep scores, a baseline model that matches the user type of the target, and the target's historical sleep data.
[0258] (4) Sleep report generation module
[0259] Specifically, the sleep report generation module generates a sleep report based on the sleep quality assessment results and the target's historical sleep habits; the sleep report is used to evaluate the target's sleep quality and provide relevant suggestions for improving sleep quality.
[0260] To facilitate understanding of the workflow of the global slow-wave sleep quality assessment system according to embodiments of the present invention, a simplified flowchart is provided below.
[0261] First, the device is put on, and the app demonstrates the wearing method with animation. After wearing, the app checks the electrode impedance in the acquisition module to determine if the acquisition module is worn correctly. If the impedance is greater than a set threshold, a wearing problem is identified, and the app provides an audio prompt and suggestions for correct wearing, requiring the user to wear it again for testing. If worn correctly, EEG signal acquisition begins. The acquired EEG signals are analyzed to determine if the user has entered a sleep state. When the user is asleep, the pre-processed EEG signal is stored locally, and acquisition continues until the user wakes up the next morning. The system then determines whether the user's sleep has ended. If the user is still asleep, sleep signal acquisition continues; if the user is awake, the pre-processed EEG signals acquired that night are uploaded to the cloud for further analysis and processing.
[0262] Feature extraction is performed on the data in the cloud, including dividing the preprocessed EEG signals into sleep stages, performing slow wave detection on specific EEG signals in the obtained sleep stage-divided EEG signals, and taking the slow waves detected simultaneously by all channels as global slow waves; feature extraction is performed on the preprocessed EEG signals and global slow waves to obtain basic parameters and slow wave parameters, then subjective scores are obtained based on scale data, objective scores are obtained based on basic parameters and slow wave parameters, sleep scores are obtained based on subjective scores and objective scores, and then sleep quality assessment results are obtained, resulting in a sleep report for the user's sleep that night. The sleep report and other analysis data are returned to the APP, which visualizes the data for the user's viewing.
[0263] This invention provides a sleep quality assessment system based on global slow-wave sleep. Compared to existing technologies that use local slow-wave sleep, this system offers more accurate sleep quality assessment. Furthermore, it considers both subjective (i.e., questionnaires) and objective (i.e., sleep parameters) data, providing a more comprehensive assessment of sleep quality parameters and a complete sleep quality scoring system, resulting in more accurate assessment results. Simultaneously, the system utilizes cloud storage and cloud computing for data processing, reducing the pressure on local storage. The device is entirely user-controlled, providing hospital-level precision sleep monitoring and assessment without the need for professional medical personnel, offering tight control and a superior user experience.
[0264] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A sleep quality assessment system based on global slow waves, characterized in that, include: The user terminal includes user equipment and terminal equipment, wherein... The user equipment includes: a data acquisition module for acquiring EEG signals from multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography (EOG), and electromyography (EMG) of the target sleep period; a preprocessing module for performing interference filtering, artifact detection and labeling, and data segmentation on the acquired EEG signals to obtain preprocessed EEG signals; and a storage module for storing the preprocessed EEG signals and transmitting them to the terminal device. The terminal device includes: a control module for transmitting data with the acquisition module and the cloud; a questionnaire collection module for publishing sleep questionnaires and receiving user responses to obtain scale data; a user feedback module for collecting user opinions and suggestions and optimizing the system; and a visualization module for visualizing the data. The cloud platform includes: a feature extraction module, used to divide the preprocessed EEG signal into sleep stages, perform slow-wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and take the slow waves detected simultaneously by all channels as global slow waves; to extract features from the preprocessed EEG signal and the global slow waves respectively to obtain basic parameters and slow-wave parameters; a parameter calculation module, used to obtain a subjective score based on the scale data, an objective score based on the basic parameters and the slow-wave parameters, and a sleep score based on the subjective score and the objective score; a sleep quality assessment module, used to obtain a sleep quality assessment result based on the sleep score; and a sleep report generation module, used to generate a sleep report based on the sleep quality assessment result; and the cloud platform returns the sleep score, the sleep quality assessment result, and the sleep report as analysis data to the terminal device; The multiple preset locations corresponding to the frontal lobe, temporal lobe, electrooculography, and electromyography include: The preset locations corresponding to the frontal lobe include FP2 and FP1 in the 10-20 system; The preset position corresponding to electrooculography includes E2 in the 10-20 system; The preset locations corresponding to electromyography include Chinz in the 10-20 system; The preset positions corresponding to the temporal lobe include preset points B1, B2, B3, and B4 of the target ear; wherein, the target ear is the left or right ear; B1 is located above the front of the target ear; B2 is located at the hairline above the target ear; B3 is located at the mastoid process of the target ear; and B4 is located at a preset distance below the mastoid process of the target ear, wherein the preset distance ranges from 2 to 3 cm. The process by which the parameter calculation module obtains a subjective score based on the scale data, an objective score based on the baseline parameters and the slow-wave parameters, and a sleep score based on the subjective score and the objective score includes: The subjective score is calculated by summing the scores of each item in the scale data; Substitute each item in the basic parameters into the preset basic parameter calculation formula to obtain the basic parameter score; Substitute each item in the slow wave parameters into the preset slow wave parameter calculation formula to obtain the slow wave parameter score; Substitute the basic parameter score and the slow wave parameter score into the preset objective score calculation formula to obtain the objective score; Substitute the subjective score and the objective score into the preset sleep score calculation formula to obtain the sleep score; The preset basic parameter calculation formula includes: in, Indicates the score of basic parameters; Indicates sleep duration; Indicates sleep latency; Indicates sleep continuity; Indicates sleep efficiency; , , , This indicates the weights corresponding to each basic parameter; The preset slow wave parameter calculation formula includes: in, Indicates the slow wave parameter score; Indicates the slow wave frequency; Represents slow wave density; Indicates the duration of the slow wave; Indicates the relative amplitude of the slow wave; Indicates the slope of the slow wave; , , , , This represents the weights corresponding to each slow wave parameter; The preset objective score calculation formula includes: in, Indicates the objective score; and These represent the weights corresponding to the basic parameter score and the slow wave parameter score, respectively. The preset sleep score calculation formula includes: in, Indicates sleep score; Indicates subjective score; and These represent the weights corresponding to the subjective score and the objective score, respectively.
2. The sleep quality assessment system based on global slow waves according to claim 1, characterized in that, The preprocessing module performs interference filtering, artifact detection and labeling, and data segmentation on the obtained EEG signals to obtain preprocessed EEG signals, including: After removing power frequency interference from the obtained EEG signal, a preset filter is used to filter it, retaining the signals within the preset EEG frequency range and the preset EMG frequency range, thus obtaining the interference-removed filtered EEG signal. The artifacts in the de-interference filtered EEG signal are detected and marked using a Potato-based artifact processing algorithm to obtain the artifact-processed EEG signal. The EEG signal after artifact processing is divided into epochs to obtain the preprocessed EEG signal.
3. The sleep quality assessment system based on global slow waves according to claim 2, characterized in that, The artifact detection and labeling algorithm based on the Potato algorithm is used to detect artifacts in the interference-removing filtered EEG signal, resulting in an artifact-removed EEG signal, including: Based on the Potato algorithm, the EEG signal after interference removal and filtering is segmented using a data window, and the covariance matrix, reference covariance matrix, distance between the covariance matrix and the reference covariance matrix, and artifact threshold are calculated sequentially for each window of data. For each obtained window data, based on the comparison between the distance between its covariance matrix and the reference covariance matrix and the artifact threshold, it is determined whether the window data is an artifact, and it is marked accordingly. The artifact-processed EEG signal is obtained from all the marked window data.
4. The sleep quality assessment system based on global slow waves according to claim 3, characterized in that, The feature extraction module divides the preprocessed EEG signal into sleep stages, performs slow-wave detection on specific EEG signals in the obtained sleep stage-divided EEG signal, and takes the slow waves detected simultaneously by all channels as the global slow waves. This process includes: The pre-trained classification model is used to divide the preprocessed EEG signals into sleep stages, resulting in EEG signals with sleep stage labels. The sleep stages include five stages: wake, N1, N2, N3, and rem. The classification model is built based on machine learning methods and is trained on sample sleep EEG signals with sleep stage labels. The sleep EEG signals marked as non-artifacts and labeled with sleep stages N2 and N3 after the sleep stages are divided are taken as specific sleep EEG signals. Slow waves in the specific sleep EEG signals are detected according to an improved matching tracking algorithm based on a pre-built dictionary. The basis functions of the pre-built dictionary are restricted to preset functions that are similar to the slow wave morphology of sleep. Slow waves detected simultaneously by all channels are considered as global slow waves.
5. The sleep quality assessment system based on global slow waves according to claim 4, characterized in that, The dictionary construction process includes: The basis functions of the dictionary are restricted to Gabor functions that resemble the morphology of slow-wave sleep, and their standard formula is: Among them, Represents the normalization coefficient; ; Indicates the center position of the Gabor function; This represents the angular frequency of the Gabor function; The scaling parameter of the Gabor function; This represents the phase parameter of the Gabor function; The parameters of the Gabor function are set using the characteristics of slow-wave sleep. The parameters of the Gabor function include... .
6. The sleep quality assessment system based on global slow waves according to claim 5, characterized in that, The detection of slow waves in the specific sleep EEG signal using an improved matching pursuit algorithm based on a pre-built dictionary includes: The specific sleep EEG signals are received using a sliding window; The zero-crossing points that meet the requirements are detected from the obtained window signals and used as candidate points; Remove candidate points whose negative-to-positive zero crossover frequency does not meet the threshold requirement; The remaining candidate points are processed using a matching pursuit algorithm and the dictionary to determine the atom that best matches the current residual signal; Based on the relationship between the maximum scalar product corresponding to the atom that best matches the current residual signal and the pre-set scalar product threshold, it is determined whether the retained candidate point is a slow wave.
7. The sleep quality assessment system based on global slow waves according to claim 6, characterized in that, The feature extraction module performs feature extraction on the preprocessed EEG signal and the global slow wave to obtain basic parameters and slow wave parameters, including: Feature extraction is performed on the preprocessed EEG signals to obtain basic parameters including sleep duration, sleep latency, sleep continuity, and sleep efficiency. Feature extraction is performed on the global slow waves to obtain slow wave parameters including slow wave frequency, slow wave density, slow wave duration, slow wave relative amplitude, and slow wave slope.
Citation Information
Patent Citations
Intelligent sleep phase detection and sleep quality evaluation system and method
CN110623665A
Online slow wave enhancement system and method for distinguishing slow wave types
CN113288176A
Portable sleep monitoring system based on ear EEG
CN113907709A