Method and system for improving local SSMVEP stimulation stability of brain-computer interface based on fixation area switching and storage medium

By introducing a smooth switching mechanism and a protective window strategy into the brain-computer interface system, the problem of unstable SSMVEP signals caused by gaze region switching was solved, improving signal quality and decoding accuracy, and enhancing user experience and system stability.

CN121996069APending Publication Date: 2026-05-08ANYANG XIANGYU MEDICAL EQUIP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANYANG XIANGYU MEDICAL EQUIP
Filing Date
2026-01-19
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In brain-computer interface systems, when using the gaze region switching mode, the dynamic movement of the gaze point causes the sudden start and stop of local SSMVEP stimulation, resulting in signal instability and a decrease in signal-to-noise ratio, which affects decoding accuracy and system stability.

Method used

By introducing an instant start/stop and smooth switching mechanism and a switching protection window mechanism, and by gradually controlling the stimulus amplitude and employing a protective decoding strategy within the switching protection window, stable, high signal-to-noise ratio EEG signals are induced under dynamic gaze conditions.

Benefits of technology

It significantly improves SSMVEP signal quality and decoding stability, enhances user experience, ensures the reliability of multimodal fusion and interaction, and strengthens system adaptability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996069A_ABST
    Figure CN121996069A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for improving local SSMVEP stimulation stability of a brain-computer interface based on gazing area switching and a storage medium. The method comprises the steps that eye movement information of a user is tracked in real time, and a screen area watched by the user is judged; when the gazing area is switched, executing a smooth switching control process, fade out the SSMVEP stimulation leaving the area and / or fade in the SSMVEP stimulation entering the area with gradually changing amplitude; during the execution period of the smooth switching control process, starting a switching protection window, and processing the synchronously collected electroencephalogram data by adopting a preset protective decoding strategy within the duration time of the protection window; and finally, decoding based on the processed electroencephalogram signal to generate a control instruction for driving external equipment or switching an interactive interface. According to the method, the problem that the signal-to-noise ratio of the signal is reduced due to local stimulation mutation caused by movement of the fixation point is effectively solved, and the decoding stability of the system and the user experience are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of brain-computer interface technology, and in particular to a method, system, and storage medium for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching. Background Technology Steady-state visual evoked potentials (SSVEP) and their motor variants (SSMVEP) are commonly used paradigms in brain-computer interfaces, attracting significant attention due to their stable signals and high recognition accuracy. In applications such as rehabilitation training or assisted control, motor imagery (MI) is often combined to enhance activation of the motor cortex, leading to the development of multimodal fusion brain-computer interfaces.

[0002] One system design approach aimed at reducing visual interference and improving fusion is to employ a "gaze region switching" mode. This involves dividing the same display interface into multiple predefined regions (e.g., left, center, and right), integrating SSMVEP stimuli and MI cues within this interface. The system is configured to activate SSMVEP stimuli only when eye tracking detects that the user's gaze is stably positioned within a specific region, simultaneously displaying the corresponding MI cues on the interface. In other non-gaze regions, stimuli remain silent or in a low-interference state. This design effectively reduces visual fatigue and cross-target interference caused by ineffective flickering.

[0003] However, when the system adopts the aforementioned "gaze region switching" mode, a new, yet not fully resolved, technical challenge arises: because the movement of the user's gaze point is dynamic and potentially unstable, local visual stimuli frequently begin and end with the switching of gaze regions. This sudden on / off of gaze-based stimuli not only causes visual discomfort but, more importantly, introduces significant transient artifacts into the EEG signal, disrupting the steady-state characteristics of the SSMVEP signal. This disruption leads to an impure spectrum in the evoked signal, a decreased signal-to-noise ratio (SNR), and ultimately severely impacts the decoding accuracy based on frequency recognition and the overall system control stability.

[0004] While existing research on gaze-contingent-based SSVEP exists, most focuses on the implementation of the gaze-contingent logic or its application in control. There is a lack of systematic and targeted signal quality assurance solutions for the instability of SSVEP signals caused by the specific dynamic process of gaze switching. In particular, how to maintain the visual smoothness of local SSVEP stimulation and the spectral continuity of evoked EEG signals during the dynamic process of gaze region switching through precise timing control, stimulus parameter modulation, and signal processing strategies is a pressing technical problem that needs to be solved in this field.

[0005] Therefore, there is an urgent need for a method specifically designed for "gaze region switching" applications that can effectively improve the stability and recognizability of local SSMVEP stimuli. Summary of the Invention

[0006] The primary objective of this invention is to overcome the problem in existing brain-computer interface systems employing a "gaze region switching" mode, where the sudden start and stop of local SSMVEP stimulation due to gaze point movement leads to unstable evoked signals and a decreased signal-to-noise ratio. Specifically, this invention provides a method and system that introduces a finely controlled "instantaneous start / stop and smooth switching mechanism" and a corresponding "switching protection window" mechanism during the stimulation's start and stop process. This ensures that local SSMVEP stimulation can still induce stable, high signal-to-noise ratio EEG signals under dynamic gaze conditions, thereby laying the foundation for generating accurate and stable control commands (for driving external devices or switching the interactive interface) and improving the decoding robustness and practicality of the entire brain-computer interface system.

[0007] The technical solution of the present invention is as follows: According to a first aspect of the present invention, a method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching is disclosed. This method is applied to a brain-computer interface system that divides the same display interface into at least two predefined regions, and activates SSMVEP stimulation only in a region when the user's gaze is detected. The method includes the following steps: S1. Track the user's eye movement information in real time to obtain the position of the gaze point; S2. Determine the predefined screen area that the user is currently looking at based on the gaze point position; S3. When it is determined that the user's gaze area has changed, execute the smooth transition control procedure to control the fading out of the SSMVEP stimulus leaving the area and / or the fading in of the SSMVEP stimulus entering the area; the smooth transition control procedure includes the gradual control of the stimulus amplitude. S4. During the execution of the smooth switching control process, a switching protection window is activated, and the switching protection window lasts for a preset time. S5. During the duration of the switching protection window, the synchronously acquired EEG data is processed using a predetermined protective decoding strategy. S6. Based on the EEG signal processed in step S5, decode it to generate control commands, which are used to drive external devices or control the switching of the interactive interface.

[0008] In some implementations, in step S5, the protective decoding strategy is an "ignore strategy": within the switching protection window, the EEG decoder pauses the output of new classification instructions based on the EEG data within that time period, and maintains the previous instruction state or outputs a neutral state.

[0009] In some implementations, in step S5, the protective decoding strategy is a "weighted attenuation strategy": within the switching protection window, the EEG decoder assigns a weight w(t) that varies with time to the EEG data samples within that time period, wherein the weight at the beginning of the protection window is lower than the weight at the end of the protection window, and then the weighted data is used for classification.

[0010] In some implementations, the weight w(t) recovers from its minimum value at the start of the guard window to its maximum value at the end of the guard window, either linearly or according to a cosine function over time.

[0011] In some implementations, in step S5, the selection of a specific protective decoding strategy is adaptively switched based on the evaluation results of the real-time monitored eye-tracking signal quality and / or SSMVEP signal quality.

[0012] In some implementations, the preset time for switching the protective window is between 100 milliseconds and 300 milliseconds.

[0013] In some implementations, step S3, "when it is determined that the user's gaze area has switched," includes the following sub-steps: S31. Confirm that the gaze point stays in the newly entered predefined screen area for a duration exceeding the first preset threshold. S32. Confirm that the gaze confidence level output by the eye-tracking system exceeds the second preset threshold.

[0014] In some implementations, in step S3, the "gradual control of stimulus amplitude" refers to the process by which the visual intensity parameter of the stimulus changes from an initial value to a target value over time, and the change process lasts for a preset gradual time T_ramp, where 50ms ≤ T_ramp ≤ 500ms.

[0015] In some implementations, the gradation control uses at least one of a linear function, a cosine window function, or an exponential function to modulate the stimulus amplitude.

[0016] In some implementations, step S3 further includes phase continuity processing: setting an initial phase for the SSMVEP stimulus entering the region so that the phase of the stimulus remains continuous with a reference phase.

[0017] In some implementations, the initial phase φ_new is calculated using the following formula:

[0018] Where φ_prev is the reference phase, f is the target frequency of the SSMVEP stimulus entering the region, and Δt is the time interval from the expiration of the stimulus leaving the region to the start of the fade-in of the stimulus entering the region.

[0019] In some implementations, in step S3, the smooth switching control process adopts a cross-fade-in / fade-out method: the fading out of the leaving area and the fading in of the entering area are controlled to overlap at least partially in time.

[0020] In some implementations, the method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching further includes the step of: When the amplitude of the SSMVEP stimulus entering the area reaches a preset proportion of its maximum amplitude, a motion imagery cue corresponding to that area is triggered.

[0021] According to a second aspect of the present invention, a system for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching is also disclosed, comprising: The eye-tracking module is used to obtain the user's gaze point position in real time; The region determination module is used to determine the predefined screen region that the user is currently looking at based on the position of the gaze point; The stimulus presentation and control module is used to present SSMVEP stimuli on the display screen. The stimulus presentation and control module is configured to execute smooth switching control logic when the output of the region determination module indicates that the gaze region has switched, so as to control the fading out of the SSMVEP stimulus leaving the region and / or the fading in of the SSMVEP stimulus entering the region. The smooth switching control logic includes the gradual control logic for the stimulus amplitude. The signal processing and decoding module is configured to: initiate a switching protection window during the execution of the smooth switching control logic, and process the synchronously acquired EEG data using a predetermined protective decoding strategy during the duration of the switching protection window.

[0022] In some implementations, the stimulus presentation and control module is also configured to simultaneously trigger a motion imagery prompt corresponding to the area during the SSMVEP stimulus fade-in process or after reaching a predetermined amplitude.

[0023] In some implementations, the protective decoding strategy is an "ignore strategy" or a "weighted attenuation strategy".

[0024] According to a third aspect of the invention, a computer-readable storage medium is also disclosed, on which a computer program is stored, which, when executed by a processor, implements the steps in the method for improving the stability of local SSMVEP stimulation of a brain-computer interface based on gaze region switching as described above.

[0025] The beneficial effects of this invention are as follows: 1. Significantly improves SSMVEP signal quality and decoding stability: Through a smooth switching mechanism, visual discomfort and EEG transient artifacts caused by sudden stimulus changes are avoided, resulting in a purer SSMVEP signal spectrum and effectively maintaining the signal-to-noise ratio. Combined with a "switching protection window" mechanism, the negative impact of switching transients on the decoding process is further isolated, thus providing a reliable guarantee for generating accurate and stable control commands.

[0026] 2. Improved user experience and comfort: Smooth visual transitions reduce visual fatigue and discomfort caused by sudden changes in flickering stimuli, making the system more suitable for long-term use.

[0027] 3. Ensure the reliability of multimodal fusion and interaction: Stable presentation of SSMVEP stimuli and MI prompts within the same interface, combined with high-quality SSMVEP signals, lays a solid foundation for the fusion decoding of MI and other modalities and subsequent smooth human-computer interaction (such as device control and interface switching).

[0028] 4. Enhance system adaptability and robustness: The "switching protection window" mechanism can flexibly select strategies based on signal quality, providing an effective tool for the system to cope with complex usage environments (such as user fatigue and distraction), and ensuring the continuity of control output. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall architecture of the brain-computer interface system based on an embodiment of the present invention.

[0030] Figure 2 This is a flowchart illustrating the overall process of the local SSMVEP stimulation stability improvement method based on gaze region switching as described in this invention.

[0031] Figure 3 This is a schematic diagram of the timing and control logic of the "instant start / stop and smooth switching mechanism" that is the core of this invention in a specific switching scenario (switching from region A to region B).

[0032] Figure 4 The diagram shows several functions with gradually varying amplitudes (linear, cosine window, exponential).

[0033] Figure 5 This is a flowchart illustrating the workflow of the "switching protection window" mechanism of this invention.

[0034] Figure 6 This is a schematic diagram of EEG data processing using a switching protective window strategy. Detailed Implementation

[0035] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0036] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0037] like Figure 1-6 As shown, this invention provides a method, system, and storage medium for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching, belonging to the field of brain-computer interface technology. The method includes: real-time tracking of the user's eye movement information and determining the screen region being gazed at; when the gaze region switches, executing a smooth switching control process to fade out SSMVEP stimulation leaving the region and / or gradually fade in SSMVEP stimulation entering the region; during the execution of the smooth switching control process, activating a switching protection window, and processing the synchronously acquired EEG data using a predetermined protective decoding strategy during the duration of the protection window, the protective decoding strategy including an ignoring strategy or a weighted attenuation strategy; finally, generating control commands for driving external devices or switching the interactive interface based on the decoded EEG signals. This invention effectively solves the problem of sudden changes in local stimulation and a decrease in the signal-to-noise ratio induced by gaze point movement, significantly improving the decoding stability of the system and the user experience.

[0038] The following specific embodiments illustrate in detail the method, system, and storage medium of the present invention for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching: Example 1: System Architecture and Basic Processes This embodiment describes in detail the hardware and software configuration of the brain-computer interface system that implements the method of the present invention, as well as the overall operation flow of the method.

[0039] 1.1 System Hardware Configuration: like Figure 1 As shown, the system mainly includes the following physical components: Display device: Used to present visual stimuli. Typically a liquid crystal display (LCD) or organic light-emitting diode (OLED) screen with a refresh rate of at least 60Hz to ensure the accuracy of SSMVEP frequency encoding.

[0040] Eye-tracking device: Integrated into a display device or installed independently, used to capture the user's eye movements in real time. Preferably, an infrared eye tracker based on the pupil-corneal reflex (PCCR) principle is used, with a sampling rate of at least 60Hz and spatial accuracy better than 1° of visual angle. This device includes at least one near-infrared camera and a matching infrared light source. The tobii device in CN113419628A can be referenced as an eye-tracking device.

[0041] EEG acquisition equipment: Used to acquire the user's scalp EEG signals. It employs a multi-channel (e.g., 8, 16, or 32 channels) wet or dry electrode EEG cap. The electrode layout must cover the occipital lobe (O1, O2, Oz, etc., for SSMVEP signals), the central region (C3, C4, Cz, etc., for MI signals), and reference / ground electrodes. The amplifier bandwidth is typically 0.1-100 Hz, and the sampling rate is no less than 250 Hz.

[0042] Computational Control Unit: A high-performance computer responsible for running the core algorithms of this invention, including eye-tracking data processing, stimulus presentation control, EEG signal processing and decoding, and system logic control. All hardware devices are connected to this computer via USB, Bluetooth, or a dedicated data cable, and software ensures time synchronization.

[0043] External controlled devices (optional): such as a rehabilitation robotic arm, functional electrical stimulation (FES) device, virtual reality (VR) environment, or simple screen cursor, to receive and execute control commands generated by the system.

[0044] 1.2 System Software and Functional Modules: The system software runs on the computing control unit and includes the following core functional modules (corresponding to...) Figure 1 ): Eye tracking module: drives the eye tracker hardware, processes camera images in real time, and outputs the gaze coordinates (x, y) and confidence value (between 0 and 1) in screen pixels through pupil detection, spot localization and three-dimensional gaze estimation algorithms.

[0045] EEG acquisition module: drives EEG amplifier, receives, filters (such as notch filtering to remove power frequency interference) and buffers multi-channel EEG data streams in real time.

[0046] Region determination module: Receives the coordinates of the gaze point and, based on preset screen region division rules (e.g., dividing the screen horizontally into three equal parts), determines which region (left, center, or right) the current gaze point belongs to. The output is a region identifier (e.g., LEFT, CENTER, RIGHT).

[0047] Stimulus Presentation and Control Module: This module uses graphics rendering libraries (such as PsychoPy and OpenGL) to draw and control the display interface. It is one of the core components of this invention, and it: Maintain an internal state machine to record the currently activated stimulus regions.

[0048] The output of the receiving region determination module. When a valid switch in the gaze region is detected (see Example 2 for the determination logic), the smooth switching control algorithm (the core innovation, see Example 2 for details) is invoked to calculate and control the gradual change of the stimulus parameters.

[0049] On the same interface, in addition to rendering SSMVEP stimuli (such as flashing or moving graphics at a specific frequency), corresponding MI prompts (such as the text "Imagine left hand movement", icon highlighting, or short speech synthesis) are also rendered based on the currently active area.

[0050] Signal processing and decoding module: Receives synchronized EEG data streams and event markers (timestamps) from the stimulation module. This module contains two parallel processing threads or pipelines: The SSMVEP decoding pipeline performs short-time Fourier transform (STFT) or canonical correlation analysis (CCA) on the EEG data of the occipital channel to identify the frequency components with the strongest energy and map them to the corresponding gaze region.

[0051] MI decoding pipeline: After the MI prompt appears, feature extraction (such as common spatial pattern CSP, bandpass filter energy) and classification (such as linear discriminant analysis LDA, support vector machine SVM) are performed on the EEG data of the motor sensory cortex channels (such as C3, C4) to determine whether it is a left-hand or right-hand motor image.

[0052] During the period when the switch protection window mechanism (see Example 3) is in effect, this module will call special processing logic instead of the above-mentioned conventional decoding process.

[0053] The fusion decision and control output module integrates the decoding results of SSMVEP and MI (in fusion mode), or directly uses the SSMVEP results (in the early stages of training), to generate the final control commands (such as "left", "select", "right-hand grip"). These commands are sent to external controlled devices via serial port, network socket, or software interface, or used to update the internal state of the current interactive software (such as switching to the next training task).

[0054] 1.3 Overall Method Flow: Combination Figure 2 The online execution process of this method is as follows: S100, System Startup and Initialization: The user puts on the EEG cap and eye tracker.

[0055] The software starts and loads configuration files (such as screen resolution, region division, stimulation frequency, and MI prompt content).

[0056] Perform eye-tracking calibration: Five or nine calibration points are displayed on the screen in sequence. The user gazes at each point, and the system establishes a mapping model between the physiological parameters of the eyeball and the screen coordinates.

[0057] Perform brain electrical impedance testing: check the contact impedance between each electrode and the scalp to ensure it is below a preset threshold (e.g., 50 kΩ).

[0058] Main loop begins: S200: Real-time eye tracking: The eye tracking module continuously outputs the latest gaze data at the highest frequency (e.g., 120Hz).

[0059] S300: Gaze Region Determination: The region determination module maps a continuous gaze point stream to discrete region identifiers. To prevent region jitter caused by eye movement noise, a simple hysteresis algorithm can be used (e.g., a switch is confirmed only if N frames are detected continuously in the new region).

[0060] S400: Determine if the region has changed: Compare the currently determined region with the previous stable region recorded in the system.

[0061] If no changes are made: the process jumps to S600 to maintain the current stimulus and acquisition status.

[0062] If a change occurs: This indicates that a potential "gaze region switching" event has been detected.

[0063] Core processing: Smooth switching and protection window (S500, S700 related): S500: Execute a smooth transition mechanism. The stimulus presentation and control module initiates a "fade-out" process for stimuli in the old region and a "fade-in" process for stimuli in the new region based on the new region identifier. Simultaneously, the MI prompt is updated in sync with this process. Fine-grained control of this step is crucial for ensuring the stability of SSMVEP; see Example 2 for details.

[0064] Simultaneously, the signal processing and decoding module receives a "switching start" event flag and initiates a switching protection window (S700 association mechanism). During the following T_guard time (e.g., 200ms), the decoder will enter a special operating mode.

[0065] Signal acquisition and processing (S600, S700): S600: Synchronous EEG acquisition. The EEG acquisition module works continuously and sends EEG data with precise timestamps to the processing module.

[0066] S700: Decoding within the protection window. During the protection window period, the decoding module uses a preset "protective decoding strategy" to process the EEG data arriving within the window. This mechanism is crucial for ensuring stable decoding output; see Example 3 for details. After the protection window ends, the decoder returns to normal operating mode.

[0067] Command output and feedback (S800, S900): S800: Generates control commands. The fusion decision module generates commands based on the decoding results.

[0068] S900: Execution Control. Control commands are sent to drive external devices (such as robot arm movement) or trigger status updates on the interactive interface (such as task completion notifications or score increases). This control cycle ends.

[0069] Loop and End: The system returns to S200 and begins the next round of processing until the training task is completed or the user stops it manually.

[0070] Example 2: Detailed Implementation of Instant Start / Stop and Smooth Switching Mechanism This embodiment elaborates on... Figure 2 The specific algorithm implementation of step S500 (smooth switching mechanism) is the core of solving the problem of stimulus mutation.

[0071] 2.1 Gaze stability determination and switching trigger: Smooth switching requires confirmation of a valid and stable gaze area shift, rather than a momentary eye drift or saccade. The system employs a multi-condition joint criterion: Spatial stability: Within M consecutive frames (e.g., M=12, corresponding to 100ms @ 120Hz), the variation (e.g., standard deviation) of the gaze point coordinates is less than the threshold R_pixel (e.g., 20 pixels).

[0072] Duration of fixation: The duration for which the fixation point remains within the same new region exceeds a first preset threshold T_stable (adjustable, 200-500ms). Timing begins from the first entry into the region.

[0073] Confidence requirement: The average confidence level of the eye-tracking module output (such as the average of the most recent N frames) exceeds the second preset threshold C_conf (such as 0.7).

[0074] Exclude saccades: Calculate eye movement speed. If it exceeds the third preset threshold V_saccade (e.g., 100° / s), it is determined to be a saccadic period, and all stability timers are reset.

[0075] The system will only formally trigger the smooth switching process from the old region (denoted as Region_prev) to the new region (denoted as Region_curr) when all of the above conditions are met under the logical AND relationship.

[0076] 2.2 Stimulus parameters and state machine: Each predefined region i is associated with a set of stimulus parameters: f_i: Target frequency of SSMVEP stimulation (e.g., left: 12Hz, middle: 15Hz, right: 20Hz).

[0077] phi_i: The instantaneous phase (in radians) of the current stimulus.

[0078] A_i(t): The amplitude of the current stimulus (normalized, 0-1), where 1 represents maximum brightness / contrast.

[0079] state_i: Stimulus state, such as OFF (off), FADING_IN (fading in), ON (stable on), FADING_OUT (fading out).

[0080] The system internally maintains a parameter set for all regions. Initially, A_i=0 and state_i=OFF for all regions.

[0081] 2.3 Amplitude Gradation Control (Fade In / Fade Out): This is a direct way to achieve visual smoothing. When a switch from Region_prev to Region_curr is triggered: Set the target state: Region_prev.state = FADING_OUT, target magnitude A_prev_target = 0.

[0082] Region_curr.state = FADING_IN, target magnitude A_curr_target = 1.

[0083] Determine the transition duration T_ramp: It is usually set to 100-300ms. A fixed value can be used, or it can be adaptively adjusted according to the eye movement confidence (T_ramp is extended when the confidence is low for a smoother transition).

[0084] Calculation amplitude update: In each graphics rendering frame (e.g., at a refresh rate of 60Hz, with a frame period of approximately 16.7ms), the system calculates the new amplitude value A_i for each region based on the elapsed transition time t_elapsed.

[0085] For the fade-out region (Region_prev):

[0086] For the fade-in region (Region_curr):

[0087] Linear or exponential functions can also be used, see Figure 4 In comparison, the cosine window function has a slope of zero at both the beginning and end, resulting in the most natural transition.

[0088] Figure 4 The key parameters are explained below: A_max: Maximum stimulus amplitude (brightness / contrast); T_ramp: Gradation time (50-500ms, preferably 100-300ms); τ: Time constant of the exponential function (30-120ms); t: Time from the start of the gradient (0≤t≤T_ramp).

[0089] State update: When t_elapsed>= T_ramp, set Region_prev.state to OFF and Region_curr.state to ON, and the fading process ends.

[0090] 2.4 Phase continuity processing: SSMVEP stimulation is periodic. Starting the fade-in directly with zero phase would introduce discontinuous harmonics in the frequency domain. Therefore, it is necessary to ensure that the phases of the Region_curr stimulation are "naturally" consecutive.

[0091] Record the switching time: Record the absolute system time t_switch that triggered the switching.

[0092] Calculate the theoretical phase increment: At time t_switch, assuming an ideal sine wave with frequency f_curr has been running continuously, its phase should be phi_theoretical = 2 * pi * f_curr * t_switch (modulo the system startup time).

[0093] Set the initial phase: Set the initial phase phi_curr of Region_curr to phi_theoretical. This means that the first fluctuation cycle of a stimulus that fades in from t_switch is in phase with a virtual, always-present f_curr signal.

[0094] A more precise approach is to consider the delay Δt from the cessation of the old stimulus to the start of the new stimulus fading in, and compensate for it using the following formula:

[0095] Where φ_prev is the instantaneous phase when the old stimulus stops.

[0096] 2.5 Crossfade in / out: To achieve a seamless transition, the fade-out of Region_prev and the fade-in of Region_curr must be synchronized, i.e., using the same T_ramp and a synchronized t_elapsed timer. This ensures that at any time t, A_prev(t) + A_curr(t) ≤ 1 (assuming normalization), avoiding the visual conflict and potential epileptic risk of two strong stimuli coexisting, while also mitigating large fluctuations in overall screen brightness.

[0097] 2.6 Timing synchronization with MI prompts: The timing of the MI cue presentation must be precisely aligned with the establishment process of the SSMVEP stimulus to guide the user to immediately begin motion visualization once visual attention is in place.

[0098] Trigger condition: When the stimulus amplitude A_curr(t) of Region_curr exceeds a threshold A_trigger (e.g., 0.6) during the fade-in process, the system triggers the MI prompt.

[0099] Prompt: Based on the region semantics of Region_curr (e.g., left side corresponds to left hand), present the corresponding MI instructions. This could be: Visual cue: Display an icon (such as a hand icon) that is highlighted or has a blinking border near Region_curr for about 2-4 seconds.

[0100] Auditory cue: Play a short voice instruction (such as "Imagine moving your left hand") through a speaker.

[0101] Timestamp: At the instant the MI prompt appears, the system writes a unique event marker to the EEG data stream. This marker contains both region information and event type (e.g., EVENT_MI_CUE_LEFT). The accuracy of this timestamp must be synchronized with the EEG sampling clock (error < 10ms) for accurate extraction and analysis of subsequent MI-related EEG data segments.

[0102] Example 3: Detailed Implementation of the "Switch Protective Window" Mechanism This embodiment describes in detail Figure 5 and Figure 6 The “switch protection window” mechanism shown is responsible for protecting the decoding system from transient artifacts during the physical process of smooth switching.

[0103] 3.1 Definition and activation of the protection window: Definition: The switching protection window is a time interval [t_switch, t_switch + T_guard] that starts at the switching trigger time t_switch and lasts for a duration of T_guard.

[0104] Duration T_guard: Typically set to 100ms to 300ms. Its length should be slightly greater than or equal to the smooth transition time T_ramp to cover the entire period of significant amplitude change and any subsequent transient EEG response that may remain. For example, T_ramp = 150ms, T_guard = 200ms.

[0105] Start-up: When the stimulus presentation and control module executes the switching trigger, it simultaneously sends a "protection window start" signal (or event marker) to the signal processing and decoding module.

[0106] 3.2 Decoding strategy within the protected window: During the protection window period, the decoding module suspends its regular decision-making logic based on a fixed time window and instead adopts one of the following two preset strategies: Strategy 1: Ignoring Operation: The decoder internally maintains an "output hold" state. Within the hold window, the decoder does not perform feature extraction and classification calculations for any arriving EEG data.

[0107] Output: The decoder continuously outputs valid commands that were determined just before the start of the guard window (last_valid_command). If no valid command was previously available, a neutral command (NEUTRAL) representing "no operation" or "pending" is output.

[0108] Advantages: Simple to implement, low computational load, and completely avoids the contamination of decision-making by unreliable data within the window.

[0109] Disadvantages: It introduces a fixed instruction output delay (approximately T_guard), which may affect the experience in scenarios requiring fast and continuous control.

[0110] Strategy 2: Weighted Attenuation Operation: The decoder continues to perform routine processing on the arriving EEG data (such as filtering, feature extraction, classification), but applies a time-varying weight w(t) to the "feature vector" or "classifier score" that is ultimately used for decision-making.

[0111] Weighting function: w(t) is a function of time t (starting from t_switch) and is defined in the interval [0, T_guard). It is usually designed to monotonically increase from 0 (or a very small value ε) to 1.

[0112] Linear recovery: w(t) = t / T_guard Cosine recovery: w(t) = (1 - cos(π * t / T_guard)) / 2 (smoother) application: If feature-level fusion is performed: the extracted feature vector is multiplied by w(t) and then fed into the classifier.

[0113] If fusion is performed at the decision level: multiply the probability or score output by the classifier by w(t).

[0114] For power spectral analysis of SSMVEP: multiply the magnitude of the calculated power spectral density at frequency f_curr by w(t).

[0115] Output: The decoder makes a decision based on the weighted result and outputs the instruction.

[0116] Advantages: The output is continuous without hard interruptions, resulting in a smoother user experience.

[0117] Disadvantages: It is slightly complex to implement, and the low-quality data in the early stages within the window still has a slight impact on decision-making.

[0118] 3.3 Ending and Restoring the Protective Window: When the system time reaches t_switch+T_guard, the protection window automatically ends. Upon receiving the "protection window ends" signal, the decoding module immediately clears the special processing state and fully restores the normal decoding process described in Example 1.

[0119] 3.4 Adaptive Strategy Selection (Advanced Feature): The system can integrate a simple signal quality monitor (SQM) to dynamically select protection strategies based on real-time conditions. Inputs: real-time eye-tracking confidence, noise level estimate of EEG signal (e.g., high-frequency power), and user's historical performance.

[0120] logic: If the signal quality is good (high confidence, low noise), choose strategy two (weighted attenuation) to pursue smoothness.

[0121] If the signal quality is poor (low confidence, high noise, or the user is fatigued), choose strategy one (ignore) to prioritize the reliability of the decision.

[0122] If eye movement signals are completely lost, a more advanced degraded mode may be triggered (such as switching to pure MI mode or pausing the system).

[0123] Example 4: A Case Study of the Comprehensive Application of the Method in Neurorehabilitation Training Scenarios This embodiment uses a specific upper limb rehabilitation training task for a stroke patient as an example to demonstrate how the method of the present invention can be integrated and applied.

[0124] 4.1 Scene Setup: Objective: To train patients to control their virtual or physical right hand to perform grasping movements via a brain-computer interface in order to promote neural remodeling.

[0125] Interface: The screen is divided into left and right areas. The left area has a gray background and contains a static left-hand icon; the right area is similar. Initially, the SSMVEP stimuli (designed as an abstract light flow pattern rotating clockwise) in both areas are in the OFF state.

[0126] Stimulation parameters: left-side stimulation frequency f_left = 10 Hz, right-side stimulation frequency f_right = 12 Hz. MI prompts are voice and icon highlighting.

[0127] External device: A right-hand rehabilitation glove with force feedback.

[0128] 4.2 Single training trial procedure: Preparation phase: The screen displays "Please focus on the right side area to begin." The patient shifts their gaze to the right side area.

[0129] Gaze detection and smooth transition triggering (S200-S400): The system detected that the gaze point remained stable in the right region for more than 300ms, with a confidence level >0.8.

[0130] The switch is deemed valid (from no area or left side to right side).

[0131] Perform a smooth handover (S500): Fade in: The rotating pattern in the right-hand area begins to fade from completely transparent to completely opaque within 150ms using a cosine window. Simultaneously, its phase is set to synchronize with a continuous 12Hz virtual signal.

[0132] Fade out: The left-side area (if it was previously active) fades out simultaneously.

[0133] MI prompts: When the stimulation amplitude on the right side reaches 70% (approximately 105ms later), the system triggers: (a) the right hand icon on the right side is highlighted in green; (b) the voice message "Please imagine grasping with your right hand" is played.

[0134] Event flag: Write the flag MI_CUE_RIGHT to the EEG data stream the instant the MI prompt appears.

[0135] Toggle protection window activation (S700 associated): The system also starts a protection window with T_guard = 200ms.

[0136] This trial was configured to use Strategy 2 (weighted decay), with the weighting function being linear recovery.

[0137] EEG Acquisition and Processing (S600, S700): EEG is continuously collected.

[0138] Within the guard window of [MI_CUE_RIGHT, MI_CUE_RIGHT+200ms], the decoder processes the EEG data, but applies a weight that increases linearly from 0 to 1 to the extracted μ-rhythm (8-13Hz) energy characteristics of the C3 / C4 channels.

[0139] After 200ms, the protection window ends, and the decoder begins normal analysis of subsequent EEG data (primarily analyzing the imagination period data from 0.5s to 3s after the MI prompt).

[0140] Decoding and Feedback (S800, S900): SSMVEP decoding: Analysis of the signal-to-noise ratio of the occipital lobe O1 / O2 / Oz channels at 10Hz and 12Hz. Due to stable stimulation, a significant peak should be observed at 12Hz to confirm that the patient is indeed looking to the right.

[0141] MI Decoding: Analyze the weighted motor cortex features. The classifier determines the probability of "right-handed imagination" to be 85%.

[0142] Decision: Both SSMVEP and MI results point to the "right-hand side" and have high confidence levels. The fusion module generates the instruction GRASP_RIGHT.

[0143] Control output: Drive external device: The command is sent to the rehabilitation glove, which performs a gentle assistive grasping motion, providing proprioceptive feedback.

[0144] Control interface: The virtual right-hand model on the screen performs a grasping animation and displays "Success!" and a score. After 2 seconds, the interface resets, ready for the next attempt.

[0145] 4.3 Effect Analysis: Throughout the process: Visually: Patients do not experience sudden, glaring flashes; the stimulation is gentle and natural, reducing fatigue.

[0146] In terms of signal: Due to the smooth fade-in and phase continuity, the induced 12Hz SSMVEP signal emerges clearly and stably from the background, with a high signal-to-noise ratio.

[0147] In terms of decoding: the protective window mechanism avoids interference from EEG data that may be contaminated by early components of visual evoked potentials (such as P1, N1) during the initial switching phase (0-200ms) on MI classification, thereby improving the purity of feature extraction and classification accuracy during the "imagination period".

[0148] At the system level, a virtuous cycle has been achieved, from "stable gaze" to "high-quality evoked signals" and then to "reliable decoding and control," providing a technical foundation for effective rehabilitation training.

[0149] Example 5 This embodiment discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the method for improving the stability of local SSMVEP stimulation of brain-computer interfaces based on gaze region switching as described in embodiments 1-4 above.

[0150] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching, applied to a brain-computer interface system, wherein the system divides at least two predefined regions on the same display interface, and activates SSMVEP stimulation in a region only when the user's gaze is detected in that region, characterized in that, The method includes the following steps: S1. Track the user's eye movement information in real time to obtain the position of the gaze point; S2. Determine the predefined screen area that the user is currently looking at based on the position of the gaze point; S3. When it is determined that the user's gaze area has changed, a smooth transition control process is executed to control the fading out of the SSMVEP stimulus leaving the area and / or the fading in of the SSMVEP stimulus entering the area; the smooth transition control process includes gradual control of the stimulus amplitude. S4. During the execution of the smooth switching control process, a switching protection window is activated, and the switching protection window lasts for a preset time length. S5. During the duration of the switching protection window, the synchronously acquired EEG data is processed using a predetermined protective decoding strategy. S6. Based on the EEG signal processed in step S5, decode it to generate control commands, which are used to drive external devices or control the switching of the interactive interface.

2. The method for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching according to claim 1, characterized in that, In step S5, the protective decoding strategy is an "ignore strategy": within the switching protection window, the EEG decoder pauses the output of new classification instructions based on the EEG data within that time period, and maintains the previous instruction state or outputs a neutral state.

3. The method for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching according to claim 1, characterized in that, In step S5, the protective decoding strategy is a "weighted attenuation strategy": within the switching protection window, the EEG decoder assigns a weight w(t) that changes over time to the EEG data samples within that time period, wherein the weight at the beginning of the protection window is lower than the weight at the end of the protection window, and then the weighted data is used for classification.

4. The method for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching according to claim 1, characterized in that, In step S3, "when it is determined that the user's gaze area has changed" means that the gaze point stays in the newly entered predefined screen area for a longer period of time than a first preset threshold, and the gaze point confidence level output by the eye tracking system exceeds a second preset threshold.

5. The method for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching according to claim 1, characterized in that, In step S3, "gradual control of stimulus amplitude" refers to the process by which the visual intensity parameter of the stimulus changes from an initial value to a target value over time. The change process lasts for a preset gradual time T_ramp, where 50ms ≤ T_ramp ≤ 500ms. The gradual control uses at least one of a linear function, a cosine window function, or an exponential function to modulate the stimulus amplitude.

6. The method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching according to any one of claims 1-5, characterized in that, In step S3, the smooth switching control process further includes phase continuity processing: setting an initial phase φ_new for the SSMVEP stimulus entering the region, which is calculated using the following formula: Where φ_prev is the reference phase, f is the target frequency of the SSMVEP stimulus entering the region, and Δt is the time interval from the expiration of the stimulus leaving the region to the start of the fade-in of the stimulus entering the region.

7. The method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching according to any one of claims 1-5, characterized in that, In step S3, the smooth switching control process adopts a cross-fade-in / fade-out method: the fading out of the leaving area and the fading in of the entering area are controlled to overlap at least partially in time.

8. The method for improving the stability of local SSMVEP stimulation in a brain-computer interface based on gaze region switching according to any one of claims 1-5, characterized in that, During the SSMVEP stimulation fade-in process or after reaching a predetermined amplitude in the entry area, a motion imagery cue corresponding to that area is triggered synchronously.

9. A system for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching, characterized in that, include: The eye-tracking module is used to obtain the user's gaze point position in real time; The region determination module is used to determine the predefined screen region that the user is currently looking at based on the position of the gaze point; A stimulus presentation and control module is used to present SSMVEP stimuli on a display interface; the stimulus presentation and control module is configured to: when the output of the region determination module indicates a change in the gaze region, execute smooth switching control logic to control the SSMVEP stimuli leaving the region to fade out and / or the SSMVEP stimuli entering the region to fade in; the smooth switching control logic includes gradual control logic for the stimulus amplitude; The signal processing and decoding module is configured to: initiate a switching protection window during the execution of the smooth switching control logic, and process the synchronously acquired EEG data using a predetermined protective decoding strategy during the duration of the switching protection window, and generate control commands based on the processing results.

10. The system for improving the stability of local SSMVEP stimulation in brain-computer interfaces based on gaze region switching according to claim 9, characterized in that, The stimulus presentation and control module is also configured to: during the fade-in process of the SSMVEP stimulus in the entry area or after reaching a predetermined amplitude, synchronously trigger a motion imagery prompt corresponding to the area.

Citation Information

Patent Citations

  • Visual target dynamic variable brain-computer interface method based on eye movement tracking

    CN113419628A