Adaptive noise cancellation method, device and equipment for brain-computer interface headphones

By obtaining the time-frequency components and environmental impact variables of the EEG signal in the brain-computer interface headset, combining nonlinear regression analysis and prediction models, control parameters are dynamically adjusted to achieve adaptive noise cancellation, which solves the problem of poor noise cancellation effect in complex noise environments, and improves signal quality and equipment reliability.

CN119743699BActive Publication Date: 2025-05-13XIAOZHOU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510258623.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-05-13
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

Brain-computer interface headphones are difficult to achieve effective noise cancellation in complex noise environments, mainly due to incomplete time-frequency characteristic analysis, insufficient dynamic impact of environmental factors, and lack of systematic parameter optimization mechanisms.

Method used

By obtaining the time-frequency components of the EEG signal, determining the characteristic noise components, and performing nonlinear regression analysis in combination with environmental impact variables to obtain environmental regulatory factors. Then, based on the variable prediction model and environmental regulatory factors, the EEG regulation signal is determined, the noise characteristic vector is constructed, and the control parameters are dynamically adjusted to achieve adaptive noise cancellation.

Benefits of technology

It realizes comprehensive noise characteristic analysis and adaptive elimination of EEG signals in complex noise environments, improves signal quality, and enhances the reliability of brain-computer interface devices in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743699B_ABST
    Figure CN119743699B_ABST
Patent Text Reader

Abstract

The present application discloses an adaptive noise elimination method, device and equipment for brain-computer interface headphones, the method comprising: obtaining an electroencephalogram (EEG) signal and a time-frequency component set collected by the brain-computer interface headphones, and obtaining the complexity corresponding to each time-frequency component in the time-frequency component set; determining a characteristic noise component in the corresponding time-frequency component according to multiple complexities; obtaining environmental influencing variables, performing nonlinear regression analysis according to the EEG signals and the environmental influencing variables, and obtaining environmental control factors; obtaining a variable prediction model corresponding to the environmental influencing variables, and determining an EEG control signal according to the environmental control factors and the variable prediction model; obtaining an EEG noise sequence and a corresponding noise steady-state factor and a noise dynamic factor according to the characteristic noise component and the EEG control signal to construct a noise characteristic vector; determining a control parameter of the EEG signal according to the noise characteristic vector, and adjusting the signal processing unit of the brain-computer interface headphones according to the control parameters to achieve adaptive noise elimination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of brain-computer interface technology, and in particular to an adaptive noise cancellation method, device and equipment for brain-computer interface headphones. Background Art

[0002] As a frontier field of human-computer interaction, brain-computer interface technology has received widespread attention in recent years. Integrating brain-computer interface technology into the form of headphones is an attractive development direction, but it also faces huge technical challenges, the most critical of which is the noise problem. In headphone-shaped brain-computer interface devices, due to the limited number of electrodes, fixed wearing position, and the complexity of the daily use environment, the noise problem is more serious than that of traditional EEG acquisition equipment. The main challenges include: accurate identification of time-frequency characteristics, dynamic influence of environmental factors, and real-time optimization of control parameters. Specific noise sources include electromyographic interference, environmental electromagnetic noise, and artifacts caused by electrode movement.

[0003] Existing noise processing methods mainly include hardware filtering, digital filtering, adaptive filtering and some advanced signal processing technologies. ※These methods have their own characteristics: hardware filtering uses analog filters to remove noise in a specific frequency band, but it is difficult to achieve dynamic adjustment; digital filtering such as FIR and IIR filters can achieve fine frequency selection, but the processing effect on time-varying features is limited; adaptive filtering can dynamically adjust parameters, but usually only focuses on the characteristics of a single dimension; advanced signal processing technologies such as wavelet transform and independent component analysis (ICA) have strong analytical capabilities, but require the establishment of appropriate feature extraction and parameter control mechanisms.

[0004] These existing technologies have three main limitations when dealing with the complex noise environment faced by brain-computer interface headsets: first, there is a lack of comprehensive analysis of time-frequency characteristics, second, the dynamic impact of environmental factors is not fully considered, and third, there is no systematic parameter optimization mechanism. Especially in daily use environments, it is necessary to consider both signal feature analysis and environmental factor prediction.

[0005] Therefore, a method is urgently needed to solve at least one of the above problems. Summary of the invention

[0006] In a first aspect, an embodiment of the present application provides an adaptive noise cancellation method for a brain-computer interface headset, comprising:

[0007] Obtaining an electroencephalogram (EEG) signal collected by the brain-computer interface headset, obtaining a coefficient matrix of the EEG signal in a time-frequency plane, obtaining a time-frequency component set corresponding to the coefficient matrix, and obtaining the complexity corresponding to each time-frequency component in the time-frequency component set;

[0008] Determining a characteristic noise component in corresponding time-frequency components according to a plurality of said complexities;

[0009] Obtaining environmental influencing variables corresponding to the EEG signal, performing nonlinear regression analysis based on the EEG signal and the environmental influencing variables, and obtaining environmental regulation factors;

[0010] Obtaining a variable prediction model corresponding to the environmental influencing variable, and determining an EEG control signal according to the environmental control factor and the variable prediction model;

[0011] According to the characteristic noise component and the EEG control signal, an EEG noise sequence is obtained, a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence are obtained, and a noise characteristic vector is constructed according to the noise steady-state factor and the noise dynamic factor;

[0012] The control parameters of the fixed EEG signal are determined according to the noise characteristic vector, and the signal processing unit of the brain-computer interface headset is adjusted according to the control parameters to achieve adaptive noise elimination.

[0013] In a second aspect, the present application also provides an adaptive noise cancellation device, comprising:

[0014] A complexity acquisition module, used to acquire the EEG signal collected by the brain-computer interface headset, acquire the coefficient matrix of the EEG signal in the time-frequency plane, acquire the time-frequency component set corresponding to the coefficient matrix, and acquire the complexity corresponding to each time-frequency component in the time-frequency component set;

[0015] A component determination module, used to determine a characteristic noise component in a corresponding time-frequency component according to a plurality of said complexities;

[0016] A factor acquisition module is used to acquire the environmental influencing variables corresponding to the EEG signal, and to perform nonlinear regression analysis based on the EEG signal and the environmental influencing variables to acquire the environmental regulation factors;

[0017] A model acquisition module, used to acquire a variable prediction model corresponding to the environmental influencing variable, and determine an EEG control signal according to the environmental control factor and the variable prediction model;

[0018] A vector acquisition module, used to acquire an EEG noise sequence according to the characteristic noise component and the EEG control signal, acquire a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence, and construct a noise characteristic vector according to the noise steady-state factor and the noise dynamic factor;

[0019] The noise elimination module is used to determine the control parameters of the fixed EEG signal according to the noise feature vector, and adjust the signal processing unit of the brain-computer interface headset according to the control parameters to achieve adaptive noise elimination.

[0020] In a third aspect, the present application also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the adaptive noise cancellation method for brain-computer interface headphones as described in the first aspect is implemented.

[0021] In a fourth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the adaptive noise cancellation method for brain-computer interface headphones as described in the first aspect.

[0022] Compared with the prior art, this application has at least the following beneficial effects:

[0023] 1. Comprehensive noise feature analysis and adaptive elimination This method converts EEG signals to the time-scale plane through continuous wavelet transform, and further converts them into a set of time-frequency components in the time-frequency plane. This analysis method achieves an accurate characterization of noise characteristics. By calculating the noise steady-state factor, dynamic factor, composite factor and time-correlation factor, a multi-dimensional noise feature vector is constructed, which provides a reliable basis for subsequent parameter regulation. Based on this feature analysis framework, the method can adjust the control parameters in real time, thereby achieving accurate elimination of different types of noise.

[0024] 2. Comprehensive consideration of environmental factors and active noise prediction This method innovatively incorporates environmental factors directly into the noise cancellation method. By integrating multiple sensors in the brain-computer interface headset, the method can comprehensively monitor the user's environmental conditions and activity status. These environmental data are used to construct an influencing variable prediction model, and combined with environmental control factors, the mapping of environmental changes to noise prediction is achieved, enabling the method to pre-adjust the noise cancellation strategy.

[0025] 3. Hierarchical adaptive processing framework This method designs a hierarchical processing framework that organically combines the two paths of signal feature analysis and environmental impact prediction. Through the synergy of noise feature vectors and environmental control factors, dynamic optimization of control parameters is achieved. The method adopts a combination of preset parameters and dynamic correction, which not only ensures the stability of processing, but also achieves rapid response to environmental changes. This hierarchical framework enables the method to achieve reliable noise cancellation on devices such as brain-computer interface headsets.

[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic flow chart of an adaptive noise cancellation method for a brain-computer interface headset according to an embodiment of the present application;

[0028] Figure 2 This is a schematic diagram of the structure of an adaptive noise elimination device shown in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0036] The technical solution of the embodiment of the present application is introduced below.

[0037] As a frontier field of human-computer interaction, brain-computer interface technology has received widespread attention in recent years. Integrating brain-computer interface technology into the form of headphones is an attractive development direction, but it also faces huge technical challenges, the most critical of which is the noise problem. In headphone-shaped brain-computer interface devices, due to the limited number of electrodes, fixed wearing position, and the complexity of the daily use environment, the noise problem is more serious than that of traditional EEG acquisition equipment. The main challenges include: accurate identification of time-frequency characteristics, dynamic influence of environmental factors, and real-time optimization of control parameters. Specific noise sources include electromyographic interference, environmental electromagnetic noise, and artifacts caused by electrode movement.

[0038] Existing noise processing methods mainly include hardware filtering, digital filtering, adaptive filtering and some advanced signal processing technologies. These methods have their own characteristics: hardware filtering uses analog filters to remove noise in a specific frequency band, but it is difficult to achieve dynamic adjustment; digital filtering such as FIR and IIR filters can achieve fine frequency selection, but the processing effect on time-varying features is limited; adaptive filtering can dynamically adjust parameters, but usually only focuses on single-dimensional features; advanced signal processing technologies such as wavelet transform and independent component analysis (ICA) have strong analytical capabilities, but require the establishment of appropriate feature extraction and parameter control mechanisms.

[0039] These existing technologies have three main limitations when dealing with the complex noise environment faced by brain-computer interface headsets: first, there is a lack of comprehensive analysis of time-frequency characteristics, second, the dynamic impact of environmental factors is not fully considered, and third, there is no parameter optimization mechanism for the method. Especially in daily use environments, it is necessary to consider both signal feature analysis and environmental factor prediction.

[0040] To solve the above problems, please refer to Figure 1 , Figure 1The following is a flow chart of an adaptive noise cancellation method for a brain-computer interface headset provided in an embodiment of the present application. The adaptive noise cancellation method for a brain-computer interface headset in an embodiment of the present application can be applied to computer devices, including but not limited to smartphones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the adaptive noise cancellation method for brain-computer interface headphones of this embodiment includes steps S101 to S106, which are described in detail as follows:

[0041] Step S101, obtain the EEG signal collected by the brain-computer interface headset, obtain the coefficient matrix of the EEG signal in the time-frequency plane, obtain the time-frequency component set corresponding to the coefficient matrix, and obtain the complexity corresponding to each time-frequency component in the time-frequency component set.

[0042] Specifically, first, the user's EEG signals are collected using the dry electrode array built into the brain-computer interface headset. The dry electrode array usually consists of 4-8 electrodes, mainly distributed in the frontal and temporal lobe areas. Electrodes made of Ag / AgCl material can ensure good signal quality and wearing comfort. A reference electrode is set at the mastoid behind the ear for signal reference.

[0043] In some embodiments, obtaining the coefficient matrix of the EEG signal in the time-frequency plane includes: performing a continuous wavelet transform on the EEG signal to obtain the coefficient matrix of the EEG signal in the time scale plane; converting the coefficient matrix from the time scale plane to the time-frequency plane to obtain the coefficient matrix of the EEG signal in the time-frequency plane.

[0044] The signal acquisition parameters were set as follows: the sampling rate was selected to be 500 Hz to ensure that EEG activities up to 100 Hz could be captured; a 24-bit ADC was used to provide sufficient dynamic range; and the signal bandwidth was set to 0.1 Hz-100 Hz to cover all major EEG rhythms from delta waves to gamma waves.

[0045] The collected raw EEG signals were then preprocessed. First, a high-pass filter with a cutoff frequency of 0.1 Hz was used to remove the DC bias. Then, a 50 Hz (or 60 Hz, depending on the local power grid frequency) notch filter was applied to eliminate power frequency interference. Finally, a polynomial fitting method was used to correct the baseline drift.

[0046] After preprocessing, the signal is subjected to continuous wavelet transform (CWT). Morlet wavelet is selected as the mother wavelet function, and its expression is:

[0047] ψ(t) = (1 / π^(1 / 4)) * exp(i2πf 0 t) * exp(-t² / 2).

[0048] Among them, f 0 is the center frequency, which is 6Hz.

[0049] The calculation formula of CWT is as follows:

[0050] W(a,b) = (1 / √|a|) * ∫ x(t) * ψ*((tb) / a) dt.

[0051] Among them, x(t) is the input EEG signal, a is the scale parameter, b is the translation parameter, and ψ* is the conjugate complex number of the wavelet function.

[0052] In actual calculations, the discretized form is used:

[0053] W(a,b) = (1 / √|a|) * Σ x[n] * ψ*((nb) / a).

[0054] Where n is the discrete time index.

[0055] The scale parameter a is chosen to cover the frequency range of 1-100 Hz, corresponding to the main rhythms of the EEG signal. Specifically, a scale of 32 logarithmically spaced values ​​is chosen to ensure that each frequency band is adequately represented.

[0056] In order to reduce the boundary effect, periodic extension processing is performed at both ends of the signal. The extension length is 10% of the original signal length.

[0057] After executing CWT, a time-scale coefficient matrix is ​​obtained. The size of the matrix is ​​M×N, where M is the number of scales (32 in this case) and N is the number of sampling points of the signal. Each matrix element W(m,n) represents the wavelet coefficient at time point n and scale m.

[0058] Finally, the obtained coefficient matrix is ​​normalized for subsequent analysis. The normalization method uses Z-score standardization: Z = (X - μ) / σ.

[0059] Among them, X is the original coefficient value, μ is the mean of the matrix, and σ is the standard deviation.

[0060] At this point, the EEG signal acquisition and continuous wavelet transform are completed, and the coefficient matrix Z on the time-scale plane is obtained. The size of this Z matrix is ​​the same as the original coefficient matrix W, which is M×N, where M is the number of scales (32 in this case) and N is the number of sampling points of the signal. Each element Z(m,n) in the Z matrix represents the standardized wavelet coefficient at time point n and scale m.

[0061] Exemplarily, obtaining the complexity corresponding to each time-frequency component in the time-frequency component set includes: obtaining a reference EEG signal corresponding to the EEG signal and time window information and energy distribution information corresponding to the reference EEG signal; and calculating the complexity corresponding to each time-frequency component in the time-frequency component set based on the reference EEG signal, time window information and energy distribution information.

[0062] This example includes the following steps:

[0063] (1) Mapping relationship between scale and frequency: The first step in the conversion process is to establish a mapping relationship between scale and frequency. For Morlet wavelet, this relationship can be expressed by the following formula:

[0064] f = (f_c * f_s) / (a ​​* Δ).

[0065] Where f is the frequency, f_c is the center frequency of the wavelet (set to 6Hz in ), f_s is the sampling frequency (500Hz), a is the scale parameter, and Δ is the sampling period (1 / f_s = 0.002s).

[0066] Specifically, for a given scale a, the corresponding frequency f can be understood as: the center frequency f_c of the basic wavelet, after scaling by scale a (divided by a), and then considering the effect of the sampling rate (multiplied by f_s). The Δ term here plays the role of unit conversion.

[0067] In practice, one usually chooses a range of scale values, for example 32 scales with logarithmic spacing:

[0068] a = [a_min * 2^((i-1) / (M-1) * log2(a_max / a_min)) for i in 1:M].

[0069] Where a_min and a_max correspond to the highest and lowest expected frequencies, respectively. For example, if you want to cover a frequency range of 1-100Hz, you can set:

[0070] a_min = (f_c * f_s) / (100 * Δ) a_max = (f_c * f_s) / (1 * Δ).

[0071] Using this formula, each row of the Z matrix (corresponding to a scale value) can be mapped to the corresponding frequency. For the minimum scale a_min (corresponding to the highest frequency), we get f_max ≈ 100Hz; for the maximum scale a_max (corresponding to the lowest frequency), we get f_min ≈ 1Hz. In this way, we get a frequency vector F with a length of M.

[0072] (2) Calculation of energy distribution on the time-frequency plane: Next, the energy distribution on the time-frequency plane needs to be calculated. The mathematical expression for this operation is:

[0073] E(m,n) = |Z(m,n)|^2.

[0074] where E(m,n) represents the energy at frequency F(m) and time point n. Z(m,n) is the complex-valued wavelet coefficient and |Z(m,n)| represents its modulus. The squaring operation converts the complex value into a real-valued energy representation.

[0075] The physical meaning of this operation is to convert the amplitude information of the wavelet coefficients into energy information. In signal processing, energy is usually defined as the square of the signal amplitude. For complex-valued wavelet coefficients, the square of its modulus corresponds exactly to the energy at that time-frequency point.

[0076] The result is a new matrix E, still of size M × N, but now each element represents the energy at a specific time-frequency point. This energy distribution matrix E provides a joint representation of the signal in time and frequency, allowing the time and frequency domain characteristics of the signal to be observed simultaneously.

[0077] (3) Frequency interpolation: Since the frequency distribution obtained by wavelet transform is nonlinear (high resolution at low frequencies and low resolution at high frequencies), frequency interpolation is required to obtain a uniformly distributed frequency representation for the convenience of subsequent analysis.

[0078] First, select the target frequency resolution Δf (for example, 0.5Hz) and the maximum frequency f_max (100Hz), and create a new frequency vector F_new:

[0079] F_new = [0.5, 1.0, 1.5, ..., 100] Hz.

[0080] This new frequency vector contains 200 equally spaced frequency points, covering the entire frequency range of interest.

[0081] For each time point n, use the cubic spline interpolation method to interpolate E(:,n) from the original frequency vector F to the new frequency vector F_new. This process can be expressed as:

[0082] E_new(:,n) = spline_interpolate(F, E(:,n), F_new).

[0083] Where spline_interpolate represents the cubic spline interpolation function. The reason for choosing cubic spline interpolation is that it can provide smooth interpolation results while maintaining the characteristics of the original data. The basic idea of ​​cubic spline interpolation is to fit a cubic polynomial between every two adjacent data points. These polynomials are not only continuous at the data points, but their first-order and second-order derivatives are also continuous at these points. Specifically, for each time point n, the interpolation process is as follows:

[0084] 1. Construct the relationship between the original frequency F and the energy E(:,n).

[0085] 2. Fit a cubic spline function between these points.

[0086] 3. Use the fitted spline function to calculate the interpolation result at the new frequency point F_new.

[0087] After interpolation, a new energy distribution matrix E_new is obtained, which is 200 × 2500. This matrix has a uniform distribution in the frequency dimension, which is convenient for subsequent analysis and processing.

[0088] The E_new matrix is ​​the required time-frequency component set. Each element E_new(m,n) represents the energy at frequency F_new(m) and time point n. This time-frequency component set fully represents the energy distribution of the original EEG signal in the time and frequency domains.

[0089] It should be noted that, in some embodiments, the complexity corresponding to each of the time-frequency components in the time-frequency component set is calculated based on the reference EEG signal, time window information and energy distribution information, including: obtaining the energy distribution difference between the time-frequency component and the reference EEG signal in multiple preset standard EEG frequency bands; obtaining the KL divergence value corresponding to the energy distribution difference; obtaining the consistency coefficient of each of the time-frequency components in time; obtaining the spectral entropy corresponding to each of the time-frequency components; obtaining the energy deviation coefficient of the time-frequency component and the reference EEG signal; obtaining the rate of change of the time-frequency component over time; and calculating the complexity based on the KL divergence value, consistency coefficient, spectral entropy, energy deviation coefficient and change rate.

[0090] By obtaining the reference EEG signal, the upper and lower limits of the time window and the energy distribution of the reference EEG signal are determined. Including: First, the upper and lower limits of the time window need to be determined. This process uses the sliding window technique, which is a widely used method in time series signal analysis. The core idea of ​​the sliding window technique is to effectively capture the dynamic changes of the signal while maintaining sufficient time resolution. This method is particularly suitable for EEG signal analysis because EEG signals are inherently non-stationary and their characteristics change over time.

[0091] The choice of window length is a key decision that directly affects the time and frequency resolution of the analysis. In this method, 4 seconds was chosen as the window length. This choice was based on several considerations: First, a 4-second window length is sufficient to capture the frequency components as low as 0.25 Hz, which covers all important frequency bands in the EEG signal, including the lowest frequency delta wave (0.5-4 Hz). Second, this length strikes a good balance between time resolution and frequency resolution. A window that is too short will result in insufficient frequency resolution, while a window that is too long may miss rapid changes in the signal.

[0092] A 50% overlap is used, which means that a new 4-second window starts every 2 seconds. The purpose of overlap is to improve temporal resolution and ensure signal continuity. A 50% overlap is a common choice that strikes a balance between computational efficiency and analysis accuracy. Too high an overlap will increase the computational burden, while too low an overlap may miss important signal changes.

[0093] The specific process of determining the upper and lower limits is as follows:

[0094] 1. First, define the window length (W) as 4 seconds and the overlap ratio (R) as 50%. These parameters are selected based on the above considerations.

[0095] 2. Next, calculate the step length (S). The step length refers to the time interval between the starting points of two adjacent windows. It is determined by the window length and the overlap rate, and the calculation formula is S = W * (1 - R). In the case of , S = 4 * (1 -0.5) = 2 seconds. This means that a new window will start every 2 seconds.

[0096] 3. For a signal of a given length (total length is T seconds), the number of windows (N) needs to be calculated. The number of windows is calculated as N = floor((T - W) / S) + 1, where floor means rounding down. This formula takes into account the total length of the signal, the window length, and the step length. For example, if there is a 60-second signal, the number of windows would be N = floor((60 -4) / 2) + 1 = 29.

[0097] 4. For the i-th window (i starts at 1), its lower limit (Li) and upper limit (Ui) can be calculated. The formula for the lower limit is Li = (i - 1) * S, and the formula for the upper limit is Ui = Li + W. For example, the lower limit of the first window is 0 seconds and the upper limit is 4 seconds; the lower limit of the second window is 2 seconds and the upper limit is 6 seconds, and so on.

[0098] This process results in a sequence of windows that cover the entire time range of the signal. This approach ensures that all parts of the signal can be fully analyzed while maintaining sufficient time resolution to capture the dynamic changes of the signal.

[0099] After determining the time window, the next step is to calculate the energy distribution within each window. This process involves converting the time domain signal to the frequency domain and calculating the energy in different frequency bands. This is the key to understanding the characteristics of EEG signals, because different EEG activities will be manifested in different frequency bands. The details are as follows:

[0100] 1. First, apply the Hanning window function to the signal within each window. The window function is applied to reduce spectrum leakage. Spectral leakage refers to the phenomenon that energy "leaks" from the main frequency component to the adjacent frequency when Fourier transform is performed on a finite length signal. The Hanning window is a commonly used window function that can achieve a good balance between frequency resolution and amplitude accuracy.

[0101] 2. Next, a 2048-point Fast Fourier Transform (FFT) is performed on the windowed signal. FFT is an algorithm that efficiently computes discrete Fourier transforms. 2048 points are chosen to provide sufficient frequency resolution to analyze the individual frequency bands of the EEG signal. Specifically, for a sampling rate of 500 Hz, a 2048-point FFT can provide a frequency resolution of approximately 0.24 Hz, which is sufficient to accurately analyze the individual frequency bands in the EEG signal.

[0102] 3. Then, calculate the power spectral density (PSD). PSD is calculated by square the modulus of the FFT result and then divide it by the product of the sampling rate and the number of FFT points. PSD provides information about the power distribution of the signal at different frequencies, which is crucial for understanding the frequency characteristics of EEG signals.

[0103] 4. Once the PSD is obtained, the power is calculated within the standard EEG frequency bands. These bands include delta (0.5-4Hz), theta (4-8Hz), alpha (8-13Hz), beta (13-30Hz), and gamma (30-100Hz). The calculation process involves integrating the PSD within each frequency band. In practice, this integration process is usually approximated by summing the PSD values ​​within the frequency band. This allows quantification of the strength of different EEG rhythms.

[0104] 5. Finally, the calculated energy is normalized. The normalization method is to divide the energy of each frequency band by the sum of the energies of all frequency bands to obtain the proportion of each frequency band energy to the total energy. This is important because it allows the energy distribution between different time windows or different individuals to be compared without being affected by changes in the overall strength of the signal.

[0105] Through this series, the detailed energy distribution of the EEG signal in each time window was obtained.

[0106] The complexity of each time-frequency component is calculated based on the obtained time-frequency component set, the reference EEG signal and its time window and energy distribution. Including: First, it is necessary to compare the difference between the current time-frequency component and the reference EEG signal in the corresponding time window. This comparison is mainly based on energy distribution. For each time window, the energy distribution difference between the current time-frequency component and the reference signal in five standard EEG frequency bands (δ, θ, α, β, γ) is calculated. The five frequency bands used here are δ waves (0.5-4Hz), θ waves (4-8Hz), α waves (8-13Hz), β waves (13-30Hz) and γ waves (30-100Hz). These specific frequency bands are selected because they have important physiological and cognitive significance in EEG research. For example, δ waves are usually associated with deep sleep, while γ waves are associated with high cognitive processing.

[0107] In order to quantify this difference, the Kullback-Leibler divergence (KL divergence) is used. KL divergence is a method in information theory to measure the difference between two probability distributions. In applications, it can effectively capture the difference in energy distribution between the current time-frequency component and the reference signal. The calculation formula of KL divergence is D_KL = Σ (P_i * log(P_i / Q_i)), where P_i is the normalized energy distribution of the current time-frequency component, and Q_i is the normalized energy distribution of the reference signal. In actual calculations, it is necessary to pay attention to dealing with possible zero value problems, usually by adding a very small constant (such as 1e-10) to avoid errors in logarithmic calculations.

[0108] The larger the KL divergence, the greater the difference between the current component and the reference signal, and therefore the higher the complexity. This allows us to identify those time-frequency components that are significantly different from the normal reference signal. However, it should also be noted that a high KL divergence does not necessarily mean that the signal is noise, it may indicate an important EEG activity event. Therefore, this indicator needs to be considered in conjunction with other features.

[0109] Next, evaluate the temporal consistency of the time-frequency components. This process involves comparing the time-frequency components of the current time window with the time-frequency components of the previous and next adjacent windows. The assessment of temporal consistency is important for identifying both instantaneous changes and persistent patterns. The correlation coefficient between adjacent windows is calculated as R = Σ((X_t - μ_X)(Y_t - μ_Y)) / (σ_X *σ_Y), where X_t and Y_t are the time-frequency components of adjacent time windows, and μ and σ are the mean and standard deviation, respectively.

[0110] In practical applications, it is necessary to consider how to deal with the boundaries of the time series. For the first and last time windows, it may be possible to calculate the correlation coefficient in only one direction. One solution is to use mirror padding or cyclic padding to extend the boundaries of the time series. Calculate the correlation coefficient of the two adjacent windows and take the average. The lower the correlation coefficient, the worse the temporal consistency and the higher the complexity. This helps identify components that vary dramatically in time, which may indicate anomalies or important events in the signal.

[0111] Then, the frequency structure within each time window is analyzed using the information of the time-frequency component set. To this end, spectral entropy is used to quantify the complexity of the frequency distribution. Spectral entropy is derived from the concept of entropy in information theory, which measures the uncertainty or randomness of the signal frequency distribution. The calculation formula for spectral entropy is H = -Σ (p_i * log(p_i)), where p_i is the normalized frequency component energy. A high entropy value indicates a more uniform frequency distribution and higher complexity.

[0112] When calculating spectral entropy, attention should be paid to the choice of frequency resolution. Too high a resolution may lead to increased noise sensitivity, while too low a resolution may lose important frequency details. A balanced approach is to use adaptive frequency resolution, using higher resolution in low-frequency areas and lower resolution in high-frequency areas. This approach is similar to the characteristics of human auditory methods and is more in line with the natural characteristics of EEG signals.

[0113] Next, calculate the energy deviation of the current time-frequency component relative to the reference signal. For each frequency band, calculate E_dev = (E_current - E_ref) / E_ref, where E_current is the energy of the current time-frequency component and E_ref is the energy of the corresponding frequency band of the reference signal. Take the root mean square of all frequency band deviations as the overall deviation indicator. The larger the deviation, the greater the difference in energy distribution between the current component and the reference signal, and therefore the higher the complexity.

[0114] When calculating the energy deviation, the natural variability of different frequency bands needs to be taken into account. For example, the power of alpha waves usually increases during the resting state with eyes closed, which does not necessarily mean that the signal has become more complex. Therefore, it may be necessary to introduce frequency band-specific normalization factors to more accurately reflect the importance of energy deviation.

[0115] In order to evaluate the changing trend of the time-frequency component over the entire time series, the rate of change of the energy of each frequency band over time is calculated. The formula for calculating the rate of change is ΔE = (E_t - E_t-1) / E_t-1, where E_t is the energy of the current time window and E_t-1 is the energy of the previous time window. The standard deviation of these rates of change is calculated. The larger the standard deviation, the more obvious the time-varying characteristics and the higher the complexity.

[0116] When analyzing time-varying characteristics, it is important to be aware of the difference between natural fluctuations in the signal and true complex changes. For example, some EEG rhythms (such as alpha waves) may fluctuate naturally over a short period of time, which does not necessarily mean that the signal has become more complex. To address this issue, multi-scale time-varying analysis can be introduced to consider both short-term and long-term trends.

[0117] Finally, all the above indicators are combined to form a unified complexity index. Using the weighted summation method, the formula is C = w1D_KL + w2(1-R) ​​+ w3H + w4E_dev + w5*std(ΔE), where w1 to w5 are weight coefficients that need to be determined through experiments and optimization. This comprehensive index provides a comprehensive assessment of the complexity of each time-frequency component, taking into account the difference between the signal and the reference, time consistency, frequency structure, energy deviation, and time-varying characteristics.

[0118] Step S102: determining characteristic noise components in corresponding time-frequency components according to multiple complexities.

[0119] Specifically, based on this complexity index, a method needs to be designed to determine which components should be considered as noise. First, a complexity threshold needs to be determined to distinguish normal signals from noise. This threshold can be determined by the formula T = μ + k * σ, where μ is the average of the complexity of all time-frequency components, σ ​​is the standard deviation, and k is an adjustable parameter, usually between 1.5 and 3. The specific value of k needs to be adjusted according to the actual application scenario and requirements. A larger k value will result in more conservative noise identification and may miss some noise; a smaller k value may mistakenly identify some normal signals as noise.

[0120] However, using only a fixed threshold may not be flexible enough, so the concept of noise probability is introduced. For each time-frequency component, the probability of being identified as noise is calculated using the formula P(noise) = 1 / (1 + exp(-α * (C - T))). This is a logistic function, and α is a parameter that controls the steepness of the function. This function maps complexity to a probability value between 0 and 1. When C is much smaller than T, P(noise) is close to 0; when C is much larger than T, P(noise) is close to 1.

[0121] Considering that noise usually has a certain continuity in time and frequency, this feature can be used to improve noise recognition. For each time-frequency point (t,f), consider the time-frequency points around it and calculate the smoothed noise probability P_smooth(noise|t,f) = Σ_i Σ_j w_ij * P(noise|t+i,f+j) / Σ_i Σ_j w_ij, where w_ij is the weight, which usually decreases as the distance of (i,j) from (0,0) increases. This smoothing process can reduce the possibility of isolated points being mistakenly identified as noise.

[0122] Different types of noise may appear at different time scales, so a multi-scale analysis method is used. The complexity can be calculated using time windows of different lengths (such as 2 seconds, 4 seconds, and 8 seconds), and then these results are combined to obtain the multi-scale complexity C_multi = Σ_s w_s * C_s, where C_s is the complexity calculated at scale s and w_s is the corresponding weight.

[0123] In addition, it is also necessary to consider that the noise characteristics of different frequency bands may be different. For example, EMG noise mainly affects the high-frequency band, while eye movement artifacts mainly affect the low-frequency band. Therefore, different thresholds are set for different frequency bands, using the formula T_band = μ_band + k_band * σ_band, where μ_band and σ_band are the mean and standard deviation of the complexity within a specific frequency band, and k_band is a specific parameter for this frequency band.

[0124] After determining various parameters and thresholds, you need to decide how to mark the noise. One method is to use a hard threshold, that is, when P_smooth(noise|t,f) is greater than the predefined probability threshold P_threshold, the time-frequency point is marked as noise. P_threshold is usually set between 0.7 and 0.9. Another more flexible method is to retain the probability value and use it in subsequent noise removal.

[0125] Let's use a specific example to illustrate this process. Suppose there is a 5-second EEG signal with a sampling rate of 500Hz. Use a 4-second sliding window with a step size of 2 seconds to get 3 time windows. In each window, calculate the complexity of 5 standard EEG frequency bands. Suppose in a certain time window, the following complexity values ​​are obtained: 0.8 for delta wave, 1.2 for theta wave, 1.5 for alpha wave, 2.1 for beta wave, and 2.8 for gamma wave. The overall complexity mean μ = 1.68 and the standard deviation σ = 0.69. If k = 2 is selected, the threshold T = 1.68 + 2 * 0.69 = 3.06.

[0126] For the γ wave, whose complexity is 2.8, its noise probability can be calculated: P(noise) = 1 / (1 + exp(-2* (2.8 - 3.06))) ≈ 0.4. This probability is relatively low, indicating that the γ wave may not be noise. However, considering that the γ wave is usually susceptible to myoelectric noise, a lower threshold may be set for the γ wave, such as T_γ = μ_γ +1.5 * σ_γ. Assuming μ_γ = 2.5 and σ_γ = 0.3, then T_γ = 2.5 + 1.5 * 0.3 = 2.95. In this case, the complexity of the γ wave of 2.8 is considered to be closer to noise.

[0127] Step S103, obtaining the environmental influencing variables corresponding to the EEG signals, performing nonlinear regression analysis based on the EEG signals and the environmental influencing variables, and obtaining the environmental regulation factors.

[0128] Specifically, first, a variety of sensors are integrated into the brain-computer interface headset, including a micro microphone to measure the ambient noise level, an electromagnetic field sensor to detect electromagnetic interference, a sensor to monitor temperature and humidity, a light-sensitive sensor to measure light intensity, and an accelerometer and gyroscope to detect the user's head movement and posture changes. The sampling rate of these sensors is set to 50 Hz, which is sufficient to capture most relevant environmental changes.

[0129] In some embodiments, the brain-computer interface headset includes multiple environmental sensors; the nonlinear regression analysis is performed based on the EEG signal and environmental influencing variables to obtain the environmental regulation factor, including: obtaining the environmental signal collected by the environmental sensor; time-aligning the EEG signal and the environmental signal; obtaining correlation information corresponding to the aligned environmental signal and the EEG signal; obtaining a significant environmental signal in the environmental signal based on the correlation information; and calculating the environmental regulation factor based on the significant environmental signal and the corresponding EEG signal.

[0130] To ensure that the environmental data and EEG data are precisely timed, a hardware-level timestamp mechanism is used. Each data sample is assigned an accurate timestamp t, expressed as: t = t_0 + n * Δt, where t_0 is the initial time, n is the sample number, and Δt is the sampling period (at a sampling rate of 50 Hz, Δt = 0.02 seconds).

[0131] The EEG signal and the environmental data are simultaneously divided into 2-second time segments. For each time segment, the key features of the EEG signal, namely the energy of the five standard EEG frequency bands (δ, θ, α, β, γ), are extracted. This calculation involves a fast Fourier transform (FFT) of the EEG signal x(t): X(f) = ∫ x(t) * e^(-j2πft) dt. Then, the power spectral density (PSD) is calculated in the corresponding frequency range: PSD(f) = |X(f)|^2 / T, where T is the time segment length (2 seconds). The energy of each frequency band, E_band, is obtained by integrating the PSD in the corresponding frequency range: E_band = ∫_f1^f2 PSD(f) df, where [f1, f2] is the frequency range of the frequency band.

[0132] Next, correlation analysis was performed. The Spearman rank correlation coefficient was used to capture the possible nonlinear relationship between environmental variables and EEG features. The calculation formula of the Spearman rank correlation coefficient is as follows: ρ = 1 - (6 * Σd_i^2) / (n * (n^2 - 1)), where d_i is the rank difference of the i-th pair of data, and n is the number of data pairs. In the calculation process, the original values ​​of the two variables are first converted to ranks, and then the rank difference d_i of each pair of data is calculated, the rank difference is squared and summed, and finally substituted into the formula to calculate ρ.

[0133] In order to capture the potential delayed effects of environmental changes on EEG signals, correlation coefficients were calculated at 0, 0.5, and 1 second lags. A sliding window method was used, with each window containing 30 consecutive 2-second time periods (a total of 1 minute of data). Each time the window was moved forward by one time period (2 seconds), all correlation coefficients were recalculated.

[0134] For each correlation coefficient calculated, perform a significance test. In the case of large samples (n > 30), a t-test can be used, and the t-statistic is calculated as follows: t = ρ * √((n-2) / (1-ρ^2)), where ρ is the Spearman correlation coefficient and n is the sample size. Calculate the p-value: p = 2 * (1 - T(|t|, df)), where T is the cumulative distribution function of the t-distribution and df = n-2 is the degree of freedom. Use a significance level of α = 0.01 and only keep correlation coefficients with p < 0.01.

[0135] In order to improve the stability of environmental control factors, smoothing processing is introduced. For each environmental variable and EEG feature pair, the 10 most recent significant correlation coefficients are retained and their median is calculated as the current environmental control factor. The median is calculated by sorting the 10 correlation coefficients by size. If n is an odd number, the median is the (n+1) / 2th number; if n is an even number, the median is the average of the n / 2th and (n / 2)+1th numbers.

[0136] The environmental control factor obtained by this method is a dynamically updated value. The environmental control factor is updated every time a new 2-second data segment is processed. The update frequency f_update can be expressed as: f_update = 1 / (2 seconds) = 0.5 Hz. The general form of the environmental control factor CF can be expressed as: CF_ij = median(ρ_ij1, ρ_ij2, ..., ρ_ij10), where i represents the environmental variable, j represents the EEG feature, and ρ_ijk is the kth significant correlation coefficient.

[0137] Through this method, a set of dynamically updated environmental regulation factors were obtained, which not only reflected the immediate impact of the environment on EEG signals, but also took into account possible delayed effects.

[0138] Step S104, obtaining a variable prediction model corresponding to the environmental influencing variable, and determining the EEG control signal according to the environmental control factor and the variable prediction model.

[0139] Specifically, first, a prediction model needs to be established for each environmental impact variable. Considering the time series characteristics of environmental variables, the autoregressive integrated moving average (ARIMA) model is chosen. The ARIMA model combines three components: autoregression (AR), difference (I), and moving average (MA), which can effectively capture the trend, periodicity, and random fluctuations of the time series.

[0140] In some embodiments, the variable prediction model is an autoregressive integrated moving average model; determining the EEG regulation signal based on the environmental regulation factors and the variable prediction model includes: inputting each of the environmental influencing variables into the corresponding autoregressive integrated moving average model to obtain environmental variable information within a preset time length; determining the EEG regulation signal based on the environmental regulation factors and the environmental variable information.

[0141] The general form of the ARIMA model can be expressed as ARIMA(p,d,q), where p is the number of autoregressive terms, d is the number of differences, and q is the number of moving average terms. For each environmental variable, the optimal values ​​of p, d, and q need to be determined. This can be achieved through grid search combined with the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC). The mathematical expression of the ARIMA model is as follows: (1- φ_1B - ... - φ_pB^p)(1 - B)^d X_t = (1 + θ_1B + ... + θ_qB^q)ε_t. Among them, B is the lag operator, φ_i is the autoregressive parameter, θ_i is the moving average parameter, and ε_t is the white noise term. In order to determine the optimal ARIMA model, follow the following:

[0142] First, the time series is tested for stationarity. The Augmented Dickey-Fuller test (ADF test) is used to determine whether the series is stationary. The null hypothesis of the ADF test is that the series has a unit root (non-stationary), and its test statistic is: τ = (γ^ -1) / SE(γ^). Where γ^ is the estimated autoregressive coefficient, and SE(γ^) is its standard error. If the calculated τ value is less than the critical value, the null hypothesis is rejected and the series is considered to be stationary. If the series is non-stationary, perform a difference operation. The difference operation is defined as: ∇X_t = X_t - X_(t-1). Repeat the difference until the series becomes stationary. The number of differences is the d value in the ARIMA model.

[0143] Next, the autocorrelation function (ACF) and partial autocorrelation function (PACF) plots of the stationary series are analyzed. ACF and PACF are defined as: ACF(k) = Cov(X_t, X_(t+k)) / √(Var(X_t)Var(X_(t+k))) PACF(k) =Corr(X_t, X_(t+k) | X_(t+1), ..., X_(t+k-1)) . The truncated position of the ACF plot gives an estimate of the number of MA terms q, while the truncated position of the PACF plot gives an estimate of the number of AR terms p. Based on these preliminary estimates, a grid search method is used to try different combinations of p and q values ​​and calculate the AIC value for each model: AIC = 2k - 2ln(L) . Where k is the number of model parameters and L is the maximum value of the likelihood function. The model with the smallest AIC value is selected as the final ARIMA model. After the ARIMA model is determined, the model parameters are estimated using the maximum likelihood estimation method. The model can then be used to make predictions about future environmental variable values. The predicted value X_t+h is calculated as: X_t+h = φ_1X_t+h-1 + ... + φ_pX_t+hp + θ_1ε_t+h-1 + ... + θ_qε_t+hq + ε_t+h. Where h is the prediction step. For each environmental influencing variable, an ARIMA model is built and used to make short-term predictions (e.g., predicting the value of an environmental variable 5 seconds into the future).

[0144] Next, it is necessary to combine the environmental control factors obtained in and these predicted values ​​to determine the EEG control signal. The environmental control factor CF_ij represents the degree of influence of environmental variable i on EEG feature j. The predicted EEG feature change can be calculated using the following formula: ΔE_j = Σ_i (CF_ij * ΔX_i). Where ΔE_j is the predicted change of EEG feature j, and ΔX_i is the predicted change of environmental variable i. Based on these predicted EEG feature changes, the EEG control signal can be constructed. The EEG control signal is essentially a vector, in which each element corresponds to the control strength of an EEG feature. The control signal S_j can be calculated using the following formula: S_j = -k_j * ΔE_j / σ_j. Where k_j is the control gain coefficient and σ_j is the historical standard deviation of EEG feature j. Dividing by σ_j is to normalize the change amplitude of different EEG features. The negative sign indicates that the purpose of the control signal is to offset the predicted change. The control gain coefficient k_j can be determined experimentally or dynamically adjusted using an adaptive algorithm. A simple adaptive method is to adjust k_j based on the prediction error: k_j(t+1) = k_j(t) + α * (ΔE_j_actual - ΔE_j_predicted)^2. Where α is the learning rate, ΔE_j_actual is the actual observed change, and ΔE_j_predicted is the predicted change. Finally, this EEG modulation signal is applied to the original EEG signal to obtain the regulated EEG signal E_j_adjusted: E_j_adjusted = E_j + S_j. This regulated EEG signal will be used in the subsequent feature extraction and classification process.

[0145] In this way, a closed-loop prediction-control method is established. The method continuously predicts the impact that environmental changes may have on EEG signals and compensates for them in advance, thereby achieving adaptive noise elimination. The advantage of this method is that it can actively respond to environmental changes rather than passively filter out noise that has been mixed into the signal, so it is possible to obtain better signal quality. At the same time, because the method takes into account the interactions between environmental variables (captured by the ARIMA model) and the complex relationship between environmental variables and EEG features (represented by environmental control factors), it can handle more complex noise situations.

[0146] Step S105, obtaining an EEG noise sequence according to the characteristic noise component and the EEG control signal, obtaining a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence, and constructing a noise characteristic vector according to the noise steady-state factor and the noise dynamic factor.

[0147] Specifically, first, define the characteristic noise component matrix N_f and the EEG control signal matrix S. The dimension of N_f is m×t, where m is the number of identified noise features and t is the number of time points. In practical applications, m usually includes 5 to 10 main types of noise, such as electromyographic noise, electrooculographic noise, electrocardiographic artifacts, environmental electromagnetic interference, equipment thermal noise, etc. Each row represents the intensity of a specific type of noise at different time points. For example, the first row of N_f may represent electromyographic noise, where each element represents the intensity of electromyographic activity detected at the corresponding time point.

[0148] In some embodiments, obtaining an EEG noise sequence according to the characteristic noise component and the EEG control signal includes: obtaining a characteristic noise component matrix corresponding to the characteristic noise component; the dimension of the characteristic noise component matrix is ​​composed of the number of noise features and the number of time points corresponding to the characteristic noise component; obtaining an EEG control signal matrix corresponding to the EEG control signal; the dimension corresponding to the EEG control signal matrix is ​​composed of the number of EEG features and the number of time points; mapping the characteristic noise component matrix and the EEG control signal matrix to the original signal space to obtain a preliminary noise sequence; and performing smoothing, amplitude normalization and thresholding on the preliminary noise sequence in sequence to obtain the EEG noise sequence.

[0149] The dimension of the S matrix is ​​k×t, where k is the number of EEG features, usually including the energy of 5 standard EEG frequency bands: delta wave (0.5-4Hz), theta wave (4-8Hz), alpha wave (8-13Hz), beta wave (13-30Hz) and gamma wave (30-100Hz). Each row represents the predicted change of an EEG feature at different time points. For example, the third row of S may represent alpha wave energy, where each element represents the predicted change of alpha wave energy at the corresponding time point.

[0150] Next, these features and predictions need to be mapped to the original signal space. This process is achieved through two linear transformations: N = W_n * N_f and C = W_s * S. Where W_n is a d×m weight matrix, W_s is a d×k weight matrix, and d is the number of channels of the original EEG signal. In a typical brain-computer interface headset, d may be a value between 2 and 8, depending on the complexity and accuracy requirements of the device.

[0151] Each column of these weight matrices represents the weight of the effect of a noise feature or EEG feature on each EEG channel. For example, the first column of W_n might represent the degree of effect of EMG noise on each EEG channel. If there is a 4-channel method, this column might look like [0.8, 0.6, 0.4, 0.2]^T, indicating that EMG noise has the greatest effect on the first channel and the least effect on the last channel. Similarly, the first column of W_s might represent the effect of delta wave energy changes on each channel, and might look like [0.5, 0.5, 0.5, 0.5]^T, indicating that delta wave energy changes have an equal effect on all channels.

[0152] Through this mapping, two matrices N and C with the same dimensions as the original EEG signal are obtained. N represents the noise estimate based on feature analysis, while C represents the signal change estimate based on environmental prediction. Adding these two matrices together, we get the initial EEG noise sequence E_noise_initial = N + C. This addition operation is based on an assumption that the signal changes caused by noise and environment are superimposed.

[0153] After obtaining the preliminary noise sequence, time smoothing is performed to ensure the temporal continuity of the noise sequence. A moving average filter is used to achieve this smoothing: E_noise_smoothed(i) = (1 / L) * Σ(j=iL / 2 to i+L / 2) E_noise_initial(j), where L is the smoothing window length. L is selected to be 1 / 10 of the sampling rate. For example, if the sampling rate is 1000Hz, L is 100 sample points, which is equivalent to a 100ms time window. This window length is chosen to effectively smooth out short-term fluctuations while maintaining sufficient time resolution.

[0154] After smoothing, amplitude normalization is performed to ensure that the amplitude of the noise sequence matches the original signal. The normalization formula is: E_noise = E_noise_smoothed * (std(E_original) / std(E_noise_smoothed)), where std() represents the standard deviation calculation and E_original is the original EEG signal. The purpose of this is to adjust the overall amplitude of the noise sequence to be consistent with the amplitude range of the original signal. This is important because it is hoped that the estimated noise can accurately reflect the actual strength of the noise component in the original signal.

[0155] To avoid over-denoising, threshold processing is introduced: E_noise_thresholded(i) = E_noise(i) if|E_noise(i)| > threshold, otherwise E_noise_thresholded(i) = 0. The threshold is set to 0.75 times the standard deviation of the original signal. The purpose is to retain small fluctuations, because these may be normal EEG activities rather than noise. The coefficient of 0.75 was determined after a large number of experiments, and it strikes a good balance between retaining useful signals and removing noise.

[0156] Next, considering that the gamma band (30-100Hz) may contain important neural activity information, it is necessary to limit the noise removal in this frequency band. Apply a bandstop filter to E_noise_thresholded: E_noise_limited = bandstop(E_noise_thresholded, 30, 100), where 30 and 100 are the low-frequency and high-frequency cutoff points of the bandstop filter, respectively. The design of this bandstop filter requires careful consideration to ensure that while effectively protecting the gamma band, it does not affect the noise removal effect of other frequency bands. Using a Butterworth filter with an order of 4 provides a good compromise, with a sufficiently steep cutoff characteristic without introducing too much phase distortion.

[0157] Finally, the band-limited noise sequence and the thresholded noise sequence are weighted averaged to obtain the final EEG noise sequence: E_noise_final = 0.8 * E_noise_limited + 0.2 * E_noise_thresholded. The purpose is to strike a balance between noise removal and signal preservation. The two weight coefficients of 0.8 and 0.2 reflect the importance of gamma band protection. By retaining 20% ​​of the unband-limited noise estimate, a certain degree of high-frequency noise removal is allowed, while greatly reducing the risk of erroneously removing useful high-frequency neural activity.

[0158] The final EEG noise sequence E_noise_final comprehensively considers characteristic noise components, environmental impact prediction, time continuity and frequency band characteristics, providing a comprehensive noise model for the subsequent noise removal process. It not only takes into account various known noise sources, such as electromyography, electrooculography and environmental interference, but also retains signal components that may contain important neural activity information through frequency band protection and threshold processing.

[0159] In some embodiments, obtaining the noise steady-state factor and the noise dynamic factor corresponding to the EEG noise sequence includes: analyzing the EEG noise sequence according to a sliding window method to obtain multiple statistics, the statistics at least including a mean, a standard deviation and a spectrum center; obtaining a first preset parameter corresponding to the statistic; obtaining first comparison information corresponding to the statistic and the first preset parameter, and obtaining the noise steady-state factor according to the first comparison information; analyzing the EEG noise sequence according to a preset step-size moving window to obtain multiple dynamic features, the dynamic features at least including an amplitude change rate, a frequency change rate and a waveform shape factor; obtaining a second preset parameter corresponding to the dynamic feature; obtaining second comparison information corresponding to the dynamic feature and the second preset parameter, and obtaining the noise dynamic factor according to the second comparison information.

[0160] First, the noise steady-state factor is calculated, which reflects the overall characteristics of the noise on a longer time scale and represents the baseline level and long-term trend of the noise. The sliding window method is used to analyze E_noise_final, and a window length of 10 seconds is selected, and the window is moved in steps of 1 second. Within each window, three key statistics are calculated: mean μ, standard deviation σ, and spectral center f_c. For each window w, the mean is calculated as μ_w = (1 / N) * Σ(i=1 to N) E_noise_final(i), where N is the number of samples in the window, usually 5000 (assuming a sampling rate of 500Hz). The standard deviation is calculated as σ_w= sqrt((1 / N) * Σ(i=1 to N) (E_noise_final(i) - μ_w)^2), which reflects the degree of fluctuation of the noise intensity.

[0161] The calculation of the spectrum center involves several steps: first, perform a fast Fourier transform (FFT) on the data in the window, X(f) = FFT(E_noise_final(w)); then calculate the power spectrum density, P(f) = |X(f)|^2 / N; finally, the spectrum center is calculated as f_c_w = Σ(f=0 to fs / 2) (f * P(f)) / Σ(f=0 to fs / 2) P(f), where fs is the sampling frequency (500Hz). The spectrum center reflects the main frequency distribution of the noise.

[0162] When calculating these statistics, a series of preset parameters are introduced. These parameters are predetermined based on a large amount of historical data and expert knowledge to initialize and constrain the calculation process. The specific preset parameters include: mean range [μ_min, μ_max] = [-50μV, 50μV], standard deviation range [σ_min, σ_max] = [5μV, 30μV], spectrum center range [f_c_min,f_c_max] = [5Hz, 30Hz], and weight coefficients [w_μ, w_σ, w_f] = [0.3, 0.4, 0.3]. These preset parameters provide a reference framework for judging whether the currently observed noise characteristics are within the normal range.

[0163] The calculated statistics are compared with the preset normal range, and weighted summed according to the weight coefficient to obtain the noise steady-state factor S_f: S_f = w_μ * (μ_w - μ_min) / (μ_max - μ_min) + w_σ *(σ_w - σ_min) / (σ_max - σ_min) + w_f * (f_c_w - f_c_min) / (f_c_max - f_c_min). This formula standardizes each statistic to the [0, 1] interval, and then weighted sums it according to the weight coefficient. The result S_f is a scalar that represents the overall steady-state level of the current noise. The higher the S_f value, the more significant the steady-state characteristics of the noise.

[0164] Next, the noise dynamic factor is calculated, which captures the rapid changes of noise in a short period of time and can reflect the instantaneous fluctuations and sudden events of noise. A shorter time window is used, usually 1 second, and the window is moved in steps of 0.1 seconds. In each short-time window, three dynamic features are calculated: amplitude change rate ΔA, frequency change rate Δf, and waveform shape factor SF. The amplitude change rate is calculated as ΔA = (A_max - A_min) / A_mean, where A_max, A_min, and A_mean are the maximum, minimum, and average amplitudes in the window, respectively. This indicator reflects the degree of rapid change in noise intensity. The frequency change rate is calculated as Δf = |f_c_end - f_c_start| / f_c_mean, where f_c_start and f_c_end are the centers of the spectrum at the beginning and end of the window, and f_c_mean is the average spectrum center. This indicator captures the rapid transition of noise frequency components.

[0165] The waveform shape factor is calculated as SF = RMS / MAV, where RMS is the root mean square value and MAV is the mean absolute value. The specific calculation is as follows: RMS = sqrt((1 / N) * Σ(i=1 to N) E_noise_final(i)^2), MAV =(1 / N) * Σ(i=1 to N) |E_noise_final(i)|. The waveform shape factor reflects the complexity of the noise waveform. Similarly, preset parameters are introduced for these dynamic features: amplitude change rate range [ΔA_min, ΔA_max] = [0.1, 1.0], frequency change rate range [Δf_min, Δf_max] = [0.05, 0.5], shape factor range [SF_min, SF_max] = [1.0, 1.5], and weight coefficients [w_ΔA, w_Δf, w_SF] = [0.4, 0.3, 0.3].

[0166] The calculated dynamic characteristics are compared with the preset range, and the noise dynamic factor D_f is obtained by weighted summation: D_f = w_ΔA * (ΔA - ΔA_min) / (ΔA_max - ΔA_min) + w_Δf * (Δf - Δf_min) / (Δf_max - Δf_min) + w_SF * (SF - SF_min) / (SF_max - SF_min). The higher the D_f value, the more drastic the dynamic change of the noise.

[0167] After obtaining the noise steady-state factor S_f and the noise dynamic factor D_f, a comprehensive noise feature description is further constructed. This description not only includes S_f and D_f, but also takes into account the interaction and time correlation between them. First, a composite factor C_f is introduced: C_f = α * S_f + β * D_f + γ * (S_f * D_f), where α, β and γ are weight coefficients, and the initial values ​​can be set to [0.4, 0.4, 0.2]. The S_f * D_f term captures the interaction between steady-state and dynamic characteristics.

[0168] Next, a time correlation factor T_f is calculated. The S_f and D_f values ​​of the last 10 seconds are saved to form two sequences S_f_hist and D_f_hist. Then the correlation coefficients of the current S_f and D_f with these historical values ​​are calculated: T_f = 0.5 * (corr(S_f, S_f_hist) + corr(D_f, D_f_hist)), where corr() is the Pearson correlation coefficient function. T_f reflects the relationship between the current noise characteristics and the recent history, which helps to identify continuous noise pattern changes.

[0169] Finally, construct a noise feature vector N_v: N_v = [S_f, D_f, C_f, T_f]. This noise feature vector N_v is a comprehensive noise feature description. It contains individual steady-state and dynamic information (S_f and D_f), their combined effect (C_f), and time correlation (T_f). This multi-dimensional description can more comprehensively characterize the characteristics of the noise and provide richer and more accurate information for the subsequent noise elimination process.

[0170] Step S106, determining the control parameters of the EEG signal according to the noise feature vector, and adjusting the signal processing unit of the brain-computer interface headset according to the control parameters to achieve adaptive noise cancellation.

[0171] Specifically, in the adaptive noise cancellation method of brain-computer interface headphones, determining and adjusting key control parameters is the core of the whole process. These parameters directly affect the performance of the signal processing unit and need to be dynamically adjusted according to the real-time noise characteristics. The main focus is on four key parameters: filter bandwidth (BW), adaptive filter coefficient (W), nonlinear suppression threshold (θ) and frequency domain regularization factor (λ). These parameters are closely related to the different components of the noise feature vector N_v = [S_f, D_f, C_f, T_f].

[0172] The filter bandwidth BW is a key parameter in the signal preprocessing stage, which determines the response of the method to noise of different frequencies. BW is mainly affected by the steady-state characteristics S_f and dynamic characteristics D_f of the noise. A nonlinear mapping function is designed: BW = BW_min + (BW_max - BW_min) * sigmoid(α1 * S_f + β1 * D_f). Here, BW_min and BW_max are the preset bandwidth ranges, and α1 and β1 are weight coefficients. The sigmoid function ensures that the bandwidth value is always within a reasonable range and provides a smooth adjustment process. When the noise is relatively stable (S_f is large), the bandwidth will be relatively narrow, improving the filtering accuracy; when the noise changes drastically (D_f is large), the bandwidth will increase accordingly to capture a wider range of noise frequencies. For example, in a quiet indoor environment, S_f may be close to 1 and D_f is close to 0. At this time, BW will be close to BW_min, achieving accurate narrowband filtering. In contrast, in a noisy outdoor environment, D_f may be close to 1, at which point BW will increase significantly to cope with the complex noise environment.

[0173] The update of the adaptive filter coefficient W is the core of the noise removal process. It is controlled by the adaptive step size μ, which is mainly related to the composite factor C_f. An exponential function is used for mapping: μ = μ_max * exp(-α2 * C_f). Here μ_max is the preset maximum step size and α2 is the scaling factor. This design ensures that when the noise characteristics are complex (C_f is large), the method uses a smaller step size to improve stability; when the noise characteristics are simple, a larger step size can speed up the convergence of the method. The update of the filter coefficient follows the minimum mean square error (LMS) algorithm: W(n+1) = W(n) + μ * e(n)* X(n), where e(n) is the estimation error and X(n) is the input signal. In practical applications, for example, when the user starts walking from a stationary state, C_f will increase, resulting in a decrease in μ, allowing the filter to stably adapt to the new noise environment.

[0174] The nonlinear suppression threshold θ is mainly used to deal with sudden noise, which mainly considers the dynamic characteristics of the noise D_f. θ is calculated using the following formula: θ = θ_min + (θ_max - θ_min) * (1 - exp(-α3 * D_f)). Here θ_min and θ_max are the preset minimum and maximum thresholds, respectively, and α3 is a scaling parameter. This design ensures that when dynamic noise increases (D_f is large), the strength of nonlinear suppression also increases, effectively handling sudden noise. For example, when a user suddenly comes into contact with an electromagnetic interference source, D_f will increase rapidly, and θ will increase accordingly, enhancing the method's ability to suppress sudden noise.

[0175] The design of the frequency domain regularization factor λ takes into account the time correlation T_f, and its calculation formula is: λ = λ_base * (1+ tanh(α4 * T_f)). Here λ_base is the basic regularization factor and α4 is the scaling parameter. When the time correlation of the noise increases, the strength of the regularization is increased to suppress possible overfitting and maintain the smoothness of the signal. In practical applications, if continuous periodic interference (such as power line noise) is detected, T_f will increase, and λ will increase accordingly, enhancing the method's ability to suppress such noise.

[0176] Once these control parameters are determined, the signal processing unit dynamically adjusts its operating mode based on these parameters. This process includes multiple consecutive stages, from pre-filtering to frequency domain regularization, each stage is optimized for a specific type of noise.

[0177] The pre-filtering stage uses a digital bandpass filter with a bandwidth of BW, whose transfer function H(z) can be expressed as a polynomial ratio. The filter coefficients are dynamically adjusted based on the real-time calculated BW to ensure effective removal of out-of-band noise. Next, the adaptive filtering stage uses the LMS algorithm to update the filter coefficients W, and the output signal y(n) is calculated by the inner product of W and the input signal X(n). This stage is able to adaptively track and eliminate non-stationary noise. Then, the nonlinear suppression stage applies a soft threshold function to effectively suppress residual impulse noise. Finally, in the frequency domain regularization stage, Tikhonov regularization is applied to balance signal fidelity and noise suppression by adjusting λ.

[0178] In order to achieve dynamic update of parameters, the method adopts the sliding window method to recalculate the noise feature vector N_v at fixed time intervals (such as 0.5 seconds) and update the control parameters accordingly. To avoid instability caused by sudden changes in parameters, exponential weighted average is used for smooth update: P_new = γ * P_calculated + (1 - γ) * P_old, where P represents any control parameter and γ is the smoothing factor (typical value is 0.2). This method can respond to changes in noise characteristics in a timely manner and avoid drastic changes in parameters due to instantaneous fluctuations.

[0179] Through this carefully designed parameter determination and adjustment mechanism, the signal processing unit of the brain-computer interface headset can adapt to different noise environments in real time. It can effectively handle various types of noise, including steady-state background noise, sudden interference, nonlinear distortion, etc., while retaining useful EEG signal components to the greatest extent. This adaptive ability greatly improves the reliability and effectiveness of the brain-computer interface in complex and dynamic environments.

[0180] In order to perform the adaptive noise cancellation method for brain-computer interface headphones corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of an adaptive noise cancellation device 200 provided in an embodiment of the present application is shown. For the convenience of description, only the parts related to the present embodiment are shown. The adaptive noise cancellation device 200 provided in an embodiment of the present application includes:

[0181] The complexity acquisition module 201 is used to acquire the EEG signal collected by the brain-computer interface headset, acquire the coefficient matrix of the EEG signal in the time-frequency plane, acquire the time-frequency component set corresponding to the coefficient matrix, and acquire the complexity corresponding to each time-frequency component in the time-frequency component set;

[0182] A component determination module 202, configured to determine a characteristic noise component in a corresponding time-frequency component according to a plurality of said complexities;

[0183] A factor acquisition module 203 is used to acquire the environmental influencing variables corresponding to the EEG signal, and to perform nonlinear regression analysis based on the EEG signal and the environmental influencing variables to acquire the environmental regulation factors;

[0184] A model acquisition module 204 is used to acquire a variable prediction model corresponding to the environmental influencing variable, and determine an EEG control signal according to the environmental control factor and the variable prediction model;

[0185] A vector acquisition module 205 is used to acquire an EEG noise sequence according to the characteristic noise component and the EEG control signal, acquire a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence, and construct a noise characteristic vector according to the noise steady-state factor and the noise dynamic factor;

[0186] The noise elimination module 206 is used to determine the control parameters of the fixed EEG signal according to the noise feature vector, and adjust the signal processing unit of the brain-computer interface headset according to the control parameters to achieve adaptive noise elimination.

[0187] The above-mentioned adaptive noise cancellation device 200 can implement the adaptive noise cancellation method for brain-computer interface headphones of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of the present application can refer to the contents of the above-mentioned method embodiment, and will not be repeated in this embodiment.

[0188] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.

[0189] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0190] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0191] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0192] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0193] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.

[0194] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

[0195] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0196] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. An adaptive noise cancellation method for a brain-computer interface headset, characterized in that: include: Obtaining an electroencephalogram (EEG) signal collected by the brain-computer interface headset, obtaining a coefficient matrix of the EEG signal in a time-frequency plane, obtaining a time-frequency component set corresponding to the coefficient matrix, and obtaining the complexity corresponding to each time-frequency component in the time-frequency component set; Determining a characteristic noise component in corresponding time-frequency components according to a plurality of said complexities; Obtaining environmental influencing variables corresponding to the EEG signal, performing nonlinear regression analysis based on the EEG signal and the environmental influencing variables, and obtaining environmental regulation factors; Obtaining a variable prediction model corresponding to the environmental influencing variable, and determining an EEG control signal according to the environmental control factor and the variable prediction model; According to the characteristic noise component and the EEG control signal, an EEG noise sequence is obtained, a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence are obtained, and a noise characteristic vector is constructed according to the noise steady-state factor and the noise dynamic factor; The control parameters of the electroencephalogram signal are determined according to the noise characteristic vector, and the signal processing unit of the brain-computer interface headset is adjusted according to the control parameters to achieve adaptive noise cancellation.

2. The method according to claim 1, characterized in that The step of obtaining a coefficient matrix of the EEG signal in a time-frequency plane includes: Performing continuous wavelet transform on the EEG signal to obtain a coefficient matrix of the EEG signal on a time scale plane; The coefficient matrix is ​​converted from the time scale plane to the time frequency plane to obtain the coefficient matrix of the EEG signal in the time frequency plane.

3. The method according to claim 2, characterized in that The obtaining the complexity corresponding to each time-frequency component in the time-frequency component set includes: Acquire a reference EEG signal corresponding to the EEG signal and time window information and energy distribution information corresponding to the reference EEG signal; The complexity corresponding to each of the time-frequency components is calculated according to the reference EEG signal, the time window information and the energy distribution information.

4. The method according to claim 3, characterized in that The calculating the complexity corresponding to each of the time-frequency components according to the reference EEG signal, the time window information and the energy distribution information comprises: Obtaining energy distribution differences between the time-frequency component and the reference EEG signal in a plurality of preset standard EEG frequency bands; Obtaining a KL divergence value corresponding to the energy distribution difference; Obtaining a temporal consistency coefficient of each of the time-frequency components; Obtaining the spectrum entropy corresponding to each of the time-frequency components; Obtaining energy deviation coefficients of the time-frequency component and the reference EEG signal; Obtaining the rate of change of the time-frequency component over time; The complexity is calculated according to the KL divergence value, consistency coefficient, spectral entropy, energy deviation coefficient and change rate.

5. The method according to claim 1, characterized in that The brain-computer interface headset includes a plurality of environmental sensors; the nonlinear regression analysis is performed based on the EEG signal and the environmental influencing variables to obtain the environmental regulation factor, including: Acquiring an environmental signal collected by the environmental sensor; Time-aligning the EEG signal and the environmental signal; Acquire correlation information corresponding to the aligned environmental signal and the EEG signal; Acquire a significant environmental signal from the environmental signal according to the correlation information; The environmental regulation factor is calculated based on the significant environmental signal and the corresponding EEG signal.

6. The method according to claim 1, characterized in that The variable prediction model is an autoregressive integrated moving average model; the step of determining the EEG control signal according to the environmental control factor and the variable prediction model includes: Input each of the environmental impact variables into a corresponding autoregressive integrated moving average model to obtain environmental variable information within a preset time period; The electroencephalogram control signal is determined according to the environmental control factor and the environmental variable information.

7. The method according to claim 1, characterized in that The step of acquiring an EEG noise sequence according to the characteristic noise component and the EEG control signal comprises: Acquire a characteristic noise component matrix corresponding to the characteristic noise component; the dimension of the characteristic noise component matrix is ​​formed according to the number of noise features and the number of time points corresponding to the characteristic noise component; Obtaining an electroencephalogram control signal matrix corresponding to the electroencephalogram control signal; the dimension corresponding to the electroencephalogram control signal matrix is ​​composed of the number of electroencephalogram features and the number of time points; Mapping the characteristic noise component matrix and the EEG control signal matrix to the original signal space to obtain a preliminary noise sequence; The preliminary noise sequence is subjected to smoothing processing, amplitude normalization and threshold processing in sequence to obtain the EEG noise sequence.

8. The method according to claim 1, characterized in that The step of obtaining the noise steady-state factor and the noise dynamic factor corresponding to the EEG noise sequence includes: Analyze the EEG noise sequence according to a sliding window method to obtain multiple statistics, wherein the statistics at least include a mean, a standard deviation, and a spectrum center; Obtaining a first preset parameter corresponding to the statistic; Acquire first comparison information corresponding to the statistic and the first preset parameter, and acquire the noise steady-state factor according to the first comparison information; Analyze the EEG noise sequence according to a preset step-size moving window to obtain a plurality of dynamic features, wherein the dynamic features at least include an amplitude change rate, a frequency change rate, and a waveform shape factor; Obtaining a second preset parameter corresponding to the dynamic feature; Acquire second comparison information corresponding to the dynamic feature and the second preset parameter, and acquire the noise dynamic factor according to the second comparison information.

9. An adaptive noise cancellation device, characterized in that: include: A complexity acquisition module is used to acquire the EEG signal collected by the brain-computer interface headset, acquire the coefficient matrix of the EEG signal in the time-frequency plane, acquire the time-frequency component set corresponding to the coefficient matrix, and acquire the complexity corresponding to each time-frequency component in the time-frequency component set; A component determination module, used to determine a characteristic noise component in a corresponding time-frequency component according to a plurality of said complexities; A factor acquisition module is used to acquire the environmental influencing variables corresponding to the EEG signal, and perform nonlinear regression analysis based on the EEG signal and the environmental influencing variables to acquire the environmental regulation factors; A model acquisition module, used to acquire a variable prediction model corresponding to the environmental influencing variable, and determine an EEG control signal according to the environmental control factor and the variable prediction model; A vector acquisition module, used to acquire an EEG noise sequence according to the characteristic noise component and the EEG control signal, acquire a noise steady-state factor and a noise dynamic factor corresponding to the EEG noise sequence, and construct a noise characteristic vector according to the noise steady-state factor and the noise dynamic factor; The noise elimination module is used to determine the control parameters of the electroencephalogram signal according to the noise feature vector, and adjust the signal processing unit of the brain-computer interface headset according to the control parameters to achieve adaptive noise elimination.

10. A computer device, characterized in that: The method comprises a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the method according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium

    CN117349603A

  • Brain-computer interface system data optimization processing method

    CN117421539A