Online brain grain recognition method for cross-session scene

By collecting and processing EEG data in cross-session scenarios, multiple random seed models are constructed, and a multi-scale dynamic window weighted integration strategy is adopted, the problem of insufficient accuracy and robustness of EEG signal identity recognition in cross-session scenarios is solved, and fast and accurate online brain pattern recognition is achieved.

CN119622467AActive Publication Date: 2025-03-14HUAZHONG UNIV OF SCI & TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411691142.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

The prior art has shortcomings in the accuracy, robustness and recognition rate of EEG signal identity recognition in cross-session scenarios, especially in online brain pattern recognition scenarios, it is difficult to adapt to signal changes under different session conditions.

Method used

By collecting EEG data and sliding window processing at different dynamic window scales, multiple data sets are generated, each set of data sets is trained offline, and multiple random seed models are constructed. In the online prediction process, a multi-scale dynamic window weighted integration strategy is used to weighted sum and normalize the prediction results under different dynamic window scales to achieve online brain pattern recognition across sessions.

Benefits of technology

It improves the accuracy and robustness of EEG signal identity recognition in cross-session scenarios, and achieves fast, accurate and robust identity recognition with the shortest data length possible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622467A_ABST
    Figure CN119622467A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of brain grain recognition in a brain-computer interface, and discloses an online brain grain recognition method for a cross-session scene, which comprises the following steps: acquiring electroencephalogram data of K users under a session, performing non-overlapping segmentation on each test time according to the length T into brain electron segments, and storing the brain electron segments in a database; performing sliding window processing on the brain electron fragment under S different dynamic window scales to correspondingly generate S groups of data sets with different dynamic window scales; performing offline training on M different random seed models by adopting each group of dynamic window scale data sets to obtain M brain grain recognition models; and in the second session, performing gliding window processing on data which is received online and has the length of T in a corresponding scale, inputting the processed data into the corresponding brain grain recognition model for user identity prediction, averagely integrating prediction results, and performing weighted integration to obtain a user identity prediction result, thereby realizing cross-session online brain grain recognition. According to the method, the accuracy, robustness and recognition rate of cross-session electroencephalogram signal identity recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of brainprint recognition in brain-computer interfaces, and more specifically, relates to an online brainprint recognition method for cross-session scenarios. Background Art

[0002] With the rapid development of brain-computer interface (BCI) technology, the surge in public data sets and algorithms has promoted research progress, but it has also brought increasingly serious privacy and security issues. As a unique biological feature, EEG signals contain a lot of sensitive information, such as personal accounts, preferences, physiological status and other privacy data, among which identity information is particularly critical. Due to the uniqueness of human neural pathway patterns and genetic characteristics, the EEG signals of each individual are highly different. Driven by specific cognitive tasks (such as visual stimulation or resting state), EEG signals show stability and consistency. This "brain pattern" provides a reliable basis for identity recognition.

[0003] The development of brainprint recognition technology is closely related to the progress of EEG signal decoding technology. It has experienced the evolution from traditional machine learning to deep learning. After more than ten years of research, it has achieved relatively mature results. Early brainprint recognition methods mainly relied on manually designed features and combined them with machine learning classifiers for user identification. These methods include autoregressive coefficients (AR), power spectral density (PSD), and fuzzy entropy features (FuzzEn). However, these methods based on manual features not only rely heavily on the prior knowledge of experts, but also take a lot of time and effort to extract features. These limitations lead to poor generalization ability when dealing with increased data size or signal changes (such as cross-session data).

[0004] In the field of deep learning for brainprint recognition, research in recent years has mainly focused on improving the accuracy of EEG signal classification and capturing complex feature relationships. Some studies have attempted to combine the powerful learning ability of neural networks with the prior knowledge of traditional manual features. Although this has improved the recognition performance to a certain extent, it is still highly dependent on manual features, limiting the model's adaptability and generalization. Some studies have also focused on the dynamic relationship between EEG channels, proposing to use dynamic functional connectivity indicators to construct a feature matrix, and combining it with graph convolutional neural networks for classification, successfully capturing the spatial topological characteristics of EEG signals. However, these methods are still not robust enough when processing cross-session data, and are difficult to adapt to signal changes under different session conditions.

[0005] Moreover, most of the above existing methods focus on offline brainprint recognition within the same session. Compared with offline brainprint recognition, the difficulty of online brainprint recognition scenarios is significantly higher, and it is more valuable to explore in depth in real applications. Therefore, it is of great significance to perform online brainprint recognition on EEG signals in different sessions and improve the accuracy, robustness and recognition rate of cross-session EEG signal identity recognition. Summary of the invention

[0006] In view of the above defects or improvement needs of the prior art, the present invention provides an online brainprint recognition method for cross-session scenarios, which aims to improve the accuracy, robustness and recognition rate of EEG signal identity recognition in cross-session scenarios.

[0007] To achieve the above object, according to a first aspect of the present invention, there is provided an online brainprint recognition method for a cross-session scenario, comprising:

[0008] Collect the EEG data of K users in a session, split each trial in the EEG data into EEG segments of length T without overlap, and display each segmented EEG segment in S different dynamic window scales [T1, T2, …, T S ] to perform sliding window processing, and generate S sets of data sets with different dynamic window scales; where K ≥ 2, T is the minimum trial length of all trials in the EEG data; T j ≤T,j=1,2,…,S;

[0009] Using each set of data sets under dynamic window scale, M different random seed models are trained offline to obtain M brain pattern recognition models;

[0010] In session 2, the EEG data with a length of T received online are respectively displayed in the S different dynamic window scales [T1, T2, …, T S ] and perform sliding window processing under the dynamic window scale, and input the EEG data of different dynamic window scales after sliding window processing into M brainprint recognition models under the corresponding dynamic window scales for user identity prediction, and average the M prediction results of the same dynamic window scale as the prediction result under the current dynamic window scale; after weighted summation of the prediction results under S different dynamic window scales and then normalization, the user identity prediction result is obtained to realize cross-session online brainprint recognition.

[0011] Furthermore, when performing weighted summation on the prediction results under S different dynamic window scales, the weighting coefficient used is:

[0012]

[0013] In the formula, ω j is the jth dynamic window size T jThe weighted coefficient of the prediction result under , L is the unit online transmission length of the EEG data packet under session two.

[0014] Furthermore, the brain pattern recognition model includes:

[0015] The convolution module is used to perform multi-scale convolution operations on each data sample under the current dynamic window scale to extract EEG features at different time scales;

[0016] An encoding module, used to encode the EEG features of different time scales by using a Transformer-based self-attention mechanism to obtain encoded features;

[0017] A classification head is used to predict the user identity based on the encoded features.

[0018] Furthermore, during the offline training of M different random seed models, the loss function L used is total for:

[0019] L total =L ce +L im

[0020]

[0021] Among them, L ce is the cross entropy loss, L im is the information maximization loss, N is the number of trials of the current batch of training samples, is the true label of trial i in category c, is the predicted probability of trial i in category c, is the predicted probability distribution of category c in the current batch.

[0022] Furthermore, during offline training, an exponential learning rate decay strategy is used to optimize the training process, and after the training reaches a preset number of training rounds, adversarial samples are introduced to further train the model.

[0023] Furthermore, before offline training M different random seed models using each set of data sets under the dynamic window scale, the method further includes: performing data enhancement and bandpass filtering on each data sample in the data set; wherein the data enhancement includes trial synthesis, trial aliasing, time reversal or adding Gaussian noise to the data sample;

[0024] In session 2, the EEG data with a length of T received online are respectively displayed in the S different dynamic window scales [T1, T2, …, T S ] before performing sliding window processing, it also includes: performing bandpass filtering on the EEG data with a length of T.

[0025] Furthermore, when each trial in the EEG data is divided into non-overlapping lengths according to T, if the length of the remaining data after the division of a trial is less than T, a data segment is cut from the continuous data before the remaining data of the trial, and the cut data segment is spliced ​​with the remaining data to form a EEG segment with a length of T.

[0026] According to a second aspect of the present invention, there is provided an online brainprint recognition system for a cross-session scenario, comprising a computer-readable storage medium and a processor;

[0027] The computer-readable storage medium is used to store executable instructions;

[0028] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the online brainprint recognition method for cross-session scenarios described in any one of the first aspects.

[0029] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the online brainprint recognition method for cross-session scenarios as described in any one of the first aspects is implemented.

[0030] According to a fourth aspect of the present invention, there is provided a computer program product, comprising a computer program, which, when executed on a computer, enables the computer to execute the online brainprint recognition method for a cross-session scenario as described in any one of the first aspects.

[0031] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0032] (1) In order to realize online brain pattern recognition across session scenarios, the present invention slices the EEG signals collected offline in session 1 without overlap into data samples of length T (the minimum trial length of all trials in the EEG data), and performs sliding window processing on each data sample of length T under S different dynamic window scales, correspondingly generating S groups of data sets of different dynamic window scales, and training M random seed models for the data sets under each dynamic window scale. In the online prediction process, based on the M trained random seed models under each scale, a multi-scale dynamic window weighted integration strategy is adopted to make full use of the information of the current online trial. Through the combination of different dynamic window scales, the effective features in the EEG signal can be more comprehensively captured, thereby improving the accuracy and robustness of the prediction results. And it also makes it possible to complete the rapid prediction of the user's identity by only receiving the EEG data packet of the current trial of length T during the online prediction under session 2, without waiting for all the data packets of the trial to be fully transmitted before analysis. In this way, the present invention can realize fast, accurate and robust identity recognition under the shortest possible data length T.

[0033] (2) Preferably, when performing weighted summation on the prediction results at different dynamic window scales, the weight coefficient used can effectively characterize the proportion of effective information contained in the prediction results at each dynamic window scale. By giving a larger weight to the dynamic window scale with higher information content, the effect of multi-scale integration is further optimized, thereby improving the accuracy of the final prediction result.

[0034] (3) Preferably, the deep neural network architecture (brain pattern recognition model) in the present invention is combined with multi-scale temporal convolution to capture the key information features of different time scales in the EEG signal, and further enhances the modeling ability of temporal dependent information through the self-attention mechanism of the Transformer encoder, and finally generates coding features with enhanced expression ability. The network can effectively extract abstract features that are highly related to identity, and can further improve the feature representation ability and recognition accuracy.

[0035] (4) As a preference, during offline training, the cross entropy loss L is used. ce To minimize the empirical error, and introduce the information maximization loss L im The model is encouraged to generate diverse outputs, which improves the generalization and robustness of the model on cross-session data.

[0036] (5) Furthermore, during offline training, an exponential learning rate decay strategy is used to optimize the training process. After the training reaches a preset number of training rounds, adversarial samples are introduced for training to improve the robustness and generalization of the model in cross-session scenarios.

[0037] (6) Preferably, before offline training, a variety of data augmentation strategies including trial synthesis, trial aliasing, time reversal, and Gaussian noise are introduced into the training samples to enable the model to have stronger generalization capabilities for data from different sessions.

[0038] (7) Furthermore, when each trial in the EEG data is segmented into non-overlapping lengths T, if the length of the remaining data after segmentation of a trial is less than T, necessary data segments are intercepted from the continuous data before the remaining data of the trial and concatenated with the remaining data to form a complete EEG segment of length T, so as to make full use of the training data of session one and ensure the consistency of data length.

[0039] In summary, the present invention only uses the data of a single session to train a highly adaptable brainprint recognition model. In the offline training stage, the generalization ability and robustness of the model are significantly improved through data enhancement and adversarial training. In the cross-session online prediction process of the EEG signal stream, a multi-scale dynamic window weighted integration strategy is adopted to achieve fast, accurate and robust recognition of the identity of the online EEG signal subject. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a scene diagram of online brainprint recognition in a cross-session scenario in an embodiment of the present invention.

[0041] Figure 2 This is a diagram of the neural network architecture for brainprint recognition based on multi-scale convolution and Transformer encoding layers in an embodiment of the present invention.

[0042] Figure 3 This is a framework diagram of a multi-scale dynamic weighted integrated prediction strategy for online prediction in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0044] Example 1

[0045] like Figure 1-Figure 3 As shown, an embodiment of the present invention provides an online brainprint recognition method for a cross-session scenario, including:

[0046] (1) Dataset construction: For K (K ≥ 2) users in the same batch, collect their EEG data during the session and process the collected EEG data, including:

[0047] Each trial in the EEG data is divided into non-overlapping lengths T to obtain an initial data set consisting of data samples of length T after division. The label of each data sample in the initial data set is the user's number. If the length of the remaining data after division of a trial is less than T, the necessary data fragments are intercepted from the continuous data before the remaining data of the trial and spliced ​​with the remaining data to form a complete EEG fragment of length T, so as to make full use of the training number of session one and ensure the consistency of data length; where T is the minimum trial length of all trials in the EEG data.

[0048] Each data sample of length T is split into S different dynamic window sizes [T1, T2, …, T S ](T j ≤T,j=1,2,…,S), and correspondingly generate S groups of data sets with different dynamic window scales; and divide each group of data sets into a training set and a validation set.

[0049] After data enhancement, the training set is combined with the original training set to form a new training set, and all data in the training set and validation set are bandpass filtered and denoised to obtain an updated data set.

[0050] (2) Offline training: The brainprint recognition model is trained offline based on the updated dataset.

[0051] Specifically, for each set of data sets at a dynamic window scale (the data sets corresponding to each time window length), different random seeds are used for offline training to construct M brainprint recognition models respectively, and the model architectures of all scales are exactly the same.

[0052] As a preferred implementation method, each brain pattern recognition model includes a convolution module, an encoding module and a classification head. The convolution module is used to perform convolutions of different scales on each data sample under the current dynamic window scale to obtain EEG features of different scales; the encoding module is used to encode EEG features of different scales using a Transformer-based self-attention mechanism, capture the long-short temporal dependencies of EEG features for global modeling, and finally generate encoding features with enhanced expression capabilities; the classification head includes multiple layers of fully connected layers, and the encoded features belong to the predicted user identity information after passing through multiple layers of fully connected layers in turn.

[0053] As a preferred implementation method, the exponential decay learning rate strategy is used to train the brain pattern recognition model. When the training reaches a certain round, the AWP (Adversarial Weight Perturbation) adversarial training technology is introduced to further improve the generalization ability of the model. The cross entropy loss and information maximization loss are combined in the loss function to ensure that the empirical error is minimized and promote the diversification of model output. At the same time, the validation set early stopping strategy is applied to avoid model overfitting.

[0054] (3) Online prediction: For the above K users, in session 2, when the length of the received EEG data packet accumulates to T, the user identity prediction is performed using the data packet of the current length T. Specifically, the received EEG data packet of length T is bandpass filtered and then copied to S copies. The S copies of data correspond to S different dynamic window scales [T1, T2, …, T S ](T j≤T,j=1,2,…,S) to obtain S groups of online data under different dynamic window scales; the online data under the same group of dynamic window scales are input into M brainprint recognition models under the corresponding dynamic window scales to predict the user identity, and the M prediction results are averaged and integrated as the prediction results under the current group of dynamic window scales; the prediction results under the S groups of dynamic window scales are weighted summed, and the output of the neural network is normalized by softmax to obtain the final user identity prediction result, thereby realizing online brainprint recognition across session scenarios.

[0055] As a preferred implementation, when weighted summing is performed on the prediction results of the S groups under the dynamic window scale, the weighting coefficient used is the effective information proportion of the prediction results under the dynamic window scale of the group:

[0056]

[0057] In the formula, ω j is the weighted coefficient of the prediction result under the jth group of dynamic window scale, T j is the jth group dynamic window scale, and L is the unit online transmission length of the EEG data packet in session two.

[0058] The above method is further described below with a specific example:

[0059] In the embodiment of the present invention, for the same batch of K users, EEG data of different sessions (session one and session two) are collected within two days, such as Figure 1 As shown in the figure, in Session 1 and Session 2, different colors represent the EEG data of different users. The data of Session 1 is used to train the model offline, while the data of Session 2 is collected online for testing. The length of the data collected for each subject (user) is random, but the following constraints are imposed on the data length in the two sessions: the minimum collection length of all trials is the same, denoted as T, and T represents the signal length containing sufficient information, avoiding being too short or too long. For the online data stream (EEG data collected in Session 2), the data is transmitted in the form of data packets with a length of L (input into the offline trained model).

[0060] (I) Data sliding window:

[0061] First, for all the trials in the EEG data of K users collected in the session, each trial is segmented without overlap using a time window of length T. If the length of the remaining data after segmentation of a trial is less than T, the necessary data fragments are intercepted from the continuous data before the remaining data of the trial, and spliced ​​and combined with the remaining data to form a complete EEG fragment of length T. The segmented trial data is recorded as Where k represents the kth user, k is 1, 2, ..., K, and i represents the i-th trial data of the user. The data shape of each trial is C×T, where C is the number of channels of the EEG signal and T is the trial length after the trial data is segmented. For each trial data Its label y i is set to the number k of the corresponding user.

[0062] For the trial length T, three appropriate dynamic window lengths [T1, T2, T3] (T j ≤T,j=1,2,3), usually take the larger common factor or integer of T as T j , preferably, also ensure that T j It should be an integer multiple of the length of a single data packet L to make full use of the information in each data packet. For example, if T = 3s and L = 0.2s, the dynamic window length can be 1s, 1.6s, 2s, etc. Next, the data of session 1 is copied into three copies and randomly divided into training set and validation set in a ratio of 8:2. Then, according to the dynamic window length T j Perform sliding window processing on the training set and validation set to generate three sets of training set data with different sliding window step sizes. and validation set data

[0063] (II) Data enhancement and filtering:

[0064] For each set of dynamic window training data The data were randomly divided into four groups, and four data enhancement techniques, including trial synthesis, trial aliasing, time reversal and Gaussian noise, were applied to each group of data, and their definitions are as follows:

[0065] Trial synthesis: EEG data from two trials (Trial A and Trial B) from the same user and Randomly generate a random coefficient p in the range of [0.3, 0.7], then the synthesized new sample EEG data X new It can be expressed as follows:

[0066] X new =p*X a +(1-p)*X b

[0067] Trial aliasing: For two trial EEG data from the same user and The front and back halves of the time dimension are swapped to form a new trial, and the formula is as follows:

[0068]

[0069] Among them, X a (:,1:T j / / 2) indicates X a The first half of the sample along the time dimension, X a (:,T j / / 2:T j ) indicates X a The second half of the sample along the time dimension, X b Likewise.

[0070] Time reversal: EEG data X a =[x a (:,1),x a (:,2),...,x a (:,T′-1),x a (:,T′)], where x a (:,T′) represents the signal amplitude vector of all channels of the EEG data at the time T′, and its time-reversed data enhancement is defined as follows:

[0071] X ′ a =[x a (:,T′),x a (:,T′-1),...,x a (:,2),x a (:,1),]

[0072] Gaussian noise: For EEG data X a , the data after Gaussian noise enhancement is:

[0073] X ′ a =X a +rand*std(X a ) / C noise

[0074] Among them, rand is a random number that follows Gaussian distribution, std(X a ) is the original signal (EEG data X a ), C noise It is a hyperparameter and is generally set to 2.

[0075] The enhanced data is mixed with the original training data as the training set. The training set data and the validation set data are subjected to 4-40 Hz bandpass filtering to remove low-frequency and high-frequency noise in the EEG signal to obtain an updated data set.

[0076] 3. Model offline training

[0077] For three time windows of different scales, M random seed models are trained for each time window to obtain the corresponding brain pattern recognition model. The overall framework of the model is shown in the figure Figure 2 As shown. During the model training process, an exponential learning rate decay strategy is adopted, and the initial learning rate lr0 is set to 1e-3. The learning rate lr after decay t It can be expressed as:

[0078] 1. t =lr0*γ t

[0079] Among them, t is the current iteration number, γ is the decay factor (0<γ<1), which controls the decay rate of the learning rate.

[0080] When the training reaches a certain number of rounds, AWP adversarial samples are introduced for adversarial training. The core idea is to apply small adversarial perturbations to the weights during model training, so that the model can learn in a more challenging environment, thereby improving its generalization ability. In this embodiment of the present invention, the Adam optimizer is used for parameter optimization, and the loss function uses the cross entropy loss L ce To minimize the empirical error, and introduce the information maximization loss L im Encourage the model to generate diverse outputs. At the same time, use the validation set early stopping strategy to avoid model overfitting.

[0081] In the embodiment of the present invention, each loss term and the total loss function L total The formula is as follows:

[0082]

[0083] L total =L ce +L im

[0084] In the formula, N represents the number of trials in the current batch, and K represents the number of users; represents the true label of trial i in category c, represents the predicted probability of trial i in category c; represents the predicted probability distribution of category c in the current batch.

[0085] (IV) Online prediction:

[0086] For the online test data stream (the EEG data packet collected online in Session 2), the information transmission rate ITR is a comprehensive indicator to measure the speed and accuracy of the algorithm. Its calculation formula is:

[0087]

[0088] Among them, T is the average trial duration, that is, the data length T after the EEG data is segmented. K is the number of classification categories, that is, the number of test users mentioned above, and P is the recognition accuracy. The unit of ITR is bits / min.

[0089] In order to improve the information transfer rate (ITR) during online prediction, if the current trial is too long, only the data of the currently received length T can be used for testing, ensuring that the model can quickly make predictions with limited data. When the length of the EEG data packet received online accumulates to T, the received EEG data of length T is processed by 4-40Hz bandpass filtering to keep it consistent with the training data. Then, the EEG data of length T after bandpass filtering is copied three times, and the current trial is divided into three groups of data with different dynamic window scales in the form of sliding windows, and input into the M trained random seed models corresponding to different dynamic window scales for prediction.

[0090] The prediction results of the trained models with different random seeds are averaged and integrated, that is, the probability vectors predicted by the M trained random seed models for the current trial are added and averaged as the prediction result of the model under the current dynamic window scale; for the prediction results of the models under different dynamic window scales, the effective information proportion under each scale is used as the weighting coefficient, and the prediction results of the models under the corresponding dynamic window scales are weighted and summed, and after nonlinear mapping, the final prediction result p is obtained. c , to achieve cross-session online brainprint recognition, such as Figure 3 As shown. Among them, the weight coefficient ω j The calculation formula is as follows:

[0091]

[0092] The final predicted probability p c The calculation formula is:

[0093]

[0094] Among them, f i is the current dynamic window size T j The i-th trained random seed model under the probability p c After softmax normalization, the index corresponding to the maximum predicted probability is taken as the predicted user number.

[0095] Adversarial training and multiple data enhancement strategies are introduced in the embodiments of the present invention, which significantly improves the generalization ability of the model and the robustness of cross-session data. Multi-scale convolution and Transformer encoder are combined to extract key identity-related features in the data. A multi-scale dynamic window weighted integration strategy is adopted for online data streams to ensure fast and accurate identity recognition with the shortest possible data length, providing an efficient and practical online brainprint recognition solution.

[0096] Example 2

[0097] An embodiment of the present invention provides an online brainprint recognition system for cross-session scenarios, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above-mentioned embodiment 1 when executing the computer program.

[0098] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The memory may be used to store computer programs and / or modules, and the processor may perform various functions of the electronic device by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory.

[0099] The relevant technical solutions are the same as above and will not be described in detail here.

[0100] Example 3

[0101] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above-mentioned embodiment 1 are implemented.

[0102] Specifically, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0103] The relevant technical solutions are the same as above and will not be described in detail here.

[0104] Example 4

[0105] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is run on a computer, the computer executes the steps of the method in the above-mentioned embodiment 1.

[0106] The relevant technical solutions are the same as above and will not be described in detail here.

[0107] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An online brainprint recognition method for cross-session scenarios, characterized in that: include: Collect the EEG data of K users in a session, split each trial in the EEG data into EEG segments of length T without overlap, and display each segmented EEG segment in S different dynamic window scales [T1, T2, ..., T S ] to perform sliding window processing, and generate S sets of data sets with different dynamic window scales; where K ≥ 2, T is the minimum trial length of all trials in the EEG data; T j ≤T, j = 1, 2, ..., S; Using each set of data sets under dynamic window scale, M different random seed models are trained offline to obtain M brain pattern recognition models; In session 2, the EEG data with a length of T received online are respectively stored in the S different dynamic window scales [T1, T2, ..., T S ] and perform sliding window processing under the dynamic window scale, and input the EEG data of different dynamic window scales after sliding window processing into M brainprint recognition models under the corresponding dynamic window scales for user identity prediction, and average the M prediction results of the same dynamic window scale as the prediction result under the current dynamic window scale; after weighted summation of the prediction results under S different dynamic window scales and then normalization, the user identity prediction result is obtained to realize cross-session online brainprint recognition.

2. The online brainprint recognition method for cross-session scenarios according to claim 1 is characterized in that: When performing weighted summation on the prediction results under S different dynamic window scales, the weighting coefficient used is: In the formula, ω j is the jth dynamic window size T j The weighted coefficient of the prediction result under , L is the unit online transmission length of the EEG data packet under session two.

3. The online brainprint recognition method for cross-session scenarios according to claim 1 or 2, characterized in that: The brain pattern recognition model includes: The convolution module is used to perform multi-scale convolution operations on each data sample under the current dynamic window scale to extract EEG features at different time scales; An encoding module, used to encode the EEG features of different time scales by using a Transformer-based self-attention mechanism to obtain encoded features; A classification head is used to predict the user identity based on the encoded features.

4. The online brainprint recognition method for cross-session scenarios according to claim 3 is characterized in that: The loss function L used in offline training of M different random seed models is total for: L total =L ce +L im Among them, L ce is the cross entropy loss, L im is the information maximization loss, N is the number of trials of the current batch of training samples, is the true label of trial i in category c, is the predicted probability of trial i in category c, is the predicted probability distribution of category c in the current batch.

5. The online brainprint recognition method for cross-session scenarios according to claim 4 is characterized in that: During offline training, an exponential learning rate decay strategy is used to optimize the training process, and after the training reaches the preset number of training rounds, adversarial samples are introduced to further train the model.

6. The online brainprint recognition method for cross-session scenarios according to claim 1 is characterized in that: Before offline training M different random seed models using each set of data sets under the dynamic window scale, the method further includes: performing data enhancement and bandpass filtering on each data sample in the data set; wherein the data enhancement includes trial synthesis, trial aliasing, time reversal or adding Gaussian noise to the data sample; In session 2, the EEG data with a length of T received online are respectively displayed in the S different dynamic window scales [T1, T2, …, T S ] before performing sliding window processing, it also includes: performing bandpass filtering on the EEG data with a length of T.

7. The online brainprint recognition method for cross-session scenarios according to claim 1 is characterized in that: When each trial in the EEG data is divided into non-overlapping lengths according to T, if the length of the remaining data after the division of a trial is less than T, a data segment is cut from the continuous data before the remaining data of the trial, and the cut data segment is spliced ​​with the remaining data to form a EEG segment with a length of T.

8. An online brainprint recognition system for cross-session scenarios, characterized in that: comprising a computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the online brainprint recognition method for cross-session scenarios described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the online brainprint recognition method for cross-session scenarios is implemented as described in any one of claims 1 to 7.

10. A computer program product, characterized in that It includes a computer program, which, when running on a computer, enables the computer to execute the online brainprint recognition method for cross-session scenarios as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electroencephalogram signal recognition method based on Pearson's correlation coefficient and convolutional neural network

    CN114081505A

  • Brain pattern recognition method and device, electronic equipment and storage medium

    CN115712885A

  • Cross-period brain grain recognition method based on multi-scale convolution and graph pooling network

    CN117992728A

  • Emotion cognition recognition method, system and equipment based on electroencephalogram

    CN118885877A

  • Cross-session brainprint recognition method based on tensorized spatial-frequency attention network (TSFAN) with domain adaptation

    US20240282439A1