Self-adaptive brain-computer interface feedback calibration method and system
An adaptive brain-computer interface feedback calibration method based on multi-dimensional signal quality evaluation and dynamic channel weight allocation solves the calibration accuracy and anti-interference problems of traditional brain-computer interface systems in complex environments, improves recognition accuracy and stability, and is suitable for long-term applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional brain-computer interface systems suffer from insufficient calibration accuracy, poor adaptability, and weak anti-interference performance in long-term, non-stationary environments, making it difficult to effectively analyze the non-stationarity of EEG signals and suppress artifact interference.
The comprehensive quality factor is calculated in real time using multi-dimensional signal quality evaluation indicators, and channel weights are dynamically allocated. Combined with spatial filtering algorithms and condition triggering mechanisms, adaptive model updates and noise suppression are achieved.
It improves the recognition accuracy and stability of brain-computer interface systems in complex environments, ensures that the model is fine-tuned based on reliable data, adapts to the drift of users' physiological states, and achieves adaptive capability and smoothness for long-term applications.
Smart Images

Figure CN122018684A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of brain-computer interfaces, specifically relating to an adaptive brain-computer interface feedback calibration method and system. Background Technology
[0002] Brain-computer interface (BCI) technology, as a cutting-edge means of enabling direct information interaction between the brain and external devices, has significant application value in medical rehabilitation, assisted driving, and neuroengineering. Electroencephalogram (EEG) signals, as its core information carrier, capture the electrophysiological activity of the central nervous system, providing fundamental data for analyzing the user's cognitive state and motor intentions. However, BCIs face complex electrophysiological environments in practical applications. Especially in long-duration interactive tasks, the drift of the user's physiological state and the coupling of multi-source environmental noise place higher demands on the system's calibration accuracy and real-time feedback capabilities.
[0003] However, traditional calibration methods typically rely on static training or fixed online update steps before the experiment, making it difficult to effectively resolve the extremely strong non-stationarity of EEG signals. At the same time, due to electrode impedance fluctuations, electromyographic interference from limb movements, and the presence of environmental electromagnetic noise, the acquisition system often captures abnormal signals containing a large number of artifacts. Existing model update logic lacks the ability to dynamically perceive signal quality, leading to contamination of classifier parameters and causing a precipitous drop in recognition accuracy. In addition, traditional solutions lack dynamic weighting mechanisms for multi-source heterogeneous channels, making it impossible to automatically adjust the feature contribution of each channel based on the real-time signal-to-noise ratio. This makes it difficult to achieve adaptive fine-tuning of parameters while ensuring model purity, resulting in insufficient robustness of the system in complex environments.
[0004] Therefore, existing brain-computer interface (BCI) systems often suffer from insufficient calibration accuracy, poor adaptability, and weak anti-interference performance when facing long-term, non-stationary real-world application scenarios. It is necessary to propose an adaptive feedback calibration method that can evaluate signal quality in real time, dynamically adjust channel weights, and trigger model updates under reliable conditions, in order to improve the stability and recognition performance of BCI systems in real-world environments. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides an adaptive brain-computer interface feedback calibration method and system, employing the following technical solution.
[0006] Firstly, an adaptive brain-computer interface feedback calibration method includes:
[0007] S1: Real-time acquisition of multi-channel EEG signals, and calculation of the comprehensive quality factor of each channel based on multi-dimensional evaluation indicators including at least time domain features, frequency band energy distribution features, artifact recognition results based on lightweight deep convolutional neural networks, and electrode contact impedance.
[0008] S2: Based on the comprehensive quality factor, the initial weights of each channel are dynamically allocated to form a weight vector, and the weight vector is coupled to the covariance matrix calculation process of the spatial filtering algorithm to generate a spatial projection matrix that can be adaptively offset according to the real-time signal quality. The weighted channel signals are then spatially filtered to extract feature vectors.
[0009] S3: Monitor the output confidence of the classifier on the feature vector and the comprehensive quality factor in real time. When the output confidence shows a continuous downward trend while the signal quality is continuously higher than the first preset threshold, it is determined that the user's physiological state is drifting and the incremental update of the model parameters is triggered. At the same time, when the signal quality is lower than the second preset threshold, the model protection mechanism is triggered to suspend the update.
[0010] Preferably, in step S2, coupling the weight vector to the covariance matrix calculation process of the spatial filtering algorithm specifically includes:
[0011] The original signal of each channel is weighted based on the weight vector to obtain the weighted channel signal;
[0012] The average covariance matrix for each type of task is calculated using the weighted channel signals.
[0013] Solve for the spatial projection matrix based on the average covariance matrix;
[0014] The signal is projected using the spatial projection matrix, and the variance features of the projected signal are calculated to form the feature vector.
[0015] Preferably, step S2 further includes:
[0016] After obtaining the weight vector by allocating initial weights based on the comprehensive quality factor, a joint optimization objective including an L2 regularization term and a Laplace smoothing constraint term constructed based on the physical adjacency relationship of the channels is introduced to optimize the weight vector, so as to obtain an optimized weight vector with smooth spatial distribution and avoid excessive concentration on individual channels, and the optimized weight vector is used for the calculation of the covariance matrix.
[0017] Preferably, in step S1, the multi-dimensional evaluation indicators used to calculate the comprehensive quality factor also include inter-channel spatial consistency analysis indicators based on Pearson correlation coefficient and / or Moran index.
[0018] Preferably, in step S3, triggering the incremental update of model parameters specifically involves:
[0019] The gradient descent method or its variants are used, with the feature vector corresponding to the trigger period as training data, the gradient is calculated with a preset loss function, and the model parameters are fine-tuned with a preset small learning rate.
[0020] Preferably, step S3 further includes a calibration conformity assessment step:
[0021] The weighted composite deviation value, which includes spatial mismatch rate, target deviation and execution lag coefficient, is calculated periodically, and its mean square error is calculated within an evaluation period.
[0022] When the mean square error of multiple consecutive evaluation periods exceeds the preset tolerance limit, an early warning or protection mechanism is triggered.
[0023] Preferably, a silent calibration step is also included:
[0024] In a background thread that runs parallel to the main user interaction task, the real-time signal quality evaluation step and the condition-triggered adaptive calibration step are executed periodically to achieve automated calibration without user awareness.
[0025] Preferably, the silent calibration step further includes a baseline model progressive evolution strategy:
[0026] Store a baseline model derived from the user's initial stable calibration;
[0027] Periodically calculate the normalized deviation between the current working model parameters and the baseline model parameters;
[0028] When the deviation exceeds the preset evolution threshold and the system's online recognition rate remains stable, the parameter state of the current working model is updated to a new benchmark model.
[0029] Preferably, the method is implemented using a distributed processing architecture, wherein:
[0030] In step S1, the calculation of basic quality indicators and the preliminary labeling of artifacts, which have high real-time requirements, are performed in the front-end perception layer integrated into the portable EEG acquisition device.
[0031] Step S1 involves the calculation of a comprehensive quality factor through complex spectrum analysis and global fusion, while steps S2 and S3 are executed in the back-end computing layer outside the front-end perception layer.
[0032] The front-end perception layer sends the calculated basic quality indicators and preprocessed signals to the back-end computing layer.
[0033] Secondly, an adaptive brain-computer interface feedback calibration system includes:
[0034] The signal acquisition and quality assessment module is configured to acquire multi-channel EEG signals in real time and calculate the comprehensive quality factor of each channel.
[0035] The dynamic weighting and feature extraction module is configured to dynamically generate channel weight vectors based on the comprehensive quality factor, and couple the weight vectors to the covariance calculation of the spatial filter to perform adaptive spatial filtering and extract feature vectors.
[0036] The condition-triggered calibration and model management module is configured to monitor classifier confidence and signal quality, trigger incremental model updates when physiological state drift is detected, and trigger model protection when signal quality is too low.
[0037] The dynamic weighting and feature extraction module and the condition-triggered calibration and model management module form a closed-loop linkage based on the comprehensive quality factor output by the signal acquisition and quality evaluation module.
[0038] In summary, this application includes at least one of the following beneficial technical effects:
[0039] 1. This invention calculates a multi-dimensional comprehensive quality factor that integrates time-domain, frequency-domain, artifact recognition, and impedance information in real time, and dynamically allocates the weights of each channel based on this factor. Then, the weight vector is coupled to the calculation of the covariance matrix of spatial filtering, realizing the adaptive shift of the spatial projection matrix according to the signal quality. This allows the feature extraction process to automatically focus on high signal-to-noise ratio channels, effectively suppressing the interference of noise and artifacts, thereby extracting purer and more discriminative neural features and improving the recognition accuracy and stability of the brain-computer interface system in complex and non-stationary environments.
[0040] 2. This invention jointly monitors the confidence level of the classifier output and the real-time signal quality. Only when the signal quality remains consistently good while the confidence level shows a downward trend is it determined to be a user physiological state drift and an incremental update is triggered. At the same time, updates are automatically paused when the signal quality is below a threshold. This dual judgment mechanism effectively distinguishes whether the performance degradation is due to physiological drift or external noise, avoids the contamination of model parameters by low-quality data, and ensures that the model is only gradually fine-tuned based on reliable data, thereby improving the system's adaptive capability and overall reliability during long-term use.
[0041] 3. This invention achieves automated online calibration without the user's awareness by periodically performing signal quality evaluation and conditional trigger calibration in a background thread that runs parallel to the main interaction task. Combined with a baseline model progressive evolution strategy, the system can cautiously update the baseline model state based on parameter deviation and recognition rate stability, thereby autonomously tracking the user's slow physiological drift for up to several hours. This not only avoids the interruption of the interaction process by explicit calibration tasks and ensures the smoothness of use, but also enables the system to have the ability to continuously self-optimize and maintain long-term stability, making it particularly suitable for long-term application scenarios such as medical rehabilitation and neuro-training. Attached Figure Description
[0042] Figure 1This is a flowchart illustrating an adaptive brain-computer interface feedback calibration method according to the present invention.
[0043] Figure 2 This is a schematic diagram of the condition-triggered adaptive calibration process in this invention;
[0044] Figure 3 This is a flowchart illustrating the real-time signal quality evaluation and dynamic weighting of multi-source heterogeneous channels in this invention. Detailed Implementation
[0045] To further illustrate the technical means and effects adopted by the present invention in order to achieve the intended purpose, the following detailed description is provided in conjunction with the accompanying drawings and preferred embodiments, based on specific implementation methods of the present invention.
[0046] Example 1
[0047] Currently, in the practical application of brain-computer interface systems, the acquired EEG signals are highly non-stationary due to changes in electrode impedance, electromyographic interference generated by user limb movements, and environmental electromagnetic noise. Conventional calibration methods usually involve a one-time training before the experiment begins, or a fixed online update step size.
[0048] However, when the signal is severely interfered with, such as when the user blinks, swallows, or the electrodes become loose, conventional systems will still include these signals containing a large number of artifacts in the model update logic, causing the classifier parameters to be contaminated, which in turn causes a precipitous drop in recognition accuracy. Currently, there is a lack of an effective means to dynamically adjust calibration weights and update strategies based on real-time signal quality.
[0049] To address the aforementioned technical problems, this invention proposes an adaptive brain-computer interface feedback calibration method, comprising the following steps:
[0050] Step S1: Real-time signal quality evaluation. Its execution logic involves constructing a multi-dimensional signal purity evaluation system to ensure the reliability of input data in subsequent feature extraction stages. The specific implementation includes the following sub-steps:
[0051] S101: Acquire multi-channel EEG signals using a signal acquisition unit.
[0052] In this embodiment, an EEG acquisition cap equipped with 64 wet or semi-dry electrodes is used. The electrode layout follows the international 10-20 standard system, and the cap is in contact with the user's scalp through highly conductive silver / silver chloride electrodes.
[0053] The signal sampling frequency is set to 1000 Hz, and the resolution is 24 bits.
[0054] In the preprocessing stage, the signal frequency is limited to between 0.5 Hz and 100 Hz by a built-in bandpass filter, covering the main physiological frequency bands including δ, θ, α, β and γ; at the same time, a second-order IIR notch filter is used to suppress 50 Hz power frequency interference, so as to minimize the impact on the signal phase while ensuring the filtering accuracy.
[0055] It should be noted that the above parameters are standard configurations in this field and can be adapted to specific devices and application environments.
[0056] S102: Set the sliding window length to 200 milliseconds to 500 milliseconds, with an overlap rate of 50%, and calculate the mean, standard deviation, and peak-to-peak value of the signal in real time within each window.
[0057] By monitoring whether the peak-to-peak value exceeds the abrupt change threshold of 100 microvolts within 50 milliseconds, baseline drift caused by electrode loosening or large limb movements can be identified.
[0058] The mutation threshold is based on the amplitude difference range between common electromyography artifacts and normal electroencephalogram (EEG) signals, and can be fine-tuned during system initialization based on device characteristics and individual user differences to improve the applicability of the detection.
[0059] S103: Calculate the kurtosis of the EEG signal within each sliding window.
[0060] Since artifacts such as electrooculography (EOG) and electromyography (EMG) often appear as spikes or tails, their kurtosis values are usually significantly higher than those of stable EEG signals. Here, the empirical threshold is set to 5.0. This value is based on the statistical distribution of typical artifacts and normal signals in a large amount of experimental data. In practical applications, it can be fine-tuned according to the specific acquisition equipment and user group.
[0061] Meanwhile, the Pearson correlation coefficient between each channel is calculated. Normal EEG signals have a certain continuity in the scalp space, and adjacent channels often show a high correlation. If the correlation coefficient between a certain channel and its neighboring channels is consistently below 0.3 within multiple consecutive windows, the channel is determined to be an isolated noise channel, which may be caused by poor electrode contact or local interference.
[0062] To further quantify the consistency of signals across the scalp space, the Moran index is introduced for spatial autocorrelation analysis. This index reflects the clustering or dispersion trend of signals between channels, and its calculation formula is as follows:
[0063]
[0064] Where n is the total number of channels. and The average value of the channel signal. The global mean. These are the elements of a spatial weight matrix constructed based on electrode distance.
[0065] If the Moran index of a certain channel deviates significantly from the expected range established based on normal resting-state data, such as being below 0.2 or above 0.8, then the signal in that region is considered to have spatial inconsistency, and the quality score of the corresponding channel will be lowered.
[0066] S104: Calculate the proportion of each frequency band in the total signal energy using Fast Fourier Transform, such as the alpha band (8-13 Hz), beta band (13-30 Hz), and gamma band (30-100 Hz).
[0067] Normal EEG energy distribution in different frequency bands follows certain patterns under different cognitive states. For example, alpha waves dominate when resting with eyes closed, while beta and gamma bands are more active during motor imagery or cognitive tasks. By monitoring abnormal changes in specific frequency band energy, such as a sudden and significant increase in the proportion of gamma band energy, it often indicates the presence of electromyographic artifacts, which can help determine the physiological rationality of the signal.
[0068] The system can identify frequency band energy patterns that do not conform to physiological laws by combining the user's current interactive task status or comparing it with the user's individual resting state baseline, and then evaluate the signal quality.
[0069] S105: Real-time detection of specific artifacts using a lightweight deep convolutional neural network.
[0070] This lightweight deep convolutional neural network takes a two-dimensional spatiotemporal matrix of multi-channel EEG as input and contains three convolutional layers and two fully connected layers. The convolutional layers are used to extract spatiotemporal features, and the fully connected layers are used for classification output.
[0071] The network structure has been specifically optimized, and on an embedded processor, the single-frame inference time is less than 2 milliseconds, which meets the real-time requirements.
[0072] The network output consists of probability scores for common artifacts such as blinking, swallowing, and teeth grinding. These scores will serve as one of the important bases for signal quality evaluation and will be incorporated into the subsequent calculation of the comprehensive quality factor.
[0073] The specific parameters of the network, such as kernel size, stride, and activation function, can be adapted and adjusted according to the computing power and detection requirements of the actual deployment platform.
[0074] S106: By injecting a weak alternating current with a frequency of 10 Hz, the contact impedance between each electrode and the scalp is measured in real time. This method is a commonly used impedance monitoring method in EEG acquisition systems to evaluate the quality of electrode contact.
[0075] If the impedance value of a certain channel exceeds 20 kilohms, it usually indicates poor electrode contact or a high risk of detachment. The system will automatically reduce the initial trust weight of that channel in subsequent feature extraction.
[0076] This threshold is set based on the stable operating range of a typical wet / semi-dry electrode system, and can be adaptively adjusted according to the electrode type and the user's scalp characteristics in practical applications.
[0077] S107: Combining the evaluation indicators obtained from the previous steps, construct a multi-dimensional evaluation vector, including the signal-to-noise ratio estimate, power spectral density distribution characteristics, artifact detection probability score, and impedance monitoring data.
[0078] These indicators are combined into a comprehensive quality factor Q between 0 and 1 using a weighted summation algorithm.
[0079] The weights of each indicator can be preset or dynamically adjusted according to their importance in the current application scenario. The closer the Q value is to 1, the higher the signal quality and the more reliable it is; the closer it is to 0, the more severe the signal interference.
[0080] This comprehensive quality factor will serve as the core basis for subsequent channel dynamic weighting and calibration triggering judgments.
[0081] Step S2: Dynamic weighting of multi-source heterogeneous channels. Its core lies in dynamically adjusting the contribution of each channel to feature extraction based on real-time fluctuations in signal quality, thereby enhancing effective neural signals and suppressing noise. The specific implementation includes the following sub-steps:
[0082] S201: Calculate the initial channel weights based on the comprehensive quality factor.
[0083] Based on the overall quality factor Q of each channel obtained in step S1, the system defines an initial weight vector that matches the number of channels n. .
[0084] The weighting rules are as follows:
[0085] For channels with a Q value below 0.4, their signal quality is considered poor and they may be significantly affected by noise. Therefore, their weight coefficients are set in a low range below 0.1, such as 0.05, to effectively suppress the contribution of this channel in subsequent feature extraction.
[0086] For channels with a Q value higher than 0.8, their signal quality is considered to be excellent and retain complete neural information. Therefore, their weight coefficient is kept at 1.0 to ensure that high-quality signals are fully expressed.
[0087] For channels with Q values between 0.4 and 0.8, the signal quality is moderate, and the weighting coefficients can be continuously adjusted between 0.1 and 1.0 according to specific application requirements through linear interpolation, exponential interpolation, or other smoothing mapping functions.
[0088] It should be noted that the thresholds of 0.4 and 0.8 mentioned above are set based on the correlation analysis of signal quality and classification performance in a large amount of experimental data. In actual systems, they can be fine-tuned according to individual user differences or task requirements.
[0089] S202: Couple the weights to the spatial filtering algorithm to generate the projection matrix.
[0090] The system uses a shared spatial mode algorithm for spatial filtering. The core of this algorithm is to obtain a discriminative spatial projection matrix by maximizing the variance ratio of two types of task signals, such as imagining the movement of the left hand versus imagining the movement of the right hand. In this step, the weight vector W obtained in S201 is coupled into the calculation process of the covariance matrix, so that the spatial projection matrix can be adaptively shifted according to the real-time signal quality.
[0091] Specifically, in calculating the average covariance matrix of the c-th type of task At that time, for the original signal of each channel i First, perform weighted processing, that is Then, it participates in the covariance calculation. This weighting method is equivalent to introducing channel credibility information into the covariance estimation, so that the algorithm naturally biases towards the channel with high signal quality when optimizing the projection direction.
[0092] To ensure the numerical stability of the weighted covariance matrix, the weighted signal can be normalized as appropriate, for example, to maintain its original total energy level.
[0093] The number of projection directions, i.e. feature vectors, extracted by the shared spatial pattern algorithm is usually set to 4 to 6 pairs. The logarithmic variance of the projected signal is calculated and used as the final feature vector input to the classifier.
[0094] The above S201 and S202 together constitute an adaptive weighted spatial filter based on signal quality. S201 dynamically allocates weights according to quantization indicators, while S202 embeds the weight information into the core calculation of the classic spatial filtering algorithm, thereby realizing a closed-loop linkage between the feature extraction stage and the front-end quality evaluation.
[0095] S203: Introduce regularization and spatial smoothing constraints to optimize weight allocation.
[0096] To prevent excessive weight concentration on a very small number of channels in extremely noisy environments, such as when multiple electrodes fail simultaneously, leading to insufficient feature space coverage and model overfitting, this step introduces regularization and spatial smoothing constraints for joint optimization based on the initial weight vector W obtained in S201. Specifically, this includes:
[0097] S2031: Introduce L2 regularization term.
[0098] By constructing an optimization objective, such as minimizing ,in The initial weight vector assigned to S201, The regularization coefficient is . The value can range from 0.001 to 0.1.
[0099] The optimization objective is to maintain the initial weight allocation as much as possible while penalizing excessively large norms of the weight vector, thereby encouraging a more even weight distribution and preventing it from becoming overly focused on individual channels.
[0100] S2032: Introduce Laplace space smoothing constraints.
[0101] Considering the continuity of EEG signals in the scalp space, the allocation of dynamic weights must conform to the physical topological relationship between channels.
[0102] The system constructs a Laplacian matrix L based on the physical adjacency relationships of the channels, and optimizes the weight vector W to satisfy the smoothness constraint, i.e., minimizes... item.
[0103] This constraint penalizes drastic changes in weights between adjacent channels, resulting in a smooth transition of the weight matrix in space.
[0104] In practical optimization, the L2 regularization term and the Laplace smoothing term can be combined to form a comprehensive optimization objective for solving, thereby obtaining the final optimized weight vector. The optimized weights will replace the initial weights and be used for the weighted covariance calculation in S202. This effectively avoids unreasonable and drastic changes in the weight distribution in space due to single electrode failure or local interference, and maintains the physical rationality and stability of the spatial filtering process.
[0105] In summary, step S2 achieves dynamic weighting and optimized filtering of multi-source heterogeneous channels. First, initial weights are allocated based on real-time signal quality. Then, the weight information is deeply integrated into the computational kernel of the shared spatial pattern algorithm to guide feature extraction to focus on high signal-to-noise ratio regions. Finally, the weights are globally optimized through regularization and spatial smoothing techniques to ensure the robustness and spatial rationality of feature extraction.
[0106] Step S3, condition-triggered adaptive calibration, aims to balance the real-time performance and stability of model updates, ensuring that calibration is triggered only when the signal is reliable and the model performance experiences a non-noise-related degradation. The specific implementation includes the following sub-steps:
[0107] S301: Monitor classifier output and evaluate triggering conditions in real time.
[0108] The system continuously monitors the classifier, such as support vector machine or linear discriminant analysis, and scores the posterior probability or confidence of the current input feature. This score reflects the geometric distance between the feature point and the classification hyperplane or the probability of belonging to a certain class. At the same time, the system obtains the real-time comprehensive quality factor Q provided by step S1.
[0109] The conditions for triggering model updates are set as follows:
[0110] When the confidence score output by the classifier shows a clear and continuous downward trend over a period of time, such as five consecutive sampling points, and the comprehensive quality factor Q corresponding to each sampling point remains at a high level during this period, such as being greater than 0.7.
[0111] The design intent of this combination of conditions is to distinguish the root causes of performance degradation:
[0112] If the classifier's confidence level keeps decreasing even when the signal quality remains excellent, it usually indicates a shift in the user's internal physiological state, such as fatigue, distraction, or learning adaptation, rather than being caused by external noise interference. At this point, the system determines that the current model is mismatched with the user's real-time neural activity pattern, thereby triggering subsequent incremental update logic.
[0113] It should be noted that the above consecutive point count of 5 and quality factor threshold of 0.7 are initial values optimized based on experimental data under typical interaction scenarios. In actual deployment, they can be fine-tuned according to the specific application requirements for sensitivity and stability.
[0114] S302: Perform incremental updates to model parameters.
[0115] When the triggering condition of S301 is met, the system starts incremental learning of the model parameters, specifically using gradient descent or its variants such as stochastic gradient descent for fine-tuning.
[0116] Typically, the high-quality feature vectors generated by step S2 during the period when the triggering condition is met are used as training data for incremental learning. The system calculates the gradient of the preset loss function, such as hinge loss or cross-entropy loss, with respect to the current model parameters, and makes small updates to the parameters in the opposite direction of the gradient.
[0117] The update step size, i.e. the learning rate, is set within a small range, such as 0.01 to 0.05. This range is chosen to strike a balance between quickly adapting to user state drift and preventing model instability caused by noise or abnormal samples. A smaller step size ensures that the model can track the user's physiological changes in a smooth and gradual manner, effectively avoiding the risk of overfitting caused by excessively large single update, thereby maintaining the overall stability of the system during long-term operation.
[0118] S303: Assess calibration consistency and monitor deviations.
[0119] To quantify the accumulated deviations during the calibration process and monitor their stability, the system periodically performs a consistency check, for example, every 30 seconds or every 100 samples. This check is based on a comprehensive performance evaluation function, the core of which is to calculate the mean square error (MSE) of N samples within an evaluation period, which reflects the degree of deviation between the actual performance of the model and the expected ideal state.
[0120] S3031: Real-time calculation of the following three performance metrics:
[0121] Spatial mismatch rate The stability of the model output in the feature space can be measured by the cosine distance or normalized Euclidean distance between the feature vector of the model output at the current sampling point and the recent historical average feature vector. The larger the value, the more unstable the current EEG pattern is in spatial distribution.
[0122] Target deviation : To measure the accuracy of task execution, for tasks with a clear objective, such as moving the cursor to a specified position, it can be defined as the difference between the instruction corresponding to the current output of the model and the user's actual target instruction, such as whether the instruction category is the same; for tasks without a clear objective, it can be defined as the difference between the current output confidence and a high confidence baseline, such as 0.9. The larger the value, the higher the task execution error.
[0123] Execution lag coefficient The timeliness of system response can be defined as the time delay between the generation of user intent (which can be detected by external sensors or task timing markers) and the system's recognition and output of a valid instruction. This time delay is normalized to a maximum permissible delay value. The larger the value, the slower the system response.
[0124] S3032: Combine the above indicators and calculate the periodic mean square error.
[0125] The system assigns weights to the three indicators; for example, spatial mismatch rate and target deviation each account for 0.4, and execution lag coefficient accounts for 0.2, to reflect the importance of different indicators. At each sampling point t, a weighted comprehensive deviation value is calculated. :
[0126] ;
[0127] Calculate the composite deviation value Mean Squared Error (MSE) over an evaluation period:
[0128]
[0129] S3033: Perform stability assessment.
[0130] The system presets an upper limit for MSE tolerance. For example, 0.05. If the MSE value calculated for multiple consecutive evaluation cycles is lower than this upper limit, the current calibration process is considered stable and effective. If the MSE value continues or significantly exceeds this upper limit, it indicates that the model state may be out of control. The system will record the anomaly and may trigger an early warning or protection mechanism, such as slowing down the update speed.
[0131] The above weights are 0.4, 0.4, 0.2, and the upper limit of tolerance. These are all empirical values obtained through debugging in typical application scenarios, and the emphasis on accuracy, stability, and real-time performance can be adjusted according to the specific task type.
[0132] S304: Perform artifact removal and model protection for low-quality signals.
[0133] This is a defensive mechanism that runs parallel to the core update logic, designed to prevent low-quality data from polluting the model. The system monitors the overall quality factor Q of all channels in real time, specifically including the following:
[0134] 1. Triggering condition judgment: When the system detects that there are more than a preset number of channels, such as more than 3 consecutive channels, or the Q value of the key functional area channels (such as C3 and C4 leads in the motion imagery task) is continuously lower than the safety threshold (such as 0.3) for a certain period of time (such as 2 seconds), it determines that the overall signal quality is unreliable and then triggers the protection process.
[0135] 2. Model Locking and Update Pause: Once the protection process is triggered, the system immediately freezes the parameter update logic of the current classification model and pauses any incremental learning in step S3. This lock is temporary, and the system will continue to monitor the signal quality. When the Q values of all channels recover to a reliable level, such as being higher than 0.5, and remain so for a period of time, the model lock will be automatically released, and the incremental update logic will resume.
[0136] 3. Real-time user alerts: Upon triggering protection, the system issues a clear alert to the user through a visual feedback interface, such as a signal quality topology map on the screen. The topology map not only displays the Q value of each channel with color gradients, but also highlights or overlays exclamation mark icons on low-quality channel areas, along with brief text prompts, such as "Please check electrode contact," to guide the user to make adjustments.
[0137] 4. State Storage and Intelligent Rollback: The adaptive calibration engine has a built-in historical state storage module that periodically, or after each successful update, records a snapshot of the model parameters and corresponding average performance metrics. The system continuously monitors key performance indicators such as online recognition rate. If abnormal performance degradation occurs, for example, if the average recognition rate drops by more than 20% compared to the previous stable phase within a 10-second time window, the system determines that the calibration may have introduced undesirable bias. At this point, the system automatically triggers a rollback mechanism, restoring the model parameters to the most recent stable version before this degradation trend began. This mechanism can also be manually triggered by the user.
[0138] In summary, step S3 constructs a condition-triggered adaptive calibration mechanism that accurately captures the true moment of model mismatch through multi-condition joint judgment. Model tracking is then performed using a smooth incremental learning approach, supplemented by quantified bias monitoring to ensure the update process is controlled. Simultaneously, enhanced artifact removal and model protection mechanisms provide a safety boundary for the entire system, preventing catastrophic degradation caused by noise.
[0139] This step utilizes the real-time quality assessment provided in step S1 and the post-purification features provided in step S2 to ensure that the model calibration behavior is always based on reliable data, ultimately achieving the core goal of maintaining high accuracy and robustness of the brain-computer interface system in long-term, non-stationary interaction environments.
[0140] The method in this embodiment also includes a silent calibration mechanism. This mechanism serves as a functional supplement to the core calibration process described in steps S1 to S3, aiming to achieve an automated calibration mode that runs continuously in the system background without user intervention. This minimizes disruption to the main interactive task and improves the smoothness and user experience of long-term interactions. Its specific implementation includes the following two collaborative sub-steps:
[0141] S401: Parallel calibration under background task scheduling and resource isolation.
[0142] While the user is performing the main brain-computer interface tasks such as cursor control, character spelling, or game operation, the system, through the task scheduler, periodically activates and executes the real-time signal quality evaluation in step S1 and the condition-triggered adaptive calibration logic in step S3 in an independent, low-priority background thread or dedicated processing core, to ensure that the real-time performance of the core interaction loop is not affected.
[0143] All silent calibration operations, including signal acquisition, quality assessment, feature weighting, and model fine-tuning, are completed in this isolated background environment. The system securely accesses the latest model parameters and quality data through shared memory or locking mechanisms and synchronizes them to the main task model after the update is completed.
[0144] Throughout the process, users do not need to interrupt their current task or execute any special calibration training instructions, thus achieving a completely seamless and silent calibration experience.
[0145] S402: Progressive Evolution and Stability Maintenance Based on Benchmark Models.
[0146] To effectively manage and adapt to the slow drift of users' physiological states that can last for tens of minutes or even hours, the system introduces an evolvable baseline model concept. This baseline model is initially derived from the system's first stable calibration phase for the current user, such as a stable model state obtained by training through a short standard motion imagery task before the interaction begins.
[0147] The system sets a fixed time period, such as every 5 minutes. This period is usually set based on an estimate of the typical time scale of user state drift. It automatically performs a global consistency check. The core of the check is to quantify the degree of deviation between the parameters of the currently used working model and the stored baseline model parameters in multidimensional space.
[0148] Specifically, the system calculates the difference norm between the two models on key parameters such as the weight vector of the classifier and the projection matrix of the spatial filter, such as Euclidean distance or cosine similarity. Dividing this difference value by the norm of the parameters of the baseline model itself yields a normalized percentage of deviation.
[0149] The baseline model update follows a cautious two-condition decision strategy, designed to distinguish between beneficial adaptive drift and harmful noise perturbations. The system will only perform the baseline model update operation if and only if both of the following conditions are met:
[0150] 1. If the calculated parameter deviation exceeds a preset evolution threshold, such as 30%, this threshold reflects that the system believes the current working model has accumulated enough meaningful changes, which may indicate that the user state has entered a new stage.
[0151] 2. Within the current detection cycle and the immediately preceding cycle, the system's online recognition rate remains relatively stable, for example, with fluctuations of less than 5%, which confirms that the model's performance is robust and not fluctuating due to temporary noise or interference.
[0152] When the above conditions are met, the system will solidify the parameter state of the current working model into a new baseline model, overriding the original version. This baseline evolution process enables the system to track and adapt to the slow physiological changes that occur in users during long-term interactions in a controlled and gradual manner, rather than just dealing with short-term state fluctuations.
[0153] In summary, the aforementioned silent calibration mechanism deploys the core calibration function in the background and executes it periodically in a resource-isolated manner, coupled with a baseline model evolution strategy based on dual-condition judgment, together forming a continuously running and robust automated calibration background. This mechanism not only avoids the interruption of the user interaction process by conventional explicit calibration tasks and improves the smoothness of the user experience, but more importantly, through timely updates of the baseline model, it enables the system to autonomously track changes in the user's long-term physiological state, enhancing the adaptive maintenance capability and overall stability of the brain-computer interface system in long-term applications.
[0154] For multi-user application scenarios, this embodiment supports multi-user mode. The system establishes a user feature database to store the personalized key parameter configurations for each user, including the weights of each indicator on which the comprehensive quality factor calculation depends in step S1, the threshold for channel weight allocation in step S2, and the condition threshold for triggering calibration in step S3.
[0155] When a user logs in, the system loads their corresponding personalized parameter set as the initial configuration for this session, thereby quickly adapting and shortening the system preparation time.
[0156] Furthermore, the system can identify specific user states in real time, such as deep fatigue, and adjust calibration strategies and feedback parameters accordingly. For example, when the system determines that a user has entered a fatigue state through EEG spectrum and interaction efficiency analysis, it will appropriately relax the triggering conditions for model updates in step S3 and increase the update step size, allowing the model to more quickly track changes in physiological characteristics. At the same time, the system will simultaneously enhance the stimulation intensity of the feedback interface to maintain the effectiveness of the interaction.
[0157] Example 2
[0158] Based on Example 1, this example provides an adaptive brain-computer interface feedback calibration implementation scheme based on a distributed processing architecture, which aims to resolve the contradiction between high-performance calibration logic and the computing power of portable acquisition devices.
[0159] Specifically, the distributed processing architecture divides the entire calibration process into a front-end perception layer and a back-end computing layer. The front-end perception layer is integrated into a portable EEG acquisition device worn on the user's head. This device typically has a built-in dedicated computing unit such as an ultra-low power digital signal processor or a field-programmable gate array.
[0160] At the front-end perception layer, the system mainly performs the basic signal quality evaluation operations in step S1, which have high real-time requirements and relatively low computational load. Since the front-end device directly handles the raw data, it can perform calculations of time-domain features, including mean, standard deviation, and peak-to-peak value, as well as statistical features such as kurtosis, with extremely high real-time performance. At the same time, the front-end device can utilize its hardware acceleration unit to run a lightweight deep convolutional neural network to perform real-time preliminary annotation of artifacts on each frame of sampled data.
[0161] Step S1, which involves complex spectrum analysis such as the frequency band energy ratio calculation in S104, or requires global information fusion such as the generation of the comprehensive quality factor Q in S107, can be deployed together with the core algorithm logic of steps S2 and S3 in the back-end computing layer. This fully utilizes the advantages of real-time acquisition and preprocessing at the front end, while avoiding placing excessive computing load on resource-constrained portable devices.
[0162] To reduce data transmission bandwidth, the front-end device only sends the calculated basic quality indicators, such as the time-domain characteristics of each channel, artifact labeling probability and impedance state, as well as the pre-processed signal fragments, to the back-end computing layer through low-latency wireless transmission protocols such as Bluetooth 5.0 or a dedicated 2.4 GHz band protocol.
[0163] The back-end computing layer typically consists of high-performance computing terminals, smartphones, or cloud servers. In the back-end, the system integrates the data uploaded from the front end, completes a comprehensive evaluation of signal quality, generates the final Q value, and then executes the large-scale matrix operations and model optimization logic involved in steps S2 and S3.
[0164] Specifically, the backend dynamically weights the signal based on the final generated channel weight matrix and runs a shared space mode algorithm to generate a projection matrix.
[0165] In this embodiment, the adaptive calibration engine performs cross-validation on the current samples before executing incremental updates in the backend to further improve the reliability of model updates. This validation includes dual criteria:
[0166] 1. Perform a normality test on the feature vector of the current sample. For example, the Shapiro-Wilke test can be used, and a specific significance level can be set as the judgment criterion, such as requiring a p-value greater than 0.05. If the test passes, it is considered that the distribution of the sample in the feature space has not significantly deviated from the normal law and conforms to the general statistical characteristics of high-quality EEG features.
[0167] 2. Calculate the Euclidean distance between the current sample's feature vector and all samples in the historical successfully interacted sample feature library, and take the median or a specific percentile, such as the 25th percentile, as the reference distance. If the nearest neighbor distance of the current sample does not exceed a reasonable multiple of this reference distance, such as 1.5 times, it is considered to have sufficient similarity with historical valid samples.
[0168] Only when both the normality and distance conditions mentioned above are met will the current sample be included in the effective training set for incremental model updates. This dual verification mechanism aims to further exclude low-value or misleading samples that may be caused by covert interference or abnormal EEG patterns from two dimensions: statistical distribution and sample similarity, thereby protecting the model from contamination.
[0169] In addition, the backend system is also responsible for maintaining the user feature database and historical status storage module. When it detects a signal interruption caused by communication link fluctuations or insufficient front-end power, the backend system will automatically switch to an offline working mode based on historical stable parameters to maintain basic functions and issue voice prompts to the user to check the device connection.
[0170] In practical applications, the distributed architecture of this embodiment can be efficiently applied to a neurofeedback training system. This system not only executes the above-mentioned adaptive calibration process, but also dynamically adjusts the parameters of the feedback loop based on the user's real-time brain state, such as the level of focus or relaxation assessed by the energy ratio of a specific frequency band, as comprehensively analyzed by the back-end computing layer.
[0171] For example, when the system detects that a user has entered a state of high concentration, which is typically characterized by alpha wave suppression, beta wave enhancement, and excellent signal quality, it will automatically increase the interactive sensitivity of the feedback interface or the difficulty of the task to match the user's current cognitive ability, thereby helping the user to more effectively train their brain's self-regulation.
[0172] If the front-end device detects that the signal in a certain area is completely interrupted due to the complete detachment of the electrode, the system will immediately start the degraded working mode, recalculate the spatial filter based only on the data of the remaining effective channels, and provide a prompt on the feedback interface to maximize the continuity of the training task and improve the system's fault tolerance and user experience.
[0173] Example 3
[0174] This embodiment details a specific implementation of the present invention in the field of medical rehabilitation, particularly for limb function reconstruction training for stroke patients. In this application scenario, the patient's electroencephalogram (EEG) signals often exhibit stronger pathological non-stationarity, and due to the patient's limited limb control ability, the resulting electromyographic interference is more frequent and irregular.
[0175] In the above application scenarios for stroke patients, since patients may have involuntary blinking or increased eye movements, and the prefrontal cortex is often involved in cognitive compensation strategies, the real-time signal quality evaluation in step S1 is specifically enhanced.
[0176] The system collects blink signal samples from users during task breaks or under specific prompts to construct a personalized blink artifact reference template. Then, using adaptive filtering techniques, such as recursive least squares, it estimates and subtracts blink components from the raw EEG signals in real time based on the template. This effectively purifies the signals in the prefrontal cortex leads, thereby more accurately calculating the overall quality factor Q of the leads in this region. This is particularly important for rehabilitation tasks that rely on prefrontal cognitive features for functional reconstruction.
[0177] Furthermore, in the multi-source heterogeneous channel dynamic weighting in step S2, the logic is optimized for the common brain functional lateralization or asymmetry in hemiplegic patients.
[0178] The system compares the average comprehensive quality factor Q of each channel in the affected and healthy hemispheres in real time. When the signal quality of the corresponding channel (such as C3 or C4) of the main motor cortex on the affected side is continuously low due to interference (such as poor electrode contact), the system does not simply reduce its weight. Instead, according to the weight allocation rule in S201, it dynamically increases the weight coefficient of the corresponding auxiliary motor area channel on the healthy hemisphere. In essence, it combines the dynamic weighting mechanism in step S2 with the principle of brain function compensation, so that the spatial filtering algorithm relies more on the high-quality neural signals of the healthy side when calculating the projection matrix, thereby using the functional compensation potential across hemispheres to maintain or improve the overall recognition accuracy of the system.
[0179] In the condition-triggered adaptive calibration in step S3, the system sets differentiated model update strategies based on the characteristics of different stages of rehabilitation training.
[0180] In the early stages of training, patients' neural firing patterns are often unstable. The system uses a relatively large update step size, such as 0.08, to allow the model to quickly adapt to its basic characteristics. As training progresses, the system monitors the stability of the model output and the regularity of the physiological response. For example, when the standard deviation of the classifier's posterior probability is below a threshold (such as 0.05) for several consecutive cycles, and the consistency of the motor evoked potential waveform decoded from the EEG signal is significantly improved, the system determines that the patient's state has entered a plateau or improvement phase. It then automatically reduces the update step size to a smaller value (such as 0.01) and enters the fine-tuning stage to optimize model details without causing large fluctuations.
[0181] The visual feedback interface adds calibration progress and stability indicators to the original signal quality topology diagram, which intuitively shows patients the current adaptive state of the system and the reliability of the model, helping to enhance training confidence and participation.
[0182] In addition, to better achieve individualized rehabilitation, this embodiment introduces a clinical rehabilitation knowledge base, which integrates data from historical successful rehabilitation cases, expert experience rules, and the evolution patterns of typical EEG patterns corresponding to different lesion characteristics.
[0183] Before training begins, the system uses a semantic retrieval engine to match the current patient's clinical information, such as lesion location, duration of illness, and initial motor function score, with the knowledge base, providing personalized initialization suggestions for the key parameters of the adaptive calibration engine.
[0184] For example, the knowledge base may suggest adjusting the initial weight ratio of the healthy side to the affected side in step S2 for patients with specific lesion locations, or preset the confidence threshold range for triggering model updates in step S3 for patients at different stages of recovery.
[0185] During training, the system will still perform a global consistency check every 10 minutes to evaluate whether the evolution of model parameters is consistent with the typical benign neural remodeling trajectory of this type of patient in the knowledge base. If structural instability that contradicts the expected rehabilitation path is detected in the model, such as feature weights being abnormally concentrated in non-target brain regions for a long time, the system will trigger an alert and can perform a one-click rollback according to preset rules or operator instructions to restore the model to a more stable early state.
[0186] Example 4
[0187] Based on the calibration methods described in Examples 1 to 3, this embodiment provides an adaptive brain-computer interface feedback calibration system, which specifically includes the following:
[0188] The signal acquisition and quality assessment module is configured to acquire multi-channel EEG signals in real time and calculate the comprehensive quality factor of each channel.
[0189] The dynamic weighting and feature extraction module is configured to dynamically generate channel weight vectors based on the comprehensive quality factor, and couple the weight vectors to the covariance calculation of the spatial filter to perform adaptive spatial filtering and extract feature vectors.
[0190] The condition-triggered calibration and model management module is configured to monitor classifier confidence and signal quality, trigger incremental model updates when physiological state drift is detected, and trigger model protection when signal quality is too low.
[0191] Among them, the dynamic weighting and feature extraction module and the condition-triggered calibration and model management module form a closed-loop linkage based on the comprehensive quality factor output by the signal acquisition and quality evaluation module.
[0192] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0193] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. An adaptive brain-computer interface feedback calibration method, characterized in that, include: S1: Real-time acquisition of multi-channel EEG signals, and calculation of the comprehensive quality factor of each channel based on multi-dimensional evaluation indicators including at least time domain features, frequency band energy distribution features, artifact recognition results based on lightweight deep convolutional neural networks, and electrode contact impedance. S2: Based on the comprehensive quality factor, the initial weights of each channel are dynamically allocated to form a weight vector, and the weight vector is coupled to the covariance matrix calculation process of the spatial filtering algorithm to generate a spatial projection matrix that can be adaptively offset according to the real-time signal quality. The weighted channel signals are then spatially filtered to extract feature vectors. S3: Monitor the output confidence of the classifier on the feature vector and the comprehensive quality factor in real time. When the output confidence shows a continuous downward trend while the signal quality is continuously higher than the first preset threshold, it is determined that the user's physiological state is drifting and the incremental update of the model parameters is triggered. At the same time, when the signal quality is lower than the second preset threshold, the model protection mechanism is triggered to suspend the update.
2. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, In step S2, the weight vector is coupled to the covariance matrix calculation process of the spatial filtering algorithm, specifically including: The original signal of each channel is weighted based on the weight vector to obtain the weighted channel signal; The average covariance matrix for each type of task is calculated using the weighted channel signals. Solve for the spatial projection matrix based on the average covariance matrix; The signal is projected using the spatial projection matrix, and the variance features of the projected signal are calculated to form the feature vector.
3. The adaptive brain-computer interface feedback calibration method according to claim 2, characterized in that, Step S2 also includes: After obtaining the weight vector by allocating initial weights based on the comprehensive quality factor, a joint optimization objective including an L2 regularization term and a Laplace smoothing constraint term constructed based on the physical adjacency relationship of the channels is introduced to optimize the weight vector, so as to obtain an optimized weight vector with smooth spatial distribution and avoid excessive concentration on individual channels, and the optimized weight vector is used for the calculation of the covariance matrix.
4. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, In step S1, the multi-dimensional evaluation indicators used to calculate the comprehensive quality factor also include inter-channel spatial consistency analysis indicators based on Pearson correlation coefficient and / or Moran index.
5. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, In step S3, triggering the incremental update of model parameters specifically involves: The gradient descent method or its variants are used, with the feature vector corresponding to the trigger period as training data, the gradient is calculated with a preset loss function, and the model parameters are fine-tuned with a preset small learning rate.
6. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, Step S3 also includes a calibration conformity assessment step: The weighted composite deviation value, which includes spatial mismatch rate, target deviation and execution lag coefficient, is calculated periodically, and its mean square error is calculated within an evaluation period. When the mean square error of multiple consecutive evaluation periods exceeds the preset tolerance limit, an early warning or protection mechanism is triggered.
7. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, It also includes a silent calibration step: In a background thread that runs parallel to the main user interaction task, the real-time signal quality evaluation step and the condition-triggered adaptive calibration step are executed periodically to achieve automated calibration without user awareness.
8. The adaptive brain-computer interface feedback calibration method according to claim 7, characterized in that, The silent calibration step also includes a baseline model progressive evolution strategy: Store a baseline model derived from the user's initial stable calibration; Periodically calculate the normalized deviation between the current working model parameters and the baseline model parameters; When the deviation exceeds the preset evolution threshold and the system's online recognition rate remains stable, the parameter state of the current working model is updated to a new benchmark model.
9. The adaptive brain-computer interface feedback calibration method according to claim 1, characterized in that, The method is implemented using a distributed processing architecture, wherein: In step S1, the calculation of basic quality indicators and the preliminary labeling of artifacts, which have high real-time requirements, are performed in the front-end perception layer integrated into the portable EEG acquisition device. Step S1 involves the calculation of a comprehensive quality factor through complex spectrum analysis and global fusion, while steps S2 and S3 are executed in the back-end computing layer outside the front-end perception layer. The front-end perception layer sends the calculated basic quality indicators and preprocessed signals to the back-end computing layer.
10. An adaptive brain-computer interface feedback calibration system, used to implement the adaptive brain-computer interface feedback calibration method according to any one of claims 1 to 9, characterized in that, include: The signal acquisition and quality assessment module is configured to acquire multi-channel EEG signals in real time and calculate the comprehensive quality factor of each channel. The dynamic weighting and feature extraction module is configured to dynamically generate channel weight vectors based on the comprehensive quality factor, and couple the weight vectors to the covariance calculation of the spatial filter to perform adaptive spatial filtering and extract feature vectors. The condition-triggered calibration and model management module is configured to monitor classifier confidence and signal quality, trigger incremental model updates when physiological state drift is detected, and trigger model protection when signal quality is too low. The dynamic weighting and feature extraction module and the condition-triggered calibration and model management module form a closed-loop linkage based on the comprehensive quality factor output by the signal acquisition and quality evaluation module.