An electroencephalogram neurofeedback training data processing method and system
Patent Information
- Application Number
- CN202611024698.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-08-21
AI Technical Summary
[0003]然而,现有脑电神经反馈系统大多依据当前时刻的脑电状态直接生成反馈信号,缺乏对脑状态变化趋势的提前预测能力,难以适应脑电信号动态变化特性;同时,由于脑电采集、信号处理以及反馈呈现过程存在系统时延,导致反馈信号与受试者真实脑状态之间容易产生时间错位,影响神经反馈训练的实时性和稳定性
[0035]采用上述方案本发明取得的有益效果如下:本方案创造性地通过构建历史神经状态演化轨迹,并结合脑状态漂移强度自适应调整历史信息利用范围,对未来神经状态概率分布进行预测,实现了对脑状态演化趋势的提前预测和神经反馈延迟的有效补偿;本方案创造性地通过构建预测误差评估、系统时延估计以及时延感知误差补偿机制,对预测误差进行时间对齐和动态修正,实现了神经反馈信号与受试者实际脑状态之间的时序同步以及反馈驱动值的稳定输出,从而提高了脑电神经反馈训练的实时性、稳定性和训练效果。
Smart Images

Figure CN122604393A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of biomedical signal processing technology, specifically referring to a method and system for processing brainwave neurofeedback training data. Background Technology
[0002] Electroencephalography (EEG) neurofeedback is a non-invasive neuromodulation method based on brain-computer interface (BCI) technology. It collects the subject's brain signals in real time and provides feedback on the brain state in visual, auditory, and other forms, thereby guiding the subject to autonomously regulate their brain activity patterns. Currently, EEG neurofeedback is widely used in cognitive training, neurorehabilitation, and as an adjunct therapy for mental illnesses.
[0003] However, most existing EEG neurofeedback systems generate feedback signals directly based on the current EEG state, lacking the ability to predict the trend of brain state changes in advance and making it difficult to adapt to the dynamic changes of EEG signals. At the same time, due to the system time delay in the EEG acquisition, signal processing and feedback presentation process, the feedback signal is prone to time misalignment with the subject's actual brain state, affecting the real-time performance and stability of neurofeedback training.
[0004] Therefore, how to achieve early perception of brain state change trends and effectively compensate for system delays in the neural feedback process has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] To address the above issues and overcome the shortcomings of existing technologies, this invention provides a method for processing EEG neurofeedback training data, which includes the following steps:
[0006] Step S1: Collect multi-channel EEG signals from the subject during the training process, and preprocess the multi-channel EEG signals to obtain preprocessed EEG signals;
[0007] Step S2 extracts multimodal features from the preprocessed EEG signals and constructs neural state latent vectors;
[0008] Step S3 predicts the probability distribution of future neural states based on the hidden vector sequence of historical neural states;
[0009] Step S4 calculates the neural prediction error and constructs the delay-compensated feedback driving value;
[0010] Step S5: Construct a dynamic error threshold interval based on the delay compensation feedback driving value and generate a standardized feedback score;
[0011] Step S6 generates training feedback parameters based on the standardized feedback scores and performs adaptive adjustment of training intensity.
[0012] Further, in step S1, the multi-channel EEG signals on the scalp surface of the subject are acquired in real time through an EEG acquisition device, and an electrooculogram reference signal is acquired at the same time. The EEG signals are then subjected to bandpass filtering, baseline drift correction and online artifact removal processing in sequence to obtain a preprocessed EEG signal.
[0013] The online artifact removal process employs a recursive least squares adaptive filter, using the electrooculogram (EOG) reference signal as the input, to separate EOG artifacts in multi-channel EEG signals online.
[0014] Further, in step S2, power spectral density features, differential entropy features, and brain region functional connectivity features are extracted from the preprocessed EEG signal. The brain region functional connectivity features are obtained by calculating the weighted phase lag index between different EEG channels. After normalizing the extracted features, they are fused in chronological order to form a multimodal EEG feature sequence. The multimodal EEG feature sequence is then input into a temporal convolutional network for spatiotemporal feature encoding to extract temporal dependencies and cross-feature correlations in the EEG signal and output neural state latent vectors.
[0015] Furthermore, step S3, which is used to predict the neural state at future moments based on the evolution of the subject's historical brain state, includes the following sub-steps:
[0016] Step S31: Construction of historical neural state sequence, used to construct the dynamic evolution trajectory of the subject's brain state. Specifically, the hidden vectors of neural states at multiple consecutive moments are arranged in chronological order to construct the historical neural state sequence.
[0017] Step S32 Brain state drift intensity estimation is used to characterize the degree of dynamic change of the current brain state. Specifically, based on the historical neural state sequence, the state change rate and state change acceleration between adjacent neural states are calculated, and the brain state drift intensity corresponding to the current moment is calculated based on the state change rate and state change acceleration.
[0018] Step S33: Drift perception probabilistic sparse attention modeling. Specifically, based on the intensity of brain state drift, the number of historical time positions involved in attention calculation is adaptively adjusted, and the adjusted probabilistic sparse attention mechanism is used to perform temporal modeling of the historical neural state sequence to obtain a neural state evolution representation.
[0019] Step S34 involves probabilistic modeling of future neural states to characterize the trend distribution characteristics and uncertainty propagation patterns of future neural states. Specifically, based on the neural state evolution representation, a two-branch prediction structure is used to predict the mean and variance parameters of the neural states at future time points, thereby obtaining the continuous distribution parameters of the future neural states.
[0020] Step S35 generates the probability distribution of future neural states. Specifically, the continuous distribution parameters of future neural states are input into the state mapping network, mapped to the predefined target neural state space, and the probability values corresponding to the target neural states within the future time window are output to obtain the probability distribution of future neural states.
[0021] Further, step S4, used to evaluate the error of the probability distribution of future neural states and dynamically compensate for the prediction error in combination with the system delay characteristics to generate a stable feedback driving value, includes the following sub-steps:
[0022] Step S41, prediction error calculation, is used to assess the degree of difference between the predicted future neural state and the actual neural state. Specifically, it obtains the probability distribution of the actual neural state, calculates the difference between the probability distribution of the actual neural state and the probability distribution of the future neural state, and obtains the current prediction error.
[0023] Step S42 System delay estimation and error alignment is used to compensate for system latency during EEG neurofeedback training. Specifically, by recording the EEG sampling time, feature processing completion time, and feedback presentation time in real time, the time difference between the EEG sampling time and the feedback presentation time is calculated to obtain the total system delay. Then, based on the total system delay, the number of historical error backtracking steps is determined to achieve alignment processing of prediction errors in the time dimension.
[0024] Step S43: Construction of the time delay perception error buffer queue. Specifically, an error buffer queue is constructed to store prediction errors at different times, and the historical prediction errors at the corresponding times are extracted from the error buffer queue based on the number of historical error backtracking steps.
[0025] Step S44 delay compensation feedback specifically involves weighted fusion of the current prediction error and the corresponding historical prediction error, followed by exponential smoothing to obtain the delay compensation feedback driving value, thereby compensating for and correcting the temporal delay during EEG neurofeedback training.
[0026] Further, in step S5, the distribution characteristics of the delay compensation feedback driving value within a preset time window are statistically analyzed, the mean and standard deviation of the delay compensation feedback driving value are calculated, a dynamic error threshold interval is constructed, and then the delay compensation feedback driving value is constrained and corrected according to the dynamic error threshold interval. After that, the corrected feedback driving value is standardized to obtain a standardized feedback score.
[0027] Further, in step S6, the standardized feedback score is used to generate training feedback parameters according to a preset feedback mapping relationship. Based on the training feedback parameters, the feedback device is controlled to perform feedback output. According to the change of the standardized feedback score within a preset time, the training intensity of one or more parameters among the feedback signal output gain, feedback sensitivity, feedback trigger threshold, visual feedback intensity, and auditory feedback intensity is adaptively adjusted so that the training task is kept in a training range that matches the current ability level of the subject.
[0028] The present invention provides an EEG neurofeedback training data processing system, comprising an EEG signal acquisition and preprocessing module, a neural state construction module, a neural state prediction module, an error compensation module, a feedback scoring module, and a feedback control module;
[0029] The EEG signal acquisition and preprocessing module is used to acquire multi-channel EEG signals during the subject's training process, preprocess the multi-channel EEG signals to obtain preprocessed EEG signals, and send the preprocessed EEG signals to the neural state construction module.
[0030] The neural state construction module is used to extract multimodal features from the preprocessed EEG signal, construct a neural state latent vector, and send the neural state latent vector to the neural state prediction module.
[0031] The neural state prediction module is used to predict the probability distribution of future neural states based on the historical neural state latent vector sequence, and send the probability distribution of future neural states to the error compensation module.
[0032] The error compensation module is used to calculate the neural prediction error, construct the delay compensation feedback driving value, and send the delay compensation feedback driving value to the feedback scoring module.
[0033] The feedback scoring module is used to construct a dynamic error threshold interval based on the delay compensation feedback driving value, generate a standardized feedback score, and send the standardized feedback score to the feedback control module.
[0034] The feedback control module is used to generate training feedback parameters based on the standardized feedback score and to perform adaptive adjustment of training intensity.
[0035] The beneficial effects achieved by the present invention using the above scheme are as follows: This scheme creatively constructs historical neural state evolution trajectories and combines them with adaptive adjustment of the range of historical information utilization based on the intensity of brain state drift to predict the probability distribution of future neural states, thereby achieving early prediction of brain state evolution trends and effective compensation for neural feedback delays; This scheme creatively constructs prediction error assessment, system time delay estimation, and time delay perception error compensation mechanisms to perform time alignment and dynamic correction of prediction errors, thereby achieving temporal synchronization between neural feedback signals and the actual brain state of the subject and stable output of feedback driving values, thus improving the real-time performance, stability, and training effect of EEG neurofeedback training. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating a brainwave neurofeedback training data processing method provided by the present invention.
[0037] Figure 2 A schematic diagram of an EEG neurofeedback training data processing system provided by the present invention;
[0038] Figure 3 This is a flowchart illustrating step S3;
[0039] Figure 4 This is a flowchart illustrating step S4.
[0040] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0041] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0042] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0043] Example 1, see Figure 1The present invention provides a method for processing EEG neurofeedback training data, the method comprising the following steps:
[0044] Step S1: Collect multi-channel EEG signals from the subject during the training process, and preprocess the multi-channel EEG signals to obtain preprocessed EEG signals;
[0045] Step S2 extracts multimodal features from the preprocessed EEG signals and constructs neural state latent vectors;
[0046] Step S3 predicts the probability distribution of future neural states based on the hidden vector sequence of historical neural states;
[0047] Step S4 calculates the neural prediction error and constructs the delay-compensated feedback driving value;
[0048] Step S5: Construct a dynamic error threshold interval based on the delay compensation feedback driving value and generate a standardized feedback score;
[0049] Step S6 generates training feedback parameters based on the standardized feedback scores and performs adaptive adjustment of training intensity.
[0050] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the multi-channel EEG signal on the scalp surface of the subject is acquired in real time through an EEG acquisition device, and an electrooculogram reference signal is acquired at the same time. The EEG signal is then subjected to bandpass filtering, baseline drift correction and online artifact removal processing in sequence to obtain a preprocessed EEG signal.
[0051] The online artifact removal process employs a recursive least squares adaptive filter, using the electrooculogram (EOG) reference signal as the reference input, to separate EOG artifacts in the multi-channel EEG signal online.
[0052] In the specific implementation process, the EEG acquisition equipment is equipped with 16, 32, or 64 EEG electrodes according to the international 10-20 electrode system, and collects multi-channel EEG signals from the subject during training in real time at a sampling frequency of 250Hz to 1000Hz. At the same time, electrooculography (EOG) electrodes are deployed around the subject's eyes to collect EOG reference signals synchronously. The acquired multi-channel EEG signals are input into the preprocessing unit in the form of streaming data. First, a 0.5Hz to 45Hz bandpass filter is used to remove low-frequency drift and high-frequency noise. Then, a sliding window mean removal method is used to correct the baseline drift of the multi-channel EEG signals. After that, the EOG reference signal is used as the input of the recursive least squares adaptive filter, and the multi-channel EEG signals are used as the expected signal to estimate the eye movement artifact components in the EEG signals in real time and subtract them from the original multi-channel EEG signals. The forgetting factor is set to 0.995 to 0.999, preferably 0.998, and finally, a continuous and stable preprocessed EEG signal is obtained.
[0053] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, power spectral density features, differential entropy features, and brain region functional connectivity features are extracted from the preprocessed EEG signal. The brain region functional connectivity features are obtained by calculating the weighted phase lag index between different EEG channels. After normalizing the extracted features, they are fused in chronological order to form a multimodal EEG feature sequence. The multimodal EEG feature sequence is input into a temporal convolutional network for spatiotemporal feature encoding to extract the temporal dependencies and cross-feature correlations in the EEG signal and output a fixed-dimensional neural state latent vector.
[0054] In one embodiment of the present invention, the preprocessed EEG signal is first segmented according to a sliding time window. Preferably, the sliding window length is set to 1s to 2s, and the overlap rate between adjacent windows is 50% to 75%. For the EEG data within each time window, power spectral density features, differential entropy features, and functional connectivity features between brain regions are extracted. The power spectral density features can be calculated using Fast Fourier Transform or Welch power spectral estimation methods and are used to characterize... frequency band frequency band frequency band frequency band and The frequency band corresponds to the distribution of brain electrical energy; the differential entropy feature is obtained by statistically analyzing the variance of brain electrical signals in the corresponding frequency band and calculating its differential entropy value, which is used to describe the information complexity of brain electrical activity; the brain region functional connectivity feature is obtained by calculating the weighted phase lag index between different brain electrical channels, which is used to describe the cooperative activity relationship between different brain regions.
[0055] After obtaining the power spectral density features, differential entropy features, and brain region functional connectivity features, normalization processing is performed on different types of features to eliminate dimensional differences between different features. Then, the features are spliced and fused in chronological order to form a multimodal EEG feature sequence. This multimodal EEG feature sequence is input into a temporal convolutional network for spatiotemporal encoding. The temporal convolutional network includes causal convolutional structures, dilated convolutional structures, and residual connection structures, used to extract short-term dynamic features and long-term dependencies of EEG activity. Finally, a fixed-dimensional neural state latent vector is output, which is used to compactly represent the subject's current brain state.
[0056] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. Step S3, which is used to predict the neural state at future moments based on the evolution of the subject's historical brain state, includes the following sub-steps:
[0057] Step S31: Construction of historical neural state sequence, used to construct the dynamic evolution trajectory of the subject's brain state. Specifically, the hidden vectors of neural states at multiple consecutive moments are arranged in chronological order to construct the historical neural state sequence.
[0058] In practice, the observation length of historical neural state sequences needs to balance prediction accuracy and real-time processing capability. If the observation length is too short, it will be difficult to fully reflect the evolution of brain states. If the observation length is too long, it will easily introduce outdated information and increase the computational complexity of the model.
[0059] Preferably, when the EEG sampling rate is 250Hz, the observation length of the historical neural state sequence corresponds to the neural state sequence within the past 3s to 5s time window;
[0060] Step S32 Brain state drift intensity estimation is used to characterize the degree of dynamic change of the current brain state. Specifically, based on the historical neural state sequence, the state change rate and state change acceleration between adjacent neural states are calculated, and the brain state drift intensity corresponding to the current moment is calculated based on the state change rate and state change acceleration.
[0061] The formula for calculating the rate of state change is:
[0062] ;
[0063] In the formula, V i Z is the rate of state change at time i, where i is the first index at time i. i Z is the latent vector of the neural state at time i. i-1 It is the hidden vector of the neural state at time i-1, and ||·||2 is the Euclidean norm operator;
[0064] The formula for calculating the acceleration due to the change in state is:
[0065] ;
[0066] In the formula, A i V is the acceleration due to the state change at time i. i-1 It is the rate of state change at time i-1;
[0067] The formula for calculating the intensity of brain state drift is:
[0068] ;
[0069] ;
[0070] In the formula, D tis the average rate of state change at the current moment, t is the second index of time, used to represent the current moment, and L is the observation length of the historical neural state sequence. These are drift fusion weighting coefficients;
[0071] In practice, the state change rate is used to characterize the magnitude of the change in neural state between two adjacent moments. The greater the state change rate, the more obvious the change in neural state.
[0072] Furthermore, considering that the rate of state change alone is insufficient to accurately reflect the characteristics of sudden changes in brain state, this embodiment further calculates the acceleration of state change to describe the degree of fluctuation in the rate of neural state change. By fusing the average rate of state change with the acceleration of state change, the overall amplitude and trend of brain state changes can be characterized simultaneously, thereby improving the accuracy of brain state drift assessment results.
[0073] When the intensity of brain state drift is large, it indicates that the current neural state is rapidly shifting. At this time, the subject may be in a stage of rapid change in attention, sudden change in cognitive load, or emotional fluctuation. When the intensity of brain state drift is small, it indicates that the current neural state is relatively stable and the neural activity pattern changes slowly.
[0074] Step S33: Drift perception probabilistic sparse attention modeling. Specifically, based on the intensity of brain state drift, the number of historical time positions involved in attention calculation is adaptively adjusted, and the adjusted probabilistic sparse attention mechanism is used to perform temporal modeling of the historical neural state sequence to obtain a neural state evolution representation.
[0075] Among them, the number of historical time locations involved in attention calculation is adaptively adjusted so that when the brain state changes drastically, the model prioritizes recent historical states, and when the brain state changes steadily, the model uses historical information over a longer time range for prediction.
[0076] The formula for calculating the number of historical time locations is:
[0077] ;
[0078] ;
[0079] In the formula, u t It is the number of historical time positions that participate in attention calculation at the current moment, u min It is the minimum number of historical time locations allowed to participate in attention calculation, u max It is the maximum number of historical time locations allowed to participate in attention calculation. It is the drift adjustment coefficient, and exp(·) is the natural exponential function;
[0080] When brain state changes drastically, the intensity of brain state drift increases and the drift regulation coefficient decreases. At this time, the number of historical time locations involved in attention calculation decreases, and the model mainly uses the neural state information of the most recent moment for prediction to improve the ability to respond to rapid changes in brain state.
[0081] When the brain state is relatively stable, the intensity of brain state drift decreases and the drift regulation coefficient increases. At this time, the number of historical time locations involved in attention calculation increases, and the model can integrate historical neural state information over a longer time range for prediction, thereby making full use of the long-term dependencies in the brain state evolution process.
[0082] In the specific implementation process, the importance score corresponding to each historical time position is first calculated based on the similarity between the query vector and the key vector, and then sorted according to the importance score, retaining only the top u with the highest importance score. t One historical time position participates in the complete attention calculation, and the remaining historical time positions are processed in a sparse approximation manner to obtain the neural state evolution representation;
[0083] Through the above design, while ensuring the accuracy of neural state prediction, the computational complexity of attention can be effectively reduced and the real-time performance of the EEG neurofeedback training system can be improved.
[0084] Step S34 involves probabilistic modeling of future neural states to characterize the trend distribution characteristics and uncertainty propagation patterns of future neural states. Specifically, based on the neural state evolution representation, a two-branch prediction structure is used to predict the mean and variance parameters of the neural states at future time points, thereby obtaining the continuous distribution parameters of the future neural states.
[0085] In specific implementation, the dual-branch prediction structure includes a shared feature encoding layer, a mean prediction branch, and a variance prediction branch;
[0086] The shared feature encoding layer is set up to perform a unified feature transformation on the neural state evolution representation in order to extract shared temporal features related to the future neural state evolution, thereby reducing feature redundancy between the mean prediction branch and the variance prediction branch and improving prediction stability.
[0087] First, the neural state evolution representation is input into the shared feature encoding layer for feature transformation to obtain high-order temporal representation features. Then, the high-order temporal representation features are input into the mean prediction branch and the variance prediction branch respectively. The mean prediction branch is used to output the expected position of the future neural state in the latent space to obtain the mean parameter. The variance prediction branch is used to output the uncertainty description of the future neural state to obtain the variance parameter.
[0088] Furthermore, to ensure the non-negativity of the uncertainty parameter, the output of the variance prediction branch is subjected to monotonic nonlinear constraint processing to obtain the variance parameter that satisfies the non-negativity constraint.
[0089] Step S35 generates the probability distribution of future neural states. Specifically, the continuous distribution parameters of future neural states are input into the state mapping network, mapped to the predefined target neural state space, and the probability values corresponding to the target neural states within the future time window are output to obtain the probability distribution of future neural states.
[0090] In specific implementation, the state mapping network is a lightweight state classification network consisting of a fully connected mapping layer, a nonlinear activation layer, and a probability normalization layer, used to realize the probability mapping from continuous neural state representation to discrete target neural state space; the predefined target neural state space can be set according to the specific training task.
[0091] For example, in attention training scenarios, the target neural state can be divided into low attention state, medium attention state, and high attention state;
[0092] Furthermore, in relaxation training scenarios, the target neural state can be categorized into low relaxation, moderate relaxation, and high relaxation states; in emotion regulation training scenarios, the target neural state can be categorized into negative emotional states, neutral emotional states, and positive emotional states. Those skilled in the art can flexibly set the target neural state according to the actual EEG neurofeedback training task.
[0093] By performing the above operations, this scheme creatively constructs historical neural state evolution trajectories and adaptively adjusts the scope of historical information utilization by combining the intensity of brain state drift to predict the probability distribution of future neural states. This achieves early prediction of brain state evolution trends and effective compensation for neural feedback delays.
[0094] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. Step S4 is used to evaluate the error of the probability distribution of future neural states and to dynamically compensate for the prediction error in combination with the system delay characteristics in order to generate a stable feedback driving value. It includes the following sub-steps:
[0095] Step S41, prediction error calculation, is used to assess the degree of difference between the predicted future neural state and the actual neural state. Specifically, it obtains the probability distribution of the actual neural state, calculates the difference between the probability distribution of the actual neural state and the probability distribution of the future neural state, and obtains the current prediction error.
[0096] In the specific implementation process, KL divergence is used to calculate the difference between the probability distribution of the actual neural state and the probability distribution of the future neural state;
[0097] Step S42 System delay estimation and error alignment is used to compensate for system latency during EEG neurofeedback training. Specifically, by recording the EEG sampling time, feature processing completion time, and feedback presentation time in real time, the time difference between the EEG sampling time and the feedback presentation time is calculated to obtain the total system delay. Then, based on the total system delay, the number of historical error backtracking steps is determined to achieve alignment processing of prediction errors in the time dimension.
[0098] The formula for calculating the total system delay is:
[0099] ;
[0100] In the formula, It is the total system delay, T render It is the moment of feedback presentation, T acquire This is the moment of EEG sampling;
[0101] In the specific implementation process, the calculation formula for determining the number of historical error backtracking steps based on the total system delay is as follows:
[0102] ;
[0103] In the formula, k t It is the number of backtracking steps for historical errors. It is the feedback update cycle. It is the floor operator;
[0104] Step S43: Construction of the time delay perception error buffer queue. Specifically, an error buffer queue is constructed to store prediction errors at different times, and the historical prediction errors at the corresponding times are extracted from the error buffer queue based on the number of historical error backtracking steps.
[0105] In the specific implementation process, an error buffer queue of length M is established, and the calculation formula is as follows:
[0106] ;
[0107] In the formula, It is an error buffer queue, E t-M+1 E is the prediction error corresponding to time t-M+1 in the error buffer queue. t It represents the prediction error at the current moment;
[0108] And based on the number of historical error backtracking steps, the corresponding historical prediction error is extracted from the error buffer queue, and the calculation formula is as follows:
[0109] ;
[0110] In the formula, E delay It is a historical prediction error. It is the tkth node in the error buffer queue. t The prediction error at time point;
[0111] Step S44 delay compensation feedback specifically involves weighted fusion of the current prediction error and the corresponding historical prediction error, followed by exponential smoothing to obtain the delay compensation feedback driving value, thereby compensating for and correcting the temporal delay during EEG neurofeedback training.
[0112] By performing the above operations, this scheme creatively constructs a prediction error assessment, system delay estimation, and delay perception error compensation mechanism to perform time alignment and dynamic correction of prediction errors. This achieves temporal synchronization between neural feedback signals and the actual brain state of the subject, as well as stable output of feedback driving values, thereby improving the real-time performance, stability, and training effect of EEG neurofeedback training.
[0113] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the distribution characteristics of the delay compensation feedback driving value within a preset time window are statistically analyzed, the mean and standard deviation of the delay compensation feedback driving value are calculated, a dynamic error threshold interval is constructed, and then the delay compensation feedback driving value is constrained and corrected according to the dynamic error threshold interval. After that, the corrected feedback driving value is standardized to obtain a standardized feedback score.
[0114] In the specific implementation process, a sliding statistical window with a length of 30s to 120s is established, the delay compensation feedback driving value within the preset time window is cached in real time, the feedback mean and feedback standard deviation within the current statistical window are calculated, and a dynamic error threshold interval is constructed based on the feedback mean and feedback standard deviation.
[0115] The formula for calculating the dynamic error threshold interval is:
[0116] ;
[0117] ;
[0118] In the formula, T high It is the upper limit of the dynamic error threshold range. It is the mean of the delay-compensated feedback drive value. This is the threshold adjustment coefficient, preferably ranging from 1 to 2. It is the standard deviation of the delay-compensated feedback drive value, T low It is the lower limit of the dynamic error threshold interval;
[0119] The constraint correction of the delay compensation feedback driving value based on the dynamic error threshold interval is as follows: when the current delay compensation feedback driving value is greater than the upper limit of the dynamic error threshold interval, the upper limit of the dynamic error threshold interval is used to replace the current feedback driving value; when the current delay compensation feedback driving value is less than the lower limit of the dynamic error threshold interval, the lower limit of the dynamic error threshold interval is used to replace the current feedback driving value; when the current delay compensation feedback driving value is within the dynamic error threshold interval, the current feedback driving value is kept unchanged, thereby obtaining the corrected feedback driving value.
[0120] Then, the corrected feedback drive value was standardized using the standard score method to obtain the standardized feedback score.
[0121] Example 7, see Figure 1 This embodiment is based on the above embodiment. In step S6, the standardized feedback score is used to generate training feedback parameters according to a preset feedback mapping relationship. The feedback device is controlled to perform feedback output based on the training feedback parameters. According to the change of the standardized feedback score within a preset time, the training intensity of one or more parameters among the feedback signal output gain, feedback sensitivity, feedback trigger threshold, visual feedback intensity, and auditory feedback intensity is adaptively adjusted so that the training task is kept in a training range that matches the current ability level of the subject.
[0122] In the specific implementation process, the standardized feedback score output in step S5 is received, and corresponding training feedback parameters are generated according to the preset mapping relationship; the training feedback parameters include, but are not limited to, visual feedback parameters, auditory feedback parameters, and audiovisual fusion feedback parameters.
[0123] When using visual feedback mode, the standardized feedback score is mapped to visual feedback parameters such as scene brightness, color saturation, and the speed of movement of dynamic elements; when using auditory feedback mode, the standardized feedback score is mapped to auditory feedback parameters such as background music volume, pitch frequency, and rhythm speed; when using audiovisual fusion feedback mode, both visual and auditory feedback parameters are adjusted simultaneously.
[0124] The feedback devices include, but are not limited to, displays, speakers, head-mounted displays, virtual reality devices, augmented reality devices, or other feedback terminals capable of outputting visual information, auditory information, or audiovisual fusion information;
[0125] Furthermore, when the standardized feedback score is detected to be consistently higher than the target range within a preset time period, the feedback signal output gain or feedback sensitivity is reduced to increase the difficulty of brain nerve training; when the standardized feedback score is detected to be consistently lower than the target range within a preset time period, the feedback signal output gain or feedback sensitivity is increased to reduce the difficulty of brain nerve training; when the standardized feedback score fluctuation exceeds a preset threshold, the visual feedback intensity or auditory feedback intensity is reduced to avoid frequent changes in feedback content affecting the training effect.
[0126] Example 8, see Figure 2 Based on the above embodiments, the present invention provides an EEG neurofeedback training data processing system, including an EEG signal acquisition and preprocessing module, a neural state construction module, a neural state prediction module, an error compensation module, a feedback scoring module, and a feedback control module.
[0127] The EEG signal acquisition and preprocessing module is used to acquire multi-channel EEG signals during the subject's training process, preprocess the multi-channel EEG signals to obtain preprocessed EEG signals, and send the preprocessed EEG signals to the neural state construction module.
[0128] The neural state construction module is used to extract multimodal features from the preprocessed EEG signal, construct a neural state latent vector, and send the neural state latent vector to the neural state prediction module.
[0129] The neural state prediction module is used to predict the probability distribution of future neural states based on the historical neural state latent vector sequence, and send the probability distribution of future neural states to the error compensation module.
[0130] The error compensation module is used to calculate the neural prediction error, construct the delay compensation feedback driving value, and send the delay compensation feedback driving value to the feedback scoring module.
[0131] The feedback scoring module is used to construct a dynamic error threshold interval based on the delay compensation feedback driving value, generate a standardized feedback score, and send the standardized feedback score to the feedback control module.
[0132] The feedback control module is used to generate training feedback parameters based on the standardized feedback score and to perform adaptive adjustment of training intensity.
[0133] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0134] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.
[0135] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A method for processing EEG neurofeedback training data, characterized in that: The method includes the following steps: Step S1: Collect multi-channel EEG signals from the subject during the training process, and preprocess the multi-channel EEG signals to obtain preprocessed EEG signals. Step S2 extracts multimodal features from the preprocessed EEG signals and constructs neural state latent vectors; Step S3 predicts the probability distribution of future neural states based on the hidden vector sequence of historical neural states; The sub-steps of step S3 include step S31 constructing the historical neural state sequence, step S32 estimating the brain state drift intensity, step S33 modeling the drift perception probability sparse attention, step S34 modeling the future neural state probability, and step S35 generating the future neural state probability distribution. Step S4 calculates the neural prediction error and constructs the delay-compensated feedback driving value; The sub-steps of step S4 include step S41 prediction error calculation, step S42 system delay estimation and error alignment, step S43 delay-aware error buffer queue construction, and step S44 delay compensation feedback. Step S5: Construct a dynamic error threshold interval based on the delay compensation feedback driving value and generate a standardized feedback score; Step S6 generates training feedback parameters based on the standardized feedback scores and performs adaptive adjustment of training intensity.
2. The method for processing EEG neurofeedback training data according to claim 1, characterized in that: Step S31: Construction of historical neural state sequence, used to construct the dynamic evolution trajectory of the subject's brain state. Specifically, the hidden vectors of neural states at multiple consecutive moments are arranged in chronological order to construct the historical neural state sequence. Step S32 Brain state drift intensity estimation is used to characterize the degree of dynamic change of the current brain state. Specifically, based on the historical neural state sequence, the state change rate and state change acceleration between adjacent neural states are calculated, and the brain state drift intensity corresponding to the current moment is calculated based on the state change rate and state change acceleration.
3. The method for processing EEG neurofeedback training data according to claim 2, characterized in that: Step S33: Drift perception probabilistic sparse attention modeling. Specifically, based on the intensity of brain state drift, the number of historical time positions involved in attention calculation is adaptively adjusted, and the adjusted probabilistic sparse attention mechanism is used to perform temporal modeling of the historical neural state sequence to obtain a neural state evolution representation. Step S34 involves probabilistic modeling of future neural states to characterize the trend distribution characteristics and uncertainty propagation patterns of future neural states. Specifically, based on the neural state evolution representation, a two-branch prediction structure is used to predict the mean and variance parameters of the neural states at future time points, thereby obtaining the continuous distribution parameters of the future neural states. Step S35 generates the probability distribution of future neural states. Specifically, the continuous distribution parameters of future neural states are input into the state mapping network, mapped to the predefined target neural state space, and the probability values corresponding to the target neural states within the future time window are output to obtain the probability distribution of future neural states.
4. The method for processing EEG neurofeedback training data according to claim 3, characterized in that: Step S41, prediction error calculation, is used to assess the degree of difference between the predicted future neural state and the actual neural state. Specifically, it obtains the probability distribution of the actual neural state, calculates the difference between the probability distribution of the actual neural state and the probability distribution of the future neural state, and obtains the current prediction error. Step S42, system delay estimation and error alignment, is used to compensate for system latency during EEG neurofeedback training. Specifically, by recording the EEG sampling time, feature processing completion time, and feedback presentation time in real time, the time difference between the EEG sampling time and the feedback presentation time is calculated to obtain the total system latency. Then, based on the total system latency, the number of historical error backtracking steps is determined to achieve alignment processing of prediction errors in the time dimension.
5. The method for processing EEG neurofeedback training data according to claim 4, characterized in that: Step S43: Construction of the time delay perception error buffer queue. Specifically, an error buffer queue is constructed to store prediction errors at different times, and the historical prediction errors at the corresponding times are extracted from the error buffer queue based on the number of historical error backtracking steps. Step S44 delay compensation feedback specifically involves weighted fusion of the current prediction error and the corresponding historical prediction error, followed by exponential smoothing to obtain the delay compensation feedback driving value, thereby compensating for and correcting the temporal delay during EEG neurofeedback training.
6. The method for processing EEG neurofeedback training data according to claim 5, characterized in that: Step S5 specifically involves calculating the mean and standard deviation of the delay compensation feedback driving values by statistically analyzing the distribution characteristics of the delay compensation feedback driving values within a preset time window, constructing a dynamic error threshold interval, then constraining and correcting the delay compensation feedback driving values based on the dynamic error threshold interval, and finally standardizing the corrected feedback driving values to obtain a standardized feedback score.
7. The method for processing EEG neurofeedback training data according to claim 6, characterized in that: In step S6, the standardized feedback score is used to generate training feedback parameters according to a preset feedback mapping relationship. Based on the training feedback parameters, the feedback device is controlled to perform feedback output. According to the change of the standardized feedback score within a preset time, the training intensity of one or more parameters among the feedback signal output gain, feedback sensitivity, feedback trigger threshold, visual feedback intensity, and auditory feedback intensity is adaptively adjusted so that the training task is kept in a training range that matches the current ability level of the subject.
8. The method for processing EEG neurofeedback training data according to claim 7, characterized in that: Step S2 specifically involves extracting power spectral density features, differential entropy features, and brain region functional connectivity features from the preprocessed EEG signal. The brain region functional connectivity features are obtained by calculating the weighted phase lag index between different EEG channels. After normalizing the extracted features, they are fused in chronological order to form a multimodal EEG feature sequence. The multimodal EEG feature sequence is then input into a temporal convolutional network for spatiotemporal feature encoding to extract temporal dependencies and cross-feature correlations in the EEG signal, and output a neural state latent vector. In step S1, the multi-channel EEG signals on the scalp surface of the subject are acquired in real time through an EEG acquisition device, and an electrooculogram reference signal is acquired at the same time. The EEG signals are then subjected to bandpass filtering, baseline drift correction and online artifact removal processing in sequence to obtain a preprocessed EEG signal. The online artifact removal process employs a recursive least squares adaptive filter, using the electrooculogram (EOG) reference signal as the input, to separate EOG artifacts in multi-channel EEG signals online.
9. A neurofeedback training data processing system for implementing the neurofeedback training data processing method as described in any one of claims 1-8, characterized in that: It includes a brainwave signal acquisition and preprocessing module, a neural state construction module, a neural state prediction module, an error compensation module, a feedback scoring module, and a feedback control module; The EEG signal acquisition and preprocessing module is used to acquire multi-channel EEG signals during the subject's training process, preprocess the multi-channel EEG signals to obtain preprocessed EEG signals, and send the preprocessed EEG signals to the neural state construction module. The neural state construction module is used to extract multimodal features from the preprocessed EEG signal, construct a neural state latent vector, and send the neural state latent vector to the neural state prediction module. The neural state prediction module is used to predict the probability distribution of future neural states based on the historical neural state latent vector sequence, and send the probability distribution of future neural states to the error compensation module. The error compensation module is used to calculate the neural prediction error, construct the delay compensation feedback driving value, and send the delay compensation feedback driving value to the feedback scoring module. The feedback scoring module is used to construct a dynamic error threshold interval based on the delay compensation feedback driving value, generate a standardized feedback score, and send the standardized feedback score to the feedback control module. The feedback control module is used to generate training feedback parameters based on the standardized feedback score and to perform adaptive adjustment of training intensity.