Decoding label prediction method, model building method, device and electronic device
The EEG signal is decoded through the partial least squares regression model optimized by the Riemannian manifold, which solves the problem of difficulty in obtaining optimal decoding labels in the existing technology and achieves more efficient and accurate brain-computer interface decoding.
Patent Information
- Application Number
- CN202110605787.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-31
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-05-31
AI Technical Summary
The existing decoding technology based on solving latent factors column-by-column in Euclidean space is difficult to obtain optimal decoding labels, resulting in low decoding efficiency of brain-computer interfaces.
The partial least squares regression model after Riemannian manifold optimization is used to decode the EEG signals. Through matrix manifold optimization and Riemannian manifold optimization, the optimization problem of Euclidean space is transformed into the optimization problem of Riemannian manifold space, thereby improving the decoding label accuracy.
Through the Riemannian manifold optimization model, the global optimal decoding label can be obtained, which improves the decoding efficiency and accuracy of the brain-computer interface.
Smart Images

Figure CN113221831B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a decoding label prediction method, a model building method, a device, and an electronic device. Background Art
[0002] Electroencephalogram (EEG) signals are a bioelectric phenomenon generated by the transmission of information between brain cell groups in the form of ions. They are the overall reflection of neuronal electrophysiological activities on the surface of the scalp. Decoding EEG signals for BCI (Brain Computer Interface) to obtain corresponding decoding labels is an essential process for realizing information exchange between the brain and the device. However, the existing decoding technology based on solving latent factors column by column in Euclidean space is difficult to obtain the optimal decoding label. Summary of the invention
[0003] The present application provides a decoding label prediction method, a model building method, a device and an electronic device to solve the problem that it is difficult to obtain the optimal decoding label in the prior art.
[0004] In a first aspect, the present application provides a decoding label prediction method, comprising: obtaining a target EEG signal when a human body is imagining an action; filtering the target EEG signal to obtain a filtered EEG signal; based on the filtered EEG signal and a preset prediction model, obtaining a predicted decoding label for characterizing the action intention, wherein the prediction model is a partial least squares regression model optimized using a Riemann manifold.
[0005] In an embodiment of the present application, the EEG signals of a human body performing action imagination are first obtained, and the obtained EEG signals are filtered. Then, the EEG signals are decoded through a partial least squares regression model optimized by Riemann manifold, thereby converting the optimization problem in Euclidean space into an optimization problem in Riemann manifold space, so as to obtain a global optimal solution, thereby improving the accuracy of the predicted decoding label.
[0006] In combination with the technical solution provided in the first aspect above, in some possible implementations, the step of establishing the preset prediction model includes: obtaining sample data, the sample data including an EEG signal and a decoding label corresponding to the EEG signal; constructing a covariance matrix of the EEG signal and the decoding label based on the sample data; optimizing the covariance matrix by a matrix manifold optimization method to obtain an objective function model, the objective function model is an optimization model of a projection subspace that characterizes the maximum correlation between the EEG signal and the decoding label, the objective function model including a first eigenvector and a second eigenvector, the first eigenvector characterizing the projection subspace corresponding to the EEG signal, and the second eigenvector characterizing the projection subspace corresponding to the decoding label; optimizing the first eigenvector and the second eigenvector based on a Riemann manifold optimization method to obtain a first eigenvector and a second eigenvector optimized by the Riemann manifold; obtaining a prediction model characterizing the correspondence between the EEG signal and the decoding label based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model.
[0007] In an embodiment of the present application, the covariance matrix of the EEG signal and the decoding label is constructed by the acquired sample data, and then the covariance matrix is optimized by the matrix manifold optimization method to obtain the objective function model, and then the first eigenvector and the second eigenvector contained in the objective function model are optimized based on the Riemann manifold optimization method to obtain the first eigenvector and the second eigenvector optimized by the Riemann manifold, and finally, the prediction model of the EEG signal and the decoding label is obtained based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and the preset partial least squares regression model. The first eigenvector and the second eigenvector are optimized by the Riemann manifold optimization method, and combined with the preset partial least squares regression model to obtain the prediction model after the Riemann manifold optimization, so that the decoding label obtained by the prediction model is more accurate.
[0008] In combination with the technical solution provided in the first aspect above, in some possible implementations, the covariance matrix is optimized by a matrix manifold optimization method to obtain an objective function model, including: factorizing the covariance matrix to obtain residual terms; and iteratively updating the residual terms based on a matrix manifold optimization method to obtain an objective function model.
[0009] In an embodiment of the present application, the covariance matrix is factored to obtain the residual term, and then the residual term is iteratively updated based on the matrix manifold optimization method to obtain the objective function model. Through multiple iterations, the obtained objective function model is made more accurate, thereby making the first eigenvector and the second eigenvector after the subsequent Riemann manifold optimization more precise.
[0010] In combination with the technical solution provided in the first aspect above, in some possible implementations, the first eigenvector and the second eigenvector satisfy an orthogonal condition, and the first eigenvector and the second eigenvector are optimized based on the Riemann manifold optimization method to obtain the first eigenvector and the second eigenvector optimized on the Riemann manifold, including: performing product manifold optimization on the first eigenvector and the second eigenvector; obtaining a product space based on the first eigenvector optimized on the product manifold and the second eigenvector optimized on the product manifold, and obtaining a Riemann metric on the manifold tangent space based on the product space; obtaining a Riemann metric based on the Riemann degree A Lyapunov equation of tangent space projection is constructed, and based on the Lyapunov equation of tangent space projection, the Riemann gradient or Riemann Hessian of tangent space is obtained; based on the Riemann gradient of tangent space or the Riemann Hessian of tangent space, a Lyapunov equation of horizontal space projection is constructed, and based on the Lyapunov equation of horizontal space projection, the Riemann gradient of horizontal space and the Riemann Hessian of horizontal space are obtained; based on the gradient of horizontal space and the Hessian matrix of horizontal space, the objective function model is solved by using a conjugate gradient algorithm or a trust region method to obtain the first eigenvector and the second eigenvector of the optimized Riemann manifold.
[0011] In the embodiment of the present application, the first eigenvector and the second eigenvector are firstly optimized by the product manifold optimization method, and then the product space, i.e., the Euclidean space, is obtained based on the first eigenvector after the product manifold optimization and the second eigenvector after the product manifold optimization. Then, the product space is converted into the Riemann gradient of the horizontal space or the Riemann Hessian of the horizontal space by the Lyapunov equation of the tangent space projection and the Lyapunov equation of the horizontal space projection in turn. Finally, based on the Riemann gradient or Riemann Hessian of the horizontal space, the objective function model is solved by the conjugate gradient or the trust region method to obtain the first eigenvector and the second eigenvector after the Riemann manifold optimization. The gradient or Hessian matrix of the Euclidean space is projected into the Riemann space by the Lyapunov equation of the tangent space projection and the Lyapunov equation of the horizontal space projection, and converted into the Riemann gradient or Riemann Hessian of the Riemann space, thereby converting the optimization problem of the Euclidean space into the optimization problem of the Riemann manifold space to obtain the global optimal solution, and then obtain the optimal decoding label.
[0012] In combination with the technical solution provided in the first aspect above, in some possible implementations, after obtaining the first eigenvector and the second eigenvector after the Riemann manifold optimization, the method also includes: comparing the first eigenvector after the Riemann manifold optimization with a preset first eigenvector threshold to determine whether the first eigenvector after the Riemann manifold optimization converges to the first eigenvector threshold; comparing the second eigenvector after the Riemann manifold optimization with a preset second eigenvector threshold to determine whether the second eigenvector after the Riemann manifold optimization converges to the second eigenvector threshold; if the first eigenvector after the Riemann manifold optimization does not converge to the first eigenvector threshold and / or the second eigenvector after the Riemann manifold optimization does not converge to the second eigenvector threshold, substitute the first eigenvector and the second eigenvector after the Riemann manifold optimization into the objective function model, and perform Riemann manifold optimization again until the first eigenvector and the second eigenvector after the Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold, respectively.
[0013] In an embodiment of the present application, the first eigenvector and the second eigenvector after Riemann manifold optimization are compared with the preset first eigenvector threshold and the second eigenvector threshold respectively to determine whether the first eigenvector and the second eigenvector after Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold respectively; if one of them is no, the first eigenvector and the second eigenvector after Riemann manifold optimization are substituted into the objective function model, and Riemann manifold optimization is performed again until the first eigenvector and the second eigenvector after Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold respectively, so that the first eigenvector and the second eigenvector after Riemann manifold optimization obtained finally are more accurate, so that the final prediction model can obtain a better decoding label.
[0014] In a second aspect, the present application provides a model building method, comprising: obtaining sample data, wherein the sample data comprises an EEG signal and a decoding label corresponding to the EEG signal; based on the sample data, constructing a covariance matrix of the EEG signal and the decoding label; optimizing the covariance matrix by a matrix manifold optimization method to obtain an objective function model, wherein the objective function model is an optimization model of a projection subspace that characterizes the maximum correlation between the EEG signal and the decoding label, wherein the objective function model comprises a first eigenvector and a second eigenvector, wherein the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label; optimizing the first eigenvector and the second eigenvector based on a Riemann manifold optimization method to obtain a first eigenvector and a second eigenvector optimized by the Riemann manifold; obtaining a prediction model characterizing the correspondence between the EEG signal and the decoding label based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model.
[0015] In the third aspect, the present application provides a decoding label prediction device, including: an acquisition module and a processing module, the acquisition module is used to acquire a target EEG signal when a human body performs action imagination; the processing module is used to filter the target EEG signal to obtain a filtered EEG signal, and based on the filtered EEG signal and a preset prediction model, obtain a predicted decoding label for characterizing action intention, wherein the prediction model is a partial least squares regression model optimized using Riemann manifold.
[0016] In a fourth aspect, the present application provides a model building device, comprising: an acquisition module and an optimization module, the acquisition module is used to acquire sample data, the sample data comprising an EEG signal and a decoding label corresponding to the EEG signal; the optimization module is used to construct a covariance matrix of the EEG signal and the decoding label based on the sample data; and then the covariance matrix is optimized by a matrix manifold optimization method to obtain an objective function model, the objective function model is a projection subspace optimization model that characterizes the maximum correlation between the EEG signal and the decoding label, the objective function model comprises a first eigenvector and a second eigenvector, the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label; and based on the Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization; finally, based on the first eigenvector and the second eigenvector after Riemann manifold optimization and a preset partial least squares regression model, a prediction model characterizing the correspondence between the EEG signal and the decoding label is obtained.
[0017] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, the memory and the processor being connected; the memory being used to store programs; the processor being used to call programs stored in the memory to execute a method as provided in the above-mentioned first aspect embodiment and / or in combination with any possible implementation method of the above-mentioned first aspect embodiment, or to execute a method as provided in the above-mentioned second aspect embodiment.
[0018] In a sixth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon. When the computer program is run by a computer, it executes a method as provided in the above-mentioned first aspect embodiment and / or any possible implementation method in combination with the above-mentioned first aspect embodiment, or executes a method as provided in the above-mentioned second aspect embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic diagram of a flow chart of a decoding label prediction method according to an embodiment of the present application;
[0021] Figure 2 A schematic diagram of Riemann manifold optimization according to an embodiment of the present application;
[0022] Figure 3 A schematic diagram of a flow chart of a model building method according to an embodiment of the present application;
[0023] Figure 4 A schematic flow chart of another model building method according to an embodiment of the present application;
[0024] Figure 5 This is a structural block diagram of a decoding label prediction device shown in one embodiment of the present application;
[0025] Figure 6 This is a structural block diagram of a model building device shown in one embodiment of the present application;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0027] Icon: 100 - decoding label prediction device; 110 - acquisition module; 120 - processing module; 200 - model building device; 210 - acquisition module; 220 - optimization module; 300 - electronic device; 310 - transceiver; 320 - memory; 330 - communication bus; 340 - processor. DETAILED DESCRIPTION
[0028] The terms “first”, “second”, etc. are only used for distinguishing descriptions and do not indicate the order of arrangement, nor can they be understood as indicating or implying relative importance.
[0029] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings.
[0030] Since EEG signals are the overall reflection of the electrophysiological activities of brain nerve cells in the cerebral cortex or scalp surface, which contain a large amount of physiological information, some control purposes can be achieved by decoding and analyzing EEG signals. However, the existing BCI (brain-electroencephalogram interface) decoding technology cannot obtain the optimal decoding label. This application provides a decoding label prediction method to solve the above technical problems.
[0031] See also Figure 1 , Figure 1 A decoding label prediction method provided in the embodiment of the present application is described below in combination with Figure 1 Describe the steps involved.
[0032] Step S110: Acquire the target EEG signal when the human body is performing action imagination.
[0033] The target EEG signal of the human body when performing action imagination is obtained. The EEG signal obtained at this time contains information about action imagination, wherein the target EEG signal can be obtained in advance, stored in a database, and directly called when needed; or it can be obtained in real time when needed. Among them, action imagination refers to actions imagined by a person, such as front, back, left, right, up, and down. The examples of front, back, left, right, up, and down here are only for the convenience of understanding the scheme and should not be used as a limitation to this application.
[0034] Optionally, the method of collecting EEG signals may be any one of depth electrode, electroencephalography (EEG), electrocorticography (ECoG), and functional magnetic resonance imaging (fMRI).
[0035] Step S120: filtering the acquired EEG signal to obtain a filtered EEG signal.
[0036] Since EEG signals are non-stationary random signals without ergodic properties, and are affected by ambient noise and power frequency noise during EEG signal acquisition, resulting in strong background noise in the acquired EEG signals, it is necessary to filter the acquired EEG signals. Among them, the EEG signals can be filtered by methods such as neighborhood comparison digital filtering or Butterworth bandpass filtering to remove the interference noise.
[0037] Step S130: Based on the filtered EEG signal and a preset prediction model, a predicted decoding label for characterizing the action intention is obtained.
[0038] The filtered EEG signal is input as an observation variable into a preset prediction model to obtain a decoding label for characterizing the action intention, and the decoding label is the same as the action intention of the EEG signal as the observation variable.
[0039] Among them, the principle of Riemann manifold optimization method is as follows Figure 2 As shown in the figure, the PLSR solution in Euclidean space is transformed into a matrix manifold optimization problem in Riemannian manifold space by using the constraints of partial least squares regression (PLSR), and then applied to the EEG signal decoding of the motor imagery brain-computer interface. If the manifold is homeomorphic to a submanifold of Euclidean space, then this manifold can be embedded in Euclidean space. Using the submanifold embedding theorem, the computational space can be split into orthogonal complementary tangent space and normal space, and then using the equivalence class relationship, the tangent space can be split into orthogonal complementary horizontal space and vertical space.
[0040] Among them, [x] represents the equivalence class, represents the quotient space, R x (ξ x ) represents the contraction operator, ξ x represents the tangent vector. It is called total space, or computational space, where R represents the R potential components of the EEG signal X, M and N are constants, represents a real number. For two Stiefel manifolds St(U,V)={U T U=I M ,V T V=I N}To perform simultaneous optimization, first decompose the computational space into tangent space and normal space Then decompose the cut space into horizontal space and vertical space symbol represents the direct sum operation, U and V are Stiefel manifolds, I N represents the N-dimensional unit matrix, I M represents the M-dimensional identity matrix.
[0041] Among them, the prediction model is a partial least squares regression model optimized using Riemann manifold:
[0042] Y new =X new W((P*) T W) -1 DQ T
[0043] Among them, W((P*) T W) -1 DQ T represents the regression coefficient, W represents the weight matrix, P and Q represent the load matrix, P * represents the adjoint matrix of the loading matrix, and D is the linear correlation coefficient.
[0044] The preset prediction model is used to predict the decoding label corresponding to the EEG signal for representing the action intention. Before step S130, the prediction model needs to be established in advance. In one embodiment, the step of establishing the preset prediction model can be as follows: Figure 3 As shown below. Figure 3 The model building method shown illustrates the process of building the prediction model.
[0045] Step S210: Obtain sample data.
[0046] The acquired sample data includes an EEG signal and a decoding label corresponding to the EEG signal.
[0047] Step S220: constructing a covariance matrix of the EEG signal and the decoding label based on the sample data.
[0048] Among them, the covariance matrix can be expressed as M = X T Y, where X represents the EEG signal and Y represents the decoded label.
[0049] Step S230: Optimize the covariance matrix by a matrix manifold optimization method to obtain an objective function model, where the objective function model includes a first eigenvector and a second eigenvector.
[0050] In one implementation, the steps of optimizing the covariance matrix by the matrix manifold optimization method to obtain the objective function model may be: first factorizing the covariance matrix to obtain the residual term; then iteratively updating the residual term based on the matrix manifold optimization method to obtain the objective function model. When a preset termination threshold condition is met, the iterative update is stopped to obtain the objective function. In one implementation, the termination threshold condition may be that the residual is less than a preset threshold.
[0051] Among them, the covariance matrix is optimized by the matrix manifold optimization method to obtain the objective function model Among them, U represents the left eigenvector (first eigenvector) of the covariance matrix M(k); V represents the right eigenvector (second eigenvector) of M(k); S is the low-dimensional representation of M(k), that is, the correlation coefficient composed of potential components; k represents the number of iterative updates; the symbol F represents the Frobenius norm; S× 1 U× 2 V represents the matrix S modulo 1 multiplied by the matrix U, and modulo 2 multiplied by the matrix V.
[0052] Step S240: Based on the Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization.
[0053] In one implementation manner, the first eigenvector and the second eigenvector satisfy an orthogonal condition, and based on a Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized, and the steps of obtaining the first eigenvector and the second eigenvector after Riemann manifold optimization may be: firstly, the first eigenvector and the second eigenvector are optimized on a product manifold; then, based on the first eigenvector after the product manifold optimization and the second eigenvector after the product manifold optimization, a product space is obtained, and based on the product space, a Riemann metric in the manifold tangent space is obtained; then, based on the Riemann metric, a tangent space is constructed. The Lyapunov equation of horizontal space projection is constructed, and based on the Lyapunov equation of tangent space projection, the Riemann gradient of tangent space or the Riemann Hessian of tangent space is obtained; based on the gradient of tangent space and the Hessian matrix of tangent space, the Lyapunov equation of horizontal space projection is constructed, and based on the Lyapunov equation of horizontal space projection, the Riemann gradient of horizontal space or the Riemann Hessian of horizontal space is obtained, and finally, the global optimal solution of the objective function is solved in the horizontal space by the conjugate gradient or trust region method, and the first eigenvector and the second eigenvector after the optimization of the Riemann manifold are obtained.
[0054] Since the first eigenvector U and the second eigenvector V meet the orthogonal condition, they are regarded as two Stiefel manifolds for product manifold optimization, that is, St(U,V)={U T U=I N ,VT V=I M}, where I N represents the N-dimensional unit matrix, I M represents an M-dimensional unit matrix. The product manifold optimization may be a product manifold optimization of a cross product.
[0055] Then by calculating the space The search range of the space is solved by the secondary projection in the tangent space and the horizontal space, and R represents the R potential components of the EEG signal X.
[0056] In order to calculate relevant physical quantities such as curvature, angle, distance, etc. on the manifold, the Riemann metric in the manifold tangent space is obtained based on the product space Among them, ξ M and η M Represents the product space Any two tangent vectors on U and η U , V and η S , S and η S Respectively represent any two tangent vectors on the tangent space of submanifolds U, S, and V, SS T and S T S is used as a symmetric positive definite matrix for adaptive adjustment of the Riemannian metric of submanifolds U and V on the tangent space, namely, Riemann preprocessing.
[0057] Based on the Riemann metric, the Lyapunov equation of the tangent space projection is constructed, and we get:
[0058]
[0059] Among them, Ω U represents the tangent space component, Representation space components.
[0060] Then, based on the Riemann metric and the Lyapunov equation of the tangent space projection, the Riemann gradient of the tangent space or the Riemann Hessian of the tangent space is obtained to construct the Lyapunov equation of the horizontal space projection:
[0061]
[0062] Based on the Lyapunov equation of the horizontal space projection, the Riemann gradient of the horizontal space and the Riemann Hessian of the horizontal space are obtained, and then the objective function model is solved using the conjugate gradient algorithm or the trust region method based on the Riemann gradient of the horizontal space and the Riemann Hessian of the horizontal space to obtain the first eigenvector and the second eigenvector after the Riemann manifold is optimized.
[0063] The specific process of solving the first eigenvector and the second eigenvector is as follows: after establishing the Lyapunov equation of the tangent space projection, the Lyapunov equation of the tangent space projection is obtained. and Then compute the tangent space projection: in, Represents tangent space projection.
[0064] Use the properties of Stiefel manifold to find the projection of submanifolds U and V in horizontal space. First, decompose the tangent vector into two parts: horizontal space projection and vertical space projection: in, represents the horizontal space projection, Represents the vertical space projection, and the vertical space projection satisfies the conditions: Among them, Z U represents an arbitrary tangent vector in horizontal space.
[0065] based on The Lyapunov equation of the horizontal space projection is obtained, and then Ω is obtained according to the Lyapunov equation of the horizontal space projection. U , further calculate the horizontal space projection:
[0066] In order to narrow the solution range of the search space, the above method first decomposes the product space into tangent space and normal space, and then decomposes the tangent space into horizontal space and vertical space. For the implementation of the specific optimization process, it is first necessary to find the first-order derivatives of the variables U, S, and V of the original objective function:
[0067]
[0068] The symbol k represents the kth iteration process, and then the Riemann gradient is further calculated through the tangent space projection and horizontal space projection methods mentioned above:
[0069]
[0070] in Finally, the calculated Riemann gradient or Riemann Hessian is used to call the conjugate gradient or trust region method to solve the objective function and obtain the first eigenvector U and the second eigenvector V after the Riemann manifold optimization.
[0071] Step S250: Based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and the preset partial least squares regression model, a prediction model characterizing the correspondence between the EEG signal and the decoding label is obtained.
[0072] In one implementation, the preset partial least squares regression model is:
[0073]
[0074] in, Represents the R potential components contained in the EEG signal X, satisfying the orthogonality condition T T T = I. P and Q represent the loading matrix, E and F represent the error terms. represents the latent component of the decoded label Y.
[0075] In one implementation, the process of obtaining the prediction model of the EEG signal and the decoding label based on the first eigenvector, the second eigenvector and the preset partial least squares regression model after Riemann manifold optimization is to substitute U and V obtained by Riemann manifold optimization into the preset partial least squares regression model, let the weight matrix W = U; the potential component T = XW, and perform normalization so that T = T / ||T|| F Then let the latent component Z = YV and the diagonal matrix D = Z T T is the linear correlation coefficient between the latent components T and Z, P = X T T and Q=Y T T represents the load matrix. Finally, the new EEG signal X is obtained new The corresponding regression model of the decoded label Ynew: Y new =T new Q *T =X new W((P * ) T W) -1 DQ T Where C = W * DQ T =W((P * ) T W) -1 DQ T represents the regression coefficient.
[0076] In one implementation mode, after obtaining the first eigenvector and the second eigenvector after Riemann manifold optimization, it is also necessary to compare the first eigenvector after Riemann manifold optimization with a preset first eigenvector threshold value to determine whether the first eigenvector after Riemann manifold optimization converges to the first eigenvector threshold value; and compare the second eigenvector after Riemann manifold optimization with a preset second eigenvector threshold value to determine whether the second eigenvector after Riemann manifold optimization converges to the second eigenvector threshold value. If the first eigenvector after Riemann manifold optimization does not converge to the first eigenvector threshold value and / or the second eigenvector after Riemann manifold optimization does not converge to the second eigenvector threshold value, substitute the first eigenvector and the second eigenvector after Riemann manifold optimization into the objective function model, and perform Riemann manifold optimization again until the first eigenvector and the second eigenvector after Riemann manifold optimization converge to the first eigenvector threshold value and the second eigenvector threshold value, respectively.
[0077] For easier understanding, see Figure 4 First, establish the covariance matrix M = X between the EEG signal X and the decoded label Y T Y, based on the covariance matrix, the objective function model is obtained Then the gradient is solved to obtain gradf(U), gradf(V), and gradf(S), and then the Lyapunov equation of the tangent space and the Lyapunov equation of the horizontal space are established in turn. Based on gradf(U), gradf(V), and gradf(S), the gradient of the horizontal space and the Hessian matrix of the horizontal space are obtained. Then the objective function model is solved to obtain the first eigenvector U and the second eigenvector V. When the first eigenvector U and the second eigenvector V do not converge to the first eigenvector threshold and the second eigenvector threshold, respectively, the obtained first eigenvector U and the second eigenvector V are substituted into the objective function model, and Riemann manifold optimization is performed again until the first eigenvector U and the second eigenvector V converge to the first eigenvector threshold and the second eigenvector threshold, respectively, and the first eigenvector U and the second eigenvector V are output.
[0078] Optionally, the matrix S may also be optimized on a matrix manifold basis.
[0079] See also Figure 5 , Figure 5 A decoding label prediction device 100 is provided in an embodiment of the present application, and the device includes an acquisition module 110 and a processing module 120.
[0080] The acquisition module 110 is used to acquire the target EEG signal when the human body is performing action imagination.
[0081] The processing module 120 is used to filter the target EEG signal to obtain a filtered EEG signal, and based on the filtered EEG signal and a preset prediction model, obtain a predicted decoding label for characterizing the action intention. The prediction model is a partial least squares regression model optimized using Riemann manifold.
[0082] The decoding label prediction device 100 further includes a modeling module, the modeling module:
[0083] Used to obtain sample data, the sample data includes an EEG signal and a decoding label corresponding to the EEG signal; based on the sample data, construct a covariance matrix of the EEG signal and the decoding label; optimize the covariance matrix by a matrix manifold optimization method to obtain an objective function model, the objective function model is an optimization model of a projection subspace that characterizes the maximum correlation between the EEG signal and the decoding label, the objective function model includes a first eigenvector and a second eigenvector, the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label; based on a Riemann manifold optimization method, optimize the first eigenvector and the second eigenvector to obtain a first eigenvector and a second eigenvector optimized by the Riemann manifold; based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model, obtain a prediction model that characterizes the correspondence between the EEG signal and the decoding label.
[0084] Optionally, the modeling module is specifically used to: factorize the covariance matrix to obtain residual terms; iteratively update the residual terms based on a matrix manifold optimization method to obtain an objective function model.
[0085] Optionally, the modeling module is specifically used to: perform product manifold optimization on the first eigenvector and the second eigenvector; obtain a product space based on the first eigenvector after the product manifold optimization and the second eigenvector after the product manifold optimization, and obtain a Riemann metric in the manifold tangent space based on the product space; construct a Lyapunov equation of tangent space projection based on the Riemann metric, and obtain the Riemann gradient of the tangent space or the Riemann Hessian of the tangent space based on the Lyapunov equation of the tangent space projection; construct a Lyapunov equation of horizontal space projection based on the gradient of the tangent space and the Hessian matrix of the tangent space, and obtain the Riemann gradient of the horizontal space and the Riemann Hessian of the horizontal space based on the Lyapunov equation of the horizontal space projection; solve the objective function model based on the Riemann gradient of the horizontal space and the Riemann Hessian of the horizontal space using a conjugate gradient algorithm or a trust region method to obtain the first eigenvector and the second eigenvector after the Riemann manifold optimization.
[0086] Optionally, the modeling module is specifically used to: compare the first eigenvector after the Riemann manifold optimization with a preset first eigenvector threshold to determine whether the first eigenvector after the Riemann manifold optimization converges to the first eigenvector threshold; compare the second eigenvector after the Riemann manifold optimization with a preset second eigenvector threshold to determine whether the second eigenvector after the Riemann manifold optimization converges to the second eigenvector threshold; if the first eigenvector after the Riemann manifold optimization does not converge to the first eigenvector threshold and / or the second eigenvector after the Riemann manifold optimization does not converge to the second eigenvector threshold, substitute the first eigenvector and the second eigenvector after the Riemann manifold optimization into the objective function model, and perform Riemann manifold optimization again until the first eigenvector and the second eigenvector after the Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold, respectively.
[0087] See also Figure 6 , Figure 6 A model building device 200 provided in an embodiment of the present application includes an acquisition module 210 and an optimization module 220.
[0088] The acquisition module 210 is used to acquire sample data, where the sample data includes an EEG signal and a decoding label corresponding to the EEG signal.
[0089] The optimization module 220 is used to construct a covariance matrix of the EEG signal and the decoding label based on the sample data, and optimize the covariance matrix through a matrix manifold optimization method to obtain an objective function model, wherein the objective function model is a projection subspace optimization model that characterizes the maximum correlation between the EEG signal and the decoding label, and the objective function model includes a first eigenvector and a second eigenvector, wherein the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label, and based on the Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization, and based on the first eigenvector and the second eigenvector after Riemann manifold optimization and a preset partial least squares regression model, a prediction model characterizing the correspondence between the EEG signal and the decoding label is obtained.
[0090] Optionally, the optimization module 220 is specifically used to: factorize the covariance matrix to obtain residual terms; iteratively update the residual terms based on a matrix manifold optimization method to obtain an objective function model.
[0091] Optionally, the optimization module 220 is specifically used to: perform product manifold optimization on the first eigenvector and the second eigenvector; obtain a product space based on the first eigenvector after the product manifold optimization and the second eigenvector after the product manifold optimization, and obtain a Riemann metric in the manifold tangent space based on the product space; construct a Lyapunov equation of tangent space projection based on the Riemann metric, and obtain the Riemann gradient of the tangent space or the Riemann Hessian of the tangent space based on the Lyapunov equation of the tangent space projection; construct a Lyapunov equation of horizontal space projection based on the gradient of the tangent space and the Hessian matrix of the tangent space, and obtain the Riemann gradient of the horizontal space and the Riemann Hessian matrix of the horizontal space based on the Lyapunov equation of the horizontal space projection; solve the objective function model based on the Riemann gradient of the horizontal space and the Riemann Hessian of the horizontal space using the conjugate gradient method or the trust region method to obtain the first eigenvector and the second eigenvector after the Riemann manifold optimization.
[0092] Optionally, the optimization module 220 is specifically used to: compare the first eigenvector after the Riemann manifold optimization with a preset first eigenvector threshold to determine whether the first eigenvector after the Riemann manifold optimization converges to the first eigenvector threshold; compare the second eigenvector after the Riemann manifold optimization with a preset second eigenvector threshold to determine whether the second eigenvector after the Riemann manifold optimization converges to the second eigenvector threshold; if the first eigenvector after the Riemann manifold optimization does not converge to the first eigenvector threshold and / or the second eigenvector after the Riemann manifold optimization does not converge to the second eigenvector threshold, substitute the first eigenvector and the second eigenvector after the Riemann manifold optimization into the objective function model, and perform Riemann manifold optimization again until the first eigenvector and the second eigenvector after the Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold, respectively.
[0093] See also Figure 7 , which is an electronic device provided in an embodiment of the present application. The electronic device 300 includes: a transceiver 310 , a memory 320 , a communication bus 330 , and a processor 340 .
[0094] The transceiver 310, the memory 320, and the processor 340 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses 330 or signal lines. The transceiver 310 is used to send and receive data. The memory 320 is used to store computer programs, such as storing Figure 5 or Figure 6 The software functional modules shown in Figure 5 The decoding label prediction device 100 or Figure 6 The model building device 200 in the decoding label prediction device 100 or the model building device 200 includes at least one software function module that can be stored in the memory 320 in the form of software or firmware or fixed in the operating system (OS) of the electronic device 300. The processor 340 is used to execute the executable module stored in the memory 320, such as the software function module or computer program included in the decoding label prediction device 100 or the model building device 200.
[0095] For example, when the processor 340 executes the software function module or computer program included in the decoding label prediction device 100, it is used to: obtain the target EEG signal when the human body is imagining an action; filter the target EEG signal to obtain a filtered EEG signal; based on the filtered EEG signal and a preset prediction model, obtain a predicted decoding label for characterizing the action intention, and the prediction model is a partial least squares regression model optimized using Riemann manifold.
[0096] Alternatively, when executing the software function module or computer program included in the model building device 200, the processor 340 is used to: obtain sample data, wherein the sample data includes an EEG signal and a decoding label corresponding to the EEG signal; based on the sample data, construct a covariance matrix of the EEG signal and the decoding label; optimize the covariance matrix by a matrix manifold optimization method to obtain an objective function model, wherein the objective function model is a projection subspace optimization model that characterizes the maximum correlation between the EEG signal and the decoding label, and the objective function model includes a first eigenvector and a second eigenvector, wherein the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label; based on the Riemann manifold optimization method, optimize the first eigenvector and the second eigenvector to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization; based on the first eigenvector and the second eigenvector after Riemann manifold optimization and a preset partial least squares regression model, obtain a prediction model that characterizes the correspondence between the EEG signal and the decoding label.
[0097] Among them, the memory 320 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0098] The processor 340 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor or the processor 340 may also be any conventional processor, etc.
[0099] The electronic device 300 mentioned above includes but is not limited to a personal computer, a server, etc.
[0100] An embodiment of the present application also provides a non-volatile computer-readable storage medium (hereinafter referred to as storage medium), on which a computer program is stored. When the computer program is run by a computer such as the above-mentioned electronic device 300, the above-mentioned decoding label prediction method and / or model building method is executed.
[0101] The above-mentioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0102] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A decoding label prediction method, characterized in that: include: Obtain target EEG signals when a person is performing action imagination; Performing filtering on the target EEG signal to obtain a filtered EEG signal; Based on the filtered EEG signal and a preset prediction model, a predicted decoding label for characterizing the action intention is obtained, wherein the prediction model is a partial least squares regression model optimized using a Riemann manifold; The prediction model is: Y new =X new W((P * ) T W) -1 DQ T Among them, W((P * ) T W) -1 DQ T represents the regression coefficient, W represents the weight matrix, P and Q represent the load matrix, P * represents the adjoint matrix of the loading matrix, and D is the linear correlation coefficient.
2. The method according to claim 1, characterized in that The step of establishing the preset prediction model comprises: Acquire sample data, wherein the sample data includes an EEG signal and a decoding label corresponding to the EEG signal; Based on the sample data, construct a covariance matrix of the EEG signal and the decoding label; The covariance matrix is optimized by a matrix manifold optimization method to obtain an objective function model, wherein the objective function model is an optimization model of a projection subspace that represents the maximum correlation between the EEG signal and the decoding label, and the objective function model includes a first eigenvector and a second eigenvector, wherein the first eigenvector represents the projection subspace corresponding to the EEG signal, and the second eigenvector represents the projection subspace corresponding to the decoding label; Based on the Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization; Based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model, a prediction model characterizing the corresponding relationship between the EEG signal and the decoding label is obtained.
3. The method according to claim 2, characterized in that The covariance matrix is optimized by a matrix manifold optimization method to obtain an objective function model, including: Factoring the covariance matrix to obtain residual terms; The residual term is iteratively updated based on a matrix manifold optimization method to obtain an objective function model.
4. The method according to claim 2, characterized in that: The first eigenvector and the second eigenvector satisfy an orthogonal condition, and the Riemann manifold optimization method is used to optimize the first eigenvector and the second eigenvector to obtain the first eigenvector and the second eigenvector optimized by the Riemann manifold, including: Performing product manifold optimization on the first eigenvector and the second eigenvector; Based on the first eigenvector optimized by the product manifold and the second eigenvector optimized by the product manifold, a product space is obtained, and based on the product space, a Riemann metric in the manifold tangent space is obtained; Based on the Riemann metric, construct the Lyapunov equation of the tangent space projection, and based on the Lyapunov equation of the tangent space projection, obtain the Riemann gradient or Riemann Hessian of the tangent space; Based on the Riemann gradient or Riemann Hessian of the tangent space, construct the Lyapunov equation of horizontal space projection, and based on the Lyapunov equation of horizontal space projection, obtain the Riemann gradient or Riemann Hessian of the horizontal space; Based on the Riemann gradient of the horizontal space or the Riemann-Hessian of the horizontal space, the objective function model is solved using the conjugate gradient method or the trust region method to obtain the first eigenvector and the second eigenvector of the optimized Riemann manifold.
5. The method according to claim 2, characterized in that: After obtaining the first eigenvector and the second eigenvector after the Riemann manifold optimization, the method further includes: Compare the first eigenvector after the Riemann manifold optimization with a preset first eigenvector threshold to determine whether the first eigenvector after the Riemann manifold optimization converges to the first eigenvector threshold; Compare the second eigenvector after the Riemann manifold optimization with a preset second eigenvector threshold to determine whether the second eigenvector after the Riemann manifold optimization converges to the second eigenvector threshold; If the first eigenvector after the Riemann manifold optimization does not converge to the first eigenvector threshold and / or the second eigenvector after the Riemann manifold optimization does not converge to the second eigenvector threshold, the first eigenvector and the second eigenvector after the Riemann manifold optimization are substituted into the objective function model, and the Riemann manifold optimization is performed again until the first eigenvector and the second eigenvector after the Riemann manifold optimization converge to the first eigenvector threshold and the second eigenvector threshold, respectively.
6. A model building method, characterized in that: include: Acquire sample data, wherein the sample data includes an EEG signal and a decoding label corresponding to the EEG signal; Based on the sample data, construct a covariance matrix of the EEG signal and the decoding label; The covariance matrix is optimized by a matrix manifold optimization method to obtain an objective function model, wherein the objective function model is a projection subspace optimization model that characterizes the maximum correlation between the EEG signal and the decoding label, and the objective function model includes a first eigenvector and a second eigenvector, wherein the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label; Based on the Riemann manifold optimization method, the first eigenvector and the second eigenvector are optimized to obtain the first eigenvector and the second eigenvector after Riemann manifold optimization; Based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model, a prediction model characterizing the corresponding relationship between the EEG signal and the decoding label is obtained; The prediction model is: Y new =X new W((P * ) T W) -1 DQ T Among them, W((P * ) T W) -1 DQ T represents the regression coefficient, W represents the weight matrix, P and Q represent the load matrix, P * represents the adjoint matrix of the loading matrix, and D is the linear correlation coefficient.
7. A decoding label prediction device, characterized in that: include: An acquisition module is used to acquire target EEG signals when a human body is performing action imagination; A processing module, used to filter the target EEG signal to obtain a filtered EEG signal, and obtain a predicted decoding label for characterizing the action intention based on the filtered EEG signal and a preset prediction model, wherein the prediction model is a partial least squares regression model optimized using a Riemann manifold; The prediction model is: Y new =X new W((P * ) T W) -1 DQ T Among them, W((P * ) T W) -1 DQ T represents the regression coefficient, W represents the weight matrix, P and Q represent the load matrix, P * represents the adjoint matrix of the loading matrix, and D is the linear correlation coefficient.
8. A model building device, characterized in that: include: An acquisition module, used to acquire sample data, wherein the sample data includes an EEG signal and a decoding label corresponding to the EEG signal; An optimization module, for constructing a covariance matrix of the EEG signal and the decoding label based on the sample data, optimizing the covariance matrix by a matrix manifold optimization method, and obtaining an objective function model, wherein the objective function model is an optimization model of a projection subspace that characterizes the maximum correlation between the EEG signal and the decoding label, and the objective function model comprises a first eigenvector and a second eigenvector, wherein the first eigenvector characterizes the projection subspace corresponding to the EEG signal, and the second eigenvector characterizes the projection subspace corresponding to the decoding label, and based on a Riemann manifold optimization method, optimizing the first eigenvector and the second eigenvector to obtain the first eigenvector and the second eigenvector optimized by the Riemann manifold, and based on the first eigenvector and the second eigenvector optimized by the Riemann manifold and a preset partial least squares regression model, obtaining a prediction model that characterizes the correspondence between the EEG signal and the decoding label; The prediction model is: Y new =X new W((P * ) T W) -1 DQ T Among them, W((P * ) T W) -1 DQ T represents the regression coefficient, W represents the weight matrix, P and Q represent the load matrix, P * represents the adjoint matrix of the loading matrix, and D is the linear correlation coefficient.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are connected; The memory is used to store programs; The processor is used to call the program stored in the memory to execute the method according to any one of claims 1 to 5, or to execute the method according to claim 6.
10. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is run by a computer, the method according to any one of claims 1 to 5 is executed, or the method according to claim 6 is executed.
Citation Information
Patent Citations
Equipment control method and system, control equipment and readable storage medium
CN111338483A
Motion potential brain-machine interface encoding and decoding method based on spatial filtering and template matching
WO2020042511A1
