CN114668373A - Sleep stage classification method and system based on dynamic modal decomposition - Google Patents

Sleep stage classification method and system based on dynamic modal decomposition Download PDF

Info

Publication number
CN114668373A
CN114668373A CN202210600499.4A CN202210600499A CN114668373A CN 114668373 A CN114668373 A CN 114668373A CN 202210600499 A CN202210600499 A CN 202210600499A CN 114668373 A CN114668373 A CN 114668373A
Authority
CN
China
Prior art keywords
matrix
signal
signals
characteristic
sleep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210600499.4A
Other languages
Chinese (zh)
Inventor
刘佳琦
凌永权
李瑞磷
刘庆
林政佳
陈斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202210600499.4A priority Critical patent/CN114668373A/en
Publication of CN114668373A publication Critical patent/CN114668373A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • Public Health (AREA)
  • Pathology (AREA)
  • Veterinary Medicine (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Artificial Intelligence (AREA)
  • Psychology (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Signal Processing (AREA)
  • Ophthalmology & Optometry (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention provides a sleep stage classification method and a system based on dynamic modal decomposition, which relate to the technical field of sleep classification identification, and are characterized in that electroencephalogram signals and eye movement signals are adopted during sleep stage classification, the electroencephalogram signals are combined with horizontal eye signals to more accurately identify different sleep stages, data enhancement processing is carried out on the electroencephalogram signals and the eye movement signals after the electroencephalogram signals and the eye movement signals are collected, rank deficiency of an electroencephalogram signal matrix and an eye movement signal matrix is avoided, then the dynamic modal decomposition is carried out on signals under multiple channels and multiple sampling points by considering that the development processes of the electroencephalogram signals and the eye movement signals are all non-steady and non-linear random processes, the spatial domain and time domain characteristics of the signals can be simultaneously reflected, the effect of classification identification of subsequent sleep stages is improved, original signals do not need to be completely reconstructed, and the dynamic modal decomposition is completed, and corresponding characteristic power spectrums are extracted only by using the modes after dynamic mode decomposition, so that the characteristic extraction is simple and the identification and classification effects are good.

Description

Sleep stage classification method and system based on dynamic modal decomposition
Technical Field
The invention relates to the technical field of sleep classification identification, in particular to a sleep stage classification method and system based on dynamic modal decomposition.
Background
Modern people's rhythm of life is faster and faster, along with the acceleration of rhythm of life, people's work and life pressure are also bigger and bigger, and the pressure accessible nerve and endocrine system's activity disorder disturbs the sleep, reduces the sleep quality, and a person's sleep quality has reflected its nervous system's state to a certain extent, consequently, classifies a person's sleep stage to assess its sleep quality, to screening the dyssomnia person and provide the guide of intervening in earlier stage for the dyssomnia person has very important meaning.
Except the waking stage, the sleep of human body is generally divided into two stages, the first stage is a non-rapid eye movement stage, the sleep in the stage is divided into four stages, the sleep 1 stage is a sleep latency stage, the sleep 2 stage is a light sleep stage, the sleep 3 stage and the sleep 4 stage are deep sleep stages, the second stage is a rapid eye movement stage, the eyes of the human body rotate left and right rapidly during the rapid eye movement stage, dreams are made during the sleep in the stage, and the sleep stage classification is also directed at the stages.
The human body signal captured by various monitoring devices is a weak bioelectric signal, such as an Electroencephalogram (EEG), an Electrooculography (EOG), an Electrocardiography (ECG), an Electromyography (EMG), and other signals, and the bioelectric signal is significant for scientific research on sleep stage classification. Currently, there are various feature extraction methods and deep neural network learning methods based on multi-channel electroencephalograms or single-channel electroencephalograms as methods for classifying sleep stages. For example, in the prior art, a sleep electroencephalogram detection method is disclosed, which comprises the steps of firstly, using empirical mode decomposition to collect decomposed electroencephalogram signal fragments, then extracting the characteristics of a statistical model from the obtained intrinsic mode functions, carrying out statistical analysis to determine the effectiveness of the selected characteristics, and finally, adopting random undersampling classification to realize sleep segmentation analysis, wherein the scheme adopts empirical mode decomposition to carry out signal self-adaptive processing, and adaptively decomposes the signals into a series of Intrinsic Mode Functions (IMF) to extract characteristics, reduce noise and the like, and can also obtain reconstructed signals by adding the intrinsic mode functions and residual error functions, but on one hand, the traditional mode of empirical mode decomposition is highly dependent on original signals and has no strict frequency selection characteristics, and the bandwidth of component intrinsic mode functions of empirical mode decomposition only depends on the signals, and does not accord with the bandwidth standards of all wave bands of an electroencephalogram, the problem of mode aliasing also exists, the accuracy of a sleep stage classification result is influenced, the reconstruction after empirical mode decomposition is the addition of a series of mode functions and residual components, and the reconstruction method is not a feasible reconstruction method for signals after the sampling rate is reduced; on the other hand, the electroencephalogram characteristics extracted by single electroencephalogram signals are very similar, and the electroencephalogram characteristics are difficult to identify and poor in identification effect when the electroencephalogram signals are classified in sleep stages.
The deep neural network learning method is characterized in that signal features are extracted through a deep learning model, the method is excellent in various classification tasks, but as a black box model, the self-learning rate of signals needs to be adjusted in a self-trial mode, different model parameters need to be trained for different signal types, the calculation amount is large, and generality and interpretability are generally absent.
Disclosure of Invention
In order to solve the problem of poor classification and identification effects of the existing sleep stage classification method, the invention provides a sleep stage classification method and system based on dynamic modal decomposition.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a method of sleep stage classification based on dynamic modal decomposition, the method comprising the steps of:
s1, collecting electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of a normal crowd to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
s2, matrix enhancement operation is respectively carried out on the electroencephalogram signal matrix and the electro-oculogram signal matrix to obtain respective signal snapshot sequences;
s3, carrying out splitting association preprocessing on each signal snapshot sequence to obtain a linear association operator of each signal snapshot sequence;
s4, combining a linear correlation operator, and performing dynamic modal decomposition on each signal snapshot sequence to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
s5, based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, obtaining the frequency and the amplitude of each mode, carrying out box packaging on the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
s6, labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, wherein each characteristic power spectral vector corresponds to one sleep stage label;
s7, constructing a random forest model, taking the characteristic power spectrum as an input variable of the random forest model, training and testing the random forest model to obtain a final random forest model;
s8, determining the crowd to be tested, collecting sleep electroencephalogram signals and electro-oculogram signals of the crowd to be tested in an S1 mode, executing the processing procedures of the steps S2-S5 on the electroencephalogram signals and the electro-oculogram signals of each person, and finally inputting a final random forest model to classify sleep stages.
The technical scheme is to better classify the sleep stages on the whole, when the sleep stages are classified, electroencephalogram signals and eye movement signals are adopted, the electroencephalogram signals and the horizontal eye movement signals can be combined to more accurately identify different sleep stages, after the electroencephalogram signals and the eye movement signals are collected, before dynamic modal decomposition is started, data enhancement processing is carried out on the electroencephalogram signals and the eye movement signals, rank deficiency of an electroencephalogram signal matrix and an eye movement signal matrix is avoided, the electroencephalogram signals and the eye movement signals are considered to be non-stable and non-linear random processes, dynamic modal decomposition is carried out on signals under multiple channels and multiple sampling points, the spatial domain and time domain characteristics of the signals can be simultaneously reflected, the effect of subsequent classification identification is improved, original signals do not need to be completely reconstructed, dynamic modal decomposition is completed, and corresponding characteristic power spectrums are extracted only by using the modes after the dynamic modal decomposition, the feature extraction is simple.
Preferably, in step S1, the different stages in the sleep process include: a waking stage, a sleep 1 stage, a sleep 2 stage, a sleep 3 stage, a sleep 4 stage and a rapid eye movement stage; when collecting EEG signal and eye electric signal, selecting multi-channel EEG signal and single-channel horizontal eye electric signal, and utilizing
Figure 518215DEST_PATH_IMAGE001
Representing the number of channels of an electroencephalogram signal or an electrooculogram signal, using
Figure 904197DEST_PATH_IMAGE002
Represents a sampling rate satisfying:
Figure 11831DEST_PATH_IMAGE003
is provided with
Figure 875881DEST_PATH_IMAGE004
Representing the electroencephalogram signal matrix or the electro-oculogram signal matrix formed as described at S1, wherein R represents a real number space,
Figure 690254DEST_PATH_IMAGE005
then, then
Figure 840612DEST_PATH_IMAGE004
Is an underdetermined matrix.
Preferably, in step S2, for the electroencephalogram signal matrix or the electro-oculogram signal matrix
Figure 107646DEST_PATH_IMAGE004
Let us order
Figure 900021DEST_PATH_IMAGE006
Let us order
Figure 568900DEST_PATH_IMAGE007
The number of sliding cycles is equal to that of each cycle
Figure 562264DEST_PATH_IMAGE008
Arranged as windows and stepped to the right
Figure 519855DEST_PATH_IMAGE009
Sliding in sequence, wherein the sliding cycle times are as follows:
Figure 256867DEST_PATH_IMAGE010
through
Figure 108149DEST_PATH_IMAGE007
Iterative by a sub-loop, formed by a matrix
Figure 537993DEST_PATH_IMAGE005
Form a matrix
Figure 779618DEST_PATH_IMAGE011
Figure 648217DEST_PATH_IMAGE012
To represent
Figure 291688DEST_PATH_IMAGE004
And performing matrix enhancement operation to form an electroencephalogram signal matrix or an electro-oculogram signal matrix.
In this case, it is considered that the sampling rate is usually greater than the channel, and when the number of channels is less than the sampling rate, the electroencephalogram signal matrix or the electro-oculogram signal matrix is an underdetermined matrix, and if the dynamic modal decomposition is directly performed, the problem of rank deficiency is easily caused, and the data enhancement operation is performed to avoid the problem.
Preferably, let
Figure 626855DEST_PATH_IMAGE013
Figure 559038DEST_PATH_IMAGE014
Matrix of rules
Figure 637853DEST_PATH_IMAGE011
Is shown as
Figure 729306DEST_PATH_IMAGE015
Is a
Figure 500953DEST_PATH_IMAGE016
Number of channels and
Figure 451591DEST_PATH_IMAGE017
+1 sampling points, a matrix of
Figure 664922DEST_PATH_IMAGE018
For a group of snapshot sequences, the group of snapshot sequences is split into two adjacent groups of snapshot sequences, respectively denoted as first snapshot sequence
Figure 17406DEST_PATH_IMAGE019
And a second snapshot sequence
Figure 959954DEST_PATH_IMAGE020
xThe representation of the signal is shown as,nwhich represents the number of sample points,
Figure 866731DEST_PATH_IMAGE019
and
Figure 287348DEST_PATH_IMAGE020
satisfies the following conditions:
Figure 87813DEST_PATH_IMAGE021
wherein the content of the first and second substances,Aa linear correlation operator is represented, and a linear correlation operator,Athe calculation of (A) satisfies:
Figure 201263DEST_PATH_IMAGE022
wherein the content of the first and second substances,
Figure 126494DEST_PATH_IMAGE023
represents the Moore-Penrose pseudo-inverse.
Preferably, in step S4, the process of performing dynamic modal decomposition on each signal snapshot sequence by combining with the linear correlation operator to obtain a modal and a corresponding feature value of the dynamic modal decomposition of the signal snapshot sequence is as follows:
s41, for the first snapshot sequenceXPerforming truncated singular value decomposition to obtain:
Figure 819643DEST_PATH_IMAGE024
(ii) a Wherein the content of the first and second substances,
Figure 881140DEST_PATH_IMAGE025
represents the transpose of the conjugate,
Figure 165491DEST_PATH_IMAGE026
is a diagonal matrix of the singular values,
Figure 905914DEST_PATH_IMAGE027
Figure 933913DEST_PATH_IMAGE028
Figure 443391DEST_PATH_IMAGE029
Figure 633064DEST_PATH_IMAGE030
is toXThe rank of the approximation is decomposed by the singular values of (c),
Figure 532887DEST_PATH_IMAGE031
is a left singular vector matrix, each column is orthogonal,
Figure 567839DEST_PATH_IMAGE032
is a right singular vector matrix, each column being orthogonal to each other, so
Figure 869507DEST_PATH_IMAGE033
Figure 230082DEST_PATH_IMAGE034
Figure 945097DEST_PATH_IMAGE035
Representing an identity matrix;
s42, combining S3 with linear correlation operatorAAnd S41 is applied to the first snapshot sequenceXPerforming a truncated singular value decomposition process to obtain a linear correlation operatorAThe expression of (a) is:
Figure 314898DEST_PATH_IMAGE036
computing linear correlation operatorsAIn thatr×rProjection of space
Figure 798969DEST_PATH_IMAGE037
Namely, calculating a low-dimensional approximate linear model of the dynamic process, wherein the calculation expression is as follows:
Figure 596024DEST_PATH_IMAGE038
s43. pair
Figure 204860DEST_PATH_IMAGE037
And (3) carrying out characteristic value decomposition, wherein the expression satisfies the following conditions:
Figure 581614DEST_PATH_IMAGE039
wherein, the first and the second end of the pipe are connected with each other,Win the form of a matrix of a plurality of,Wthe column of (a) is a feature vector,
Figure 592296DEST_PATH_IMAGE040
representing a diagonal matrix, each diagonal element being
Figure 560252DEST_PATH_IMAGE041
Characteristic value corresponding to the column of
Figure 249859DEST_PATH_IMAGE042
S44, passing throughWAnd
Figure 961463DEST_PATH_IMAGE040
reconstructionAThe characteristic value decomposition of (2) satisfies the following conditions:
Figure 826651DEST_PATH_IMAGE043
at this time, the process of the present invention,
Figure 293404DEST_PATH_IMAGE040
to representAA matrix of eigenvalues of;
Figure 876833DEST_PATH_IMAGE044
to representAIs a feature vector ofADynamic modal decomposition mode of (1), setting feature vector
Figure 595390DEST_PATH_IMAGE044
Is represented by any column of
Figure 580663DEST_PATH_IMAGE045
iRepresenting the column times, each column
Figure 890422DEST_PATH_IMAGE045
A spatial mode decomposed for one dynamic mode of the first snapshot sequence and corresponding to the corresponding characteristic value
Figure 303691DEST_PATH_IMAGE046
The dynamic modal decomposition does not need to accurately decompose a highly complex system into respective coherent space-time structural equations, but adopts superposition of a plurality of dynamic modal decomposition DMD modes which increase, attenuate and oscillate along with time to solve an approximate system, the development processes of electroencephalogram signals and electro-oculogram signals are non-stable and non-linear random processes, and the linear method based on singular value decomposition, namely the dynamic modal decomposition, can reflect the characteristics of a space domain and a time domain of the signals at the same time and improve the accuracy of the classification result of a subsequent sleep stage.
Preferably, in step S5, the process of obtaining the frequency and amplitude of each mode based on the mode of the signal snapshot sequence dynamic mode decomposition and the corresponding characteristic value is as follows:
s51, linear correlation operator is pairedAIn thatr×rProjection of space
Figure 357097DEST_PATH_IMAGE037
Scaling to fit the band characteristics of the bioelectricity signals and the bioelectricity signals, wherein the scaling expression is as follows:
Figure 196877DEST_PATH_IMAGE047
wherein the content of the first and second substances,
Figure 5433DEST_PATH_IMAGE048
is the equivalent operator after the scaling so that,
Figure 297875DEST_PATH_IMAGE049
a matrix of singular values being diagonal;
s52, the equivalent operator after the zooming is carried out
Figure 623814DEST_PATH_IMAGE050
And (3) carrying out characteristic value decomposition, wherein the expression is as follows:
Figure 318100DEST_PATH_IMAGE051
wherein, the first and the second end of the pipe are connected with each other,Eform a result of
Figure 969661DEST_PATH_IMAGE050
Each column of the eigenvalue vector matrix of (1) is an eigenvalue vector;
s53, for each characteristic value
Figure 342874DEST_PATH_IMAGE046
Taking logarithm and normalizing to obtain normalized value
Figure 738083DEST_PATH_IMAGE052
The expression is:
Figure 286876DEST_PATH_IMAGE053
based on
Figure 843759DEST_PATH_IMAGE052
The frequency and amplitude of each mode are obtained and are respectively expressed as:
Figure 110793DEST_PATH_IMAGE054
Figure 309693DEST_PATH_IMAGE055
wherein the content of the first and second substances,f i the frequency is represented by a frequency-dependent variable,
Figure 40888DEST_PATH_IMAGE056
representing an amplitude;
Figure 299832DEST_PATH_IMAGE057
the representation takes the imaginary part operation.
In this case, the amount of the solvent to be used,
Figure 54161DEST_PATH_IMAGE046
the magnitude of (A) and the magnitude of the unit circle indicate the spatial mode of the dynamic modal decomposition
Figure 384648DEST_PATH_IMAGE045
The mode with the characteristic value just above the unit circle is relatively stable.
Figure 908033DEST_PATH_IMAGE046
Represents the oscillation frequency of the mode by taking
Figure 541140DEST_PATH_IMAGE058
Change the unit and normalize it, i.e. the logarithm of
Figure 517186DEST_PATH_IMAGE059
Therefore, it isω i Is the frequency of oscillation in units of cycles per second (Hz), and then using
Figure 57889DEST_PATH_IMAGE060
The oscillating frequency calculated by the DMD is correlated to the power spectrum of the data.
Preferably, the frequency and the amplitude are subjected to box packaging according to a frequency range to form a plurality of characteristic elements, when the characteristic elements form a plurality of characteristic power spectral vectors, the frequency range is 0-n/2, the amplitudes corresponding to each frequency in every four frequencies are summed, and then an average value is taken as one characteristic element; in the frequency range of 0-n/2, every 4Hz is a characteristic element packaging box, and the characteristic element packaging box is divided into n/8 characteristic element packaging boxes totally, then the first snapshot sequenceXThe n/8 characteristic elements form a characteristic power spectrum vector, the characteristic power spectrum of each mode of the bioelectricity signal is regarded as a characteristic power spectrum vector, all the characteristic power spectrum vectors form a characteristic power spectrum of the bioelectricity signal, and the characteristic elements of each characteristic power spectrum vector are identical through box-dividing packaging processing.
Preferably, in step S7, the random forest model is composed of a plurality of decision trees, the characteristic power spectra are proportionally divided into a training set and a testing set, the training set is used to train the random forest model, the testing set is input into the random forest model to test the random forest model, a predicted sleep classification label is output, the predicted sleep classification label is compared with a real label corresponding to each characteristic power spectrum based on the recall ratio TPR and the anti-class prediction accuracy TNR index, and when the recall ratio TPR meets a recall ratio threshold and the anti-class prediction accuracy TNR meets an anti-class prediction threshold, the final random forest model is determined.
Preferably, when the random forest model is partially trained by using the training set and the test set is input into the random forest model, a five-fold cross-validation method is adopted to eliminate the specificity of the data set.
The present application further provides a sleep stage classification system based on dynamic modal decomposition, the sleep stage classification system comprising:
the signal acquisition unit is used for acquiring electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of normal people to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
the data enhancement unit is used for carrying out matrix enhancement operation on the electroencephalogram signal matrix and the electro-oculogram signal matrix and respective signal snapshot sequences;
the splitting and associating preprocessing unit is used for splitting and associating preprocessing each signal snapshot sequence to obtain a linear association operator of each signal snapshot sequence;
the dynamic modal decomposition unit is used for performing dynamic modal decomposition on each signal snapshot sequence by combining a linear correlation operator to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
the characteristic power spectrum construction unit is used for solving the frequency and the amplitude of each mode based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, dividing and packaging the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
the labeling unit is used for labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, and each characteristic power spectral vector corresponds to one sleep stage label;
the random forest model building and training unit is used for building a random forest model, training and testing the random forest model by taking the characteristic power spectrum as an input variable of the random forest model to obtain a final random forest model;
and the acquisition, detection and classification unit is used for sequentially inputting sleep electroencephalogram signals and electro-ocular signals of the crowd to be detected into the data enhancement unit, the splitting and association preprocessing unit, the dynamic modal decomposition unit and the characteristic power spectrum construction unit for processing operation, and finally inputting a random forest model for sleep stage classification.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention provides a sleep stage classification method and a system based on dynamic modal decomposition, wherein during sleep stage classification, electroencephalogram signals and eye movement signals are adopted, the electroencephalogram signals and horizontal eye movement signals can be combined to more accurately identify different sleep stages, after the electroencephalogram signals and the eye movement signals are collected, before the dynamic modal decomposition is started, data enhancement processing is carried out on the electroencephalogram signals and the eye movement signals, rank deficiency of an electroencephalogram signal matrix and an eye movement signal matrix is avoided, then the development processes of the electroencephalogram signals and the eye movement signals are considered to be non-steady and non-linear random processes, dynamic modal decomposition is carried out on signals under multiple channels and multiple sampling points, the spatial domain and time domain characteristics of the signals can be simultaneously reflected, the effect of classification and identification of subsequent sleep stages is improved, original signals do not need to be completely reconstructed, and the dynamic modal decomposition is completed, the corresponding characteristic power spectrum is extracted only by using the mode after dynamic mode decomposition, the characteristic extraction is simple, and the identification and classification effect is good, so that the method has very important significance for screening the sleep disorder person and providing early intervention guidance for the sleep disorder person.
Drawings
Fig. 1 is a flowchart illustrating a sleep stage classification method based on dynamic modal decomposition according to embodiment 1 of the present invention;
FIG. 2 is a polysomnography of different sleep stages in volunteers of different sleep quality as set forth in example 1 of the present invention;
fig. 3 is a schematic diagram of a characteristic power spectrum extracted based on dynamic modal decomposition proposed in embodiment 2 of the present invention;
fig. 4 is a schematic diagram illustrating a power spectrum after FFT of each conventional channel and a power spectrum formed by superimposing all channels according to embodiment 2 of the present invention;
fig. 5 is a structural diagram of a sleep stage classification system based on dynamic modal decomposition according to embodiment 3 of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for better illustration of the present embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent actual sizes;
it will be understood by those skilled in the art that certain well-known descriptions of the figures may be omitted.
The technical solution of the present invention is further described with reference to the drawings and the embodiments.
The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent;
example 1
As shown in fig. 1, the present embodiment proposes a sleep stage classification method based on dynamic modal decomposition, referring to fig. 1, the method includes the following steps:
s1, collecting electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of a normal crowd to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
s2, matrix enhancement operation is respectively carried out on the electroencephalogram signal matrix and the electro-oculogram signal matrix to obtain respective signal snapshot sequences;
s3, carrying out splitting association preprocessing on each signal snapshot sequence to obtain a linear association operator of each signal snapshot sequence;
s4, combining a linear correlation operator, and performing dynamic modal decomposition on each signal snapshot sequence to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
s5, based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, obtaining the frequency and the amplitude of each mode, carrying out box packaging on the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
s6, labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, wherein each characteristic power spectral vector corresponds to one sleep stage label; in the embodiment, each sleep electroencephalogram signal and each sleep electrooculogram signal are labeled by a professional according to the international R & K standard, and the sleep stages are also divided according to the international R & K standard.
S7, constructing a random forest model, taking the characteristic power spectrum as an input variable of the random forest model, training and testing the random forest model, and obtaining a final random forest model;
s8, determining the crowd to be tested, collecting sleep electroencephalogram signals and electro-oculogram signals of the crowd to be tested in an S1 mode, executing the processing procedures of the steps S2-S5 on the electroencephalogram signals and the electro-oculogram signals of each person, and finally inputting a final random forest model to classify sleep stages.
Generally, in order to better classify sleep stages, when the method is implemented specifically, electroencephalogram signals and eye movement signals are sampled and utilized simultaneously, because electroencephalogram signal characteristics are very similar and are difficult to identify in some stages of sleep, the similar electroencephalogram characteristic stages have the eye electrical characteristics capable of well distinguishing the sleep stages, and therefore the electroencephalogram signals and horizontal eye electrical signals can more accurately identify different stages of sleep.
After the electroencephalogram signals and the eye movement signals are collected and before dynamic mode decomposition is started, data enhancement processing is carried out on the electroencephalogram signals and the eye movement signals, and rank deficiency of the electroencephalogram signal matrix and the eye movement signal matrix is avoided.
The method has the advantages that the development processes of the electroencephalogram signal and the electro-oculogram signal are considered to be non-stable and non-linear random processes, dynamic modal decomposition is carried out on the signals under multiple channels and multiple sampling points, the spatial domain and time domain characteristics of the signals can be reflected simultaneously, the effect of subsequent classification and identification is improved, the original signals do not need to be completely reconstructed, finally, the dynamic modal decomposition is completed, corresponding characteristic power spectrums are extracted only by using the modes after the dynamic modal decomposition, the characteristic extraction is simple, and the complexity of traditional extraction of entropy, mean value, peak value, triton and other statistical characteristics is avoided.
In step S1, the different stages in the sleep process include: the sleep stage comprises a waking stage, a sleep 1 stage, a sleep 2 stage, a sleep 3 stage, a sleep 4 stage and a rapid eye movement stage, wherein the sleep 1 stage is a sleep latency stage, the sleep 2 stage is a light sleep stage, the sleep 3 stage and the sleep 4 stage are deep sleep stages, the second stage enters the rapid eye movement stage, the eye ball rotates rapidly left and right during the rapid eye movement stage, a human dreams in the sleep stage, sleep multi-guidance diagrams of three different crowds are shown in figure 2, the crowds from top to bottom correspond to healthy women, men taking hydroxyl-stabilized men and men taking placebo in sequence, the abscissa of the sleep multi-guidance curve corresponding to each crowd in figure 2 represents a period, and the ordinate represents different stages in the sleep process, so that different crowds can be seen, the sleep stages in different periods are different and diversified, and in some sleep stages, the electroencephalogram characteristics are very similar and are not easy to identify, but the similar electroencephalogram characteristic stages have the electro-ocular characteristics which can well distinguish the sleep stages, the electro-ocular characteristics are characterized by collecting electro-ocular signals, the electro-ocular signals, namely the resting potential change of eyes, are horizontal electro-ocular signals, are detected in an EOG mode, when the electroencephalogram signals and the electro-ocular signals are collected, multi-channel electroencephalogram signals and single-channel electro-ocular signals are selected, and in the embodiment, the electroencephalogram signals and the single-channel electro-ocular signals are utilized
Figure 29256DEST_PATH_IMAGE001
Representing the number of channels of an electroencephalogram signal or an electrooculogram signal, using
Figure 364422DEST_PATH_IMAGE002
Represents a sampling rate satisfying:
Figure 93344DEST_PATH_IMAGE003
is provided with
Figure 765634DEST_PATH_IMAGE004
To representS1, wherein, R represents real space,
Figure 263611DEST_PATH_IMAGE005
then, then
Figure 769679DEST_PATH_IMAGE004
Is an underdetermined matrix.
Considering that the sampling rate is usually larger than the channel, when the number of the channels is smaller than the sampling rate, the electroencephalogram signal matrix or the electro-oculogram signal matrix is an underdetermined matrix, if dynamic modal decomposition is directly carried out, the problem of rank deficiency easily occurs, and the problem can be avoided by carrying out data enhancement operation. In particular, for an electroencephalogram signal matrix or an electrooculogram signal matrix
Figure 189159DEST_PATH_IMAGE004
Let us order
Figure 71664DEST_PATH_IMAGE006
Let us order
Figure 17624DEST_PATH_IMAGE007
The number of sliding cycles is equal to that of each cycle
Figure 960172DEST_PATH_IMAGE008
Column as window, taking 1s as one window, and stepping to right
Figure 398106DEST_PATH_IMAGE009
Sliding in sequence, wherein the sliding cycle times are as follows:
Figure 149549DEST_PATH_IMAGE061
through
Figure 622119DEST_PATH_IMAGE007
Iterative by a sub-loop, formed by a matrix
Figure 469989DEST_PATH_IMAGE005
Form a matrix
Figure 864061DEST_PATH_IMAGE011
Figure 88369DEST_PATH_IMAGE012
To represent
Figure 415446DEST_PATH_IMAGE004
And performing matrix enhancement operation to form an electroencephalogram signal matrix or an electro-oculogram signal matrix.
After data enhancement operation, order
Figure 27692DEST_PATH_IMAGE013
Figure 440219DEST_PATH_IMAGE014
Matrix of rules
Figure 671480DEST_PATH_IMAGE011
Is shown as
Figure 853063DEST_PATH_IMAGE015
Is a
Figure 308315DEST_PATH_IMAGE016
Number of channels and
Figure 536034DEST_PATH_IMAGE017
the matrix formed by +1 sampling points performs dynamic modal decomposition on signals under multiple channels and multiple sampling points, can reflect the characteristics of the spatial domain and the time domain of the signals simultaneously, and improves the effect of subsequent classification and identification. Order to
Figure 102145DEST_PATH_IMAGE018
For a group of snapshot sequences, the group of snapshot sequences is split into two adjacent groups of snapshot sequences, respectively denoted as first snapshot sequence
Figure 138234DEST_PATH_IMAGE019
And a second snapshot sequence
Figure 92283DEST_PATH_IMAGE020
xThe representation of the signal is shown as,nwhich represents the number of sample points,
Figure 479402DEST_PATH_IMAGE019
and
Figure 52466DEST_PATH_IMAGE020
satisfies the following conditions:
Figure 208641DEST_PATH_IMAGE062
wherein the content of the first and second substances,Aa linear correlation operator is represented, and a linear correlation operator,Athe calculation of (A) satisfies:
Figure 5696DEST_PATH_IMAGE063
wherein, the first and the second end of the pipe are connected with each other,
Figure 942428DEST_PATH_IMAGE023
represents the Moore-Penrose pseudo-inverse.
Example 2
In this embodiment, a detailed description is given to a dynamic modal decomposition process, the dynamic modal decomposition does not need to accurately decompose a highly complex system into respective coherent space-time structural equations, but an approximation system is solved by superposition of a plurality of dynamic modal decomposition DMD modes which increase, attenuate and oscillate with time, the development processes of electroencephalogram signals and electro-oculogram signals are non-stationary and non-linear random processes, and the linear method based on singular value decomposition, namely the dynamic modal decomposition DMD, can simultaneously reflect the spatial domain and time domain characteristics of the signals, and improve the accuracy of the classification result of the subsequent sleep stage.
In step S4, the process of performing dynamic modal decomposition on each signal snapshot sequence in combination with the linear correlation operator to obtain a modal and a corresponding characteristic value of the dynamic modal decomposition of the signal snapshot sequence is as follows:
s41, for the first blockAccording to a sequenceXPerforming truncated singular value decomposition to obtain:
Figure 115920DEST_PATH_IMAGE064
(ii) a Wherein the content of the first and second substances,
Figure 126601DEST_PATH_IMAGE025
represents the transpose of the conjugate,
Figure 688033DEST_PATH_IMAGE026
is a diagonal matrix of the singular values,
Figure 784165DEST_PATH_IMAGE027
Figure 230190DEST_PATH_IMAGE028
Figure 564219DEST_PATH_IMAGE029
Figure 703076DEST_PATH_IMAGE030
is toXThe rank of the approximation is decomposed by the singular values of (c),
Figure 879980DEST_PATH_IMAGE031
is a left singular vector matrix, each column is orthogonal,
Figure 129695DEST_PATH_IMAGE032
is a right singular vector matrix, each column being orthogonal to each other, so
Figure 114969DEST_PATH_IMAGE033
Figure 752624DEST_PATH_IMAGE034
Figure 823348DEST_PATH_IMAGE035
Representing an identity matrix; utilization in truncated singular value decomposition
Figure 876755DEST_PATH_IMAGE030
The selection of the method carries out low-rank truncation on the data, and the hard threshold algorithm for truncating the noise data adopts Gavish and Donoho algorithms.
S42, combining the linear correlation operator A obtained in S3 and the first snapshot sequence obtained in S41XAnd performing a process of truncated singular value decomposition to obtain an expression of a linear correlation operator A as follows:
Figure 185376DEST_PATH_IMAGE065
calculate the Linear correlation operator A atr×rProjection of space
Figure 666036DEST_PATH_IMAGE066
Namely, calculating a low-dimensional approximate linear model of the dynamic process, wherein the calculation expression is as follows:
Figure 289303DEST_PATH_IMAGE067
s43. pair
Figure 146400DEST_PATH_IMAGE068
And (3) carrying out characteristic value decomposition, wherein the expression satisfies the following conditions:
Figure 840687DEST_PATH_IMAGE069
wherein the content of the first and second substances,Win the form of a matrix of a plurality of,Wthe column of (a) is a feature vector,
Figure 820144DEST_PATH_IMAGE040
representing a diagonal matrix, each diagonal element being
Figure 865461DEST_PATH_IMAGE041
Characteristic value corresponding to the column of
Figure 260670DEST_PATH_IMAGE042
S44, passing throughWAnd
Figure 278305DEST_PATH_IMAGE040
and (3) reconstructing the eigenvalue decomposition of the A, and satisfying the following conditions:
Figure 366346DEST_PATH_IMAGE070
at this time, the process of the present invention,
Figure 961276DEST_PATH_IMAGE040
to represent
Figure 894597DEST_PATH_IMAGE071
A matrix of eigenvalues of;
Figure 563475DEST_PATH_IMAGE072
represent
Figure 291260DEST_PATH_IMAGE071
The feature vector of (A), i.e. the dynamic modal decomposition mode of (A), is set as the feature vector
Figure 780010DEST_PATH_IMAGE072
Is represented by any column of
Figure 782601DEST_PATH_IMAGE045
iRepresenting the column times, each column
Figure 633882DEST_PATH_IMAGE045
A spatial mode decomposed for one dynamic mode of the first snapshot sequence and corresponding to the corresponding characteristic value
Figure 798148DEST_PATH_IMAGE046
Figure 39773DEST_PATH_IMAGE046
The magnitude of (A) and the magnitude of the unit circle indicate the spatial mode of the dynamic modal decomposition
Figure 173951DEST_PATH_IMAGE045
The mode with the characteristic value just above the unit circle is relatively stable.
Figure 551843DEST_PATH_IMAGE046
Represents the oscillation frequency of the mode by taking
Figure 355851DEST_PATH_IMAGE058
The unit is changed and normalized by the logarithm of (c), i.e. the formula:
Figure 819193DEST_PATH_IMAGE059
to aω i In the case of a non-woven fabric,ω i is the frequency of oscillation in units of cycles per second (Hz), and then, using
Figure 163587DEST_PATH_IMAGE060
The oscillation frequency calculated by the dynamic modal decomposition is associated with the power spectrum of the data.
Specifically, in step S5, the process of obtaining the frequency and amplitude of each mode based on the mode of the signal snapshot sequence dynamic mode decomposition and the corresponding characteristic value is as follows:
s51, for linear correlation operator Ar×rProjection of space
Figure 989460DEST_PATH_IMAGE037
Zooming to fit the band characteristics of the bioelectricity brain signals and the bioelectricity eye signals, wherein the zooming expression is as follows:
Figure 495528DEST_PATH_IMAGE073
wherein, the first and the second end of the pipe are connected with each other,
Figure 711746DEST_PATH_IMAGE074
is the equivalent operator after the scaling and is,
Figure 187726DEST_PATH_IMAGE075
a matrix of singular values for a diagonal;
s52, the equivalent operator after the zooming is carried out
Figure 540210DEST_PATH_IMAGE074
And (3) carrying out characteristic value decomposition, wherein the expression is as follows:
Figure 217179DEST_PATH_IMAGE076
wherein the content of the first and second substances,Eform a result of
Figure 858376DEST_PATH_IMAGE050
The eigenvalue vector matrix of (1), each column of which is an eigenvalue vector, D represents the eigenvalue vector matrixECorresponding eigenvalue diagonal matrix;
s53, for each characteristic value
Figure 544573DEST_PATH_IMAGE046
Taking logarithm and normalizing to obtain normalized value
Figure 345038DEST_PATH_IMAGE052
The expression is:
Figure 458488DEST_PATH_IMAGE077
based on
Figure 383719DEST_PATH_IMAGE052
The frequency and amplitude of each mode are obtained and are respectively expressed as:
Figure 938852DEST_PATH_IMAGE078
Figure 265928DEST_PATH_IMAGE079
wherein the content of the first and second substances,f i the frequency is represented by a frequency-dependent variable,
Figure 550279DEST_PATH_IMAGE056
representing an amplitude;
Figure 166068DEST_PATH_IMAGE080
the representation takes the imaginary part operation.
The discrete frequency components are packaged in a box mode, namely frequency and amplitude are packaged in a box mode into a plurality of characteristic elements according to a frequency range, then the characteristic elements form a plurality of characteristic power spectral vectors, in the embodiment, when the characteristic elements form the plurality of characteristic power spectral vectors, the frequency range is selected to be 0-n/2, the amplitudes corresponding to the frequencies in every four frequencies are summed, and then an average value is obtained to serve as one characteristic element; in the frequency range of 0-n/2, each 4Hz is a characteristic element sub-box package, and the total is divided into n/8 characteristic element package boxes, then the first snapshot sequenceXThe n/8 characteristic elements form a characteristic power spectrum vector, the characteristic power spectrum of each mode of the bioelectricity signal is regarded as a characteristic power spectrum vector, all the characteristic power spectrum vectors form a characteristic power spectrum of the bioelectricity signal, and the characteristic elements of each characteristic power spectrum vector are identical through box-dividing packaging processing.
Compared with the conventional method, the original signal is not completely reconstructed, only the mode of the dynamic mode decomposition method is used to extract the corresponding signal feature, the feature is the power spectrum feature of the dynamic mode decomposition, fig. 3 shows a schematic diagram of the characteristic power spectrum extracted based on the above process, the abscissa of fig. 3 shows the frequency, and the ordinate shows the amplitude, in order to further show the superiority of the method provided by the embodiment, the characteristic power spectrum extracted based on the dynamic mode decomposition provided by the embodiment is compared with the power spectrum (fig. 4) superimposed after the FFT of each conventional channel, the bold color in fig. 4 is the power spectrum superimposed after the FFT of each channel, the light color is the power spectrum vector calculated after the FFT of each channel, comparing fig. 3 with fig. 4, it can be seen that the characteristic power spectrum extracted based on the dynamic mode decomposition is almost the same as the power spectrum superimposed after the FFT of each channel, in the embodiment, the mode after dynamic mode decomposition is used for extracting the corresponding characteristic power spectrum, the characteristic extraction is simple, the complexity of the calculation time is obviously lower than that of FFT (fast Fourier transform), and the complexity of extracting entropy, an average value, a peak-to-peak value, a tridentate number and other statistical characteristics in the traditional FFT mode is avoided.
Example 3
In this embodiment, a description is given of the process of constructing the random forest model and performing the training test mentioned in step S7, where in this embodiment, the random forest model is composed of 100 decision trees, the characteristic power spectrums obtained by dynamic modal decomposition and combination are divided into a training set and a test set according to a ratio of 3:7, the training set is used to train the random forest model, the test set is input into the random forest model to test the random forest model, and a predicted sleep classification label is output, in this embodiment, based on the recall ratio TPR and the inverse class prediction accuracy TNR index, the predicted sleep classification label is compared with the real label corresponding to each characteristic power spectrum, and at this time, the recall ratio TPR and the inverse class prediction accuracy TNR index are both used to evaluate the classification capability of the forest random model under the training and test set training tests, and during specific implementation, setting a recall rate threshold value and an anti-class prediction threshold value, and determining a final random forest model when the recall rate TPR meets the recall rate threshold value and the anti-class prediction accuracy TNR meets the anti-class prediction threshold value.
In this embodiment, a random forest model is partially trained by using a training set, and when a test set is input into the random forest model, a five-fold cross-validation method is adopted, that is, a random ratio is calculated by 3: and 7, dividing the characteristic power spectrum obtained by combination after dynamic modal decomposition into a training set and a test set, averaging the recall ratio TPR and the anti-class prediction accuracy TNR indexes five times, and further evaluating the classification result, wherein the mode of multiple random division is convenient for eliminating the specificity of the data set.
Example 4
Referring to fig. 5, the present application further proposes a sleep stage classification system based on dynamic modal decomposition, the sleep stage classification system comprising:
the signal acquisition unit is used for acquiring electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of normal people to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
the data enhancement unit is used for carrying out matrix enhancement operation on the electroencephalogram signal matrix and the electro-oculogram signal matrix and respective signal snapshot sequences;
the device comprises a splitting correlation preprocessing unit, a linear correlation operator acquiring unit and a splitting correlation preprocessing unit, wherein the splitting correlation preprocessing unit is used for performing splitting correlation preprocessing on each signal snapshot sequence to obtain the linear correlation operator of each signal snapshot sequence;
the dynamic modal decomposition unit is used for performing dynamic modal decomposition on each signal snapshot sequence by combining a linear correlation operator to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
the characteristic power spectrum construction unit is used for solving the frequency and the amplitude of each mode based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, dividing and packaging the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
the labeling unit is used for labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, and each characteristic power spectral vector corresponds to one sleep stage label;
the random forest model building and training unit is used for building a random forest model, training and testing the random forest model by taking the characteristic power spectrum as an input variable of the random forest model to obtain a final random forest model;
and the acquisition, detection and classification unit is used for sequentially inputting sleep electroencephalogram signals and electro-ocular signals of the crowd to be detected into the data enhancement unit, the splitting and association preprocessing unit, the dynamic modal decomposition unit and the characteristic power spectrum construction unit for processing operation, and finally inputting a random forest model for sleep stage classification.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A sleep stage classification method based on dynamic modal decomposition, characterized in that the method comprises the following steps:
s1, collecting electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of a normal crowd to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
s2, matrix enhancement operation is respectively carried out on the electroencephalogram signal matrix and the electro-oculogram signal matrix to obtain respective signal snapshot sequences;
s3, carrying out splitting association preprocessing on each signal snapshot sequence to obtain a linear association operator of each signal snapshot sequence;
s4, combining a linear correlation operator, and performing dynamic modal decomposition on each signal snapshot sequence to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
s5, based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, obtaining the frequency and the amplitude of each mode, carrying out box packaging on the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
s6, labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, wherein each characteristic power spectral vector corresponds to one sleep stage label;
s7, constructing a random forest model, taking the characteristic power spectrum as an input variable of the random forest model, training and testing the random forest model, and obtaining a final random forest model;
s8, determining the crowd to be tested, collecting sleep electroencephalogram signals and electro-oculogram signals of the crowd to be tested in an S1 mode, executing the processing procedures of the steps S2-S5 on the electroencephalogram signals and the electro-oculogram signals of each person, and finally inputting a final random forest model to classify sleep stages.
2. The sleep stage classification method based on dynamic modal decomposition according to claim 1, wherein in step S1, the different stages in the sleep process include: a waking stage, a sleep 1 stage, a sleep 2 stage, a sleep 3 stage, a sleep 4 stage and a rapid eye movement stage; when collecting EEG signal and eye electric signal, selecting multi-channel EEG signal and single-channel horizontal eye electric signal, and utilizing
Figure 762808DEST_PATH_IMAGE001
Representing the number of channels of an electroencephalogram signal or an electrooculogram signal, using
Figure 944391DEST_PATH_IMAGE002
Represents a sampling rate satisfying:
Figure 399643DEST_PATH_IMAGE003
is provided with
Figure 768307DEST_PATH_IMAGE004
Representing the electroencephalogram signal matrix or the electro-oculogram signal matrix formed as described at S1, wherein R represents a real number space,
Figure 334418DEST_PATH_IMAGE005
then, then
Figure 698403DEST_PATH_IMAGE004
Is an underdetermined matrix.
3. The sleep stage classification method based on dynamic modal decomposition of claim 2, wherein in step S2, the EEG signal matrix or EEG signal matrix is subjected to
Figure 324556DEST_PATH_IMAGE004
Let us order
Figure 446096DEST_PATH_IMAGE006
Let us order
Figure 409373DEST_PATH_IMAGE007
The number of sliding cycles is equal to that of each cycle
Figure 565548DEST_PATH_IMAGE008
Arranged as windows and stepped to the right
Figure 362603DEST_PATH_IMAGE009
Sliding in sequence, wherein the sliding cycle times are as follows:
Figure 174701DEST_PATH_IMAGE010
through
Figure 82614DEST_PATH_IMAGE007
Iterative by a sub-loop, formed by a matrix
Figure 686771DEST_PATH_IMAGE005
Form a matrix
Figure 654727DEST_PATH_IMAGE011
Figure 750859DEST_PATH_IMAGE012
To represent
Figure 790359DEST_PATH_IMAGE004
And performing matrix enhancement operation to form an electroencephalogram signal matrix or an electro-oculogram signal matrix.
4. The method of claim 3 wherein the number of channels is greater than the number of channels in the sleep stage classification method
Figure 921126DEST_PATH_IMAGE013
Figure 59983DEST_PATH_IMAGE014
Matrix of rules
Figure 846674DEST_PATH_IMAGE011
Is shown as
Figure 361969DEST_PATH_IMAGE015
Is amNumber of channels and
Figure 678068DEST_PATH_IMAGE016
+1 sampling points, a matrix of
Figure 987826DEST_PATH_IMAGE017
For a group of snapshot sequences, the group of snapshot sequences is split into two adjacent groups of snapshot sequences, respectively denoted as first snapshot sequence
Figure 792971DEST_PATH_IMAGE018
And a second snapshot sequence
Figure 174274DEST_PATH_IMAGE019
xThe representation of the signal is shown as,nwhich represents the number of sample points,
Figure 14054DEST_PATH_IMAGE018
and
Figure 494714DEST_PATH_IMAGE019
satisfies the following conditions:
Figure 521576DEST_PATH_IMAGE020
wherein the content of the first and second substances,Aa linear correlation operator is represented by a linear correlation operator,Asatisfies the following conditions:
Figure 113094DEST_PATH_IMAGE021
wherein the content of the first and second substances,
Figure 400856DEST_PATH_IMAGE022
represents the Moore-Penrose pseudo-inverse.
5. The sleep stage classification method based on dynamic modal decomposition according to claim 4, wherein the step S4 of performing dynamic modal decomposition on each signal snapshot sequence by combining with a linear correlation operator to obtain the modal and corresponding eigenvalue of the dynamic modal decomposition of the signal snapshot sequence is as follows:
s41, for the first snapshot sequenceXPerforming truncated singular value decomposition to obtain:
Figure 52417DEST_PATH_IMAGE023
(ii) a Wherein the content of the first and second substances,
Figure 832155DEST_PATH_IMAGE024
represents the transpose of the conjugate,
Figure 696205DEST_PATH_IMAGE025
is a diagonal matrix of the singular values,
Figure 510578DEST_PATH_IMAGE026
Figure 333040DEST_PATH_IMAGE027
Figure 927970DEST_PATH_IMAGE028
Figure 126870DEST_PATH_IMAGE029
is toXThe rank of the approximation is decomposed by the singular values of (c),Uis a left singular vector matrix, each column is orthogonal,
Figure 389224DEST_PATH_IMAGE030
is a right singular vector matrix, each column being orthogonal to each other, so
Figure 382588DEST_PATH_IMAGE031
Figure 136917DEST_PATH_IMAGE032
Figure 342770DEST_PATH_IMAGE033
Representing an identity matrix;
s42, combining S3 to linear correlation operatorAAnd S41 is applied to the first snapshot sequenceXPerforming a truncated singular value decomposition process to obtain a linear correlation operatorAThe expression of (a) is:
Figure 866156DEST_PATH_IMAGE034
computing linear correlation operatorsAIn thatr×rProjection of space
Figure 30421DEST_PATH_IMAGE035
Namely, calculating a low-dimensional approximate linear model of the dynamic process, wherein the calculation expression is as follows:
Figure 599942DEST_PATH_IMAGE036
s43. pair
Figure 140645DEST_PATH_IMAGE035
And (3) carrying out characteristic value decomposition, wherein the expression satisfies the following conditions:
Figure 112012DEST_PATH_IMAGE037
wherein the content of the first and second substances,Wis a matrix and is characterized in that the matrix,Wthe column of (a) is a feature vector,
Figure 712758DEST_PATH_IMAGE038
representing a diagonal matrix, each diagonal element being
Figure 176100DEST_PATH_IMAGE039
Characteristic value corresponding to the column of
Figure 723756DEST_PATH_IMAGE040
S44, passing throughWAnd
Figure 956154DEST_PATH_IMAGE038
reconstructionAThe eigenvalue decomposition of (2) satisfies:
Figure 321277DEST_PATH_IMAGE041
at this time, the process of the present invention,
Figure 271915DEST_PATH_IMAGE038
to representAA matrix of eigenvalues of;
Figure 154420DEST_PATH_IMAGE042
to representAIs a feature vector ofADynamic modal decomposition mode of (1), setting feature vector
Figure 837730DEST_PATH_IMAGE042
Is represented by any column of
Figure 780278DEST_PATH_IMAGE043
iRepresenting the column times, each column
Figure 687054DEST_PATH_IMAGE043
For the first snapshot sequenceA spatial mode of dynamic mode decomposition corresponding to the corresponding characteristic value
Figure 373251DEST_PATH_IMAGE044
6. The method for classifying sleep stages based on dynamic modal decomposition of claim 5, wherein the step S5 is to find the frequency and amplitude of each mode based on the mode and corresponding characteristic value of the dynamic modal decomposition of the signal snapshot sequence as follows:
s51, linear correlation operator is pairedAIn thatr×rProjection of space
Figure 580241DEST_PATH_IMAGE035
Scaling to fit the band characteristics of the bioelectricity signals and the bioelectricity signals, wherein the scaling expression is as follows:
Figure 21587DEST_PATH_IMAGE045
wherein the content of the first and second substances,
Figure 946817DEST_PATH_IMAGE046
is the equivalent operator after the scaling and is,
Figure 171125DEST_PATH_IMAGE025
a matrix of singular values for a diagonal;
s52, equivalent operator after scaling
Figure 967043DEST_PATH_IMAGE046
And (3) carrying out characteristic value decomposition, wherein the expression is as follows:
Figure 985815DEST_PATH_IMAGE047
wherein the content of the first and second substances,Eform a result of
Figure 726238DEST_PATH_IMAGE048
The eigenvalue vector matrix of (1), each column of which is an eigenvalue vector, D represents the eigenvalue vector matrixECorresponding eigenvalue diagonal matrix;
s53, for each characteristic value
Figure 754236DEST_PATH_IMAGE044
Taking logarithm and normalizing to obtain normalized value
Figure 935819DEST_PATH_IMAGE049
The expression is:
Figure 718967DEST_PATH_IMAGE050
based on
Figure 353211DEST_PATH_IMAGE049
The frequency and amplitude of each mode are obtained and are respectively expressed as:
Figure 919322DEST_PATH_IMAGE051
Figure 689831DEST_PATH_IMAGE052
wherein the content of the first and second substances,f i the frequency is represented by a frequency-dependent variable,
Figure 315985DEST_PATH_IMAGE053
representing an amplitude;
Figure 765421DEST_PATH_IMAGE054
the representation takes the imaginary part operation.
7. According toThe sleep stage classification method based on dynamic modal decomposition of claim 6, wherein the frequency and amplitude are boxed and packaged into a plurality of characteristic elements according to the frequency range, when a plurality of characteristic power spectral vectors are composed of the characteristic elements, the frequency range is 0 to n/2, the amplitudes corresponding to each frequency in every four frequencies are summed, and then averaged to be regarded as one characteristic element; in the frequency range of 0-n/2, every 4Hz is a characteristic element packaging box, which is divided into n/8 characteristic element packaging boxes, then the first snapshot sequenceXThe n/8 characteristic elements form a characteristic power spectrum vector, the characteristic power spectrum of each mode of the bioelectricity signal is regarded as a characteristic power spectrum vector, all the characteristic power spectrum vectors form a characteristic power spectrum of the bioelectricity signal, and the characteristic elements of each characteristic power spectrum vector are identical through box-dividing packaging processing.
8. The sleep stage classification method based on dynamic modal decomposition as claimed in claim 7, wherein in step S7, the random forest model is composed of several decision trees, the characteristic power spectrums are proportionally divided into a training set and a testing set, the training set is used to train the random forest model, the testing set is input into the random forest model testing random forest model, a predicted sleep classification label is output, based on the recall ratio TPR and the inverse prediction accuracy TNR index, the predicted sleep classification label is compared with the real label corresponding to each characteristic power spectrum, and when the recall ratio TPR meets the recall ratio threshold and the inverse prediction accuracy TNR meets the inverse prediction threshold, the final random forest model is determined.
9. The method of claim 7, wherein a five-fold cross-validation method is used when the random forest model is partially trained using the training set and the test set is input into the random forest model.
10. A sleep stage classification system based on dynamic modal decomposition, the sleep stage classification system comprising:
the signal acquisition unit is used for acquiring electroencephalogram signals and electro-oculogram signals of different stages in the sleeping process of normal people to form an electroencephalogram signal matrix and an electro-oculogram signal matrix respectively;
the data enhancement unit is used for carrying out matrix enhancement operation on the electroencephalogram signal matrix and the electro-oculogram signal matrix and respective signal snapshot sequences;
the splitting and associating preprocessing unit is used for splitting and associating preprocessing each signal snapshot sequence to obtain a linear association operator of each signal snapshot sequence;
the dynamic modal decomposition unit is used for performing dynamic modal decomposition on each signal snapshot sequence by combining a linear correlation operator to obtain a modal of the dynamic modal decomposition of the signal snapshot sequence and a corresponding characteristic value;
the characteristic power spectrum construction unit is used for solving the frequency and the amplitude of each mode based on the mode of dynamic mode decomposition of the signal snapshot sequence and the corresponding characteristic value, dividing and packaging the frequency and the amplitude into a plurality of characteristic elements according to a frequency range, forming a plurality of characteristic power spectrum vectors by the characteristic elements, and combining the plurality of characteristic power spectrum vectors into a characteristic power spectrum;
the labeling unit is used for labeling corresponding sleep stage labels on the electroencephalogram signals and the electro-oculogram signals, and each characteristic power spectral vector corresponds to one sleep stage label;
the random forest model building and training unit is used for building a random forest model, training and testing the random forest model by taking the characteristic power spectrum as an input variable of the random forest model to obtain a final random forest model;
and the acquisition, detection and classification unit is used for sequentially inputting sleep electroencephalogram signals and electro-ocular signals of the crowd to be detected into the data enhancement unit, the splitting and association preprocessing unit, the dynamic modal decomposition unit and the characteristic power spectrum construction unit for processing operation, and finally inputting a random forest model for sleep stage classification.
CN202210600499.4A 2022-05-30 2022-05-30 Sleep stage classification method and system based on dynamic modal decomposition Pending CN114668373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210600499.4A CN114668373A (en) 2022-05-30 2022-05-30 Sleep stage classification method and system based on dynamic modal decomposition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210600499.4A CN114668373A (en) 2022-05-30 2022-05-30 Sleep stage classification method and system based on dynamic modal decomposition

Publications (1)

Publication Number Publication Date
CN114668373A true CN114668373A (en) 2022-06-28

Family

ID=82081180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210600499.4A Pending CN114668373A (en) 2022-05-30 2022-05-30 Sleep stage classification method and system based on dynamic modal decomposition

Country Status (1)

Country Link
CN (1) CN114668373A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115171850A (en) * 2022-09-07 2022-10-11 深圳市心流科技有限公司 Sleep scheme generation method and device, terminal equipment and storage medium
CN116392087A (en) * 2023-06-06 2023-07-07 安徽星辰智跃科技有限责任公司 Sleep stability quantification and adjustment method, system and device based on modal decomposition
CN117643455A (en) * 2024-01-29 2024-03-05 深圳市百泰实业股份有限公司 Sleep detection method of intelligent wearable device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105105714A (en) * 2015-08-26 2015-12-02 吴建平 Sleep period separating method and system
US20160050343A1 (en) * 2014-08-15 2016-02-18 University Of Washington Using dynamic mode decomposition for real-time background/foreground separation in video
US20160258645A1 (en) * 2015-03-06 2016-09-08 Mitsubishi Electric Research Laboratories, Inc. System and Method for Controlling Operations of Air-Conditioning System
CN109602417A (en) * 2018-11-23 2019-04-12 杭州妞诺科技有限公司 Sleep stage method and system based on random forest
CN110859593A (en) * 2019-08-22 2020-03-06 西安八水健康科技有限公司 Sleep stage automatic division algorithm based on width neural network
CN111105438A (en) * 2019-11-12 2020-05-05 安徽大学 Motion detection method based on dynamic mode decomposition, terminal device and computer readable storage medium
CN112450881A (en) * 2020-11-12 2021-03-09 武汉大学 Multi-modal sleep staging method based on time sequence relevance driving

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160050343A1 (en) * 2014-08-15 2016-02-18 University Of Washington Using dynamic mode decomposition for real-time background/foreground separation in video
US20160258645A1 (en) * 2015-03-06 2016-09-08 Mitsubishi Electric Research Laboratories, Inc. System and Method for Controlling Operations of Air-Conditioning System
CN105105714A (en) * 2015-08-26 2015-12-02 吴建平 Sleep period separating method and system
WO2017032315A1 (en) * 2015-08-26 2017-03-02 吴建平 Sleep staging method and system
CN109602417A (en) * 2018-11-23 2019-04-12 杭州妞诺科技有限公司 Sleep stage method and system based on random forest
CN110859593A (en) * 2019-08-22 2020-03-06 西安八水健康科技有限公司 Sleep stage automatic division algorithm based on width neural network
CN111105438A (en) * 2019-11-12 2020-05-05 安徽大学 Motion detection method based on dynamic mode decomposition, terminal device and computer readable storage medium
CN112450881A (en) * 2020-11-12 2021-03-09 武汉大学 Multi-modal sleep staging method based on time sequence relevance driving

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BINGNIW.BRUNTON 等: "Extracting spatial-temporal coherent patterns in large-scale neural recordings using dynamic mode decomposition", 《ARXIV.ORG》 *
OZLEM KARABIBER CURA等: "Analysis of epileptic EEG signals by using dynamic mode decomposition and spectrum", 《BIOCYBERNETICS AND BIOMEDICAL ENGINEERING》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115171850A (en) * 2022-09-07 2022-10-11 深圳市心流科技有限公司 Sleep scheme generation method and device, terminal equipment and storage medium
CN116392087A (en) * 2023-06-06 2023-07-07 安徽星辰智跃科技有限责任公司 Sleep stability quantification and adjustment method, system and device based on modal decomposition
CN116392087B (en) * 2023-06-06 2023-09-01 安徽星辰智跃科技有限责任公司 Sleep stability quantification and adjustment method, system and device based on modal decomposition
CN117643455A (en) * 2024-01-29 2024-03-05 深圳市百泰实业股份有限公司 Sleep detection method of intelligent wearable device
CN117643455B (en) * 2024-01-29 2024-05-03 深圳市百泰实业股份有限公司 Sleep detection method of intelligent wearable device

Similar Documents

Publication Publication Date Title
CN114668373A (en) Sleep stage classification method and system based on dynamic modal decomposition
Cohen Comparison of linear spatial filters for identifying oscillatory activity in multichannel data
Gao et al. Automatic removal of eye-movement and blink artifacts from EEG signals
Fathima et al. Wavelet based features for epileptic seizure detection
CN108577834B (en) A method of it is detected automatically for epilepsy interphase spike
Enshaeifar et al. Quaternion singular spectrum analysis of electroencephalogram with application in sleep analysis
Harpale et al. Time and frequency domain analysis of EEG signals for seizure detection: A review
Gruszczyńska et al. Epilepsy identification based on EEG signal using RQA method
CN111466876B (en) Alzheimer's disease auxiliary diagnosis system based on fNIRS and graph neural network
CN107280663A (en) A kind of method of the tired brain electrical feature research based on different experiments difficulty
US20180279938A1 (en) Method of diagnosing dementia and apparatus for performing the same
CN111184509A (en) Emotion-induced electroencephalogram signal classification method based on transfer entropy
Shi et al. Feature extraction of brain–computer interface electroencephalogram based on motor imagery
Gaikwad et al. Novel approach for stress recognition using EEG signal by SVM classifier
Yudhana et al. Human emotion recognition based on EEG signal using fast fourier transform and K-Nearest neighbor
Ahmadi et al. Brain-computer interface signal processing algorithms: A computational cost vs. accuracy analysis for wearable computers
CN111466931A (en) Emotion recognition method based on EEG and food picture data set
Ridouh et al. EEG signals classification based on time frequency analysis
Anastasiadou et al. Unsupervised detection and removal of muscle artifacts from scalp EEG recordings using canonical correlation analysis, wavelets and random forests
CN112426162A (en) Fatigue detection method based on electroencephalogram signal rhythm entropy
Xu et al. An adaptive graph spectral analysis method for feature extraction of an EEG signal
Miao et al. Automated CCA-MWF algorithm for unsupervised identification and removal of EOG artifacts from EEG
Chen et al. A hybrid method for muscle artifact removal from EEG signals
Jose et al. Robust classification of intramuscular EMG signals to aid the diagnosis of neuromuscular disorders
Li et al. Research on improved FAWT signal denoising method in evaluation of firefighter training efficacy based on sEMG

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220628