Method, device, equipment, storage medium and program product for determining electroencephalogram phase

By constructing and training a phase prediction model of multi-signal processing branch, the problem of screening personnel and brain regions in the prior art is solved, real-time phase prediction of EEG without human interference is achieved, and the accuracy and robustness of prediction are improved.

CN119257614BActive Publication Date: 2025-03-21UNIV OF CHINESE ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411796249.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-21
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The prior art requires screening personnel and selecting signals from specific brain regions in EEG phase prediction, which limits the scope of application and is difficult to general population or brain regions.

Method used

By collecting EEG data, pre-processing operations such as downsampling, removing baselines and filtering, calculating phase information, and building and training phase prediction models based on this information. The model includes multiple signal processing branches to capture linear and nonlinear features of EEG signals of different frequencies to achieve real-time phase prediction.

Benefits of technology

Real-time phase prediction of EEG without screening personnel and brain regions is realized, avoiding interference from human parameter selection, enhancing the model's perception of non-steady-state signals, and improving the robustness and accuracy of phase prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119257614B_ABST
    Figure CN119257614B_ABST
Patent Text Reader

Abstract

The present invention provides an EEG phase determination method, device, equipment, storage medium and program product, which are applied to the field of EEG signal processing technology. The method includes: collecting EEG data through an EEG signal amplifier, the number of channels of the EEG data is N; performing preprocessing operations on the EEG data to obtain preprocessed EEG signals, the number of channels of the preprocessed EEG signals is M; calculating the phase of the preprocessed EEG signals to obtain EEG phase information at each moment; constructing and training a phase prediction model based on the preprocessed EEG signals and the EEG phase information; wherein the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal processing, and in particular to an EEG phase determination method, device, equipment, storage medium and program product. Background Art

[0002] Electroencephalogram (EEG) is an electrical signal generated by the activity of brain neurons recorded by precise electrodes. After being collected, amplified and processed by sophisticated electronic equipment, it can be found that EEG has spontaneous and regular rhythmic signals. A large number of clinical and scientific studies have shown that the rhythmic phase of a specific frequency has different performance characteristics in specific brain areas and specific populations. The closed-loop control technology that measures the brain state and optimizes the control of external devices based on the EEG phase has become a hot topic in current neurocontrol research.

[0003] In order to obtain the corresponding EEG rhythm phase, the traditional EEG phase processing algorithm first needs to perform bandpass filtering on the EEG signal. In real-time calculation, since it is impossible to obtain future EEG data, only causal filtering can be performed. Subsequently, methods such as zero-crossing detection, autoregressive model or fast Fourier transform are used to deal with boundary distortion problems through linear interpolation processing or phase fitting to improve the accuracy of edge real-time phase prediction.

[0004] This type of traditional method often improves the accuracy of phase prediction by pre-screening experimenters, selecting signals from specific brain regions to improve the signal-to-noise ratio, or using thresholds to screen EEG signals to enhance signal stability. However, this artificial parameter selection, such as screening personnel or selecting signals from specific brain regions, limits the scope of application of EEG phase prediction and makes it difficult to generalize and apply it to the general population or brain regions. Summary of the invention

[0005] The present invention provides an EEG phase determination method, device, equipment, storage medium and program product to solve the problem of how to achieve real-time EEG phase prediction without screening personnel, brain regions and artificial parameter selection.

[0006] The present invention provides a method for determining an electroencephalogram (EEG) phase, comprising: collecting electroencephalogram (EEG) data through an electroencephalogram (EEG) signal amplifier, wherein the number of channels of the electroencephalogram (EEG) data is N; performing a preprocessing operation on the EEG data to obtain a preprocessed electroencephalogram (EEG) signal, wherein the number of channels of the preprocessed electroencephalogram (EEG) signal is M; calculating the phase of the preprocessed electroencephalogram (EEG) signal to obtain the electroencephalogram (EEG) phase information at each moment; constructing and training a phase prediction model based on the preprocessed electroencephalogram (EEG) signal and the electroencephalogram (EEG) phase information; wherein the phase prediction model comprises a plurality of signal processing branches, wherein the plurality of signal processing branches are used to capture the linear characteristics and nonlinear characteristics of electroencephalogram (EEG) signals of different frequencies; and the phase prediction model is used to predict real-time electroencephalogram (EEG) phase information, wherein M and N are integers greater than 0, and M is less than or equal to N.

[0007] According to a method for determining an EEG phase provided by the present invention, the preprocessing operation includes at least one of the following: downsampling, baseline removal, bad derivative removal, Hjorth transformation, filtering and differential derivation.

[0008] According to a method for determining EEG phases provided by the present invention, the multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; the first convolutional layer and the second convolutional layer are respectively used to extract EEG signals of different frequencies; the first fully connected layer and the second fully connected layer are used to linearly map input features to obtain linear features; the first activation function layer and the second activation function layer are used to extract nonlinear features.

[0009] According to an EEG phase determination method provided by the present invention, the phase prediction model also includes a third fully connected layer; the third fully connected layer is used to map the time domain signals output by the multiple signal processing branches into frequency domain features.

[0010] According to a method for determining EEG phase provided by the present invention, the phase of the preprocessed EEG signal is calculated to obtain the EEG phase information at each moment, including: bandpass filtering the preprocessed EEG signal to obtain an EEG rhythm signal in a target frequency band; and Hilbert transforming the EEG rhythm signal to obtain EEG phase information in a complex space.

[0011] According to a method for determining an EEG phase provided by the present invention, the phase prediction model is constructed and trained based on the preprocessed EEG signal and the EEG phase information, comprising: constructing a training sample set and a test sample set based on the preprocessed EEG signal and the EEG phase information; training the phase prediction model through the training sample set, and testing the prediction performance of the phase prediction model through the test sample set.

[0012] The present invention also provides an EEG phase determination device, comprising the following modules: an acquisition module and a processing module; the acquisition module is used to collect EEG data through an EEG signal amplifier, and the number of channels of the EEG data is N; the processing module is used to perform preprocessing operations on the EEG data to obtain a preprocessed EEG signal, and the number of channels of the preprocessed EEG signal is M; the phase of the preprocessed EEG signal is calculated to obtain the EEG phase information at each moment; a phase prediction model is constructed and trained based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.

[0013] According to an EEG phase determination device provided by the present invention, the preprocessing operation includes at least one of the following: downsampling, baseline removal, bad derivative removal, Hjorth transformation, filtering and differential derivation.

[0014] According to an EEG phase determination device provided by the present invention, the multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; the first convolutional layer and the second convolutional layer are respectively used to extract EEG signals of different frequencies; the first fully connected layer and the second fully connected layer are used to linearly map input features to obtain linear features; the first activation function layer and the second activation function layer are used to extract nonlinear features.

[0015] According to an EEG phase determination device provided by the present invention, the phase prediction model also includes a third fully connected layer; the third fully connected layer is used to map the time domain signals output by the multiple signal processing branches into frequency domain features.

[0016] According to an EEG phase determination device provided by the present invention, the processing module is used to perform bandpass filtering on the preprocessed EEG signal to obtain an EEG rhythm signal of a target frequency band; and perform Hilbert transform on the EEG rhythm signal to obtain EEG phase information in a complex space.

[0017] According to an EEG phase determination device provided by the present invention, the processing module is used to construct a training sample set and a test sample set based on the preprocessed EEG signal and the EEG phase information; train the phase prediction model through the training sample set, and test the prediction performance of the phase prediction model through the test sample set.

[0018] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described methods for determining an EEG phase is implemented.

[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining an EEG phase as described in any one of the above is implemented.

[0020] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for determining an EEG phase as described above is implemented.

[0021] The EEG phase determination method, device, equipment, storage medium and program product provided by the present invention, on the one hand, the pre-processed EEG signal and the EEG phase information construct and train a phase prediction model, which can be used to predict real-time EEG phase information, which can not only provide support for timely understanding of dynamic changes in the brain, but also avoid human interference caused by parameter selection similar to traditional methods in the process of phase prediction; on the other hand, the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies, enhance the model's perception of non-steady-state signals, and improve the robustness and accuracy of phase prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 It is a flow chart of the method for determining the EEG phase provided by the present invention;

[0024] Figure 2 It is a schematic diagram of the arrangement of EEG channels of the EEG phase determination method provided by the present invention;

[0025] Figure 3 It is a structural schematic diagram of the phase prediction model provided by the present invention;

[0026] Figure 4 It is a structural schematic diagram of the EEG phase determination device provided by the present invention;

[0027] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0030] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0031] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and order of execution.

[0032] The embodiments of the present application describe some exemplary embodiments for the purpose of explanation. It should be understood that the present application can be implemented in other ways that are not specifically shown in the drawings.

[0033] like Figure 1 As shown, the embodiment of the present application provides an EEG phase determination method, which can be applied to an EEG phase determination device. The EEG phase determination method may include S101-S103:

[0034] S101. The EEG phase determination device collects EEG data through an EEG signal amplifier.

[0035] The number of channels of the above EEG data is N. N is an integer greater than 0.

[0036] Optionally, the EEG signal amplifier is connected to the human body through electrodes, which include: invasive electrodes or non-invasive scalp electrodes. Invasive electrodes refer to electrodes that need to be implanted under the scalp or near the brain tissue through surgery or other means to record the electrical activity of the brain at a closer distance. This type of electrode can more directly contact the source of electrical signals generated by the brain, reducing the attenuation and interference of tissues such as the scalp and skull on the signal. A non-invasive scalp electrode is a device that uses electrodes placed on the surface of the scalp to record the electrical activity of the brain. The electrical signals collected by invasive or non-invasive electrodes can reflect the functional state of the brain, such as changes in the electrical activity of the brain under different cognitive tasks, sleep stages, etc. Compared with invasive electrodes, although non-invasive scalp electrodes have a lower signal-to-noise ratio, they can be used in the general population because they are non-invasive and have a simple preparation process, and are widely used in clinical and scientific research.

[0037] Optionally, the EEG signal amplifier is a device for amplifying and collecting weak EEG signals. EEG signals are very weak, and their amplitude is usually at the microvolt (μV) level. For example, the amplitude of the electroencephalogram (EEG) signal recorded from the scalp surface is generally between a few microvolts and hundreds of microvolts. Such weak signals are difficult to analyze and process directly. The role of the EEG signal amplifier is to amplify these weak EEG signals to a level that can be effectively collected and analyzed by the data acquisition system.

[0038] For example, the EEG signal amplifier can be a high-resolution, low-latency analog-to-digital conversion module. The EEG signal amplifier can perform real-time data acquisition and forwarding, and its sampling rate can be 500 Hz.

[0039] Optionally, the above EEG data include task state and resting state, and the task state refers to the state of the brain when the subject is performing a specific cognitive task (such as memory task, attention task), sensory task (such as visual perception task, auditory discrimination task) or motor task (such as finger tapping task, limb movement task). At this time, the brain is like a computer running a specific program, and various brain regions work together according to the requirements of the task. The resting state refers to the state in which the subject's brain is naturally relaxed, awake and not focused on any external stimuli when not performing specific cognitive tasks, sensory tasks or motor tasks. Simply put, it is like the state when the brain is "on standby" and not deliberately doing anything. For example, when the subject is in a resting state with eyes open, the EEG phase determination device can collect 5 minutes of non-invasive EEG data from 9 channels, such as Figure 2 FIG. 4 shows the electrode arrangement of the non-invasive EEG data.

[0040] S102: The EEG phase determination device performs a preprocessing operation on the EEG data to obtain a preprocessed EEG signal.

[0041] The number of channels of the preprocessed EEG signal is M. M is an integer greater than 0, and M is less than or equal to N.

[0042] Optionally, the preprocessing operation includes at least one of the following: downsampling, baseline removal, bad derivative removal, Hjorth transformation, filtering and differential derivation.

[0043] The following is a detailed introduction to downsampling, baseline removal, bad derivative removal, Hjorth transform, filtering and differential derivation.

[0044] Downsampling is a signal processing technique that refers to reducing the number of signal sampling points. For example, the original EEG signal is collected at a higher sampling frequency (such as 1000Hz), and after downsampling, the sampling frequency may be reduced to 500Hz. Downsampling can reduce the amount of data to a certain extent, thereby reducing storage requirements and computing costs.

[0045] The baseline of an EEG signal refers to the signal level when there is no specific EEG activity. Due to various factors (such as electrode offset, instrument drift, etc.), the baseline of the EEG signal may shift or fluctuate. Removing the baseline is to eliminate this offset so that the EEG signal is based on a relatively stable zero level. The usual practice is to estimate the baseline level of the signal and then subtract this baseline level from the original signal. Removing the baseline offset can make the EEG signal reflect the brain's electrical activity more clearly.

[0046] During the EEG signal acquisition process, the signals recorded by some electrode channels (leads) may be unreliable due to poor electrode contact, electrode damage or strong interference. These channels are called bad leads. Removing bad leads means excluding these electrode channels that record abnormal signals from subsequent analysis. By removing bad leads, the quality of EEG signal data used for subsequent analysis can be ensured to be higher, making research based on these data more reliable.

[0047] Hjorth transform is a method for analyzing the time domain characteristics of EEG signals. It mainly describes the characteristics of EEG signals by calculating the activity, mobility and complexity of the signal. Activity reflects the power of the signal, mobility describes the frequency change of the signal, and complexity indicates the complexity of the distribution of the signal in the frequency domain. Through Hjorth transform, not only can valuable features be extracted from EEG signals for classification and recognition of EEG signals, but also the changes of EEG signals in the time domain can be dynamically observed.

[0048] Filtering refers to removing unnecessary frequency components in EEG signals through certain algorithms (such as digital filters). For example, removing power frequency interference (50Hz or 60Hz), myoelectric interference (high-frequency components) or slow wave drift (low-frequency components). Filtering can be divided into low-pass filtering, high-pass filtering and band-pass filtering, which are used to remove high-frequency, low-frequency or signals outside a specific frequency band. Derivation is to perform mathematical derivation operations on EEG signals to obtain the rate of change of the signal. Filtering can remove interference signals and make the components related to brain activity in EEG signals more prominent.

[0049] In EEG signals, the signal after differential derivation can reflect the change in the slope of the EEG signal. For example, the slope change at the peak of the EEG signal can be observed more clearly by derivation. Derivation can enhance the detailed features of the signal and help better identify the change points and feature points of the signal.

[0050] Specifically, the EEG phase determination device can sequentially downsample, remove baselines, remove bad derivatives, perform Hjorth transformation, filter processing, and perform differential differentiation on the EEG data of N channels to obtain differential EEG data of M channels, i.e., preprocess the EEG signal.

[0051] Optionally, the EEG phase determination device may further process the EEG data by bandpass filtering, low-pass filtering, high-pass filtering, or band-stop filtering, and solve the first-order derivative to obtain differential EEG data of M channels.

[0052] For example, for the 9-channel EEG data collected in the above steps, the EEG phase determination device can remove the linear baseline and perform Hjorth transformation. The calculation formula is as follows:

[0053] ;

[0054] in, is the digitized EEG signal voltage, and the EEG data S of channel 1 is obtained; then the first-order derivative of the processed EEG data is solved to further reduce the signal drift of the EEG electrode and obtain the differential EEG data D. The calculation formula is as follows:

[0055] ;

[0056] Where t is the time sampling point of the EEG data S after Hjorth transformation.

[0057] S103. The EEG phase determination device calculates the phase of the preprocessed EEG signal to obtain EEG phase information at each moment.

[0058] Optionally, the EEG phase determination device calculates the phase of the preprocessed EEG signal to obtain the EEG phase information at each moment, including: bandpass filtering the preprocessed EEG signal to obtain an EEG rhythm signal of a target frequency band; performing a Hilbert transform on the EEG rhythm signal to obtain EEG phase information in a complex space.

[0059] Specifically, the EEG phase determination device may filter the preprocessed EEG signal through a spatial filter or a bandpass filter to obtain an EEG rhythm signal of the target frequency band of interest, and then convert it into EEG phase information of the complex space of the corresponding rhythm signal through Hilbert transform;

[0060] For example, the EEG phase determination device can process the preprocessed EEG signal using a zero-phase shift bandpass filter with a frequency of 8-13 Hz to obtain the rhythm of the α frequency band, and then obtain the complex phase F after Hilbert transformation. The calculation formula is as follows:

[0061] ;

[0062] in, represents the Hilbert transform function, and t is the time sampling point of the differential EEG data D.

[0063] It should be noted that in the field of bioelectric signals such as EEG signals, after constructing the analytical signal through Hilbert transform, the amplitude envelope and instantaneous phase of the signal can be easily obtained. The amplitude envelope can reflect the change of signal strength. The instantaneous phase information is very useful for studying the synchronization and other characteristics of the signal.

[0064] S104. The EEG phase determination device constructs and trains a phase prediction model based on the preprocessed EEG signal and the EEG phase information.

[0065] Among them, the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the above-mentioned phase prediction model is used to predict real-time EEG phase information.

[0066] Optionally, the EEG phase determination device can construct a training sample set and a test sample set based on the preprocessed EEG signal and the EEG phase information; train the phase prediction model through the training sample set, and test the prediction performance of the phase prediction model through the test sample set.

[0067] For example, the EEG phase determination device can intercept data according to a time window width of 4.6 seconds to obtain a narrowband preprocessed EEG signal and corresponding EEG phase information, and then divide the data set with a time window of 4.6s into training samples, verification samples and test samples according to the ratio of 0.7, 0.15, and 0.15.

[0068] Optionally, the phase prediction model may include multiple signal processing branches and a third fully connected layer. The multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer, and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer, and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; the first convolutional layer and the second convolutional layer are respectively used to extract EEG signals of different frequencies; the first fully connected layer and the second fully connected layer are used to linearly map the input features to obtain linear features; the first activation function layer and the second activation function layer are used to extract nonlinear features. The third fully connected layer is used to map the time domain signals output by the multiple signal processing branches into frequency domain features.

[0069] Specifically, Figure 3 As shown, the input data can be input into the first signal processing branch and the second signal processing branch respectively through the input layer, wherein the first signal processing branch includes a first convolutional layer, a first fully connected layer and a first activation function layer, and the second signal processing branch includes a second convolutional layer, a second fully connected layer and a second activation function layer. After the output data of the first signal processing branch and the output data of the second signal processing branch are multiplied, the predicted EEG phase information can be obtained through the third fully connected layer, the Dropout layer and the output layer.

[0070] Exemplarily, the first convolution layer may be a one-dimensional convolution, the input data length may be 128, the kernel function size may be 6, the stride may be 1, the data segment may be padded with zeros before and after, and the output size may be 128.

[0071] The input feature number of the first fully connected layer can be 128 of the data segment length, and the output feature number is twice the data length, which is 256.

[0072] The activation function of the first activation function layer may be a ReLU activation function.

[0073] The second convolution layer may be a one-dimensional convolution, the input data length may be 128, the kernel function size may be 12, the stride may be 1, the data segment may be padded with zeros before and after, and the output size may be 128.

[0074] The input feature number of the second fully connected layer may be 128 of the data segment length, and the output feature number may be twice of the data length, that is, 256.

[0075] The activation function of the second activation function layer may be a Softmax activation function.

[0076] The input feature number of the third fully connected layer may be a data segment length of 256, and the output feature number may be 128.

[0077] The Dropout layer is used to reduce overfitting of the model, and its Dropout ratio can be 0.7.

[0078] The output layer can be used to map features into complex phases, the input feature is an input data segment length of 128, and the output is an EEG complex phase length of 2.

[0079] It should be noted that the different sizes of the kernel function of the convolution layer lead to different filter orders, which means that the remaining signals are different. The output signals of multiple signal processing branches are composed of multiple signals aliasing.

[0080] Optionally, the loss function of the phase prediction model is a mean square error (MSE) loss function.

[0081] It should be noted that the phase prediction model is an individualized model, that is, each experimenter in the group needs to be trained repeatedly.

[0082] Optionally, the phase prediction model can predict real-time EEG phase information in a real-time environment.

[0083] Specifically, the phase prediction model is first exported as an open neural network exchange (ONNX) file, and then the real-time environment generates a localized graph network and inference engine based on the model structure. After the real-time collected EEG data is sent to the inference engine, the real-time EEG phase information is calculated. According to the real-time EEG phase and control logic, after the phase of interest is captured, the control signal is output to control the external device.

[0084] The real-time environment is an edge computing module or a high-performance graphics card or a computer or a customized chip; the external device is an electrical stimulation device and / or a magnetic stimulation device and / or a sound device and / or a visual presentation device and / or a focused ultrasound device.

[0085] Specifically, the trained phase prediction model is imported into the edge computing module, and then a localized graph network and inference engine are generated. The high-speed and low-latency EEG acquisition module digitizes the signals of non-invasive brain electrodes and sends the data to the data forwarding and peripheral control module through high-speed optical fiber. The data forwarding and peripheral control module is connected to the edge computing module through a USB cable. After the edge computing module captures the corresponding phase signal, it notifies the data forwarding and peripheral control module and then controls the external device through the parallel port line.

[0086] In an embodiment of the present application, on the one hand, the preprocessed EEG signal and the EEG phase information are used to construct and train a phase prediction model, which can be used to predict real-time EEG phase information, which can not only provide support for timely understanding of dynamic changes in the brain, but also avoid the interference of human factors caused by parameter selection similar to traditional methods in the process of phase prediction; on the other hand, the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies, enhance the model's perception of non-steady-state signals, and improve the robustness and accuracy of phase prediction.

[0087] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0088] The EEG phase determination method provided in the embodiment of the present application can be executed by an EEG phase determination device or a control module for EEG phase determination in the EEG phase determination device. In the embodiment of the present application, the EEG phase determination device executing the EEG phase determination method is taken as an example to illustrate the EEG phase determination device provided in the embodiment of the present application.

[0089] It should be noted that the embodiment of the present application can divide the EEG phase determination device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0090] like Figure 4 As shown, an embodiment of the present application provides an EEG phase determination device 400. The EEG phase determination device 400 includes: an acquisition module 401 and a processing module 402. The acquisition module 401 can be used to collect EEG data through an EEG signal amplifier, and the number of channels of the EEG data is N; the processing module 402 is used to perform preprocessing operations on the EEG data to obtain a preprocessed EEG signal, and the number of channels of the preprocessed EEG signal is M; calculate the phase of the preprocessed EEG signal to obtain the EEG phase information at each moment; construct and train a phase prediction model based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.

[0091] Optionally, the preprocessing operation includes at least one of the following: downsampling, baseline removal, bad derivative removal, Hjorth transformation, filtering and differential derivation.

[0092] Optionally, the multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; the first convolutional layer and the second convolutional layer are respectively used to extract EEG signals of different frequencies; the first fully connected layer and the second fully connected layer are used to linearly map input features to obtain linear features; the first activation function layer and the second activation function layer are used to extract nonlinear features.

[0093] Optionally, the phase prediction model also includes a third fully connected layer; the third fully connected layer is used to map the time domain signals output by the multiple signal processing branches into frequency domain features.

[0094] Optionally, the processing module 402 is used to perform bandpass filtering on the preprocessed EEG signal to obtain an EEG rhythm signal in a target frequency band; and perform Hilbert transform on the EEG rhythm signal to obtain EEG phase information in a complex space.

[0095] Optionally, the processing module 402 is used to construct a training sample set and a test sample set based on the preprocessed EEG signal and the EEG phase information; train the phase prediction model through the training sample set, and test the prediction performance of the phase prediction model through the test sample set.

[0096] In an embodiment of the present application, on the one hand, a phase prediction model is constructed and trained based on the preprocessed EEG signal and the EEG phase information, which can be used to predict real-time EEG phase information, which can not only provide support for timely understanding of dynamic changes in the brain, but also avoid the interference of human factors in the selection of parameters similar to traditional methods in the process of phase prediction; on the other hand, the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies, enhance the model's perception of non-steady-state signals, and improve the robustness and accuracy of phase prediction.

[0097] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the EEG phase determination method, which includes: collecting EEG data through an EEG signal amplifier, the number of channels of the EEG data is N; performing preprocessing operations on the EEG data to obtain a preprocessed EEG signal, the number of channels of the preprocessed EEG signal is M; calculating the phase of the preprocessed EEG signal to obtain the EEG phase information at each moment; constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.

[0098] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0099] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the EEG phase determination method provided by the above methods, which includes: collecting EEG data through an EEG signal amplifier, the number of channels of the EEG data is N; performing preprocessing operations on the EEG data to obtain a preprocessed EEG signal, the number of channels of the preprocessed EEG signal is M; calculating the phase of the preprocessed EEG signal to obtain the EEG phase information at each moment; constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model includes multiple signal processing branches, and the multiple signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.

[0100] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the EEG phase determination method provided by the above-mentioned methods, the method comprising: collecting EEG data through an EEG signal amplifier, the number of channels of the EEG data being N; performing preprocessing operations on the EEG data to obtain a preprocessed EEG signal, the number of channels of the preprocessed EEG signal being M; calculating the phase of the preprocessed EEG signal to obtain the EEG phase information at each moment; constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model comprises multiple signal processing branches, the multiple signal processing branches being used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; the phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N.

[0101] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining an EEG phase, characterized in that: include: Collecting EEG data through an EEG signal amplifier, wherein the number of channels of the EEG data is N; Performing a preprocessing operation on the EEG data to obtain a preprocessed EEG signal, wherein the number of channels of the preprocessed EEG signal is M; Calculating the phase of the preprocessed EEG signal to obtain EEG phase information at each moment; Constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information; Wherein, the phase prediction model includes a plurality of signal processing branches, and the plurality of signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; The phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N; The multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer, and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer, and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; The first convolution layer and the second convolution layer are respectively used to extract EEG signals of different frequencies; The first fully connected layer and the second fully connected layer are used to linearly map the input features to obtain linear features; The first activation function layer and the second activation function layer are used to extract nonlinear features.

2. The method for determining the EEG phase according to claim 1, characterized in that: The preprocessing operation includes at least one of the following: downsampling, baseline removal, bad derivative removal, Hjorth transform filtering, and differential derivation.

3. The method for determining the EEG phase according to claim 1, characterized in that: The phase prediction model also includes a third fully connected layer; the third fully connected layer is used to map the time domain signals output by the multiple signal processing branches into frequency domain features.

4. The method for determining the EEG phase according to claim 1, characterized in that: The calculating the phase of the preprocessed EEG signal to obtain EEG phase information at each moment includes: Performing bandpass filtering on the preprocessed EEG signal to obtain an EEG rhythm signal in a target frequency band; The electroencephalogram rhythm signal is subjected to Hilbert transformation to obtain electroencephalogram phase information in complex space.

5. The method for determining the EEG phase according to claim 1, characterized in that: The step of constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information includes: Constructing a training sample set and a test sample set based on the preprocessed EEG signal and the EEG phase information; The phase prediction model is trained by the training sample set, and the prediction performance of the phase prediction model is tested by the test sample set.

6. An electroencephalogram phase determination device, characterized in that: include: Acquisition module and processing module; The acquisition module is used to collect EEG data through an EEG signal amplifier, and the number of channels of the EEG data is N; The processing module is used to perform a preprocessing operation on the EEG data to obtain a preprocessed EEG signal, and the number of channels of the preprocessed EEG signal is M; Calculating the phase of the preprocessed EEG signal to obtain EEG phase information at each moment; Constructing and training a phase prediction model based on the preprocessed EEG signal and the EEG phase information; wherein the phase prediction model includes a plurality of signal processing branches, and the plurality of signal processing branches are used to capture the linear characteristics and nonlinear characteristics of EEG signals of different frequencies; The phase prediction model is used to predict real-time EEG phase information, M and N are integers greater than 0, and M is less than or equal to N; The multiple signal processing branches include a first signal processing branch and a second signal processing branch, the first signal processing branch includes a first convolutional layer, a first fully connected layer, and a first activation function layer; the second signal processing branch includes a second convolutional layer, a second fully connected layer, and a second activation function layer; the kernel function size of the first convolutional layer is different from the kernel function size of the second convolutional layer; The first convolution layer and the second convolution layer are respectively used to extract EEG signals of different frequencies; The first fully connected layer and the second fully connected layer are used to linearly map the input features to obtain linear features; The first activation function layer and the second activation function layer are used to extract nonlinear features.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for determining the EEG phase according to any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the EEG phase according to any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for determining the EEG phase according to any one of claims 1 to 5 is implemented.