A brain-computer interface closed-loop neuromodulation method, state machine and electroencephalogram detection device

CN123024259APending Publication Date: 2026-11-03XUANWU HOSPITAL OF CAPITAL UNIV OF MEDICAL SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611176850.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In the existing technology, when nerve electrical stimulation and EEG signal acquisition are performed simultaneously, stimulation artifacts are easily introduced into the sampling, which leads to a decrease in the reliability of EEG sampling and may damage the sampling circuit.

Method used

A single ear electrode is reused as both an EEG reference acquisition electrode and a nerve stimulation electrode. The two functional circuits are integrated through a single shared connection point, and a state machine is used to precisely control the gating network to switch the circuit path in a time-division manner, so that the two working stages of EEG acquisition and nerve stimulation are independent of each other, avoiding crosstalk of stimulation signals.

Benefits of technology

It effectively reduces the interference of stimulus artifacts on EEG signals, improves the accuracy and reliability of EEG detection data, reduces equipment size and assembly costs, and enhances the safety of sampling circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123024259A_ABST
    Figure CN123024259A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electroencephalogram detection, and particularly relates to a brain-computer interface closed-loop neural regulation method, a state machine and an electroencephalogram detection device. The method comprises the following steps: acquiring electroencephalogram detection data under the condition that a common connection point is in communication with an electroencephalogram reference path, the electroencephalogram detection data being acquired by an electroencephalogram acquisition electrode in contact with a user based on the electroencephalogram reference path, and the electroencephalogram reference path being connected to the common connection point through a gating network; generating a judgment result according to the electroencephalogram detection data and a control condition; under the condition that the judgment result indicates that neural stimulation is enabled, controlling the gating network to switch the connection between the common connection point and the electroencephalogram reference path to a connection with a neural stimulation path; and after neural stimulation is performed on the user by using a concha multiplexing electrode in contact with the user based on the neural stimulation path, controlling the gating network to switch the connection between the common connection point and the neural stimulation path to the connection with the electroencephalogram reference path, so as to acquire electroencephalogram detection data after the neural stimulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electroencephalogram (EEG) detection technology, and particularly relates to a brain-computer interface closed-loop neural modulation method, a state machine, and an EEG detection device. Background Technology

[0002] In the field of closed-loop modulation technology combining neural electrical stimulation with EEG signal acquisition, high-intensity stimulation pulses can easily generate stimulation artifacts in the EEG acquisition channel, with amplitudes far exceeding the effective EEG signal. This can lead to problems such as amplifier saturation, delayed signal recovery after stimulation, and inaccurate closed-loop modulation judgments. Currently, various suppression and correction schemes for stimulation artifacts have been disclosed, including signal masking, template subtraction, adaptive filtering, multi-channel spatial prediction, co-electrode stimulation recording, and circuit current and voltage limiting. These techniques can achieve noise reduction and artifact optimization of electrophysiological signals to a certain extent and are widely used in implantable neuromodulation, multi-channel electrophysiological recording, and other related equipment.

[0003] However, in existing technologies, stimulation and sampling are performed simultaneously, which can easily cause stimulus artifacts to enter the sampling process, resulting in a decrease in the reliability of EEG sampling and damage to the sampling circuit. Summary of the Invention

[0004] In view of this, embodiments of this application provide a brain-computer interface closed-loop neuromodulation method, a state machine, and an EEG detection device to solve the problems of decreased reliability of EEG sampling and damage to sampling circuits in existing brain-computer interface closed-loop neuromodulation methods.

[0005] A first aspect of this application provides a closed-loop neuromodulation method for a brain-computer interface, comprising: acquiring electroencephalogram (EEG) detection data when a common connection point is connected to an EEG reference path, wherein the EEG detection data is acquired based on the EEG reference path through EEG acquisition electrodes in contact with a user, and the EEG reference path is connected to the common connection point through a gating network; generating a judgment result based on the EEG detection data and control conditions, wherein the control conditions characterize judgment conditions for whether to perform neural stimulation; if the judgment result indicates that neural stimulation is enabled, controlling the gating network to switch the connection between the common connection point and the EEG reference path to a connection with a neural stimulation path; and after performing neural stimulation on the user using a reusable auricular electrode in contact with the user based on the neural stimulation path, controlling the gating network to switch the connection between the common connection point and the neural stimulation path to a connection with the EEG reference path to acquire EEG detection data acquired by the EEG acquisition electrodes after neural stimulation.

[0006] According to an embodiment of this application, the brain-computer interface closed-loop neuromodulation method further includes: determining a state detection result based on the state detection data of the reusable auricular electrode; if the state detection result indicates that the reusable auricular electrode is in an abnormal state, disconnecting the connection between the reusable auricular electrode and the EEG reference path, and connecting a spare reference electrode to the EEG reference path, so as to use the spare reference electrode to collect EEG detection data.

[0007] According to an embodiment of this application, the brain-computer interface closed-loop neuromodulation method further includes: when the reusable auricular electrode returns to its normal state, switching the EEG reference path from the backup reference electrode to the reusable auricular electrode to resume the use of the reusable auricular electrode for EEG detection data acquisition.

[0008] According to embodiments of this application, the state detection result is determined based on the state detection data of the reusable concha electrode, including at least one of the following: determining the contact state between the reusable concha electrode and the user based on the detection current, AC impedance, or contact impedance; determining the effectiveness of the neural stimulation path associated with the reusable concha electrode based on the bias potential, common-mode voltage, input saturation state, or data noise; and determining the contact state of the shared connection point or stimulation circuit based on the output voltage, feedback current, loop impedance, current limiting state, or the conduction state of the gating network or connector contact of the neural stimulation path.

[0009] According to an embodiment of this application, the brain-computer interface closed-loop neuromodulation method further includes: controlling the auricular reusable electrode to pause neurostimulation before controlling the EEG acquisition electrode to acquire EEG detection data after the neurostimulation; first disconnecting the connection between the common connection point and the neurostimulation path, and then connecting the common connection point to the EEG reference path; detecting the data quality based on a data detection method, so as to control the EEG acquisition electrode to acquire EEG detection data after the neurostimulation when the detection result is normal, wherein the data detection method includes at least one of the following: baseline reconstruction method, saturation detection method, impedance check method, and signal quality assessment method.

[0010] According to an embodiment of this application, the brain-computer interface closed-loop neural modulation method further includes: marking each event with time and event based on a unified clock marking method, wherein the event includes the acquisition time and sampling point type of EEG detection data, the activation time and pulse type of neural stimulation, the connection switching time of the shared connection point, the switching time of the connection status of the reusable auricular electrode and the backup reference electrode, and the status detection result and time of the reusable auricular electrode.

[0011] According to an embodiment of this application, generating a judgment result based on the EEG detection data and control conditions includes: determining the user's current state based on the EEG detection data; and determining the judgment result based on the current state and the control conditions.

[0012] According to an embodiment of this application, controlling the gating network to switch the connection between the common connection point and the EEG reference path to a connection with the neural stimulation path includes: sending a gating control signal to the gating network so that the gating network first disconnects the connection between the common connection point and the EEG reference path, and then connects the common connection point to the neural stimulation path, wherein the EEG reference path is in a protection mode after disconnecting the connection with the EEG reference path.

[0013] A second aspect of this application provides a brain-computer interface closed-loop neuromodulation device, comprising: an acquisition module, configured to acquire electroencephalogram (EEG) detection data when a common connection point is connected to an EEG reference path, wherein the EEG detection data is acquired based on the EEG reference path through EEG acquisition electrodes in contact with a user, and the EEG reference path is connected to the common connection point via a gating network; a generation module, configured to generate a judgment result based on the EEG detection data and control conditions, wherein the control conditions characterize judgment conditions for whether to perform neural stimulation; and a switching module, configured to, when the judgment result indicates that neural stimulation is enabled, control the gating network to switch the connection between the common connection point and the EEG reference path to a connection with a neural stimulation path; and, after performing neural stimulation on the user using a reusable auricular electrode in contact with the user based on the neural stimulation path, control the gating network to switch the connection between the common connection point and the neural stimulation path to a connection with the EEG reference path to acquire EEG detection data acquired by the EEG acquisition electrodes after neural stimulation.

[0014] A third aspect of this application provides a state machine, including: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.

[0015] A fourth aspect of this application provides an electroencephalogram (EEG) detection device, comprising: a common connection point connected to a gating network; and a gating network connected to an EEG reference path and a neural stimulation path, respectively. EEG acquisition electrodes, used to collect EEG data; and a state machine.

[0016] According to a fifth aspect of this application, a computer-readable storage medium is also provided, on which a computer program or instructions are stored, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.

[0017] According to a sixth aspect of this application, a computer program product is also provided, comprising a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0018] The beneficial effects of this application embodiment compared with the prior art are as follows: A single ear electrode is reused as both an EEG reference acquisition electrode and a neurostimulation electrode. The two functional circuits are integrated through a single shared connection point, eliminating the need for additional ear electrodes and wiring, effectively simplifying the device hardware structure and reducing device size and assembly costs. Simultaneously, the state machine precisely controls the time-sharing switching of the circuit path via the gating network, ensuring that the EEG acquisition and neurostimulation phases are independent and do not interfere with each other. This effectively prevents stimulation signals from crosstalking to the EEG reference input, significantly reducing the interference of stimulation artifacts on the EEG signal, significantly improving the accuracy and reliability of the entire EEG detection data, and enhancing the safety of the sampling circuit. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart of a brain-computer interface closed-loop neuromodulation method according to an embodiment of this application is shown; Figure 2 A flowchart of a brain-computer interface closed-loop neuromodulation method according to another embodiment of this application is shown; Figure 3 A flowchart of a brain-computer interface closed-loop neuromodulation method according to another embodiment of this application is shown; Figure 4 A structural block diagram of a brain-computer interface closed-loop neuromodulation device according to an embodiment of this application is shown; Figure 5 A block diagram of an electronic device suitable for implementing the above-described method according to an embodiment of this application is shown. Detailed Implementation

[0021] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0023] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0024] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0025] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0026] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0027] Most existing mainstream technologies are designed for implantable devices and multi-channel acquisition systems, and cannot adapt to the hardware constraints and usage scenarios of single-lead EEG chips and wearable devices like the tVNS in the ear. Under the limited wearing space and single-channel resource constraints in the ear, traditional separate electrode layouts significantly increase the number of electrodes and wiring complexity, reducing user comfort. Furthermore, existing solutions generally process stimulation events and EEG sampling processes independently, lacking a precise temporal correspondence under a unified clock reference, reducing the reliability of real-time circuit switching and increasing the difficulty of artifact localization and signal recovery window identification. In addition, conventional electrodes only have a simple detachment alarm function; for single-point failure scenarios where the ear electrode is reused as both a stimulation electrode and a reference electrode, automatic fault-tolerant switching of the reference path is not possible, making it difficult to guarantee the continuity of acquisition and system stability for long-term continuous EEG monitoring during the perioperative period, postoperative period, and at night.

[0028] In view of this, embodiments of this application provide a brain-computer interface closed-loop neuromodulation method, a state machine, and an EEG detection device to solve the problems of decreased reliability of EEG sampling and damage to sampling circuits in existing brain-computer interface closed-loop neuromodulation methods.

[0029] In this embodiment, a single ear electrode is reused as both an EEG reference acquisition electrode and a neurostimulation electrode. By integrating the two functional circuits through a single shared connection point, there is no need to add additional ear electrodes and wiring, effectively simplifying the device hardware structure and reducing device size and assembly costs. Simultaneously, a state machine precisely controls the time-sharing switching of the circuit path via a gating network, ensuring that the EEG acquisition and neurostimulation phases are independent and do not interfere with each other. This effectively prevents stimulation signals from crosstalking to the EEG reference input, significantly reducing the interference of stimulation artifacts on the EEG signal, significantly improving the accuracy and reliability of the entire EEG detection data, and enhancing the safety of the sampling circuit.

[0030] Figure 1 A flowchart of a brain-computer interface closed-loop neural modulation method according to an embodiment of this application is shown.

[0031] Please see Figure 1 One embodiment of a brain-computer interface closed-loop neural modulation method in this application may include operations S101 to S104: In operation S101, when the common connection point is connected to the EEG reference path, EEG detection data is acquired. The EEG detection data is based on the EEG reference path and is acquired through EEG acquisition electrodes that are in contact with the user. The EEG reference path is connected to the common connection point through a gating network.

[0032] In operation S102, a judgment result is generated based on the EEG detection data and control conditions, wherein the control conditions characterize the judgment conditions for whether to perform neural stimulation.

[0033] In operation S103, if the judgment result indicates that neural stimulation is enabled, the control gating network switches the connection between the shared connection point and the EEG reference path to the connection with the neural stimulation path.

[0034] In operation S104, after performing neural stimulation on the user using a reusable auricular electrode that is in contact with the user based on the neural stimulation pathway, the control gating network switches the connection of the common connection point with the neural stimulation pathway to the connection with the EEG reference pathway, so as to obtain the EEG detection data after neural stimulation acquired by the EEG acquisition electrode.

[0035] This embodiment discloses a closed-loop neuromodulation method for brain-computer interfaces with precise state machine control throughout the process. This method is compatible with integrated devices that combine single-lead EEG acquisition and tVNS (Transcutaneous Vagus Nerve Stimulation) auricular nerve stimulation. The core of this method relies on reusable auricular electrodes, shared connection points, and a gating network. Through time-sharing control of the circuit path switching by the state machine, it alternately realizes the closed-loop operation of user EEG signal acquisition, auricular nerve stimulation, and post-stimulation EEG signal retesting. This solves the problems of electrode redundancy and stimulation signal interference in EEG detection in traditional devices. The specific execution steps are as follows.

[0036] In the initial state, the state machine controls the gating network to maintain path switching, ensuring stable connection between the device's common connection point and the EEG reference path. The common connection point is the docking structure for the device's circuitry, and can utilize conventional hardware contacts such as circuit pins, connector contacts, and solder pads to connect the reusable auricular electrode, which conforms to the user's auricular region, to the overall device circuitry. With this circuit connection established, the device, relying on the EEG reference input terminal of the single-lead EEG front end, acquires the user's raw EEG data through the reusable auricular electrode, completing the basic EEG signal acquisition work before stimulation.

[0037] The device has pre-set control conditions for determining whether to activate neural stimulation, which are the core criteria for closed-loop stimulation. The state machine automatically retrieves these control conditions, compares, analyzes, and judges the collected real-time EEG data, and finally generates a judgment result of whether to activate or deactivate neural stimulation, realizing intelligent closed-loop decision-making based on the user's real-time EEG state.

[0038] When the above judgment result indicates that neurostimulation needs to be activated, the state machine, combined with the device's safe operating status and preset working sequence, drives the gating network to perform circuit switching operations. First, the connection between the shared connection point and the EEG reference path is disconnected. Then, the shared connection point is switched to the neurostimulation path corresponding to the tVNS stimulation output end, so that the reusable electrode in the concha switches from the original EEG reference acquisition mode to the neurostimulation output mode, providing a stable circuit path for subsequent neurostimulation operations.

[0039] After the shared connection point and neural stimulation pathway are stably connected, the device applies tVNS neural stimulation with preset parameters to the user through a reusable electrode in the concha region. Once the single neural stimulation session is complete, the state machine controls the gating network to execute a reverse circuit switch, disconnecting the shared connection point from the neural stimulation pathway and reconnecting it to the EEG reference pathway, restoring the device's EEG acquisition state. The device then acquires the user's EEG signals again, obtaining post-neural stimulation EEG data, thus completing the closed-loop workflow of "EEG acquisition - stimulation determination - neural stimulation - post-stimulation retesting".

[0040] According to embodiments of this application, a single ear electrode is reused as both an EEG reference acquisition electrode and a neurostimulation electrode. By integrating the two functional circuits through a single shared connection point, there is no need to add additional ear electrodes and wiring, effectively simplifying the device hardware structure and reducing device size and assembly costs. Simultaneously, a state machine precisely controls the time-sharing switching of circuit paths via a gating network, ensuring that the EEG acquisition and neurostimulation phases are independent and do not interfere with each other. This effectively prevents stimulation signals from crosstalking to the EEG reference input, significantly reducing the interference of stimulation artifacts on the EEG signal and substantially improving the accuracy and reliability of the entire EEG detection data process.

[0041] Figure 2 A flowchart of a brain-computer interface closed-loop neuromodulation method according to another embodiment of this application is shown.

[0042] Please see Figure 2 The brain-computer interface closed-loop neuromodulation method also includes operations S201 to S202: In operation S201, the status detection result is determined based on the status detection data of the reusable concha electrode.

[0043] In operation S202, if the status detection result shows that the reusable auricular electrode is in an abnormal state, the connection between the reusable auricular electrode and the EEG reference path is disconnected, and a backup reference electrode is connected to the EEG reference path to collect EEG detection data using the backup reference electrode.

[0044] Based on the aforementioned closed-loop EEG detection method, this embodiment adds electrode state detection and reference path reconstruction functions, which are also controlled and executed by the device state machine throughout the process. This enables adaptive switching when the reusable electrode in the concha is abnormal, ensuring continuous and stable EEG detection. The specific steps are as follows.

[0045] The device uses a built-in detachment detection unit to collect real-time status data on the reusable electrodes in the concha. This status detection can be performed continuously in EEG acquisition mode, pre-stimulation switching state, stimulation safety check stage, post-stimulation recovery stage, or system periodic monitoring state, to monitor key parameters such as the contact status, impedance, circuit integrity, and signal quality of the reusable electrodes in the concha in real time.

[0046] The state machine analyzes and determines the working status of the reusable concha electrodes based on the acquired state detection data, and generates corresponding state detection results. Abnormal states of the reusable concha electrodes mainly include fault scenarios such as electrode detachment, abnormal contact impedance, EEG reference path failure, and stimulation circuit abnormalities.

[0047] When the state detection result indicates that the reusable electrode in the concha is in an abnormal state, the state machine immediately activates the safety fault-tolerance mechanism and path reconstruction logic. On the one hand, it can pause or disable tVNS neural stimulation output, and switch the shared connection point to a high-resistance, disconnected, or safe potential state to avoid detection errors and usage risks under abnormal operating conditions. On the other hand, it controls the operation of the reference path reconstruction network, first disconnecting the connection between the EEG reference input terminal or EEG reference path and the faulty reusable electrode in the concha, and then connecting the preset backup reference electrode to the EEG reference input terminal or EEG reference path. Among them, the backup reference electrode is preferably placed on the user's forehead, and under normal operating conditions, it remains in an idle, disconnected, high-resistance standby state and does not participate in routine data acquisition. When an abnormality is detected, the device can also send a prompt message to the user, nursing, or doctor's end to indicate that the reusable electrode in the concha is in an abnormal contact state.

[0048] After the path switch is completed, the device continues to collect EEG data by relying on the normally connected backup reference electrode, ensuring that the EEG monitoring service is not interrupted and achieving fault-tolerant operation under abnormal conditions.

[0049] According to embodiments of this application, the device can monitor the working status of the reusable auricular electrodes in all times and multiple scenarios. It automatically activates the idle frontal backup reference electrode to reconstruct the acquisition path only when the electrode malfunctions, without increasing the complexity of device wiring and acquisition under normal operating conditions. This effectively solves the problem of detection interruption caused by reusable auricular electrodes falling off, poor contact, or circuit failure, significantly improving the device's fault tolerance and operational stability in perioperative and nighttime long-term continuous EEG monitoring scenarios. Simultaneously, a safety control mechanism ensures the safety of the stimulation and detection process.

[0050] According to embodiments of this application, such as Figure 2 As shown, the brain-computer interface closed-loop neuromodulation method also includes operation S203: In operation S203, when the reusable auricular electrode returns to normal, the EEG reference path is switched from the backup reference electrode to the reusable auricular electrode to resume the use of the reusable auricular electrode for EEG data acquisition.

[0051] Based on the above-mentioned fault-tolerant switching scheme for electrode abnormalities, this embodiment further adds a path reversal and data adaptation mechanism after the recovery of the reusable electrode in the ear concha. It is also executed by a state machine combined with a detachment detection unit and a unified timing logic closed loop to realize intelligent recovery switching of the reference path. The specific process is as follows.

[0052] During the process of switching the device to the backup reference electrode to complete the EEG acquisition, the detachment detection unit continues to monitor parameters such as the contact status, contact impedance, circuit integrity, and signal quality of the reusable electrode in the concha in real time, and continuously outputs status detection data to determine whether the faulty electrode has returned to normal.

[0053] When the state machine determines, based on real-time state detection data, that the reusable electrode in the concha has returned to normal contact, and the overall circuitry and stimulation circuitry meet the preset safe operating conditions, the system supports two compliant recovery strategies: First, immediately switch the EEG reference input / EEG reference path back from the current backup reference electrode to the reusable electrode in the concha, restoring the reusable electrode in the concha to its normal EEG acquisition mode through a shared connection point; Second, maintain the current backup reference path in continuous operation until the end of the current complete monitoring cycle before switching back to the original path, adapting to the stable requirements of long-term continuous monitoring.

[0054] After completing the reference path back-switching action, the state machine further verifies and judges the quality of the current EEG signal: if the signal quality meets the normal acquisition standard, the system automatically restores the original EEG closed-loop judgment and neural stimulation decision logic; if the signal quality does not meet the standard, the system performs correction processing such as filtering optimization, abnormal data removal, baseline reconstruction or invalid labeling on the data window of the corresponding time period to avoid unstable signals affecting the accuracy of subsequent detection and stimulation judgment.

[0055] According to embodiments of this application, the aforementioned path switching mechanism enables intelligent adaptive switching after recovery from a faulty reusable auricular electrode. It can instantly restore the optimal ear reusable acquisition path or continue the backup path to ensure stable monitoring cycles, adapting to continuous monitoring scenarios. Simultaneously, through signal quality verification and data correction processing, it avoids judgment errors caused by signal instability in the initial stage of electrode recovery, ensuring continuous and effective EEG data before and after path switching, further improving the stability of the system's closed-loop control and the reliability of the detection data.

[0056] According to embodiments of this application, the state detection result is determined based on the state detection data of the reusable auricular electrode, including at least one of the following: determining the contact state between the reusable auricular electrode and the user based on the detection current, AC impedance, or contact impedance; determining the effectiveness of the neural stimulation path associated with the reusable auricular electrode based on the bias potential, common-mode voltage, input saturation state, or data noise; and determining the contact state of the common connection point or stimulation circuit based on the output voltage, feedback current, loop impedance, current limiting state, or the conduction state of the gated network / connector contact of the neural stimulation path.

[0057] Based on the aforementioned electrode fault-tolerant switching and path back-cutting scheme, this embodiment refines the state detection and judgment mechanism of the reusable electrode in the concha and the corresponding circuit path. The whole is controlled by a state machine, and multi-dimensional and all-round state recognition is achieved by relying on the detachment detection unit. It can accurately determine the electrode contact state, the effectiveness of the stimulation path and the working state of the shared connection point. The specific detection and judgment method is as follows.

[0058] The system's detachment detection unit can collect status detection data of the reusable auricular electrode through multiple detection dimensions, and accurately determine the corresponding status detection results based on the data. Specifically, it includes three types of core judgment logic, which can be selected or combined.

[0059] First, the system determines the contact status between the reusable auricular electrode and the user's skin. The system collects corresponding electrical parameters by inputting a small detection current to the electrode and performing AC impedance or skin contact impedance detection. Based on comparisons with normal parameter values, the system accurately determines whether the reusable auricular electrode adheres well to the user's auricular skin and whether there are any contact abnormalities such as loosening, detachment, or poor contact.

[0060] Second, the system determines the effective working status of the neural stimulation pathway and the reference pathway. The system collects parameters in real time, including the bias potential, common-mode voltage, input saturation state, and data power frequency noise level of the EEG front-end. Data analysis is used to determine whether the EEG reference pathway and neural stimulation pathway corresponding to the reusable auricular electrode are ineffective, disconnected, or malfunctioning, thus identifying pathway transmission faults.

[0061] Third, determine the contact and working status of the shared connection points. During or after nerve stimulation, the system collects parameters such as output voltage, feedback current, loop impedance, and current limiting status of the nerve stimulation path, or collects the conduction status of the gating network and connector contacts, thereby determining whether there are problems such as poor contact at the shared connection points, loop abnormalities in the stimulation circuit, or conduction failure.

[0062] In addition, this system is equipped with a unified clock module and an event marking module, which can provide a high-precision and unified time reference for the device operation process when timing traceability and data alignment are required. It supports high-precision hardware timestamp marking at the microsecond and nanosecond levels, and optimizes nanosecond-level timing. It can accurately anchor the correspondence between various working events and EEG sampling points, and provide accurate timing basis for electrode status determination, fault tracing, data alignment and subsequent signal correction.

[0063] According to the embodiments of this application, a multi-electrical parameter fusion detection method is adopted, which overcomes the limitations of a single detection index and can accurately identify the electrode contact state, the effectiveness of the stimulation path, and the working state of the common connection point, significantly improving the accuracy and comprehensiveness of electrode fault detection. At the same time, relying on a unified clock module to provide a high-precision unified time reference, combined with an event marking module, all key events such as EEG sampling, path switching, stimulation start and stop, electrode abnormalities and path recovery are accurately archived in time sequence, realizing fault traceability, event alignment, and data correspondence, effectively avoiding false detection and false switching problems, ensuring the time sequence synchronization of the entire process of EEG sampling, neural stimulation, and path reconstruction, and further improving the detection accuracy, operational safety, and working stability of the closed-loop system.

[0064] According to an embodiment of this application, the brain-computer interface closed-loop neuromodulation method further includes: classifying the data quality of target detection data into grades, wherein the target detection data is EEG detection data of at least one of the following: a preset time period before and after an abnormal state, data collected using a backup reference electrode, and data collected before and after the recovery of the use of the reusable auricular electrode.

[0065] This embodiment, based on the above-mentioned electrode state detection, fault-tolerant switching, and path reversal, adds a quality grading and accurate processing mechanism for EEG detection data during special periods before and after switching. The whole process is executed uniformly by a state machine combined with an event marking module. It performs graded control on unstable data windows during abnormal electrode switching and recovery reversal processes. The specific implementation process is as follows.

[0066] First, the target detection data is defined as EEG detection data during specific phases, specifically covering at least one of three data windows: EEG data within a preset time period before and after an abnormal state of the reusable auricular electrode; EEG data during the system's activation of the backup reference electrode; and EEG data within a preset time period before and after the reusable auricular electrode returns to normal and the reuse acquisition path is switched back. This type of data, including transient switching, abnormal conditions, and recovery transition periods, is susceptible to circuit switching and fluctuations in electrode contact status, resulting in signal instability and requiring separate quality assessment.

[0067] When the detachment detection unit identifies abnormal conditions such as contact abnormalities, electrode detachment, or incomplete stimulation circuits in the reusable ear concha electrode, the system enters a reference degradation state. The state machine disconnects the reusable ear concha electrode from the EEG reference input, connecting a backup reference electrode to take over EEG acquisition. Simultaneously, the event marking module marks the EEG data windows before and after this state switch with specific events. Similarly, during the recovery phase when the reusable ear concha electrode returns to normal and the system switches back from the backup reference electrode, the data windows before and after recovery are also marked with events.

[0068] The system performs refined data quality grading based on all event-tagged target detection data. According to indicators such as signal noise, baseline shift, loop stability, and signal integrity, it classifies EEG data at different stages into corresponding quality levels, distinguishing between normal valid data, slightly abnormal data, and severely invalid data. Simultaneously, the system enters a dedicated data processing state, adapting and executing differentiated processing strategies for data windows of different quality levels. These strategies include data labeling, abnormal data removal, signal filtering and noise reduction, baseline reconstruction and correction, and invalid data annotation.

[0069] According to embodiments of this application, graded quality control is implemented for key transient window data such as abnormal electrode switching, backup acquisition, and path recovery, accurately distinguishing the quality levels of EEG data under different operating conditions. Through differentiated data correction and screening, inferior interference data caused by switching transients is effectively eliminated, unstable baseline signals are corrected, and abnormal data is prevented from participating in closed-loop stimulation decisions. This retains valid detection data while significantly improving the accuracy of EEG analysis results under electrode switching conditions, enhancing the reliability of long-term continuous EEG monitoring data.

[0070] Figure 3 A flowchart of a brain-computer interface closed-loop neural modulation method according to another embodiment of this application is shown.

[0071] Please see Figure 3 The brain-computer interface closed-loop neuromodulation method also includes operations S301 to S303: When operating S301, before controlling the EEG acquisition electrodes to acquire EEG data after nerve stimulation, control the reusable electrodes in the concha to pause nerve stimulation.

[0072] In operation S302, first disconnect the shared connection point from the neural stimulation pathway, and then connect the shared connection point to the EEG reference pathway.

[0073] In operation S303, data quality is detected based on data detection methods, so as to control the EEG acquisition electrodes to acquire EEG detection data after nerve stimulation when the detection result is normal. The data detection methods include at least one of the following: baseline reconstruction method, saturation detection method, impedance check method, and signal quality assessment method.

[0074] Based on the aforementioned multi-dimensional detection, path switching, and data hierarchical processing, this embodiment refines the safe switching sequence and pre-data quality inspection mechanism after the nerve stimulation ends and before EEG recollection. It is executed collaboratively by a state machine, a unified clock module, and a front-end protection network. Through standardized shutdown protection, a disconnect-before-connect sequence, and multi-dimensional quality verification, it ensures the safety and effectiveness of EEG recollection data after stimulation. The specific implementation process is as follows.

[0075] After a single tVNS neural stimulation pulse is delivered, the system first performs a stimulation shutdown preprocessing operation. The state machine prioritizes controlling the reusable electrode in the concha to pause all neural stimulation outputs, stopping the continuous delivery of stimulation pulses, thus completing the stimulation shutdown preprocessing procedure.

[0076] To avoid short-circuit crosstalk between the stimulation path and the EEG reference path and to protect the EEG front-end circuitry, the system strictly adheres to a "disconnect before reconnect" safety switching sequence. First, the circuit connection between the shared connection point and the neural stimulation path (tVNS stimulation output terminal) is completely disconnected. Then, the device enters a post-stimulation protection state, eliminating residual voltage and transient interference through at least one protection method, such as discharging residual charge, voltage clamping, current limiting, high-resistance holding, or static waiting, thus mitigating the risk of circuit crosstalk. Once the circuit state stabilizes, the shared connection point is reconnected to the EEG reference path, restoring the EEG acquisition hardware pathway.

[0077] Before formally initiating EEG data acquisition after neural stimulation, the system performs pre-processing data quality checks on the current circuit and signal state. These checks can employ at least one of the following methods: baseline reconstruction, saturation detection, impedance checking, and signal quality assessment. Specifically, this includes: correcting the EEG signal baseline, detecting the input saturation state, verifying electrode contact impedance and circuit status, comprehensively assessing real-time signal quality, and screening for abnormal signals and residual circuit interference caused by switching transients.

[0078] The state machine allows the EEG acquisition electrodes to start acquisition and complete the post-stimulation retest process only when the data quality test results show that the signal state is normal and the circuit condition meets the standards. If the test results are abnormal, the acquisition is delayed and state correction and quality testing are continuously performed until the signal meets the acquisition standards.

[0079] According to the embodiments of this application, by employing stimulation pause, circuit discharge protection, and time-sharing switching logic of disconnection before reconnection, the risk of direct connection between the EEG front-end and the stimulation output end is completely eliminated, significantly improving the safety of hardware switching. Simultaneously, a multi-dimensional pre-processing quality control mechanism is added before post-stimulation re-collection, effectively filtering out transient residual interference, baseline distortion, and saturation abnormalities during switching, ensuring the authenticity and validity of the collected post-stimulation EEG data. This avoids the problem of residual stimulation artifacts from the temporal source, further improving the overall accuracy and stability of closed-loop EEG detection and neural stimulation modulation.

[0080] According to embodiments of this application, the brain-computer interface closed-loop neuromodulation method further includes: marking each event with time and event based on a unified clock marking method, wherein the event includes the acquisition time and sampling point type of EEG detection data, the activation time and pulse type of neural stimulation, the connection switching time of the shared connection point, the switching time of the connection status of the reusable auricular electrode and the backup reference electrode, and the status detection result and time of the reusable auricular electrode.

[0081] This embodiment adds a full-dimensional event timing marking mechanism to all the aforementioned EEG detection, electrode control, path switching, and data processing schemes. The state machine links the unified clock module and the event marking module to work together to standardize the time and event marking of various core working events during system operation, so as to achieve full-process event traceability and accurate data alignment. The specific implementation method is as follows.

[0082] A global unified time reference is established based on the device's built-in unified clock module. A high-precision timestamp marking method is used to complete the exclusive time recording and event type labeling for each type of key event during the system operation process. This covers all core links of EEG acquisition, neural stimulation, circuit switching, electrode status detection, and path switching. The specific event types marked include the following five categories.

[0083] First, the system labels events related to EEG data acquisition. Based on a unified clock, the system accurately labels the acquisition time of each EEG detection data point and marks the sampling point type accordingly, distinguishing between different sampling types such as routine steady-state sampling, pre-stimulation baseline sampling, post-stimulation recovery sampling, and abnormal switching transition sampling, thereby achieving precise binding of EEG sampling data with working conditions.

[0084] Second, the system marks neural stimulation-related events. For each tVNS neural stimulation operation, the system uniformly marks the start time of neural stimulation and labels the corresponding stimulation pulse type, distinguishing between different pulse specifications such as routine treatment pulses, adjustment pulses, and safety detection pulses, and accurately recording the timing and parameter attributes of each round of stimulation.

[0085] Third, the system marks the switching events of shared connection points. The system captures the path switching actions of the gating network in real time and accurately records the execution time of each circuit switching at the shared connection point, including all switching moments when the EEG reference path switches to the neural stimulation path and when the neural stimulation path switches back to the EEG reference path, thus completely recording the timing switching nodes of the circuit.

[0086] Fourth, dual-electrode switching status event marking. During the adaptive switching process between the reusable electrode and the backup reference electrode in the concha, the system accurately marks the connection and disconnection switching time of the two types of electrodes, including the time when the backup electrode takes over after the reusable electrode in the concha is abnormally dislodged, and the recovery time when the concha electrode is restored and switches back to the original path, and completely records the switching sequence of the reference electrode.

[0087] Fifth, electrode status detection event marking. For each reusable electrode in the concha, the system synchronously records the corresponding detection judgment time and final status result, accurately retaining the time sequence records of various states such as normal electrode contact, poor contact, detachment, and circuit abnormality, providing time sequence support for subsequent data correction and fault analysis.

[0088] According to embodiments of this application, a standardized time-series marking of key events throughout the entire process is achieved through a unified clock, covering all operational conditions including acquisition, stimulation, switching, and state detection. This solves the problems of chaotic event timing and inaccurate data-operational correlation in traditional equipment. It can accurately distinguish between EEG data and stimulation events at different times and under different operating conditions, providing precise timing data for data quality grading, abnormal data removal, stimulation artifact tracing, and closed-loop control strategy optimization. This effectively improves the accuracy of EEG data analysis, the completeness of event tracing, and the refinement of system closed-loop control.

[0089] According to an embodiment of this application, a judgment result is generated based on EEG detection data and control conditions, including: determining the user's current state based on the EEG detection data; and determining the judgment result based on the current state and control conditions.

[0090] This embodiment, based on the aforementioned closed-loop EEG acquisition and neural stimulation control method, refines the neural stimulation judgment logic to achieve intelligent and differentiated stimulation decisions based on the user's real-time state. This embodiment is executed entirely by a state machine, accurately identifying the user's current state based on the acquired EEG data and generating the final stimulation judgment result in conjunction with preset control conditions, achieving precise on-demand and time-based neural stimulation control. The specific implementation steps are as follows.

[0091] First, based on the collected real-time EEG data, the system analyzes and extracts characteristic parameters of the EEG signals to accurately determine the user's current state. The user's current state includes at least a sleep state. The system can distinguish between deep sleep and light sleep states through core features such as EEG waveform rhythm, frequency band energy, and signal amplitude. It can also adapt to and identify other conventional physiological states, such as wakefulness, providing accurate state-based information for subsequent stimulus decisions.

[0092] Secondly, the state machine matches and compares the identified user's current state with the preset neural stimulation control conditions to ultimately determine whether to enable neural stimulation, thus achieving closed-loop state management. This embodiment sets differentiated control rules for sleep scenarios to adapt to the actual needs of sleep monitoring and neural intervention. In generating the judgment result, it needs to comprehensively consider multiple factors such as sleep state, awakening risk, stimulation purpose, and / or preset control strategies to determine whether to enable tVNS neural stimulation.

[0093] In a specific embodiment: when the user is identified as being in deep sleep, control conditions for allowing neural stimulation are matched. If the risk of awakening is low and other considerations meet the activation conditions, a judgment result of enabling tVNS neural stimulation is generated. When the user is identified as being in light sleep, control conditions for prohibiting neural stimulation are matched. Even if other considerations meet the activation conditions, a judgment result of not enabling neural stimulation is still generated because the risk of awakening is high during light sleep, thus avoiding stimulation during light sleep that may disturb the user's sleep.

[0094] Through the above-mentioned hierarchical judgment logic, the system abandons the fixed and single stimulus triggering method and relies entirely on the user's real-time physiological state to dynamically adjust the stimulus strategy, thereby achieving intelligent and precise triggering of neural stimulation.

[0095] According to embodiments of this application, a user's sleep state is accurately identified through EEG data, and a differentiated stimulation determination mechanism for deep and light sleep is constructed to achieve on-demand triggering of neural stimulation. This effectively avoids the problem of stimulation interfering with user sleep during light sleep stages, allowing neural stimulation intervention to be performed during target sleep states such as deep sleep or periods with low risk of awakening. This ensures the effective implementation of neural stimulation therapy and regulation while significantly improving user sleep comfort. Based on closed-loop decision-making based on physiological states, the intelligence, adaptability, and user experience of the EEG and stimulation closed-loop control system are greatly enhanced.

[0096] According to an embodiment of this application, controlling the gating network to switch the connection between the shared connection point and the EEG reference path to the connection with the neural stimulation path includes: sending a gating control signal to the gating network so that the gating network first disconnects the connection between the shared connection point and the EEG reference path, and then connects the shared connection point to the neural stimulation path, wherein the EEG reference path is in a protection mode after disconnecting the connection with the EEG reference path.

[0097] This embodiment refines and defines the path switching process of the aforementioned shared connection point, specifically disclosing the safety control logic for switching from the EEG reference path to the neural stimulation path. The entire process is executed by the state machine precisely driven by the gating network. Through standardized disconnect-before-connect timing and path protection mechanism, the risk of instantaneous conduction of the two circuits is completely avoided, ensuring the safe and stable operation of the device circuit. The specific implementation process is as follows.

[0098] The gating network in this embodiment can use circuit devices with on / off control capabilities, such as single-pole double-throw switches, double-pole double-throw switches, analog multiplexers, solid-state analog switches, miniature relays, and MOSFET switch arrays. The gating network is equipped with hardware-level first-off-then-on control logic by default, providing a hardware foundation for safe path switching and eliminating circuit crosstalk problems during the switching process.

[0099] When the system determines that neural stimulation needs to be activated and a circuit path switching needs to be performed, the state machine actively sends a dedicated gating control signal to the gating network. After receiving the control signal, the gating network strictly follows the "disconnect first, then connect" timing logic to execute the switching action step by step: First, it prioritizes and completely disconnects the circuit connection between the shared connection point and the EEG reference path, severing the pathway association between the EEG front end and the shared connection point; Second, after the EEG reference path is completely disconnected and the circuit state is stable, it then reconnects the circuit connection between the shared connection point and the tVNS neural stimulation path to establish the stimulation working pathway.

[0100] After the EEG reference path disconnection operation is completed and during the intermittent period when the neural stimulation path is not connected, the system automatically switches the EEG reference path to protection mode, so that the EEG reference input terminal is in a safe and isolated state, effectively avoiding problems such as floating, stray potentials, and transient interference, and protecting the single-lead EEG front-end circuit from the influence of transient circuit fluctuations during switching.

[0101] This embodiment maintains the same switching logic as the reference path reconstruction network. The reconstruction network also adopts a disconnect-before-connect mechanism, which can effectively avoid the problems of instantaneous short circuit between the ear concha reuse electrode and the backup reference electrode and reference potential disorder. It ensures that only one effective path is connected to the circuit at any given time, realizing full-link safe switching control.

[0102] According to embodiments of this application, a hardware-level disconnect-then-connect switching mechanism is employed to eliminate the short-circuit risk of simultaneous conduction of the EEG reference path and the neural stimulation path, thereby eliminating potential circuit crosstalk at the hardware timing level. After being disconnected, the EEG reference path enters a protection mode, effectively isolating transient interference, stabilizing circuit potentials, and protecting the safety of the EEG front-end acquisition circuit. Simultaneously, a unified dual-path switching logic avoids abnormal fluctuations in the reference potential, significantly improving the safety and stability of path switching, further reducing the probability of stimulation artifacts, and ensuring the stable operation of the EEG detection and neural stimulation closed-loop system.

[0103] Based on the aforementioned path switching, electrode fault tolerance, and closed-loop control, this embodiment discloses the specific protection mechanism of the integrated front-end protection network. The entire system is executed collaboratively by the state machine and the front-end protection network, achieving dual hardware and software-level safety protection under all operating conditions such as path switching, neural stimulation, and electrode abnormalities. This effectively avoids the impact of factors such as high stimulation voltage, residual charge, and abnormal impedance on the EEG front-end circuit and the user. The specific implementation method is as follows.

[0104] The front-end protection network configured in this device is a multi-module integrated protection circuit, which may include at least one of the following: analog switch, solid-state switch, current limiting circuit, voltage limiting clamping circuit, stimulation decoupling circuit, charge discharge circuit, reference potential reconstruction circuit, switch status detection circuit, fault protection circuit, detachment detection circuit, and backup reference electrode access protection circuit. It can provide targeted hardware protection capabilities for different scenarios such as switching transients, stimulation process, and electrode abnormalities.

[0105] The system relies on a front-end protection network in conjunction with a state machine to execute standardized safety control logic, covering the entire process of safety verification and protection strategies. During path switching, the system rigorously confirms that the EEG reference path is completely disconnected before switching, eliminating the risk of dual-path conduction. Before initiating neural stimulation, it verifies that the tVNS stimulation path is reliably connected and that the EEG front end is stably in an electrical protection state, ensuring the safe initiation of the stimulation operation.

[0106] After a single neural stimulation, the front-end protection network, in conjunction with the timing logic, executes a delayed recovery mechanism to prioritize and completely disconnect the stimulation path. It then releases residual charge and voltage through a discharge circuit and a decoupling circuit. Once the preset discharge time or charge release condition is met, the EEG reference path connection is restored to avoid residual electrical signals interfering with EEG acquisition.

[0107] Under abnormal operating conditions, the front-end protection network can achieve fault self-locking protection: when abnormal gating status, abnormal loop impedance, excessive residual voltage, or triggering of a user pause command are detected, the system immediately stops the tVNS stimulation output and keeps the circuit in a safe disconnected or high-impedance isolated state; when the reusable concha electrode is detected to be dislodged, the contact impedance exceeds the limit, or the stimulation circuit is abnormal, stimulation is immediately prohibited, and the backup reference electrode is safely connected in conjunction with the protection circuit to ensure uninterrupted monitoring. If the backup reference electrode also shows contact abnormality, the system automatically shuts down the closed-loop stimulation function, retains only the safety monitoring function, and marks the data as invalid or prompts the user to wear the device again, completely avoiding unsafe operation and invalid data acquisition under abnormal operating conditions.

[0108] According to embodiments of this application, a multi-module integrated front-end protection network achieves full-scenario hardware protection during switching, stimulation, and abnormal faults, effectively limiting excessive voltage, current, and residual charge during stimulation, and reliably protecting the precision EEG front-end circuitry. A graded and time-based safety verification mechanism eliminates the risks of path crosstalk, residual interference, and abnormal power-on. Simultaneously, a gradient safety strategy is set for multi-level electrode faults, maximizing the electrical safety and fault tolerance of the equipment while ensuring monitoring continuity, significantly improving the overall stability and safety of the long-term continuous EEG monitoring and closed-loop neurostimulation system.

[0109] The brain-computer interface closed-loop neuromodulation method disclosed in the above embodiments constructs a closed-loop neuromodulation system with shared connection points, gating networks, unified clocks, and event markers working in synergy. This differs from traditional generalized stimulus synchronization recording schemes, enabling systematic collaborative operation across multiple hardware components, time sequences, and protection mechanisms. Furthermore, this method does not simply reuse electrodes; instead, it utilizes a single physical shared connection point in the concha region combined with controllable gating paths for time-sharing switching. This simplifies the ear electrode and wiring structure, adapts to single-lead EEG and wearable tVNS device architectures, and avoids reliance on multi-channel spatial prediction algorithms, significantly reducing device size and hardware costs.

[0110] This method abandons the traditional single-process approach that relies solely on blanking for interference cancellation. It integrates multiple protection and correction measures, including pre-disconnection and post-connection safety switching, front-end circuit protection, residual charge discharge, multi-dimensional electrode status detection, and high-precision timing marking. This not only effectively suppresses signal artifacts caused by neural stimulation but also achieves precise timing correspondence between key operating conditions such as stimulation events, path switching, electrode abnormalities, and signal recovery and EEG sampling points, solving the problem of data and operating condition misalignment. Addressing the single-point failure defect caused by electrode reuse structures, this method overcomes the limitations of ordinary electrode detachment alarms by incorporating an automatic backup reference electrode takeover and a tVNS stimulation safety degradation mechanism, greatly improving the fault tolerance and operational safety of continuous monitoring. Furthermore, this method is not limited to single-module hardware protection; it relies on a unified clock to achieve full-process timing control and safety protection for acquisition, switching, stimulation, protection, recovery, monitoring, and data processing, comprehensively improving the stability, accuracy, and reliability of the wearable single-lead EEG closed-loop control system.

[0111] Figure 4 A structural block diagram of a brain-computer interface closed-loop neuromodulation device according to an embodiment of this application is shown.

[0112] like Figure 4 As shown, the brain-computer interface closed-loop neuromodulation device 400 includes an acquisition module 410, a generation module 420, a first switching module 430, and a second switching module 440.

[0113] The acquisition module 410 is used to acquire EEG detection data when the common connection point is connected to the EEG reference path. The EEG detection data is acquired based on the EEG reference path through EEG acquisition electrodes that are in contact with the user. The EEG reference path is connected to the common connection point through a gating network.

[0114] The generation module 420 is used to generate a judgment result based on the EEG detection data and control conditions, wherein the control conditions represent the judgment conditions for whether to perform neural stimulation.

[0115] The first switching module 430 is used to control the gating network to switch the connection between the shared connection point and the EEG reference path to the connection with the neural stimulation path when the judgment result indicates that neural stimulation is enabled.

[0116] The second switching module 440 is used to control the gating network to switch the connection between the shared connection point and the neural stimulation path to the connection with the EEG reference path after the user is subjected to neural stimulation using a reusable auricular electrode that is in contact with the user based on the neural stimulation path, so as to obtain the EEG detection data after neural stimulation collected by the EEG acquisition electrode.

[0117] According to embodiments of this application, a single ear electrode is reused as both an EEG reference acquisition electrode and a neurostimulation electrode. By integrating the two functional circuits through a single shared connection point, there is no need to add additional ear electrodes and wiring, effectively simplifying the device hardware structure and reducing device size and assembly costs. Simultaneously, a state machine precisely controls the time-sharing switching of circuit paths via a gating network, ensuring that the EEG acquisition and neurostimulation phases are independent and do not interfere with each other. This effectively prevents stimulation signals from crosstalking to the EEG reference input, significantly reducing the interference of stimulation artifacts on the EEG signal and substantially improving the accuracy and reliability of the entire EEG detection data process.

[0118] According to embodiments of this application, the brain-computer interface closed-loop neuromodulation device further includes a determination module and a third switching module.

[0119] The determination module is used to determine the state detection result based on the state detection data of the reusable electrode in the concha.

[0120] The third switching module is used to disconnect the reusable electrode from the concha and connect the backup reference electrode to the EEG reference path when the status detection result shows that the reusable electrode is in an abnormal state, so as to use the backup reference electrode to collect EEG detection data.

[0121] According to an embodiment of this application, the brain-computer interface closed-loop neuromodulation device further includes a fourth switching module.

[0122] The fourth switching module is used to switch the EEG reference path from the backup reference electrode to the reusable electrode when the reusable electrode in the concha is restored to normal, so as to resume the use of the reusable electrode in the concha to collect EEG detection data.

[0123] According to an embodiment of this application, the determining module includes at least one of a first state determining unit, a validity determining unit, and a second state determining unit.

[0124] The first state determination unit is used to determine the contact state between the ear concha reusable electrode and the user based on the detection current, AC impedance, or contact impedance.

[0125] The validity determination unit is used to determine the validity of the neural stimulation pathway associated with the reusable electrode in the concha based on bias potential, common-mode voltage, input saturation state, or data noise.

[0126] The second state determination unit is used to determine the contact state of the common connection point or stimulation circuit based on the output voltage, feedback current, loop impedance, current limiting state of the neural stimulation path, or the conduction state of the gating network or connector contacts.

[0127] According to embodiments of this application, the brain-computer interface closed-loop neuromodulation device further includes a control module, a disconnection and reconnection module, and a detection module.

[0128] The control module is used to control the reusable electrode in the auricle to pause nerve stimulation before the EEG acquisition electrode acquires EEG data after nerve stimulation.

[0129] The disconnect-reconnect module is used to first disconnect the shared connection point from the neural stimulation pathway, and then reconnect the shared connection point to the EEG reference pathway.

[0130] The detection module is used to detect data quality based on data detection methods, so as to control the EEG acquisition electrodes to acquire EEG detection data after nerve stimulation when the detection result is normal. The data detection methods include at least one of the following: baseline reconstruction method, saturation detection method, impedance check method and signal quality assessment method.

[0131] According to embodiments of this application, the brain-computer interface closed-loop neuromodulation device further includes a labeling module.

[0132] The tagging module is used to tag each event with time and event based on a unified clock tagging method. The event includes the acquisition time and sampling point type of EEG detection data, the activation time and pulse type of neural stimulation, the connection switching time of the shared connection point, the switching time of the connection status of the reusable electrode and the backup reference electrode, and the status detection result and time of the reusable electrode.

[0133] According to an embodiment of this application, the generation module includes a third state determination unit and a result determination unit.

[0134] The third state determination unit is used to determine the user's current state based on EEG detection data.

[0135] The result determination unit is used to determine the judgment result based on the current state and control conditions.

[0136] According to an embodiment of this application, the first switching module includes a signal transmitting unit.

[0137] The signal transmitting unit is used to send a gating control signal to the gating network so that the gating network first disconnects the connection between the common connection point and the EEG reference path, and then connects the common connection point to the neural stimulation path. After disconnecting the connection with the EEG reference path, the EEG reference path is in a protection mode.

[0138] According to embodiments of this application, any multiple modules among the acquisition module 410, generation module 420, first switching module 430, and second switching module 440 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the acquisition module 410, generation module 420, first switching module 430, and second switching module 440 can be at least partially implemented as a hardware circuit, such as a field-programmable gate array, a programmable logic array, a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit, or implemented by any other reasonable means of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 410, generation module 420, first switching module 430, and second switching module 440 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0139] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing the above-described method according to an embodiment of this application.

[0140] like Figure 5 As shown, the electronic device 500 according to an embodiment of this application may refer to a state machine. The electronic device 500 includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory 502 or a program loaded from a storage portion 508 into a random access memory 503. The processor 501 may include, for example, a general-purpose microprocessor, an instruction set processor, and / or a related chipset and / or a dedicated microprocessor. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application. Specific details of the brain-computer interface closed-loop neuromodulation method executed by the state machine are given in the various embodiments described above and will not be repeated here.

[0141] Random access memory 503 stores various programs and data required for the operation of electronic device 500. Processor 501, read-only memory 502, and random access memory 503 are interconnected via bus 504. Processor 501 executes various steps of the method flow according to embodiments of this application by executing programs in read-only memory 502 and / or random access memory 503. It should be noted that the programs may also be stored in one or more memories other than read-only memory 502 and random access memory 503. Processor 501 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in said one or more memories.

[0142] According to embodiments of this application, the electronic device 500 may further include an input / output interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the input / output interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card, such as a local area network card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.

[0143] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0144] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 502, and / or random access memory 503, and / or one or more memories other than read-only memory 502 and random access memory 503 described above.

[0145] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.

[0146] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0147] In embodiments of this application, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0148] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0149] Embodiments of this application also include an EEG detection device, comprising: a common connection point connected to a gating network; a gating network connected to an EEG reference path and a neural stimulation path, respectively; EEG acquisition electrodes for acquiring EEG detection data; and a state machine. The EEG detection device can control different components through the state machine, enabling the EEG detection device to perform the EEG detection described in any of the preceding embodiments. The specific process of the brain-computer interface closed-loop neural modulation method is not elaborated here.

[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0151] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

Claims

1. A brain-computer interface closed-loop neural modulation method, characterized in that, include: When the shared connection point is connected to the EEG reference path, EEG detection data is acquired, wherein the EEG detection data is based on the EEG reference path and is acquired through EEG acquisition electrodes that are in contact with the user, and the EEG reference path is connected to the shared connection point through a gating network. Based on the EEG detection data and control conditions, a judgment result is generated, wherein the control conditions characterize the judgment conditions for whether to perform neural stimulation; If the judgment result indicates that neural stimulation is enabled, the control gating network switches the connection between the common connection point and the EEG reference path to the connection with the neural stimulation path. After the user is subjected to neural stimulation using a reusable auricular electrode that is in contact with the user based on the neural stimulation pathway, the control gating network switches the connection of the common connection point to the neural stimulation pathway to the connection of the EEG reference pathway, so as to obtain EEG detection data after neural stimulation acquired by the EEG acquisition electrode.

2. The brain-computer interface closed-loop neural modulation method according to claim 1, characterized in that, Also includes: The state detection result is determined based on the state detection data of the reusable concha electrode. If the status detection result indicates that the reusable concha electrode is in an abnormal state, the connection between the reusable concha electrode and the EEG reference path is disconnected, and a backup reference electrode is connected to the EEG reference path to collect EEG detection data using the backup reference electrode.

3. The brain-computer interface closed-loop neural modulation method according to claim 2, characterized in that, Also includes: When the reusable auricular electrode returns to normal, the EEG reference path is switched from the backup reference electrode to the reusable auricular electrode to resume the use of the reusable auricular electrode for EEG data acquisition.

4. The brain-computer interface closed-loop neural modulation method according to claim 2, characterized in that, Based on the state detection data of the reusable concha electrode, the state detection result is determined, including at least one of the following: The contact state between the reusable ear concha electrode and the user is determined based on the detection current, AC impedance, or contact impedance. The effectiveness of determining the neural stimulation pathway associated with the reusable concha electrode is based on bias potential, common-mode voltage, input saturation state, or data noise. The contact state of the common connection point or stimulation circuit is determined based on the output voltage, feedback current, loop impedance, current limiting status of the neural stimulation pathway, or the conduction status of the gating network or connector contacts.

5. The brain-computer interface closed-loop neural modulation method according to claim 1, characterized in that, Also includes: Before the EEG acquisition electrodes acquire the EEG data after the nerve stimulation, the reusable auricular electrode is controlled to pause the nerve stimulation. First disconnect the shared connection point from the neural stimulation pathway, and then connect the shared connection point to the EEG reference pathway. Data quality is detected based on data detection methods, so that when the detection result is normal, the EEG acquisition electrodes are controlled to acquire EEG detection data after the nerve stimulation. The data detection methods include at least one of the following: baseline reconstruction method, saturation detection method, impedance check method, and signal quality assessment method.

6. The brain-computer interface closed-loop neural modulation method according to any one of claims 1 to 5, characterized in that, Also includes: Based on a unified clock marking method, each event is marked with time and event information. The event includes the acquisition time and sampling point type of EEG detection data, the activation time and pulse type of neural stimulation, the connection switching time of the shared connection point, the switching time of the connection status of the reusable auricular electrode and the backup reference electrode, and the status detection result and time of the reusable auricular electrode.

7. The brain-computer interface closed-loop neural modulation method according to claim 1, characterized in that, Based on the EEG detection data and control conditions, a judgment result is generated, including: The user's current state is determined based on the EEG data. The judgment result is determined based on the current state and the control conditions.

8. The brain-computer interface closed-loop neural modulation method according to claim 1 or 7, characterized in that, The control gating network switches the connection between the shared connection point and the EEG reference path to a connection with the neural stimulation path, including: A gating control signal is sent to the gating network so that the gating network first disconnects the common connection point from the EEG reference path, and then connects the common connection point to the neural stimulation path. After disconnecting from the EEG reference path, the EEG reference path is in a protection mode.

9. A state machine, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

10. An electroencephalogram (EEG) detection device, characterized in that, include: Shared connection point, connected to the gating network; The gating network is connected to the EEG reference pathway and the neural stimulation pathway, respectively; EEG acquisition electrodes are used to collect EEG data. as well as The state machine as described in claim 9.