Training method of single trial spatiotemporal filter based on periodicity feature and discriminant analysis
By segmenting and averaging steady-state visual evoked potentials, constructing template signals, and calculating inter-class difference matrices, the effectiveness problem of spatiotemporal filters under single-trial training data is solved, achieving efficient recognition results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-09
AI Technical Summary
Existing spatiotemporal filtering algorithms based on linear discriminant analysis degenerate the intra-class difference matrix into a zero matrix when there is only single-trial training data for each stimulus frequency, resulting in invalid generalized eigenvalue decomposition and failure to obtain an effective spatiotemporal filter.
By collecting steady-state visual evoked potentials (SVPs) when subjects fixate on visual stimuli, preprocessing them, length segmentation, and averaging are performed to construct a steady-state visual evoked potential template signal. This template signal is then projected onto a subspace spanned by an ideal reference signal. The inter-class and intra-class difference matrices are calculated, and an effective spatiotemporal filter is obtained using generalized eigenvalue decomposition.
It reduces the training cost of spatiotemporal filters, improves the recognition accuracy on single-trial training data, and simplifies the training process.
Smart Images

Figure CN122173814A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to algorithm optimization technology in the field of brain-computer interface signal recognition, and particularly to a training method and decoding method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis. Background Technology
[0002] In recent years, the application of Steady-State Visual Evoked Potentials (SSVEP) algorithms in brain-computer interfaces has made significant progress. The high accuracy of SSVEP algorithms often relies on a large amount of training data. This is because pre-training helps the algorithm learn from individual EEG data and generate spatial or spatiotemporal filters and evoked potential template signals that match the subject's EEG characteristics, thereby enabling the algorithm to achieve satisfactory recognition results.
[0003] However, an increase in the amount of training data means an increase in cost. Currently, the best-performing SSVEP algorithm based on individualized training data is the Task-Discriminant Component Analysis (TDCA) algorithm. However, the performance of this algorithm depends on a large amount of training data. Since the TDCA algorithm uses the idea of Linear Discriminant Analysis (LDA), it is necessary to calculate the intra-class difference matrix and the inter-class difference matrix. When there is only one trial of training data for each stimulus frequency, the intra-class difference matrix degenerates into a zero matrix, which leads to the ineffectiveness of generalized eigenvalue decomposition and the inability to obtain an effective spatiotemporal filter. Summary of the Invention
[0004] This invention provides a training and decoding method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis. This method addresses the technical problem that conventional spatiotemporal filtering algorithms based on linear discriminant analysis degenerate the intra-class difference matrix into a zero matrix when only single-trial training data is available for each stimulus frequency. This results in the ineffectiveness of generalized eigenvalue decomposition and the inability to obtain an effective spatiotemporal filter. The invention achieves the technical effect of reducing the training cost of spatiotemporal filters.
[0005] In a first aspect, embodiments of the present invention provide a training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis, comprising: The frequency of subject fixation was collected. f n primitive steady-state visual evoked potentials during visual stimulation ;right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, ; According to length segmentation ,get for middle The number of data segments of length, of which, The value varies with frequency f n Increase and increase; right by indivual By averaging, we get Copy and connect multiple A steady-state visual evoked potential template signal of the required length was synthesized. ; For the steady-state visual evoked potential template signal To expand and enhance, and obtain ; Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; right Further enhancements were made to obtain ; Calculate the inter-class difference matrix and intra-class difference matrix ,in, , , For the purposes of the above The result obtained after expansion and enhancement To be The result obtained by projecting onto the subspace spanned by the ideal reference signal; Calculate the scatter matrix and ; Generalized eigenvalue decomposition is used to obtain a projected subspace that can effectively classify all categories. and according to the Obtain the spatiotemporal filter .
[0006] Furthermore, based on length segmentation ,get for middle The number of data segments of length, including: Will Divided into A length of The period, the number of sampling points in each period is ,in, Sampling frequency, This is a rounding function; in, The value is greater than or equal to 1 and varies with frequency. f n It increases as it increases.
[0007] Furthermore, the aforementioned The value varies with frequency f n The increase is due to the increase of, including: In frequency f n At frequencies below 20Hz, ; In frequency f n In the case of 20Hz or higher and less than 30Hz ; In frequency f n In the case of 30Hz or higher and less than 40Hz ; In frequency f n Greater than or equal to 10 s Hz and less than 10 ( s+ 1) In the case of Hz, .
[0008] Furthermore, the aforementioned The value varies with frequency f n The increase is due to the increase of, including: The The value is determined through a grid search.
[0009] Furthermore, the frequency of subject gaze was collected. f n primitive steady-state visual evoked potentials during visual stimulation ,include: Presented on the screen The frequencies are respectively f 1 , … f i , … f n ,,…f Nf Visual stimuli were used to collect raw steady-state visual evoked potential signals from one trial of subjects fixating on these visual stimuli, which were then used as training data. The subjects' fixation frequency was [missing information]. f nThe primitive steady-state visual evoked potentials of the subjects' multi-channel EEG collected during visual stimulation were: ,in, Number of brainwave channels, This represents the number of sampling points; right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,include: use Each filter bank affects the original steady-state visual evoked potentials. Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands .
[0010] Furthermore, the replication connection includes multiple A steady-state visual evoked potential template signal of the required length was synthesized. ,include: Copy links multiple A steady-state visual evoked potential template signal of the required length was synthesized. , ,in, , for Part of The number of sampling points is .
[0011] Furthermore, the steady-state visual evoked potential template signal To expand and enhance, including: For the steady-state visual evoked potential template signal To expand and enhance, and obtain ,in yes Delay Data from each sampling point.
[0012] Furthermore, the aforementioned Projecting onto the subspace spanned by the ideal reference signal includes: Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; Accordingly, Projecting onto the subspace spanned by the ideal reference signal includes: Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; in, It is frequencyf n The corresponding orthogonal projection matrix, Originating from sine-cosine reference signal QR decomposition of It can be represented as: ,in , Sampling rate, It is the number of harmonics used.
[0013] Furthermore, the statement based on the Obtain the spatiotemporal filter include: Solve , to obtain eigenvalues and the corresponding feature vectors ; Before choosing The eigenvectors corresponding to the largest eigenvalues form a spatiotemporal filter: ; in, The value of can be determined through grid search.
[0014] Secondly, the present invention also provides a decoding method for a single-trial spatiotemporal filter based on periodic characteristics and discriminant analysis, applicable to the spatiotemporal filter described in the first aspect. and steady-state visual evoked potential template signal Its features include: Collect unknown steady-state visual evoked potentials from subjects ,use Each filter bank affects the unknown steady-state visual evoked potentials. Preprocessing is performed to obtain Unknown steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, ; right To expand and enhance, and obtain ;Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ;right Further enhancements were made to obtain ; According to the spatiotemporal filter and the steady-state visual evoked potential template signal after multiple enhancements calculate Correlation coefficient of each sub-band ,right indivual The unknown steady-state visual evoked potentials are obtained by weighted summation. With the original steady-state visual evoked potential Correlation coefficient between ; The unknown steady-state visual evoked potential was obtained. The frequencies are respectively f 1 , … f i , … f n ,,…f Nf All original steady-state visual evoked potentials [ X 1 , … X i , … ,X n ,...,X Nf The correlation coefficient between them , No. i Correlation coefficients If the unknown steady-state visual evoked potential is at its maximum, then... The frequency of visual stimuli is f i .
[0015] The technical solution of this application, through the design of a training method for a single-trial spatiotemporal filter based on periodic characteristics and discriminant analysis, trains the preprocessed steady-state visual evoked potential. By performing segmentation and averaging, the conventional spatiotemporal filtering algorithm based on linear discriminant analysis is optimized. This solves the technical problem that when there is only single-trial training data for each stimulus frequency, the intra-class difference matrix degenerates into a zero matrix, which leads to the invalidation of generalized eigenvalue decomposition and the inability to obtain an effective spatiotemporal filter. This achieves the technical effect of reducing the training cost of spatiotemporal filters. Attached Figure Description
[0016] Figure 1 A schematic diagram of the structural composition of a steady-state visual evoked potential (SSVEP) brain-computer interface system; Figure 2 This is a schematic diagram of the signal-to-noise ratio characteristics of a typical steady-state visual evoked potential in the frequency domain. Figure 3 A flowchart of a training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis provided in Embodiment 1 of the present invention; Figure 4A flowchart of a single-trial spatiotemporal filter decoding method based on periodic features and discriminant analysis provided in Embodiment 2 of the present invention; Figure 5 The comparison chart shows the recognition accuracy of the eTRCA algorithm and the improved algorithm based on periodic features and discriminant analysis described in this application when the number of training trials is 1. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0018] Example 1 Brain-computer interfaces (BCIs) based on scalp EEG can non-invasively establish an information transmission channel between the brain and external devices, thereby helping patients with severe movement disorders or other healthy individuals in need to communicate amicably with their external environment. Figure 1 This is a schematic diagram of the structural composition of a Steady-State Visual Evoked Potentials (SSVEP) brain-computer interface system. The system mainly includes a stimulation module, an acquisition module, and a processing module. The stimulation module involves a display that encodes visual stimuli at a fixed frequency. When the subject fixates on the visual stimulus, steady-state visual evoked potentials are induced in the occipital region of the subject's brain. The acquisition module obtains electroencephalographic signals representing brain activity and cognitive processes from the subject's cerebral cortex or intracranial cavity via electrodes. The processing module extracts corresponding EEG feature signals from the EEG signals using a series of signal processing methods and performs pattern recognition to convert them into machine language commands.
[0019] Figure 2 This is a schematic diagram illustrating the signal-to-noise ratio characteristics of a typical steady-state visual evoked potential (SSVEP) in the frequency domain. A steady-state visual evoked potential (SSVEP) signal is evoked by visual stimuli at a fixed frequency. When visual stimuli are presented periodically at a specific frequency (such as flashing, image flipping, image scaling, etc.), the subject's visual system is affected, producing an evoked response with stable frequency domain characteristics. This response includes the frequency components of the visual stimulus and its higher harmonic components. Figure 2 The result is the average of steady-state visual evoked potentials from multiple trials. Averaging across multiple trials can cancel out random noise and improve the signal-to-noise ratio. In the case of a single trial, this might not be sufficient. Figure 2 The high signal-to-noise ratio effect is shown at the visual stimulus frequency and higher harmonic frequencies.
[0020] Steady-state visual evoked potentials also have spatial characteristics. For example, different frequency components of the SSVEP signal come from different brain regions of the subject. Therefore, when the SSVEP signal is transmitted to different parts of the subject's scalp, the signal-to-noise ratio of each harmonic is not the same.
[0021] Due to the volume conductor effect and the influence of the enclosed electric field, the spatial resolution of the scalp EEG signals collected from the subjects is not high, only reaching the centimeter level. At the same time, the collected EEG signals are also very weak, generally at the microvolt level, while the noise signal is relatively large compared to the useful signal. Therefore, the signal-to-noise ratio of the collected scalp EEG signals is low.
[0022] The signal-to-noise ratio (SNR) of scalp EEG signals affects the subsequent extraction of EEG feature signals and pattern recognition, thereby impacting the performance of brain-computer interfaces. Studies have demonstrated that spatial or spatiotemporal filtering methods play a crucial role in reducing the SNR of SSVEP EEG signals. The basic principle of spatial or spatiotemporal filtering methods is to perform signal conversion on EEG signals recorded from different EEG channels, enhancing the intensity of specific signal components and reducing common noise in each EEG channel, thus obtaining a projection method that can better distinguish between useful and noise signals—that is, a spatial or spatiotemporal filter.
[0023] Currently, advanced spatiotemporal filtering methods based on supervised learning, such as Task Discriminant Component Analysis (TDCA), have proven effective in identifying steady-state visual evoked potentials in many studies. However, their performance deteriorates sharply when training data (i.e., the number of training trials) is insufficient. Particularly when each stimulus frequency has only one trial, TDCA fails to train the resulting spatiotemporal filter. This is not only because TDCA relies on inter-trial averaging to obtain a high signal-to-noise ratio template signal, but also because TDCA requires the use of linear discriminant analysis (LDA), whose computational principle causes the intra-class difference matrix to degenerate into a zero matrix under single-trial training data.
[0024] The difference between Embodiment 1 of this application and the conventional TDCA algorithm is as follows: 1) It utilizes the periodic repetition of the SSVEP signal to divide the single-trial SSVEP signal, thereby constructing a template signal. Based on the template signal, it calculates the inter-class difference matrix and intra-class difference matrix, further calculates the inter-class scatter matrix and intra-class scatter matrix, and then solves the effective spatiotemporal filter based on the principle of linear discriminant analysis; 2) For steady-state visual evoked potentials (SSVEP signals) with different stimulus frequencies, different division methods are used to divide them, thereby making full use of the frequency differences of the training data to improve the performance of the obtained spatiotemporal filter.
[0025] The following will briefly explain why the conventional TDCA algorithm cannot construct spatiotemporal filters on single-trial training data: The conventional TDCA algorithm requires calculating the inter-class difference matrix when constructing the spatiotemporal filter. and intra-class difference matrix ,in, , , For the number of trials, This represents the frequency. (The number of trials...) When =1, Intraclass difference matrix If the matrix is zero, it cannot be used for subsequent calculations. Furthermore, the conventional TDCA algorithm, with only a single trial training data, cannot obtain a reliable steady-state visual evoked potential template signal because it cannot employ a multi-trial averaging method to improve the signal-to-noise ratio.
[0026] Figure 3 This is a flowchart illustrating a training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis, as provided in Embodiment 1 of the present invention. The TDCA algorithm constructs a spatiotemporal filter by minimizing intra-class differences and maximizing inter-class differences in the training data for each class of samples. The TDCA algorithm can effectively extract SSVEP components suitable for classification from noisy multi-channel electroencephalogram (EEG) signals. The training of the spatiotemporal filter is based solely on single-trial training data, greatly simplifying the training cost. This method can be executed by a computer and specifically includes the following steps: S301, Collect the subject's gaze frequency. f n primitive steady-state visual evoked potentials during visual stimulation ;right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, .
[0027] Multiple frequencies of visual stimuli are presented on a screen for subjects to selectively fixate on. Optionally, visual stimuli are presented on a screen... The frequencies are respectively f 1 , … f i , … f n ,,…f Nf Visual stimuli were used to collect raw steady-state visual evoked potential signals from one trial of subjects fixating on these visual stimuli, which were then used as training data. The subjects' fixation frequency was [missing information]. f nThe primitive steady-state visual evoked potentials of the subjects' multi-channel EEG collected during visual stimulation were: ,in, Number of brainwave channels, This represents the number of sampling points.
[0028] Assuming the frequency of attention from the subjects is f n Visual stimuli are applied, and the subject's electroencephalogram (EEG) signals are collected at that moment to obtain the original steady-state visual evoked potentials. ,in, ; The number of frequency types of visual stimuli. These represent the number of EEG channels and the number of sampling points, respectively.
[0029] Preferably, in response to the original steady-state visual evoked potential Before preprocessing, the collected data can be... Bandpass filtering and power frequency notch filtering are performed to remove significant noise signals. For example, the frequencies of visual stimuli and their higher harmonics are typically between 8 Hz and 80 Hz. A wide-range bandpass filter is performed to obtain a signal with a frequency between 8 Hz and 80 Hz.
[0030] right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, .use Each filter bank affects the original steady-state visual evoked potentials. Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands .
[0031] use Each filter bank affects the original steady-state visual evoked potentials. Preprocessing is performed, that is, the original steady-state visual evoked potentials are... Frequency division is performed to obtain different sub-band signals. Subband signals of a specific frequency band ,in, ; This refers to the number of filter banks; the filters within a filter bank can be configured according to actual needs. For example, The filter bank contains eight filters with passbands of 16 Hz~80 Hz, 24 Hz~80 Hz, 32 Hz~80 Hz, 40 Hz~80 Hz, 48 Hz~80 Hz, 56 Hz~80 Hz, 64 Hz~80 Hz, and 72 Hz~80 Hz. The filter bank is used to generate the original steady-state visual evoked potentials. Preprocessing is a widely accepted signal processing method in this field, and will not be elaborated upon here.
[0032] S302, According to length segmentation ,get for middle The number of data segments of length, of which, The value varies with frequency f n It increases as it grows.
[0033] The subject's gaze frequency was f n During visual stimulation, primitive steady-state visual evoked potentials from multiple EEG channels of the subjects were collected. For example, the visual stimulus is presented in the form of flashing, with one trial consisting of a continuous flash for 2 seconds (the duration can also be chosen appropriately depending on the situation). Within these 2 seconds, the flashing occurs multiple times, thereby evoking the subject's primitive steady-state visual evoked potentials. Corresponding to multiple flickers, steady-state visual evoked potentials (SSVEPs) are periodically repeating sinusoidal signals, and SSVEPs are formed by the temporal superposition of transient visual evoked potentials. Considering the above facts, this application will analyze the preprocessed steady-state visual evoked potentials from a single trial. This segmentation solves the technical problem that the conventional TDCA algorithm does not support spatiotemporal filter construction on single-trial training data. Furthermore, the length of the segmented data is... According to frequency f n Configure them separately, frequency f n When the value is large, the original steady-state visual evoked potential per unit time It contains a greater number of periodically repeating sinusoidal signals, depending on the frequency. f n Adjustment In order to prevent when f n When larger Too small a value makes subsequent calculations susceptible to random noise, thus preventing... The excessively short scatter matrix leads to increased calculation errors, thereby improving the performance of the trained spatiotemporal filter.
[0034] Optionally, based on length segmentation ,get for middle The number of data segments of length, including: Divided into A length of The period, the number of sampling points in each period is ,in, Sampling frequency, This is a rounding function; where, The value is greater than or equal to 1 and varies with frequency. f n It increases as it increases.
[0035] Assuming the original steady-state visual evoked potential is The sinusoidal signal, which repeats periodically, is divided into minimum periods. Let the number of minimum periods be 1. ,but The number of sampling points in each period is ,in, Sampling frequency, This is the floor function. This is a rounding function; similarly, in greater than or equal to In this case, it can be Set as ,at this time Based on the number of periodic sampling points segmentation ,get , Includes One cycle.
[0036] Because the periods of higher harmonics are too short and easily affected by noise when calculating the scatter matrix, therefore, for all... The number of periodic sampling points is all adopted Calculation. Primitive steady-state visual evoked potentials. Number of periodic sampling points It can also be applied to steady-state visual evoked potentials after preprocessing. Based on the number of periodic sampling points segmentation A new three-dimensional tensor is obtained , which includes Data from one period.
[0037] The advantage of this setup is that, by applying the floor and round functions, it provides a representation of the preprocessed steady-state visual evoked potentials. A specific scheme for dividing the period length, by adjusting Size then adjust The value of .
[0038] Optionally, the The value varies with frequency f n Increases with increasing frequency, including: f n At frequencies below 20Hz, ; at frequency f n In the case of 20Hz or higher and less than 30Hz ; at frequency f n In the case of 30Hz or higher and less than 40Hz ; at frequency f n Greater than or equal to 10 s Hz and less than 10 ( s+ 1) In the case of Hz, Typically, in the field of brain-computer interface signal recognition, the frequency of visual stimuli... f n The frequency will not exceed 60Hz; frequencies above 30Hz are considered relatively high-frequency visual stimuli. f n The value is adjusted regularly. The size of the filter simplifies the training process and is generally applicable to ordinary subjects.
[0039] Optionally, the The value varies with frequency f n The increase is due to the increase of, including: the aforementioned The value is determined through a grid search. In this embodiment of the application... The value can also be adjusted based on individual differences among subjects. In scenarios where high accuracy is required, a grid search method is used to determine the value. The value can be used to obtain different frequencies. f n The corresponding best The value, thus enabling the subsequent spatiotemporal filter to... Better performance.
[0040] S303, to by indivual By averaging, we get Copy and connect multiple A steady-state visual evoked potential template signal of the required length was synthesized. .
[0041] Template for calculating sub-periods of steady-state visual evoked potential (SSVEP) signals To enable template matching based on SSVEP templates, similar to the TDCA algorithm, copying and joining can be used. To rebuild the SSVEP template of the required length The difference between this algorithm and the conventional TDCA algorithm lies in the fact that the conventional TDCA algorithm targets pre-processed steady-state visual evoked potentials. The algorithm is extended and enhanced, while the improved TDCA algorithm described in Embodiment 1 of this application is designed for the reconstructed template. To perform extensions, enhancements, and subsequent calculations.
[0042] Optionally, the copy connection can be multiple. A steady-state visual evoked potential template signal of the required length was synthesized. This includes: copying and connecting multiple A steady-state visual evoked potential template signal of the required length was synthesized. , ,in, , for Part of The number of sampling points is .
[0043] It is a matrix From the first sampling point to the... A portion of each sampling point. The trained spatiotemporal filter is then used to assess unknown steady-state visual evoked potentials. During decoding, The number of sampling points is also It should be noted that the original steady-state visual evoked potentials described in the embodiments of this application... The number of sampling points is The subsequent synthesis yielded The number of sampling points is also However, in the unknown steady-state visual evoked potential The number of sampling points is not In this case, it is possible to synthesize samples with other values for the number of sampling points. Thus with The number of sampling points is consistent.
[0044] The advantage of this setup is that it allows for the generation of unknown steady-state visual evoked potentials. The number of sampling points is used to synthesize the steady-state visual evoked potential template signal of the required length. , The appropriate number of sampling points can be selected based on the situation, which increases... Scope of application.
[0045] S304, the steady-state visual evoked potential template signal To expand and enhance, and obtain .
[0046] For the steady-state visual evoked potential template signal Extending and enhancing the signal, including: extending and enhancing the steady-state visual evoked potential template signal. To expand and enhance, and obtain ,in yes Delay Data from each sampling point.
[0047] yes Delay Data from each sampling point express Zhong Cong arrive Data from sampling points, The specific value is determined by grid search. This represents the zero matrix.
[0048] S305, will Projecting onto the subspace spanned by the ideal reference signal, we obtain... .
[0049] It is frequency f n The corresponding orthogonal projection matrix, Originating from sine-cosine reference signal QR decomposition of It can be represented as: ,in , Sampling rate, It is the number of harmonics used.
[0050] S306, to Further enhancements were made to obtain .
[0051] S307, Calculate the inter-class difference matrix and intra-class difference matrix ,in, , , For the purposes of the above The result obtained after expansion and enhancement To be The result obtained by projecting onto the subspace spanned by the ideal reference signal.
[0052] A spatiotemporal filter capable of effectively classifying all categories is obtained through linear discriminant analysis, wherein the inter-class difference matrix... Intra-class difference matrix . , For the purposes of the above The result obtained after expansion and enhancement To be The result obtained by projecting onto the subspace spanned by the ideal reference signal. , and The calculation method can refer to the conventional TDCA algorithm, as follows: Preprocessed steady-state visual evoked potentials Extend to obtain ,in yes Delay Data from each sampling point express Zhong Cong arrive Data from sampling points, The specific value is determined by grid search. Represents the zero matrix. (The rest is missing from the original text.) Projecting onto the subspace spanned by the ideal reference signal, we obtain... .
[0053] S308. Calculate the scatter matrix. and .
[0054] S309. Using generalized eigenvalue decomposition, a projection subspace capable of effectively classifying all categories is obtained. and according to the Obtain the spatiotemporal filter .
[0055] Optionally, the method according to the Obtain the spatiotemporal filter Includes: solving , to obtain eigenvalues and the corresponding feature vectors Before selection The eigenvectors corresponding to the largest eigenvalues form a spatiotemporal filter: ;in, The value of can be determined through grid search.
[0056] The above generalized eigenvalue decomposition can be obtained There are 10 subspaces, but not all subspaces contribute to classification. Let's assume the number of contributing subspaces is 1. The corresponding spatiotemporal filter is , i.e., matrix The former The eigenvectors corresponding to the largest eigenvalues The value of can be determined through grid search. Eigenvectors with smaller eigenvalues often correspond to noise or patterns with low class discrimination. These directions may contain irrelevant variations, noise, or redundant information, which do not help classification and may even interfere with classification performance. If the spatiotemporal filter is calculated using all subspaces, not only is the computational cost high, but it may also introduce noise, leading to overfitting and reducing the model's generalization ability.
[0057] The technical solution of this embodiment, through the design of a training method for a single-trial spatiotemporal filter based on periodic characteristics and discriminant analysis, trains the preprocessed steady-state visual evoked potential. By performing segmentation and averaging, the conventional TDCA algorithm is optimized. This solves the technical problem that when there is only single-trial training data for each stimulus frequency, the intra-class difference matrix degenerates into a zero matrix, which leads to the invalidation of generalized eigenvalue decomposition and the inability to obtain an effective spatiotemporal filter. This achieves the technical effect of reducing the training cost of spatiotemporal filters.
[0058] Example 2 Figure 4 This is a flowchart of a decoding method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis, provided in Embodiment 2 of the present invention. This embodiment uses a high-performance spatiotemporal filter to decode the EEG characteristics of unknown steady-state visual evoked potentials, thereby obtaining the meaning represented by the unknown steady-state visual evoked potentials, i.e., obtaining the frequency information of the visual stimulus gazed upon by the subject. The training of this spatiotemporal filter is based solely on single-trial experimental data, greatly simplifying the training cost. For details of the training process, please refer to Embodiment 1. The decoding method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis specifically includes the following steps: S401. Collect unknown steady-state visual evoked potentials from the subject. ,use Each filter bank affects the unknown steady-state visual evoked potentials. Preprocessing is performed to obtain Unknown steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, .
[0059] Unknown steady-state visual evoked potentials Employing the training spatiotemporal filter same time Each filter bank is preprocessed to obtain the preprocessed unknown steady-state visual evoked potentials. For details on the meaning of this preprocessing, please refer to the training method of single-trial spatiotemporal filter based on periodic features and discriminant analysis described in Example 1, which will not be repeated here.
[0060] S402, to To expand and enhance, and obtain ;Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ;right Further enhancements were made to obtain .
[0061] Unknown steady-state visual evoked potentials after preprocessing Employing the training spatiotemporal filter The same steps are used to expand and enhance the process to obtain... For details on the meaning of this step, please refer to the training method of single-trial spatiotemporal filter based on periodic features and discriminant analysis described in Example 1, which will not be repeated here.
[0062] S403, Based on the spatiotemporal filter and the steady-state visual evoked potential template signal after multiple enhancements calculate Correlation coefficient of each sub-band ,right indivual The unknown steady-state visual evoked potentials are obtained by weighted summation. With the original steady-state visual evoked potential Correlation coefficient between .
[0063] Correlation coefficient ,in, This indicates the calculation of the two-dimensional correlation coefficient. Unknown steady-state visual evoked potentials The m Sub-band signal With frequency f n The first brainwave signal induced by visual stimulation m Sub-band signal The correlation coefficient between them.
[0064] Unknown steady-state visual evoked potentials With the original steady-state visual evoked potential Correlation coefficient between ,in For each specific frequency band The weighting coefficients, Defined as , and The values can be chosen to determine the final accuracy as the objective function. Optimal parameters can be determined through grid search, or empirical values can be used. , .
[0065] S404, Obtain the unknown steady-state visual evoked potential. The frequencies are respectively f 1 , … f i , … f n ,,…f Nf All original steady-state visual evoked potentials [ X 1 , … X i , … ,X n ,...,X Nf The correlation coefficient between them , No. i Correlation coefficients If the unknown steady-state visual evoked potential is at its maximum, then... The frequency of visual stimuli is f i .
[0066] The purpose of steady-state visual evoked potential (SVP) identification is essentially to determine which frequency of visual stimulus the subject is fixating on in order to elicit a signal from an unknown SVP. Therefore, after obtaining the correlation coefficient... After that, according to all indivual The maximum value in determines the unknown steady-state visual evoked potential. Which frequency of visual stimulus corresponds to the signal, i.e., the recognition result is Unknown steady-state visual evoked potentials The unknown steady-state visual evoked potential is identified by the highest correlation coefficient with the original steady-state visual evoked potential at that frequency. This refers to the signal induced by the visual stimulus of a certain frequency that the subject focuses on, thus enabling the identification of unknown visual stimuli.
[0067] Figure 5This is a comparison of the recognition accuracy of the eTRCA algorithm and the improved algorithm based on periodic features and discriminant analysis described in this application, with only one training trial. Figure 5 As shown, in the original steady-state visual evoked potential When the data length is 1 second, the spatiotemporal filter is trained on single-trial training data for each frequency using the eTRCA algorithm and the improved algorithm based on periodic features and discriminant analysis. The recognition accuracy results show that the recognition accuracy of the improved algorithm described in this application is significantly better than that of the eTRCA algorithm, and the recognition accuracy generally reaches more than 90%.
[0068] The technical solution of this embodiment solves the technical problem that the performance of conventional TDCA algorithm depends on a large amount of training data and cannot obtain an effective spatiotemporal filter using single-trial training data to decode unknown steady-state visual evoked potentials by designing a decoding method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis. This achieves the technical effect of improving the recognition accuracy of unknown visual stimuli under low training cost conditions.
[0069] Example 3 Embodiment 3 of the present invention provides a computer-readable storage medium containing a computer program, wherein the computer program, when executed by a processor, is used to perform a training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis, the method comprising: The frequency of subject fixation was collected. f n primitive steady-state visual evoked potentials during visual stimulation ;right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, ; According to length segmentation ,get for middle The number of data segments of length, of which, The value varies with frequency f n Increase and increase; right by indivual By averaging, we get Copy and connect multiple A steady-state visual evoked potential template signal of the required length was synthesized. ; For the steady-state visual evoked potential template signal To expand and enhance, and obtain ; Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; right Further enhancements were made to obtain ; Calculate the inter-class difference matrix and intra-class difference matrix ,in, , , For the purposes of the above The result obtained after expansion and enhancement To be The result obtained by projecting onto the subspace spanned by the ideal reference signal; Calculate the scatter matrix and ; Generalized eigenvalue decomposition is used to obtain a projected subspace that can effectively classify all categories. and according to the Obtain the spatiotemporal filter .
[0070] Of course, the computer-readable storage medium containing a computer program provided in the embodiments of the present invention is not limited to the method operation described above, but can also execute related operations in the training method or decoding method of the single-trial spatiotemporal filter based on periodic features and discriminant analysis provided in any embodiment of the present invention.
[0071] It should be noted that the training and decoding methods of the single-trial spatiotemporal filter based on periodic features and discriminant analysis for steady-state visual evoked potentials described in this invention can also be applied to signal-to-noise ratio enhancement and signal recognition of signals such as steady-state auditory evoked potentials and steady-state somatosensory evoked potentials, and corresponding brain-computer interface systems can be constructed based on this.
[0072] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the embodiments of the present invention.
[0073] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis, characterized in that, include: The frequency of subject fixation was collected. f n primitive steady-state visual evoked potentials during visual stimulation ;right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, ; According to length segmentation ,get for middle The number of data segments of length, of which, The value varies with frequency f n Increase and increase; right by indivual By averaging, we get Copy and connect multiple A steady-state visual evoked potential template signal of the required length was synthesized. ; For the steady-state visual evoked potential template signal To expand and enhance, and obtain ; Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; right Further enhancements were made to obtain ; Calculate the inter-class difference matrix and intra-class difference matrix ,in, , , For the purposes of the above The result obtained after expansion and enhancement To be The result obtained by projecting onto the subspace spanned by the ideal reference signal; Calculate the scatter matrix and ; Generalized eigenvalue decomposition is used to obtain a projected subspace that can effectively classify all categories. and according to the Obtain the spatiotemporal filter .
2. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 1, characterized in that, According to length segmentation ,get for middle The number of data segments of length, including: Will Divided into A length of The period, the number of sampling points in each period is ,in, Sampling frequency, This is a rounding function; in, The value is greater than or equal to 1 and varies with frequency. f n It increases as it increases.
3. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 2, characterized in that, The The value varies with frequency f n It increases with the increase of [something]. include: In frequency f n At frequencies below 20Hz, ; In frequency f n In the case of 20Hz or higher and less than 30Hz ; In frequency f n In the case of 30Hz or higher and less than 40Hz ; In frequency f n Greater than or equal to 10 s Hz and less than 10 ( s+ 1) In the case of Hz, .
4. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 2, characterized in that, The The value varies with frequency f n The increase is due to the increase of, including: The The value is determined through a grid search.
5. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 4, characterized in that, The frequency of subject fixation was collected. f n primitive steady-state visual evoked potentials during visual stimulation ,include: Presented on the screen The frequencies are respectively f 1 , … f i , … f n ,,…f Nf Visual stimuli were used to collect raw steady-state visual evoked potential signals from one trial of subjects fixating on these visual stimuli, which were then used as training data. The subjects' fixation frequency was [missing information]. f n The primitive steady-state visual evoked potentials of the subjects' multi-channel EEG collected during visual stimulation were: ,in, Number of brainwave channels, This represents the number of sampling points; right Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands ,include: use Each filter bank affects the original steady-state visual evoked potentials. Preprocessing is performed to obtain Steady-state visual evoked potentials after preprocessing of individual frequency bands .
6. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 5, characterized in that, The replication connection is multiple A steady-state visual evoked potential template signal of the required length was synthesized. ,include: Copy links multiple A steady-state visual evoked potential template signal of the required length was synthesized. , ,in, , for Part of The number of sampling points is .
7. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 6, characterized in that, For the steady-state visual evoked potential template signal To expand and enhance, including: For the steady-state visual evoked potential template signal To expand and enhance, and obtain ,in yes Delay Data from each sampling point.
8. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 7, characterized in that, The Projecting onto the subspace spanned by the ideal reference signal includes: Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; Accordingly, Projecting onto the subspace spanned by the ideal reference signal includes: Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ; in, It is frequency f n The corresponding orthogonal projection matrix, Originating from sine-cosine reference signal QR decomposition of It can be represented as: ,in , Sampling rate, It is the number of harmonics used.
9. The training method for a single-trial spatiotemporal filter based on periodic features and discriminant analysis according to claim 8, characterized in that, According to the Obtain the spatiotemporal filter include: Solve , to obtain eigenvalues and the corresponding feature vectors ; Before choosing The eigenvectors corresponding to the largest eigenvalues form a spatiotemporal filter: ; in, The value of can be determined through grid search.
10. A decoding method for a single-trial spatiotemporal filter based on periodic characteristics and discriminant analysis, applied to the spatiotemporal filter described in any one of claims 1-9. and steady-state visual evoked potential template signal Its characteristics are, include: Collect unknown steady-state visual evoked potentials from subjects ,use Each filter bank affects the unknown steady-state visual evoked potentials. Preprocessing is performed to obtain Unknown steady-state visual evoked potentials after preprocessing of individual frequency bands ,in, ; right To expand and enhance, and obtain ;Will Projecting onto the subspace spanned by the ideal reference signal, we obtain... ;right Further enhancements were made to obtain ; According to the spatiotemporal filter and the steady-state visual evoked potential template signal after multiple enhancements calculate Correlation coefficient of each sub-band ,right indivual The unknown steady-state visual evoked potentials are obtained by weighted summation. With the original steady-state visual evoked potential Correlation coefficient between ; The unknown steady-state visual evoked potential was obtained. The frequencies are respectively f 1 , … f i , … f n ,,…f Nf All original steady-state visual evoked potentials [ X 1 , … X i , … ,X n ,...,X Nf The correlation coefficient between them , No. i Correlation coefficients If the unknown steady-state visual evoked potential is at its maximum, then... The frequency of visual stimuli is f i .