Brain-computer interface online model updating method based on Bayesian estimation

By using the online model update method based on Bayesian estimation in the BCI system, the classification model is dynamically updated, and the model failure caused by changes in subjects' cognitive state and EEG data distribution is solved, improving system performance and practicality.

CN119718067APending Publication Date: 2025-03-28BEIJING MECHANICAL EQUIP INST
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410904834.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing BCI system fails when subjects' cognitive state changes and EEG data distribution changes, affects system performance.

Method used

The online model update method based on Bayesian estimation is adopted, and the classification model of the online update framework is established, and the posterior probability is calculated using Bayesian estimation, and the model is retrained as the sample weight, and the model is dynamically updated to adapt to the data distribution changes.

Benefits of technology

It effectively solves the problem of deteriorating BCI system performance due to changes in data distribution, and improves the practicality and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718067A_ABST
    Figure CN119718067A_ABST
Patent Text Reader

Abstract

The invention relates to a brain-computer interface online model updating method and device based on Bayesian estimation, electronic equipment and a storage medium. The method comprises the steps of establishing a classification model based on an online updating framework, performing training, and generating a verification set decision value corresponding to a verification set sample based on the classification model; based on the real label of the verification set sample, performing Gaussian fitting on the verification set decision value of each category, and calculating and generating the category conditional probability of the verification set sample; performing posterior probability calculation on the test decision value, and generating a test set sample to predict the posterior probability of each category; and predicting a test set sample into a posterior probability of each category as a sample weight, combining the sample weight with an existing training sample, and retraining the classification model to complete brain-computer interface online model updating based on Bayesian estimation. The problem that the performance of the brain-computer system becomes poor due to data distribution changes in the long-time use process can be solved, and the practicability of the brain-computer system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Brain-Computer Interface (BCI) is a system that directly converts central nervous system activity into artificial output. It can replace, repair, enhance, supplement or improve the normal output of the central nervous system, thereby improving the interaction between the central nervous system and the internal and external environment. The core technology of brain-computer interface is to explore brain information and decode user intentions. The main indicators for evaluating the performance of BCI systems are recognition accuracy and information transfer rate (ITR). Conventional brain-computer interface systems include five consecutive stages: signal acquisition, preprocessing, feature extraction and analysis, and classification and recognition. Signal acquisition refers to the use of neuroimaging technology to obtain brain activity information, which is the basis of BCI technology. The main purpose of preprocessing is to reduce the impact of noise and improve the quality of EEG signals, including filtering, downsampling, data segmentation, baseline correction, artifact removal and other steps. Feature extraction and analysis mainly extracts the EEG features of interest from the preprocessed data. The common method is to analyze the characteristics of the signal in the time domain, frequency domain, and spatial domain, map the signal to a space with discriminant function, and provide effective feature information for subsequent classification and recognition. The classification and recognition stage is to apply algorithms such as machine learning or deep learning, establish a corresponding mathematical model, identify the extracted features, and output corresponding control instructions.

[0003] Existing BCI systems usually collect data from subjects for model training first, and then perform online control applications after obtaining the training model. However, as the experiment progresses, the cognitive state of the subject is constantly changing, and due to the nonlinear and non-stationary characteristics of EEG, the distribution of the collected data will change, causing the previous training model to no longer be applicable, which in turn affects the actual application effect of the brain-computer system.

[0004] Therefore, one or more methods are needed to solve the above problems.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a method, device, electronic device and computer-readable storage medium for updating an online model of a brain-computer interface based on Bayesian estimation, thereby overcoming one or more problems caused by the limitations and defects of related technologies at least to a certain extent.

[0007] According to one aspect of the present disclosure, a method for updating an online model of a brain-computer interface based on Bayesian estimation is provided, comprising:

[0008] Establishing a classification model based on an online update framework, training the classification model based on training set samples, and generating validation set decision values ​​corresponding to validation set samples based on the classification model;

[0009] Based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values ​​of each category to calculate and generate the class conditional probabilities of the validation set samples;

[0010] Generate a corresponding test set decision value based on the test set sample, perform posterior probability calculation on the test decision value, and generate a posterior probability that the test set sample is predicted to be each category;

[0011] The posterior probabilities of the test set samples being predicted as various categories are used as sample weights and combined with existing training samples to retrain the classification model, thereby completing the online model update of the brain-computer interface based on Bayesian estimation.

[0012] In an exemplary embodiment of the present disclosure, the online update framework of the classification model in the method further includes:

[0013] After projecting the multi-channel EEG data onto the projection vector, the sum of all inter-trial covariances of samples of the same category is calculated;

[0014] Based on the preset constraints, the objective function of calculating the sum of covariances between all trials of samples of the same category is transformed into an optimization solution function;

[0015] Based on the Lagrange multiplier method, the analytical solution of the optimization solution function corresponding to the objective function is calculated as the eigenvector corresponding to the maximum eigenvalue after the eigendecomposition of the preset matrix;

[0016] Based on ensemble learning, the projection vectors of all stimulation frequencies are concatenated column-wise to obtain the integrated projection matrix of each category.

[0017] In an exemplary embodiment of the present disclosure, the method further includes:

[0018] Based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values, a probability density curve of the validation set samples is calculated, and the class conditional probabilities of the validation set samples are generated based on the probability density curve.

[0019] In an exemplary embodiment of the present disclosure, the method further includes:

[0020] A test set decision value of the test set samples is generated based on the classification model.

[0021] In an exemplary embodiment of the present disclosure, the method performs a posterior probability calculation formula for the test decision value as follows:

[0022]

[0023] Among them, P(c k |dv m ) is when the decision value of the sample is equal to dv m In the case of k The probability, P(c k ) is the class prior probability, which is the class c in the sample space k The proportion of samples.

[0024] In an exemplary embodiment of the present disclosure, the method further includes:

[0025] Based on Bernoulli's law of large numbers, the denominator of the posterior probability calculation formula is expanded according to the total probability formula to obtain

[0026] The posterior probability of predicting the test set samples as each category is calculated and generated.

[0027] In an exemplary embodiment of the present disclosure, the method further includes:

[0028] The category corresponding to the maximum posterior probability value is selected as the predicted category of the test set sample.

[0029] In one aspect of the present disclosure, a device for updating an online model of a brain-computer interface based on Bayesian estimation is provided, comprising:

[0030] A classification model training module is used to establish a classification model based on an online update framework, train the classification model based on training set samples, and generate a validation set decision value corresponding to a validation set sample based on the classification model;

[0031] A probability density calculation module, used to perform Gaussian fitting on the validation set decision values ​​of each category based on the true labels of the validation set samples, and calculate and generate the class conditional probabilities of the validation set samples;

[0032] A posterior probability calculation module is used to generate a test set decision value based on the test set sample, perform a posterior probability calculation on the test decision value, and generate a posterior probability that the test set sample is predicted to be each category;

[0033] The online strategy update module predicts the test set samples as the posterior probability of each category as the sample weight, combines it with the existing training samples, retrains the classification model, and completes the brain-computer interface online model update based on Bayesian estimation.

[0034] In one aspect of the present disclosure, there is provided an electronic device, comprising:

[0035] Processor; and

[0036] A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of the above items.

[0037] In one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the above items is implemented.

[0038] In an exemplary embodiment of the present disclosure, a brain-computer interface online model update method based on Bayesian estimation is provided. A classification model based on an online update framework is established, the classification model is trained based on training set samples, and a verification set decision value corresponding to the verification set sample is generated based on the classification model; based on the true label of the verification set sample, the verification set decision value of each category is Gaussian fitted to calculate and generate the class conditional probability of the verification set sample; based on the test set sample, a corresponding test set decision value is generated, and the test decision value is calculated for the posterior probability to generate the test set sample predicted as each category; the posterior probability of the test set sample predicted as each category is used as the sample weight, combined with the existing training samples, and the classification model is retrained to complete the brain-computer interface online model update based on Bayesian estimation. The present disclosure can solve the problem of poor performance of the brain-computer system caused by changes in data distribution during long-term use, and improve the practicality of the brain-computer system.

[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and other features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.

[0041] Figure 1 A flowchart of a method for updating a brain-computer interface online model based on Bayesian estimation according to an exemplary embodiment of the present disclosure is shown;

[0042] Figure 2 An overall block diagram of a brain-computer interface online model updating method based on Bayesian estimation according to an exemplary embodiment of the present disclosure is shown;

[0043] Figure 3 An online update framework flow chart of a brain-computer interface online model update method based on Bayesian estimation according to an exemplary embodiment of the present disclosure is shown;

[0044] Figure 4 A schematic block diagram of a brain-computer interface online model updating device based on Bayesian estimation according to an exemplary embodiment of the present disclosure is shown;

[0045] Figure 5 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;

[0046] Figure 6 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0048] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, materials, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of these functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.

[0050] In this exemplary embodiment, a method for updating a brain-computer interface online model based on Bayesian estimation is first provided; Figure 1 As shown in , the brain-computer interface online model updating method based on Bayesian estimation may include the following steps:

[0051] Step S110, establishing a classification model based on an online update framework, training the classification model based on training set samples, and generating a validation set decision value corresponding to the validation set samples based on the classification model;

[0052] Step S120, based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values ​​of each category to calculate and generate the class conditional probabilities of the validation set samples;

[0053] Step S130, generating a corresponding test set decision value based on the test set sample, performing posterior probability calculation on the test decision value, and generating a posterior probability that the test set sample is predicted to be each category;

[0054] Step S140, predicting the test set samples into the posterior probability of each category as the sample weight, combining it with the existing training samples, retraining the classification model, and completing the brain-computer interface online model update based on Bayesian estimation.

[0055] In an exemplary embodiment of the present disclosure, a brain-computer interface online model update method based on Bayesian estimation is provided. A classification model based on an online update framework is established, the classification model is trained based on training set samples, and a verification set decision value corresponding to the verification set sample is generated based on the classification model; based on the true label of the verification set sample, the verification set decision value of each category is Gaussian fitted to calculate and generate the class conditional probability of the verification set sample; based on the test set sample, a corresponding test set decision value is generated, and the test decision value is calculated for the posterior probability to generate the posterior probability of the test set sample predicted as each category; the posterior probability of the test set sample predicted as each category is used as the sample weight, combined with the existing training samples, and the classification model is retrained to complete the brain-computer interface online model update based on Bayesian estimation. The present disclosure can solve the problem of poor performance of the brain-computer system caused by changes in data distribution during long-term use, and improve the practicality of the brain-computer system.

[0056] Next, a brain-computer interface online model updating method based on Bayesian estimation in this example embodiment will be further described.

[0057] In the embodiment of this example, the existing brain-computer system usually adopts a batch learning mode, but as the experiment progresses, the distribution of the subject's EEG data will change, resulting in the previously trained classification model being unable to accurately characterize the current EEG distribution state, thereby affecting the performance of the BCI system. Figure 2 As shown in the figure, it is the overall block diagram of the online model updating method of the brain-computer interface based on Bayesian estimation of the present disclosure. The present disclosure uses Bayesian estimation to calculate the posterior probability of real-time EEG, uses it as the sample weight, and then uses the online strategy to update the training model to adapt to the problem of poor performance of the brain-computer system caused by changes in data distribution during long-term use, thereby improving the practicality of the brain-computer system. Figure 3 As shown, it is a flowchart of the online update framework of the present invention.

[0058] In step S110, a classification model based on an online update framework may be established, the classification model may be trained based on training set samples, and a validation set decision value corresponding to the validation set samples may be generated based on the classification model.

[0059] In the embodiment of this example, the online update framework of the classification model in the method further includes:

[0060] After projecting the multi-channel EEG data onto the projection vector, the sum of all inter-trial covariances of samples of the same category is calculated;

[0061] Based on the preset constraints, the objective function of calculating the sum of covariances between all trials of samples of the same category is transformed into an optimization solution function;

[0062] Based on the Lagrange multiplier method, the analytical solution of the optimization solution function corresponding to the objective function is calculated as the eigenvector corresponding to the maximum eigenvalue after the eigendecomposition of the preset matrix;

[0063] Based on ensemble learning, the projection vectors of all stimulation frequencies are concatenated column-wise to obtain the integrated projection matrix of each category.

[0064] In the embodiment of this example, the classification model training depends on the characteristics of the EEG features and the algorithm adopted. The online update framework proposed in this disclosure is applicable to all BCI features and decoding algorithms. The following is an example of the decoding algorithm of the classic EEG feature steady-state visual evoked potentials (SSVEPs) task-related component analysis (eTRCA) algorithm.

[0065] TRCA is a classic decoding algorithm suitable for SSVEP features. Its main optimization goal is to find the optimal projection vector Make the covariance of data between different trials of the same sample the maximum. Among them, N ch Represents the number of selected leads, j1 and j2 represent lead indexes, and the value range is 1≤j1, j2≤N ch The specific process is as follows: for multi-lead EEG data After projection on the projection vector, the sum of the covariances between all trials of the same category of samples is:

[0066]

[0067] Among them, h1 and h2 represent the index of the trial, N t is the number of trials. In the above formula, the matrix The elements are:

[0068]

[0069] In order to obtain the optimal solution of the optimization objective, the following constraints are introduced:

[0070]

[0071] Therefore, the objective function can be transformed into the following optimization problem:

[0072]

[0073] Using the Lagrange multiplier method, the analytical solution of the objective function can be obtained as the matrix Q -1 The eigenvector corresponding to the maximum eigenvalue after S eigendecomposition. Finally, combined with the idea of ​​ensemble learning, the projection vectors of all stimulus frequencies are concatenated column-wise to obtain the integrated projection matrix As shown below:

[0074]

[0075] Among them, N f Represents the number of stimulation frequencies, that is, the number of all categories. The W obtained from the above formula is the optimal projection matrix found by the ensemble task-related component analysis algorithm (Ensemble TRCA, eTRCA).

[0076] For the test sample The classification and recognition process of SSVEP features using the eTRCA algorithm is as follows. First, based on the data of a certain category n in the training set By averaging it in the third dimension, we can get the EEG template For N f categories, a total of N f EEG templates; then N f The training data of each category are respectively calculated according to the TRCA algorithm to obtain the projection vectors, and then spliced ​​to obtain W; then the correlation coefficient between the test sample and the EEG template is calculated:

[0077]

[0078] It should be noted that ρ here represents the calculated two-dimensional correlation coefficient. Finally, the predicted category of the test sample is determined according to the following formula:

[0079]

[0080] From this we can get, τ t This is the predicted category of the test sample.

[0081] In step S120, Gaussian fitting may be performed on the validation set decision values ​​of each category based on the true labels of the validation set samples to calculate and generate the class conditional probabilities of the validation set samples.

[0082] In the embodiment of this example, the method further includes:

[0083] Based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values, a probability density curve of the validation set samples is calculated, and the class conditional probabilities of the validation set samples are generated based on the probability density curve.

[0084] In the embodiment of this example, the probability density calculation based on Bayesian includes dividing the training data into two parts, one part is used to train the classification model (referred to as the training set), and the other part is used to calculate the probability density (referred to as the validation set). After the classification model is trained, the validation set is input into the classification model to obtain the corresponding decision value. According to the true label of the validation set sample, the decision value of each category of samples is Gaussian fitted to calculate the probability density curve of each category of samples, thereby obtaining the class conditional probability P (dv m |c k ).

[0085] In step S130, a corresponding test set decision value may be generated based on the test set sample, and a posterior probability calculation may be performed on the test decision value to generate a posterior probability that the test set sample is predicted to be each category.

[0086] In the embodiment of this example, the method further includes:

[0087] A test set decision value of the test set samples is generated based on the classification model.

[0088] In the embodiment of this example, the method performs a posterior probability calculation formula for the test decision value as follows:

[0089]

[0090] Among them, P(c k |dv m ) is when the decision value of the sample is equal to dv m In the case of k The probability, P(c k ) is the class prior probability, which is the class c in the sample space k The proportion of samples.

[0091] In the embodiment of this example, the method further includes:

[0092] Based on Bernoulli's law of large numbers, the denominator of the posterior probability calculation formula is expanded according to the total probability formula to obtain

[0093] The posterior probability of predicting the test set samples as each category is calculated and generated.

[0094] In the embodiment of this example, the method further includes:

[0095] The category corresponding to the maximum posterior probability value is selected as the predicted category of the test set sample.

[0096] In the embodiment of this example, the posterior probability calculation includes, for the test sample, first inputting the classification model, calculating the decision value of the test sample, and then calculating the posterior probability that the test sample belongs to each category according to the following formula.

[0097]

[0098] Among them, P(c k |dv m ) is when the decision value of the sample is equal to dv m In the case of k The probability, P(c k ) is the class prior probability, which is the class c in the sample space k According to Bernoulli's law of large numbers, when the samples meet the independent and identically distributed assumptions, the frequency of occurrence of each type of sample can be used to estimate P(dv m |c k ) is the class conditional probability, indicating that the sample belongs to category c k Under the condition of m The probability of . Expand the denominator according to the total probability formula to get the following formula:

[0099]

[0100] From the above formula, we can calculate the posterior probability that the sample belongs to each category.

[0101] In step S140, online strategy updating and classification identification include predicting the test set samples as the posterior probability of each category as sample weights, combining them with existing training samples, retraining the classification model, and completing the brain-computer interface online model update based on Bayesian estimation.

[0102] In the embodiment of this example, from a statistical perspective, the value of the Bayesian posterior probability of the sample represents the possibility of predicting the sample as this category. Therefore, on the one hand, the category corresponding to the maximum posterior probability value is selected as the predicted category of the sample, and on the other hand, the posterior probability is used as the sample weight, combined with the existing training samples, and the classification model is retrained to adapt to the problem of data distribution shifting as the experiment proceeds. When classifying and identifying, the category corresponding to the maximum posterior probability is selected as the prediction result.

[0103] In the embodiment of this example, the brain-computer interface online classification model updating method based on Bayesian estimation disclosed in the present invention adopts the Bayesian method to design a weighted online update method to dynamically update the classification model. This can offset the problem of system performance deterioration due to data distribution shift as the experiment progresses, and provide new methods and new ideas for practical brain-computer interface systems for long-term use.

[0104] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0105] In addition, in this exemplary embodiment, a brain-computer interface online model updating device based on Bayesian estimation is also provided. Figure 4 As shown, the brain-computer interface online model updating device 400 based on Bayesian estimation may include: a classification model training module 410, a probability density calculation module 420, a posterior probability calculation module 430 and an online strategy updating module 440.

[0106] in:

[0107] A classification model training module 410 is used to establish a classification model based on an online update framework, train the classification model based on training set samples, and generate a validation set decision value corresponding to a validation set sample based on the classification model;

[0108] A probability density calculation module 420 is used to perform Gaussian fitting on the validation set decision values ​​of each category based on the true labels of the validation set samples, and calculate and generate the class conditional probabilities of the validation set samples;

[0109] A posterior probability calculation module 430 is used to generate a test set decision value based on the test set sample, perform a posterior probability calculation on the test decision value, and generate a posterior probability that the test set sample is predicted to be each category;

[0110] The online strategy updating module 440 predicts the posterior probability of the test set samples as each category as the sample weight, combines it with the existing training samples, retrains the classification model, and completes the brain-computer interface online model update based on Bayesian estimation.

[0111] The specific details of each of the above-mentioned brain-computer interface online model updating device modules based on Bayesian estimation have been described in detail in the corresponding brain-computer interface online model updating method based on Bayesian estimation, so they will not be repeated here.

[0112] It should be noted that, although several modules or units of a brain-computer interface online model updating device 400 based on Bayesian estimation are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0113] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0114] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0115] Refer to the following Figure 5 An electronic device 500 according to such an embodiment of the present invention is described. Figure 5 The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0116] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), and a display unit 540.

[0117] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 510 can perform the following steps: Figure 1 Steps S110 to S140 shown in FIG.

[0118] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .

[0119] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0120] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0121] The electronic device 500 may also communicate with one or more external devices 570 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or may communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0122] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0123] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0124] refer to Figure 6 As shown, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0125] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0126] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0128] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0129] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0130] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0131] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for updating an online model of a brain-computer interface based on Bayesian estimation, characterized in that: The method comprises: Establishing a classification model based on an online update framework, training the classification model based on training set samples, and generating validation set decision values ​​corresponding to validation set samples based on the classification model; Based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values ​​of each category to calculate and generate the class conditional probabilities of the validation set samples; Generate a corresponding test set decision value based on the test set sample, perform posterior probability calculation on the test decision value, and generate a posterior probability that the test set sample is predicted to be each category; The posterior probabilities of the test set samples being predicted as various categories are used as sample weights and combined with existing training samples to retrain the classification model, thereby completing the online model update of the brain-computer interface based on Bayesian estimation.

2. The method according to claim 1, characterized in that The online updating framework of the classification model in the method further includes: After projecting the multi-channel EEG data onto the projection vector, the sum of all inter-trial covariances of samples of the same category is calculated; Based on the preset constraints, the objective function of calculating the sum of covariances between all trials of samples of the same category is transformed into an optimization solution function; Based on the Lagrange multiplier method, the analytical solution of the optimization solution function corresponding to the objective function is calculated as the eigenvector corresponding to the maximum eigenvalue after the eigendecomposition of the preset matrix; Based on ensemble learning, the projection vectors of all stimulation frequencies are concatenated column-wise to obtain the integrated projection matrix of each category.

3. The method according to claim 1, characterized in that The method further comprises: Based on the true labels of the validation set samples, Gaussian fitting is performed on the validation set decision values, a probability density curve of the validation set samples is calculated, and the class conditional probability of the validation set samples is generated based on the probability density curve.

4. The method according to claim 1, characterized in that The method further comprises: A test set decision value of the test set samples is generated based on the classification model.

5. The method according to claim 4, characterized in that The method calculates the posterior probability of the test decision value using the following formula: Among them, P(c k |dv m ) is when the decision value of the sample is equal to dv m In the case of k The probability, P(c k ) is the class prior probability, which is the class c in the sample space k The proportion of samples.

6. The method according to claim 5, characterized in that The method further comprises: Based on Bernoulli's law of large numbers, the denominator of the posterior probability calculation formula is expanded according to the total probability formula to obtain The posterior probability of predicting the test set samples as each category is calculated and generated.

7. The method according to claim 1, characterized in that The method further comprises: The category corresponding to the maximum posterior probability value is selected as the predicted category of the test set sample.

8. A brain-computer interface online model updating device based on Bayesian estimation, characterized in that: The device comprises: A classification model training module is used to establish a classification model based on an online update framework, train the classification model based on training set samples, and generate a validation set decision value corresponding to a validation set sample based on the classification model; A probability density calculation module, used to perform Gaussian fitting on the validation set decision values ​​of each category based on the true labels of the validation set samples, and calculate and generate the class conditional probabilities of the validation set samples; A posterior probability calculation module is used to generate a test set decision value based on the test set sample, perform a posterior probability calculation on the test decision value, and generate a posterior probability that the test set sample is predicted to be each category; The online strategy update module predicts the test set samples as the posterior probability of each category as the sample weight, combines it with the existing training samples, retrains the classification model, and completes the brain-computer interface online model update based on Bayesian estimation.

9. An electronic device, characterized in that: include Processor; and A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Training method and application of variation data uncertainty analysis model of weak asymmetric visual stimulation

    CN120687763A

  • Training method and application of variation data uncertainty analysis model of weak asymmetric visual stimulation

    CN120687763B