Brain signal intention recognition method, device, equipment and medium
By dividing EEG signals into multiple frequency signals according to frequency, extracting features using temporal and spatial convolutional layers, and performing cross-frequency attention fusion, the problem of insufficient fusion of local and global features of EEG signals is solved, thus improving the accuracy of intent recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the fusion of local and global features of EEG signals is insufficient, resulting in low accuracy of intent recognition.
The brainwave signal is divided into multiple frequency signals according to frequency. The first time-domain convolutional layer is used to extract local features, the second time-domain convolutional layer is used to extract global features, and the spatial convolutional layer is used for feature extraction. Cross-frequency attention fusion is then performed, and finally, the signal is classified to identify the intent.
It improves the fusion of local and global features of EEG signals, enhances the representativeness of features, and improves the accuracy of intent recognition.
Smart Images

Figure CN121637402A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, device, and medium for brain signal intention recognition. Background Technology
[0002] Brain-computer interface (BCI) technology enables the human brain to interact with external devices. It has seen rapid development in recent years in fields such as medical rehabilitation and emotion computing. Current technologies generally use electroencephalography (EEG) signals as input, extracting and classifying their features to recognize the user's intent.
[0003] The characteristics of electroencephalogram (EEG) signals include local and global features. These local and global features can be reflected in the time range and frequency band. A smaller time range focuses more on the local features of the EEG signal, while a larger time range makes it easier to detect the global trends in the EEG signal. In terms of frequency, low-frequency EEG signals often reflect slower cortical rhythmic activity, while high-frequency EEG signals are sensitive to rapidly changing local activation and task-related transient components.
[0004] Existing technologies, such as feature splicing, weighted averaging, or bilinear transformation, for feature extraction and fusion, cannot effectively integrate local and global features of EEG signals, easily leading to information redundancy or loss. When features are input into a classifier, the classifier can only utilize partial information, resulting in insufficient classification criteria and low accuracy in intent recognition. Existing technologies suffer from insufficient fusion of local and global features of EEG signals, leading to low accuracy in intent recognition. Summary of the Invention
[0006] This invention provides a brain signal intention recognition method, device, equipment, and medium that can fully integrate local and global features of brainwave signals to improve the accuracy of intention recognition.
[0007] According to one aspect of the present invention, an embodiment of the present invention provides a method for brain signal intention recognition, the method comprising:
[0008] The collected EEG signals were divided into multiple frequency signals of different frequencies;
[0009] For each of the frequency signals, a first time-domain convolutional layer is used to extract local features from the frequency signals to obtain first time-domain features;
[0010] A second temporal convolutional layer is used to extract global features from the frequency signal to obtain the second temporal features;
[0011] The first time-domain feature and the second time-domain feature are fused to obtain the intermediate time-domain feature;
[0012] Spatial convolutional layers are used to extract features from the intermediate time-domain features to obtain the spatiotemporal features of the frequency signal;
[0013] The spatiotemporal characteristics of each frequency signal are fused across frequencies to obtain signal features;
[0014] The signal features are classified to obtain the intent recognition result.
[0015] According to another aspect of the present invention, embodiments of the present invention also provide a brain signal intention recognition device, the device comprising:
[0016] The EEG signal segmentation module is used to divide the acquired EEG signal into multiple frequency signals of different frequencies;
[0017] The local feature extraction module is used to extract local features from each of the frequency signals using a first temporal convolutional layer to obtain first temporal features.
[0018] A global feature extraction module is used to perform global feature extraction on the frequency signal using a second temporal convolutional layer to obtain second temporal features;
[0019] The time-domain feature fusion module is used to fuse the first time-domain feature and the second time-domain feature to obtain the intermediate time-domain feature;
[0020] The spatiotemporal feature generation module is used to extract features from the intermediate temporal features using a spatial convolutional layer to obtain the spatiotemporal features of the frequency signal;
[0021] The signal feature generation module is used to perform cross-frequency attention fusion on the spatiotemporal features of each frequency signal to obtain signal features;
[0022] The intent recognition module is used to classify the signal features to obtain the intent recognition result.
[0023] According to another aspect of the present invention, embodiments of the present invention also provide a brain signal intention recognition device, the brain signal intention recognition device comprising:
[0024] At least one processor; and
[0025] A memory that is communicatively connected to at least one processor; wherein,
[0026] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the brain signal intention recognition method according to any embodiment of the present invention.
[0027] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the brain signal intention recognition method of any embodiment of the present invention.
[0028] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the brain signal intention recognition method according to any embodiment of the present invention.
[0029] The technical solution of this invention divides the brainwave signal into multiple frequency signals according to frequency, and extracts local and global features from each frequency signal according to the time dimension and spatial features according to the spatial dimension. This allows for the comprehensive capture of the temporal dynamic changes, global correlation patterns, and spatial distribution characteristics of the brainwave signal. Cross-frequency attention fusion is performed on the frequency signals with spatiotemporal characteristics, enabling the brainwave signal to exhibit characteristics of different frequency bands. This fully integrates the local and global features of the brainwave signal across different time ranges and frequencies, avoiding the feature bias caused by a single dimension, improving the representativeness of the features, and solving the problem of insufficient fusion of local and global features of brainwave signals and low accuracy of intent recognition. This improves the accuracy of feature extraction and enriches the feature content, allowing for intent recognition based on accurate features, thereby improving the accuracy of intent recognition.
[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1A This is a flowchart of a brain signal intent recognition method provided by an embodiment of the present invention;
[0033] Figure 1B This is a flowchart of a method for obtaining spatiotemporal features according to an embodiment of the present invention;
[0034] Figure 1C This is a flowchart of a cross-frequency attention fusion method provided according to an embodiment of the present invention;
[0035] Figure 2A This is a flowchart of a brain signal intent recognition method provided by an embodiment of the present invention;
[0036] Figure 2B This is a flowchart of a brain signal intent recognition method provided by an embodiment of the present invention;
[0037] Figure 3 This is a structural diagram of a brain signal intention recognition device provided according to an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of the structure of a brain signal intent recognition device provided in an embodiment of the present invention. Detailed Implementation
[0039] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0041] The acquisition, storage, and application of brainwave signals and other related technologies in the technical solutions of this invention comply with relevant laws and regulations and do not violate public order and good morals.
[0042] Figure 1A This is a flowchart illustrating a brain signal intent recognition method provided in an embodiment of the present invention. This embodiment is applicable to cases involving intent recognition based on brain signals. The method can be executed by a brain signal intent recognition device, which can be implemented in hardware and / or software. This brain signal intent recognition device can be configured in a server.
[0043] See Figure 1A The brain signal intent recognition method shown includes:
[0044] S101. Divide the collected EEG signals into multiple frequency signals of different frequencies.
[0045] Brainwave signals, or electroencephalograms (EEGs), can reflect the activity of neurons in the brain. Collecting EEG signals involves capturing neuronal activity signals from multiple locations in the brain over a specified period of time, simulating a specific scenario imagined by the user. For example, a user might imagine moving their left hand, and the EEG signals from multiple locations in the brain could be collected within a defined timeframe. EEG signals include sampling time, sampling location, and signal frequency. The EEG signals are then grouped according to frequency, with each group containing the same sampling time and location, differing only in signal frequency.
[0046] Optionally, the brainwave signal can be divided into low-frequency and high-frequency signals. Optionally, signals with frequencies less than 16 Hz can be classified as low-frequency signals, and signals with frequencies not less than 16 Hz can be classified as high-frequency signals. In a specific embodiment, a filter bank can be used to decompose the brainwave signal into two frequency bands: 1–16 Hz and 16–40 Hz (including 16 Hz).
[0047] Optionally, the acquired EEG signals can be preprocessed. A mean reference and normalization method is used for preprocessing the EEG signals.
[0048] First, an average reference method is used to mitigate the impact of reference electrode selection on the data. The amplitude of the EEG signal in each channel is subtracted from the mean of all channels at the same time point, as shown in the following expression:
[0049]
[0050] in, Let be the amplitude of the EEG signal of the i-th channel at time sampling point t.
[0051] Subsequently, the signals of each channel are standardized by Z-score, which transforms them into a distribution with a mean of zero and a variance of one, thereby eliminating the differences in amplitude and dimensions between different channels.
[0052] The expression is as follows:
[0053]
[0054] Where, μ i σ is the mean. i The standard deviation is denoted as .
[0055] S102. For each of the frequency signals, a first time-domain convolutional layer is used to extract local features of the frequency signals to obtain first time-domain features.
[0056] This method involves temporal convolution of signals at various frequencies, using temporal convolution kernels of different sizes to capture different features of EEG signals within different time ranges. When the temporal convolution kernel is relatively small, the receptive field is narrow, allowing the capture of short-term and sudden local features of EEG signals, such as rapid fluctuations in a brain region over a very short period. When the temporal convolution kernel is relatively large, the receptive field is lengthened, enabling the perception of slow, regular changes and continuous activity in EEG signals, thus capturing the global features of EEG signals.
[0057] The first temporal convolutional layer can be a convolutional layer with a relatively small temporal kernel size. The first temporal convolutional layer is used to extract local features of signals at various frequencies. These first temporal features can reflect local patterns in the EEG signal.
[0058] S103. A second time-domain convolutional layer is used to extract global features from the frequency signal to obtain second time-domain features.
[0059] The second temporal convolutional layer can be a convolutional layer with a relatively large temporal kernel size. This second temporal convolutional layer is used to extract global features of signals at various frequencies. These second temporal features can reflect the global patterns of the EEG signals. The kernel size of the first temporal convolutional layer is smaller than the kernel size of the second temporal convolutional layer.
[0060] In one specific embodiment, multiple two-dimensional convolution operators with different temporal kernel sizes are used to extract local and / or global features. The expression is as follows:
[0061]
[0062] Where, k i t Let φ be the i-th temporal convolution kernel, x be the EEG signal matrix, and φ(conv2D(x, k)) be the EEG signal matrix. i t AP(φ(conv2D(x, k)) is the activation function. i t ())) is average pooling. Changing the temporal convolution kernel k i t The size can be used to obtain brainwave signals with different characteristics.
[0063] S104. The first time-domain feature and the second time-domain feature are fused to obtain the intermediate time-domain feature.
[0064] The intermediate time-domain features can be the time-dimensional features of the EEG signal. By concatenating the first and second time-domain features along the feature dimension, the time-dimensional features of the EEG signal are obtained. The expression is:
[0065]
[0066] S105. Use a spatial convolutional layer to extract features from the intermediate time-domain features to obtain the spatiotemporal features of the frequency signal.
[0067] Among these, intermediate time-domain features only include features extracted along the time dimension, while EEG signals, in addition to the time dimension, also have a spatial dimension. The spatial dimension can refer to the signals collected at different sampling locations during EEG signal acquisition. Spatiotemporal features can be features that integrate both time-dimensional and spatial-dimensional features.
[0068] To analyze the correlation between different sampling locations of EEG signals, spatial features are extracted. Specifically, spatial convolution is performed on the intermediate temporal features, as shown in the following expression:
[0069]
[0070] Where, k s For spatial convolution kernel, x s It is a spatiotemporal characteristic.
[0071] Optionally, the spatiotemporal features can be reshaped into a format that facilitates subsequent encoding.
[0072] In a specific embodiment, the flowchart for obtaining the spatiotemporal features is as follows: Figure 1B As shown.
[0073] The EEG signals are input into two temporal convolutional layers with different temporal kernels for convolution, and the output features x in two time dimensions are generated. 1 t and x 2 t The features from the two time dimensions are fused to obtain the fused time features [x]. 1 t |x 2 t The fused temporal features are processed through a spatial convolutional layer to extract the spatial dimension features of the EEG signal, thus obtaining the spatiotemporal features of the EEG signal. These spatiotemporal features are then reshaped into the target format.
[0074] S106. Perform cross-frequency attention fusion on the spatiotemporal features of each frequency signal to obtain signal features.
[0075] In this process, when there are two frequency signals, the high-frequency signal is passed through a first time-domain convolutional layer, a second time-domain convolutional layer, and a spatial convolutional layer to obtain its spatiotemporal features. Similarly, the low-frequency signal is passed through the same convolutional layers to obtain its spatiotemporal features. Cross-frequency attention fusion is then performed on these two spatiotemporal features to obtain a signal feature that integrates both high-frequency and low-frequency characteristics.
[0076] In an optional embodiment, the step of performing cross-frequency attention fusion on the spatiotemporal features of each of the frequency signals to obtain signal features includes:
[0077] When none of the frequency signals meet the update conditions, attention fusion is performed on the query vector determined by the frequency signals other than the frequency signals, as well as the key vector and value vector determined by the spatiotemporal features of the frequency signals, to obtain the intermediate attention fusion result of the frequency signals; the query vector of the frequency signals is updated according to the intermediate attention fusion result of the frequency signals; when none of the frequency signals meet the update conditions, the current query vector is determined as the target fusion result of the frequency signals; the signal features are determined according to the target fusion result of each frequency signal.
[0078] The update condition can be a condition for updating the query vector. The update condition is used to determine whether to end cross-frequency attention fusion. If the frequency signal does not meet the update condition, attention fusion is performed; if the frequency signal meets the update condition, attention fusion ends, and the target fusion result is output.
[0079] In some embodiments, the frequency signal is determined to satisfy the update condition when the number of times the query vector is updated is greater than or equal to the update threshold. In some embodiments, the frequency signal is determined to satisfy the update condition when the last attention layer outputs the intermediate attention fusion result. The number of attention layers can be pre-configured, determined based on experimental statistics, or the number of attention layers can be trained together with the model. In a series of attention layers, the output of the previous attention layer serves as the input data for the next attention layer.
[0080] If the update condition is determined based on whether it is the output of the last attention layer, an early stopping mechanism is optionally introduced during model training to prevent overfitting: if the validation set accuracy fails to improve within 50 consecutive epochs, the training process automatically terminates, and the model parameters with the best validation performance are selected as the final result. The update condition is set based on the number of attention layers in the optimal model parameters; when the last attention layer outputs the intermediate attention fusion result, the frequency signal is considered to meet the update condition.
[0081] The query vector can be a vector representing the required effective features. It is used to actively retrieve and match relevant information useful for feature extraction. The key vector can be a vector representing the attributes of effective features. It is used as a matching benchmark; the relevance of EEG information is determined by calculating the similarity between the key vector and the query vector. The value vector is the vector carrying the actual effective features. It is used to weight and fuse the matching results of the query vector and the key vector to output the target feature information.
[0082] Cross-frequency attention fusion operations can include:
[0083] 1. Initialize the feature sequence for each frequency signal, stack the feature sequences through the branch encoder layer so that each feature sequence carries the features of each frequency signal, and use the processed feature sequence as the query vector.
[0084] 2. Attention fusion is performed between the query vectors of other frequency signals and the key and value vectors determined by the spatiotemporal characteristics of the current frequency signal to obtain an intermediate attention fusion result. In the embodiment involving both low-frequency and high-frequency signals, for the high-frequency signal, attention fusion is performed between the low-frequency query vector and the high-frequency key and value vectors to obtain a high-frequency intermediate attention fusion result; for the low-frequency signal, attention fusion is performed between the high-frequency query vector and the low-frequency key and value vectors to obtain a low-frequency intermediate attention fusion result.
[0085] 3. The intermediate attention fusion results of other frequency signals are used as a new query vector and fused with the key vector and value vector determined by the spatiotemporal features of the current frequency signal. In the embodiment involving both low-frequency and high-frequency signals, for the low-frequency signal, the intermediate attention fusion results of the high-frequency signal are used as a new query vector and fused with the low-frequency key vector and value vector; for the high-frequency signal, the intermediate attention fusion results of the low-frequency signal are used as a new query vector and fused with the high-frequency key vector and value vector.
[0086] 4. Continue fusing until the preset threshold number of times is met, at which point the last attention layer outputs the intermediate attention fusion result. The current query vector is determined as the target fusion result for the frequency signals; based on the target fusion results of each frequency signal and the spatiotemporal characteristics of the original frequency signals, signal features are obtained.
[0087] In a specific embodiment, the cross-frequency attention fusion method is as follows: Figure 1C As shown.
[0088] The query vectors from other frequency bands are processed through a fully connected layer and then fused together with the key and value vectors determined by the spatiotemporal features of the current frequency band into a cross-frequency attention fusion module to obtain intermediate attention fusion results. These intermediate attention fusion results are then processed through a fully connected layer to output the target fusion result. Finally, the target fusion result is concatenated with the spatiotemporal features of the frequency signals to output the signal features for each frequency band.
[0089] It is evident that by integrating the query vectors of other frequency bands with the key and value vectors corresponding to the spatiotemporal features of the current frequency band through attention fusion, the isolation of single-frequency band features is broken, allowing the current frequency band features to simultaneously carry their own attributes and the correlation patterns with other frequency bands, enriching the feature expression dimensions, and making the features of EEG signals more obvious.
[0090] In an optional embodiment, determining the signal features based on the target fusion result of each frequency signal includes: fusing the spatiotemporal features of the frequency signal and the target fusion result for each frequency signal to obtain the fusion features of the frequency signal; and calculating the mean of the fusion features of each frequency signal to obtain the signal features.
[0091] The process involves splicing the target fusion results of each frequency with the spatiotemporal features of the corresponding frequency signals to obtain the fusion features of each frequency signal. The mean of the fusion features of each frequency signal is then taken as the signal feature of the EEG.
[0092] Optionally, in embodiments involving both low-frequency and high-frequency signals, the target fusion result of the high-frequency signal and the spatiotemporal features of the high-frequency signal are concatenated to obtain high-frequency fusion features. A score for each category is then calculated based on these high-frequency fusion features. Similarly, a score for each category is calculated based on the low-frequency fusion features. The average of the two scores is taken as the final classification score. The final classification score is used to determine the user intent corresponding to the signal feature.
[0093] It is evident that by averaging the fusion features of signals from various frequencies, complementary information from multiple frequency bands can be effectively integrated, reducing the computational complexity of subsequent classification tasks.
[0094] S107. Classify the signal features to obtain the intent recognition result.
[0095] The user's specific intent is determined by using a classifier to identify the signal features.
[0096] In a specific example, intent recognition is performed using signal features obtained from embodiments of the present invention. Four tests were conducted based on different test data, which fall into the following four categories:
[0097] 1. The dataset for the 3rd Brain-Computer Interface Competition IVa (BCIC3-IVa): 118 channels, sampling rate 100 Hz, intended for limb movements, including movements of the left and right hands and feet.
[0098] 2. OpenBMI-MI (Open Brain-Computer Interface Motion Imagery Dataset): 62 channels, 1 kHz, intended for limb movement.
[0099] 3. The fourth edition of the Emotion EEG dataset (SEED-IV): 62 channels, four categories of emotional intentions, including: happy, sad, emotionless, and fear.
[0100] 4. The fifth edition of the multimodal emotion EEG dataset (SEED-V): 62 channels, five categories of emotional intentions, including: happy, sad, neutral, fearful, and disgusted.
[0101] The method according to embodiments of the present invention extracts features from electroencephalogram (EEG) signals for intent recognition, achieving an accuracy of 81.77% on the SEED-IV dataset, 84.65% on the SEED-V dataset, 69.68% on the OpenBMI-MI dataset, and 82.25% on the BCIC3-IVa dataset. This represents the best accuracy compared to existing models.
[0102] The technical solution of this invention divides the brainwave signal into multiple frequency signals according to frequency, and extracts local and global features from each frequency signal according to the time dimension and spatial features according to the spatial dimension. This allows for the comprehensive capture of the temporal dynamic changes, global correlation patterns, and spatial distribution characteristics of the brainwave signal. Cross-frequency attention fusion is performed on the frequency signals with spatiotemporal characteristics, enabling the brainwave signal to exhibit characteristics of different frequency bands. This fully integrates the local and global features of the brainwave signal across different time ranges and frequencies, avoiding the feature bias caused by a single dimension, improving the representativeness of the features, and solving the problem of insufficient fusion of local and global features of brainwave signals and low accuracy of intent recognition. This improves the accuracy of feature extraction and enriches the feature content, allowing for intent recognition based on accurate features, thereby improving the accuracy of intent recognition.
[0103] Figure 2AThis is a flowchart illustrating a brain signal intention recognition method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment defines the brainwave signal as a multi-channel time-domain signal. The step of using a first time-domain convolutional layer to extract local features from the frequency signal to obtain first time-domain features is defined as follows: for each channel, the first time-domain convolutional layer is used to extract local features from the time-domain signal of that channel to obtain a first feature signal for that channel; the first feature signals of each channel are combined to obtain a first time-domain feature. The step of using a second time-domain convolutional layer to extract global features from the frequency signal to obtain second time-domain features is defined as follows: for each channel, the second time-domain convolutional layer is used to extract global features from the time-domain signal of that channel to obtain a second feature signal for that channel; the second feature signals of each channel are combined to obtain a second time-domain feature.
[0104] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments.
[0105] See Figure 2A The brain signal intent recognition method shown includes:
[0106] S201. Divide the acquired multi-channel time-domain signal into multiple frequency signals of different frequencies.
[0107] In the time domain representation, brainwave signals are typically displayed as a two-dimensional curve: the horizontal axis represents time, and the vertical axis represents the instantaneous amplitude, also known as the instantaneous potential, of the brainwave signal. Time-domain signals can be brainwave signals represented in this two-dimensional curve form. Multi-channel time-domain signals can refer to time-domain signals acquired by brain-computer interfaces at multiple different locations.
[0108] In an optional embodiment, before dividing the acquired brainwave signal into multiple frequency signals of different frequencies, the method further includes: acquiring brain signals acquired by multiple brain-computer interfaces; using the brain signal of one brain-computer interface as a channel brain signal; and combining the brain signals of each channel to form a brainwave signal.
[0109] A brain-computer interface (BCI) is a signal transmission interface established between a user's brain and a sensing device. BCIs are used to collect brain signals indicating neuronal activity through sensing devices. These sensing devices include EEG caps or electrode arrays. A typical sensing device has multiple BCIs to acquire brain signals from different brain locations. For example, an EEG cap has multiple signal acquisition points, and an electrode array includes multiple electrodes for acquiring signals.
[0110] One method for acquiring brainwave signals involves the user imagining a set scenario and collecting brain signals from different locations in the user's brain through multiple brain-computer interfaces. The brain signals from one brain-computer interface are used as one channel of brain signals, and the brain signals from all channels together form the brainwave signal corresponding to that scenario.
[0111] In one specific embodiment, conductive adhesive or saline electrodes are applied to an EEG cap or electrode array, which is then worn by the user. During the data collection process, the user receives external instructions via voice or text and focuses on imagining the corresponding action within a specified time period. The system simultaneously records the brain signals transmitted from multiple brain-computer interfaces on the EEG cap or electrode array, as well as the external instructions received by the user. For example, if the user receives the voice instruction "imagine left hand movement," and the user performs the corresponding imagining action without actually making any movement, the system records the brain signals collected from multiple brain-computer interfaces. The brain signals from each channel constitute the EEG signal corresponding to "left hand movement." Through repeated operations, a large number of EEG signals containing different types of imaginings can be collected.
[0112] It is evident that by combining brain signals from various channels to form brainwave signals, the collected brainwave signals contain brain signals from different brain locations, enriching the spatial information of the brainwave signals, improving data integrity, and providing sufficient evidence for intent recognition.
[0113] S202. For each of the channels, a first temporal convolutional layer is used to extract local features from the temporal signal of the channel to obtain the first feature signal of the channel.
[0114] The first characteristic signal can be a time-domain signal with local characteristics.
[0115] Temporal convolution is performed on the temporal signals of each channel, using temporal convolution kernels of different sizes to capture different features of EEG signals within different time ranges. Convolutional layers with smaller temporal convolution kernels are used to convolve the temporal signals of each channel to extract local features of the channel's temporal signals, thus obtaining the first feature signal of that channel.
[0116] S203. Combine the first characteristic signals of each channel to obtain the first time-domain feature.
[0117] In this process, the time-domain signals of each channel are convolved by the first time-domain convolutional layer to obtain the first feature signal of each channel. The first feature signals of each channel are then combined into a whole to serve as the first time-domain feature.
[0118] Optionally, the combination of the first characteristic signals of each channel can be in matrix form. The i-th row of the first time-domain characteristic matrix corresponds to the first characteristic signal of the i-th channel.
[0119] S204. For each of the channels, a second temporal convolutional layer is used to extract global features from the temporal signals of the channels to obtain the second feature signals of the channels.
[0120] The second characteristic signal can be a time-domain signal with global characteristics.
[0121] A convolutional layer with a large temporal kernel size is used to convolve the temporal signal of the channel to extract the global features of the temporal signal of the channel, thus obtaining the second feature signal of the channel.
[0122] S205. Combine the second characteristic signals of each channel to obtain the second time-domain feature.
[0123] In this process, the temporal signals of each channel are convolved by the second temporal convolution layer to obtain the second feature signals of each channel. The second feature signals of each channel are then combined into a whole to serve as the second temporal feature.
[0124] Optionally, the combination of the second characteristic signals of each channel can be in matrix form. The i-th row of the second time-domain characteristic matrix corresponds to the second characteristic signal of the i-th channel.
[0125] S206. The first time-domain feature and the second time-domain feature are fused to obtain the intermediate time-domain feature.
[0126] In an optional embodiment, fusing the first time-domain feature and the second time-domain feature to obtain an intermediate time-domain feature includes: splicing the signals of the first time-domain feature and the second time-domain feature in each of the channels to obtain a time-domain fused signal for each of the channels; and combining the time-domain fused signals of each of the channels to obtain an intermediate time-domain feature.
[0127] Among them, the time-domain fused signal can be a time-domain signal that has both local and global features.
[0128] The first and second time-domain features of each channel are concatenated to obtain the time-domain fused signal for that channel. The time-domain fused signals of each channel are then combined to obtain the intermediate time-domain features.
[0129] Optionally, the combination of the time-domain fused signals of each channel can be in matrix form. The i-th row of the intermediate time-domain feature matrix corresponds to the time-domain fused signal of the i-th channel.
[0130] It is evident that by splicing the first time-domain feature and the second time-domain feature into a time-domain fusion signal, and combining the time-domain fusion signals of each channel into an intermediate time-domain feature, the temporal and spatial information of the EEG signal is fully preserved, enriching the feature expression of the EEG signal and improving its recognizability.
[0131] S207. Use a spatial convolutional layer to extract features from the intermediate time-domain features to obtain the spatiotemporal features of the frequency signal.
[0132] In an optional embodiment, the step of using a spatial convolutional layer to extract features from the intermediate time-domain features to obtain the spatiotemporal features of the frequency signal includes: using the spatial convolutional layer to perform channel convolution on the intermediate time-domain features to obtain the spatiotemporal features of the frequency signal.
[0133] In order to further extract cross-channel spatial features, channel convolution is performed on the intermediate time-domain features. The intermediate time-domain features are convolved with a spatial convolution kernel of size "1 × number of channels". This does not destroy the time-domain features, but only explores the spatial correlation between channels. In the end, the features contain both temporal fluctuations and spatial coordination patterns, so as to obtain the spatiotemporal features of the frequency signal.
[0134] It is evident that by performing channel convolution on intermediate temporal features, redundant channel information can be compressed, spatial correlations between channels can be extracted, and the feature dimensional structure can be optimized.
[0135] S208. Perform cross-frequency attention fusion on the spatiotemporal features of each frequency signal to obtain signal features.
[0136] S209. Classify the signal features to obtain the intent recognition result.
[0137] The technical solution of this invention employs a first temporal convolutional layer and a second temporal convolutional layer to perform temporal convolution on the temporal signals of each channel, thereby obtaining the first feature signal and the second feature signal of each channel. Based on the first feature signal and the second feature signal of each channel, the first temporal feature and the second temporal feature of the EEG signal are obtained. Features are extracted independently for each channel, fully preserving the temporal specificity of a single channel, providing rich material for subsequent cross-channel spatial fusion, and further improving the accuracy of subsequent intention recognition and classification.
[0138] In one specific embodiment, a brain signal intention recognition method is as follows: Figure 2B As shown.
[0139] The raw EEG signals are input into a preprocessing module for preprocessing such as averaging, standardization, and filter bank grouping to obtain high-frequency and low-frequency EEG signals. These signals are then input into a spatiotemporal convolution module for temporal and spatial convolution, respectively. The convolved high- and low-frequency EEG signals are then input into an encoder to generate query vectors with high-frequency and low-frequency branch features. These query vectors, along with the convolved high- and low-frequency EEG signals, are then input into a cross-frequency attention fusion module to fuse the high-frequency and low-frequency features, resulting in signal features for intent recognition.
[0140] Figure 3 This is a schematic diagram of a brain signal intention recognition structure provided in an embodiment of the present invention. This embodiment of the present invention is applicable to situations where intention recognition is based on brain signals. The device can execute a brain signal intention recognition method and can be implemented in hardware and / or software.
[0141] See Figure 3 The brain signal intention recognition device shown includes:
[0142] The brainwave signal division module 301 is used to divide the acquired brainwave signal into multiple frequency signals of different frequencies.
[0143] The local feature extraction module 302 is used to extract local features from each of the frequency signals using a first time-domain convolutional layer to obtain first time-domain features.
[0144] The global feature extraction module 303 is used to perform global feature extraction on the frequency signal using a second temporal convolutional layer to obtain second temporal features;
[0145] The time-domain feature fusion module 304 is used to fuse the first time-domain feature and the second time-domain feature to obtain an intermediate time-domain feature;
[0146] The spatiotemporal feature generation module 305 is used to extract features from the intermediate temporal features using a spatial convolutional layer to obtain the spatiotemporal features of the frequency signal;
[0147] The signal feature generation module 306 is used to perform cross-frequency attention fusion on the spatiotemporal features of each frequency signal to obtain signal features;
[0148] The intent recognition module 307 is used to classify the signal features to obtain the intent recognition result.
[0149] The technical solution of this invention divides the brainwave signal into multiple frequency signals according to frequency, and extracts local and global features from each frequency signal according to the time dimension and spatial features according to the spatial dimension. This allows for the comprehensive capture of the temporal dynamic changes, global correlation patterns, and spatial distribution characteristics of the brainwave signal. Cross-frequency attention fusion is performed on the frequency signals with spatiotemporal characteristics, enabling the brainwave signal to exhibit characteristics of different frequency bands. This fully integrates the local and global features of the brainwave signal across different time ranges and frequencies, avoiding the feature bias caused by a single dimension, improving the representativeness of the features, and solving the problem of insufficient fusion of local and global features of brainwave signals and low accuracy of intent recognition. This improves the accuracy of feature extraction and enriches the feature content, allowing for intent recognition based on accurate features, thereby improving the accuracy of intent recognition.
[0150] In an optional embodiment, the local feature extraction module 302 includes:
[0151] The first feature signal generation unit is used to extract local features from the temporal signal of each channel using a first temporal convolutional layer to obtain the first feature signal of the channel.
[0152] The first feature signal combination unit is used to combine the first feature signals of each of the channels to obtain the first time domain feature;
[0153] In an optional embodiment, the global feature extraction module 303 includes:
[0154] The second feature signal generation unit is used to perform global feature extraction on the temporal signal of each channel using a second temporal convolutional layer to obtain the second feature signal of the channel.
[0155] The second feature signal combination unit is used to combine the second feature signals of each of the channels to obtain the second time-domain feature.
[0156] In an optional embodiment, the temporal feature fusion module 304 includes:
[0157] A time-domain fusion signal generation unit is used to splice the signals of the first time-domain feature and the second time-domain feature in each of the channels to obtain a time-domain fusion signal for each of the channels;
[0158] The time-domain fusion signal combination unit is used to combine the time-domain fusion signals of each of the channels to obtain intermediate time-domain features.
[0159] In an optional embodiment, the spatiotemporal feature generation module 305 includes:
[0160] The channel convolution unit is used to perform channel convolution on the intermediate time-domain features using the spatial convolution layer to obtain the spatiotemporal features of the frequency signal.
[0161] In an optional embodiment, the signal feature generation module 306 includes:
[0162] The attention fusion unit is used to perform attention fusion on the query vector determined by the frequency signals other than the frequency signals and the key vector and value vector determined by the spatiotemporal features of the frequency signals when the frequency signals do not meet the update conditions, so as to obtain the intermediate attention fusion result of the frequency signals.
[0163] The query vector update unit is used to update the query vector of the frequency signal according to the intermediate attention fusion result of the frequency signal;
[0164] The target fusion result generation unit is used to determine the current query vector as the target fusion result of the frequency signals when each of the frequency signals meets the update conditions;
[0165] The signal feature generation unit is used to determine signal features based on the target fusion results of each frequency signal.
[0166] In an optional embodiment, the signal feature generation unit includes:
[0167] A fusion feature generation subunit is used to fuse the spatiotemporal features of the frequency signals and the target fusion result for each of the frequency signals to obtain the fusion features of the frequency signals.
[0168] The signal feature generation subunit is used to calculate the mean of the fused features of each frequency signal to obtain the signal features.
[0169] In an optional embodiment, it further includes:
[0170] The brain signal acquisition unit is used to acquire brain signals from multiple brain-computer interfaces.
[0171] The brain signal determination unit of the channel is used to identify the brain signal of a brain-computer interface as the brain signal of a channel.
[0172] A brain signal combining unit is used to combine brain signals from each of the channels to form an electroencephalogram (EEG) signal.
[0173] The brain signal intention recognition device provided in the embodiments of the present invention can execute the brain signal intention recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the brain signal intention recognition method.
[0174] Figure 4 A schematic diagram of the structure of a brain signal intent recognition device 400 that can be used to implement an embodiment of the present invention is shown.
[0175] like Figure 4As shown, the brain signal intention recognition device 400 includes at least one processor 401 and a memory, such as a read-only memory 402 or a random access memory 403, communicatively connected to the at least one processor 401. The memory stores computer programs executable by the at least one processor. The processor 401 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 402 or loaded from the storage unit 408 into the random access memory 403. The random access memory 403 can also store various programs and data required for the operation of the brain signal intention recognition device 400. The processor 401, read-only memory 402, and random access memory 403 are interconnected via a bus 404. An input / output interface 405 is also connected to the bus 404.
[0176] Multiple components in the brain signal intention recognition device 400 are connected to an input / output interface 405, including: an input unit 406, such as a keyboard or mouse; an output unit 407, such as various types of displays or speakers; a storage unit 408, such as a disk or optical disk; and a communication unit 409, such as a network card, modem, or wireless transceiver. The communication unit 409 allows the brain signal intention recognition device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0177] Processor 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 401 performs the various methods and processes described above, such as brain signal intention recognition methods.
[0178] In some embodiments, the brain signal intention recognition method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the brain signal intention recognition device 400 via read-only memory 402 and / or communication unit 409. When the computer program is loaded into random access memory 403 and executed by processor 401, one or more steps of the brain signal intention recognition method described above may be performed. Alternatively, in other embodiments, processor 401 may be configured to perform the brain signal intention recognition method by any other suitable means (e.g., by means of firmware).
[0179] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), complex programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0180] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0181] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, flash memory, optical fiber, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0182] To provide interaction with the user, the systems and techniques described herein can be implemented on an operational detection device. This brain signal intention recognition device includes: a display device (e.g., a cathode ray tube or liquid crystal display monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the brain signal intention recognition device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0183] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0184] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system. This addresses the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0185] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0186] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A brain signal intent recognition method, characterized by, The method comprises: dividing the collected brain wave signals into frequency signals of different frequencies; for each of the frequency signals, performing local feature extraction on the frequency signal by using a first time domain convolution layer to obtain a first time domain feature; performing global feature extraction on the frequency signal by using a second time domain convolution layer to obtain a second time domain feature; fusing the first time domain feature and the second time domain feature to obtain an intermediate time domain feature; performing feature extraction on the intermediate time domain feature by using a spatial convolution layer to obtain a spatio-temporal feature of the frequency signal; performing cross-frequency attention fusion on the spatio-temporal features of each of the frequency signals to obtain a signal feature; classifying the signal feature to obtain an intention recognition result.
2. The method of claim 1, wherein, The brain wave signals comprise multi-channel time domain signals; the first time domain convolution layer is used to perform local feature extraction on the time domain signal of each channel to obtain a first feature signal of the channel; the second time domain convolution layer is used to perform global feature extraction on the time domain signal of each channel to obtain a second feature signal of the channel; the first time domain feature and the second time domain feature are spliced in the signals of each channel to obtain a time domain fusion signal of each channel; the time domain fusion signals of each channel are combined to obtain the intermediate time domain feature. the spatial convolution layer is used to perform channel convolution on the intermediate time domain feature to obtain the spatio-temporal feature of the frequency signal. when each of the frequency signals does not satisfy the update condition, for the frequency signal, the key vector and the value vector determined based on the spatio-temporal feature of the frequency signal and the query vector determined based on the frequency signal other than the frequency signal are fused by attention to obtain an intermediate attention fusion result of the frequency signal; 3. The method of claim 2, wherein, the query vector of the frequency signal is updated according to the intermediate attention fusion result of the frequency signal; when each of the frequency signals satisfies the update condition, the current query vector is determined as a target fusion result of the frequency signal; a signal feature is determined according to the target fusion result of each of the frequency signals.
4. The method according to claim 2 or 3, characterized in that, for each of the frequency signals, the spatio-temporal feature and the target fusion result of the frequency signal are fused to obtain a fusion feature of the frequency signal; 5. The method of claim 1, wherein, 6. The method of claim 5, wherein, The fusion features of each of the frequency signals are averaged to obtain signal features.
7. The method of claim 1, wherein, Before dividing the collected brain wave signals into frequency signals of different frequencies, the method further includes: obtaining brain signals collected by multiple brain-computer interfaces; taking the brain signals of one brain-computer interface as the brain signals of one channel; combining the brain signals of each of the channels to form the brain wave signals.
8. A brain signal intent recognition apparatus characterized by comprising: The device includes: a brain wave signal division module configured to divide the collected brain wave signals into frequency signals of different frequencies; a local feature extraction module configured to, for each of the frequency signals, perform local feature extraction on the frequency signal by using a first time domain convolution layer to obtain first time domain features; a global feature extraction module configured to perform global feature extraction on the frequency signal by using a second time domain convolution layer to obtain second time domain features; a time domain feature fusion module configured to fuse the first time domain features and the second time domain features to obtain intermediate time domain features; a space-time feature generation module configured to perform feature extraction on the intermediate time domain features by using a spatial convolution layer to obtain space-time features of the frequency signal; a signal feature generation module configured to perform cross-frequency attention fusion on the space-time features of each of the frequency signals to obtain signal features; an intention recognition module configured to classify the signal features to obtain an intention recognition result.
9. A brain signal intent recognition device, characterized by, The brain signal intention recognition device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the brain signal intention recognition method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a processor to implement the brain signal intention recognition method in any one of claims 1-7 when executed. The computer readable storage medium stores computer instructions for causing a processor to implement the brain signal intention recognition method in any one of claims 1-7 when executed.