Neurofeedback training system, method and device based on eeg large model
By using a neurofeedback training system based on a large EEG model, EEG data from multiple target groups are collected and preprocessed to train the target base model, decode multi-dimensional brain state feature vectors, and generate visualization results. This solves the problems of poor adaptability and limited application scenarios of neurofeedback systems, and achieves wider applicability and effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-07
AI Technical Summary
Existing neurofeedback systems' EEG models ignore individual differences among different populations, resulting in poor model adaptability, lack of response from some users, and traditional models can only be used in specific tasks and cannot be transferred to other tasks, thus limiting application scenarios.
A neurofeedback training system based on a large EEG model is adopted. By collecting EEG datasets from multiple target groups and reference data from target users, the system is preprocessed, a target base model is trained, multi-dimensional brain state feature vectors are decoded, and visualization results are generated to guide users to adjust their brain state to achieve the training objectives.
It improves the effectiveness and universality of neurofeedback training, can be adapted to different groups of people and task scenarios, provides comprehensive and quantitative brain state feedback, forms a training closed loop, and improves the effectiveness of training.
Smart Images

Figure CN121306437B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of neurofeedback training, and particularly relates to a neurofeedback training system and method based on an electroencephalogram (EEG) large model and equipment. BACKGROUND
[0002] At present, the EEG model of a neurofeedback system is trained based on EEG data of a single population, and individual differences of different populations are ignored, resulting in poor adaptability of the model to non-training populations, and even some users cannot obtain effective neurofeedback training. In addition, the traditional EEG model is often trained based on EEG activities of a small number of subjects under a specific task, and basic brain function features irrelevant to the specific task are ignored, resulting in the model being only applicable to the specific training task and being unable to be migrated to other tasks, and the application scenario being limited.
[0003] Therefore, how to improve the effectiveness and universality of neurofeedback training needs to be solved urgently. SUMMARY
[0004] The embodiments of the present application provide a neurofeedback training system and method based on an EEG large model and equipment, which improve the effectiveness and universality of neurofeedback training.
[0005] In a first aspect, the embodiments of the present application provide a neurofeedback training system based on an EEG large model, which comprises an EEG acquisition module, a preprocessing module, a model training module, a data analysis module and a visualization module, wherein:
[0006] The EEG acquisition module is configured to acquire a first EEG data set corresponding to a plurality of target populations and reference EEG data of a target user, and each target population corresponds to a type of population.
[0007] The preprocessing module is configured to preprocess the first EEG data set and the reference EEG data respectively to obtain a second EEG data set and target EEG data.
[0008] The model training module is configured to perform model training on a preset reference base model according to the second EEG data set to obtain a target base model, determine a neurofeedback training target of the target user, and determine a target EEG model according to the neurofeedback training target and the target base model.
[0009] The data analysis module is configured to perform brain state decoding on the target EEG data according to the target EEG model to obtain a brain state feature vector, and the brain state feature vector is a multi-dimensional feature vector for quantifying the current brain state of the target user comprehensively.
[0010] The visualization module is configured to generate a visualization result according to the brain state feature vector; and the visualization result is used to guide adjustment of the brain state of the target user to complete the neurofeedback training target.
[0011] In a second aspect, the embodiments of the present application provide a neurofeedback training method based on a large brain electrical model, the method comprising:
[0012] Collecting a first brain electrical data set corresponding to a plurality of target groups, and reference brain electrical data of a target user; each target group corresponds to a type of population;
[0013] Preprocessing the first brain electrical data set and the reference brain electrical data respectively to obtain a second brain electrical data set and target brain electrical data;
[0014] Model training is performed on a preset reference base model according to the second brain electrical data set to obtain a target base model; a neurofeedback training target of the target user is determined; and a target brain electrical model is determined according to the neurofeedback training target and the target base model;
[0015] Brain state decoding is performed on the target brain electrical data according to the target brain electrical model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector, and is used to quantitatively analyze the current brain state of the target user;
[0016] A visualization result is generated according to the brain state feature vector; and the visualization result is used to guide adjustment of the brain state of the target user to complete the neurofeedback training target.
[0017] In a third aspect, the embodiments of the present application provide an electronic device, comprising: a processor, a memory, the memory is configured to store one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the program comprises instructions for executing the steps in the second aspect of the present application.
[0018] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute some or all of the steps described in the second aspect of the present application.
[0019] In a fifth aspect, the embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the second aspect of the embodiments of the present application. The computer program product can be a software installation package.
[0020] It can be seen that the neural feedback training system based on the EEG large model provided in the application first collects EEG data of a multi-target group and a target user, solves the problem of single training data from the source, enables subsequent model training to contact individual differences of different groups of people, avoids poor adaptability of non-training groups and the problem of no response of model training for some users caused by single data, and then pre-processes the EEG data to eliminate the heterogeneity of multi-source data and noise interference. Then, the reference base model is trained based on the second EEG data set, and the target EEG model is determined in combination with the neural feedback training target, which can learn the general EEG features of different groups of people, can adapt to different groups of people and task scenarios, and improves the universality of neural feedback training. Next, the multi-dimensional brain state feature vector is obtained through decoding to comprehensively quantify the brain state and avoid one-sidedness of a single index. Finally, the visual result is generated to guide the user to adjust, the abstract brain state data is converted into intuitive feedback, a training closed loop is formed, and the effectiveness of neural feedback training is improved. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the application or the background art, the drawings needed to be used in the embodiments of the application or the background art will be described below.
[0022] Figure 1 is an application scenario diagram of a neural feedback training system based on an EEG large model provided by an embodiment of the application;
[0023] Figure 2 is a module composition block diagram of a neural feedback training system based on an EEG large model provided by an embodiment of the application;
[0024] Figure 3 is a structural schematic diagram of a target base model provided by an embodiment of the application;
[0025] Figure 4 is a structural schematic diagram of a target EEG model provided by an embodiment of the application;
[0026] Figure 5 is a flowchart of a generation method of a visual result provided by an embodiment of the application;
[0027] Figure 6 is a schematic diagram of a visual result provided by an embodiment of the application;
[0028] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the application;
[0029] Figure 8 is a flowchart of a neural feedback training method based on an EEG large model provided by an embodiment of the application. DETAILED DESCRIPTION
[0030] In order to make the personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the person skilled in the art without creative labor fall within the scope of protection of the present application.
[0031] The terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish different objects, not to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.
[0032] It should be understood that the term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper represents that the front and rear associated objects are a "or" relationship. "Multiple" in the embodiments of the present application means two or more.
[0033] The "at least one" or similar expressions in the embodiments of the present application means any combination of these items, including any combination of single item or multiple items, means one or more, and multiple means two or more. For example, at least one of a, b or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b and c. Wherein, each of a, b and c can be an element or a set containing one or more elements.
[0034] The "connection" appearing in the embodiments of the present application means direct connection or indirect connection and various connection modes to realize communication between devices, which is not limited by the embodiments of the present application.
[0035] In this paper, the reference to "embodiments" means that the specific features, structures or characteristics described in combination with the embodiments can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. The person skilled in the art explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.
[0036] First, the related terms involved in this application are explained as follows:
[0037] Neurofeedback training: refers to a training method based on brain-computer interface technology, which collects the electroencephalogram signals of the user, decodes and analyzes the real-time brain electrical activity, and presents the obtained electroencephalogram indicators to the user in a visual form, so that the user can actively adjust his own neural activity accordingly, thereby achieving the purpose of improving brain function, treating mental illness or enhancing cognitive ability. For example, for patients with attention deficit disorder, the training system collects their electroencephalogram signals, decodes indicators such as attention level, and feeds back to the patient through visual methods such as color changes of the 3D Earth. The patient adjusts his own state according to the feedback and gradually improves his attention.
[0038] Large brain model: refers to a class of neural network electroencephalogram decoding models inspired by language large models, characterized by large data scale and large model parameters. It can rely on the generalization ability and emergence ability of large models to capture the electroencephalogram signal rules that traditional electroencephalogram models cannot fit, making it have generalization across subject groups, across electroencephalogram devices, and across data sets. When applied to a neurofeedback training system, it can effectively reduce the training threshold and improve the accuracy of brain state decoding, and is compatible with different electroencephalogram acquisition devices, adapting to training needs in multiple scenarios such as homes and rehabilitation institutions.
[0039] Independent component analysis (ICA) algorithm: refers to a blind source separation technology used to separate statistically independent signal components from multivariate data, with the core goal of restoring the original independent source signal from the mixed signal under the condition that the source signal is unknown and the mixing process is unknown.
[0040] Multi-layer perceptron (MLP) subnetwork: refers to a feedforward neural network composed of multiple layers of neurons, which is one of the most basic deep learning models. Its core function is to fit the complex mapping relationship between input and output through multiple layers of nonlinear transformation.
[0041] Cross-entropy loss: refers to a class of loss functions used for classification tasks, which quantifies the difference between the model's predicted probability distribution and the true label distribution. It is widely used in binary classification and multi-classification scenarios.
[0042] Mean squared error (MSE) loss: refers to one of the most commonly used loss functions in regression tasks, which calculates the square average of the difference between the model's predicted value and the true value to quantify the deviation between the two, and penalizes samples with larger deviations more significantly.
[0043] Mean Absolute Error (MAE) loss: refers to a commonly used regression task loss function, the core function is to quantify the average absolute deviation between the model prediction value and the true value, the calculation logic is simple and robust to outliers.
[0044] At present, the electroencephalogram model of the neurofeedback system is trained based on the electroencephalogram data of a single population, ignoring the individual differences of different populations, resulting in poor adaptability of the model to non-training populations, and some users even have no response to model training, and cannot obtain effective neurofeedback training. In addition, the traditional electroencephalogram model is often trained based on the electroencephalogram activity of a small number of subjects under a specific task, ignoring the basic brain function characteristics unrelated to the specific task, resulting in a model that can only be used in the specific training task and cannot be transferred to other tasks, limiting the application scenarios. Therefore, how to improve the effectiveness and universality of neurofeedback training needs to be solved.
[0045] To solve the above problems, the embodiment of the present application provides a neurofeedback training system, method and equipment based on electroencephalogram large model, which comprises an electroencephalogram acquisition module, a preprocessing module, a model training module, a data analysis module and a visualization module. The electroencephalogram acquisition module is used to acquire a first electroencephalogram data set corresponding to a plurality of target groups and reference electroencephalogram data of a target user. Each target group corresponds to a type of population. The preprocessing module is used to preprocess the first electroencephalogram data set and the reference electroencephalogram data respectively to obtain a second electroencephalogram data set and target electroencephalogram data. The model training module is used to train a preset reference base model according to the second electroencephalogram data set to obtain a target base model. The neurofeedback training target of the target user is determined. The target electroencephalogram model is determined according to the neurofeedback training target and the target base model. The data analysis module is used to decode the brain state of the target electroencephalogram data according to the target electroencephalogram model to obtain a brain state feature vector. The brain state feature vector is a multi-dimensional feature vector for quantifying the current brain state of the target user. The visualization module is used to generate a visualization result according to the brain state feature vector. The visualization result is used to guide the adjustment of the brain state of the target user to complete the neurofeedback training target. It can be seen that the use of the system improves the effectiveness and universality of neurofeedback training.
[0046] For ease of understanding, please refer to Figure 1 , Figure 1This is an application scenario diagram of a neurofeedback training system based on a large EEG model provided in this application embodiment. The target user is an individual participating in neurofeedback training, such as a patient with attention deficit disorder or an anxious person. The reference EEG data (such as multi-channel EEG waveforms) generated by the target user during training is transmitted to the neurofeedback training system based on the large EEG model as the raw data input for the system to analyze brain state. After receiving the reference EEG data, the neurofeedback training system based on the large EEG model analyzes the EEG data through a pre-trained and fine-tuned large EEG model, decodes multi-dimensional brain state feature vectors (such as attention level, workload, etc.), and then transforms the brain state feature vectors into intuitive visualization results. The visualization results are visual feedback generated by the system (such as changes in the color, size, and rotation speed of a 3D Earth) to help the target user intuitively understand their current brain state and actively adjust their state based on the feedback (such as concentrating attention or adjusting emotions), thereby completing the neurofeedback training.
[0047] For easier understanding, please refer to Figure 2 , Figure 2 This is a block diagram of the modules of a neurofeedback training system based on a large EEG model provided in this application embodiment. The system includes: an EEG acquisition module, a preprocessing module, a model training module, a data analysis module, and a visualization module, wherein:
[0048] The EEG acquisition module is used to acquire first EEG datasets corresponding to multiple target groups, as well as reference EEG data of target users; each target group corresponds to a type of population.
[0049] In this embodiment of the application, when collecting the first EEG dataset corresponding to multiple target groups, the target groups can be classified according to their core characteristics (such as age, physiological state, and task requirements). For example:
[0050] Divided by age: Youth (12-18 years old), Adults (19-59 years old), and Seniors (60 years old and above);
[0051] Based on physiological state: healthy people, people with attention deficit hyperactivity disorder, and people with insomnia;
[0052] Based on training scenarios: students focusing on learning attention, stress management, and athletes focusing on concentration training.
[0053] It should be noted that each target group corresponds to a group of people with similar EEG baseline characteristics or training needs, and the sample size of each target group is not less than the preset sample size threshold (e.g., at least 50 subjects are collected for each group) to avoid insufficient representativeness of group characteristics due to insufficient sample size, and finally form the first EEG dataset that covers multiple groups of people and has a standardized structure.
[0054] When collecting reference EEG data from target users, the system can combine this data with subsequent neurofeedback training goals (such as improving attention or sleep quality) to specifically collect relevant EEG segments from the user, thus obtaining reference EEG data. For example, if the training goal is "improving attention," task-state EEG data and resting-state EEG data can be collected when the target user completes an attention task. During the collection process, the system can also record the target user's basic individual information (such as age, neurofeedback training goals, and whether there is a history of related diseases) and simultaneously label the EEG data with corresponding state tags (such as "task-state - focused attention" and "resting-state - relaxed"), so that the reference EEG data can not only reflect the target user's individual EEG characteristics but also be strongly correlated with the neurofeedback training goals.
[0055] In this way, by collecting the first EEG datasets corresponding to multiple target groups and the reference EEG data of the target users through the EEG acquisition module, the breadth of EEG data coverage and the accuracy of individual adaptation can be ensured.
[0056] The preprocessing module is used to preprocess the first EEG dataset and the reference EEG data respectively to obtain the second EEG dataset and the target EEG data.
[0057] In this embodiment, the first EEG dataset includes multiple EEG data subsets, each corresponding to a target population. Since the collected EEG data comes from different EEG data subsets, the original parameters (such as sampling rate and number of channels) of each EEG data subset can be read first, and then the EEG data of all EEG data subsets and the reference EEG data can be aligned to a preset uniform sampling rate (such as 250Hz) through a resampling algorithm to ensure the consistency of all EEG data in the time dimension and avoid feature misalignment caused by sampling rate differences.
[0058] Then, the ICA algorithm is used to separate independent components such as electrooculography (e.g., blinking signals), electromyography (e.g., facial muscle contraction signals), and power frequency interference (e.g., 50Hz power grid noise) from the first EEG dataset and the reference EEG data. Based on the waveform characteristics of the components (e.g., periodic spikes of the electrooculography component) and energy threshold, artifact components are automatically identified and removed, retaining pure and effective EEG signals and avoiding noise interference with model training and decoding accuracy.
[0059] Finally, spherical interpolation was used to reconstruct features from subsets of EEG data with different channel configurations and from the reference EEG data, generating standardized features in an "N×C" format (N being the number of time slices in a single dataset, and C being the number of channels after standardization, such as 32 channels), ensuring that the number of channels in all EEG data remained consistent. Simultaneously, Z-score standardization (mean 0, standard deviation 1) was applied to all EEG data to eliminate the influence of differences in EEG signal amplitude between different groups / individuals, ultimately resulting in a second EEG dataset with a unified structure and regular features, along with the target EEG data.
[0060] In this way, by eliminating data interference and unifying data standards, we can ensure the validity of data from multiple groups, improve the generalization ability of the target base model, and ensure the accuracy of individual data to support personalized decoding of the target EEG model.
[0061] The model training module is used to train a preset reference pedestal model based on the second EEG dataset to obtain a target pedestal model; determine the neurofeedback training target for the target user; and determine the target EEG model based on the neurofeedback training target and the target pedestal model.
[0062] Optionally, in the step of training a preset reference pedestal model based on the second EEG dataset to obtain a target pedestal model, the model training module is specifically used to perform the following steps:
[0063] A1. Divide the second EEG dataset into multiple batches according to a preset batch size;
[0064] A2. Iteratively update the reference base model based on the multiple batches of data until the iteratively updated reference base model meets the preset conditions, then stop the iterative update and obtain the target base model.
[0065] In this embodiment of the application, the preset batch size can be set to 32, 64 or 128 samples / batch, and the preset condition can be set to the loss value of the reference base model after iteration not decreasing for three consecutive iterations (i.e. fluctuation less than 0.001) and the loss value being lower than the preset benchmark (e.g. 0.2). No specific limitation is made here.
[0066] In a specific embodiment, samples from each target group in the second EEG dataset can first be mixed according to a preset ratio. Then, a random shuffling algorithm is used to break the group sequence associations in the data, preventing the model from preferentially learning the characteristics of a particular group. Next, stratified sampling is performed according to a preset batch size to ensure that each batch of data contains samples from each target group (e.g., 30% of the samples are from adolescents and 20% are from patients with attention deficit hyperactivity disorder in each batch), and that the data distribution across batches is consistent, avoiding model parameter update bias due to group imbalance in a single batch. It should be noted that 10%-20% of the batch data can also be used as a validation set for model performance evaluation in subsequent iterations, with the remainder used as a training set for parameter updates.
[0067] Next, in each training round, batches of training data are sequentially input into the reference base model. For each batch of data input, the model loss (e.g., using cross-entropy loss or MSE loss) is calculated via backpropagation, and the parameters are updated. After each training round, the cross-population decoding accuracy (e.g., the accuracy of brain state classification for different target groups) and loss value of the reference base model are calculated using the validation set, and performance changes are recorded. Iterative updates stop when the iteratively updated reference base model meets preset conditions, and the current reference base model is designated as the target base model.
[0068] In this way, through reasonable batch division and iterative updates, we can avoid model bias caused by uneven batch division, ensure that the target base model fully learns the common features of multiple groups, and at the same time take into account the adaptation accuracy for each group.
[0069] Optionally, in determining the target EEG model based on the neurofeedback training objective and the target pedestal model, the model training module is specifically configured to perform the following steps:
[0070] B1. Determine m proxy tasks corresponding to the neurofeedback training target; the m proxy tasks include one target proxy task and n covariant proxy tasks; m is a positive integer, n is a natural number, and m = n + 1;
[0071] B2. Determine the target state decoding sub-network corresponding to the target agent task;
[0072] B3. Determine the n covariant state decoding sub-networks corresponding to the n covariant proxy tasks;
[0073] B4. Obtain the feature extraction subnetwork and feature fusion subnetwork in the target base model;
[0074] B5. Determine a reference EEG model based on the feature extraction subnetwork, the feature fusion subnetwork, the target state decoding subnetwork, and the n covariant state decoding subnetworks;
[0075] B6. Fine-tune the reference EEG model based on the reference EEG data to obtain the target EEG model; the reference EEG data is the EEG data corresponding to the neurofeedback training target in the second EEG dataset.
[0076] In this embodiment, the target agent task refers to the core objective directly corresponding to the neurofeedback training and is the core direction of model optimization. If the neurofeedback training is to "improve reading focus," then the target agent task is "focus level classification" (e.g., discrete labels: high focus / medium focus / low focus / distraction); if the training objective is to "alleviate anxiety," then the target agent task is "anxiety level regression" (e.g., continuous values: anxiety scores from 0-100), without specific limitations. The covariant agent task refers to a brain function or behavioral state task strongly correlated with the target agent task, used to supplement the influencing factors of the core objective. For example, in the "improve reading focus" scenario, the covariant agent task can be set as "visual fatigue regression" (the correlation between focus and fatigue) or "task interest classification" (the influence of interest on focus), where n=2 and m=3.
[0077] In a specific embodiment, based on the core requirements of the neurofeedback training objective and the associated brain functional state, m corresponding proxy tasks can be decomposed, namely one target proxy task and n covariant proxy tasks. For example, for attention deficit disorder, the corresponding neurofeedback training objective is "improving attention," then the target proxy task could be "attention level classification" (e.g., high / medium / low attention), and the n covariant proxy tasks are "workload regression" (quantifying the patient's current cognitive workload intensity, reflecting the correlation between attention and task difficulty) and "symptom-behavioral index regression" (quantifying the severity of the patient's attention deficit-related behavioral tendencies (e.g., impulsivity, poor persistence). It should be noted that each proxy task corresponds to an MLP subnetwork.
[0078] Next, the MLP subnetwork corresponding to the target proxy task is identified as the target state decoding subnetwork, which focuses on decoding brain states strongly correlated with the core training objective. Then, the n MLP subnetworks corresponding to the n covariant proxy tasks are identified as n covariant state decoding subnetworks, which are used to decode brain functional or behavioral states associated with the core objective. Then, the pre-trained feature extraction and feature fusion subnetworks from the target base model are obtained, ensuring the model retains its cross-population general feature learning capability without needing to be trained from scratch. Finally, the target state decoding subnetwork and the n covariant state decoding subnetworks are used as proxy task subnetworks and connected to the output of the feature fusion subnetwork to form a reference EEG model.
[0079] Finally, EEG data highly relevant to the current neurofeedback training goal are selected from the second EEG dataset. For example, if the neurofeedback training goal is to "improve the sustained attention of patients with attention deficit disorder," then the reference EEG data should be "EEG data of the attention deficit disorder group in sustained tasks (such as continuous counting)" from the second EEG dataset, and should include labels such as attention state and workload under that task, without specific limitations. Then, the reference EEG model is fine-tuned based on the reference EEG data to enhance the reference EEG model's learning of features relevant to the neurofeedback training goal, thus obtaining the target EEG model.
[0080] In this way, by decomposing the training target into multiple agent tasks, customizing corresponding decoding sub-networks, reusing the core sub-networks of the base model to assemble a reference EEG model, and then using training target-related data to fine-tune the model, the target EEG model is finally obtained. This allows the target EEG model to accurately focus on training needs, comprehensively analyze brain states, and take into account adaptation efficiency.
[0081] For easier understanding, please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a target base model provided in an embodiment of this application. The target base model includes a feature extraction subnetwork, a feature fusion subnetwork, a mask reconstruction subnetwork, and a contrast discrimination subnetwork. The feature extraction subnetwork is used to extract multi-dimensional basic features such as time domain, frequency domain, and spatial domain from the original EEG data. The feature fusion subnetwork is used to weight and integrate the extracted multi-dimensional features to generate a highly recognizable brain state code. The mask reconstruction subnetwork can complete the masked EEG signal segments based on the brain state code and learn the global correlation rules of EEG signals. The contrast discrimination subnetwork can enhance the model's ability to discriminate EEG features and reduce overfitting by comparing different enhanced samples of the same sample.
[0082] Optionally, in the process of fine-tuning the reference EEG model to obtain the target EEG model, the model training module is specifically used to perform the following steps:
[0083] C1. The reference EEG data is processed through the feature extraction subnetwork and the feature fusion subnetwork in the reference EEG model to obtain a reference brain state code;
[0084] C2. The reference brain state encoding is processed by the target state decoding subnetwork and the n covariant state decoding subnetworks in the reference EEG model to obtain the target decoding result and the n covariant decoding results;
[0085] C3. Determine the first loss function and the first weight corresponding to the target proxy task;
[0086] C4. Determine the n second loss functions and n second weights corresponding to the n covariant proxy tasks;
[0087] C5. Calculate the target decoding result based on the first loss function to obtain the first loss value;
[0088] C6. Calculate the n covariant decoding results based on the n second loss functions to obtain n second loss values;
[0089] C7. The total loss value is obtained by weighting the first weight, the first loss value, the n second weights, and the n second loss values.
[0090] C8. Based on the total loss value, the reference EEG model is fine-tuned through backpropagation to obtain the target EEG model.
[0091] In this embodiment, the feature extraction subnetwork is used to extract basic and general EEG features from EEG data. Through structures such as convolutional layers and pooling layers, it captures basic features such as temporal, frequency, and spatial features of EEG signals. The feature fusion subnetwork is used to integrate and optimize the basic features output by the feature extraction subnetwork. Through structures such as attention mechanisms, it strengthens key features related to the current task, suppresses irrelevant interference features, and finally outputs a reference brain state code.
[0092] In a specific embodiment, features can first be extracted from the reference EEG data using a feature extraction subnetwork in the reference EEG model, outputting multiple basic features. Then, a feature fusion subnetwork fuses these basic features, outputting a reference brain state code. Next, the reference brain state code is processed by a target state decoding subnetwork in the reference EEG model, outputting a target decoding result. Finally, the reference brain state code is processed by n covariant state decoding subnetworks, outputting n covariant decoding results, each corresponding to one covariant state decoding subnetwork.
[0093] Next, select the corresponding first loss function based on the task type of the target proxy task. For example, if the target proxy task is "attention level classification," the first loss function is set to cross-entropy loss, which measures the difference between the predicted probability and the true label. Then, set the first weight according to the task importance of the target proxy task. For example, the first weight can be set to 0.6 to ensure that the model prioritizes optimizing the core training objective; no specific limitation is made here. Then, select n corresponding second loss functions based on the task types of the n covariant proxy tasks. For example, if the covariant proxy task is "workload regression," the second loss function is MSE loss, which measures the squared difference between the predicted score and the actual workload; if the covariant proxy task is "symptom behavior index regression," the second loss function is MAE loss, which measures the mean absolute difference between the predicted value and the true value. Then, set n corresponding second weights according to the task importance of the n covariant proxy tasks. For example, if the total weight of the n second weights is 0.4 and n is 2, each second weight can be set to 0.2, or one second weight can be set to 0.1 and another to 0.3; no specific limitation is made here.
[0094] Then, the target decoding result and the true labels from the reference EEG data are substituted into the first loss function for calculation to obtain the first loss value. Next, the n covariant decoding results and their corresponding true labels are substituted into their respective second loss functions for calculation to obtain n error values. A weighted average is then calculated based on the first weight, the first loss value, the n second weights, and the n second loss values to obtain the total loss value. Finally, using the total loss value as the optimization objective, the parameters of the reference EEG model are adjusted through the backpropagation algorithm to obtain the target EEG model.
[0095] In this way, by fine-tuning the model, the decoding accuracy of the core training objective is ensured, while the collaborative learning of related factors is also taken into account. The resulting target EEG model can accurately adapt to the needs of neurofeedback training and provide reliable brain state decoding results for real-time feedback.
[0096] For easier understanding, please refer to Figure 4 , Figure 4This is a schematic diagram of the structure of a target EEG model provided in an embodiment of this application. The target EEG model includes a feature extraction subnetwork, a feature fusion subnetwork, a target state decoding subnetwork, and n covariant state decoding subnetworks. The target state decoding subnetwork can decode the core objectives of neurofeedback training (such as attention level and sleep stage) and output the quantitative results of the core dimensions. The n covariant state decoding subnetworks can decode related dimensions (such as workload, symptom score, and EEG stability) associated with the core objectives, supplementing the analysis of influencing factors of the core objectives. It should be noted that this target EEG model is a large-scale EEG model. Relying on the generalization and emergence capabilities of large models, it can capture EEG signal patterns that are difficult for traditional EEG models to fit. It not only possesses strong generalization across subject groups, EEG devices, and datasets, but also can identify subtle EEG features ignored by traditional EEG models.
[0097] Optionally, the reference base model includes the feature extraction subnetwork, the feature fusion subnetwork, the mask reconstruction subnetwork, and the contrast discrimination subnetwork;
[0098] In terms of iteratively updating the reference pedestal model based on the multiple batches of data, the model training module is specifically configured to perform the following steps:
[0099] D1. Perform a random masking operation on a preset proportion of data in the first batch of data to obtain masked sample data; the first batch of data is any one of the multiple batches of data.
[0100] D2. The masked sample data is processed through the feature extraction subnetwork and the feature fusion subnetwork to obtain the first brain state code;
[0101] D3. The first brain state encoding is processed through the mask reconstruction sub-network to obtain the first output result;
[0102] D4. Perform the first data augmentation operation and the second data augmentation operation on the first batch of data respectively to obtain the first augmented sample data and the second augmented sample data;
[0103] D5. The first enhanced sample data and the second enhanced sample data are processed by the feature extraction subnetwork and the feature fusion subnetwork respectively to obtain the second brain state code and the third brain state code.
[0104] D6. The second brain state code and the third brain state code are processed through the comparison and discrimination sub-network to obtain the second output result;
[0105] D7. Update the reference base model based on the first output result and the second output result.
[0106] In this embodiment of the application, the preset ratio can be set to 20% or 30%, and no specific limitation is made here.
[0107] In a specific embodiment, a preset proportion (e.g., 30%) of samples can be randomly selected from the first batch of data, and some EEG channels or time segments can be randomly masked (e.g., the signal is set to zero) to obtain masked sample data. The first batch of data can be any one of multiple batches. Then, the masked sample data is processed by a feature extraction subnetwork and a feature fusion subnetwork to obtain a first brain state code. Next, a mask reconstruction subnetwork predicts the masked original EEG signal segments based on the first brain state code, and outputs the first output result, i.e., the reconstructed complete EEG data.
[0108] Then, two different data augmentation operations (such as slight temporal offset and channel noise perturbation) are performed on the first batch of data to generate first and second augmented sample data. The first and second augmented sample data are then processed by a feature extraction subnetwork and a feature fusion subnetwork, respectively, to obtain second and third brain state codes. Next, a comparison and discriminant subnetwork calculates the similarity between the second and third brain state codes, outputting a second output set, which represents the similarity value between the two.
[0109] Finally, the mask reconstruction loss is calculated based on the first output and the original unmasked first batch of data, enabling the model to learn the global correlation patterns of EEG signals. Then, the contrastive learning loss is calculated based on the second output and the preset target similarity value, improving the model's adaptability to complex EEG data in real-world environments and reducing overfitting on training data and poor generalization to real data. The mask reconstruction loss and contrastive learning loss are weighted and summed to obtain the total loss. Finally, the parameters of all sub-networks of the reference pedestal model are updated through backpropagation based on the total loss, enabling the reference pedestal model to learn more robust and generalized EEG features.
[0110] Thus, through dual-task training of mask reconstruction and contrastive learning, the feature extraction subnetwork and feature fusion subnetwork of the reference base model can capture both the global distribution pattern of EEG signals and focus on the common essential features of EEG signals, providing a high-quality general feature foundation for subsequent personalized fine-tuning.
[0111] Optionally, the feature extraction subnetwork includes a time-domain feature extraction subnetwork, a frequency-domain feature extraction subnetwork, and a spatial-domain feature extraction subnetwork;
[0112] In processing the masked sample data through the feature extraction subnetwork and the feature fusion subnetwork to obtain the first brain state code, the model training module is specifically used to perform the following steps:
[0113] E1. The shielded sample data is subjected to feature extraction through the time-domain feature extraction subnetwork, the frequency-domain feature extraction subnetwork and the spatial-domain feature extraction subnetwork, respectively, to obtain a time-domain feature map, a frequency-domain feature map and a spatial-domain feature map;
[0114] E2. The time-domain feature map, the frequency-domain feature map, and the spatial-domain feature map are fused through the feature fusion sub-network to obtain the first brain state code.
[0115] In this embodiment, the feature extraction subnetwork includes, but is not limited to, a time-domain feature extraction subnetwork, a frequency-domain feature extraction subnetwork, and a spatial-domain feature extraction subnetwork, and is not specifically limited here.
[0116] In a specific embodiment, firstly, features are extracted from the masked sample data using a time-domain feature extraction subnetwork, a frequency-domain feature extraction subnetwork, and a spatial-domain feature extraction subnetwork, respectively, to obtain time-domain feature maps, frequency-domain feature maps, and spatial-domain feature maps. Then, a feature fusion subnetwork is used to fuse the time-domain feature maps, frequency-domain feature maps, and spatial-domain feature maps to obtain the first brain state code.
[0117] In this way, by extracting the dimensional features of EEG data in the time, frequency, and spatial domains, the one-sidedness of single-dimensional features is avoided. Then, task-related features are strengthened through adaptive weights, and finally, the first brain state code is generated to comprehensively reflect the essential laws of EEG signals. This provides a high-quality feature foundation for subsequent mask reconstruction and comparative learning, and further improves the robustness and universality of the reference base model.
[0118] The data analysis module is used to decode the target EEG data according to the target EEG model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector used to comprehensively quantify the current brain state of the target user.
[0119] In this embodiment of the application, the target EEG data is input into the target EEG model, and the target EEG model performs feature extraction, feature fusion and multi-dimensional decoding on the EEG data to output a brain state feature vector.
[0120] The visualization module is used to generate visualization results based on the brain state feature vector; the visualization results are used to guide and adjust the brain state of the target user to achieve the neurofeedback training objective.
[0121] Optional, please refer to Figure 5 , Figure 5This is a flowchart illustrating a method for generating visualization results according to an embodiment of this application. The brain state feature vector includes multiple dimensional features. Specifically, in generating visualization results based on the brain state feature vector, the visualization module is used to execute... Figure 5 The steps shown are as follows:
[0122] F1. Based on the preset mapping relationship between dimensional features and visualization parameters, determine the multiple visualization parameters corresponding to the multiple dimensional features;
[0123] F2. Determine multiple target threshold intervals based on the neural feedback training objectives; each target threshold interval corresponds to a visualization parameter.
[0124] F3. When all of the multiple visualization parameters are within the multiple target threshold ranges, multiple compliance indicators corresponding to the multiple visualization parameters are generated.
[0125] F4. Generate the visualization result based on the multiple visualization parameters and the multiple compliance indicators;
[0126] F5. When at least one of the multiple visualization parameters is not within its corresponding target threshold range, at least one guidance identifier corresponding to the at least one visualization parameter is generated.
[0127] F6. Generate the visualization result based on the plurality of visualization parameters and the at least one guide identifier.
[0128] In this embodiment of the application, the brain state feature vector includes multiple dimensional features. For example, if the goal of neurofeedback training is to "improve attention", then the multiple dimensional features include, but are not limited to, "attention level", "workload score" and "symptom score", which are not specifically limited here.
[0129] In a specific embodiment, multiple visualization parameters corresponding to multiple dimensional features can be determined based on a preset mapping relationship between dimensional features and visualization parameters. The dimensional features can be attention level, workload, or symptom score, and the corresponding visualization parameters can be color, size, or rotation speed, without specific limitations. For example, the visualization result can be a 3D rotating Earth. If the dimensional feature is "attention level (0-100 points)," it can be mapped to "Earth's color" (0-49 points for red, 50-79 points for yellow, and 80-100 points for green); if the dimensional feature is "workload (0-100 points)," it can be mapped to "Earth's size" (0-39 points for a small Earth, 40-69 points for a medium-sized Earth, and 70-100 points for a large Earth); if the dimensional feature is "symptom score (0-100 points)," it can be mapped to "Earth's rotation speed" (0-49 points for low rotation speed, 50-79 points for medium rotation speed, and 80-100 points for high rotation speed), without specific limitations.
[0130] Then, based on the neurofeedback training objectives, target threshold ranges are set for each visualization parameter, resulting in multiple target threshold ranges, each corresponding to a visualization parameter. Next, when multiple visualization parameters fall within the multiple target threshold ranges, multiple achievement indicators are generated for each visualization parameter. These achievement indicators include, but are not limited to, checkmarks, text prompts, and dynamic halos; specific limitations are not specified here.
[0131] Then, a visualization result is generated based on multiple visualization parameters and multiple achievement indicators. This visualization result includes, but is not limited to, a 3D rotating Earth and text labels with multi-dimensional features; no specific limitations are made here. For example, a checkmark is generated next to the text labels for "Attention Level," "Workload," and "Symptom Score" to convey a positive feedback signal of "No adjustment needed, maintain as before." When at least one of the multiple visualization parameters is not within its corresponding target threshold range, at least one guiding indicator is generated for at least one visualization parameter. The visualization result is generated based on multiple visualization parameters and at least one guiding indicator. For example, for a yellow Earth (i.e., attention level not meeting the standard): a red upward arrow is added next to the text label for "Attention Level," with the note "Please stare at the center of the Earth and try to concentrate your thoughts"; for a moderately rotating Earth (i.e., symptom score not meeting the standard): an orange downward arrow is added next to the text label for "Symptom Score," with the note "Take slow, deep breaths and calm yourself down."
[0132] In this way, by converting brain state feature vectors into visual results, we can not only clearly show the overall picture of the current brain state, but also accurately convey information such as "whether adjustments are needed" and "how to adjust" through achievement and guidance indicators, so that target users can obtain clear guidance during training and efficiently promote the brain state to move closer to the neurofeedback training goal.
[0133] Please see Figure 6 , Figure 6 This is a schematic diagram of a visualization result provided in an embodiment of this application. The three visual attributes of the 3D rotating Earth—"color," "size," and "rotation speed"—map to different brain state dimensions, such as "color" corresponding to "attention level," "size" corresponding to "workload," and "rotation speed" corresponding to "symptom score." When the visualization parameters of the three dimensions—"attention level," "workload," and "symptom score"—are all within the target threshold range, a checkmark will be displayed on the right, indicating that the current brain state fully meets the neurofeedback training objective, representing positive feedback.
[0134] It should be noted that the neurofeedback training system based on the large EEG model also includes multiple functional modules, including but not limited to: user management module, EEG device management module, EEG file management module, and real-time preprocessing module, which are not specifically limited here. The user management module stores and manages user information (such as basic data and training history) through an SQLite database, enabling user identification and association with training data. The EEG device management module uses the Human Interface Device (HID) protocol or Transmission Control Protocol (TCP) to complete data transmission with the EEG device, ensuring real-time reception of raw EEG signals. The EEG file management module supports real-time reading of raw EEG data and automatically saves unprocessed raw EEG data as BioSemi Data Format (bdf) files, preserving complete EEG records during training for subsequent analysis by researchers. The real-time preprocessing module performs online denoising on real-time EEG data. Since the traditional ICA algorithm is too time-consuming to meet real-time requirements, two alternative algorithms are used: Auto Subspace Reconstruction (ASR): quickly removes sudden noise in EEG (such as electromyography and power frequency interference); and Online Recursive ICA Algorithm (ORICA): achieves near real-time interference separation, balancing denoising effect and processing speed.
[0135] The following is combined Figure 7The electronic devices in the embodiments of this application will be described. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 7 As shown, the electronic device includes one or more processors, a memory, a communication interface, and one or more programs. The processor is connected to the memory and the communication interface via an internal communication bus.
[0136] The processor can be used for:
[0137] Collect first EEG datasets corresponding to multiple target groups, as well as reference EEG data of target users; each target group corresponds to a type of population;
[0138] The first EEG dataset and the reference EEG dataset are preprocessed respectively to obtain the second EEG dataset and the target EEG dataset;
[0139] The target base model is obtained by training a preset reference base model based on the second EEG dataset; the neurofeedback training target of the target user is determined; and the target EEG model is determined based on the neurofeedback training target and the target base model.
[0140] The target EEG data is decoded according to the target EEG model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector used to comprehensively quantify the current brain state of the target user;
[0141] A visualization result is generated based on the brain state feature vector; the visualization result is used to guide and adjust the brain state of the target user to achieve the neurofeedback training objective.
[0142] The one or more programs are stored in the aforementioned memory and configured to be executed by the aforementioned processor, and the one or more programs include instructions for performing any of the steps in the above embodiments.
[0143] The processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, cells, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit can be a communication interface, transceiver, transceiver circuit, etc., and the storage unit can be a memory.
[0144] The memory can be volatile or non-volatile, or a combination of both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0145] It is understood that the electronic device may include more or fewer structural elements than those shown in the block diagram above, such as a power module, physical buttons, a Wi-Fi module, a speaker, a Bluetooth module, sensors, a display module, etc., without limitation. It is understood that the electronic device may incorporate elements such as... Figure 2 The aforementioned functional modules.
[0146] After understanding the software and hardware architecture of this application, the following will be combined with... Figure 8 This application describes a neurofeedback training method based on a large EEG model. Figure 8 This is a flowchart illustrating a neurofeedback training method based on a large EEG model provided in an embodiment of this application, specifically including the following steps:
[0147] S1. Collect the first EEG datasets corresponding to multiple target groups, as well as the reference EEG data of the target users; each target group corresponds to a type of population;
[0148] S2. Preprocess the first EEG dataset and the reference EEG data respectively to obtain the second EEG dataset and the target EEG data;
[0149] S3. Train the preset reference base model based on the second EEG dataset to obtain the target base model; determine the neurofeedback training target for the target user; determine the target EEG model based on the neurofeedback training target and the target base model;
[0150] S4. Decode the target EEG data according to the target EEG model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector used to comprehensively quantify the current brain state of the target user.
[0151] S5. Generate visualization results based on the brain state feature vector; the visualization results are used to guide and adjust the brain state of the target user to achieve the neurofeedback training objective.
[0152] It is evident that by collecting EEG data from multiple target groups and target users, the problem of limited training data is addressed at its source. This allows subsequent model training to be exposed to individual differences across different populations, avoiding poor adaptability to non-training populations and unresponsiveness in some users due to limited data. Furthermore, preprocessing the EEG data eliminates heterogeneity and noise interference from multiple data sources. Then, a reference base model is trained based on a second EEG dataset, and the target EEG model is determined by combining this with the neurofeedback training objective. This allows the model to learn universal EEG characteristics across different populations, making it adaptable to various populations and task scenarios, thus improving the universality of neurofeedback training. Next, multi-dimensional brain state feature vectors are obtained through decoding to comprehensively quantify brain states, avoiding the limitations of single indicators. Finally, visual results are generated to guide user adjustments, transforming abstract brain state data into intuitive feedback, forming a training loop, thereby improving the effectiveness of neurofeedback training.
[0153] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of the neurofeedback training method based on a large EEG model as described in the above embodiments, wherein the computer includes an electronic device.
[0154] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of the neurofeedback training method based on a large EEG model as described in the above embodiments. The computer program product can be a software installation package, and the computer includes an electronic device.
[0155] It should be noted that, for the sake of simplicity, the above embodiments are all described as a series of actions. Those skilled in the art should understand that this application is not limited to the described order of actions, as some steps in the embodiments of this application can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions, steps, modules, or units involved are not necessarily essential to the embodiments of this application.
[0156] In the above embodiments, the descriptions of each embodiment in this application have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0157] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0158] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.
[0159] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0160] The modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on the processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented through a software program that runs on the processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.
[0161] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above descriptions are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A neurofeedback training system based on a large EEG model, characterized in that, The system includes: an EEG acquisition module, a preprocessing module, a model training module, a data analysis module, and a visualization module, wherein: The EEG acquisition module is used to acquire first EEG datasets corresponding to multiple target groups, as well as reference EEG data of target users; each target group corresponds to a type of population. The preprocessing module is used to preprocess the first EEG dataset and the reference EEG data respectively to obtain the second EEG dataset and the target EEG data. The model training module is used to train a preset reference pedestal model based on the second EEG dataset to obtain a target pedestal model; determine the neurofeedback training target for the target user; and determine the target EEG model based on the neurofeedback training target and the target pedestal model. The data analysis module is used to decode the target EEG data according to the target EEG model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector used to comprehensively quantify the current brain state of the target user; The visualization module is used to generate visualization results based on the brain state feature vector; the visualization results are used to guide and adjust the brain state of the target user to achieve the neurofeedback training objective. Specifically, in the step of training a preset reference pedestal model based on the second EEG dataset to obtain a target pedestal model, the model training module is used for: The second EEG dataset is divided into multiple batches according to a preset batch size; The reference base model is iteratively updated based on the multiple batches of data until the iteratively updated reference base model meets the preset conditions, then the iterative update is stopped and the target base model is obtained. Specifically, in determining the target EEG model based on the neurofeedback training objective and the target base model, the model training module is used for: Determine m proxy tasks corresponding to the neural feedback training objective; the m proxy tasks include one objective proxy task and n covariant proxy tasks; m is a positive integer, n is a natural number, and m = n + 1; Determine the target state decoding sub-network corresponding to the target agent task; Determine the n covariant state decoding subnetworks corresponding to the n covariant agent tasks; Obtain the feature extraction subnetwork and feature fusion subnetwork in the target base model; A reference EEG model is determined based on the feature extraction subnetwork, the feature fusion subnetwork, the target state decoding subnetwork, and the n covariant state decoding subnetworks; The reference EEG model is fine-tuned based on the reference EEG data to obtain the target EEG model; the reference EEG data is the EEG data corresponding to the neurofeedback training target in the second EEG dataset.
2. The system as described in claim 1, characterized in that, In the process of fine-tuning the reference EEG model to obtain the target EEG model, the model training module is specifically used for: The reference EEG data is processed by the feature extraction subnetwork and the feature fusion subnetwork in the reference EEG model to obtain a reference brain state code; The reference brain state encoding is processed by the target state decoding subnetwork and the n covariant state decoding subnetworks in the reference EEG model to obtain the target decoding result and the n covariant decoding results. Determine the first loss function and the first weight corresponding to the target proxy task; Determine the n second loss functions and n second weights corresponding to the n covariant proxy tasks; The first loss value is obtained by calculating the target decoding result based on the first loss function; Based on the n second loss functions, the n covariant decoding results are calculated to obtain n second loss values; The total loss value is obtained by weighting the first weight, the first loss value, the n second weights, and the n second loss values. The target EEG model is obtained by fine-tuning the reference EEG model based on the total loss value through backpropagation.
3. The system as described in claim 1 or 2, characterized in that, The brain state feature vector includes multiple dimensional features. Regarding the generation of visualization results based on the brain state feature vector, the visualization module is specifically used for: Based on the preset mapping relationship between dimensional features and visualization parameters, determine multiple visualization parameters corresponding to the multiple dimensional features; Multiple target threshold ranges are determined based on the aforementioned neurofeedback training objectives; Each target threshold range corresponds to a visualization parameter; When all of the multiple visualization parameters are within the multiple target threshold ranges, multiple compliance indicators corresponding to the multiple visualization parameters are generated; The visualization result is generated based on the multiple visualization parameters and the multiple compliance indicators; When at least one of the plurality of visualization parameters is not within its corresponding target threshold range, at least one guidance identifier corresponding to the at least one visualization parameter is generated. The visualization result is generated based on the plurality of visualization parameters and the at least one guide identifier.
4. The system as described in claim 1, characterized in that, The reference base model includes the feature extraction subnetwork, the feature fusion subnetwork, the mask reconstruction subnetwork, and the contrast discrimination subnetwork; In terms of iteratively updating the reference pedestal model based on the multiple batches of data, the model training module is specifically used for: A predetermined proportion of data in the first batch of data is randomly masked to obtain masked sample data; the first batch of data is any one of the multiple batches of data. The masked sample data is processed by the feature extraction subnetwork and the feature fusion subnetwork to obtain the first brain state code; The first brain state encoding is processed by the mask reconstruction sub-network to obtain the first output result; Perform a first data augmentation operation and a second data augmentation operation on the first batch of data respectively to obtain first augmented sample data and second augmented sample data; The first enhanced sample data and the second enhanced sample data are processed by the feature extraction subnetwork and the feature fusion subnetwork respectively to obtain the second brain state code and the third brain state code. The second brain state code and the third brain state code are processed by the comparison discriminant subnetwork to obtain the second output result; The reference base model is updated based on the first output result and the second output result.
5. The system as described in claim 4, characterized in that, The feature extraction subnetwork includes a time-domain feature extraction subnetwork, a frequency-domain feature extraction subnetwork, and a spatial-domain feature extraction subnetwork; In the process of processing the masked sample data through the feature extraction subnetwork and the feature fusion subnetwork to obtain the first brain state code, the model training module is specifically used for: The shielded sample data is subjected to feature extraction through the time-domain feature extraction subnetwork, the frequency-domain feature extraction subnetwork, and the spatial-domain feature extraction subnetwork, respectively, to obtain a time-domain feature map, a frequency-domain feature map, and a spatial-domain feature map; The first brain state code is obtained by fusing the time-domain feature map, the frequency-domain feature map, and the spatial-domain feature map through the feature fusion subnetwork.
6. A neurofeedback training method based on a large EEG model, applied to the system described in any one of claims 1-5, characterized in that, The method includes: Collect first EEG datasets corresponding to multiple target groups, as well as reference EEG data of target users; each target group corresponds to a type of population; The first EEG dataset and the reference EEG dataset are preprocessed respectively to obtain the second EEG dataset and the target EEG dataset; The target base model is obtained by training a preset reference base model based on the second EEG dataset; the neurofeedback training target of the target user is determined; and the target EEG model is determined based on the neurofeedback training target and the target base model. The target EEG data is decoded according to the target EEG model to obtain a brain state feature vector; the brain state feature vector is a multi-dimensional feature vector used to comprehensively quantify the current brain state of the target user; A visualization result is generated based on the brain state feature vector; the visualization result is used to guide and adjust the brain state of the target user to achieve the neurofeedback training objective.
7. An electronic device, characterized in that, include: Processor, memory, communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method as described in claim 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in claim 6.
Citation Information
Patent Citations
Automatic sleep staging and migration method based on deep neural network
CN112869711A
Anesthesia state evaluation system and method suitable for patients of different ages
CN114176530A