Phase synchronization method, system and storage medium for electroencephalogram signal
By adding visual stimulation identification information to the EEG signal acquisition module and sending it back to the cloud service module in real time, the phase synchronization delay and clock asynchronous problems in the EEG signal analysis system are solved, and the accuracy and reliability of EEG signal analysis are improved. .
Patent Information
- Application Number
- CN202411179565.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-27
AI Technical Summary
In existing EEG signal analysis systems, there are problems of long time delay and out-synchronization of the clock of heterogeneous system, resulting in low accuracy of EEG signal analysis.
By adding visual stimulation identification information to the EEG signal acquisition module for precise marking processing, an EEG signal with a synchronous signal identification is generated, and it is transmitted back to the EEG signal encoding module in real time through Bluetooth protocol, and further transmitted to the cloud service Modules are used to analyze and complex EEG analysis is performed using cloud computing.
It realizes high-precision alignment of EEG signals and visual stimuli, improves the accuracy and reliability of analysis, ensures that the data is highly consistent with the visual stimuli in time, and improves the depth and accuracy of EEG activity analysis.
Smart Images

Figure CN118713810B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electroencephalogram (EEG) processing technology, and in particular to a phase synchronization method, system and storage medium for EEG signals. Background Art
[0002] In the brain-computer interface system based on visual evoked stimulation, it is usually composed of components such as stimulation paradigm, EEG signal acquisition device, data acquisition software, and user EEG data analysis algorithm. The phase information presented by visual evoked stimulation is usually used in the encoding and decoding of EEG signals, especially the stimulation paradigm based on phase encoding, such as the visual evoked potential brain-computer interface paradigm based on pseudo-random coding, or the EEG signal encoding and decoding algorithm that is very sensitive to phase, such as the extraction of task-related components and task discrimination pattern analysis algorithm. The phase information synchronization between the various components of the system is the key to the correct decoding of the algorithm, and it is also an important factor affecting the improvement of the overall information transmission rate of the system. The phase synchronization of the existing system usually has problems such as long time delay and asynchronous clocks of heterogeneous systems, which makes it difficult to achieve precise control, resulting in low accuracy of EEG signal analysis. Summary of the invention
[0003] The main purpose of the embodiments of the present invention is to provide a phase synchronization method, system and storage medium for EEG signals, aiming to solve the problem that the phase synchronization of existing systems usually has long time delays, heterogeneous system clock asynchrony and other problems, which leads to low accuracy of EEG signal analysis.
[0004] In a first aspect, an embodiment of the present invention provides a phase synchronization method of an EEG signal, which is applied to a phase synchronization system of an EEG signal. The phase synchronization system of the EEG signal includes an EEG signal encoding module, an acquisition module, and a cloud service module, including:
[0005] The acquisition module acquires a first EEG signal generated by the subject under the stimulation of the target object, wherein the first EEG information is an original EEG signal generated by the subject under the stimulation of the target object when the acquisition module acquires the first EEG signal;
[0006] The EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module;
[0007] The acquisition module receives the identification information, and performs labeling processing on the first EEG signal according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with a time point when the subject receives the stimulus;
[0008] The acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time via the Bluetooth protocol;
[0009] The EEG signal encoding module receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis according to the second EEG signal.
[0010] In a second aspect, an embodiment of the present invention provides a phase synchronization system for an EEG signal, wherein the phase synchronization system for an EEG signal includes an EEG signal encoding module, an acquisition module, and a cloud service module, including:
[0011] The acquisition module acquires a first EEG signal generated by the subject under the stimulation of the target object, wherein the first EEG information is an original EEG signal generated by the subject under the stimulation of the target object when the acquisition module acquires the first EEG signal;
[0012] The EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module;
[0013] The acquisition module receives the identification information, and performs labeling processing on the first EEG signal according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with a time point when the subject receives the stimulus;
[0014] The acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time via the Bluetooth protocol;
[0015] The EEG signal encoding module receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis according to the second EEG signal.
[0016] In a third aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of the EEG signal phase synchronization methods provided in the specification of the present invention.
[0017] The embodiment of the present invention provides a phase synchronization method, system and storage medium of an electroencephalogram signal. The method is applied to a phase synchronization system of an electroencephalogram signal. The phase synchronization system of an electroencephalogram signal includes an electroencephalogram signal encoding module, an acquisition module and a cloud service module. When the acquisition module acquires the first electroencephalogram signal generated by the subject under the stimulation of the target object, the identification information of the visual stimulus is added, and the first electroencephalogram signal can be accurately marked, thereby obtaining a second electroencephalogram signal with a synchronization signal identification. This marking process helps to associate the acquired electroencephalogram signal with a specific visual stimulus, and provides accurate electroencephalogram signal information for subsequent analysis. The acquisition module transmits the second electroencephalogram signal back to the electroencephalogram signal encoding module in real time through the Bluetooth protocol, and further transmits it to the cloud service module, so as to realize the rapid transmission and processing of the electroencephalogram signal. This real-time performance is of great significance for real-time monitoring and instant feedback, and data analysis results can be obtained faster, and relevant adjustments or optimizations can be made. The second electroencephalogram signal with the synchronization signal identification is then uploaded to the cloud service module for analysis, and the powerful processing power of cloud computing can be used for complex electroencephalogram analysis. This method can process a large amount of data and use advanced algorithms and models to provide more in-depth and accurate EEG activity analysis results. Finally, by synchronously marking and real-time feedback of the first EEG signal, it can ensure that the collected data is highly consistent with the visual stimulus in time, thereby improving the accuracy and reliability of the analysis. In addition, the cloud service module can also process a large amount of collected EEG signal data, and then more comprehensively study the relationship between EEG signals and visual stimuli. Finally, this method also solves the problem that the existing system phase synchronization usually has long time delays and heterogeneous system clock asynchrony, which leads to low accuracy of EEG signal analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic flow chart of a method for phase synchronization of an electroencephalogram signal provided by an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a scenario for implementing the phase synchronization method of EEG signals provided in this embodiment;
[0021] Figure 3 A schematic diagram of the module structure of a phase synchronization system for EEG signals provided by an embodiment of the present invention;
[0022] Figure 4A schematic diagram of the module structure of another EEG signal phase synchronization system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0025] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0026] The embodiment of the present invention provides a method, system and storage medium for phase synchronization of EEG signals. The method for phase synchronization of EEG signals can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, a personal digital assistant and a wearable device. The terminal device can be a server or a server cluster.
[0027] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0028] Please refer to Figure 1 , Figure 1 A schematic flow chart of a method for phase synchronization of an electroencephalogram signal provided in an embodiment of the present invention.
[0029] The phase synchronization method of the EEG signal is applied to the phase synchronization system of the EEG signal, and the phase synchronization system of the EEG signal includes an EEG signal encoding module, an acquisition module, and a cloud service module. Figure 1 As shown, the phase synchronization method of the EEG signal includes steps S101 to S105.
[0030] Step S101, the acquisition module acquires a first EEG signal generated by the subject under stimulation of a target object, wherein the first EEG information is an original EEG signal acquired by the acquisition module and generated by the subject under stimulation of the target object.
[0031] Exemplarily, the subject is an experimental subject, and the target object is a stimulus signal or stimulus source that the subject needs to receive. The target object may be a visual stimulus.
[0032] Exemplarily, the acquisition module is used to acquire a first EEG signal generated by the subject under the stimulation of the target object, and the first EEG signal is an original EEG signal generated by the subject under the stimulation of the target object acquired by the acquisition module.
[0033] Step S102: The EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module.
[0034] Exemplarily, the target object is a visual stimulus, and when the acquisition module acquires the first EEG signal corresponding to the subject under the visual stimulus, the EEG signal encoding module also needs to send the identification information corresponding to the visual stimulus to the acquisition module. The identification information includes but is not limited to the start time and end time corresponding to the visual stimulus, the stimulus type corresponding to the visual stimulus, and the like.
[0035] For example, at the beginning and end of each visual stimulus presentation, the stimulus program sends the identification information to the acquisition device via wireless transmission through serial communication.
[0036] In some embodiments, the phase synchronization system of the EEG signal also includes a 2.4G Trigger signal synchronization module, and the EEG signal encoding module sends the identification information corresponding to the visual stimulation to the acquisition module, including: the EEG signal encoding module encodes the target object and periodically presents it in the stimulation program in the form of a flashing picture stimulation, and the stimulation program uses the 2.4G Trigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module in each cycle, and synchronously sends the stimulation type identifier corresponding to the cycle to the acquisition module.
[0037] Exemplarily, the phase synchronization system of the EEG signal also includes a 2.4G Trigger signal synchronization module. When the EEG signal encoding module sends the identification information corresponding to the visual stimulation to the acquisition module, the EEG signal encoding module is first required to encode the target object and periodically present it in the stimulation program in the form of a picture flashing stimulation. The stimulation program uses the 2.4G Trigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module in each cycle.
[0038] For example, by periodically presenting picture flashing stimulation in the stimulation program, and using the 2.4G Trigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier to the acquisition module, it is possible to ensure that the EEG signal data is accurately aligned with the time point of the visual stimulation. This precise synchronization helps ensure that the EEG data accurately reflects the start and end of the stimulation, thereby improving the reliability of the collected data.
[0039] At the same time, the stimulation type identifier corresponding to the cycle needs to be synchronously sent to the acquisition module, that is, the data type corresponding to the signal between the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier needs to be synchronously sent to the acquisition module.
[0040] For example, the stimulation type is identified as the data corresponding to the period as training data or test data, or the stimulation type is identified as the type corresponding to the target object, such as visual stimulation, auditory stimulation, tactile stimulation, etc., and then by synchronously sending the stimulation type identification to the acquisition module, the relationship between the EEG signal and the specific type of stimulation can be clarified in the analysis stage.
[0041] Specifically, the above steps can achieve precise synchronization, which helps ensure that the EEG data accurately reflects the start and end information of the stimulation and the stimulation type identification, thereby improving the reliability of the collected data and providing good support for subsequent signal analysis.
[0042] In some embodiments, the stimulation type identifier includes a training data type corresponding to when stimulation is presented, a test data type corresponding to when stimulation is presented, and an EEG data type corresponding to when no stimulation is presented.
[0043] Exemplarily, the stimulation type identifier includes a training data type corresponding to when stimulation is presented, a test data type corresponding to when stimulation is presented, and an EEG data type corresponding to when no stimulation is presented.
[0044] Exemplarily, the training data type corresponding to when there is stimulus presentation is represented as the EEG signal corresponding to the identifier is the EEG signal generated when there is stimulus, and the EEG signal is used as training data, in other words, the EEG signal corresponding to the identifier is used as a training set. That is, the training data type corresponding to when there is stimulus presentation is used to represent the EEG data corresponding to when stimulus presentation occurs during the training phase, and is used for machine learning model training.
[0045] Exemplarily, the test data type corresponding to when there is stimulus presentation indicates that the EEG signal corresponding to the identifier is the EEG signal generated when there is stimulus, and the EEG signal is used as test data, in other words, the EEG signal corresponding to the identifier is used as a test set. That is, the test data type corresponding to when there is stimulus presentation is used to represent the EEG data corresponding to when the stimulus is presented in the test phase, and is used to test the obtained machine learning model.
[0046] Exemplarily, the EEG data type corresponding to when no stimulation is presented includes a training data type corresponding to when no stimulation is presented and a test data type corresponding to when no stimulation is presented. The training data type corresponding to when no stimulation is presented is used to indicate the identifier corresponding to the EEG signal that needs to be discarded in the training phase. The test data type corresponding to when no stimulation is presented is used to indicate the identifier corresponding to the EEG signal that needs to be discarded in the test phase.
[0047] Step S103, the acquisition module receives the identification information, and marks the first EEG signal according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with the time point when the subject receives the stimulus.
[0048] Exemplarily, after receiving the identification information, the acquisition module parses the identification information, thereby marking the first EEG signal according to the analysis result to obtain a second EEG signal. The second EEG signal is an EEG signal with a synchronization signal identification. The identification information is used to ensure that the second EEG signal is precisely aligned with the time point when the subject receives the stimulation. This precise synchronization helps to ensure that the second EEG signal accurately reflects the start and end of the subject under the stimulation of the target object, thereby improving the reliability of the acquired data and providing good support for the subsequent phase synchronization effect.
[0049] For example, the identification information includes but is not limited to the start time and end time corresponding to the visual stimulation, the stimulation type corresponding to the visual stimulation, etc. The first EEG signal is intercepted according to the start time and the end time, and the intercepted signal is marked as a mark corresponding to the stimulation type, thereby obtaining the second EEG signal.
[0050] In some embodiments, the acquisition module marks the first EEG signal according to the identification information to obtain the second EEG signal, including: the acquisition module decodes the stimulation start synchronization signal identifier to obtain a stimulation start identifier; the acquisition module decodes the stimulation end synchronization signal identifier to obtain a stimulation end identifier; the acquisition module decodes the stimulation type identifier to obtain a data type identifier; the acquisition module uses the stimulation start identifier, the stimulation end identifier, and the data type identifier to mark the first EEG signal to obtain the second EEG signal.
[0051] Exemplarily, after receiving the identification information sent by the stimulation program, the 2.4G wireless receiving module in the headband EEG acquisition hardware decodes the identification information and marks each collected first EEG data in real time according to the received identification information.
[0052] For example, the identification information transmitted by the Trigger includes whether the first EEG signal currently collected belongs to the training phase or the test phase, the stimulation start phase or the stimulation end phase, and the stimulation data category. The number of bytes that can be used to carry identification information in the current Bluetooth transmission protocol is 1. The following table shows the specific meanings of bits 1 to 7 in this byte:
[0053] Table 1 Meaning of the corresponding bytes of identification information
[0054] Bit number Decimal illustrate bit 6 0 / 1 1- identifies the first EEG data of the test phase 0- identifies the first EEG data of the training phase bit 5 0 / 1 1-marks the start of each stimulus trial 0-marks the end of each stimulus trial Bit 0~4 0 ~ 32 Stimulus target, 5 bits, supporting 2^5=32 targets in total
[0055] Exemplarily, the acquisition module decodes bit 5 in the above byte to obtain a stimulation start flag or a stimulation end flag.
[0056] For example, when bit5 in the above byte is decoded to 1, it means that the signal at the corresponding position in the first EEG signal is the start of stimulation, and when bit5 in the above byte is decoded to 0, it means that the signal at the corresponding position in the first EEG signal is the end of stimulation.
[0057] Exemplarily, the acquisition module decodes bit6 in the above byte to obtain a data type identifier; the data type identifier includes data in the training phase and data in the test phase. That is, the data type identifier includes a training data type and a test data type.
[0058] For example, when bit6 in the above byte is decoded to obtain 1, it indicates that the corresponding signal in the first EEG signal is of the test data type, and when bit6 in the above byte is decoded to obtain 0, it indicates that the corresponding signal in the first EEG signal is of the training data type.
[0059] It should be noted that in the current Bluetooth transmission protocol, the number of bytes that can be used to carry identification information can be 1 or any other number. The specific meanings represented by different bits in the byte can be set according to actual needs, and this application does not impose any specific restrictions.
[0060] Exemplarily, after obtaining the stimulation start identifier, stimulation end identifier, and data type identifier, the acquisition module uses the stimulation start identifier and stimulation end identifier to perform data segmentation on the first EEG signal to obtain the segmented signal, and then uses the data type identifier to perform data classification on the segmented signal to obtain the second EEG signal with marked processing.
[0061] For example, when the marking process for the second EEG signal is set to 1, it means that the second EEG signal is the EEG data when the stimulus is presented in the test phase, which is used for testing decoding analysis. When the marking process for the second EEG signal is set to 0, it means that the second EEG signal is the EEG data when the stimulus is not presented, which can be used for packet loss processing. When the marking process for the second EEG signal is set to 2, it means that the second EEG signal is the EEG data when the stimulus is presented in the training phase, which is used for machine learning training templates.
[0062] It should be noted that the marking number in the marking processing of the second EEG signal can be defined according to actual needs, and this application does not impose any specific restrictions.
[0063] For example, the EEG data packet message protocol format with a Trigger synchronization signal corresponding to the second EEG signal is shown in Table 2 below:
[0064] Table 2 EEG data packet message protocol format with Trigger synchronization signal
[0065]
[0066] The data format is 120 bytes in total, including 5 samples of EEG data. Each sample contains 8 channels of EEG data, and each channel of EEG data occupies 3 bytes. The Trigger tag occupies 5 bytes, and each byte corresponds to the identification information attached to the 5 samples of EEG data, including 0 / 1 / 2. 0 indicates that the second EEG signal is EEG data when non-stimulation is presented, which can be used for packet loss processing; 1 indicates that the second EEG signal is EEG data when stimulation is presented in the test phase, which is used for test decoding analysis; 2 indicates that the second EEG signal is EEG data when stimulation is presented in the training phase, which is used for machine learning training templates.
[0067] Specifically, by decoding the stimulation start synchronization signal identifier, stimulation end synchronization signal identifier, and stimulation type identifier, the acquisition module can accurately mark the time period and stimulation type of the EEG signal. This precise marking process enables the EEG signal data to clearly correspond to a specific stimulation cycle and type, providing a reliable time and category basis for subsequent analysis. This helps researchers more accurately identify and interpret EEG activity associated with specific stimuli when analyzing EEG signals, thereby improving the accuracy and effectiveness of the analysis.
[0068] Step S104: the acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time via the Bluetooth protocol.
[0069] Exemplarily, the acquisition module quickly transmits the second EEG signal obtained by the marking process back to the EEG signal encoding module in real time via the Bluetooth protocol.
[0070] Step S105: the EEG signal encoding module receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis according to the second EEG signal.
[0071] Exemplarily, the EEG signal encoding module receives the second EEG signal sent by the acquisition module via the Bluetooth protocol, and then the EEG signal encoding module transmits the received second EEG signal to the cloud service module in real time to complete the second EEG information of the subject for data processing under the stimulation of the target object, thereby realizing the synchronous acquisition of EEG signals.
[0072] In some embodiments, after the cloud service module receives the second EEG signal, the method also includes: when the stimulation type in the second EEG signal is identified as the training data type, the cloud service module inserts the second EEG signal into the training EEG data queue to obtain training data; the cloud service module performs machine learning model training based on the training data to obtain a signal classification model and a classification accuracy rate corresponding to the signal classification model; the cloud service module transmits the classification accuracy rate back to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control based on the classification accuracy rate.
[0073] Exemplarily, when the stimulation type in the second EEG signal is identified as a training data type, that is, when the second EEG signal is set to identification number 2 during labeling, the cloud service module inserts the second EEG signal into the training EEG data queue to obtain training data.
[0074] Exemplarily, the cloud service module trains the machine learning model based on the training data, splits the training data into a training set and a validation set, and then uses the training set to train the machine learning model to obtain a signal classification model, and then uses the validation set to verify the accuracy of the signal classification model to obtain the classification accuracy corresponding to the signal classification model.
[0075] Exemplarily, the cloud service module transmits the classification accuracy rate back to the EEG signal encoding module. When the EEG signal encoding module receives the classification accuracy rate corresponding to the signal classification model, if the classification accuracy rate is greater than or equal to the expected rate, the signal classification model corresponding to the classification accuracy rate is used for brain-computer interaction control; if the classification accuracy rate is less than the expected rate, training data continues to be collected and the signal classification model is retrained until the signal classification model can perform brain-computer interaction control.
[0076] This application controls the delay of phase synchronization within 3ms by setting a trigger in the acquisition module to ensure the accuracy of EEG data decoding. The overall classification accuracy after carrying the trigger is improved.
[0077] Specifically, when the stimulus type in the second EEG signal is identified as a training data type, inserting it into the training EEG data queue can effectively accumulate training data. This method ensures the updating and expansion of training data, so that the machine learning model can be trained from more actual EEG data, improving the performance and generalization ability of the model. After the classification accuracy is transmitted back to the EEG signal encoding module, the brain-computer interaction control strategy can be adjusted according to the classification accuracy. In this way, the control algorithm of the system can be optimized in real time, ensuring that the brain-computer interface system can be adaptively adjusted according to the latest model performance, improving the user experience and the response accuracy of the system.
[0078] In some embodiments, after the cloud service module receives the second EEG signal, the method also includes: when the stimulation type in the second EEG signal is identified as the test data type, the cloud service module inserts the second EEG signal into the test EEG data queue to obtain test data; the cloud service module performs signal classification on the test data according to the signal classification model to obtain the target signal type corresponding to the test data; the cloud service module determines the control instruction corresponding to the second EEG signal according to the target signal type and the instruction mapping table; the cloud service module transmits the control instruction back to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the control instruction.
[0079] Exemplarily, when the stimulation type in the second EEG signal is identified as a test data type, that is, when the second EEG signal is set to identification number 1 during labeling, the cloud service module inserts the second EEG signal into the test EEG data queue to obtain test data.
[0080] Exemplarily, the cloud service module uses the corresponding signal classification model when the classification accuracy reaches the expected level to classify the test data and obtain the target signal type corresponding to the test data. Thus, the cloud service module searches the instruction mapping table according to the target signal type to obtain the control instruction corresponding to the second EEG signal.
[0081] For example, create a command mapping table that lists different EEG signal types and their corresponding control instructions. The command mapping table can be a database table, a configuration file, or other suitable storage format. After acquiring the second EEG signal, the second EEG signal is processed and parsed through a signal classification model to extract the target signal type. The target signal type refers to the signal type corresponding to the specific control instruction identified from the second EEG signal. Therefore, the cloud service module needs to search in the command mapping table according to the target signal type to obtain the corresponding control instruction.
[0082] Exemplarily, the cloud service module transmits the control instruction back to the EEG signal encoding module, so that after receiving the control instruction, the EEG signal encoding module performs brain-computer interaction control according to the control instruction.
[0083] For example, if the control instruction is to turn on a light, then after receiving the instruction to turn on the light, the EEG signal encoding module will control the corresponding light to perform the turning-on operation.
[0084] Specifically, the control instructions are determined according to the target signal type and the instruction mapping table, so that the system can accurately respond to different EEG signal types. This method can ensure that the control instructions match the actual EEG signal type and improve the accuracy and effectiveness of brain-computer interaction control.
[0085] In some embodiments, after the cloud service module receives the second EEG signal, the method further includes: when the stimulation type in the second EEG signal is identified as the EEG data type corresponding to no stimulation presentation, the cloud service module performs packet loss processing on the second EEG signal.
[0086] Exemplarily, when the stimulation type in the second EEG signal is identified as the EEG data type corresponding to when no stimulation is presented, that is, when the second EEG signal is set to the identification number 0 during marking processing, the cloud service module discards the second EEG signal. The second EEG signal corresponding to the identification number is not the corresponding signal under stimulation, does not need to be processed, and can be directly discarded, thereby reducing the corresponding storage pressure of the cloud service module.
[0087] Exemplarily, when the stimulation type in the second EEG signal is identified as the EEG data type corresponding to no stimulation presentation, these data may not contain valid information about the user's intention or reaction. Through packet loss processing, these invalid or low-quality data can be cleared, thereby improving the accuracy of subsequent data analysis and processing. Invalid data takes up storage space and increases the complexity of data processing. Through packet loss processing, storage and analysis of these useless data can be avoided, thereby saving storage resources and computing resources and improving the overall efficiency of the system.
[0088] Specifically, when the stimulation type in the second EEG signal is identified as the EEG data type corresponding to no stimulation presentation, the cloud service module will perform packet loss processing on these signals, which can bring about many beneficial effects such as data purification, resource conservation, efficiency improvement, and enhanced system stability.
[0089] Please refer to Figure 2 , Figure 2 A schematic diagram of a scenario for implementing the phase synchronization method of EEG signals provided in this embodiment, as shown in FIG. Figure 2As shown, the acquisition module acquires the first EEG signal generated by the subject under the stimulation of the target object, and at the same time, the EEG signal encoding module encodes the target object and periodically presents it in the stimulation program in the form of picture flashing stimulation. The stimulation program uses the 2.4G Trigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module in each cycle, and synchronously sends the stimulation type identifier corresponding to the cycle to the acquisition module. The acquisition module marks the first EEG signal according to the identification information to obtain the second EEG signal; the acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time through the Bluetooth protocol; the EEG signal encoding module transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis based on the second EEG signal. After the cloud service module receives the second EEG signal, when the stimulation type in the second EEG signal is identified as a training data type, the cloud service module inserts the second EEG signal into the training EEG data queue to obtain training data; the cloud service module trains the machine learning model according to the training data to obtain the signal classification model and the classification accuracy corresponding to the signal classification model; the cloud service module returns the classification accuracy to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the classification accuracy. When the stimulation type in the second EEG signal is identified as a test data type, the cloud service module inserts the second EEG signal into the test EEG data queue to obtain test data; the cloud service module classifies the test data according to the signal classification model to obtain the target signal type corresponding to the test data; the cloud service module determines the control instruction corresponding to the second EEG signal according to the target signal type and the instruction mapping table; the cloud service module returns the control instruction to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the control instruction. When the stimulation type in the second EEG signal is identified as the EEG data type corresponding to the presentation of no stimulation, the cloud service module performs packet loss processing on the second EEG signal.
[0090] The present application avoids unnecessary processing delays and packet delays by labeling the first EEG data in the acquisition module, and uses a low-latency 2.4G Trigger signal synchronization module to transmit synchronized signals, which greatly reduces transmission delays, so that the overall system phase synchronization delay is less than 3ms. At the same time, the second EEG data is transparently transmitted to the cloud service module through the stimulation program, solving the problem that traditional EEG systems need to deploy independent acquisition programs on the terminal. The present application uses an independent 2.4G Trigger signal synchronization module as a transmission channel for synchronization signals, avoiding interference with real-time EEG data transmission and ensuring the stability of transmission delays. The present application avoids problems such as insufficient terminal computing power by transparently transmitting the second EEG data to the cloud service module.
[0091] See also Figure 3 , Figure 3 A phase synchronization system 200 of an EEG signal is provided in an embodiment of the present application. The phase synchronization system 200 of the EEG signal includes an EEG signal encoding module 201, an acquisition module 202, and a cloud service module 203, including: the acquisition module 202 acquires a first EEG signal generated by a subject under the stimulation of a target object, wherein the first EEG information is the original EEG signal generated by the subject under the stimulation of the target object acquired by the acquisition module 202; the EEG signal encoding module 201 sends identification information corresponding to the visual stimulus to the acquisition module 202; the acquisition module 202 receives the identification information, and The first EEG signal is marked according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with the time point when the subject receives the stimulus; the acquisition module 202 transmits the second EEG signal back to the EEG signal encoding module 201 in real time via the Bluetooth protocol; the EEG signal encoding module 201 receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module 203 in real time, so that the cloud service module 203 performs EEG analysis based on the second EEG signal.
[0092] In some embodiments, Figure 4 As shown, the system 200 further includes a 2.4G Trigger signal synchronization module 204, and the EEG signal encoding module 201 sends identification information corresponding to the visual stimulus to the acquisition module 202, including:
[0093] The EEG signal encoding module 201 encodes the target object and presents it periodically in the stimulation program in the form of picture flashing stimulation. The stimulation program uses the 2.4G Trigger signal synchronization module 204 to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module 202 in each cycle, and synchronously sends the stimulation type identifier corresponding to the cycle to the acquisition module 202.
[0094] It should be noted that, those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the EEG signal phase synchronization system 200 described above can refer to the corresponding process in the aforementioned EEG signal phase synchronization method embodiment, and will not be repeated here.
[0095] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of the phase synchronization methods for EEG signals provided in the description of the embodiment of the present invention.
[0096] The storage medium may be an internal storage unit of the terminal device in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device.
[0097] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0098] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0099] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A phase synchronization method for electroencephalogram signals, characterized in that: A phase synchronization system for electroencephalogram signals is applied, wherein the phase synchronization system for electroencephalogram signals comprises an electroencephalogram signal encoding module, an acquisition module, and a cloud service module, and the method comprises: The acquisition module acquires a first EEG signal generated by the subject under the stimulation of the target object, wherein the first EEG signal is an original EEG signal generated by the subject under the stimulation of the target object when the acquisition module acquires the first EEG signal; The EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module; The acquisition module receives the identification information, and performs labeling processing on the first EEG signal according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with a time point when the subject receives the stimulus; The acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time via the Bluetooth protocol; The EEG signal encoding module receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis according to the second EEG signal; The phase synchronization system of the EEG signal further includes a 2.4G Trigger signal synchronization module, and the EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module, including: The EEG signal encoding module encodes the target object and periodically presents it in the stimulation program in the form of picture flashing stimulation. The stimulation program uses the 2.4GTrigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module in each cycle, and synchronously sends the stimulation type identifier corresponding to the cycle to the acquisition module; wherein the stimulation type identifier includes a training data type corresponding to when there is stimulation presentation, a test data type corresponding to when there is stimulation presentation, and an EEG data type corresponding to when there is no stimulation presentation; Wherein, after the cloud service module receives the second EEG signal, the method further includes: When the stimulation type in the second EEG signal is identified as the training data type, the cloud service module inserts the second EEG signal into the training EEG data queue to obtain training data; The cloud service module performs machine learning model training according to the training data to obtain a signal classification model and a classification accuracy rate corresponding to the signal classification model; The cloud service module transmits the classification accuracy rate back to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the classification accuracy rate.
2. The method according to claim 1, characterized in that The acquisition module performs labeling processing on the first EEG signal according to the identification information to obtain a second EEG signal, including: The acquisition module decodes the stimulation start synchronization signal identifier to obtain a stimulation start identifier; The acquisition module decodes the stimulation end synchronization signal identifier to obtain a stimulation end identifier; The acquisition module decodes the stimulus type identifier to obtain a data type identifier; The acquisition module uses the stimulation start mark, the stimulation end mark, and the data type mark to mark the first electroencephalogram signal to obtain the second electroencephalogram signal.
3. The method according to claim 1, characterized in that After the cloud service module receives the second EEG signal, the method further includes: When the stimulation type in the second EEG signal is identified as the test data type, the cloud service module inserts the second EEG signal into the test EEG data queue to obtain test data; The cloud service module performs signal classification on the test data according to the signal classification model to obtain a target signal type corresponding to the test data; The cloud service module determines the control instruction corresponding to the second EEG signal according to the target signal type and the instruction mapping table; The cloud service module transmits the control instruction back to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the control instruction.
4. The method according to claim 1, characterized in that: After the cloud service module receives the second EEG signal, the method further includes: When the stimulation type in the second EEG signal is identified as the EEG data type corresponding to when no stimulation is presented, the cloud service module performs packet loss processing on the second EEG signal.
5. A phase synchronization system for electroencephalogram signals, characterized in that: The phase synchronization system of the EEG signal includes an EEG signal encoding module, an acquisition module, and a cloud service module, including: The acquisition module acquires a first EEG signal generated by the subject under the stimulation of the target object, wherein the first EEG signal is an original EEG signal generated by the subject under the stimulation of the target object when the acquisition module acquires the first EEG signal; The EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module; The acquisition module receives the identification information, and performs labeling processing on the first EEG signal according to the identification information to obtain a second EEG signal, wherein the second EEG signal is an EEG signal with a synchronization signal identification, and the identification information is used to ensure that the second EEG signal is accurately aligned with a time point when the subject receives the stimulus; The acquisition module transmits the second EEG signal back to the EEG signal encoding module in real time via the Bluetooth protocol; The EEG signal encoding module receives the second EEG signal, and transparently transmits the second EEG signal to the cloud service module in real time, so that the cloud service module performs EEG analysis according to the second EEG signal; The system further includes a 2.4G Trigger signal synchronization module, and the EEG signal encoding module sends identification information corresponding to the visual stimulus to the acquisition module, including: The EEG signal encoding module encodes the target object and periodically presents it in the stimulation program in the form of picture flashing stimulation. The stimulation program uses the 2.4GTrigger signal synchronization module to send the stimulation start synchronization signal identifier and the stimulation end synchronization signal identifier corresponding to the cycle to the acquisition module in each cycle, and synchronously sends the stimulation type identifier corresponding to the cycle to the acquisition module; wherein the stimulation type identifier includes a training data type corresponding to when there is stimulation presentation, a test data type corresponding to when there is stimulation presentation, and an EEG data type corresponding to when there is no stimulation presentation; After the cloud service module receives the second EEG signal, the cloud service module further includes: When the stimulation type in the second EEG signal is identified as the training data type, the cloud service module inserts the second EEG signal into the training EEG data queue to obtain training data; The cloud service module performs machine learning model training according to the training data to obtain a signal classification model and a classification accuracy rate corresponding to the signal classification model; The cloud service module transmits the classification accuracy rate back to the EEG signal encoding module, so that the EEG signal encoding module performs brain-computer interaction control according to the classification accuracy rate.
6. A computer storage medium for computer storage, characterized in that: The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the phase synchronization method of EEG signals described in any one of claims 1 to 4.
