A method, device, electronic device and storage medium for detecting sleep spindles
Through the combination of multi-scale smoothing algorithm and SVM classifier, the automatic detection of sleep spindles is solved, and the problem of manual detection is time-consuming and labor-intensive and lack of reliability in traditional methods is improved, and the accuracy and objectivity of detection are improved.
Patent Information
- Application Number
- CN202210422674.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-04-21
AI Technical Summary
The traditional method of detecting sleep spindles relies on manual annotation, which is time-consuming and costly, and multiple experts may have differences in judgments and lack reliability and objectivity.
Multi-scale smoothing algorithm (MP algorithm) is used to filter and identify candidate waves of EEG signals, extract features and normalize them, and classify them in combination with support vector machine (SVM) classifier to realize automated detection.
It improves the accuracy and objectivity of sleep spindle detection, reduces manual intervention, and realizes reliable automatic spindle detection, making up for the limitations of traditional methods.
Smart Images

Figure CN114680833B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital signal processing, and in particular to a method, device, electronic equipment and storage medium for detecting sleep spindles. Background Art
[0002] Sleep spindles are generated in the thalamocortical system and are one of the most important sleep events in the microstructure of sleep. The American Academy of Sleep Medicine (AASM) believes that sleep spindles occur during the NREM stage of non-rapid eye movement sleep and are a sinusoidal spindle-shaped EEG signal phenomenon with a duration of at least 0.5 seconds and a frequency distribution between 11-16 Hz. Throughout life, the density, number and amplitude of spindle events have been shown to be related to general cognitive ability, sleep quality, and learning and memory. Experts from the Research Center at Stockholm University in Sweden said: "Spindle waves can effectively inhibit the interference of external stimuli on sleep. The thalamus produces spindle waves to prevent external noise from interfering with the sleeping brain. Once spindle waves appear, sound signals cannot be transmitted to the auditory cortex. Spindle waves may be used as a physiological indicator to measure sleep quality." In addition, spindle activity in the same frequency range can characterize the degree of consciousness damage in patients with disorders of consciousness (DOC), so it can also be used as one of the indicators to distinguish patients with disorders of consciousness, that is, as an indicator to distinguish patients in minimally conscious state (MCS) and vegetative patients or unresponsive syndrome (VS / UWS). In addition, spindle wave disorder is an important symptom of many early neurological diseases; more typical mental illnesses caused by spindle abnormalities include Parkinson's disease, Alzheimer's disease, and epilepsy. Therefore, spindles are considered to be biomarkers of brain health and have important significance in assisting clinical diagnosis and prognosis.
[0003] The traditional detection method relies on manual visual annotation of spindle activity in sleep data. Although manual assessment of sleep spindles has been standardized by the AASM, manual detection is still a time-consuming, labor-intensive and costly task. In addition, disagreements may arise if multiple experts make the assessment together. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a method, device, electronic device and storage medium for detecting sleep spindles, to improve the reliability and objectivity of accurate detection of spindle activity, to make up for the limitations of manual detection of spindle events, and to help achieve the goal of a reliable and effective automatic spindle detector.
[0005] In a first aspect, the present invention provides a method for detecting sleep spindles, comprising the following steps:
[0006] Acquiring sleep data to be detected, wherein the sleep data includes a plurality of EEG signals;
[0007] Filtering the sleep data to obtain an EEG signal of a specific frequency;
[0008] The MP algorithm is used to process the EEG signal of the specific frequency to identify candidate waves, so as to obtain candidate waves of sleep spindles;
[0009] Extracting the features of the candidate wave and normalizing the features to obtain a feature vector of the candidate wave;
[0010] The feature vector is input into the trained SVM classifier to obtain a classification result of whether each candidate wave is a sleep spindle wave.
[0011] Furthermore, the training step of the SVM classifier includes:
[0012] Obtaining an original data set, wherein the data set includes a plurality of EEG signals and a true label corresponding to each signal, wherein the label corresponding to the sleep spindle is 1;
[0013] Performing filtering on the original data set to obtain an EEG signal of a specific frequency;
[0014] The MP algorithm is used to process the EEG signal of the specific frequency to identify candidate waves, so as to obtain candidate waves of sleep spindles;
[0015] Extracting the features of the candidate wave and normalizing the features to obtain a feature vector of the candidate wave;
[0016] The feature vector and the true label are input into the SVM classifier for training to obtain a trained SVM classifier.
[0017] Furthermore, the sleep data is filtered, and / or the original data set is filtered within a filtering range of 11-16 Hz.
[0018] Furthermore, the MP algorithm is used to process the EEG signal of the specific frequency to identify candidate waves, including:
[0019] Create dictionary I using the following formula:
[0020]
[0021] Among them, σ i is the Gaussian kernel width, f i is the frequency, which increases gradually by 0.1 from 11 to 16, and λ is the normalization constant;
[0022] Use the following formula to iteratively select dictionary atoms that are suitable for the current signal structure:
[0023]
[0024] Where y is the EEG signal of the specific frequency, r0 is the initial residual, and β is the current atomic I j and residual r i-1 The maximum inner product after taking the absolute value, I j represents the jth atom in the dictionary, r i is the residual;
[0025] Use the following formula to perform signal scaling on the data ys at the corresponding y position at each iteration:
[0026] ys=abs(ys. / prctile(abs(ys),90))
[0027] Among them, ys is the maximum atomic position I selected each time j + The position of the relevant subset that produces the maximum inner product β n:m β n:m It is obtained by moving forward and backward 3*fs / 2 positions with β as the center; fs is the data sampling frequency;
[0028] When ys is greater than the threshold value corresponding to each cycle (0.0001:0.001:0.01:0.1:1), the current EEG signal y of the specific frequency is determined to be a candidate wave.
[0029] Furthermore, the feature of the candidate wave is extracted, including at least one of the following:
[0030] RMS μ RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM .
[0031] Further, extracting the characteristics of the candidate wave includes:
[0032] Use the following formula to calculate the root mean square μ of the candidate wave respectively. RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM :
[0033]
[0034]
[0035]
[0036] Where N represents the length of sampling points in each spindle wave data, x i represents the sampling point in each spindle data, Represents the average value of the sampling points in the spindle data.
[0037] Furthermore, before extracting the features of the candidate waves, the candidate waves are post-processed, and the post-processing includes at least one of the following:
[0038] Merging the candidate waves whose time interval is less than 0.2 s;
[0039] Eliminate the candidate waves whose duration is less than 0.5s;
[0040] The candidate waves with a duration exceeding 3.0 s are truncated to 3.0 s.
[0041] In a second aspect, the present invention further provides a device for detecting sleep spindles, comprising:
[0042] A sleep data acquisition module, used to acquire sleep data to be detected, wherein the sleep data includes a variety of EEG signals;
[0043] A filtering module, used for filtering the sleep data to obtain an EEG signal of a specific frequency;
[0044] A candidate wave identification module is used to use the MP algorithm to identify candidate waves of the EEG signal of the specific frequency to obtain candidate waves of sleep spindles;
[0045] A feature extraction module, used to extract the features of the candidate wave and normalize the features to obtain a feature vector of the candidate wave;
[0046] The classification module is used to input the feature vector into the trained SVM classifier to obtain a classification result of whether each candidate wave is a sleep spindle wave.
[0047] In a third aspect, the present invention further provides an electronic device, comprising:
[0048] at least one memory and at least one processor;
[0049] The memory is used to store one or more programs;
[0050] When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of a method for detecting sleep spindles as described in any one of the first aspects of the present invention.
[0051] In a fourth aspect, the present invention further provides a computer-readable storage medium,
[0052] The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a method for detecting sleep spindles as described in any one of the first aspects of the present invention are implemented.
[0053] The present invention provides a method, device, electronic device and storage medium for detecting sleep spindles, which use public data sets to verify, identify and resolve the differences between automatic and manual evaluation of spindles. It can improve the reliability and objectivity of accurate detection of spindle activity, make up for the limitations of manual detection of spindle events, and help achieve the goal of a reliable and effective automatic spindle detector.
[0054] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of a process for detecting sleep spindles provided by the present invention;
[0056] Figure 2 The spindle waves detected in a 30 s data segment in one embodiment of the present invention;
[0057] Figure 3 A schematic structural diagram of a device for detecting sleep spindles provided by the present invention. DETAILED DESCRIPTION
[0058] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0059] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0060] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0061] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0062] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0063] In view of the problems in the background technology, the present application provides a method for detecting sleep spindles, such as Figure 1 As shown, the method comprises the following steps:
[0064] S01: Acquire sleep data to be detected, wherein the sleep data includes a variety of EEG signals.
[0065] In a preferred embodiment, in order to ensure that the sampling frequency of the data is consistent, it needs to be resampled and then the obtained data is placed in a .mat file in sequence.
[0066] S02: Filter the sleep data to obtain an EEG signal of a specific frequency.
[0067] The frequency of spindle waves is distributed between 11-16 Hz. Therefore, in a preferred embodiment, the data eeg_data is filtered using a kaiserord window function, and the filtering range is 11-16 Hz to obtain eeg_s.
[0068] S03: Using the MP algorithm to process the EEG signal of the specific frequency to identify candidate waves, and obtain candidate waves of sleep spindles.
[0069] A MP algorithm with adaptive parameters was used to discover a stable number of sleep spindle candidates, keeping the number of real sleep spindles as high as possible to maximize the true positive TP.
[0070] The core idea of MP algorithm to realize sparse representation of signals is:
[0071] Traverse each atom in the dictionary, find the atom closest to the signal structure according to the principle of maximizing the inner product, and use it as the current matching atom. After removing components close to the atom from the signal, calculate the inner product of the remaining part with other atoms to find atoms with similar structures. Stop iteration until the remaining components meet the given conditions.
[0072] In a specific embodiment, the MP algorithm is used to identify candidate waves of the EEG signal of the specific frequency, which specifically includes the following sub-steps:
[0073] Considering that the waveform oscillation of EEG data is similar to sine and cosine, the dictionary function adopts Gaussian function and uses the following formula to create dictionary I:
[0074]
[0075] Among them, σ i is the Gaussian kernel width, f i is the frequency, which increases gradually by 0.1 from 11 to 16, and λ is the normalization constant.
[0076] In MP, each iteration selects dictionary atoms that are suitable for the current signal structure. This atom selection is based on the maximum inner product between the remaining atoms and the signal residual. The residual is calculated from this. The number of iterations is determined by the number of dictionary atoms. The dictionary atoms that are suitable for the current signal structure are iteratively selected using the following formula:
[0077]
[0078] Where y is the EEG signal of the specific frequency, r0 is the initial residual, and β is the current atomic I j and residual r i-1 The maximum inner product after taking the absolute value, I j represents the jth atom in the dictionary, r i is the residual.
[0079] Use the following formula to perform signal scaling on the data ys at the corresponding y position at each iteration:
[0080] ys=abs(ys. / prctile(abs(ys),90))
[0081] Among them, ys is the maximum atomic position I selected each time j + The position of the relevant subset that produces the maximum inner product β n:m β n:m It is obtained by taking β as the center and moving forward and backward 3*fs / 2 positions; fs is the data sampling frequency.
[0082] When ys is greater than the threshold value corresponding to each cycle (0.0001:0.001:0.01:0.1:1), the current EEG signal y of the specific frequency is determined to be a candidate wave.
[0083] In a more preferred embodiment, after identifying the candidate wave, the detected candidate wave is processed. This includes: merging spindles with a time gap of less than 0.2s. If the duration is less than 0.5s, it will be eliminated. The detected spindles with a duration of more than 3.0s are truncated to 3.0s. detEvents = zeros (length (eeg_s), 1) stores the candidate wave bands, sets the candidate wave data segment to 1, and sets the non-candidate wave data segment to 0.
[0084] S04: Extract the features of the candidate wave, and normalize the features to obtain a feature vector of the candidate wave.
[0085] In a preferred embodiment, after searching various feature documents of EEG signals, the following features are selected to represent the feature differences related to the sleep spindle data segment:
[0086] RMS μ RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM .
[0087] Preferably, the following formulas are used to calculate the root mean square μ of the candidate waves: RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM :
[0088]
[0089]
[0090]
[0091] Where N represents the length of sampling points in each spindle wave data, x i represents the sampling point in each spindle data, Represents the average value of the sampling points in the spindle data.
[0092] The features extracted above are normalized and formed into feature vectors.
[0093] S05: Input the feature vector into the trained SVM classifier to obtain a classification result of whether each candidate wave is a sleep spindle wave.
[0094] In a specific embodiment, the spindle waves detected in a 30 s data segment are as follows: Figure 2shown.
[0095] In another preferred embodiment, the training step of the SVM classifier includes:
[0096] S11: Obtain an original data set, where the data set includes multiple EEG signals and a true label corresponding to each signal, wherein the label corresponding to the sleep spindle is 1.
[0097] In a preferred embodiment, the original data set and the corresponding true labels are stored in the data.mat file. This mat file contains two columns of data. The first column is the EEG data eeg_data, and the second column is the binary data eeg_expert. Each binary number corresponds to a sampling point of eeg_data, indicating a spindle wave marked by an expert, where 1 represents a spindle wave.
[0098] S12: Filter the original data set to obtain an EEG signal of a specific frequency.
[0099] Preferably, the filtering range for filtering the original data set is 11-16 Hz.
[0100] S13: using the MP algorithm to perform candidate wave identification processing on the EEG signal of the specific frequency to obtain candidate waves of sleep spindles.
[0101] The MP algorithm is the same as that in step S03 and will not be described again here.
[0102] S14: extracting the features of the candidate wave, and normalizing the features to obtain a feature vector of the candidate wave.
[0103] The feature extraction is the same as step S04 and will not be repeated here.
[0104] S15: Input the feature vector and the true label into the SVM classifier for training to obtain a trained SVM classifier.
[0105] The SVM algorithm is a supervised data mining algorithm. It is a binary classification algorithm (it can also be used for multi-classification after modification) and has obvious advantages in nonlinear classification.
[0106] Training results of the SVM algorithm: After the model is successfully trained, the subsequent vectors are classified according to the support vector (a set of vectors);
[0107] Input and output of the SVM algorithm: The model input is a bunch of vectors (usually floating point numbers between -1 and 1) and the classification labels to which these vectors belong (usually represented by -1, 1);
[0108] The model training of the SVM algorithm requires adjustment of the kernel function, kernel function parameters, slack variables, etc., depending on the implementation of the algorithm.
[0109] The trained SVM classifier obtains a fixed kernel function, kernel function parameters, and slack variables. For the vector input again, it can output the classification label corresponding to the vector.
[0110] The present application also provides a device for detecting sleep spindles. Figure 3 As shown, the device 400 for detecting sleep spindles includes:
[0111] A sleep data acquisition module 401 is used to acquire sleep data to be detected, wherein the sleep data includes a variety of EEG signals;
[0112] A filtering module 402 is used to filter the sleep data to obtain an EEG signal of a specific frequency;
[0113] The candidate wave identification module 403 is used to use the MP algorithm to identify candidate waves of the EEG signal of the specific frequency to obtain candidate waves of sleep spindles;
[0114] A feature extraction module 404 is used to extract the features of the candidate wave and normalize the features to obtain a feature vector of the candidate wave;
[0115] The classification module 405 is used to input the feature vector into the trained SVM classifier to obtain a classification result of whether each candidate wave is a sleep spindle.
[0116] Preferably, the training step of the SVM classifier includes:
[0117] Obtaining an original data set, wherein the data set includes a plurality of EEG signals and a true label corresponding to each signal, wherein the label corresponding to the sleep spindle is 1;
[0118] Performing filtering on the original data set to obtain an EEG signal of a specific frequency;
[0119] The MP algorithm is used to process the EEG signal of the specific frequency to identify candidate waves, so as to obtain candidate waves of sleep spindles;
[0120] Extracting the features of the candidate wave and normalizing the features to obtain a feature vector of the candidate wave;
[0121] The feature vector and the true label are input into the SVM classifier for training to obtain a trained SVM classifier.
[0122] Preferably, the sleep data is filtered and / or the original data set is filtered within a filtering range of 11-16 Hz.
[0123] Preferably, the candidate wave identification module includes:
[0124] The dictionary creation unit is used to create a dictionary I using the following formula:
[0125]
[0126] Among them, σ i is the Gaussian kernel width, f i is the frequency, which increases gradually by 0.1 from 11 to 16, and λ is the normalization constant;
[0127] The iterative selection unit is used to iteratively select dictionary atoms suitable for the current signal structure using the following formula:
[0128]
[0129] Where y is the EEG signal of the specific frequency, r0 is the initial residual, and β is the current atomic I j and residual r i-1 The maximum inner product after taking the absolute value, I j represents the jth atom in the dictionary, r i is the residual;
[0130] The signal scaling unit is used to perform signal scaling processing on the data ys at the corresponding position y at each iteration using the following formula:
[0131] ys=abs(ys. / prctile(abs(ys),90))
[0132] Among them, ys is the maximum atomic position I selected each time j + The position of the relevant subset that produces the maximum inner product β n:m β n:m It is obtained by moving forward and backward 3*fs / 2 positions with β as the center; fs is the data sampling frequency;
[0133] The candidate wave determination unit is used to determine that the current EEG signal y of the specific frequency is a candidate wave when ys is greater than a threshold value (0.0001:0.001:0.01:0.1:1) corresponding to each cycle.
[0134] Preferably, extracting the characteristics of the candidate wave includes at least one of the following:
[0135] RMS μ RMS , standard deviation μ stdand the logarithmic root mean μ of the sequential changes LRM .
[0136] Preferably, the feature extraction module includes:
[0137] Use the following formula to calculate the root mean square μ of the candidate wave respectively. RMs , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM :
[0138]
[0139]
[0140]
[0141] Where N represents the length of sampling points in each spindle wave data, x i represents the sampling point in each spindle data, Represents the average value of the sampling points in the spindle data.
[0142] Preferably, the method further comprises a candidate wave post-processing unit, which is used to perform post-processing on the candidate wave before extracting the characteristics of the candidate wave, and the post-processing includes at least one of the following:
[0143] Merging the candidate waves whose time interval is less than 0.2 s;
[0144] Eliminate the candidate waves whose duration is less than 0.5s;
[0145] The candidate waves with a duration exceeding 3.0 s are truncated to 3.0 s.
[0146] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. 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. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0147] The present application also provides an electronic device, including:
[0148] at least one memory and at least one processor;
[0149] The memory is used to store one or more programs;
[0150] When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of the method for detecting sleep spindles as described above.
[0151] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the components described as separate parts may or may not be physically separated, and the parts 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 disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0152] The present application also provides a computer-readable storage medium.
[0153] The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting sleep spindles as described above are implemented.
[0154] Computer usable storage media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0155] The present invention provides a method, device, electronic device and storage medium for detecting sleep spindles, which use public data sets to verify, identify and resolve the differences between automatic and manual evaluation of spindles. It can improve the reliability and objectivity of accurate detection of spindle activity, make up for the limitations of manual detection of spindle events, and help achieve the goal of a reliable and effective automatic spindle detector.
[0156] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for detecting sleep spindles, characterized in that: The following steps are involved: Acquiring sleep data to be detected, wherein the sleep data includes a plurality of EEG signals; Filtering the sleep data to obtain an EEG signal of a specific frequency; The MP algorithm is used to identify candidate waves of the EEG signal of the specific frequency to obtain candidate waves of sleep spindles; the MP algorithm is used to identify candidate waves of the EEG signal of the specific frequency, including: Create the dictionary I using the following formula: Among them, σ i is the Gaussian kernel width, f i is the frequency, which increases gradually by 0.1 from 11 to 16, and λ is the normalization constant; Use the following formula to iteratively select dictionary atoms that are suitable for the current signal structure: Where y is the EEG signal of the specific frequency, r0 is the initial residual, and β is the current atomic I j and residual r i-1 The maximum inner product after taking the absolute value, I j represents the jth atom in the dictionary, r i is the residual; Use the following formula to perform signal scaling on the data ys at the corresponding y position at each iteration: ys=abs(ys. / prctile(abs(ys),90)) Among them, ys is the maximum atomic position I selected each time j + The position of the relevant subset that produces the maximum inner product β n : m β n : m It is obtained by taking β as the center and moving forward and backward 3*fs / 2 positions; fs is the data sampling frequency; When ys is greater than the threshold value (0.0001:0.001:0.01:0.1:1) corresponding to each cycle, the EEG signal y of the current specific frequency is determined to be a candidate wave; Extract the characteristics of the candidate wave, and normalize the characteristics to obtain the characteristic vector of the candidate wave; extract the characteristics of the candidate wave, including at least one of the following: root mean square μ RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM ; Input the feature vector into the trained SVM classifier to obtain the classification result of whether each candidate wave is a sleep spindle wave.
2. A method for detecting sleep spindles according to claim 1, characterized in that: The training steps of the SVM classifier include: Obtaining an original data set, wherein the data set includes a plurality of EEG signals and a true label corresponding to each signal, wherein the label corresponding to the sleep spindle is 1; Performing filtering on the original data set to obtain an EEG signal of a specific frequency; The MP algorithm is used to process the EEG signal of the specific frequency to identify candidate waves, so as to obtain candidate waves of sleep spindles; Extracting the features of the candidate wave and normalizing the features to obtain a feature vector of the candidate wave; The feature vector and the true label are input into the SVM classifier for training to obtain a trained SVM classifier.
3. A method for detecting sleep spindles according to claim 2, characterized in that: The sleep data is filtered, and / or the original data set is filtered, with a filtering range of 11-16 Hz.
4. The method for detecting sleep spindles according to claim 1, characterized in that: Extracting the characteristics of the candidate wave includes: Use the following formula to calculate the root mean square μ of the candidate wave respectively. RMS , standard deviation μ std and the logarithmic root mean μ of the sequential changes LRM : Where N represents the length of sampling points in each spindle wave data, x i represents the sampling point in each spindle data, Represents the average value of the sampling points in the spindle data.
5. The method for detecting sleep spindles according to claim 4, characterized in that: Before extracting the features of the candidate waves, the candidate waves are post-processed, and the post-processing includes at least one of the following: Merging the candidate waves whose time interval is less than 0.2 s; Eliminate the candidate waves whose duration is less than 0.5s; The candidate waves with a duration exceeding 3.0 s are truncated to 3.0 s.
6. A device for detecting sleep spindles for executing the method for detecting sleep spindles according to any one of claims 1 to 5, characterized in that: include: A sleep data acquisition module, used to acquire sleep data to be detected, wherein the sleep data includes a variety of EEG signals; A filtering module, used for filtering the sleep data to obtain an EEG signal of a specific frequency; A candidate wave identification module is used to use the MP algorithm to identify candidate waves of the EEG signal of the specific frequency to obtain candidate waves of sleep spindles; A feature extraction module, used to extract the features of the candidate wave and normalize the features to obtain a feature vector of the candidate wave; The classification module is used to input the feature vector into the trained SVM classifier to obtain a classification result of whether each candidate wave is a sleep spindle wave.
7. An electronic device, characterized in that: include: at least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of a method for detecting sleep spindles as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a method for detecting sleep spindles according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Sleep spindle wave detection method based on deep learning
CN113397562A
Brain-like algorithm for sleep staging by applying prefrontal lobe single-channel electroencephalogram signals
CN114081439A