A training method and apparatus for a classification model applied to brain-computer interface tasks.

By extracting feature vectors from EEG sequence data and optimizing target training, the problem of inaccurate judgment of motor imagery state in brain-computer interface tasks was solved, achieving higher judgment accuracy and task execution quality.

CN117932406BActive Publication Date: 2026-05-26ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG LAB
Filing Date
2024-01-17
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing brain-computer interface tasks struggle to accurately determine the corresponding motor imagery state from EEG data during transitions between motor imagery states, especially in asynchronous brain-computer interface tasks, leading to a decline in execution quality.

Method used

By acquiring standard EEG sequence data, using the projection matrix to determine feature vectors, and optimizing the classification model with the goal of minimizing the overall motor imagery state bias and the bias of motor imagery state changes at continuous sampling points, the accuracy of judgment is improved.

Benefits of technology

The trained classification model can more accurately determine the overall motor imagery state of EEG sequence data, thus improving the performance quality of brain-computer interface tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117932406B_ABST
    Figure CN117932406B_ABST
Patent Text Reader

Abstract

This specification discloses a training method and apparatus for a classification model applied to brain-computer interface tasks. The dedicated equipment inputs the feature vectors corresponding to standard EEG sequence data into the classification model to be trained, obtaining the predicted motor imagery state for each sampling point of the standard EEG sequence data and the overall motor imagery state corresponding to the standard EEG sequence data. The optimization objective for training the classification model is to minimize the deviation between the overall motor imagery state corresponding to the standard EEG sequence data and the standard overall motor imagery state corresponding to the standard EEG sequence data, and to minimize the deviation between the change information of the motor imagery state between any two consecutive sampling points of the standard EEG sequence data and the actual change information of the motor imagery state between those two sampling points. The trained classification model can output the overall motor imagery state corresponding to the input EEG sequence data, improving the performance quality of brain-computer interface tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of brain-computer interfaces, and in particular to a training method and apparatus for a classification model applied to brain-computer interface tasks. Background Technology

[0002] With the rapid development of the brain-computer interface (BCI) field, solutions for acquiring users' EEG data through BCIs and then determining users' intentions have been realized. For example, in motor imagery tasks, users' EEG data can be acquired through BCIs, and then the user's motor imagery state during the task can be determined by analyzing the EEG data. Motor imagery states include imagining the left limb moving, imagining the right limb moving and raising, etc.

[0003] However, in existing brain-computer interface (BCI) tasks, when the user's motor imagery state changes (i.e., the user's motor imagery state switches), it is difficult to accurately determine the corresponding motor imagery state from the fluctuating EEG data. During the execution of BCI tasks, especially in asynchronous BCI tasks that require real-time identification of EEG data, fluctuations in EEG data are very common. For BCI tasks, it is highly unacceptable to make mistakes in judging the motor imagery state corresponding to EEG data, thereby affecting the execution quality of the BCI task.

[0004] Therefore, how to effectively improve the accuracy of judging the motor imagery state corresponding to EEG data is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides a training method and apparatus for a classification model applied to brain-computer interface tasks, in order to partially solve the aforementioned problems existing in the prior art.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a training method for a classification model applied to brain-computer interface tasks, including:

[0008] Acquire standard EEG sequence data, wherein the standard EEG sequence data is obtained by splicing together the EEG data collected at each sampling point within a preset time window according to the time order of each sampling point;

[0009] Based on the standard EEG sequence data and the pre-determined projection matrix, the feature vector corresponding to the standard EEG sequence data is determined;

[0010] The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data. The overall motor imagery state is determined by the classification model based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data.

[0011] The classification model is trained with the optimization objectives of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

[0012] Optionally, the projection matrix is ​​predetermined, specifically including:

[0013] Acquire sample EEG sequence data corresponding to two preset brain-computer interface tasks, wherein the two preset brain-computer interface tasks correspond to different motor imagery states, and there is a correspondence between the different motor imagery states corresponding to the two preset brain-computer interface tasks.

[0014] For each brain-computer interface task included in the two preset brain-computer interface tasks, the sample correlation matrix corresponding to the brain-computer interface task is determined based on the sample EEG sequence data corresponding to the brain-computer interface task.

[0015] The projection matrix is ​​determined based on the sample correlation matrix corresponding to each of the two preset brain-computer interface tasks.

[0016] Optionally, the two preset brain-computer interface tasks include: imagining left limb movement and imagining right limb movement.

[0017] Optionally, the feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data, specifically including:

[0018] The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. Based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, the motor imagery state sequence data corresponding to the standard EEG sequence data is determined. The motor imagery state sequence data is processed to determine the overall motor imagery state corresponding to the standard EEG sequence data under the chronological order of the motor imagery states in the motor imagery state sequence data.

[0019] This manual provides a brain-computer interface task execution method, including:

[0020] Acquire EEG sequence data;

[0021] Based on the EEG sequence data and the pre-determined projection matrix, the feature vector corresponding to the EEG sequence data is determined;

[0022] The feature vector corresponding to the EEG sequence data is input into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, wherein the classification model is a model trained using the above-mentioned training method.

[0023] The target task is executed based on the overall motor imagery state corresponding to the EEG sequence data.

[0024] This specification provides a training device for a classification model applied to brain-computer interface tasks, comprising:

[0025] The acquisition module is used to acquire standard EEG sequence data, wherein the standard EEG sequence data is obtained by splicing together the EEG data collected at each sampling point within a preset time window according to the time order of each sampling point.

[0026] The determination module is used to determine the feature vector corresponding to the standard EEG sequence data based on the standard EEG sequence data and a pre-determined projection matrix;

[0027] The input module is used to input the feature vector corresponding to the standard EEG sequence data into the classification model to be trained, so as to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data, wherein the overall motor imagery state is determined by the classification model based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data.

[0028] The training module is used to train the classification model with the optimization objectives of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

[0029] Optionally, the determining module is specifically used for,

[0030] Acquire sample EEG sequence data corresponding to two preset brain-computer interface (BCI) tasks, wherein the two preset BCI tasks correspond to different motor imagery states, and there is a correspondence between the different motor imagery states corresponding to the two preset BCI tasks; for each BCI task included in the two preset BCI tasks, determine the sample correlation matrix corresponding to the BCI task based on the sample EEG sequence data corresponding to the BCI task; determine the projection matrix based on the sample correlation matrices corresponding to the two preset BCI tasks.

[0031] Optionally, the two preset brain-computer interface tasks include: imagining left limb movement and imagining right limb movement.

[0032] Optionally, the input module is specifically used for,

[0033] The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. Based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, the motor imagery state sequence data corresponding to the standard EEG sequence data is determined. The motor imagery state sequence data is processed to determine the overall motor imagery state corresponding to the standard EEG sequence data under the chronological order of the motor imagery states in the motor imagery state sequence data.

[0034] This specification provides a brain-computer interface task execution device, including:

[0035] The acquisition module is used to acquire EEG sequence data;

[0036] The determination module is used to determine the feature vector corresponding to the EEG sequence data based on the EEG sequence data and a pre-determined projection matrix;

[0037] The input module is used to input the feature vector corresponding to the EEG sequence data into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, wherein the classification model is a model trained using the above-mentioned training method.

[0038] The execution module is used to perform the target task based on the overall motor imagery state corresponding to the EEG sequence data.

[0039] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described training method for a classification model applied to brain-computer interface tasks or a brain-computer interface task execution method.

[0040] This specification provides an electronic device, including a processor and a computer program stored in a memory and executable on the processor. When the processor executes the program, it implements the above-described training method for a classification model applied to a brain-computer interface task or a brain-computer interface task execution method.

[0041] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0042] In the training method for the classification model applied to brain-computer interface tasks provided in this specification, a dedicated device determines the feature vector corresponding to the standard EEG sequence data by acquiring standard EEG sequence data and a pre-determined projection matrix. Then, the feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data determined based on the predicted motor imagery state of each sampling point. The optimization objective for training the classification model is to minimize the deviation between the overall motor imagery state corresponding to the standard EEG sequence data and the standard overall motor imagery state corresponding to the standard EEG sequence data, and to minimize the deviation between the change information of the motor imagery state of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual change information of the motor imagery state of those two sampling points. The trained classification model can output the overall motor imagery state corresponding to the EEG sequence data based on the input EEG sequence data.

[0043] In the brain-computer interface task execution method provided in this specification, after acquiring EEG sequence data, the feature vector corresponding to the EEG sequence data is determined according to a pre-determined projection matrix. Then, the feature vector corresponding to the EEG sequence data is input into a pre-trained classification model, and the overall motor imagery state corresponding to the EEG sequence data is output. The corresponding brain-computer interface task is executed according to the overall motor imagery state corresponding to the EEG sequence data.

[0044] As can be seen from the above method, by optimizing the classification model with the goal of minimizing the deviation between the overall motor imagery state corresponding to the standard EEG sequence data and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the change information of the motor imagery state at any two consecutive sampling points corresponding to the standard EEG sequence data and the actual change information of the motor imagery state at those two sampling points, the trained classification model can more accurately determine whether the motor imagery state at each sampling point in the EEG sequence data has changed, and the type of the changed motor imagery state, while accurately judging the motor imagery state corresponding to each sampling point in the EEG sequence data. This leads to a more accurate judgment of the overall motor imagery state corresponding to the EEG sequence data. During the execution of brain-computer interface tasks, by inputting the feature vector corresponding to the collected EEG sequence data into the classification model, the overall motor imagery state corresponding to the EEG sequence data can be obtained, improving the accuracy of judging the overall motor imagery state corresponding to the EEG sequence data and facilitating the execution of brain-computer interface tasks. Attached Figure Description

[0045] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0046] Figure 1 This is a flowchart illustrating a training method for a classification model applied to brain-computer interface tasks, as provided in this specification.

[0047] Figure 2 This is a flowchart illustrating a brain-computer interface task execution method provided in this specification.

[0048] Figure 3 This is a schematic diagram of the structure of a training device for a classification model applied to brain-computer interface tasks, as provided in this specification.

[0049] Figure 4 This is a schematic diagram of the structure of a brain-computer interface task execution device provided in this specification;

[0050] Figure 5 The one provided in this specification corresponds to Figure 1 or Figure 2 A schematic diagram of the structure of an electronic device. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0052] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0053] Figure 1 The flowchart illustrating a training method for a classification model applied to brain-computer interface tasks, as provided in this specification, includes:

[0054] S101: Acquire standard EEG sequence data.

[0055] The execution subject of the training method for a classification model applied to brain-computer interface tasks provided in this specification can be a terminal device such as a laptop or desktop computer, a client installed on the terminal device, a server, or a dedicated device for training the model. For ease of description, the following description will only use a dedicated device as the execution subject to illustrate the training method for a classification model applied to brain-computer interface tasks provided in this specification.

[0056] In existing brain-computer interface (BCI) tasks, it is often necessary to process the EEG sequence data of the task executor, i.e., the user, to obtain the user's motor imagery state, that is, to determine where the user imagines limbs moving. During the execution of BCI tasks, especially asynchronous BCI tasks, static classifiers are often used to determine the motor imagery state corresponding to the EEG sequence data. However, because human EEG data often fluctuates, static classifiers struggle to accurately determine the motor imagery state from fluctuating EEG data. To ensure the smooth execution of BCI tasks, existing BCI tasks often use time windows during task execution to increase the accuracy of motor imagery state determination. For example, when three consecutive EEG sequences... The EEG sequence data provider is only identified as being in a left-hand motor imagery state when all EEG sequence data are judged to be in such a state. This approach effectively reduces the error rate in judging motor imagery states. However, this unfortunate measure also affects the accuracy of judging the motor imagery state corresponding to the EEG sequence data during the execution of brain-computer interface tasks. That is, if the EEG sequence data provider is in a left-hand or right-hand motor imagery state for eight discontinuous seconds within a ten-second timeframe, the existing brain-computer interface task execution methods that rely on static classifiers often judge the duration of the motor imagery state to be less than eight seconds, or even only detect a few longer segments of motor imagery state time, while it is difficult to accurately detect shorter motor imagery states.

[0057] Based on this, this specification provides a flowchart of a training method for a classification model applied to brain-computer interface tasks. The dedicated device obtains the predicted motor imagery state of each sampling point in the standard EEG sequence data and the overall motor imagery state corresponding to the standard EEG sequence data through the classification model. The classification model is trained based on the predicted motor imagery state of each continuous sampling point in the standard EEG sequence data and the overall motor imagery state corresponding to the standard EEG sequence data, thereby training a classification model that can accurately output the overall motor imagery state corresponding to the EEG sequence data.

[0058] During the training of the classification model, the specialized equipment needs to first acquire standard EEG sequence data, the standard motor imagery state corresponding to each sampling point in the standard EEG sequence data, and the standard overall motor imagery state corresponding to the standard EEG sequence data. Specifically, the specialized equipment can use the EEG sequence data obtained by splicing the EEG data collected by the acquisition device at each sampling point within a preset time window according to the chronological order of the sampling points to obtain the standard EEG sequence order.

[0059] S102: Determine the feature vector corresponding to the standard EEG sequence data based on the standard EEG sequence data and the pre-determined projection matrix.

[0060] After acquiring standard EEG sequence data using specialized equipment, it is necessary to obtain the feature vectors corresponding to the standard EEG sequence data. However, based on different projection matrices, the feature vectors corresponding to the standard EEG sequence data obtained by processing the standard EEG sequence data according to the projection matrix are different. In order to obtain feature vectors that are more suitable for brain-computer interface tasks, two brain-computer interface tasks can be preset before training the classification model, and the projection matrices required for these two preset brain-computer interface tasks can be determined.

[0061] To ensure high classification accuracy for the trained classification model, these two pre-defined brain-computer interface (BCI) tasks need to correspond to different motor imagery states, and these different motor imagery states must have a corresponding relationship. This correspondence is often manifested in the relative relationships of limbs, particularly the corresponding left and right limbs. For example, there is a correspondence between the left-hand motor imagery state and the right-hand motor imagery state. These two motor imagery states show significant differences in their EEG sequence data, thus allowing for better identification and classification.

[0062] In this manual, the following explanation will use two preset brain-computer interface tasks corresponding to the training classification model, namely, the left limb motor imagery task as the left hand motor imagery task and the right limb motor imagery task as the right hand motor imagery task, to illustrate this scheme.

[0063] After determining the two motor imagery states corresponding to the two brain-computer interface tasks, the specialized equipment needs to obtain multiple sample EEG sequence data corresponding to each of these two motor imagery states. Specifically, it needs to obtain multiple segments of EEG sequence data in a continuous left-hand motor imagery state and multiple segments of EEG sequence data in a continuous right-hand motor imagery state. Based on the multiple sample EEG sequence data corresponding to each of these two motor imagery states, a left-hand motor imagery sample set and a right-hand motor imagery sample set are constructed.

[0064] Determining the projection matrix requires first calculating the sample correlation matrices for both the left and right hand classes. These correlation matrices are determined from multiple samples of the same type, establishing the correlation between different data points within that class. For this specification, the normalized covariance matrix can be determined by performing covariance calculations on the data sets corresponding to the left-hand motor imagery task and the right-hand motor imagery task. Specifically, the normalized covariance matrix R1 corresponding to the left-hand motor imagery state is used as the sample correlation matrix for the left-hand motor imagery task, and the normalized covariance matrix R2 corresponding to the right-hand motor imagery state is used as the sample correlation matrix for the right-hand motor imagery task. The formulas for determining the sample correlation matrices for each of the two motor imagery tasks are as follows:

[0065]

[0066] Where X1 represents the sample set corresponding to the left-hand motor imagery task, X2 represents the sample set corresponding to the right-hand motor imagery task, the dimension is N*T, N is the number of sampling channels of the acquisition device, which is N=26 in this example, T is the number of sampling points, such as T=4000, and trace represents the summation of the diagonal elements of the matrix. Calculate the mixture space covariance matrix R, where... in This is the average of all covariance matrices for the two classes of samples.

[0067] Then, eigenvalue decomposition is performed on the mixture space covariance matrix R:

[0068] R=UλU T

[0069] Where U is the eigenvector matrix of R, and λ is a diagonal matrix composed of eigenvalues. Arranging the eigenvalues ​​in descending order yields the whitening matrix P:

[0070]

[0071] right The whitening transformation is performed using the following formula:

[0072]

[0073] Perform eigenvalue decomposition on S1 and S2:

[0074]

[0075] Where S1 is the whitened sample covariance matrix corresponding to left-hand motor imagery, and S2 is the whitened sample covariance matrix corresponding to right-hand motor imagery. Whitening is a preprocessing technique used in machine learning and signal processing to transform input data into a new representation with specific statistical properties. B1 is the orthogonal matrix corresponding to left-hand motor imagery, and B2 is the orthogonal matrix corresponding to right-hand motor imagery, B1 = B2 = B, where B is the total orthogonal matrix corresponding to left-hand and right-hand motor imagery. λ1 is the diagonal matrix composed of eigenvalues ​​corresponding to left-hand motor imagery, and λ2 is the diagonal matrix composed of eigenvalues ​​corresponding to right-hand motor imagery, λ1 + λ2 = I, where I is the identity matrix. Since there is a correspondence between left-hand and right-hand motor imagery, the sum of the eigenvalues ​​of the two matrices is always 1. Therefore, the eigenvector corresponding to the largest eigenvalue of S1 makes S2 have the smallest eigenvalue, and vice versa. Therefore, the first m rows and the last m rows of B are used to construct the spatial filter SF (taking m = 1 as an example) to obtain the projection matrix W:

[0076] W = SF T P

[0077] After determining the projection matrix W, the feature vectors corresponding to the standard EEG sequence data can be determined based on this projection matrix. These feature vectors can be used to identify whether the motor imagery state corresponding to the standard EEG sequence data belongs to the left-hand motor imagery state or the right-hand motor imagery state. Specifically, the process of determining the feature vectors corresponding to the standard EEG sequence data is as follows:

[0078] Let the standard EEG sequence data be X. Spatial filtering of X using a projection matrix yields the feature vector Z:

[0079] Z = WX

[0080] After obtaining the feature vector Z filtered by the projection matrix, the variance of each row in Z can be further calculated and normalized to obtain the feature vector f corresponding to the standard EEG sequence data X. p :

[0081]

[0082] Where, var p This indicates that Z 2m×T The variance of the p-th row.

[0083] S103: Input the feature vector corresponding to the standard EEG sequence data into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data.

[0084] S104: The classification model is trained with the optimization objective of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

[0085] After obtaining the feature vector corresponding to the standard EEG sequence, the specialized equipment can input the feature vector corresponding to the standard EEG sequence data into the classification model to be trained, and obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data output by the classification model, as well as the overall motor imagery state corresponding to the standard EEG sequence data determined by the classification model based on the predicted motor imagery state of each sampling point.

[0086] The standard EEG sequence data output by the classification model corresponds to three types of predicted motor imagery states for each sampling point. In this example, they are: left-hand motor imagery state, right-hand motor imagery state, and idle state. The idle state is any state other than the left-hand and right-hand motor imagery states.

[0087] The classification model primarily predicts the predicted motor imagery state of each sampling point in the standard EEG sequence data using the feature vectors corresponding to the standard EEG sequence data. Based on the predicted motor imagery state of each sampling point, the model determines the motor imagery state sequence data corresponding to the standard EEG sequence data. For this motor imagery state sequence data, a dynamic programming algorithm can be set to control the classification model to process the motor imagery state sequence data. The processing result is the overall motor imagery state corresponding to the standard EEG sequence data to which this motor imagery state sequence data belongs, given the order of the motor imagery states in this motor imagery state sequence data.

[0088] For example, if the motor imagery sequence corresponding to a segment of EEG data is: (left-hand motor imagery state, right-hand motor imagery state, idle state, right-hand motor imagery state, idle state, left-hand motor imagery state, left-hand motor imagery state), then the sequence of motor imagery states corresponding to this segment of EEG data represents the sequential order of the motor imagery states corresponding to the seven sampling points. By processing this sequence, the overall motor imagery state corresponding to the EEG sequence data can be determined. Therefore, training a classification model to improve the accuracy of the classification model in predicting the overall motor imagery state corresponding to the EEG sequence data is equivalent to training the accuracy of the classification model in predicting the motor imagery state of each sampling point in the EEG sequence data.

[0089] After processing the motor imagery sequence data corresponding to the standard EEG sequence data, the classification model can obtain the probability value of the standard EEG sequence data belonging to various overall motor imagery states for each possible overall motor imagery state. Thus, the overall motor imagery state with the highest probability value corresponding to the standard EEG sequence data is taken as the overall motor imagery state corresponding to the standard EEG sequence data.

[0090] During the training of the classification model, it is necessary to first determine the motor imagery sequence data y corresponding to the standard EEG sequence data identified by the classification model, where y = {y1, y2, ..., y...}. m}, where the motion visualization state corresponding to the x-th sampling point is y. x The standard EEG sequence data corresponds to a total of m sampling points.

[0091] After determining the motor imagery sequence data y corresponding to the standard EEG sequence data, the classification model is trained with the optimization objectives of minimizing the deviation between the overall motor imagery state corresponding to the standard EEG sequence data and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information corresponding to those two sampling points.

[0092] Specifically, the loss function is as follows: where L is the set of feature functions, f l Used to represent two types of characteristic functions, where, in f l Of the two types of feature functions, the first type is the edge feature function f1(y) that reflects the change in the imagined state of motion corresponding to any two consecutive sampling points. j-1 ,y j ), j≤m, the second type of feature function is the point feature function f2(x) that reflects the motion imagination state corresponding to a single sampling point. j ,y j ), j≤m, Z(x) represents the normalization factor, For regularization, θ l These are the parameters:

[0093]

[0094] The loss value is determined based on a pre-built loss function. The classification model is trained to minimize the loss value so that the trained classification model can learn the features corresponding to the continuous changes between motor imagery states while accurately predicting the motor imagery states corresponding to each sampling point in the input EEG sequence data.

[0095] The classification model is trained with the optimization objective of minimizing the deviation between the information on the change in motor imagery state between any two consecutive sampling points corresponding to the standard EEG sequence data and the information on the actual change in motor imagery state corresponding to those two sampling points. This is to enable the classification model to learn the features exhibited by different motor imagery states during transitions and the features exhibited by the same motor imagery state during its duration. The classification model trained with this optimization objective can more accurately determine whether the motor imagery state corresponding to the EEG sequence data has changed, and what kind of motor imagery state it is after the change.

[0096] Once the classification model can more accurately identify the type of motor imagery state corresponding to changes in EEG sequence data, more precise real-time processing of EEG sequence data can be achieved, thereby improving the performance of asynchronous brain-computer interface tasks. Taking brain-computer interface tasks of left-hand motor imagery and right-hand motor imagery as examples, for every two consecutive sampling points, the classification model can predict the motor imagery state change information corresponding to these two sampling points. For ease of explanation, in the following examples, left hand represents the left-hand motor imagery state, right hand represents the right-hand motor imagery state, and idle-to-idle state. In this case, there are nine types of motor imagery change information: (left hand-right hand), (left hand-idle), (right hand-left hand), (right hand-idle), (idle-left hand), (idle-right hand), (left hand-left hand), (right hand-right hand), and (idle-idle), where - represents the change information from left to right.

[0097] It can be seen that by training the classification model with the optimization objective of minimizing the deviation between the change information of the motor imagery state at any two consecutive sampling points corresponding to the standard EEG sequence data and the actual change information of the motor imagery state at those two sampling points, the trained classification model can accurately determine whether there is a change in the motor imagery state corresponding to each sampling point, and if so, the type of the changed motor imagery state. This results in a classification model that accurately predicts the overall motor imagery state corresponding to the EEG sequence data. This model can then be used to classify the EEG sequence data acquired during the execution of brain-computer interface tasks, and the target task can be executed based on the overall motor imagery state corresponding to the EEG sequence data output by the classification model.

[0098] It should be noted that the main purpose of the training process for the classification model described above in this specification is to enable the classification model to more accurately judge the changes in the actual motor imagery states between consecutive sampling points of the standard EEG sequence data, based on the fact that the classification model can predict the predicted motor imagery states of each sampling point of the standard EEG sequence data through the feature vectors corresponding to the standard EEG sequence data. To enable the classification model to accurately judge the changes in the actual motor imagery states between consecutive sampling points, this specification provides motor imagery state change information to represent the changes in motor imagery states between sampling points in the above steps, and proposes a training method for training the classification model based on the motor imagery state change information corresponding to each sampling point.

[0099] Based on this information on changes in motor imagery state, the model can be trained using other methods. For example, after inputting standard EEG sequence data into the classification model to be trained, the model can obtain the prediction data determined by the model based on the standard EEG sequence data. Based on this prediction data, the predicted overall motor imagery state change information between each sampling point corresponding to the standard EEG data can be determined. Then, the model is trained by maximizing the similarity between the predicted overall motor imagery state change information between each sampling point corresponding to the standard EEG data and the actual overall motor imagery state change information between each sampling point corresponding to the standard EEG data, and by maximizing the similarity between the predicted motor imagery state change information between every two sampling points corresponding to the standard EEG data and the actual motor imagery state change information between those two sampling points. The trained model also has a high accuracy in predicting the motor imagery state change information between consecutive sampling points corresponding to the standard EEG data. The overall motor imagery state change information is used to represent the changes in the motor imagery state between each of the consecutive sampling points corresponding to the standard EEG sequence data.

[0100] The above content describes one model training method provided in this manual. After training the model using the above method, the trained classification model can be used to perform actual tasks. The actual process of performing the task will be described in detail below:

[0101] Figure 2 The flowchart illustrating a brain-computer interface task execution method provided in this specification includes:

[0102] S201: Acquire EEG sequence data.

[0103] S202: Determine the feature vector corresponding to the EEG sequence data based on the EEG sequence data and the pre-determined projection matrix.

[0104] The execution subject of the brain-computer interface task execution method provided in this specification can be a terminal device such as a laptop or desktop computer, or a client or server installed on the terminal device. For ease of description, the following description will only use a terminal device as the execution subject to illustrate the brain-computer interface task execution method provided in this specification.

[0105] Brain-computer interface (BCI) tasks are divided into synchronous and asynchronous tasks. Synchronous tasks require users to perform specific actions within a specified time. For example, in a synchronous BCI task testing completion, the user is required to imagine moving their right hand for 4-6 seconds after the task begins. The system then uses EEG data from this 4-6 seconds to determine the user's motor imagery state, thus calculating the completion score. However, synchronous tasks offer limited freedom; users are forced to passively perform the task. In contrast, asynchronous tasks, such as the same asynchronous BCI task testing completion, allow the terminal device to monitor the user's EEG data over a ten-second task duration. This allows for real-time determination of whether the user is engaging in motor imagery. The system starts calculating the time when motor imagery begins, thus assessing the completion score within ten seconds. Overall, users have greater freedom when performing asynchronous BCI tasks.

[0106] Therefore, during the execution of asynchronous brain-computer interface tasks, the terminal device needs to first acquire the user's real-time EEG sequence data, and then perform subsequent processing based on the acquired EEG sequence data to execute the target task. Specifically, the terminal device needs to determine the feature vector corresponding to the EEG sequence data based on the user's EEG sequence data and the pre-determined projection matrix corresponding to the brain-computer interface task. The pre-determination of the projection matrix has already been explained in detail in step S102 of the above description of classification model training, and will not be repeated here.

[0107] S203: Input the feature vector corresponding to the EEG sequence data into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data.

[0108] S204: Execute the target task based on the overall motor imagery state corresponding to the EEG sequence data.

[0109] After obtaining the feature vector corresponding to the user's EEG sequence data, the terminal device inputs the feature vector into the classification model to obtain the overall motor imagery state of the user corresponding to the EEG sequence data predicted by the classification model.

[0110] After determining the overall motor imagery state corresponding to the user's EEG sequence data, the target task can be executed. In the brain-computer interface task of asynchronously testing the completion of motor imagery, the terminal device continuously collects the user's EEG data to construct EEG sequence data. The feature vector corresponding to the EEG sequence data is then input into the classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, and then subsequent tasks are executed.

[0111] When a user performs a motor imagery attention test, their EEG data is continuously collected after the task begins, constructing an EEG sequence. A classification model is then used to determine the overall motor imagery state corresponding to this sequence. Once it's determined that the user's EEG sequence at a particular moment corresponds to a left-hand motor imagery state, the collected EEG sequence data within ten seconds following this moment is categorized to determine the percentage of time the user spends in left-hand motor imagery during those ten seconds. This percentage is then compared to a preset threshold, and the comparison result is displayed to the user. For example, if the percentage of time the user spends in left-hand motor imagery within those ten seconds is less than the preset threshold, it indicates insufficient motor imagery attention concentration. Conversely, if the percentage of time the user spends in left-hand motor imagery within those ten seconds is greater than the preset threshold, it indicates that the user's motor imagery attention concentration meets the expected standard.

[0112] Of course, asynchronous brain-computer interface tasks are not limited to the examples mentioned above. For instance, the position of the mouse pointer on the screen viewed by the user can be controlled by the overall motor imagery state corresponding to the user's EEG sequence data. When the overall motor imagery state corresponding to the user's EEG sequence data is left-hand motor imagery, the mouse pointer is controlled to move to the left. Correspondingly, when the overall motor imagery state corresponding to the user's EEG sequence data is right-hand motor imagery, the mouse pointer is controlled to move to the right, thereby realizing interaction between the user and the computing device through EEG data.

[0113] The above describes one or more training methods and brain-computer interface task execution methods for classification models applied to brain-computer interface tasks. Based on the same idea, this specification also provides corresponding devices, storage media, and electronic devices.

[0114] Figure 3 This is a schematic diagram of a training device for a classification model applied to brain-computer interface tasks, provided in an embodiment of this specification. The device includes:

[0115] The acquisition module 301 is used to acquire standard EEG sequence data, wherein the standard EEG sequence data is obtained by splicing together the EEG data collected at each sampling point within a preset time window according to the time order of each sampling point.

[0116] The determining module 302 is used to determine the feature vector corresponding to the standard EEG sequence data based on the standard EEG sequence data and the pre-determined projection matrix;

[0117] The input module 303 is used to input the feature vector corresponding to the standard EEG sequence data into the classification model to be trained, so as to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data, wherein the overall motor imagery state is determined by the classification model based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data.

[0118] The training module 304 is used to train the classification model with the optimization objectives of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

[0119] Optionally, the determining module 302 is specifically used for,

[0120] Acquire sample EEG sequence data corresponding to two preset brain-computer interface (BCI) tasks, wherein the two preset BCI tasks correspond to different motor imagery states, and there is a correspondence between the different motor imagery states corresponding to the two preset BCI tasks; for each BCI task included in the two preset BCI tasks, determine the sample correlation matrix corresponding to the BCI task based on the sample EEG sequence data corresponding to the BCI task; determine the projection matrix based on the sample correlation matrices corresponding to the two preset BCI tasks.

[0121] Optionally, the two preset brain-computer interface tasks include: imagining left limb movement and imagining right limb movement.

[0122] Optionally, the input module 303 is specifically used for,

[0123] The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. Based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, the motor imagery state sequence data corresponding to the standard EEG sequence data is determined. The motor imagery state sequence data is processed to determine the overall motor imagery state corresponding to the standard EEG sequence data under the chronological order of the motor imagery states in the motor imagery state sequence data.

[0124] Figure 4 This is a schematic diagram of a brain-computer interface task execution device provided in an embodiment of this specification. The device includes:

[0125] Module 401 is used to acquire EEG sequence data;

[0126] The determining module 402 is used to determine the feature vector corresponding to the EEG sequence data based on the EEG sequence data and a pre-determined projection matrix;

[0127] Input module 403 is used to input the feature vector corresponding to the EEG sequence data into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, wherein the classification model is a model trained using the above-mentioned training method.

[0128] The execution module 404 is used to execute the target task based on the overall motor imagery state corresponding to the EEG sequence data.

[0129] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can be used to perform the above-described actions. Figure 1 The provided training method for classification models applied to brain-computer interface tasks or the above Figure 2 The provided brain-computer interface task execution method.

[0130] based on Figure 1 The training method of the classification model applied to brain-computer interface tasks shown is similar to Figure 2 The provided brain-computer interface task execution method, as described in the embodiments of this specification, also provides Figure 5 The diagram shows the structure of the electronic device. Figure 5 At the hardware level, this electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 The training method for a classification model applied to brain-computer interface tasks, or Figure 2 A brain-computer interface task execution method is provided.

[0131] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0132] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0133] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0134] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0135] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0136] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0137] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0140] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0141] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0142] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0143] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0144] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0145] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0146] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0147] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A training method for a classification model applied to brain-computer interface tasks, characterized in that, include: Acquire standard EEG sequence data, wherein the standard EEG sequence data is obtained by splicing together the EEG data collected at each sampling point within a preset time window according to the time order of each sampling point; Based on the standard EEG sequence data and the pre-determined projection matrix, the feature vector corresponding to the standard EEG sequence data is determined; The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data. The overall motor imagery state is determined by the classification model based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. The classification model is trained with the optimization objectives of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

2. The method as described in claim 1, characterized in that, The projection matrix is ​​predetermined, specifically including: Acquire sample EEG sequence data corresponding to two preset brain-computer interface tasks, wherein the two preset brain-computer interface tasks correspond to different motor imagery states, and there is a correspondence between the different motor imagery states corresponding to the two preset brain-computer interface tasks. For each brain-computer interface task included in the two preset brain-computer interface tasks, the sample correlation matrix corresponding to the brain-computer interface task is determined based on the sample EEG sequence data corresponding to the brain-computer interface task. The projection matrix is ​​determined based on the sample correlation matrix corresponding to each of the two preset brain-computer interface tasks.

3. The method as described in claim 2, characterized in that, The two preset brain-computer interface tasks include: imagining left limb movement and imagining right limb movement.

4. The method as described in claim 1, characterized in that, The feature vectors corresponding to the standard EEG sequence data are input into the classification model to be trained to obtain the predicted motor imagery state for each sampling point of the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data, specifically including: The feature vector corresponding to the standard EEG sequence data is input into the classification model to be trained to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. Based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, the motor imagery state sequence data corresponding to the standard EEG sequence data is determined. The motor imagery state sequence data is processed to determine the overall motor imagery state corresponding to the standard EEG sequence data under the chronological order of the motor imagery states in the motor imagery state sequence data.

5. A brain-computer interface task execution method, characterized in that, include: Acquire EEG sequence data; Based on the EEG sequence data and the pre-determined projection matrix, the feature vector corresponding to the EEG sequence data is determined; The feature vector corresponding to the EEG sequence data is input into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, wherein the classification model is a model trained using the training method of any one of claims 1 to 4. The target task is executed based on the overall motor imagery state corresponding to the EEG sequence data.

6. A training device for a classification model applied to brain-computer interface tasks, characterized in that, include: The acquisition module is used to acquire standard EEG sequence data, wherein the standard EEG sequence data is obtained by splicing together the EEG data collected at each sampling point within a preset time window according to the time order of each sampling point. The determination module is used to determine the feature vector corresponding to the standard EEG sequence data based on the standard EEG sequence data and a pre-determined projection matrix; The input module is used to input the feature vector corresponding to the standard EEG sequence data into the classification model to be trained, so as to obtain the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data, and the overall motor imagery state corresponding to the standard EEG sequence data, wherein the overall motor imagery state is determined by the classification model based on the predicted motor imagery state of each sampling point corresponding to the standard EEG sequence data. The training module is used to train the classification model with the optimization objectives of minimizing the deviation between the overall motor imagery state and the standard overall motor imagery state corresponding to the standard EEG sequence data, and minimizing the deviation between the motor imagery state change information of any two consecutive sampling points corresponding to the standard EEG sequence data and the actual motor imagery state change information of the two sampling points. The motor imagery state change information of any two consecutive sampling points is determined based on the predicted motor imagery state of the two sampling points.

7. The apparatus as claimed in claim 6, characterized in that, The determining module is specifically used for, Acquire sample EEG sequence data corresponding to two preset brain-computer interface (BCI) tasks, wherein the two preset BCI tasks correspond to different motor imagery states, and there is a correspondence between the different motor imagery states corresponding to the two preset BCI tasks; for each BCI task included in the two preset BCI tasks, determine the sample correlation matrix corresponding to the BCI task based on the sample EEG sequence data corresponding to the BCI task; determine the projection matrix based on the sample correlation matrices corresponding to the two preset BCI tasks.

8. A brain-computer interface task execution device, characterized in that, include: The acquisition module is used to acquire EEG sequence data; The determination module is used to determine the feature vector corresponding to the EEG sequence data based on the EEG sequence data and a pre-determined projection matrix; An input module is used to input the feature vector corresponding to the EEG sequence data into a pre-trained classification model to obtain the overall motor imagery state corresponding to the EEG sequence data, wherein the classification model is a model trained using the training method of any one of claims 1 to 4. The execution module is used to perform the target task based on the overall motor imagery state corresponding to the EEG sequence data.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 5.

10. An electronic device, comprising a processor and a computer program stored in a memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 5.