Group brain research equipment synchronization method and device, equipment and storage medium
By using the 8b10b encoder and SerDes transmitter receiver in the synchronous host for timestamp calibration, the problem of difficulty in time synchronization in the synchronization research of multi-person neural activity synchronization was solved, and high-precision time synchronization and data alignment were achieved, improving the accuracy of the research.
Patent Information
- Application Number
- CN202411943138.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to achieve high-precision time synchronization in the study of multi-person neural activity synchronization, resulting in deviations in the analysis results and affecting the research conclusions.
Timestamp calibration between the EEG amplifier and the transcranial stimulator is achieved by using the 8b10b encoder and the SerDes transmitter receiver in the synchronous host, ensuring that each slave is in sync with the host.
Accurate synchronization between multiple slaves and master devices is achieved, ensuring data alignment in time, and improving the accuracy of neural activity synchronization research.
Smart Images

Figure CN119814213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to neural regulation technology, and in particular to a method for synchronizing group brain research equipment. Background Art
[0002] In modern neuroscience research, it is crucial to understand the interactions between people and their neural mechanisms. Traditional neuroimaging technology has limitations in capturing the process of multi-person social interactions and cannot fully record the brain activity of different participants. For this reason, hyperscanning technology came into being, which can record the brain electrical activity of multiple participants at the same time, providing richer and more accurate data. However, this method has extremely strict requirements for time synchronization. EEG (electroencephalogram) signals have high temporal resolution and can capture changes in neural activity at the millisecond level, which requires a high degree of time certainty between multiple devices. Any slight time deviation may lead to significant deviations in the analysis results, thereby affecting the research conclusions on the synchronization of neural activity.
[0003] At the same time, non-invasive neural electrical stimulation technology has been widely used in clinical and scientific research, especially in the fields of rehabilitation medicine, psychiatry and pain management. By applying current to specific brain areas through electrodes, the resting membrane potential of neurons can be adjusted, affecting neural excitability and synaptic connections. However, there are individual differences in the regulatory effect of fixed-parameter electrical stimulation. Optimizing stimulation parameters for individualized brain states can achieve better regulatory effects and fewer side effects. In addition, many studies have shown that the regulatory effect of stimulation is brain state-dependent. By monitoring brain activity and adjusting stimulation parameters in real time, establishing a feedback loop can achieve more sophisticated neural regulation. Therefore, combining transcranial electrical stimulation with EEG acquisition to establish a closed-loop control system is a promising regulatory technology.
[0004] In this context, it is crucial to ensure time synchronization between EEG devices and electrical stimulation devices. Synchronicity is not just about matching the time of signals, but also about ensuring the precise alignment of stimulation with the state of brain activity so that stimulation can be applied at the right time. For example, in phase-locked stimulation, the system needs to accurately obtain the time of EEG data, extract the current EEG phase, and trigger electrical stimulation at a preset time. Therefore, high-precision time synchronization must be achieved between the electrical stimulator and the EEG amplifier to ensure that electrical stimulation can be accurately triggered. Summary of the invention
[0005] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a method, device, equipment and storage medium for synchronizing group brain research equipment, which can record the brain electrical activity of each participant and maintain high-precision time synchronization between each electrical stimulator and EEG amplifier.
[0006] The first technical solution adopted by the present invention is:
[0007] A method for synchronizing group brain research equipment comprises the following steps:
[0008] Paste the electrodes of the EEG amplifier and the transcranial electrical stimulator to the subject's head;
[0009] The EEG amplifier and the transcranial electrical stimulator act as slaves, and their data are transmitted to a synchronous host;
[0010] In the synchronous host, the 8b10b encoder takes out the value of the host counter cnt according to a predefined time interval;
[0011] The host counter cnt value is encoded into 10b and then converted into serial data through a SerDes transmitter for transmission;
[0012] The slave converts the 10b data from serial data to 10-bit parallel data through the SerDes receiver and outputs it to the 8b10b decoder;
[0013] The 8b10b decoder detects the decoded data, extracts the timestamp data in the data, and calibrates the slave timestamp after time compensation of the timestamp;
[0014] The above-mentioned calibration of the slave timestamp is repeated to ensure that each slave is synchronized with the synchronization master.
[0015] According to some embodiments of the present application, there are multiple slaves, and each of the slaves is connected to the synchronization host and calibrates the timestamp.
[0016] According to some embodiments of the present application, the synchronization host can send data and commands to all or some of the slaves, and the slaves respond after receiving the data or commands to achieve time synchronization control of different devices.
[0017] According to some embodiments of the present application, the synchronization host uploads the EEG data detected by the EEG amplifier to a host computer, and the synchronization host forwards the stimulation parameters output by the host computer to the transcranial electrical stimulator.
[0018] According to some embodiments of the present application, the host computer determines the timestamp of the occurrence of a specific phase based on the collected EEG data and timestamp, and sends the stimulation parameters and the stimulation time timestamp to the transcranial electrical stimulator. After configuring the stimulation parameters, the transcranial electrical stimulator waits for the set timestamp to accurately trigger the stimulation.
[0019] According to some embodiments of the present application, when there is no need to send a timestamp, if there is data that needs to be sent, the 8b10b encoder encodes the data and sends it, and the slave receives and decodes the data and outputs it to subsequent modules for use.
[0020] The second technical solution adopted by the present invention is:
[0021] A group brain research equipment synchronization device, used to execute the above-mentioned group brain research equipment synchronization method, comprising:
[0022] An EEG amplifier, which is used to detect the EEG data of the subject;
[0023] A transcranial electrical stimulator, which is used to apply electrical stimulation to the subject;
[0024] A synchronization host is electrically connected to the EEG amplifier and the transcranial electrical stimulator, and is used to synchronize the timestamps of the EEG amplifier and the transcranial electrical stimulator.
[0025] According to some embodiments of the present application, the synchronization host further includes:
[0026] 8b10b encoder, which is used to fetch the host counter cnt value according to a predefined time interval;
[0027] A SerDes transmitter, which is used to encode the host counter cnt value into 10b and then convert it into serial data for transmission;
[0028] A SerDes receiver for converting 10b data from serial data to 10-bit parallel data;
[0029] The 8b10b decoder is used to detect the decoded data, extract the timestamp data in the data, and calibrate the slave timestamp after time compensation of the timestamp.
[0030] The third technical solution adopted by the present invention is:
[0031] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the group brain research device synchronization method as described above.
[0032] The fourth technical solution adopted by the present invention is:
[0033] A computer-readable storage medium, wherein at least one instruction, at least one program, code set or instruction set is stored in the storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the group brain research device synchronization method as described above.
[0034] The beneficial effects of the present invention are: through accurate timestamp insertion and synchronization mechanism, accurate synchronization between multiple slaves and a master device can be achieved, including synchronization in time and synchronization of receiving commands and data, thereby ensuring the alignment of data in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 It is a schematic diagram of implementing timestamp calibration between a host and a slave through a SerDes architecture based on 8b10b encoding in a group brain research device synchronization method according to an embodiment of the present invention;
[0037] Figure 2 It is a wiring diagram of a host and multiple slaves implementing timestamp calibration in a group brain research equipment synchronization method according to an embodiment of the present invention;
[0038] Figure 3 It is a schematic diagram of a communication protocol for synchronizing a host and a slave in a method for synchronizing a group brain research device according to an embodiment of the present invention;
[0039] Figure 4 This is a connection diagram for the synchronous stimulation experiment;
[0040] Figure 5 This is a phase comparison diagram of the waveforms of each transcranial electrical stimulator after the synchronous stimulation experiment;
[0041] Figure 6 It is a connection diagram of the synchronization device of the group brain research equipment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0043] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0044] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0045] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0046] Example 1
[0047] Reference Figure 1 This embodiment provides a method for synchronizing group brain research equipment, including the following steps:
[0048] S100. Paste the electrodes of the EEG amplifier and the transcranial electrical stimulator to the subject's head;
[0049] S200. The EEG amplifier and the transcranial electrical stimulator act as slaves, and their data are transmitted to the synchronization host;
[0050] S300. In the synchronous host, the 8b10b encoder takes out the host counter cnt value according to a predefined time interval;
[0051] S400. Encode the host counter cnt value into 10b and then convert it into serial data for transmission through the SerDes transmitter;
[0052] S500. The slave converts the 10b data from serial data to 10-bit parallel data through the SerDes receiver and outputs it to the 8b10b decoder;
[0053] The S600.8b10b decoder detects the decoded data, extracts the timestamp data in the data, and calibrates the slave timestamp after time compensation;
[0054] S700. Repeat the above slave timestamp calibration to ensure that each slave remains synchronized with the synchronization master.
[0055] Further, refer to Figure 2 , there are multiple slaves, each of which is connected to the synchronization master and calibrates the timestamp.
[0056] The working principle of this group brain research equipment synchronization method is as follows:
[0057] The combination of SerDes communication protocol and programmable logic devices enables high-speed data transmission and accurate time synchronization. The host implements time synchronization by inserting timestamps in the SerDes data stream. All slaves correct their own time errors through the received timestamp data to ensure synchronization between multiple devices. Programmable logic devices ensure the timing consistency of data and commands, and support simultaneous transmission of data from multiple devices or independent transmission of data from a single device.
[0058] Reference Figure 3 , use programmable logic devices to implement strict synchronous transmission of timestamp timing for all slaves, and the sending priority of timestamp is the highest priority, ensuring that all slaves receive timestamp data at the same time and correct their own data to ensure time synchronization. Or the data and command timing of multiple devices are strictly synchronously sent. Through programmable logic devices, in the time period without timestamp data transmission, each host sending module facing different slaves simultaneously takes data from the data fifo and sends data or commands with strict timing consistency, ensuring that multiple slaves can receive data or commands at the same time, and realizing synchronous control of multiple slaves in time. Or send data for a single device separately. In the time period without timestamp data transmission, data can be sent to a single device without affecting the communication with other devices. The slave samples the SerDes data under its own clock through the programmable logic device, detects the timestamp data identifier, receives the timestamp and calibrates its own timestamp.
[0059] Furthermore, the synchronization host can send data and commands to all or part of the slaves, and the slaves respond after receiving the data or commands, so as to achieve time synchronization control of different devices.
[0060] Furthermore, the synchronization host uploads the EEG data detected by the EEG amplifier to the host computer, and the synchronization host forwards the stimulation parameters output by the host computer to the transcranial electrical stimulator.
[0061] Furthermore, when there is no need to send a timestamp, if there is data that needs to be sent, the 8b10b encoder encodes the data and sends it, and the slave receives and decodes it and outputs it to the subsequent modules for use.
[0062] Furthermore, the host computer determines the timestamp of a specific phase based on the collected EEG data and timestamp, and sends the stimulation parameters and the timestamp of the stimulation moment to the transcranial electrical stimulator. After configuring the stimulation parameters, the transcranial electrical stimulator waits for the set timestamp to accurately trigger the stimulation.
[0063] In contrast, refer to Figure 4 , connect transcranial electrical stimulator #1 and transcranial electrical stimulator #2 to synchronization host #1, and connect transcranial electrical stimulator #3 to another synchronization host #2. Synchronization host #1 adopts the synchronization method of this group brain research equipment. Each transcranial electrical stimulator outputs a sine wave with the same frequency and phase at a frequency of 10Hz, an initial phase of 0, and a current of 1mA. Figure 5 In (A), the phase relationship between transcranial electrical stimulator #1 and transcranial electrical stimulator #2 remains synchronized, but refer to Figure 5 In (B), the phase difference between transcranial electrical stimulator #1 and transcranial electrical stimulator #3 becomes more and more obvious as time goes by. It can be seen that the synchronization method of the group brain research equipment does have the effect of synchronizing the output phase of each transcranial electrical stimulator.
[0064] Example 2
[0065] Reference Figure 6 This embodiment provides a group brain research equipment synchronization device, including:
[0066] An EEG amplifier, which is used to detect the EEG data of the subject;
[0067] A transcranial electrical stimulator, which is used to apply electrical stimulation to the subject;
[0068] A synchronization host is electrically connected to the EEG amplifier and the transcranial electrical stimulator, and is used to synchronize the timestamps of the EEG amplifier and the transcranial electrical stimulator.
[0069] Specifically, the synchronization host also includes:
[0070] 8b10b encoder, which is used to fetch the host counter cnt value according to a predefined time interval;
[0071] The SerDes transmitter is used to encode the host counter cnt value into 10b and then convert it into serial data for transmission;
[0072] A SerDes receiver for converting 10b data from serial data to 10-bit parallel data;
[0073] The 8b10b decoder is used to detect the decoded data, extract the timestamp data in the data, and calibrate the slave timestamp after time compensation of the timestamp.
[0074] Example 3
[0075] An embodiment of the present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned brain research equipment synchronization method.
[0076] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.
[0077] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.
[0078] Since the electronic device is an electronic device corresponding to a closed-loop transcranial electrical stimulation method of an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0079] Example 4
[0080] An embodiment of the present invention also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned brain research equipment synchronization method.
[0081] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0082] Since the storage medium is a storage medium corresponding to a closed-loop transcranial electrical stimulation method of an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0083] Example 5
[0084] In some possible implementations, various aspects of the method of the embodiments of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to perform the steps of a brain research device synchronization method according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing various embodiments may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0085] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0086] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0087] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for synchronizing group brain research equipment, characterized in that: The following steps are involved: Paste the electrodes of the EEG amplifier and the transcranial electrical stimulator to the subject's head; The EEG amplifier and the transcranial electrical stimulator act as slaves, and their data are transmitted to a synchronous host; In the synchronous host, the 8b10b encoder takes out the value of the host counter cnt according to a predefined time interval; The host counter cnt value is encoded into 10b and then converted into serial data through a SerDes transmitter for transmission; The slave converts the 10b data from serial data to 10-bit parallel data through the SerDes receiver and outputs it to the 8b10b decoder; the 8b10b decoder detects the decoded data, extracts the timestamp data in the data, and calibrates the slave timestamp after time compensation of the timestamp; The above-mentioned calibration of the slave timestamp is repeated to ensure that each slave is synchronized with the synchronization master.
2. The method for synchronizing group brain research equipment according to claim 1, characterized in that: There are multiple slaves, and each of the slaves is connected to the synchronization host and calibrates the timestamp.
3. The method for synchronizing group brain research equipment according to claim 2, characterized in that: The synchronization host can send data and commands to all or part of the slaves, and the slaves respond after receiving the data or commands to achieve time synchronization control of different devices.
4. The method for synchronizing group brain research equipment according to claim 1, characterized in that: The synchronization host uploads the EEG data detected by the EEG amplifier to a host computer, and the synchronization host forwards the stimulation parameters output by the host computer to the transcranial electrical stimulator.
5. The method for synchronizing group brain research equipment according to claim 4, characterized in that: The host computer determines the timestamp of a specific phase according to the collected EEG data and timestamp, and sends the stimulation parameters and the timestamp of the stimulation moment to the transcranial electrical stimulator. After configuring the stimulation parameters, the transcranial electrical stimulator waits for the set timestamp to accurately trigger the stimulation.
6. The method for synchronizing group brain research equipment according to claim 1, characterized in that: When there is no need to send a timestamp, if there is data that needs to be sent, the 8b10b encoder encodes the data and sends it, and the slave receives and decodes it and outputs it to the subsequent module for use.
7. A group brain research equipment synchronization device, used to execute the group brain research equipment synchronization method according to any one of claims 1 to 6, characterized in that: include: An EEG amplifier, which is used to detect the EEG data of the subject; A transcranial electrical stimulator, which is used to apply electrical stimulation to the subject; A synchronization host is electrically connected to the EEG amplifier and the transcranial electrical stimulator, and is used to synchronize the timestamps of the EEG amplifier and the transcranial electrical stimulator.
8. The device for synchronizing group brain research equipment according to claim 7, characterized in that: The synchronization host also includes: 8b10b encoder, which is used to fetch the host counter cnt value according to a predefined time interval; A SerDes transmitter, which is used to encode the host counter cnt value into 10b and then convert it into serial data for transmission; A SerDes receiver for converting 10b data from serial data to 10-bit parallel data; The 8b10b decoder is used to detect the decoded data, extract the timestamp data in the data, and calibrate the slave timestamp after time compensation of the timestamp.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the group brain research equipment synchronization method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the group brain research equipment synchronization method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Clock synchronization method and device and electronic equipment
CN113922912A
Data synchronous transmission method and device, equipment and storage medium
CN114070446A
Muscle computer electrical synchronization method and system applying same
CN118395118A
Time control method and system for electroencephalogram data and storage medium
CN118655815A
Cited By
Brain-computer interface control method and device based on cognitive enhancement, medium and product
CN121129194A
Cognitive enhancement-based brain-computer interface control method, device, medium and product
CN121129194B