Portable multichannel electroencephalogram signal processing and sleep monitoring method and system
Through dynamic artifact removal and online CP tensor decomposition, the problem that portable EEG acquisition devices are difficult to remove low-frequency artifacts when monitoring sleep is solved, efficient signal processing and data compression are achieved, and real-time and battery life are ensured.
Patent Information
- Application Number
- CN202510219388.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
When monitoring sleep, portable EEG acquisition devices are difficult to effectively remove low-frequency artifacts in EEG signals, especially in real-time processing scenarios, and multi-band signals increase the difficulty of signal processing and transmission.
The dynamic artifact removal preprocessing method is adopted to calculate the signal quality weight of each channel, estimate and remove artifact components, and combine online CP tensor decomposition to construct the tensor form of the time*channel* frequency band, extract the core tensor, and determine the key feature signals.
It effectively removes the artifacts in EEG signals, improves signal quality and independence, significantly reduces the amount of data, alleviates the wireless transmission bandwidth and power consumption limitations of portable devices, and ensures real-time data transmission and long-term battery life of the device.
Smart Images

Figure CN120052914A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electroencephalogram (EEG) signals, and particularly relates to a portable multi-channel EEG signal processing and sleep monitoring method and system. Background Art
[0002] The statements in this part merely provide background technical information related to the present invention and do not necessarily constitute prior art.
[0003] Traditional polysomnography (PSG) can provide detailed sleep data. However, due to its complex operation, dependence on professional equipment, and poor wearing comfort for patients, it is difficult to be widely applied in daily scenarios.
[0004] Portable EEG acquisition devices have gradually become a research hotspot in the fields of sleep research and health monitoring. Especially with the development of wireless transmission technology, portable devices provide new solutions for personalized sleep monitoring. However, in the process of using portable EEG acquisition devices to collect EEG signals for sleep monitoring, the following problems still exist:
[0005] (1) The amplitude of EEG signals is weak and is easily interfered by artifacts such as electrooculogram (EOG) and electromyogram (EMG). Existing methods such as filtering or independent component analysis (ICA) are difficult to effectively remove low-frequency artifacts, especially in real-time processing scenarios.
[0006] (2) EEG signals contain multiple frequency bands, such as δ (0.5–4 Hz), θ (4–8 Hz), α (8–13 Hz), β (13–30 Hz). Different frequency bands correspond to different physiological states. If portable EEG acquisition devices are used to collect EEG signals in real time for sleep monitoring, a large amount of signals will be generated, increasing the difficulty of signal processing and transmission. Summary of the Invention
[0007] To solve the technical problems existing in the above background art, the present invention provides a portable multi-channel EEG signal processing and sleep monitoring method and system, which can perform dynamic artifact removal preprocessing on multi-channel EEG signals to eliminate artifact interference; subsequently, online CP tensor decomposition is performed on the artifact-removed signals to extract key features, so as to optimize the data transmission and storage efficiency.
[0008] To achieve the above object, the present invention adopts the following technical solutions:
[0009] The first aspect of the present invention provides a portable multi-channel EEG signal processing and sleep monitoring method.
[0010] A portable multi-channel EEG signal processing and sleep monitoring method includes:
[0011] Obtain the original multi-channel EEG signals within the set time sliding window, extract the frequency bands of interest and remove the baseline drift to obtain the preprocessed multi-channel EEG signals;
[0012] Calculate the covariance matrix of the preprocessed EEG signals of each channel, dynamically calculate the signal quality weight of each channel, estimate the artifact components, and subtract the estimated artifact components from the original multi-channel EEG signals to obtain the multi-channel EEG signals after artifact removal;
[0013] Perform online CP tensor decomposition on the multi-channel EEG signals after artifact removal. By constructing a tensor form of time * channel * frequency band, extract the core tensor and determine the key feature signals for subsequent transmission of the key feature signals and monitoring of sleep quality.
[0014] As an implementation, the process of dynamically calculating the signal quality weight of each channel is as follows:
[0015] Calculate the correlation coefficient matrix between channels according to the covariance matrix of the EEG signals of each channel;
[0016] Calculate the signal quality weight of each channel according to the diagonal elements of the correlation coefficient matrix.
[0017] As an implementation, the expression of the signal quality weight of each channel is:
[0018]
[0019] where M is the number of channels, W i represents the weight of the i-th channel; R ij represents the correlation coefficient matrix between the i-th channel and the j-th channel.
[0020] As an implementation, the estimated artifact components are: X regressor β;
[0021] where β = (X regressor T WX regressor ) -1 X regressor T WX t ; β is the regression coefficient matrix of the multi-channel EEG signal linear regression model; X t is the original EEG signals collected by M channels; X regressor is the multi-channel signal matrix representing the signals of all reference channels; W is the diagonal matrix formed by the signal quality weights of the channels.
[0022] As an implementation, the expression of the multi-channel EEG signal linear regression model is:
[0023]
[0024] Among them, β i is the regression coefficient of channel i; X t is the original EEG signals collected by M channels; X 1 , X 2 , …, X M are the signals of multiple reference channels; is the difference between the original EEG signal and the estimated artifact component, that is, the EEG signal after artifact removal; X regressor = [X 1 , X 2 , …, X M , that is, it is formed by arranging the signals of multiple reference channels in columns.
[0025] As an implementation manner, the process of performing online CP tensor decomposition on the multi-channel EEG signal after artifact removal is as follows:
[0026] Divide the multi-channel EEG signal after artifact removal into several segments according to a preset fixed window size, and construct the signal tensor of each fixed window;
[0027] Decompose the signal tensor of each fixed window into a core tensor and factor matrices;
[0028] Extract the decomposed core tensor, that is, obtain the key features.
[0029] As an implementation manner, in the process of decomposing the signal tensor of each fixed window into a core tensor and factor matrices, the optimization objective is
[0030]
[0031]
[0032] Among them, X tensor is the finally obtained tensor; A, B, and E are all factor matrices, representing the components of time points, channels, and frequency bands respectively; γ is the regularization separation parameter, controlling the smoothness of the decomposition; R is the rank of the tensor decomposition, representing the number of features; a r , b r and e r are the factor matrices of the r-th eigen-decomposition; λ r is the weight of the r-th component in the tensor decomposition process, representing the importance of each feature in the decomposition result; represents the tensor product, indicating the tensor concatenation operation between vectors or matrices, and is used to combine each component into a high-dimensional tensor; is the square of the Frobenius norm, which is used to measure the overall size of a matrix or tensor and is equivalent to the sum of the squares of all elements in the matrix or tensor.
[0033] The second aspect of the present invention provides a portable multi-channel electroencephalogram (EEG) signal processing and sleep monitoring system.
[0034] A portable multi-channel electroencephalogram (EEG) signal processing and sleep monitoring system, comprising:
[0035] A preprocessing module, which is used to obtain the original multi-channel EEG signals within a set-time sliding window, extract the frequency bands of interest therein and remove the baseline drift to obtain the preprocessed multi-channel EEG signals;
[0036] An artifact removal module, which is used to calculate the covariance matrix of the preprocessed EEG signals of each channel, dynamically calculate the signal quality weights of each channel, estimate the artifact components, and subtract the estimated artifact components from the original multi-channel EEG signals to obtain the multi-channel EEG signals after artifact removal;
[0037] A tensor decomposition module, which is used to perform online CP tensor decomposition on the multi-channel EEG signals after artifact removal, extract the core tensor by constructing a tensor form of time * channel * frequency band, and determine the key feature signals for subsequent transmission of the key feature signals and monitoring of sleep quality.
[0038] The third aspect of the present invention provides a computer-readable storage medium.
[0039] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps in the portable multi-channel electroencephalogram (EEG) signal processing and sleep monitoring method as described above are implemented.
[0040] The fourth aspect of the present invention provides an electronic device.
[0041] An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the steps in the portable multi-channel electroencephalogram (EEG) signal processing and sleep monitoring method as described above are implemented.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] (1) The present invention uses the covariance matrix of the preprocessed electroencephalogram (EEG) signals of each channel within a preset time sliding window to dynamically calculate the signal quality weight of each channel, estimate the artifact components, combines the correlation between channels, improves the robustness of artifact removal, and can meet the low-power and real-time requirements of portable devices. Moreover, by using the dynamic artifact removal method to eliminate electrooculogram (EOG) and electromyogram (EMG) artifacts in the EEG signals, it provides high-quality input signals for subsequent tensor decomposition, thereby ensuring the physiological significance of the decomposed features.
[0044] (2) The present invention performs online CP tensor decomposition on the multi-channel EEG signals after artifact removal. By constructing the multi-channel signals into a three-dimensional tensor of time × channel × frequency band and decomposing it, only the core features in the signals are retained, significantly reducing the amount of data and alleviating the limitations of the wireless transmission bandwidth and power consumption of portable devices. For example, for 4-channel EEG signals sampled at 244 Hz, nearly 60,000 data points are generated per minute. After being compressed by CP tensor decomposition, the amount of data is reduced by more than 90%, ensuring the real-time data transmission and the long-term battery life of the device. Moreover, by using the extracted key features, the corresponding sleep quality can be accurately identified.
[0045] Advantages of additional aspects of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0047] Figure 1 is a flowchart of a method for processing multi-channel EEG signals and monitoring sleep of a portable device according to an embodiment of the present invention;
[0048] Figure 2 is a schematic structural diagram of a system for processing multi-channel EEG signals and monitoring sleep of a portable device according to an embodiment of the present invention;
[0049] FIG. 3(a) is the original EEG signal collected from channel 1 between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device and the corresponding EEG signal after artifact removal;
[0050] FIG. 3(b) is the original EEG signal collected from channel 2 between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device and the corresponding EEG signal after artifact removal;
[0051] FIG. 3(c) is the original EEG signal collected from channel 3 between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device and the corresponding EEG signal after artifact removal;
[0052] Figure 3(d) shows the original EEG signals collected from channel 4 between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device, and the corresponding EEG signals after artifact removal;
[0053] Figure 4(a) shows the covariance matrix of the original multi-channel EEG signals between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device;
[0054] Figure 4(b) shows the covariance matrix of the multi-channel EEG signals after artifact removal between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device;
[0055] Figure 5(a) shows the spectrum of the original multi-channel EEG signals in the middle stage of the sleep experiment between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device;
[0056] Figure 5(b) shows the spectrum of the EEG signals after artifact removal in the middle stage of the sleep experiment between 1.5 minutes and 2 minutes after wearing the portable EEG acquisition device;
[0057] Figure 6(a) shows the original EEG signals collected from channel 1 between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device, and the corresponding EEG signals after artifact removal;
[0058] Figure 6(b) shows the original EEG signals collected from channel 2 between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device, and the corresponding EEG signals after artifact removal;
[0059] Figure 6(c) shows the original EEG signals collected from channel 3 between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device, and the corresponding EEG signals after artifact removal;
[0060] Figure 6(d) shows the original EEG signals collected from channel 4 between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device, and the corresponding EEG signals after artifact removal;
[0061] Figure 7(a) shows the covariance matrix of the original multi-channel EEG signals between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device;
[0062] Figure 7(b) shows the covariance matrix of the multi-channel EEG signals after artifact removal between 7 minutes and 7.5 minutes after wearing the portable EEG acquisition device;
[0063] Figure 8(a) shows the spectrum of the original multi-channel EEG signals in the middle stage of the sleep experiment between 7.5 minutes and 7 minutes after wearing the portable EEG acquisition device;
[0064] Figure 8(b) shows the spectrum of the EEG signals after artifact removal in the middle stage of the sleep experiment between 7.5 minutes and 7 minutes after wearing the portable EEG acquisition device;
[0065] Figure 9(a) shows the original EEG signal collected from Channel 1 between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device, and the corresponding EEG signal after artifact removal;
[0066] Figure 9(b) shows the original EEG signal collected from Channel 2 between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device, and the corresponding EEG signal after artifact removal;
[0067] Figure 9(c) shows the original EEG signal collected from Channel 3 between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device, and the corresponding EEG signal after artifact removal;
[0068] Figure 9(d) shows the original EEG signal collected from Channel 4 between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device, and the corresponding EEG signal after artifact removal;
[0069] Figure 10(a) shows the covariance matrix of the original multi-channel EEG signal between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device;
[0070] Figure 10(b) shows the covariance matrix of the multi-channel EEG signal after artifact removal between 25 minutes and 25 and a half minutes after wearing the portable EEG acquisition device;
[0071] Figure 11(a) shows the spectrum of the original multi-channel EEG signal in the middle stage of the sleep experiment between 25 and a half minutes and 25 minutes after wearing the portable EEG acquisition device;
[0072] Figure 11(b) shows the spectrum of the EEG signal after artifact removal in the middle stage of the sleep experiment between 25 and a half minutes and 25 minutes after wearing the portable EEG acquisition device. Detailed implementation mode
[0073] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0074] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0075] It should be noted that the terms used herein are only for describing specific implementation modes and are not intended to limit the exemplary implementation modes according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0076] Example 1
[0077] According to Figure 1 , an embodiment of the present invention provides a portable multi-channel electroencephalogram signal processing and sleep monitoring method, including:
[0078] Step S101: Obtain the original multi-channel electroencephalogram signals within a set time sliding window, extract the frequency bands of interest therein, and remove the baseline drift to obtain the preprocessed multi-channel electroencephalogram signals.
[0079] For example, the original multi-channel electroencephalogram signals are electroencephalogram signals with a sampling frequency of F s = 244 Hz from 4 channels (FP1, FP2, O1, O2).
[0080] Step S102: Calculate the covariance matrix of the preprocessed electroencephalogram signals of each channel, dynamically calculate the signal quality weight of each channel, estimate the artifact components, and subtract the estimated artifact components from the original multi-channel electroencephalogram signals to obtain the multi-channel electroencephalogram signals after removing the artifacts.
[0081] In step S102, based on the baseline-removed signals, the signals are segmented with a fixed window size T ω , which is 2 seconds here. Each window contains N ω = F s ×T ω sampling points. Then the covariance matrix is calculated. For each time window, calculate the covariance matrix C of all channels. The formula is as follows:
[0082]
[0083] where X i (k) is the signal of channel i at the k-th sampling point, μ i is the signal mean of channel i, C ij represents the covariance between channel i and channel j; X j (k) is the signal of channel j at the k-th sampling point, μ j is the signal mean of channel j.
[0084] In the specific implementation process, the process of dynamically calculating the signal quality weight of each channel is as follows:
[0085] Step a1: Calculate the correlation coefficient matrix between channels according to the covariance matrix of the electroencephalogram signals of each channel; among them, the correlation coefficient matrix R between channels:
[0086]
[0087] C ii and C jj are the variances of channel i and channel j respectively. The calculation formula is
[0088]
[0089] Among them, X i (k) is the signal of channel i at the k-th sampling point, and μ i is the signal mean of channel i.
[0090] Through normalization, the value range of the correlation coefficient R ij is [-1, 1], indicating the linear correlation between channel i and channel j.
[0091] Step a2: Calculate the weights according to the diagonal elements of the correlation coefficient matrix, and calculate the signal quality weights of each channel.
[0092] Among them, the expression of the signal quality weight of each channel is:
[0093]
[0094] Among them, M is the number of channels, and W i represents the weight of the i-th channel; R ij represents the correlation coefficient matrix between the i-th channel and the j-th channel.
[0095] During the processing, combined with the covariance matrix calculated in real time, W i will be dynamically updated according to each time window, enhancing the contribution of high-quality signals and suppressing the artifacts of low-quality signals.
[0096] In the specific implementation process, the process of estimating the artifact component is:
[0097] Step b1: Construct a linear regression model for the original multi-channel EEG signals;
[0098] Step b2: Based on the signal quality weights of each channel, use the weighted least squares method to solve the regression coefficients of the linear regression model;
[0099] Step b3: Estimate the artifact component according to the regression coefficients of the linear regression model.
[0100] Among them, the expression of the linear regression model is:
[0101]
[0102] β = (X regressor T WX regressor ) -1 X regressor t WX t
[0103] Among them, βi is the regression coefficient for channel i; β is the regression coefficient matrix; X t is the original EEG signals collected from M channels; X 1 , X 2 , …, X M are the signals of multiple reference channels; is the residual term, which is the difference between the target EEG signal and the estimated artifact component, that is, the pure EEG signal after removing artifacts; X regressor is the multi-channel signal matrix, representing the signals of all reference channels, and the matrix X regressor = [X 1 , X 2 , …, X M , that is, it is formed by arranging the signals of multiple reference channels in columns; y is the target EEG signal, X regressor β is the estimated artifact signal; W is the diagonal matrix formed by the signal quality weights of the channels.
[0104] Estimate the artifact component according to the regression coefficient matrix β
[0105]
[0106] The signal after removing artifacts is:
[0107]
[0108] The real-time artifact processing algorithm through covariance matrix analysis and dynamic weight adjustment significantly improves the quality and independence of the collected signals.
[0109] Step S103: Perform online CP tensor decomposition on the multi-channel EEG signals after removing artifacts. By constructing a tensor form of time * channel * frequency band, extract the core tensor and determine the key feature signals for subsequent transmission of the key feature signals and monitoring of sleep quality.
[0110] Perform online CP tensor decomposition on the multi-channel EEG signals after removing artifacts. By constructing the signal into a tensor form of time × channel × frequency band, decompose the core tensor and factor matrices. This process not only extracts the key features related to sleep quality but also realizes efficient data compression. The amount of data after decomposition is significantly reduced. For example, for a 4-channel signal sampled at 244 Hz, the original data volume per minute is nearly 60,000 points. After tensor decomposition with rank R = 6, it is compressed to 1530 points, and the data volume is reduced by more than 90%, effectively reducing the bandwidth and power consumption pressure of wireless transmission and providing efficient input for subsequent analysis.
[0111] In step S103, the process of performing online CP tensor decomposition on the multi-channel EEG signals after artifact removal is as follows:
[0112] Step S1031: Divide the multi-channel EEG signals after artifact removal into several segments according to a preset fixed window size, and construct the signal tensor of each fixed window.
[0113] After dynamic multi-channel artifact removal, the processed signal s i (t) is obtained. The signals of each channel are segmented according to the fixed window size T ω as follows:
[0114] Each window has a size of 256 sampling points (the system sampling rate is 244 Hz, and the sampling point duration is about 1 second), and the size of the constructed tensor is 4×256 (number of channels × number of time points).
[0115] Based on wavelet decomposition, the signal tensor of each time window is constructed as follows:
[0116] X i,j,k =WaveletTransform(s i,j ,f k )
[0117] where X i,j,k is the data of the k-th frequency band, at the i-th time point and the j-th channel of the tensor. s i,j is the signal of the j-th channel at the i-th time point. f k corresponds to the k-th frequency band (corresponding to α, β, θ, δ).
[0118] Step S1032: Decompose the signal tensor of each fixed window into a core tensor and factor matrices;
[0119] Step S1033: Extract the decomposed core tensor, i.e., obtain the key features.
[0120] Among them, in the process of decomposing the signal tensor of each fixed window into a core tensor and factor matrices, the optimization objective is
[0121]
[0122] where X tensor is the finally obtained tensor; A, B, and E are all factor matrices, representing the components of time points, channels, and frequency bands respectively; γ is the regularization separation parameter, controlling the smoothness of the decomposition; R is the rank of the tensor decomposition, representing the number of features; a r ,b r and e r are the factor matrices of the r-th eigen-decomposition; λ rIt is the weight of the r-th component in the tensor decomposition process, representing the importance degree of each feature in the decomposition result; It represents the tensor product, which is a tensor-level concatenation operation between vectors or matrices and is used to combine each component into a high-dimensional tensor; It is the square of the Frobenius norm, which is used to measure the overall size of a matrix or tensor and is equivalent to the sum of the squares of all elements in the matrix or tensor.
[0123] In one or more embodiments, the factor matrices and the core tensor are updated using the Stochastic Gradient Descent (SGD) method, and the update formula is
[0124]
[0125] where η is the learning rate, which is set to 0.01 here, D new and D old respectively refer to the factor matrices after and before update (the factor matrix here is any one of A, B, and E), and L is the loss function, and the formula is
[0126]
[0127] where N is the total number of data points, and X i is the i-th data point of the original tensor. is the tensor data point reconstructed by the factor matrix.
[0128] In some alternative embodiments, according to the multi-channel EEG signal samples with labeled sleep quality, a sleep quality classification model (which can be implemented using existing neural network models) is trained to determine the known relationship between the key features and sleep quality.
[0129] The sleep quality here includes but is not limited to deep sleep (N3), light sleep (N2), and rapid eye movement period (REM).
[0130] It can be understood here that in other embodiments, the relationship between the key features and sleep quality can also be implemented using other existing models, which will not be elaborated here.
[0131] From Figures 3(a) - 3(d) it can be seen that after wearing the portable EEG acquisition device, the original multi-channel EEG signals collected from 1.5 to 2 minutes contain obvious artifact interferences, which may come from non-EEG components such as eye movements and electromyograms. Artifacts usually appear as high-amplitude low-frequency components, significantly covering the main features of the EEG signals.
[0132] The original multi-channel EEG signals collected from 1.5 to 2 minutes, through dynamic artifact removal, well preserved the EEG characteristics of the signals, significantly suppressed the high-amplitude low-frequency artifact components, and it can be seen that the overall amplitude of the processed signals was more stable and the fluctuation amplitude decreased significantly, indicating that the artifact interference was effectively removed.
[0133] The removal effect was measured by the reduction rate of the root mean square (RMS) value. RMS is an index to measure the overall strength of a signal. The RMS of the artifact components is usually high, and the reduction rate of the RMS of the signal after artifact removal can reflect the reduction of the artifact components in the signal. The RMS decline rates of the 4 channels were as follows: Channel 1: 41.9%; Channel 2: 33.5%; Channel 3: 92.1%; Channel 4: 92.1%. Generally speaking, the RMS of the processed signal decreased significantly.
[0134] The covariance matrix is used to measure the linear correlation between multi-channel signals. The matrix element C ij represents the covariance between channel i and channel j. Figure 4(a) is the covariance matrix of the original multi-channel EEG signals from 1.5 to 2 minutes after wearing the portable EEG acquisition device; in the covariance matrix of the original signal, the non-diagonal elements are brighter in color (corresponding to higher correlation values), indicating that the artifact components propagate between channels, resulting in strong correlation.
[0135] Figure 4(b) is the covariance matrix of the multi-channel EEG signals from 1.5 to 2 minutes after wearing the portable EEG acquisition device; in the covariance matrix of the processed signal, the non-diagonal elements are darker in color (corresponding to low correlation), reflecting that the artifacts were effectively removed.
[0136] The mean value of the non-diagonal elements of the covariance matrix can be used as a quantitative index of the correlation between channels. After artifact removal, the correlation reduction rate reached 90.42%, indicating that the artifact components were significantly weakened and the signal independence between channels was enhanced.
[0137] It can be seen from Figure 5(a) and Figure 5(b) that the spectral curve of the original signal had higher and wider peaks in the 0–5 Hz frequency band, indicating the significant presence of artifact interference. The spectral curve of the processed signal was relatively flat in the low-frequency band, without obvious spike features, but the power density in the 8–13 Hz and 13–30 Hz frequency bands was retained, proving that the artifact removal did not affect the characteristics of the target frequency band. The low-frequency power ratio of the original signal was 97.01%, and that of the processed signal decreased to 65.83%, indicating that the removal effect of low-frequency artifacts was significant.
[0138] From Figures 6(a) - 6(d)As can be seen, after wearing the portable EEG acquisition device, the original multi-channel EEG signals collected between 7 minutes and 7 and a half minutes contain obvious sharp artifacts. For the corresponding multi-channel EEG signals after artifact removal, the amplitude fluctuations of the processed signals are generally reduced. The processed signals are significantly smoother, and the noise interference is significantly reduced.
[0139] The RMS reduction rates of the 4 channels are as follows: Channel 1: 40.8%; Channel 2: 24.8%; Channel 3: 28.1%; Channel 4: 50.1%. The RMS of the processed signal is significantly reduced.
[0140] Figure 7(a) is the covariance matrix of the original multi-channel EEG signals from 7 minutes to 7 and a half minutes after wearing the portable EEG acquisition device; the covariance matrix of the original signals shows that there is a strong correlation between channels, which may be caused by artifacts. Figure 7(b) is the covariance matrix of the multi-channel EEG signals from 7 minutes to 7 and a half minutes after wearing the portable EEG acquisition device; after artifact removal, the covariance values between channels are significantly reduced, indicating that the artifact correlation between channels is effectively weakened. The variance values of the channels themselves are more uniform, indicating an improvement in signal quality. The correlation between channels is reduced by 67.44%, verifying the effectiveness of the change in the covariance matrix.
[0141] As can be seen from Figure 8(a) and Figure 8(b), after wearing the portable EEG acquisition device, the artifact removal effect in the middle stage of the sleep experiment from 7 minutes to 7 and a half minutes; the amplitude of the low-frequency artifact component (0.5–4 Hz) of the processed signal is significantly reduced, while in the high-frequency band (α and β waves), the characteristics of the signal are well maintained, and the spectrum of the processed signal is closer to the real EEG activity. The low-frequency power ratio of the original signal is 91.36%, while the low-frequency power ratio of the processed signal is reduced to 77.02%. The weakening of the low-frequency artifacts directly improves the frequency band specificity of the signal.
[0142] Through Figures 9(a) - 9(d) it can be found that dynamic artifact removal significantly improves the signal quality. The large fluctuations in the original signal are effectively smoothed, the fluctuation range of the processed signal is more stable, and the artifact interference is significantly suppressed. Especially at the 10th second, the strong artifact spikes in the original signal are completely removed, and the biological characteristics of the processed signal are clearer. The RMS reduction rates of the 4 channels are as follows: Channel 1: 18%; Channel 2: 23.1%; Channel 3: 16%; Channel 4: 32.1%. Among them, from 1 minute to 1 and a half minutes represents the signal during the stage when the subject adjusts the sleep posture and prepares to fall asleep just after wearing the device, and there are large body movements and other factors, so the artifact interference is greater. The latter is after lying down for some time and entering the closed-eye quiet state, so the artifacts are relatively less than the former, and the RMS reduction rate (the criterion for quantifying the jitter of large-amplitude artifacts) will also be less than the former.
[0143] As can be seen from FIGS. 10(a) and 10(b), after processing, the non-diagonal elements in the covariance matrix are significantly reduced, the cross-channel artifact correlation is effectively weakened, and the signal quality is further improved. The correlation after artifact removal is reduced by 50.43%.
[0144] According to FIGS. 11(a) and 11(b), the low-frequency power ratio of the signal before processing is 93.27%, and after processing is 89.67%, and the low-frequency artifacts are effectively suppressed. Through the portable multi-channel EEG signal processing and sleep monitoring method of the present invention, the low-frequency artifacts of the signal are suppressed, the cross-channel independence is enhanced, and the overall signal quality is significantly improved, verifying the effectiveness and reliability of the dynamic artifact removal algorithm in long-term EEG detection, thereby improving the accuracy of sleep monitoring.
[0145] Several segments of EEG signals used here are from three representative stages of the experiment after the subject wears the device, to represent the effects of the algorithm at different time stages during sleep monitoring. Among them, the images from 1 minute to 1 and a half minutes are from the signals when the subject adjusts the sleep posture and is about to enter the sleep stage just after wearing the makeup, and are affected by a large body movement factor. The images from 7 minutes to 7 and a half minutes are from the signals when the subject has been lying down for some time and enters the closed-eye quiet state. Therefore, there are fewer artifacts than the former, fewer large-amplitude artifact jitters, and a smaller RMS decrease rate than the former.
[0146] Example Two
[0147] As Figure 2 shown, the embodiment of the present invention provides a portable multi-channel EEG signal processing and sleep monitoring system, which includes:
[0148] A preprocessing module 201, which is used to obtain the original multi-channel EEG signal within a set time sliding window, extract the frequency band of interest therein and remove the baseline drift, to obtain the preprocessed multi-channel EEG signal;
[0149] An artifact removal module 202, which is used to calculate the covariance matrix of the preprocessed EEG signals of each channel, dynamically calculate the signal quality weight of each channel, estimate the artifact components, and subtract the original multi-channel EEG signal from the estimated artifact components, to obtain the multi-channel EEG signal after artifact removal;
[0150] A tensor decomposition module 203, which is used to perform online CP tensor decomposition on the multi-channel EEG signal after artifact removal, extract the core tensor by constructing a tensor form of time * channel * frequency band, and determine the key feature signals for subsequent transmission of the key feature signals and monitoring of sleep quality.
[0151] In the specific implementation process, the tensor decomposition module 203 is located at the acquisition end of the portable device and can decompose signals in real time. It only needs to transmit the compressed core tensor and factor matrix to the analysis end, thus significantly reducing the wireless transmission power consumption of the device and improving the real-time performance of data transmission.
[0152] It should be noted here that each module in the embodiments of the present invention corresponds one by one to each step in Embodiment 1, and the specific implementation process is the same, so it will not be elaborated here.
[0153] Embodiment 3
[0154] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the portable multi-channel electroencephalogram signal processing and sleep monitoring method as described above.
[0155] Embodiment 4
[0156] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the portable multi-channel electroencephalogram signal processing and sleep monitoring method as described above.
[0157] Specifically, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium. The computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part and / or installed from a removable medium. When the computer program is executed by the central processing unit, it executes various functions defined in the device of the present application.
[0158] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0159] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A portable multi-channel EEG signal processing and sleep monitoring method, characterized in that: include: Obtain the original multi-channel EEG signal within the set time sliding window, extract the frequency band of interest and remove the baseline drift to obtain the preprocessed multi-channel EEG signal; Calculate the covariance matrix of the EEG signals of each channel after preprocessing, dynamically calculate the signal quality weight of each channel, estimate the artifact component, and subtract the original multi-channel EEG signal from the estimated artifact component to obtain the multi-channel EEG signal after removing the artifact; The multi-channel EEG signals after artifact removal are subjected to online CP tensor decomposition. By constructing a tensor form of time*channel*frequency band, the core tensor is extracted and the key feature signals are determined for subsequent transmission of the key feature signals and monitoring of sleep quality.
2. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 1, characterized in that: The process of dynamically calculating the signal quality weight of each channel is: According to the covariance matrix of the EEG signals of each channel, the correlation coefficient matrix between channels is calculated; The signal quality weight of each channel is calculated by performing weight calculation based on the diagonal elements of the correlation coefficient matrix.
3. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 2, characterized in that: The expression of the signal quality weight of each channel is: Where M is the number of channels, W is i represents the weight of the i-th channel; R ij Represents the correlation coefficient matrix between the i-th channel and the j-th channel.
4. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 1, characterized in that: The estimated artifact component is: X regressor β; Where β=(X regressir T WX regressor ) -1 X regressor T WX t ; β is the regression coefficient matrix of the multi-channel EEG signal linear regression model; X t is the original EEG signal collected by M channels; X regressor is a multi-channel signal matrix, representing the signals of all reference channels; W is a diagonal matrix formed by the signal quality weights of the channels.
5. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 4, characterized in that: The expression of the linear regression model of multi-channel EEG signals is: Among them, β i is the regression coefficient of channel i; X t is the original EEG signal collected by M channels; X1, X2, …, X M are signals of multiple reference channels; is the difference between the original EEG signal and the estimated artifact component, that is, the EEG signal after removing the artifact; X regressor =[X1,X2,…,X M ], that is, the signals of multiple reference channels are arranged in columns.
6. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 1, characterized in that: The process of online CP tensor decomposition of multi-channel EEG signals after artifact removal is as follows: The multi-channel EEG signal after artifact removal is divided into several segments according to a preset fixed window size, and a signal tensor of each fixed window is constructed; Decompose the signal tensor of each fixed window into a core tensor and a factor matrix; Extract the decomposed core tensor and obtain the key features.
7. The portable multi-channel EEG signal processing and sleep monitoring method according to claim 6, characterized in that: In the process of decomposing the signal tensor of each fixed window into a core tensor and a factor matrix, the optimization objective is Among them, X tensor is the final tensor; represents the components of time point, channel and frequency band respectively; γ is the regularization separation parameter, which controls the smoothness of decomposition; R is the rank of tensor decomposition, indicating the number of features; a r ,b r and e r is the factor matrix of the rth eigendecomposition; λ r is the weight of the rth component in the tensor decomposition process, indicating the importance of each feature in the decomposition result; Represents tensor product, which represents the tensor concatenation operation between vectors or matrices, and is used to combine components into a high-dimensional tensor; It is the square of the Frobenuis norm, which is used to measure the overall size of a matrix or tensor, and is equivalent to the sum of the squares of all elements in the matrix or tensor.
8. A portable multi-channel EEG signal processing and sleep monitoring system, characterized in that: include: A preprocessing module is used to obtain the original multi-channel EEG signal within a set time sliding window, extract the frequency band of interest and remove the baseline drift to obtain the preprocessed multi-channel EEG signal; The artifact removal module is used to calculate the covariance matrix of the EEG signals of each channel after preprocessing, dynamically calculate the signal quality weight of each channel, estimate the artifact component, and subtract the original multi-channel EEG signal from the estimated artifact component to obtain the multi-channel EEG signal after artifact removal; The tensor decomposition module is used to perform online CP tensor decomposition on the multi-channel EEG signals after artifact removal. By constructing a tensor form of time*channel*frequency band, the core tensor is extracted and the key feature signals are determined for subsequent transmission of the key feature signals and monitoring of sleep quality.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the portable multi-channel EEG signal processing and sleep monitoring method as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the portable multi-channel EEG signal processing and sleep monitoring method as described in any one of claims 1-7 are implemented.