A brain-computer interface error grading adaptive method, device, equipment and medium

By evaluating brain signal quality and closed-loop control errors in real time, the parameters of the brain-computer interface model are updated in stages, which solves the problem of model misadaptation in low-quality signals in the prior art and improves the stability and adaptability of the system.

CN123114262APending Publication Date: 2026-11-17DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611396813.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing brain-computer interface regression decoding models continue to update the model even when the signal quality is poor or the artifacts are strong, leading to incorrect adaptation. Furthermore, they lack assessment mechanisms for brain signal quality and error grading, making it difficult to balance model stability and adaptability.

Method used

By calculating brain signal quality indices in real time, model updates are prohibited when conditions are not met. Based on the closed-loop control error, a subset of parameters within the corresponding level range is selected from the hierarchical parameter set for updating. Combined with smoothing and gradient update mechanisms, an objective function is constructed to optimize parameter adjustment.

Benefits of technology

It effectively avoids model misadaptation caused by low-quality brain signals, prevents model perturbation or underadaptation, and improves the decoding robustness and long-term usability of brain-computer interface systems in non-stationary signal environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114262A_ABST
    Figure CN123114262A_ABST
Patent Text Reader

Abstract

This invention discloses an adaptive method, apparatus, device, and medium for error grading in brain-computer interfaces (BCIs), relating to the field of BCI technology. The method includes acquiring user brain signals, inputting them into a regression decoding model to obtain continuous control quantities to drive an external device to generate an actual state, calculating a closed-loop control error based on the actual state generated by the external device and a set target state, acquiring a brain signal quality index based on the user brain signals to characterize reliability, and prohibiting updates to the regression decoding model if the brain signal quality index does not meet preset conditions; if the brain signal quality index meets preset conditions, updating the model involves selecting a subset of parameters within the corresponding grade range from the grading parameter set of the regression decoding model based on the closed-loop control error. This solves the problem of long-term model performance degradation caused by the lack of error screening and grading mechanisms in regression decoding tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of brain-computer interface technology, specifically to a brain-computer interface error grading adaptive method, device, equipment, and medium. Background Technology

[0002] Brain-computer interface (BCI) is a technology that enables direct communication between the human brain and external devices by acquiring and decoding human brain signals. Among the various tasks of BCI, regression-based decoding tasks play an important role, such as continuous cursor control, speed and joint angle control of robotic arms, continuous motion control of intelligent wheelchairs, and continuous speech parameter synthesis.

[0003] Brain-computer interface (BCI) regression decoding tasks require real-time mapping of brain signals into continuous control variables to drive external devices. However, brain signals exhibit significant non-stationarity and are affected by electrode impedance, user state, and other factors. Cross-session drift can lead to a decline in decoding model performance. Existing technologies have proposed online adaptive methods that use target location, target orientation, or user error correction information as supervisory signals to update decoder parameters, or rely on continuous learning to save historical samples and apply regularization constraints. However, these methods still have shortcomings: on the one hand, they lack assessment of brain signal quality, and updating the model even with poor signal quality or strong artifacts can easily lead to misadaptation; on the other hand, they typically update all parameters or a fixed subset of parameters without distinguishing the degree of brain signal change, and cannot adjust the update strategy according to the magnitude of task execution deviation. This update method, lacking deviation screening and grading mechanisms, struggles to balance model stability and adaptability, hindering the long-term practical application of BCI systems. Summary of the Invention

[0004] This application provides a brain-computer interface error grading adaptive method, device, equipment, and computer-readable storage medium, which can solve the problems in the prior art where the adaptive update of the brain-computer interface regression decoding model lacks a screening mechanism for brain signal quality and a grading mechanism for closed-loop control error. This leads to the easy occurrence of incorrect adaptation when the signal quality is poor, and the inability to dynamically adjust the parameter update range according to the error amplitude makes it difficult to balance the stability and adaptability of the model.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, embodiments of this application provide a brain-computer interface error grading adaptive method, including: The system acquires user brain signals, inputs them into a regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculates closed-loop control errors based on the actual states generated by external devices and the set target states. Obtain a brain signal quality index based on the user's brain signal to characterize the reliability. If the brain signal quality index does not meet the preset conditions, then the regression decoding model is prohibited from being updated. If the brain signal quality index meets the preset conditions, then the subset of parameters to be updated within the corresponding level range is selected from the hierarchical parameter set of the regression decoding model and updated according to the closed-loop control error.

[0006] Based on the above technical solution, the method also includes a step of smoothing the closed-loop control error: The closed-loop control error is averaged or filtered based on a sliding window to eliminate instantaneous fluctuations or noise in the closed-loop control error. The smoothing error obtained after smoothing As the closed-loop control error, it is used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model within the corresponding level range for updating.

[0007] Based on the above technical solution, the step of selecting a subset of parameters to be updated within the corresponding level range for updating includes: Obtaining brain signal quality indicators and according to and the smoothing error Select the subset of parameters to be updated ; like If the preset conditions are not met, then the subset of parameters to be updated will be... Forced to be an empty set, that is: ; The regression decoding model is prohibited from being updated during this update cycle; like If the preset conditions are met, then according to the smoothing error Size selection of the subset of parameters to be updated Set threshold sequence ,Right now: ; in, , This represents the Kth parameter subset; like ,but ; like ,but , where Θ represents the complete parameter set of the regression decoding model.

[0008] Based on the above technical solution, the step of selecting a subset of parameters to be updated within the corresponding level range for updating includes constructing an objective function. : Based on the current monitoring signal Based on historical anchoring information, construct an objective function that includes an adaptive loss term and an anchoring constraint loss term: ; in, This represents the distance between the output of the regression decoding model on the current brain signal and the current supervision signal. This characterizes the degree of deviation between the current model and historical anchoring information. The tradeoff coefficient for anchoring constraints; The adaptation loss term is: ; in, The regression decoding model for brain signals The output, As a weight for the confidence level of the monitoring signal; The current monitoring signal The expected control quantity is derived from real continuous labels, short-term calibration labels, the difference between the target state and the actual state combined with historical motion trajectories or task constraints, or weakly supervised labels converted from error correction signals. If the anchoring constraint loss term adopts the distillation form of historical representative sample output, then: ; in, For pre-saved historical representative brain signal samples, A historical anchoring model; If the anchoring constraint loss term adopts the characteristic prototype distillation form, then: ; in, For pre-preserved historical prototypes, The output of the historical anchoring model on representative historical samples. This is the regression head of the regression decoding model; If the anchoring constraint loss term takes the form of a parametric importance constraint, then: ; in, For the first Each parameter has a weight representing the importance of a historical task. For the current model, the One parameter, These are the corresponding parameters for the historical anchoring model.

[0009] Based on the above technical solution, the objective function is constructed. Then, only in the subset of parameters to be updated The regression decoding model is then updated using gradients: ; in, Based on the learning rate, This indicates that only the subset of parameters to be updated is applied. The gradient is calculated for the parameters in the subset to be updated. All parameters remain unchanged in this update. ← is the assignment operator, meaning the new value calculated on the right is used to update the variable on the left. Indicates belonging to a subset Specific model parameters; Introducing error-driven update intensity coefficients: ; The gradient update is rewritten as follows: ; in, This is the update intensity coefficient, representing a coefficient that dynamically changes with the error, used to adaptively adjust the intensity of the gradient update. This represents the smoothing error, and clip(...,0,1) represents the truncation function.

[0010] Based on the above technical solutions, the update of security gating steps is also included: Acquiring at least one of the following—brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence—constitutes the updated security gating condition. If the brain signal quality index, device status index, task effectiveness index, or error attribution confidence does not meet the update security gating condition, then updating the regression decoding model is prohibited.

[0011] Based on the above technical solution, a model verification step is also included after the update: The offline prediction error, shadow closed-loop error and / or closed-loop error after fusion control of the updated regression decoding model are used to determine whether the preset improvement conditions are met. If the preset improvement conditions are met, the updated regression decoding model is accepted; otherwise, the original regression decoding model is retained.

[0012] Secondly, embodiments of this application provide a brain-computer interface error grading adaptive device, comprising: The signal acquisition and error calculation module is used to acquire the user's brain signals, input them into the regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculate the closed-loop control error based on the actual states generated by the external devices and the set target states. The quality assessment module is used to obtain a brain signal quality index based on the user's brain signal to characterize the reliability. If the brain signal quality index does not meet the preset conditions, the regression decoding model is prohibited from being updated. The parameter selection and update module is used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model according to the closed-loop control error when the brain signal quality index meets the preset conditions.

[0013] Thirdly, embodiments of this application provide a brain-computer interface error grading adaptive device, the brain-computer interface error grading adaptive device including a processor, a memory, and a brain-computer interface error grading adaptive program stored in the memory and executable by the processor, wherein when the brain-computer interface error grading adaptive program is executed by the processor, it implements the steps of the brain-computer interface error grading adaptive method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a brain-computer interface error grading adaptive program, wherein when the brain-computer interface error grading adaptive program is executed by a processor, it implements the steps of the brain-computer interface error grading adaptive method as described in the first aspect.

[0015] Compared with the prior art, the advantages of the present invention are as follows: This invention discloses a brain-computer interface error grading adaptive method, device, equipment, and medium. It calculates brain signal quality indicators in real time and determines whether to prohibit model updates based on these indicators. Specifically, when signal quality meets the requirements, it selects a subset of parameters of the corresponding level from a grading parameter set for updating based on the closed-loop control error amplitude. This achieves update screening based on signal quality and parameter grading adjustment based on error magnitude. This method effectively avoids model misadaptation caused by low-quality brain signals, prevents model perturbation or insufficient adaptation caused by fixed parameter update strategies, and solves the problem of long-term model performance degradation in regression decoding tasks due to the lack of error screening and grading mechanisms. It significantly improves the decoding robustness and long-term usability of brain-computer interface systems in non-stationary signal environments. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating an embodiment of the brain-computer interface error grading adaptive method, apparatus, device, and medium of the present invention. Figure 2 This is a schematic diagram of the hardware structure in an embodiment of the brain-computer interface error grading adaptive method, device, equipment and medium of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0019] First, some of the technical terms used in this application will be explained to help those skilled in the art understand this application.

[0020] Brain-computer interface (BCI): refers to the technology that establishes a direct communication and control channel between the brain and external devices, and realizes direct communication between the human brain and external devices by collecting and decoding human brain signals. This solution mainly involves the regression-type decoding task.

[0021] Regression decoding model: A machine learning model used to map real-time acquired brain signals into continuous control quantities, such as convolutional neural networks, recurrent neural networks, or Transformer networks. Output quantities include cursor velocity, robotic arm joint angular velocity, or wheelchair linear velocity, etc.

[0022] Closed-loop control error: refers to the deviation between the actual state of an external device or controlled object in the task space and the set target state. It is used to evaluate the control effect rather than the direct output of the model. For example, the Euclidean distance between the target cursor coordinates and the current cursor coordinates.

[0023] Brain signal quality index: A quantitative indicator used to characterize the reliability of the currently acquired brain signal. The value range is usually [0,1]. It can be calculated from at least one of the following: signal-to-noise ratio, channel dropout rate, artifact intensity, electrode impedance, or characteristic abnormality degree.

[0024] Hierarchical parameter set: The trainable parameters of the regression decoding model are divided into multiple hierarchical parameter subsets according to the degree of update perturbation. For example, the low perturbation level includes normalization layer parameters, and the high perturbation level includes feature extraction layer parameters.

[0025] Anchoring constraint loss: A loss term used to characterize the degree of deviation between the current model and historical anchoring information. It takes the form of historical representative sample output distillation, feature prototype distillation, or parameter importance constraint, and is used to suppress catastrophic forgetting.

[0026] Update security gating: A conditional judgment mechanism performed before performing model updates, which determines whether to prohibit the current update based on at least one of brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence.

[0027] To avoid confusion between symbols in different steps, the main symbols in this specification are defined as follows; the same symbol has the same meaning in different embodiments unless the context clearly indicates otherwise.

[0028]

[0029] Here, U_t is specifically used to represent the subset of parameters to be updated, P_k is specifically used to represent the k-th level subset of parameters, and K is specifically used to represent the number of parameter levels, avoiding confusion with the actual state s_t, a single model parameter θ_i, and the objective function. Mixed use.

[0030] Brain-computer interface (BCI) regression decoding tasks need to cover various scenarios such as continuous cursor control, robotic arm speed control, intelligent wheelchair motion control, and continuous speech parameter synthesis, and address the non-stationary changes in brain signals across days and sessions to achieve online adaptive updates of the decoding model. Traditional methods typically update all or a fixed subset of the decoder parameters without distinguishing the degree of brain signal change. This approach suffers from problems such as overly rigid update strategies, susceptibility to misadaptation or underadaptation, forced updates even with poor signal quality leading to model degradation, and a lack of mechanisms for preserving historical decoding capabilities. Therefore, this application proposes a brain-computer interface error grading adaptive method, apparatus, device, and medium.

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0032] In a first aspect, embodiments of this application provide a brain-computer interface error grading adaptive method.

[0033] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the adaptive brain-computer interface error grading method of this application. Figure 1As shown, an adaptive method for brain-computer interface error grading includes: The system acquires user brain signals, inputs them into a regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculates closed-loop control errors based on the actual states generated by external devices and the set target states. Obtain a brain signal quality index based on the user's brain signal to characterize the reliability. If the brain signal quality index does not meet the preset conditions, the regression decoding model should not be updated. If the brain signal quality index meets the preset conditions, then the subset of parameters to be updated within the corresponding level range is selected from the hierarchical parameter set of the regression decoding model based on the closed-loop control error for updating.

[0034] In this embodiment, a subset of parameters to be updated is selected from the hierarchical parameter set based on the closed-loop control error, and then a gradient update is performed on the subset of parameters to be updated based on the current supervision signal and the anchoring constraint loss. This design establishes an explicit correspondence between the degree of change in brain signals and the range of parameters that the decoder can update. At the same time, if the brain signal quality index does not meet the preset conditions, updating the regression decoding model is prohibited, thus avoiding erroneous updates to the decoder when the error is abnormal or the attribution is unreliable.

[0035] Furthermore, in one embodiment, the method further includes a step of smoothing the closed-loop control error: The closed-loop control error is averaged or filtered using a sliding window to eliminate instantaneous fluctuations or noise in the closed-loop control error. The smoothing error obtained after smoothing is used as the closed-loop control error, which is then used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model within the corresponding level range for updating. The specific process is as follows: Step 1: Acquiring user brain signals And input the brain signals into the regression decoding model The continuous control quantity output by the regression decoding model is obtained. .

[0036] Step 2: Based on the target state Compared with the actual state Calculate closed-loop control error And based on a length of The sliding window is used to smooth the closed-loop control error, resulting in a smoothed error. .

[0037] To avoid ambiguity, both target state and actual state refer to the state of the external device or controlled object in the task space, not the output of the regression decoding model itself. Taking two-dimensional cursor control as an example, the target state r_t can be the coordinates of the target point, and the actual state s_t can be the coordinates of the current cursor; the continuous control quantity output by the regression decoding model... _t can be the cursor velocity or displacement increment, determined by the external controller. The cursor position changes with the change in cursor position, and the closed-loop control error E_t is calculated from the changed cursor position and the target point coordinates.

[0038] Step 3: Obtaining brain signal quality indicators and smoothing error Select the subset of parameters to be updated Specifically, brain signal quality indicators Used to characterize the reliability of current brain signals, its value range is: ,and A higher value indicates better brain signal quality. It can be calculated from at least one of the following: signal-to-noise ratio, channel dropout rate, artifact intensity, electrode impedance, and characteristic anomaly degree. A preset quality threshold is set as follows. When brain signal quality indicators When the preset conditions are not met (i.e.) ), prohibit updating the regression decoding model; when brain signal quality indicators When the preset conditions are met (i.e.) According to the smoothing error The size of the parameter set of the regression decoding model. Select the subset of parameters to be updated .

[0039] In this embodiment, by smoothing the closed-loop control error, instantaneous fluctuations or noise are eliminated, making the error index used to select the subset of parameters to be updated more stable and reliable, providing an accurate basis for subsequent error classification, thereby ensuring that the adaptive update process is based on the actual control performance deviation rather than instantaneous noise.

[0040] Furthermore, in one embodiment, the calculation process of acquiring the user's brain signal, inputting it into a regression decoding model to obtain a continuous control quantity to drive an external device to generate an actual state is as follows: Acquiring user brain signals And input the brain signals into the regression decoding model The continuous control input output by the regression decoding model is obtained: ; Specifically, regression decoding model It can be extracted by feature extractor and return head Series connection, i.e.: ; Feature extractor It can be a convolutional neural network, a recurrent neural network, a Transformer network, or a combination thereof. (Regression head) It can be a fully connected layer or a shallow multilayer sensor. Continuous control quantity. This can include the two-dimensional velocity of a cursor, the joint angular velocity of a robotic arm, the linear and angular velocities of a wheelchair, or parameters for continuous speech synthesis, etc. (Brain signals) It can be electroencephalogram (EEG) signals, cortical electrical signals, single neuron discharge signals, functional near-infrared spectroscopy signals, or a combination of the above signals.

[0041] It should be noted that the continuous control quantity _t is not the same type of quantity as the target state r_t and the actual state s_t. `_t` represents the control command or predicted control command output by the model, such as velocity, angular velocity, or displacement increment; `r_t` and `s_t` represent the state variables of the controlled object in the task space, such as target position, current position, target attitude, and current attitude. External device execution. After r_t, the actual state s_t changes over time, and the system then evaluates the control effect based on the deviation between r_t and s_t.

[0042] In this embodiment, by clarifying the specific structure of the regression decoding model and the difference between continuous control quantities and state quantities, the physical meaning of the model output and the task space state is clarified, ensuring the correctness of the closed-loop control error calculation, and supporting multiple brain signal types and external device control tasks, thus exhibiting good versatility.

[0043] Furthermore, in one embodiment, selecting a subset of parameters to be updated within the corresponding level range for updating includes: The objective function is constructed based on the current supervision signal and the anchoring constraint loss term. The gradient is calculated and the parameters are updated only within the subset of parameters to be updated within the corresponding level range. The anchoring constraint loss term adopts at least one of the following: historical representative sample output distillation, feature prototype distillation, or parameter importance constraint.

[0044] Current monitoring signals It originates from at least one of the following: real continuous labels, calibration labels obtained during short-term calibration, expected control quantities estimated based on the difference between the target state and the actual state and combined with historical motion trajectories or task constraints, and weakly supervised labels converted from user error correction signals.

[0045] When the current monitoring signal is estimated from the difference between the target state and the actual state, the step of calculating the confidence weight of the monitoring signal is also included: The confidence weight of the supervision signal is calculated based on system latency, historical trajectory continuity, target reachability, and consistency of user error correction signals. For each of these factors, a corresponding confidence evaluation index can be constructed, and after normalizing each index to a preset range, they are fused to obtain the confidence weight of the supervision signal. Among them, the closer the system delay is to the preset control response delay, the more continuous the current trajectory is with the historical trajectory, the easier it is for the current target to be reached under the task constraints, and the more consistent the expected control quantity is with the user error correction signal, the higher the corresponding confidence evaluation index.

[0046] After normalizing each confidence evaluation index to a preset range, the confidence weight of the supervision signal is calculated using a weighted fusion method. The weights of each confidence evaluation indicator can be determined based on the verification results of the initial calibration phase, task requirements, or historical operational data. If the confidence weight of the supervisory signal... Below the preset confidence threshold If the corresponding adaptation loss weight is reset to zero or the update is skipped, it will be to avoid incorrect adaptation caused by low-confidence weak supervision labels.

[0047] Taking two-dimensional cursor control as an example, when the target point is located to the upper right of the current cursor, the system can combine the relative direction of r_t and s_t, historical trajectory, velocity limit, control delay, and task boundary to estimate a desired velocity or desired displacement increment pointing towards the target region as y_t^*; this y_t^* is used to constrain the model output. Instead of directly using the target position r_t or the current cursor position s_t as the model output label.

[0048] In this embodiment, by employing a multi-source supervision signal mechanism and introducing confidence weights, the method can still construct supervision information for model adaptation in online usage scenarios lacking real labels, and reduce the risk of erroneous updates caused by low-confidence pseudo-labels, thereby improving the feasibility and security of online adaptation.

[0049] Furthermore, in one embodiment, the specific calculation process for selecting a subset of parameters to be updated within the corresponding level range for updating is as follows: According to the target state Compared with the actual state Calculate the closed-loop control error: ; in, This is the distance metric function. The distance metric function can be Euclidean distance, trajectory deviation, cosine distance of the direction angle, or the number of user error corrections per unit time. Subsequently, based on a length of... The sliding window averages the closed-loop control error to obtain the smoothed error: ; For example, in a two-dimensional cursor control scenario, the target state r_t represents the coordinates of the target point, and the actual state s_t represents the current cursor coordinates; both belong to the positional states in the cursor control task space. The continuous control quantity output by the regression decoding model... _t can represent the velocity of a two-dimensional cursor or the increment of two-dimensional displacement within a unit control cycle. In velocity control mode, it can be approximated as the cursor's position according to... _t moves within one control period Δt, and its position at the next moment satisfies s_{t+1}=s_t+Δt· _t.

[0050] Subsequently, the system calculates the closed-loop control error E_t based on the target point coordinates r_t and the current or updated cursor coordinates s_t. For example, the distance metric D can be Euclidean distance. Therefore, r_t and s_t are used to evaluate "how much the control result deviates from the target". _t is used to represent "what control command the model is currently outputting." While physically different, the two are related in closed-loop control. The sliding window length W can be set according to the system sampling frequency and task rhythm.

[0051] Obtaining brain signal quality indicators and according to and smoothing error Select the subset of parameters to be updated .

[0052] Specifically, brain signal quality indicators It can be calculated from at least one of the following: signal-to-noise ratio, channel drop rate, artifact intensity, electrode impedance, and characteristic anomaly degree. For example, the instantaneous signal-to-noise ratio of each channel can be weighted and averaged, with a deduction term applied to the number of dropped channels, and finally normalized to... interval as .

[0053] when If the preset conditions are not met, the subset of parameters to be updated will be... Forced to be an empty set, that is: ; Updates to the regression decoding model are prohibited during this update cycle. When the preset conditions are met, based on the smoothing error The size of the selected parameter subset is to be updated.

[0054] Specifically, a threshold sequence is set. .when hour, That is, the regression decoding model will not be updated during this update cycle; when When, update the first-level parameter subset; when When, update the first-level parameter subset and the second-level parameter subset; and so on; when When this happens, update all parameters. The above rules can be uniformly expressed as: ; in, .when hour: ; Therefore, the larger the smoothing error, the higher the parameter level of the subset of parameters to be updated, and the wider the range of parameters that can be updated. Threshold sequence The threshold can be adaptively set based on the error statistics during the initial calibration phase, for example, by taking a certain number of quantiles of the error distribution during the initial calibration phase as the threshold.

[0055] An anomaly safety threshold greater than the maximum adaptation threshold can also be set. When the smoothing error is greater than or equal to the anomaly safety threshold, the system does not interpret it as ordinary brain signal drift, but instead determines the current update cycle as an abnormal state, prohibits gradient updates, and maintains the model before the update, switches to safety control mode, or prompts the user to recalibrate.

[0056] In this embodiment, a monotonic mapping between smoothing error and a subset of grade parameters is established through a threshold sequence. When the error is small, only low-perturbation parameters are updated. When the error is within an adaptable range and gradually increases, it is gradually expanded to more feature extraction parameters closer to the output. When the error exceeds a safe threshold, updating is prohibited or recalibration is triggered. This mapping method makes the adaptive process interpretable and adjustable.

[0057] Furthermore, in one embodiment, the hierarchical parameter set is divided into multiple hierarchical parameter subsets based on the degree of influence of the parameters on the overall output of the model, the position of the parameters in the network layer, and the degree of disturbance to the existing decoding capability after the parameter update. Different hierarchical parameter subsets correspond to different closed-loop control error ranges.

[0058] In this embodiment, the regression decoding model is divided into categories based on the degree of update perturbation. Subset of level parameters .in, It is a subset of low-perturbation-level parameters, including at least one of the following: normalization layer parameters, bias parameters, channel scaling parameters, regression head parameters, or lightweight adapter parameters; It is a subset of parameters with low to medium perturbation levels, including parameters of several fully connected or convolutional layers near the output end; The high-perturbation-level parameter subset includes more feature extraction layer parameters. Other levels follow the same pattern. Each level's parameter subset can be divided based on the parameter's impact on the overall model output, the parameter's position within the network layer, and the degree of perturbation to existing decoding capabilities after parameter updates.

[0059] The regression decoding model uses the EEGNet network, and a regression head is set at the output of EEGNet. It is used to output continuous control values. EEGNet includes feature extraction structures such as temporal convolutional layers, spatial convolutional layers, separable convolutional layers, and batch normalization layers. For EEGNet, the trainable parameters can be divided into four hierarchical subsets according to the degree of update perturbation: The low-perturbation parameter subset includes trainable scaling and offset parameters of the batch normalization layer, bias parameters in the network, and other lightweight parameters that do not directly change the underlying spatiotemporal feature extraction structure of EEG. This is a subset of parameters with low to medium perturbations, including the regression head. The trainable parameters, such as the weights and biases of fully connected layers or shallow multilayer perceptrons, are used. Since the regression head directly acts on the extracted EEG features, its parameter updates are mainly used to adjust the mapping relationship between the current brain signal features and continuous control variables. It is a subset of medium-to-high perturbation parameters, including separable convolutional layers near the network output and their corresponding trainable parameters, which are used to adjust the high-level EEG feature representations while maintaining more low-level feature representations. A subset of highly perturbable parameters, including trainable parameters of temporal and spatial convolutional layers near the network input, is used to adjust the basic temporal and spatial feature extraction process of EEG signals.

[0060] Pick ,Right now The EEGNet network and its parameter level division are only one implementation method and do not constitute a limitation on the structure and number of parameter levels of the regression decoding model of this invention. For regression decoding models constructed using other convolutional neural networks, recurrent neural networks, Transformer networks, or combinations thereof, the same principle can be used to divide the parameter level subsets according to the function of each network layer, the position of the parameters, and the degree of update perturbation.

[0061] In this embodiment, by dividing the parameter subset into levels according to the degree of influence of the parameters on the overall output of the model, it is possible to fine-tune only the low-level parameters to maintain stability under small error conditions, and open up the high-level parameters to ensure adaptability under large error conditions, thus effectively balancing the stability and adaptability of the model.

[0062] This embodiment provides a parameter accumulation and update mechanism based on error grading. Specifically, the graded parameter set of the regression decoding model is divided into multiple non-overlapping subsets of graded parameters.

[0063] Subset of parameters to be updated The parameters are accumulated according to levels, specifically including: when the closed-loop control error is in the k-th level interval, the subset of parameters to be updated. This is the union of parameter subsets from level 1 to level k; this means that the higher the error level, the wider the range of parameters allowed to participate in the update. When the closed-loop control error is in the abnormal range, the subset of parameters to be updated... When the set is set to empty, no parameter update operation is performed to prevent the model from degrading under abnormal conditions.

[0064] After determining the subset of parameters to be updated Then, the following steps are performed to update the model: based on the current supervision signal. In conjunction with at least one of the following: historical representative sample outputs, historical feature prototypes, or historical anchoring model parameters, an objective function is constructed that includes an adaptation loss term and an anchoring constraint loss term. Only on the subset of parameters to be updated. The regression decoding model is updated using gradients; the subset of parameters to be updated... Other parameters remain frozen in this update.

[0065] This embodiment achieves adaptive adjustment of the model update intensity: under small error conditions, only low-level parameters are fine-tuned to maintain stability; under large error conditions, high-level parameters are enabled to ensure adaptability; and updates are completely stopped when errors are abnormal to ensure safety. By accumulating a subset of parameters to be updated according to their levels, adaptive adjustment of the model update intensity is achieved, and updates are completely stopped when errors are abnormal to ensure safety, ensuring that the model can adopt the optimal update strategy under different error levels.

[0066] Furthermore, in one embodiment, an objective function is constructed. .

[0067] Specifically, based on current monitoring signals Based on historical anchoring information, construct an objective function that includes an adaptive loss term and an anchoring constraint loss term: ; in, The distance between the output of the characterization regression decoding model on the current brain signal and the current supervision signal. This characterizes the degree of deviation between the current model and historical anchoring information. The weighting factor for anchoring constraints.

[0068] In one implementation, the adaptation loss term is: ; in, The confidence weights for the monitoring signal. Current monitoring signal. It can be derived from real continuous labels, short-term calibration labels, expected control quantities estimated based on the difference between the target state and the actual state and combined with historical motion trajectories or task constraints, or weakly supervised labels converted from user error correction signals.

[0069] Specifically, when the desired control quantity is derived from the closed-loop error, the confidence weight of the supervision signal can be calculated based on system latency, historical trajectory continuity, target achievability, and consistency of user error correction signals. If the confidence weight of the supervision signal is lower than a preset threshold, its corresponding adaptation loss weight is reset to zero or the update is skipped to avoid incorrect adaptation caused by low-confidence, weak supervision labels.

[0070] In one implementation, the anchoring constraint loss term is distilled from historical representative sample outputs: ; in, For pre-saved historical representative brain signal samples, A historical anchoring model.

[0071] In another implementation, the anchoring constraint loss term is presented in the form of characteristic prototype distillation: ; in, For pre-preserved historical prototypes, This represents the output of the historical anchoring model on representative historical samples. This is the regression head for the regression decoding model.

[0072] In another implementation, the anchoring constraint loss term takes the form of a parametric importance constraint: ; in, For the first Each parameter has a weight representing the importance of a historical task. For the current model, the One parameter, These are the corresponding parameters for the historical anchoring model.

[0073] Only in the subset of parameters to be updated Gradient updates are performed on the regression decoding model: ; in, Based on the learning rate, This indicates that only a subset of parameters are being updated. The gradient of the parameters is calculated, and the subset of parameters to be updated is used. Other parameters remain unchanged in this update.

[0074] In an alternative implementation, an error-driven update intensity coefficient is further introduced: ; And rewrite the gradient update as follows: ; Therefore, when the safety gate is updated and the error is within an acceptable range, unified control is achieved, which allows for a larger update range and a higher update intensity as the error increases; if the error exceeds the abnormal safety threshold or the gate fails, no update is performed.

[0075] In this embodiment, by introducing an anchoring constraint loss term and combining it with the current adaptation loss to form the objective function, the method can retain the decoding capabilities already learned by the historical anchoring model while pursuing rapid adaptation to current brain signal changes, thereby suppressing catastrophic forgetting and ensuring the performance stability of the model in long-term operation.

[0076] Furthermore, in one embodiment, the method further includes an update security gating step: Acquiring at least one of the following—brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence—constitutes the updated security gating condition. ; When the updated safety gating conditions do not meet the preset conditions, or when the smoothing error exceeds the preset safety threshold, updating the regression decoding model based on the current closed-loop error is prohibited.

[0077] Among them, parameter set Based on the degree of update perturbation, parameters are divided into K level subsets. Smoothing error The larger the subset of parameters to be updated The higher the parameter level included, the wider the range of parameters that can be updated.

[0078] The specific process for updating the security gating mechanism is as follows: Specifically, before performing a model update, at least one of the following is obtained: brain signal quality index, device status index, task effectiveness index, and error attribution confidence level. The brain signal quality index can be calculated from at least one of the following: signal-to-noise ratio, channel disconnection rate, artifact intensity, electrode impedance, and characteristic anomaly degree; the device status index can reflect whether the external device is responding normally; and the task effectiveness index can reflect whether the current control phase is suitable for model updating.

[0079] when At that time, among them The subset of parameters to be updated is set to the preset quality threshold. Forced to an empty set means that the regression decoding model cannot be updated during this update cycle. In this case, the system can either keep the current model unchanged, switch to safe mode, or prompt the user to recalibrate.

[0080] Even if the brain signal quality index meets the preset conditions, if the external device is in an abnormal state, the task is invalid, the closed-loop error exceeds the abnormal safety threshold, or the error attribution confidence is lower than the preset threshold, the subset of parameters to be updated will be forcibly set to an empty set, and the update of the regression decoding model will be prohibited.

[0081] When the safety gating is updated, the system selects a subset of parameters to be updated based on the magnitude of the smoothing error. This design avoids erroneous model updates based on unreliable closed-loop errors when there are issues such as electrode detachment, severe artifacts, abnormal external device status, invalid tasks, or unreliable error attribution, thereby improving the long-term stability of the system.

[0082] In this embodiment, by introducing an update security gating mechanism, brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence are incorporated into the update judgment. When the update security gating does not meet the preset conditions, the method forcibly prohibits the update of the regression decoding model, thereby avoiding incorrect adaptation in cases of electrode detachment, severe artifacts, external device abnormalities, or invalid tasks, and improving the robustness of the system.

[0083] Furthermore, in one embodiment, a candidate model validation and backoff mechanism is introduced. After the gradient update is completed, the original model is not immediately replaced with the updated model. Instead, the following steps are performed: Step 1: Let the regression decoding model before the update be... Let the updated regression decoding model be the candidate model. The system calculates simultaneously in several subsequent windows. and Output on brain signals, and through fusion weights Generate actual control quantity: ; Among them, initially A smaller value can be chosen to reduce the impact on user experience when the candidate model has not been fully validated.

[0084] The second step involves the system determining whether a candidate model meets preset improvement conditions based on its offline prediction error under the same brain signal input, the shadow loop error based on target state estimation, or the actual loop error change trend under fusion control conditions. For example, if a candidate model meets the improvement conditions within several consecutive sliding windows, the fusion weights are gradually increased by a preset step size, and the candidate model ultimately completely replaces the original model.

[0085] The third step is to discard the candidate model and revert to the model before the update if the candidate model fails to meet the preset improvement conditions during the verification process, or if the offline prediction error, shadow loop closure error or fusion control error of the candidate model exceeds the preset safety threshold. At the same time, the fusion weight is reset to zero or kept within the safety range.

[0086] This design ensures that each update is evaluated online before being accepted, avoiding irreversible degradation caused by a single update failure and further improving the long-term stability of the method.

[0087] In this embodiment, a candidate model verification step is introduced. The candidate model is judged to meet the preset improvement conditions by the trend of changes in the offline prediction error, shadow closed-loop error, or closed-loop error after fusion control. The candidate model is gradually accepted only when it brings stable improvement. Otherwise, the model before the update is retained to avoid irreversible degradation caused by a single update failure and further improve the long-term stability of the system.

[0088] Secondly, embodiments of this application provide a brain-computer interface error grading adaptive device, comprising: The signal acquisition and error calculation module is used to acquire the user's brain signals, input them into the regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculate the closed-loop control error based on the actual states generated by the external devices and the set target states. The quality assessment module is used to obtain brain signal quality indicators based on user brain signals to characterize reliability. If the brain signal quality indicators do not meet the preset conditions, updating the regression decoding model is prohibited. The parameter selection and update module is used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model according to the closed-loop control error when the brain signal quality index meets the preset conditions.

[0089] In this embodiment, the steps of the above method are implemented through modular design, which facilitates system integration and functional expansion, ensures that each functional module works together to achieve efficient error classification and adaptation, establishes an explicit correspondence between the degree of brain signal change and the range of updatable parameters of the decoder, and avoids erroneous updates to the decoder when the error is abnormal or the attribution is unreliable.

[0090] Furthermore, in one embodiment, the signal acquisition and error calculation module is also used to average or filter the closed-loop control error based on a sliding window to eliminate instantaneous fluctuations or noise in the closed-loop control error, and use the smoothed error obtained after smoothing as the closed-loop control error. The specific processing logic is consistent with the steps for smoothing the closed-loop control error in the method embodiment, and will not be repeated here.

[0091] In this embodiment, by smoothing the closed-loop control error, instantaneous fluctuations or noise are eliminated, making the error index used to select the subset of parameters to be updated more stable and reliable, providing an accurate basis for subsequent error classification, thereby ensuring that the adaptive update process is based on the actual control performance deviation rather than instantaneous noise.

[0092] Furthermore, in one embodiment, the signal acquisition and error calculation module is specifically used to input brain signals into a regression decoding model composed of a feature extractor and a regression head connected in series. It supports various structures such as convolutional neural networks, recurrent neural networks, or Transformer networks. The specific model structure and signal type are consistent with the calculation process in the method embodiment regarding the acquisition of user brain signal input regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and will not be repeated here.

[0093] In this embodiment, by clarifying the specific structure of the regression decoding model and the difference between continuous control quantities and state quantities, the physical meaning of the model output and the task space state is clarified, ensuring the correctness of the closed-loop control error calculation, and supporting multiple brain signal types and external device control tasks, thus exhibiting good versatility.

[0094] Furthermore, in one embodiment, the parameter selection and update module is specifically used to construct an objective function based on the current supervision signal and the anchoring constraint loss term. The current supervision signal comes from at least one of the real continuous label, calibration label, expected control quantity, or weak supervision label, and calculates the confidence weight of the supervision signal. The specific signal source and weight calculation logic are consistent with the steps in the method embodiment regarding the construction of the objective function based on the current supervision signal and the anchoring constraint loss term, and will not be repeated here.

[0095] In this embodiment, by employing a multi-source supervision signal mechanism and introducing confidence weights, the method can still construct supervision information for model adaptation in online usage scenarios lacking real labels, and reduce the risk of erroneous updates caused by low-confidence pseudo-labels, thereby improving the feasibility and security of online adaptation.

[0096] Furthermore, in one embodiment, the parameter selection and update module is specifically used to calculate the closed-loop control error based on the target state and the actual state, and select a subset of parameters to be updated based on the brain signal quality index and the magnitude of the smoothing error. The update range is determined using a threshold sequence. The specific error calculation and subset selection logic and method embodiment are consistent with the specific calculation process of selecting a subset of parameters to be updated within the corresponding level range for updating, and will not be repeated here.

[0097] In this embodiment, a monotonic mapping between smoothing error and a subset of grade parameters is established through a threshold sequence. When the error is small, only low-perturbation parameters are updated. When the error is within an adaptable range and gradually increases, it is gradually expanded to more feature extraction parameters closer to the output. When the error exceeds a safe threshold, updating is prohibited or recalibration is triggered. This mapping method makes the adaptive process interpretable and adjustable.

[0098] Furthermore, in one embodiment, the parameter selection and update module is specifically used to divide the hierarchical parameter set into multiple hierarchical parameter subsets based on the degree of influence of the parameters on the overall output of the model, the position of the parameters in the network layer, and the degree of disturbance to the existing decoding capability after the parameter update. The specific division principle is consistent with the steps regarding the division of the hierarchical parameter set in the method embodiment, and will not be repeated here.

[0099] In this embodiment, by dividing the parameter subset into levels according to the degree of influence of the parameters on the overall output of the model, it is possible to fine-tune only the low-level parameters to maintain stability under small error conditions, and open up the high-level parameters to ensure adaptability under large error conditions, thus effectively balancing the stability and adaptability of the model.

[0100] Furthermore, in one embodiment, the parameter selection and update module is specifically used to accumulate the subset of parameters to be updated according to levels. When the closed-loop control error is in the k-th level interval, the subset of parameters to be updated is the union of the parameter subsets from the first level to the k-th level. The specific accumulation mechanism is consistent with the steps of the parameter accumulation and update mechanism based on error classification in the method embodiment, and will not be repeated here.

[0101] In this embodiment, the model update intensity is adaptively adjusted by accumulating a subset of parameters to be updated according to their levels. The update is completely stopped when the error is abnormal to ensure safety, and the model can adopt the optimal update strategy under different error levels.

[0102] Furthermore, in one embodiment, the parameter selection and update module is specifically used to construct an objective function that includes an adaptation loss term and an anchoring constraint loss term. The anchoring constraint loss term employs at least one of historical representative sample output distillation, feature prototype distillation, or parameter importance constraints, and gradient updates are performed only within a subset of parameters to be updated. The specific loss function construction and update process and method embodiments regarding the construction of the objective function are detailed below. The steps are the same and will not be repeated.

[0103] In this embodiment, by introducing an anchoring constraint loss term and combining it with the current adaptation loss to form the objective function, the method can retain the decoding capabilities already learned by the historical anchoring model while pursuing rapid adaptation to current brain signal changes, thereby suppressing catastrophic forgetting and ensuring the performance stability of the model in long-term operation.

[0104] Furthermore, in one embodiment, the quality assessment module is also used to obtain at least one of the following: brain signal quality index, device status index, task effectiveness index, or error attribution confidence level, to constitute the update security gating condition. When the update security gating condition does not meet the preset condition, the update is prohibited. The specific gating judgment process is consistent with the process of update security gating steps in the method embodiment, and will not be repeated here.

[0105] In this embodiment, by introducing an update security gating mechanism, brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence are incorporated into the update judgment. When the update security gating does not meet the preset conditions, the method forcibly prohibits the update of the regression decoding model, thereby avoiding incorrect adaptation in cases of electrode detachment, severe artifacts, external device abnormalities, or invalid tasks, and improving the robustness of the system.

[0106] Furthermore, in one embodiment, the device also includes a model verification module, which is used to introduce a candidate model verification and backoff mechanism after the gradient update is completed. The module generates an actual control quantity by fusing weights and determines whether to accept the candidate model based on the error change trend. The specific verification and backoff process is the same as the steps regarding the candidate model verification and backoff mechanism in the method embodiment, and will not be repeated here.

[0107] In this embodiment, a candidate model verification step is introduced. The candidate model is judged to meet the preset improvement conditions by the trend of changes in the offline prediction error, shadow closed-loop error, or closed-loop error after fusion control. The candidate model is gradually accepted only when it brings stable improvement. Otherwise, the model before the update is retained to avoid irreversible degradation caused by a single update failure and further improve the long-term stability of the system.

[0108] The functions of each module in the above-mentioned brain-computer interface error grading and adaptive device correspond to the steps in the above-mentioned brain-computer interface error grading and adaptive method embodiment, and their functions and implementation processes will not be described in detail here.

[0109] Thirdly, embodiments of this application provide a brain-computer interface error grading adaptive device, which can be a personal computer (PC), laptop computer, server or other device with data processing capabilities.

[0110] Reference Figure 2 , Figure 2 This is a schematic diagram of the hardware structure of the brain-computer interface error grading adaptive device involved in the embodiments of this application. In the embodiments of this application, the brain-computer interface error grading adaptive device may include a processor, a memory, a communication interface, and a communication bus.

[0111] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.

[0112] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting devices within the brain-computer interface error grading adaptive device, as well as interfaces used for interconnecting the brain-computer interface error grading adaptive device with other devices (such as other computing devices or user devices). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user devices can be displays, keyboards, etc.

[0113] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0114] The processor can be a general-purpose processor, which can call the brain-computer interface error grading adaptation program stored in the memory and execute the brain-computer interface error grading adaptation method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the brain-computer interface error grading adaptation program is called can be referred to in the various embodiments of the brain-computer interface error grading adaptation method of this application, and will not be repeated here.

[0115] Those skilled in the art will understand that Figure 2 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0116] Fourthly, embodiments of this application also provide a computer-readable storage medium.

[0117] The present application has a computer-readable storage medium storing a brain-computer interface error grading adaptive program, wherein when the brain-computer interface error grading adaptive program is executed by a processor, it implements the steps of the brain-computer interface error grading adaptive method as described above.

[0118] The method implemented when the brain-computer interface error grading adaptive program is executed can be referred to in various embodiments of the brain-computer interface error grading adaptive method of this application, and will not be repeated here.

[0119] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0120] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or devices. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0121] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0122] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0123] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0125] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A brain-computer interface error grading adaptive method, characterized by, include: The system acquires user brain signals, inputs them into a regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculates closed-loop control errors based on the actual states generated by external devices and the set target states. Obtain a brain signal quality index based on the user's brain signal to characterize the reliability. If the brain signal quality index does not meet the preset conditions, then the regression decoding model is prohibited from being updated. If the brain signal quality index meets the preset conditions, then the subset of parameters to be updated within the corresponding level range is selected from the hierarchical parameter set of the regression decoding model and updated according to the closed-loop control error.

2. The brain-machine interface error staging adaptive method of claim 1, wherein: It also includes a step of smoothing the closed-loop control error: The closed-loop control error is averaged or filtered based on a sliding window to eliminate instantaneous fluctuations or noise in the closed-loop control error. The smoothing error obtained after smoothing As the closed-loop control error, it is used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model within the corresponding level range for updating.

3. The brain-computer interface error grading adaptive method as described in claim 2, characterized in that, The step of selecting a subset of parameters to be updated within the corresponding level range for updating includes: Obtaining brain signal quality indicators and according to and the smoothing error Select the subset of parameters to be updated ; like If the preset conditions are not met, then the subset of parameters to be updated will be... Forced to be an empty set, that is: ; The regression decoding model is prohibited from being updated during this update cycle; like If the preset conditions are met, then according to the smoothing error Size selection of the subset of parameters to be updated Set threshold sequence ,Right now: ; in, , This represents the Kth parameter subset; like ,but ; like ,but , where Θ represents the complete parameter set of the regression decoding model.

4. The brain-computer interface error grading adaptive method as described in claim 3, characterized in that, The step of selecting a subset of parameters to be updated within the corresponding level range for updating includes constructing an objective function. : Based on the current monitoring signal Based on historical anchoring information, construct an objective function that includes an adaptive loss term and an anchoring constraint loss term: ; in, The distance between the output of the regression decoding model on the current brain signal and the current supervision signal is represented. This characterizes the degree of deviation between the current model and historical anchoring information. The tradeoff coefficient for anchoring constraints; The adaptation loss term is: ; in, The regression decoding model for brain signals The output, As a weight for the confidence level of the monitoring signal; The current monitoring signal The expected control quantity is derived from real continuous labels, short-term calibration labels, the difference between the target state and the actual state combined with historical motion trajectories or task constraints, or weakly supervised labels converted from error correction signals. If the anchoring constraint loss term adopts the distillation form of historical representative sample output, then: ; in, For pre-saved historical representative brain signal samples, A historical anchoring model; If the anchoring constraint loss term adopts the characteristic prototype distillation form, then: ; in, For pre-preserved historical prototypes, The output of the historical anchoring model on representative historical samples. This is the regression head of the regression decoding model; If the anchoring constraint loss term takes the form of a parametric importance constraint, then: ; in, For the first Each parameter has a weight representing the importance of a historical task. For the current model, the first One parameter, These are the corresponding parameters for the historical anchoring model.

5. The brain-computer interface error grading adaptive method as described in claim 4, characterized in that: The construction objective function Then, only in the subset of parameters to be updated The regression decoding model is then updated using gradients: ; in, Based on the learning rate, This indicates that only the subset of parameters to be updated is applied. The gradient is calculated for the parameters in the subset to be updated. All parameters remain unchanged in this update. ← is the assignment operator, meaning the new value calculated on the right is used to update the variable on the left. Indicates belonging to a subset Specific model parameters; Introducing error-driven update intensity coefficients: ; The gradient update is rewritten as follows: ; in, This is the update intensity coefficient, representing a coefficient that dynamically changes with the error, used to adaptively adjust the intensity of the gradient update. This represents the smoothing error, and clip(...,0,1) represents the truncation function.

6. The brain-computer interface error grading adaptive method as described in claim 1, characterized in that, This also includes updating security gating procedures: Acquiring at least one of the following—brain signal quality indicators, device status indicators, task effectiveness indicators, or error attribution confidence—constitutes the updated security gating condition. If the brain signal quality index, device status index, task effectiveness index, or error attribution confidence does not meet the update security gating condition, then updating the regression decoding model is prohibited.

7. The brain-computer interface error grading adaptive method as described in claim 1, characterized in that, The update process is followed by a model validation step: The offline prediction error, shadow closed-loop error and / or closed-loop error after fusion control of the updated regression decoding model are used to determine whether the preset improvement conditions are met. If the preset improvement conditions are met, then the updated regression decoding model is accepted; Otherwise, retain the regression decoding model before the update.

8. A brain-computer interface error grading adaptive device, characterized in that, include: The signal acquisition and error calculation module is used to acquire the user's brain signals, input them into the regression decoding model to obtain continuous control quantities to drive external devices to generate actual states, and calculate the closed-loop control error based on the actual states generated by the external devices and the set target states. The quality assessment module is used to obtain a brain signal quality index based on the user's brain signal to characterize the reliability. If the brain signal quality index does not meet the preset conditions, the regression decoding model is prohibited from being updated. The parameter selection and update module is used to select a subset of parameters to be updated from the hierarchical parameter set of the regression decoding model according to the closed-loop control error when the brain signal quality index meets the preset conditions.

9. A brain-computer interface error grading adaptive device, characterized in that, The brain-computer interface error grading adaptive device includes a processor, a memory, and a brain-computer interface error grading adaptive program stored in the memory and executable by the processor, wherein when the brain-computer interface error grading adaptive program is executed by the processor, it implements the steps of the brain-computer interface error grading adaptive method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a brain-computer interface error grading adaptive program, wherein when the brain-computer interface error grading adaptive program is executed by a processor, it implements the steps of the brain-computer interface error grading adaptive method as described in any one of claims 1 to 7.