Automatic sleep staging method for old people based on three-dimensional time-frequency feature fusion image
Through the three-dimensional time-frequency feature fusion map and the improved sleep staging network model, the problem of inaccurate sleep staging results for the elderly is solved, achieving more accurate sleep stage identification and improving calculation efficiency.
Patent Information
- Application Number
- CN202410631678.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-27
AI Technical Summary
Existing automatic sleep staging methods cannot accurately identify the sleep stages of the elderly, resulting in inaccurate staging results and cannot effectively handle the complex and variable sleep signals of the elderly.
An automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion map is adopted. By collecting Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal, time-frequency domain feature extraction and weighting processing are performed to generate three-dimensional time-frequency feature fusion. Figure, and use the improved sleep staging network model to identify and output the staging results.
It improves the accuracy of sleep staging results for the elderly, reduces the amount of calculation, enhances identification efficiency, captures the correlation and feature contribution between the three signals, and provides more accurate sleep stage identification.
Smart Images

Figure CN118697274A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sleep staging methods for the elderly, and in particular to an automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion graph. Background Art
[0002] Sleep is one of the basic physiological needs of organisms and is very important for human health and normal life. Sufficient and good sleep helps to enhance the function of the immune system and make the body more resistant to disease and infection. As the pace of today's society becomes faster and faster, people's sleep quality cannot be guaranteed, and many sleep disorders follow. Sleep staging is an important means of diagnosing sleep disorders. By observing sleep staging, different types of sleep disorders can be accurately identified.
[0003] Traditional manual sleep staging requires professionals to spend a lot of time and effort to analyze multiple physiological signals through polysomnography, and the manually analyzed sleep staging may be affected by the analyst's subjective judgment, resulting in subjective bias in the results. Automatic sleep staging is based on various algorithms and models to automatically identify different sleep stages by analyzing physiological signals. Automatic sleep staging can effectively process large amounts of data, greatly shorten the sleep analysis time, and provide more objective sleep staging results.
[0004] However, the existing automatic sleep staging methods do not take into account the impact of age. The sleep signals of the elderly are more complex and variable. In addition to the typical sleep cycle, the elderly experience more frequent sleep interruptions, changes in breathing patterns, increased body movement frequency, etc. Specifically, the elderly will have sleep signals with low frequency and small amplitude, which are slower and more irregular than those of young people. The elderly have shorter deep sleep time, that is, fewer N3 stage segments, and weaker and more unstable signal strength than young people. The staging results obtained using the existing automatic sleep staging methods are inaccurate.
[0005] Chinese patent CN201910185683.5 discloses an automatic sleep staging method based on LSTM using multiple physiological signals, which collects one-lead ECG signal, one-lead breathing signal and three-lead acceleration signal of the subject, processes and extracts features, uses the LSTM model to identify the extracted features, and outputs the sleep staging results. However, due to the complexity and uniqueness of the sleep signals of the elderly, the staging results obtained using the above method are inaccurate, and even by performing ordinary weighted processing on the three signals, the problem of inaccurate staging results cannot be overcome. Summary of the invention
[0006] In order to solve the problem of inaccurate sleep staging results for the elderly in the prior art, the present invention provides an automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion graph, which improves the accuracy of the sleep staging results for the elderly, that is, realizes accurate identification of the sleep stages of the elderly.
[0007] In order to achieve the above object, the specific scheme adopted by the present invention is: an automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion map, comprising the following steps:
[0008] S1, collects physiological signals of the elderly during sleep, including Fpz-Cz EEG signals, Pz-OzEEG signals and horizontal EOG signals, and extracts time-frequency domain features to obtain three time-frequency domain feature matrices;
[0009] S2, obtaining the weight of each time-frequency domain feature matrix according to the contribution of the time-domain features and frequency-domain features of the physiological signal to the staging results, performing weighted processing on each time-frequency domain feature matrix to obtain a weighted matrix;
[0010] S3, linear mapping of the weighted matrix obtains the corresponding single-channel time-frequency fusion feature map, and the three single-channel time-frequency fusion feature maps are used as a channel of RGB respectively to obtain a three-dimensional time-frequency feature fusion map;
[0011] S4, using the trained improved sleep staging network model to identify the three-dimensional time-frequency feature fusion image and output the staging results.
[0012] As an optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on the three-dimensional time-frequency feature fusion map: S1 includes:
[0013] S11, collecting physiological signals of the elderly during sleep, including Fpz-Cz EEG signals, Pz-OzEEG signals and horizontal EOG signals;
[0014] S12, performing signal segmentation on Fpz-Cz EEG signals, Pz-Oz EEG signals, and horizontal EOG signals;
[0015] S13, filtering the Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal segmented in S12;
[0016] S14, performing Minmax normalization processing on the filtered Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal;
[0017] S15, using continuous wavelet transform to extract time-frequency domain features of the Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal after normalization in S14, to obtain three time-frequency domain feature matrices.
[0018] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on the three-dimensional time-frequency feature fusion image: in S13, a Butterworth bandpass filter with a minimum cutoff frequency of 0.5 Hz and a maximum cutoff frequency of 35 Hz is used to filter the segmented Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal.
[0019] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion image: in S15, the continuous wavelet transform adopts the Morlet wavelet function.
[0020] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on the three-dimensional time-frequency feature fusion map: in S2, the time domain characteristics of the physiological signal are the waveform length and the average absolute value, and the frequency domain characteristics are the mean square frequency.
[0021] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on the three-dimensional time-frequency feature fusion map: S2 includes:
[0022] S21, extracting the waveform length, mean absolute deviation and mean square frequency of the physiological signal, and integrating them to obtain a feature array;
[0023] The contribution vector is calculated using the support vector machine, and the total contribution of the physiological signal is finally obtained:
[0024]
[0025] Where W(S1) is the total contribution of Fpz-Cz EEG signal, W(S2) is the total contribution of Pz-Oz EEG signal, W(S3) is the total contribution of horizontal EOG signal, and w WL(S1) is the waveform length contribution of the Fpz-Cz EEG signal, w MAD(S1) is the average absolute value contribution of the Fpz-Cz EEG signal, w MSF(S1) is the mean square frequency contribution of the Fpz-Cz EEG signal, w WL(S2) is the waveform length contribution of the Pz-Oz EEG signal, w MAD(S2) is the average absolute value contribution of the Pz-Oz EEG signal, w MSF(S2) is the mean square frequency contribution of the Pz-Oz EEG signal, w WL(S3) is the waveform length contribution of the horizontal EOG signal, wMAD(S3) is the average absolute value contribution of the horizontal EOG signal, w MSF(S3) is the mean square frequency contribution of the horizontal EOG signal;
[0026] S22, obtain the weight of the physiological signal according to the total contribution of the signal:
[0027]
[0028]
[0029]
[0030] Among them, C(S1) is the weight of the Fpz-Cz EEG signal, C(S2) is the weight of the Pz-Oz EEG signal, and C(S3) is the weight of the horizontal EOG signal;
[0031] S23, multiplying the elements of each time-frequency domain feature matrix by the corresponding signal weight to obtain a weighted matrix.
[0032] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion graph: the weighting matrix is:
[0033]
[0034] Among them, A is the time-frequency domain feature matrix of the Fpz-Cz EEG signal, B is the time-frequency domain feature matrix of the Pz-Oz EEG signal, C is the time-frequency domain feature matrix of the horizontal EOG signal, A′ is the weighting matrix of the Fpz-Cz EEG signal, B′ is the weighting matrix of the Pz-Oz EEG signal, C′ is the weighting matrix of the horizontal EOG signal, C(S1) is the weight of the Fpz-Cz EEG signal, C(S2) is the weight of the Pz-Oz EEG signal, and C(S3) is the weight of the horizontal EOG signal.
[0035] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion map: the improved sleep staging network model is a ResNet50 network model, and an Inception module is introduced before Layer 1 of the ResNet50 network model.
[0036] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion map: the improved sleep staging network model is a ResNet50 network model, and a CBAM module is introduced into the ResNet50 network model.
[0037] As another optimization scheme of the above-mentioned automatic sleep staging method for the elderly based on three-dimensional time-frequency feature fusion map: the improved sleep staging network model is a ResNet50 network model, and a multi-scale connection module is introduced into the ResNet50 network model.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. The present invention provides an automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion graph. The method collects physiological signals of the elderly during sleep, extracts time-frequency domain features, and obtains three time-frequency domain feature matrices. Weights are obtained based on the contribution of the time-domain features and frequency-domain features of the physiological signals to the staging results, and finally a weighted matrix is obtained. The three-dimensional time-frequency feature fusion graph is obtained based on the weighted matrix, and the three-dimensional time-frequency feature fusion graph is identified using an improved sleep staging network model, and the staging results are output. That is, the present invention performs weighted processing on the physiological signals and combines them with the three-dimensional time-frequency feature fusion graph to mine the correlation between the three signals, thereby realizing the sleep staging of the elderly, improving the accuracy of the sleep staging results of the elderly, and reducing the amount of calculation.
[0040] 2. In the present invention, the corresponding weights are calculated based on the contribution of the time domain characteristics and frequency characteristics of the physiological signals to the staging results. Traditional weighted processing only explores the similarities between physiological signals and simply studies the degree of correlation between signals. The present invention is based on the features related to the characteristics of each physiological signal of the elderly, calculates the contribution of these features to the staging results, calculates the proportion of the contribution of the three signals to the staging results, and obtains the corresponding weights, so that the staging results are more accurate.
[0041] 3. In the present invention, the Inception module is introduced before Layer 1 of the ResNet50 network model to enhance the ability of the ResNet50 network model to extract features of the three-dimensional time-frequency feature fusion graph at different scales, while reducing the depth and parameter amount of the network and improving the recognition efficiency.
[0042] 4. In the present invention, the CBAM module is introduced into the ResNet50 network model, so that the improved sleep staging network model can better capture the spatial structure and position-related information in the three-dimensional time-frequency feature fusion map.
[0043] 5. In the present invention, a multi-scale connection module is introduced into the ResNet50 network model to efficiently utilize the deep features and shallow features of the three-dimensional time-frequency feature fusion map. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a flow chart of the sleep staging method of the present invention;
[0045] Figure 2 is the physiological signal before filtering;
[0046] Figure 3 is the filtered physiological signal;
[0047] Figure 4 It is a single channel time-frequency domain feature map;
[0048] Figure 5 It is a three-dimensional time-frequency feature fusion map;
[0049] Figure 6 It is a structural diagram of the improved sleep staging network model;
[0050] Figure 7 This is the structure diagram of the Inception module before dimensionality reduction;
[0051] Figure 8 This is the structural diagram of the Inception module after dimensionality reduction;
[0052] Fig. 9 It is the structural diagram of the CBAM module;
[0053] Fig.10 It is the structural diagram of the multi-scale connection module. DETAILED DESCRIPTION
[0054] The technical solution of the present invention is further elaborated in detail below in conjunction with specific embodiments. The parts of the present invention that are not described and disclosed in detail in the following embodiments should be understood as the prior art known or should be known to those skilled in the art.
[0055] Example
[0056] An automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion graph comprises the following steps:
[0057] S1, collect physiological signals of the elderly during sleep, including Fpz-Cz EEG signals (Fpz-Cz electroencephalogram signals), Pz-Oz EEG signals (Pz-Oz electroencephalogram signals) and horizontal EOG signals (horizontal electrooculogram signals), and extract time-frequency domain features to obtain three time-frequency domain feature matrices. The time-frequency domain feature matrix contains the information of its corresponding signal in time and frequency, specifically, including time information, frequency information and wavelet coefficients. Time information refers to a time segment of the signal corresponding to each time point, frequency information refers to the distribution of the signal at different frequencies, and wavelet coefficients refer to the size of the wavelet coefficient of each element in the time-frequency domain feature matrix at a specific time and a specific frequency. The size of the wavelet coefficient reflects the intensity or energy distribution of the signal at the corresponding time and frequency. By observing the changes in the time-frequency domain feature matrix, it is possible to understand the changing characteristics of the signal in time and frequency, such as the rate of change of frequency, the duration of the signal, etc.
[0058] Specifically, S1 includes:
[0059] S11, collecting physiological signals of the elderly during sleep, including Fpz-Cz EEG signals, Pz-OzEEG signals and horizontal EOG signals;
[0060] S12, signal segmentation of Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal. Specifically, professional technicians divide the sleep stage into six stages according to the hypnotic diagram manually scored by Rechtschaffen and Kales manual, namely wakefulness (W), non-rapid eye movement sleep stage I (N1), stage II (N2), stage III (N3), stage IV (N4) and rapid eye movement (REM); according to the sleep staging standard of the American Academy of Sleep Medicine (AASM), the N3 and N3 manually staged by experts are merged into N3, and finally the sleep stage is re-divided into five stages, namely W, N1, N2, N3 and R. The collected physiological signals contain nearly 20 hours of sleep fragments of the elderly. In order to improve the accuracy of staging, the W stage and unknown fragments in the physiological signals are deleted, and only the fragments of half an hour before going to bed are retained.
[0061] S13, the collected Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal contain a lot of noise signals. Therefore, it is necessary to filter the Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal segmented in S12 to remove the noise signals. The Fpz-Cz EEG signal before filtering is as follows: Figure 2 As shown in Figure 2, the filtered Fpz-Cz EEG signal is as follows: Figure 3In this embodiment, a Butterworth bandpass filter with a minimum cutoff frequency of 0.5 Hz and a maximum cutoff frequency of 35 Hz is used to filter the segmented Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal, and the transfer function of the Butterworth low-pass filter is:
[0062]
[0063] Where H(s) is the filter transfer function, which represents the response in the frequency domain; s is a complex variable; ω c is the cut-off frequency, that is, the signal above this frequency is filtered out; N is the order of the filter, which indicates the steepness of the filter.
[0064] S14, Minmax normalization is performed on the filtered Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal to unify the scale range of physiological signals and eliminate the scale differences between different signals or features, so that the data of physiological signals is convenient for subsequent better extraction of signal features. The Minmax normalization function is:
[0065]
[0066] Where X is a sample or feature in a signal data set; min(X) is the minimum value of X in the data set; max(X) is the maximum value of X in the data set; X nor It is the normalized data, and the normalized data is in the range of [0,1].
[0067] S15, using continuous wavelet transform to extract time-frequency domain features of the normalized Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal in S14, and obtain three time-frequency domain feature matrices. Specifically, continuous wavelet transform can analyze the normalized Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal at different scales, and find the multi-scale features in the normalized Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal. By using wavelet functions of different scales, it is possible to simultaneously detect the high-frequency and low-frequency components in the normalized Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal, thereby more comprehensively connecting the properties of the normalized Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal. In this embodiment, continuous wavelet transform is used to extract time-frequency domain features from signal data of every 30 seconds. After continuous wavelet transform, signal data of every 30 seconds generates a 3000×87 time-frequency domain feature matrix. The time-frequency domain feature matrix is a two-dimensional time-frequency domain feature matrix. The formula of CWT is:
[0068]
[0069] Among them, Ψ(t) is the wavelet function; ψ * is the complex conjugate of the wavelet function; a is the scale parameter; b is the translation parameter.
[0070] The wavelet function may be Haar wavelet, Morlet wavelet, Meyer wavelet or Coiflets wavelet. In this embodiment, the wavelet function is Morlet wavelet:
[0071]
[0072] Among them, A is the normalization coefficient; f b is the bandwidth parameter; f c is the center frequency; j is the imaginary unit; t is.
[0073] S2, according to the contribution of the time domain characteristics and frequency domain characteristics of the physiological signal to the staging results, the weight of each time-frequency domain feature matrix is obtained, and each time-frequency domain feature matrix is weighted to obtain a weighted matrix; specifically, S2 includes:
[0074] S21, extract the waveform length, mean absolute deviation and mean square frequency of the physiological signal, and integrate them to obtain a feature array. Among them, the waveform length is used to describe the degree of change of the three signal waveforms, which reflects the degree of change between adjacent sampling points of the signal on the time axis. The waveform length is calculated by accumulating the absolute value changes between adjacent sampling points to obtain the overall waveform change. The larger the waveform length, the more drastic the waveform change of the signal, and the stronger the volatility of the signal. It is used to capture the change of the overall signal and the change of the amplitude. The calculation formula is:
[0075]
[0076] Where x(i) is the value of the signal at the i-th sampling point and N is the length of the signal.
[0077] The mean absolute deviation is a statistic used to describe the dispersion of a signal. It measures the average absolute difference between each data point in the signal and the average value of the data set. The larger the mean absolute deviation, the greater the variation of the signal in the time domain and the stronger the volatility. The calculation formula is:
[0078]
[0079] Where N is the length of the signal, x(i) is the value of the signal at the i-th sampling point, is the average value of the signal.
[0080] The mean square frequency is a statistic that describes the frequency characteristics of a signal. It measures the frequency distribution center of the signal spectrum. The larger the mean square frequency value, the higher the main frequency component of the signal; the smaller the mean square frequency value, the lower the main frequency component of the signal. The calculation formula is:
[0081]
[0082] Among them, f i is the ith frequency component, |X(f i )| is the spectrum at f i where N is the total number of frequency components.
[0083] In this embodiment, the Fpz-Cz EEG signal, Pz-OzEEG signal and horizontal EOG signal after signal segmentation, filtering and normalization are extracted. Specifically, the three signals of each sleep stage are extracted, and the results are preliminarily integrated to obtain an array of size 1x9, where 1 represents 1 sleep stage. The data of all sleep stages are integrated to obtain a feature array.
[0084] Use the support vector machine to calculate the contribution vector, take the feature array as the input of the support vector machine, and get the contribution vector w:
[0085] w=[w WL(S1) , W MAD(S1) , w MSF(S1) , w WL(S2) , w MAD(S2) , w MSF(S2) , w WL(S3) , w MAD(S3) , w MSF(S3) ]
[0086] Among them, w WL(S1) is the waveform length contribution of the Fpz-Cz EEG signal, w MAD(S1) is the average absolute value contribution of the Fpz-Cz EEG signal, w MSF(S1) is the mean square frequency contribution of the Fpz-Cz EEG signal, w WL(S2) is the waveform length contribution of the Pz-Oz EEG signal, w MAD(S2) is the average absolute value contribution of the Pz-Oz EEG signal, w MSF(S2) is the mean square frequency contribution of the Pz-Oz EEG signal, w WL(S3) is the waveform length contribution of the horizontal EOG signal, w MAD(S3) is the average absolute value contribution of the horizontal EOG signal, w MSF(S3) is the mean square frequency contribution of the horizontal EOG signal.
[0087] Finally, the total contribution of physiological signals is obtained:
[0088]
[0089] Where W(S1) is the total contribution of Fpz-Cz EEG signal, W(S2) is the total contribution of Pz-Oz EEG signal, W(S3) is the total contribution of horizontal EOG signal, and w WL(S1) is the waveform length contribution of the Fpz-Cz EEG signal, w MAD(S1) is the average absolute value contribution of the Fpz-Cz EEG signal, w MSF(S1) is the mean square frequency contribution of the Fpz-Cz EEG signal, w WL(S2) is the waveform length contribution of the Pz-Oz EEG signal, w MAD(S2) is the average absolute value contribution of the Pz-Oz EEG signal, w MSF(S2) is the mean square frequency contribution of the Pz-Oz EEG signal, w WL(S3) is the waveform length contribution of the horizontal EOG signal, w MAD(S3) is the average absolute value contribution of the horizontal EOG signal, w MSF(S3) is the mean square frequency contribution of the horizontal EOG signal.
[0090] S22, obtain the weight of the physiological signal according to the total contribution of the signal:
[0091]
[0092]
[0093]
[0094] Among them, C(S1) is the weight of the Fpz-Cz EEG signal, C(S2) is the weight of the Pz-Oz EEG signal, and C(S3) is the weight of the horizontal EOG signal.
[0095] S23, the element in the middle of each time-frequency domain feature is multiplied by the corresponding weight to obtain a weighted result, and then the weighted results are added to obtain a weighted matrix, which is:
[0096]
[0097] Among them, A is the time-frequency domain feature matrix of the Fpz-Cz EEG signal, B is the time-frequency domain feature matrix of the Pz-Oz EEG signal, C is the time-frequency domain feature matrix of the horizontal EOG signal, A′ is the weighting matrix of the Fpz-Cz EEG signal, B′ is the weighting matrix of the Pz-Oz EEG signal, C′ is the weighting matrix of the horizontal EOG signal, and r abis the Pearson correlation coefficient between the Fpz-Cz EEG signal and the Pz-Oz EEG signal, r ac is the Pearson correlation coefficient between the Fpz-Cz EEG signal and the horizontal EOG signal, r bc is the Pearson correlation coefficient between the Pz-Oz EEG signal and the horizontal EOG signal.
[0098] S3, the weighted matrix is linearly mapped to obtain the corresponding single-channel time-frequency fusion feature map. Specifically, each element of the weighted matrix is linearly mapped to the interval [0,255] to form a single-channel time-frequency fusion feature map, such as Figure 4 As shown in the figure, the three single-channel time-frequency fusion feature maps are used as a channel of RGB respectively to obtain a three-dimensional time-frequency feature fusion map, as shown in the figure. Figure 5 shown.
[0099] S4, using the trained improved sleep staging network model to identify the three-dimensional time-frequency feature fusion image and output the staging results.
[0100] The improved sleep staging network model is the ResNet50 network model. The physiological signals of the elderly are relatively weak and unstable, which makes the information in the three-dimensional time-frequency feature fusion map show complex changes at different frequency and time domain scales. That is, the three-dimensional time-frequency feature fusion map has a lot of feature information, and the feature information provided by each channel of the three-dimensional time-frequency feature fusion map and the feature information within each channel contribute differently to the staging effect. The traditional ResNet50 network model does not fully extract the feature information of the three-dimensional time-frequency feature fusion map. Therefore, improvements are made on the basis of the RestNet50 network model to obtain the improved RestNet50 network model. Specifically:
[0101] The Inception module is introduced before Layer 1 of the ResNet50 network model. The physiological signals of the elderly are relatively weak and unstable, which makes the information in the three-dimensional time-frequency feature fusion map show complex changes at different frequency and time domain scales. That is, the feature information of the three-dimensional time-frequency feature fusion map is numerous. In order to effectively utilize the feature information of the three-dimensional time-frequency feature fusion map, deeper convolution is required. However, this will lead to an increase in the depth and number of parameters of the network, which will make the convolution network training more complicated. Therefore, the Inception module is introduced before Layer 1 to enhance the ability of the improved network model to extract features of the three-dimensional time-frequency feature fusion map at different scales, such as Figure 7As shown in the figure, parallel 1x1, 3x3, and 5x5 convolution kernels and 3x3 maximum pooling are introduced to capture different scale information of the three-dimensional time-frequency feature fusion map in a layer of network. When the convolution compensation stride is set to 1, the padding values of the image are 0, 1, and 2 respectively. After convolution, features of the same dimension are obtained, and then these features are directly spliced together, so there is no need for multiple separate layers. Therefore, the depth and parameter amount of the network are reduced while effectively utilizing the feature information of the three-dimensional time-frequency feature fusion map, thereby improving the computational efficiency.
[0102] Using a 5x5 convolution kernel will bring a huge amount of calculation. After calculation, the size of the input data is 100x100x64. After passing through a 5x5 convolution layer with 8 outputs (stride=1, pad=2), the size of the output data is 100x100x8, and the parameters of the convolution layer are 5x5x64x8=12800. Therefore, a 1x1 convolution layer is added before the 5x5 convolution layer. The input data first passes through a 1x1 convolution layer with 16 outputs, and then passes through a 5x5 convolution layer with 8 outputs. The final output data size is still 100x100x8, but the number of convolution parameters has been reduced to 1x1x64x16+5x5x16x8=4224, which greatly reduces the number of convolution parameters and reduces the calculation cost.
[0103] For the three-dimensional time-frequency feature fusion map of the elderly, the features related to the physiological signals of the elderly contained in different channels and different positions in a channel share different staging results. In this invention, the CBAM attention mechanism is added at the end of the residual structure of the layer module of the ResNet50 network model to further find features related to the sleep information of the elderly at different scales and channels, such as Fig. 9 shown.
[0104] Specifically, CBAM combines the two modules of channel attention and spatial attention, so that the improved sleep staging network model can adaptively adjust the weight of feature information related to the sleep information of the elderly in each channel and each spatial position. Among them, the channel attention module helps the improved sleep staging network model to adaptively pay attention to the contribution of each channel, and assign an optimal weight to each channel of the three-dimensional time-frequency feature fusion map. The weight here is different from the weight of each time-frequency domain feature matrix recorded above. The spatial attention module enables the improved sleep staging network model to better capture the information related to the spatial structure and position in the three-dimensional time-frequency feature fusion map, and assigns an optimal weight to each position in the single-channel time-frequency fusion feature map of each layer of channels, so as to ensure that the improved sleep staging network model focuses on the information related to the sleep information of the elderly in the feature map of each layer of channels. Fig. 9It can be seen that the input three-dimensional time-frequency feature fusion map first passes through a channel attention module to obtain a weighted result, and then passes through a spatial attention module to finally obtain a weighted result.
[0105] The channel attention module first obtains two 1×1×C feature maps by global average pooling and global maximum pooling on the H×W×C input three-dimensional time-frequency feature fusion map, and sends the two 1×1×C feature maps to a shared network respectively. After a Sigmoid activation function, the channel attention weight is obtained, and the channel attention weight is multiplied by the input feature map of each channel to obtain the weighted channel feature map; the spatial attention module first obtains two H×W×1 feature maps by global average pooling and global maximum pooling along the channel dimension on the H×W×C input feature map, and splices the two feature maps together according to the channel; then, after a 7×7 convolution layer with Sigmoid activation function, the spatial attention weight is obtained, and the spatial attention weight is multiplied by the input feature map of each channel to obtain the weighted spatial attention map.
[0106] The Pz-Oz EEG signals and horizontal EOG signals in the physiological signals of the elderly are low-frequency and weak signals. As the depth of the improved sleep staging network model increases, some important features will be lost. The shallow network extracts features through a small number of convolutional layers and pooling layers, focusing mainly on the local details of the input data. It can capture the small target details of the three-dimensional time-frequency feature fusion map more meticulously, but has relatively little understanding of the semantic information of the overall scene of the three-dimensional time-frequency feature fusion map; the deep network gradually expands the receptive field through multiple convolution and pooling operations, and can cover a wider range of input data, capture richer semantic information, and understand the overall structure, contextual relationships and connections between objects in the three-dimensional time-frequency feature fusion map. However, it will ignore the details of some small targets. Therefore, in the present invention, a multi-scale connection module is introduced into the ResNet50 network model, that is, Layer2 and Layer3 are respectively connected through an average pooling layer and a fully connected layer, and then spliced together using a Concat layer, such as Fig.10 As shown, the deep and shallow features of the three-dimensional time-frequency feature fusion map of the elderly are efficiently utilized through the multi-scale connection module, thereby enhancing the recognition and staging ability of the improved network staging model and further improving the accuracy of the staging results.
[0107] In this embodiment, the training process of the improved sleep staging network model is as follows:
[0108] By comparing and analyzing public databases such as Sleep-EDF Expanded, SHHS, CAP, St.Vincent and MIT-BIH, the mid-Fpz-Cz, Pz-Oz EEG signals and horizontal EOG signals in the Sleep-EDF Expanded public database were finally selected as sample data; the sample data were subjected to signal segmentation, filtering and normalization, and then time-frequency domain feature extraction was performed to obtain a time-frequency domain feature matrix; the weight of each time-frequency domain feature matrix was obtained according to the correlation between the time-frequency domain feature matrices, and each time-frequency domain feature matrix was weighted to obtain a weighted matrix; the weighted matrix was linearly mapped to obtain a corresponding single-channel time-frequency fusion feature map, and the three single-channel time-frequency fusion feature maps were respectively used as a channel of RGB to obtain a three-dimensional time-frequency feature fusion map. In this embodiment, according to the Sleep-EDF The Expanded public database obtained a data set of 25,495 three-dimensional time-frequency feature fusion images, extracted and counted the samples of each sleep stage in the data set, and divided the training set and test set into a ratio of 8:2, that is, 20,398 three-dimensional time-frequency feature fusion images as the training set and 5,097 three-dimensional time-frequency feature fusion images as the test set. The training set and test set were used to train the improved sleep staging network model, and finally the trained improved sleep staging network model was obtained.
[0109] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An automatic sleep staging method for the elderly based on a three-dimensional time-frequency feature fusion graph, characterized in that: The following steps are involved: S1, collect physiological signals of the elderly during sleep, including Fpz-Cz EEG signals, Pz-Oz EEG signals and horizontal EOG signals, and perform time-frequency domain feature extraction to obtain three time-frequency domain feature matrices; S2, obtaining the weight of each time-frequency domain feature matrix according to the contribution of the time-domain features and frequency-domain features of the physiological signal to the staging results, performing weighted processing on each time-frequency domain feature matrix to obtain a weighted matrix; S3, linear mapping of the weighted matrix obtains the corresponding single-channel time-frequency fusion feature map, and the three single-channel time-frequency fusion feature maps are used as a channel of RGB respectively to obtain a three-dimensional time-frequency feature fusion map; S4, using the trained improved sleep staging network model to identify the three-dimensional time-frequency feature fusion image and output the staging results.
2. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 1, characterized in that: The S1 includes: S11, collecting physiological signals of the elderly during sleep, the physiological signals including Fpz-Cz EEG signals, Pz-Oz EEG signals and horizontal EOG signals; S12, performing signal segmentation on Fpz-Cz EEG signals, Pz-Oz EEG signals, and horizontal EOG signals; S13, filtering the Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal segmented in S12; S14, performing Minmax normalization processing on the filtered Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal; S15, using continuous wavelet transform to extract time-frequency domain features of the Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal after normalization in S14, to obtain three time-frequency domain feature matrices.
3. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 2, characterized in that: In the S13, a Butterworth bandpass filter with a minimum cutoff frequency of 0.5 Hz and a maximum cutoff frequency of 35 Hz is used to filter the segmented Fpz-Cz EEG signal, Pz-Oz EEG signal and horizontal EOG signal.
4. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 2, characterized in that: In S15, the continuous wavelet transform uses the Morlet wavelet function.
5. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 1, characterized in that: In S2, the time domain features of the physiological signal are the waveform length and the average absolute value, and the frequency domain features are the mean square frequency.
6. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 5, characterized in that: The S2 includes: S21, extracting the waveform length, mean absolute deviation and mean square frequency of the physiological signal, and integrating them to obtain a feature array; The contribution vector is calculated using the support vector machine, and the total contribution of the physiological signal is finally obtained: In(S1)=in WL(S1) +in MAD(S1) +in MSF(S1) In(S2)=in WL(S2) +in MAD(S2) +in MSF(S2) In(S3)=in WL(S3) +in MAD(S3) +in MSF(S3) Wherein, W(S1) is the total contribution of Fpz-Cz EEG signal, W(S2) is the total contribution of Pz-Oz EEG signal, W(S3) is the total contribution of horizontal EOG signal, wWL(S1) is the waveform length contribution of Fpz-Cz EEG signal, wMAD(S1) is the average absolute value contribution of Fpz-Cz EEG signal, wMSF(S1) is the mean square frequency contribution of Fpz-Cz EEG signal, wWL(S2) is the waveform length contribution of Pz-Oz EEG signal, wMAD(S2) is the average absolute value contribution of Pz-Oz EEG signal, wMSF(S2) is the mean square frequency contribution of Pz-Oz EEG signal, wWL(S3) is the waveform length contribution of horizontal EOG signal, wMAD(S3) is the average absolute value contribution of horizontal EOG signal, wMSF(S3) is the mean square frequency contribution of horizontal EOG signal; S22, obtain the weight of the physiological signal according to the total contribution of the signal: Among them, C(S1) is the weight of the Fpz-Cz EEG signal, C(S2) is the weight of the Pz-Oz EEG signal, and C(S3) is the weight of the horizontal EOG signal; S23, multiplying the elements of each time-frequency domain feature matrix by the corresponding signal weight to obtain a weighted matrix.
7. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 6, characterized in that: The weighting matrix is: A′=C(S1)*A B′=C(S2)*B C′=C(S3)*C Among them, A is the time-frequency domain feature matrix of the Fpz-Cz EEG signal, B is the time-frequency domain feature matrix of the Pz-Oz EEG signal, C is the time-frequency domain feature matrix of the horizontal EOG signal, A′ is the weighting matrix of the Fpz-Cz EEG signal, B is the weighting matrix of the Pz-Oz EEG signal, C′ is the weighting matrix of the horizontal EOG signal, C(S1) is the weight of the Fpz-Cz EEG signal, C(S2) is the weight of the Pz-Oz EEG signal, and C(S3) is the weight of the horizontal EOG signal.
8. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 1, characterized in that: The improved sleep staging network model is a ResNet50 network model, and an Inception module is introduced before Layer1 of the ResNet50 network model.
9. The method for automatic sleep staging for the elderly based on a three-dimensional time-frequency feature fusion graph as claimed in claim 1, characterized in that: The improved sleep staging network model is a ResNet50 network model, and a CBAM module is introduced into the ResNet50 network model.
10. The method for automatic sleep staging for the elderly based on three-dimensional time-frequency feature fusion graph as claimed in claim 1, characterized in that: The improved sleep staging network model is a ResNet50 network model, and a multi-scale connection module is introduced into the ResNet50 network model.
Citation Information
Cited By
Multi-channel weak signal acquisition system
CN118915599A
