Implantable brain-computer interface and external device synchronous acquisition control performance evaluation method and device
By acquiring the acquisition time of the implantable brain-computer interface device through wireless communication, calculating the cumulative error and static error, and verifying the synchronization accuracy using a verification platform, the problem of insufficient synchronization accuracy between the implantable brain-computer interface device and the external device is solved, and accurate synchronous acquisition and control in wireless synchronization scenarios is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-05-11
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the synchronization accuracy between implantable brain-computer interface devices and external devices is insufficient, affecting the accuracy of data synchronization acquisition and control, especially in wireless synchronization scenarios where accurate synchronization evaluation is difficult to achieve.
The acquisition time of the implantable brain-computer interface device is obtained through wireless communication, the cumulative error and static error are calculated, and the synchronization accuracy is verified using a verification platform to ensure the synchronization accuracy between the implantable brain-computer interface device and the external device.
It enables the calculation and verification of synchronization errors between implantable brain-computer interface devices and external devices in wireless synchronization scenarios, ensuring the accuracy of synchronous acquisition and control, and is applicable to multimodal signal acquisition and collaborative control.
Smart Images

Figure CN122489397A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method and apparatus for evaluating the synchronous acquisition and control performance of an implantable brain-computer interface and an external device. Background Technology
[0002] Implantable brain-computer interface (BCI) devices are widely used in cutting-edge neuroscience research. In practical applications, it is typically necessary to synchronize data acquisition and temporally coordinate control between the implantable BCI device and an external device. During this process, insufficient synchronization accuracy between the implantable BCI device and the external device can negatively impact the results obtained from analytical methods such as frequency domain analysis, masking correlations between data and leading to misinterpretations of research findings. Furthermore, insufficient synchronization accuracy can result in output signals that differ from expectations, affecting the overall effectiveness of the research. Therefore, ensuring the synchronization accuracy between the implantable BCI device and the external device, and guaranteeing the accuracy of synchronized acquisition and control, is crucial.
[0003] Currently, the mainstream clinical method for simultaneous data acquisition often employs wired synchronization during surgery. This method requires maintaining an open incision during data acquisition to synchronize the implanted brain-computer interface (BCI) device with the external device via a wired connection. While this approach offers high synchronization accuracy, its limitations due to the open incision and wired connection restrict its application to data acquisition during unrestricted free movement, thus limiting its application scenarios. For patients already implanted with BCI devices, this wired approach is unsuitable. Clinically, external percutaneous electrical nerve stimulation (TENS) or in vivo electrical nerve stimulation (ENNS) to generate stimulation artifacts has been used as alternative synchronization methods to synchronize the implanted BCI device with the external device. However, the external TENS signals used in this method may pose electromagnetic compatibility risks, and the errors vary depending on the patient, making error quantification difficult during in vivo implantation.
[0004] Currently, the mainstream synchronization control methods in clinical practice mainly rely on the preset stimulation pulse sequence of the implanted device and the control sequence of the external device at the same timing. However, this method depends on two independent clock sources: the implanted device and the external device, thus introducing drift errors between the two clocks. Furthermore, due to the constraints of small size and low power consumption of the implanted device, the internal clock source is prone to accumulated clock drift during long experiments, affecting synchronization accuracy. Multiple internal clock sources further amplify this problem. For example, in typical brain-computer interface systems, implanted neural signal acquisition devices and implanted spinal cord stimulation devices, due to their respective low power consumption limitations, exhibit greater clock drift relative to the implanted device and the external device during long-term acquisition / control processes. Therefore, existing technologies lack an accurate and reliable means and corresponding evaluation method for achieving wireless synchronization between implanted brain-computer interface devices and external devices (3D motion capture, inertial measurement units, force tables, pressure plates, surface electromyography, non-implantable electrocorticography, functional near-infrared spectrometers, eye trackers, virtual reality devices, exoskeletons, etc.). Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and apparatus for evaluating the synchronous acquisition and control performance of an implantable brain-computer interface and an external device, so as to determine the synchronization error between the implantable brain-computer interface device and the external device wirelessly, and verify it to ensure the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0006] In a first aspect, embodiments of the present invention provide a method for evaluating the performance of synchronous acquisition and control of an implantable brain-computer interface and an external device, the method comprising: Data acquisition is performed by controlling the implantable brain-computer interface device via wireless communication, and the first acquisition time and the second acquisition time of the implantable brain-computer interface device are obtained. The first acquisition time is the theoretical acquisition time of the data of the implantable brain-computer interface device, and the second acquisition time is the time from when the external device sends the start acquisition command to the implantable brain-computer interface device to when it receives the acquired data. Calculate the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time; The cumulative error and / or static error are verified by the verification platform to determine the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0007] Optionally, the step of calculating the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time includes: Regression analysis is performed on the first acquisition time and the second acquisition time to calculate the cumulative error and static error between the implantable brain-computer interface device and the external device. The cumulative error represents the deviation between the actual sampling rate and the theoretical sampling rate.
[0008] Optionally, the method further includes: In response to receiving a trigger signal from the implantable brain-computer interface device, a marking signal is sent to the implantable brain-computer interface device to enable the implantable brain-computer interface device to perform marking, and the marking time is recorded. The accuracy of the triggering and marking function of the implantable brain-computer interface device is determined based on the difference between the sending time and the marking time. The trigger signal is issued by the implantable brain-computer interface device in response to the acquisition of a preset number of sampling points, and the sending time is the time when the implantable brain-computer interface sends the trigger signal.
[0009] Optionally, the method further includes: Acquire in vivo data collected by the implantable brain-computer interface device and in vitro data collected by the external device; The synchronization error between the in vivo and in vitro acquired data is corrected based on the cumulative error and the static error.
[0010] Optionally, the control of the implantable brain-computer interface device to perform data acquisition, and to obtain the first acquisition time and the second acquisition time of the implantable brain-computer interface device, includes: Send a start acquisition command to the implantable brain-computer interface device; Receive the data collected by the implantable brain-computer interface device, and record the time from sending the start collection command to receiving the data collected as the second collection time; The first acquisition time of the implantable brain-computer interface device is calculated based on the number of sampling points and the theoretical sampling rate.
[0011] Optionally, verifying the cumulative error and / or the static error includes: Acquire the sampling signal of the implantable brain-computer interface device within a predetermined time period; The number of sampling points for the sampled signal is determined based on the edge detection method; The actual sampling rate is calculated based on the number of sampling points and the predetermined time. The cumulative error is verified based on the actual sampling rate.
[0012] Optionally, verifying the cumulative error and / or the static error includes: A first control signal is sent to the implantable brain-computer interface device, and a second control signal is sent to the external device at the same time. The first control signal is used to control the implantable brain-computer interface device to output a stimulation signal, and the second control signal is used to control the external device to perform a corresponding operation. Receive the stimulation signal output by the implantable brain-computer interface device and record the reception time of the stimulation signal; The start execution time of the external device is obtained, where the start execution time is the time when the external device begins to perform the corresponding operation. Calculate the difference between the receiving time and the start execution time; The cumulative error and the static error are verified based on the difference between the receiving time and the start execution time.
[0013] Optionally, verifying the cumulative error and / or the static error includes: Send a start acquisition command to the implantable brain-computer interface device and record the corresponding first time. Receive the first packet of data sent by the implantable brain-computer interface device and record the corresponding second time. The difference between the second time and the first time, minus the sampling time, is used as the acquisition start time; The static error is verified based on the acquisition start time.
[0014] Optionally, verifying the cumulative error and / or the static error includes: Control the implantable brain-computer interface device to collect predetermined reference data; Acquire the collected data sent by the implanted brain-computer interface device; The cumulative error and the static error are verified based on the error between the collected data and the reference data.
[0015] Secondly, embodiments of the present invention also provide a device for evaluating the performance of an implantable brain-computer interface and an external device in synchronous acquisition and control, the device comprising: Implantable brain-computer interface devices are used to collect neural signals; An external device is wirelessly connected to the implantable brain-computer interface device and is used to control the implantable brain-computer interface device to collect data, obtain the first acquisition time and the second acquisition time of the implantable brain-computer interface device, and calculate the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time. The first acquisition time is the theoretical acquisition time of the data of the implantable brain-computer interface device, and the second acquisition time is the time from when the external device sends a start acquisition command to the implantable brain-computer interface device to when it receives the acquired data. A verification platform is used to verify the cumulative error and / or the static error, and to determine the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0016] This invention, through its embodiment, controls an implantable brain-computer interface (BCI) device to acquire data, obtaining a first acquisition time and a second acquisition time. Based on the first and second acquisition times, it calculates the cumulative error and static error between the implantable BCI device and an external device. The cumulative error and / or static error are then verified using a verification platform to determine the synchronization accuracy between the implantable BCI device and the external device. Thus, this invention can calculate and verify the synchronization error between the implantable BCI device and the external device, ensuring the synchronization accuracy between them. Attached Figure Description
[0017] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which: Figure 1 This is a schematic diagram of an application scenario of the present invention, namely, a "multimodal brain-controlled multi-device collaborative platform". Figure 2 This is a flowchart of the method for evaluating the synchronous acquisition and control performance of an implantable brain-computer interface and an external device according to an embodiment of the present invention; Figure 3 This is a flowchart of the data acquisition method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the data acquisition process according to an embodiment of the present invention; Figure 5 This is a flowchart of an error verification method according to an embodiment of the present invention; Figure 6 This is a flowchart of another error verification method according to an embodiment of the present invention; Figure 7 This is a flowchart of another error verification method according to an embodiment of the present invention; Figure 8 This is a flowchart of another error verification method according to an embodiment of the present invention; Figure 9 This is a schematic diagram of a marking delay verification under the clock scale of an implanted device according to an embodiment of the present invention; Figure 10 This is a flowchart of another error verification method according to an embodiment of the present invention; Figure 11 This is a schematic diagram of the implantable brain-computer interface and external device synchronous acquisition and control performance evaluation device according to an embodiment of the present invention; Figure 12 This is a schematic diagram illustrating the connection relationship between the verification platform and the implantable brain-computer interface device in an embodiment of the present invention. Detailed Implementation
[0018] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.
[0019] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.
[0020] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".
[0021] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0022] Figure 1 This is a schematic diagram of an application scenario of the present invention, namely, a "multimodal brain-controlled multi-device collaborative platform". Figure 1As shown, after completing the verification described in this application, the implantable device and the external device can achieve synchronous acquisition and coordinated control. Synchronous acquisition can be used to collect multimodal signals, including but not limited to deep brain and cortical signals acquired via implantation and / or body activity information acquired externally. By synchronizing these multimodal signals both in vivo and in vitro, large-scale in vivo and in vitro neurophysiological signal data can be obtained simultaneously. The platform can also be used for coordinated control. For example, based on the neurophysiological signals collected by the implantable / non-invasive device, through neural signal decoding and temporal coordinated control, it can control the external devices to precisely execute corresponding instructions according to the required timing. Specifically, synchronous acquisition includes, but is not limited to, synchronous acquisition of signals from implanted devices, EEG (Electroencephalogram) signals, fNIRS (functional near-infrared spectroscopy) signals, EMG (electromyogram) signals, and / or other physiological signals (such as eye movement signals, electrocardiogram signals, etc.); the objects of coordinated control include, but are not limited to, implanted SCS (spinal cord stimulation), exoskeletons, FES (functional electrical stimulation), TMS (transcranial magnetic stimulation), and / or other stimulation and control devices. For closed-loop coordinated control tasks, the platform can also acquire feedback signals, such as IMU (Inertial Measurement Unit) signals, LFP (Local Field Potential), ECAP (Electrically Evoked Compound Action Potential), etc., to achieve closed-loop regulation and control.
[0023] Figure 2 This is a flowchart of a method for evaluating the synchronous acquisition and control performance of an implantable brain-computer interface and an external device according to an embodiment of the present invention. The external device can execute this method to complete the synchronization and verification between the implantable brain-computer interface device and the external device. Figure 2 As shown, the method for evaluating the synchronous acquisition and control performance of the implantable brain-computer interface and external device in this embodiment includes the following steps: Step S110: Data acquisition is performed by controlling the implantable brain-computer interface device via wireless communication, obtaining the first acquisition time and the second acquisition time of the implantable brain-computer interface device. The first acquisition time is the theoretical data acquisition time of the implantable brain-computer interface device, and the second acquisition time is the time from when the external device sends a start acquisition command to the implantable brain-computer interface device to when it receives the acquired data.
[0024] It is understandable that, due to the inherent limitations of implantable brain-computer interface (BCI) devices, communication between external devices and the implantable BCI device is conducted wirelessly, using technologies such as Bluetooth, which results in significant communication latency. In contrast, communication between external devices is conducted via wired communication, with relatively predictable latency. Therefore, this embodiment primarily calculates and verifies the errors introduced by wireless communication between the implantable BCI device and external devices, without providing a detailed description of the interactions between external devices.
[0025] Figure 3 This is a flowchart of a data acquisition method according to an embodiment of the present invention. Figure 3 As shown, in one alternative implementation, the external device completes data acquisition by performing the following steps: Step S111: Send a start acquisition command to the implantable brain-computer interface device.
[0026] Step S112: Receive the acquisition data sent by the implantable brain-computer interface device, and record the time from sending the start acquisition command to receiving the acquisition data as the second acquisition time. Optionally, the external device initializes its clock simultaneously with sending the start acquisition command, setting it as the zero point. Upon receiving the acquisition data, it records the packet reception time, and the second acquisition time can be obtained based on the packet reception time.
[0027] Step S113: Calculate the first acquisition time of the implantable brain-computer interface device based on the number of sampling points and the theoretical sampling rate. Specifically, the theoretical sampling rate of the implantable brain-computer interface device can be predetermined. In actual operation, technicians can preset the theoretical sampling rate in the external device. After receiving the acquired data, the external device obtains the number of sampling points and the theoretical sampling rate of the implantable brain-computer interface device. The first acquisition time of the implantable brain-computer interface device can then be calculated based on the relationship "first acquisition time = number of sampling points / theoretical sampling rate".
[0028] Step S120: Calculate the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time.
[0029] There may be two errors in the synchronization between implantable brain-computer interface devices and external devices. The first is the cumulative error caused by the difference between the actual sampling rate and the theoretical sampling rate of the implantable brain-computer interface device. This error will increase with the increase of the first acquisition time. The second is the static error between the clock of the external device and the clock of the implantable brain-computer interface device caused by factors such as data transmission delay and processing time.
[0030] Specifically, the external device includes an external acquisition terminal for acquiring data from the implantable brain-computer interface device and performing subsequent data processing. The external device also includes a non-implantable device whose clock error with the external acquisition terminal is known. Optionally, the non-implantable device may include one or more of the following instruments: a 3D motion capture system, an inertial measurement unit, a pressure plate, a 3D force table, a surface electromyography (EMG) detector, a non-implantable electrocorticography (ECG) detector, a functional near-infrared spectrometer, an eye tracker, a virtual reality device, and an exoskeleton, etc.
[0031] While determining the cumulative and static errors between the external acquisition terminal and the implantable brain-computer interface device, the external acquisition terminal can synchronize and control the implantable brain-computer interface device with external acquisition / control devices such as 3D motion capture systems, inertial measurement units, pressure plates, 3D force tables, surface electromyography detectors, non-implantable electrocorticography detectors, eye trackers, virtual reality devices, and exoskeletons based on the known clock errors between the non-implantable device and the external acquisition terminal.
[0032] Figure 4 This is a schematic diagram of the data acquisition process according to an embodiment of the present invention. For example... Figure 4 As shown, the external acquisition terminal sends a start acquisition command to the implantable brain-computer interface device, simultaneously initializing the clock and starting timing. The implantable brain-computer interface device receives the start acquisition command after a delay of t1 and begins data acquisition. During subsequent verification, the actual acquisition time (i.e., number of sampling points / actual sampling rate) can be calculated based on the number of sampling points and the actual sampling rate. Due to the clock discrepancy between the in-body and external terminals, there will be a linear error of magnitude t2 between the theoretical acquisition time (i.e., the aforementioned first acquisition time, obtained by dividing the number of sampling points by the theoretical sampling rate) and the actual acquisition time, which increases with the increase of the actual acquisition time. Figure 4 The diagram illustrates an example where the theoretical acquisition time is shorter than the actual acquisition time. In this case, the actual acquisition time equals the sum of the theoretical acquisition time and the linear error t2. After the actual acquisition time, the implantable brain-computer interface device completes data acquisition and sends the acquired data to the external acquisition terminal. After a data return delay t3, the external acquisition terminal receives the acquired data and stops timing, resulting in the second acquisition time. It can be seen that the second acquisition time consists of the acquisition command delay t1, the actual acquisition time (i.e., theoretical acquisition time + t2), and the data return delay t3. Here, t1 is the stationary error in a single acquisition due to factors such as data transmission delay and processing time. t3 is the error with noise components introduced by communication delay, which occurs the same number of times in a single acquisition as the number of return transmissions and the number of labeling commands. The linear error t2 shown in the diagram is the cumulative error caused by the difference between the actual sampling rate and the theoretical sampling rate of the implantable brain-computer interface device.
[0033] Therefore, in one optional implementation, calculating the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time may include: performing regression analysis on the first acquisition time and the second acquisition time to calculate the cumulative error and static error between the implantable brain-computer interface device and the external device. In one embodiment, the cumulative error can be considered to increase approximately linearly with the acquisition time; therefore, a linear regression method can be used for analysis, and the relationship between the first acquisition time and the second acquisition time can be expressed by the following formula:
[0034] Where k = f2 / f1, T2 = n / f2 In the above formula, T1 is the second acquisition time, T2 is the first acquisition time, k is the cumulative error, representing the deviation between the actual sampling rate f1 and the theoretical sampling rate f2, and b is the static error, representing the fixed clock error between the implanted brain-computer interface device and the external device that does not change over time. The first acquisition time T2 is calculated based on the number of sampling points n and the theoretical sampling rate f2.
[0035] Based on the above relationship, step S110 can be continuously executed to obtain multiple sets of second and first acquisition times. These sets are then fitted using linear regression to calculate the cumulative error k and static error b. Furthermore, since the theoretical sampling rate f2 is known, the actual sampling rate f1 can be calculated based on the theoretical sampling rate f2 and the cumulative error k.
[0036] In other alternative embodiments, due to the influence of factors such as temperature and power supply, the cumulative error may increase non-linearly with the acquisition time. Therefore, regression analysis methods such as multinomial regression, ridge regression, and lasso regression can be used to calculate the cumulative error. The specific calculation process will not be described in detail here.
[0037] Step S130: Verify the cumulative error and / or static error through the verification platform to determine the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0038] This embodiment controls the implantable brain-computer interface device to acquire data, obtaining the first acquisition time and the second acquisition time of the implantable brain-computer interface device. Based on the first acquisition time and the second acquisition time, the cumulative error and static error between the implantable brain-computer interface device and the external device are calculated. The cumulative error and / or static error are verified through a verification platform to determine the synchronization accuracy between the implantable brain-computer interface device and the external device. Thus, this embodiment of the invention can determine and verify the synchronization error between the implantable brain-computer interface device and the external device without using other devices, thereby ensuring the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0039] Furthermore, the method for evaluating the synchronous acquisition and control performance of the implantable brain-computer interface and the external device in this embodiment may also include: acquiring in vivo acquisition data acquired by the implantable brain-computer interface device and external acquisition data acquired by the external device, and correcting the synchronization error between the in vivo acquisition data and the external acquisition data based on the cumulative error and the static error.
[0040] Specifically, acquiring in vivo data collected by an implantable brain-computer interface (BCI) device can include: an external device sending a start acquisition command to the implantable BCI device, waiting to receive the acquisition data sent by the implantable BCI device, and after confirming that the acquisition process is stable, sending a tagging signal to the implantable BCI device to control the implantable BCI device to record the tag in the sent in vivo acquisition data, and receiving the tagged in vivo acquisition data. Simultaneously with sending the tagging signal, the external device also records the tag in the external acquisition data. Common methods for recording tagging signals include recording at an external clock scale, or only recording coarse-grained in vivo clock scale tags, without specifying a particular sampling point. The tagging method for implantable BCI devices proposed in this invention can accurately record the tag at the "sampling point acquired when the implantable device receives the tagging signal," without involving time errors such as subsequent data backhaul, achieving a lower latency and more accurate tagging function. Therefore, the data can be initially aligned based on the labels in the in vivo and in vitro data. Then, based on the previously calculated cumulative and static errors, the time axis of the in vivo and in vitro data can be adjusted according to the aforementioned formula to correct the synchronization error.
[0041] Optionally, when the implantable brain-computer interface device is required for neural stimulation, the external device controls the implantable brain-computer interface device to output stimulation signals, and the external device synchronously collects or stimulates the nerves in response to the stimulation signals. At this time, the actual time of stimulation applied by the implantable brain-computer interface device can be determined based on the calculated cumulative error and static error, and synchronous collection or neural stimulation can be performed according to this time.
[0042] The following section introduces the verification methods for cumulative error and static error. It can be understood that when verifying the error, the verification platform is connected to the implantable brain-computer interface device and the external device respectively, so as to achieve accurate measurement of the collected data.
[0043] Figure 5 This is a flowchart of an error verification method according to an embodiment of the present invention. Figure 5 As shown, in one alternative implementation, verifying the cumulative error and / or static error may include the following steps: Step S210: Acquire the sampling signal from the implantable brain-computer interface device within a predetermined time period. Specifically, an oscilloscope or other similar measuring device can be set up in the verification platform and connected to the implantable brain-computer interface device via an interface such as a gold finger to acquire the signal output by the implantable brain-computer interface device. The verification platform sends a start acquisition command to the implantable brain-computer interface device. The implantable brain-computer interface device responds to the start acquisition command by entering an acquisition interrupt and starting to output signals. The measuring device acquires its output signals until the predetermined time is reached. At this point, the verification platform issues a stop acquisition command. It is important to note that data that has been acquired but is not yet complete will be immediately transmitted instead of being discarded to ensure data integrity. In this way, the corresponding sampling signal can be obtained.
[0044] Step S220: Determine the number of sampling points for the sampled signal based on the edge detection method. At the moment of start and end of acquisition, there is a corresponding interruption edge in the sampled signal. By judging the interruption edge, the signal between the two interruption edges can be obtained as the valid sampled signal. Then, by identifying the valid edges of the valid sampled signal (filtering out invalid edges such as glitches and narrow pulses), the number of sampling points can be determined based on the number of valid edges.
[0045] Step S230: Calculate the actual sampling rate based on the number of sampling points and the predetermined time.
[0046] Step S240: Verify the cumulative error based on the actual sampling rate. Specifically, the actual cumulative error can be determined based on the actual sampling rate measured in step S230, and compared with the cumulative error calculated in step S120. If the difference between the two is less than a predetermined threshold, it indicates that the cumulative error calculated in step S120 is accurate. The specific calculation method for determining the cumulative error based on the actual sampling rate is similar to the aforementioned method and will not be repeated here.
[0047] This embodiment measures the actual sampling rate of the implantable brain-computer interface device by using an external measuring device, thereby completing the measurement of the cumulative error and verifying the previously calculated cumulative error. This ensures the accuracy of the error calculation and correction process, and thus guarantees the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0048] Figure 6 This is a flowchart of another error verification method according to an embodiment of the present invention. Figure 6 As shown, in another alternative implementation, verifying the cumulative error and / or static error may include the following steps: Step S310: Send a first control signal to the implantable brain-computer interface device and a second control signal to the external device. The first control signal is used to control the implantable brain-computer interface device to output a stimulation signal, and the second control signal is used to control the external device to perform a corresponding operation.
[0049] Step S320: Receive the stimulation signal output by the implantable brain-computer interface device and record the reception time of the stimulation signal.
[0050] Step S330: Obtain the start execution time of the external device. The start execution time is the time when the external device begins to perform the corresponding operation. Optionally, the external device performing the corresponding operation may be outputting a stimulation signal. In this case, the start execution time is the time when the external device begins to send the stimulation signal. Alternatively, the external device performing the corresponding operation may be collecting relevant data. In this case, the start execution time is the time when the external device begins to collect data. The start execution time can be recorded by the external device when it begins to perform the corresponding operation and sent to the verification platform.
[0051] Step S340: Calculate the difference between the receiving time and the start execution time. It can be understood that steps S310-S330 can be executed multiple times to allow the verification platform to statistically analyze the time delay during each execution, increasing the data sample size and thus ensuring the accuracy of the verification results.
[0052] Step S350: Verify the cumulative error and static error based on the difference between the receiving time and the start execution time.
[0053] Specifically, regression analysis can be performed on the receiving time and the start time to calculate the actual measured cumulative error and static error, and then compared with the previously calculated results to verify their accuracy.
[0054] In this embodiment, steps S310-S340 run for an extended period. Based on the statistical results obtained in step S340, the difference between the received signal and the start-of-execution signal at different time intervals can be analyzed to detect the cumulative and static errors in the synchronization control process between the implanted brain-computer interface device and the external device. By comparing this difference with the previously calculated cumulative and static errors, if the difference is less than a predetermined threshold, it indicates that the calculated cumulative and static errors are accurate. If the difference is greater than or equal to the predetermined threshold, it indicates that the synchronization accuracy between the implanted brain-computer interface device and the external device is poor, and error calculation and correction need to be performed again. Therefore, the synchronization accuracy between the implanted brain-computer interface device and the external device in the synchronization control process can be verified, ensuring the accuracy and stability of the synchronization control.
[0055] Figure 7 This is a flowchart of another error verification method according to an embodiment of the present invention. Figure 7 As shown, in another alternative implementation, verifying the cumulative error and / or static error may include the following steps: Step S410: Send a start acquisition command to the implantable brain-computer interface device and record the corresponding first time.
[0056] Step S420: Receive the first packet of data collected by the implantable brain-computer interface device and record the corresponding second time.
[0057] Step S430: Subtract the sampling time from the difference between the second time and the first time to obtain the acquisition start time. The sampling time is the actual duration of the first packet of acquired data received. Optionally, the start acquisition command carries the sampling time, and the implantable brain-computer interface device responds to the received start acquisition command by acquiring data according to the sampling time. The verification platform can acquire and analyze the acquired data through a measurement device.
[0058] Step S440: Verify the static error based on the data acquisition start time.
[0059] Optionally, this embodiment can also compare the acquisition start time with a preset reference time to determine whether the difference between the two is within a predetermined range, so as to determine whether the operation status of the implantable brain-computer interface device is normal. The implantable brain-computer interface device has a fixed reference time, which is used to characterize the acquisition start time of the implantable brain-computer interface device under ideal conditions. Technicians can obtain it from the manufacturer's manual of the implantable brain-computer interface device and preset it in the verification platform.
[0060] Figure 8 This is a flowchart of another error verification method according to an embodiment of the present invention. Figure 8 As shown, in another alternative implementation, verifying the cumulative error and / or static error may include the following steps: Step S510: Control the implantable brain-computer interface device to collect predetermined reference data.
[0061] In this embodiment, the verification platform includes a signal generator. The verification platform inputs predetermined reference data into the signal generator to generate a corresponding signal. Before the verification platform outputs this signal, the implantable brain-computer interface device will start the acquisition function in advance and end the acquisition after the signal ends, that is, the implantable device acquires complete preset reference data.
[0062] Step S520: Acquire the collected data sent by the implantable brain-computer interface device.
[0063] Step S530: Based on the error between the collected data and the reference data, verify the cumulative error and the static error. Specifically, calculate the static deviation and the dynamic deviation that changes over time between the collected data and the reference data, and compare them with the results calculated in step S120 to verify their accuracy.
[0064] Furthermore, the acquired data can be corrected based on the cumulative error and static error calculated in step S120. Then, using the aforementioned labeling method, the corrected acquired data and reference data are aligned to determine the cumulative time error and phase difference offset of the acquired data compared to the reference data at each time point. Simultaneously, the ideal number of sampling points can be calculated based on the theoretical sampling rate of the implantable brain-computer interface device and the time length of the reference data, determining the difference between the ideal number of sampling points and the actual number of sampling points acquired. Optionally, the frequency offset between the acquired data and the reference data can be calculated using methods such as Fast Fourier Transform, analyzing the error from both the time and frequency domains. Through multi-dimensional error calculation, this embodiment can accurately analyze the correction results to ensure the validity of the verification results to the greatest extent possible.
[0065] This embodiment verifies the long-term acquisition process, ensuring the accuracy of the calculated cumulative error and static error in long-term acquisition scenarios.
[0066] Figure 9 This is a schematic diagram illustrating the marking delay verification under the clock scale of an implanted device, according to an embodiment of the present invention. Specifically, as shown... Figure 9 As shown, for a single labeling command, the external acquisition terminal sends a labeling instruction in response to a trigger signal. After a labeling instruction delay, the implantable brain-computer interface (BCI) device receives and records the instruction. It should be understood that this labeling instruction is sent by the external acquisition terminal in response to receiving a trigger signal from the implantable BCI device. The implantable BCI device sends a trigger signal to the external acquisition terminal when it has acquired a preset number of sampling points. Since the trigger signal is transmitted via wired communication and requires no data processing, the time error between its reception and the time of the external acquisition terminal's issuance of the labeling signal is small and can be ignored during evaluation. For example, the implantable device sends a trigger signal to the external acquisition terminal via wired communication every 100 sampling points. Due to the wired communication, the external acquisition terminal responds to the trigger signal and sends the labeling instruction almost instantly. Upon receiving the labeling instruction, the implantable device can calculate the labeling instruction delay using its internal clock source.
[0067] Figure 10 This is a flowchart of another error verification method according to an embodiment of the present invention. The figure shows that, in an optional implementation, this embodiment can also verify the triggering and marking functions of the implantable brain-computer interface device through the following steps: In step S610, the implantable brain-computer interface device, in response to the acquisition of a preset number of sampling points, sends a trigger signal to the external device and records the sending time of the trigger signal.
[0068] In step S620, the external device, in response to receiving the trigger signal, sends a marking signal to the implantable brain-computer interface device.
[0069] In step S630, the implantable brain-computer interface device responds to the received tagging signal by performing tagging and recording the tagging time. Tagging refers to recording tags in the acquired data to mark data at a specific moment.
[0070] Step S640: Determine the accuracy of the triggering and marking functions of the implantable brain-computer interface device based on the difference between the transmission time and the marking time. Under normal circumstances, the difference between the transmission time and the marking time should be less than a certain value; otherwise, the marking function of the implantable brain-computer interface device can be considered abnormal. It can be understood that this verification can be performed directly by the implantable brain-computer interface device, sending an alarm message when an anomaly occurs, or the implantable brain-computer interface can send the transmission time and marking time to an external device for judgment.
[0071] This embodiment tests the triggering and marking functions of the implanted brain-computer interface device. When the error is less than a certain value, the function is determined to be normal, thus ensuring that the results obtained from the previous steps involving the marking function are valid.
[0072] It is understood that one or more of the above error verification methods can be selected for verification, and this embodiment does not limit this.
[0073] In other optional embodiments, after calculating the cumulative error and static error in step S120, the clock of the implantable brain-computer interface device can be directly adjusted based on the cumulative error and static error. In this embodiment, since the clock of the implantable brain-computer interface device is adjusted, the data obtained during synchronous acquisition and control does not need to be corrected again. Accordingly, when the above-mentioned error verification methods are performed, they can directly determine whether each error is zero or whether the difference from zero is within a certain range. Thus, the device synchronization process and verification process can be further simplified.
[0074] Figure 11 This is a schematic diagram of an implantable brain-computer interface and an external device for synchronous acquisition and control performance evaluation, according to an embodiment of the present invention. Figure 11 As shown, the implantable brain-computer interface and external device synchronous acquisition and control performance evaluation device 11 of this embodiment includes an implantable brain-computer interface device 111, an external device 112, and a verification platform 113.
[0075] The implantable brain-computer interface device 111 transmits data wirelessly to the external device 112, while the external device 112 transmits data via wired communication to the verification platform 113. Alternatively, the implantable brain-computer interface device 111 and the verification platform 113 transmit data via a combination of near-field wireless communication and wired communication. Specifically, the verification platform 113 is connected to the external antenna coil via a wired connection, and the external antenna coil communicates with the implantable brain-computer interface device via percutaneous wireless communication through near-field communication. This minimizes external interference and reduces uncertainties associated with conventional wireless transmission methods such as Bluetooth. In other optional implementations, the implantable brain-computer interface device 111 and the verification platform 113 can also transmit data directly via wireless communication.
[0076] The data transmission between the implantable brain-computer interface device 111 and the verification platform 113 refers to the process by which the verification platform 113 controls the implantable brain-computer interface device 111. It should be understood that, to achieve accurate data measurement, the measuring equipment of the verification platform 113 can also be connected to the implantable brain-computer interface device 111 via a wired connection during the verification phase. Optionally, depending on the interface of the implantable brain-computer interface device 111, the verification platform 113 is equipped with different software and hardware interfaces to achieve compatibility with different implantable brain-computer interface devices 111. The specific software and hardware interface types can be determined based on the model of the implantable brain-computer interface device 111 to be verified. For example, in one embodiment, the implantable brain-computer interface device 111 and the verification platform 113 are connected via a gold finger interface. The titanium shell of the implantable brain-computer interface device 111 can be disassembled, and the PCB (Printed Circuit Board) inside can be connected to the verification platform via the gold finger.
[0077] The implantable brain-computer interface device 111 is used to collect neural signals to achieve the perception of human-related data. Optionally, the implantable brain-computer interface device 111 can also be used to output neural stimulation signals to achieve the regulation of brain function.
[0078] External device 112 is used to control the implantable brain-computer interface device 111 to acquire data, obtain the first acquisition time and the second acquisition time of the implantable brain-computer interface device 111, perform regression analysis on the first acquisition time and the second acquisition time, and calculate the cumulative error and static error between the implantable brain-computer interface device 111 and the external device 112. The first acquisition time is the theoretical acquisition time of the data from the implantable brain-computer interface device, and the second acquisition time is the time from when the external device 112 sends a start acquisition command to the implantable brain-computer interface device 111 to when it receives the acquired data. Optionally, the external device 112 has data acquisition capability and / or neural stimulation capability. Synchronization between the implantable brain-computer interface device 111 and the external device 112 refers to the time synchronization between their data acquisition processes, data acquisition processes and neural stimulation processes, or neural stimulation processes.
[0079] The verification platform 113 is used to verify the cumulative error and / or static error to determine the synchronization accuracy between the implantable brain-computer interface device 111 and the external device 112.
[0080] Specifically, the verification platform 113 includes a control terminal and a measuring device. The control terminal sends relevant control commands to the implantable brain-computer interface device 111 and the external device 112 during the verification process. The measuring device captures and analyzes the signals emitted by the implantable brain-computer interface device 111 to obtain verification results, which are then sent to the control terminal for display. Optionally, the verification platform 113 also includes a signal generator to output a reference signal during the verification of the synchronous control of the implantable brain-computer interface device 111 and the external device 112. All devices in the verification platform 113 are connected via wired connections to reduce data transmission latency. The specific verification process of the verification platform 113 is described in the error verification method described above and will not be repeated here.
[0081] Figure 12 This is a schematic diagram illustrating the connection between the general verification platform of this invention and the implantable brain-computer interface device under test (i.e., the implanted device in the figure) provided by the manufacturer. It is an example of a connection implementation during a verification test process, used to help explain the execution of the verification platform. Figures 5-10 The verification method described above determines the synchronization accuracy between the implantable brain-computer interface device and the external device. For example... Figure 12 As shown, in one embodiment, the verification platform includes a channel selection module, a data integration module, a pluggable interface for connecting to the implantable device under test (IDD), a channel selection interface for connecting to the IDD, a test signal input interface for connecting to a signal generator, and an oscilloscope interface for visualization by the verification personnel; the IDD provided by the manufacturer should include an implantable device product (such as...). Figure 12The device includes an implantable device with an openable casing, an external programmable component (e.g., an external coil, communication module, etc., for near-field electromagnetic coupling communication), and a forwarding module that supports the verification platform interface requirements and can be wired for forwarding near-field communication information. For example, the forwarding module supports a custom application layer protocol based on USB and uses a specified structured message format, with messages conforming to specified frame headers, command identifiers, data lengths, data content, and check fields. Other replaceable devices for verification implementers include signal generators, oscilloscopes, and external acquisition terminals. Specifically, the implantable device may include a metal casing, a communication antenna for near-field communication with the external coil, a core circuit board (with a Bluetooth module for wireless communication with the external acquisition terminal), acquisition interrupt contacts for connection to a pluggable interface, and multiple electrode contacts for connection to a channel selection interface.
[0082] The channel selection module supports the selection of different stimulation / acquisition channels and loads; the data integration module integrates signals indicating acquisition completion (e.g., signals indicating acquisition interruption or other signals indicating acquisition time points) ①, near-field communication information ③ (i.e., signals transmitted by the implanted device through near-field communication, decoded, and wired forwarded to the verification platform, used to indicate the actual acquisition time in the unopened / implanted state) and the test input signal ④ of the signal generator (used to simulate electrophysiological signals, by emitting single-frequency signals of different frequencies to verify the error introduced by synchronization in the actual scenario, which can be expressed by time difference / phase difference), and sends the integrated signal ② to the external acquisition terminal for further calculation and verification; the forwarding module included in the implanted device under test should meet the interface and protocol requirements of the verification platform and support wired connection with the verification platform to transmit near-field commands; the signal generator is replaceable and is used to generate test signals; the oscilloscope is optional during the test and is used as a visualization measurement device; the external acquisition terminal communicates wirelessly with the implanted device under test (e.g., based on a specified Bluetooth protocol) to acquire data or send commands, simulating communication in the actual scenario, and combines the data from the data integration module for calculation and verification. As mentioned above, the verification platform's interfaces include a channel selection interface for acquiring stimulation / acquisition signals, connected to the electrode contacts of the implantable device under test (PDD); a pluggable interface for connecting to the acquisition interruption contact of the PDD; an oscilloscope interface for connecting to a replaceable oscilloscope; and a test signal input interface for connecting to a replaceable signal generator. Additionally, the verification platform's interfaces also include an interface (not shown in the figure) supporting wired connection to the forwarding module of the PDD. This embodiment does not limit the specific types of each interface, only requiring that the forwarding module provided by the PDD meets the general interface requirements of the verification platform. The signal from the acquisition interruption contact is used for... Figure 9 , Figure 10The marking function verification test shown in the figure indicates the actual sampling time of the implanted device, which is used to trigger the sending of the marking signal and determine the actual time. The difference between the sending time and the marking time is calculated to determine the accuracy of the triggering and marking function of the implanted brain-computer interface device.
[0083] This embodiment controls the implantable brain-computer interface device to acquire data through an external device, obtaining the first acquisition time and the second acquisition time of the implantable brain-computer interface device. Based on the first acquisition time and the second acquisition time, the cumulative error and static error between the implantable brain-computer interface device and the external device are calculated. The cumulative error and / or static error are verified through a verification platform to determine the synchronization accuracy between the implantable brain-computer interface device and the external device. Thus, this embodiment of the invention can calculate and correct the synchronization error between the implantable brain-computer interface device and the external device without relying on other devices. At the same time, error verification is achieved through an external verification platform, improving the synchronization accuracy between the implantable brain-computer interface device and the external device.
[0084] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0085] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.
[0086] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.
[0087] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.
[0088] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.
[0089] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0090] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for evaluating the synchronous acquisition and control performance of an implantable brain-computer interface and an external device, characterized in that, The method includes: Data acquisition is performed by controlling the implantable brain-computer interface device via wireless communication, and the first acquisition time and the second acquisition time of the implantable brain-computer interface device are obtained. The first acquisition time is the theoretical acquisition time of the data of the implantable brain-computer interface device, and the second acquisition time is the time from when the external device sends the start acquisition command to the implantable brain-computer interface device to when it receives the acquired data. Calculate the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time; The cumulative error and / or static error are verified by the verification platform to determine the synchronization accuracy between the implantable brain-computer interface device and the external device.
2. The method according to claim 1, characterized in that, The calculation of the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time includes: Regression analysis is performed on the first acquisition time and the second acquisition time to calculate the cumulative error and static error between the implantable brain-computer interface device and the external device. The cumulative error represents the deviation between the actual sampling rate and the theoretical sampling rate.
3. The method according to claim 1, characterized in that, The method further includes: In response to receiving a trigger signal from the implantable brain-computer interface device, a marking signal is sent to the implantable brain-computer interface device to enable the implantable brain-computer interface device to perform marking, and the marking time is recorded. The accuracy of the triggering and marking function of the implantable brain-computer interface device is determined based on the difference between the sending time and the marking time. The trigger signal is issued by the implantable brain-computer interface device in response to the acquisition of a preset number of sampling points, and the sending time is the time when the implantable brain-computer interface sends the trigger signal.
4. The method according to claim 1, characterized in that, The method further includes: Acquire in vivo data collected by the implantable brain-computer interface device and in vitro data collected by the external device; The synchronization error between the in vivo and in vitro acquired data is corrected based on the cumulative error and the static error.
5. The method according to claim 1, characterized in that, The control of the implantable brain-computer interface device to perform data acquisition, and the acquisition of the first acquisition time and the second acquisition time of the implantable brain-computer interface device, include: Send a start acquisition command to the implantable brain-computer interface device; Receive the data collected by the implantable brain-computer interface device, and record the time from sending the start collection command to receiving the data collected as the second collection time; The first acquisition time of the implantable brain-computer interface device is calculated based on the number of sampling points and the theoretical sampling rate.
6. The method according to claim 1, characterized in that, The verification of the cumulative error and / or the static error includes: Acquire the sampling signal of the implantable brain-computer interface device within a predetermined time period; The number of sampling points for the sampled signal is determined based on the edge detection method; The actual sampling rate is calculated based on the number of sampling points and the predetermined time. The cumulative error is verified based on the actual sampling rate.
7. The method according to claim 1, characterized in that, The verification of the cumulative error and / or the static error includes: A first control signal is sent to the implantable brain-computer interface device, and a second control signal is sent to the external device at the same time. The first control signal is used to control the implantable brain-computer interface device to output a stimulation signal, and the second control signal is used to control the external device to perform a corresponding operation. Receive the stimulation signal output by the implantable brain-computer interface device and record the reception time of the stimulation signal; The start execution time of the external device is obtained, where the start execution time is the time when the external device begins to perform the corresponding operation. Calculate the difference between the receiving time and the start execution time; The cumulative error and the static error are verified based on the difference between the receiving time and the start execution time.
8. The method according to claim 1, characterized in that, The verification of the cumulative error and / or the static error includes: Send a start acquisition command to the implantable brain-computer interface device and record the corresponding first time. Receive the first packet of data sent by the implantable brain-computer interface device and record the corresponding second time. The difference between the second time and the first time, minus the sampling time, is used as the acquisition start time; The static error is verified based on the acquisition start time.
9. The method according to claim 1, characterized in that, The verification of the cumulative error and / or the static error includes: Control the implantable brain-computer interface device to collect predetermined reference data; Acquire the collected data sent by the implanted brain-computer interface device; The cumulative error and the static error are verified based on the error between the collected data and the reference data.
10. A device for evaluating the performance of an implantable brain-computer interface and an external device in synchronous data acquisition and control, characterized in that, The device includes: Implantable brain-computer interface devices are used to collect neural signals; An external device is wirelessly connected to the implantable brain-computer interface device and is used to control the implantable brain-computer interface device to collect data, obtain the first acquisition time and the second acquisition time of the implantable brain-computer interface device, and calculate the cumulative error and static error between the implantable brain-computer interface device and the external device based on the first acquisition time and the second acquisition time. The first acquisition time is the theoretical acquisition time of the data of the implantable brain-computer interface device, and the second acquisition time is the time from when the external device sends a start acquisition command to the implantable brain-computer interface device to when it receives the acquired data. A verification platform is used to verify the cumulative error and / or the static error, and to determine the synchronization accuracy between the implantable brain-computer interface device and the external device.