Bimodal signal fusion method based on adaptive spatiotemporal convolutional attention network

By combining EEG and fNIRS signals with an adaptive spatiotemporal convolutional attention network, and using adaptive multi-scale temporal convolution and depth spatial convolution to extract features, it solves the problem of insufficient utilization of the complementary advantages of dual modalities in space and time, and improves brain cognition. Recognition accuracy and model stability of the task.

CN118626940BActive Publication Date: 2024-10-11CHENGDU UNIV OF INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411106056.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-10-11
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

The existing technology has limited utilization of the complementary advantages of dual-modal space and time, lacks flexibility and adaptability in cross-task identification of EEG and fNIRS signals, and deep convolutional networks are prone to gradient disappearance and over-fitting problems.

Method used

A dual-modal signal fusion method based on adaptive spatiotemporal convolutional attention network is adopted. Through the combination of EEG and fNIRS, the adaptive multi-scale temporal convolution network and temporal attention mechanism are used to extract the temporal features of EEG, combined with depth spatial convolution. and spatial attention mechanism to extract the spatial features of fNIRS, and adopt a decision fusion strategy to integrate the classification results.

Benefits of technology

It improves the cross-task recognition accuracy and generalization performance of brain cognitive tasks, enhances the stability and generalization ability of the model, comprehensively mines and utilizes the spatiotemporal features in dual-modal signals, and achieves more accurate data analysis and deal with.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626940B_ABST
    Figure CN118626940B_ABST
Patent Text Reader

Abstract

The present invention discloses a dual-modal signal fusion method based on an adaptive spatiotemporal convolutional attention network, which belongs to the technical field of brain multimodal signal classification, and includes obtaining processed EEG signals; performing two-dimensional convolution operations and sliding window processing on the processed EEG signals to obtain multiple narrow time series; extracting time features in multiple narrow time series, and obtaining classification results of brain cognitive tasks of the time branch of EEG data based on a multi-layer perceptron classification layer; using equidistant azimuth projection to convert hemoglobin concentration into a three-dimensional space tensor, and introducing deep spatial convolution and spatial attention mechanisms to extract key spatial information in the three-dimensional space tensor; finally using a decision fusion strategy to fuse the results of the parallel dual branches, and finally obtaining the classification results of the target brain cognitive task. The present invention effectively meets the needs of brain cognitive multi-task recognition and enhances network generalization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of brain multimodal signal classification, and specifically relates to a dual-modal signal fusion method based on an adaptive spatiotemporal convolutional attention network. Background Art

[0002] Brain cognitive tasks are complex processes that involve how the brain receives, processes, and outputs information. These tasks include motor imagery, working memory, emotion recognition, and fatigue detection. The successful completion of these tasks requires the coordinated work of different areas of the brain, providing a basis for understanding human thinking and behavior patterns. In order to deeply explore the neural mechanisms behind these cognitive tasks, a variety of neuroimaging technologies have emerged. Among them, electroencephalography (EEG) and functional near-infrared spectroscopy (fNIRS) are two commonly used methods.

[0003] Given that EEG has millisecond-level temporal resolution, it has become an important tool for exploring brain cognitive functions, emotional responses, and disease diagnosis. Therefore, many EEG studies focus on the in-depth analysis of temporal information. As a new form of CNN, the temporal convolutional network (TCN) effectively captures the long-term temporal dependencies of EEG by expanding the receptive field and combining residual connections to avoid gradient problems. However, current TCN applications generally use a fixed convolution kernel size, which leads to the fixed receptive field, which in turn restricts its flexibility and adaptability in cross-task recognition scenarios.

[0004] fNIRS also has the advantage of high spatial resolution, which has led researchers to focus on extracting brain activity features from the spatial dimension of fNIRS signals. Traditional methods usually directly extract spatial features from fNIRS signals in a convolutional manner. In recent years, one method is to convert a one-dimensional blood oxygen signal into a three-dimensional tensor, such as an equidistant azimuth projection. Subsequently, common models in the field of computer vision (CV) can be used to extract spatial information from the three-dimensional tensor, such as efficient channel attention (ECA). However, this approach still has some limitations. First, as the depth in the convolutional network increases, the network will face the problems of gradient vanishing and overfitting. Second, the ECA mechanism focuses mainly on the dependencies between channels, and its ability to capture spatial context and relationships in the data is relatively limited.

[0005] In multimodal hybrid BCI research, the combination of EEG and fNIRS has become a powerful tool for studying brain activity, taking advantage of the rich spatiotemporal characteristics of the data. In general, multimodal fusion can occur at the data level, feature level, and decision level. Most EEG-fNIRS BCI studies adopt a fusion strategy at the decision level. This preference may be because decision fusion effectively mitigates the impact of multimodality on the delayed effect caused by the hemodynamic response of fNIRS by processing the data of each mode independently. Summary of the invention

[0006] The purpose of the present invention is to address the above-mentioned deficiencies in the prior art and provide a bimodal signal fusion method based on an adaptive spatiotemporal convolutional attention network to solve the problem of limited utilization of the bimodal spatiotemporal complementary advantages.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is:

[0008] A bimodal signal fusion method based on an adaptive spatiotemporal convolutional attention network comprises the following steps:

[0009] S1. Collecting the raw data of the target EEG activity based on the EEG acquisition device, and preprocessing the raw data to obtain the processed EEG signal;

[0010] S2, performing two-dimensional convolution operations on the processed EEG signal, and performing convolution-based sliding window processing on the EEG signal after the two-dimensional convolution operations in the time dimension to obtain multiple narrow time series;

[0011] S3, combining adaptive multi-scale temporal convolutional network and temporal attention mechanism to extract temporal features from multiple narrow time series;

[0012] S4, inputting the extracted time features into the classification layer of the multi-layer perceptron to obtain the classification results of the brain cognitive task of the time branch of the EEG data;

[0013] S5, collecting the change in near-infrared light intensity of the target brain tissue based on the fNIRS acquisition device, and processing the change in near-infrared light intensity to obtain the processed change in oxygenated hemoglobin concentration and deoxygenated hemoglobin concentration;

[0014] S6, using equidistant azimuth projection to convert the processed oxygenated hemoglobin concentration change and deoxygenated hemoglobin concentration change from a one-dimensional time series into a three-dimensional space tensor, and reducing the dimension of the three-dimensional space tensor in the time dimension through a pooling operation;

[0015] S7, combining deep spatial convolution and spatial attention mechanism to extract key spatial features in the 3D spatial tensor after dimensionality reduction;

[0016] S8, input the extracted key spatial features into the multi-layer perceptron classification layer to obtain the classification results of the brain cognitive task of the fNIRS spatial branch;

[0017] S9. A decision fusion strategy is used to fuse the classification results of the brain cognitive tasks of the time branch of the EEG data and the classification results of the brain cognitive tasks of the spatial branch of the fNIRS data to obtain the classification results of the target brain cognitive tasks.

[0018] Furthermore, S1 specifically includes the following sub-steps:

[0019] S11, using EEG acquisition equipment to continuously monitor the change in the target's brain electrical activity, and acquire the original EEG data of the target's brain electrical activity;

[0020] S12, filtering, first segmentation, baseline correction and second segmentation processing are performed on the raw EEG data to obtain the processed EEG signal .

[0021] Furthermore, S2 specifically includes the following sub-steps:

[0022] S21. Processed EEG signal Perform the first two-dimensional convolution operation:

[0023]

[0024] in, EEG Middle The convolution result of elements; EEG Elements in is the convolution kernel elements; A is the length of the first dimension of the convolution kernel in the first two-dimensional convolution operation; They are the row index and column index of the convolution kernel in the first convolution operation respectively; are the row index and column index of the current signal respectively;

[0025] S22. EEG signals Middle The convolution result of elements Perform a second two-dimensional convolution operation:

[0026]

[0027] in, for Middle The convolution result of elements; is the convolution kernel elements; They are the row index and column index of the convolution kernel in the second two-dimensional convolution operation respectively; They are the sizes of the first dimension and the second dimension of the convolution kernel in the second two-dimensional convolution operation respectively;

[0028] S23. Perform convolution-based sliding window processing on the convolution result after the convolution operation in the time dimension:

[0029]

[0030]

[0031] in, is the end time point; for The length of the original time series data; is the number of narrow time series; is the starting time point of a narrow time series; is the length of a narrow time series; The original time series data is captured as , to obtain multiple narrow time series .

[0032] Furthermore, S3 specifically includes the following sub-steps:

[0033] S31. Calculate the narrow time series of S trials The latency of the time-varying power:

[0034]

[0035] in, is the time-varying power of the Sth trial, tm is the time index, and pw is the frequency index; For the A narrow time series; is the Hanning window function; is the index of the narrow sample sequence; is the complex exponential term used for Fourier transform;

[0036] S32, select the minimum, mode and maximum values ​​of the latency in S trials as the kernel scales of the three groups of TCN blocks;

[0037] S33, each narrow time series They are input into three groups of TCN blocks with different kernel scales, and output EEG temporal features of different scales;

[0038] S34, inputting EEG time features of different scales into the TA block, adaptively acquiring the global time information of each channel in the TA block, and outputting three sets of refined EEG time features:

[0039]

[0040] in, For the The output result of group TA block; For the The output results of the group TCN block; is the global average pooling function; It is a one-dimensional convolutional network; is the Sigmoid activation function;

[0041] S35, splicing the three groups of refined EEG time features output:

[0042]

[0043] in, It is the splicing result of three groups of TA blocks; is the matrix connection operation; , , These are the output results of the 1st, 2nd, and 3rd groups of TA blocks, respectively;

[0044] S36, multiple narrow time series The corresponding output multiple refined EEG time features are spliced:

[0045]

[0046] in, for The splicing result of the output of narrow time series; For the The output of a narrow time series after temporal attention, is the number of narrow time series.

[0047] Furthermore, S5 specifically includes the following sub-steps:

[0048] S51, using fNIRS acquisition equipment to continuously measure the change in near-infrared light intensity absorbed or scattered by the target brain tissue;

[0049] S52. Use the modified Beer-Lambert law to convert the near-infrared light intensity change into the oxygenated hemoglobin concentration change and the deoxygenated hemoglobin concentration change:

[0050]

[0051] in, and are the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; ∆HbO and ∆HbR are the changes in the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; is the differential path length factor; is the distance between the light source and the detector; and For different wavelengths of light; and are the extinction coefficients of the two chromophores HbO and HbR, and Respectively and Changes in optical density;

[0052] S53, filtering, first segmentation, baseline correction and second segmentation operations are performed on the oxygenated hemoglobin concentration change amount and the deoxygenated hemoglobin concentration change amount, respectively obtaining the processed oxygenated hemoglobin concentration change amount and the change in deoxyhemoglobin concentration after treatment .

[0053] Furthermore, S6 specifically includes the following sub-steps:

[0054] S61, select the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The center point of the path between all light sources and detectors is used as the reference point;

[0055]

[0056] in, is a reference point; , , Respectively represent the x, y, and z coordinates of the reference point; , , Respectively represent the changes in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment No. The x, y, z coordinates of each channel; represents the number of channels of the fNIRS acquisition device;

[0057] S62. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The Euclidean distance between any channel and the reference point :

[0058]

[0059] S63. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The position of each channel in two-dimensional coordinates:

[0060]

[0061]

[0062] in, , Respectively The position of each channel in x and y coordinates; is the cosine function; is the inverse tangent function; is a sine function; is the ratio of pi;

[0063] S64. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment Each channel in The position of the two-dimensional space matrix:

[0064]

[0065]

[0066] in, , Respectively The column and row positions of the channels in the two-dimensional space matrix; The size of the two-dimensional matrix representing the mapping, represents the minimum function, represents the maximum value function;

[0067] S65. According to the time dimension, the change in the concentration of oxygenated hemoglobin after treatment is calculated. Or the change in deoxyhemoglobin concentration after treatment The two-dimensional space matrices are stacked into three-dimensional space tensors and ;

[0068] S66, the three-dimensional space tensor and Through the time pooling block, the dimensionality reduction is performed on the time dimension, and the three-dimensional space tensors after dimensionality reduction are obtained respectively. and .

[0069] Furthermore, S7 specifically includes the following sub-steps:

[0070] S71. Reduce the dimension of the three-dimensional space tensor and Stacked together to get fusion features ;

[0071] S72, fusion features Divide it into M branches according to the size of the time dimension, record the The fusion feature of each branch is ;

[0072] S73, merge each branch Input into the deep spatial convolutional network, and output the spatial features :

[0073]

[0074] in, For the The output of the deep spatial convolutional network in the fusion features of the branches; , , The position index of the first, second and third dimensions of the fusion feature; is the size of the convolution kernel in the deep spatial convolutional network, , , They are the lengths of the first, second, and third dimensions of the convolution kernel in the deep spatial convolutional network, respectively; is the convolution kernel in the deep spatial convolutional network. elements;

[0075] S74, spatial features Input to the spatial attention block to obtain key spatial features .

[0076] Furthermore, S74 specifically includes the following sub-steps:

[0077] S741. Input the output of the deep spatial convolutional network into the channel attention module to obtain the weight feature based on channel allocation. :

[0078]

[0079] in, is the Sigmoid activation function; MLP is the multi-layer perceptron; MaxPool is the maximum pooling; AvgPool is the average pooling; is the output result of the deep spatial convolutional network;

[0080] S742, weight feature Input into the spatial attention module to obtain weight features based on spatial distribution :

[0081]

[0082] Among them, the weight feature based on spatial allocation That is the key spatial feature; is a two-dimensional convolutional network, It is a concatenated map of maximum pooling and average pooling based on convolution channels.

[0083] Furthermore, the classification results of the multi-layer perceptron classification layer in S4 and S8 are expressed as:

[0084]

[0085] in, The classification probability of the brain cognitive task of the independent branch output by the classification layer of the multi-layer perceptron is the classification probability of the EEG time branch or the fNIRS space branch; is the weight matrix; is bias; is the processed feature output, which is The stitching result of narrow time series output or key spatial features ; is the normalized exponential function.

[0086] Furthermore, in S9, a decision fusion strategy is used to fuse the classification results of the brain cognitive task of the time branch of the EEG data and the classification results of the brain cognitive task of the space branch of the fNIRS data to obtain the classification results of the target brain cognitive task, including:

[0087]

[0088] in, is the classification probability of brain cognitive tasks with fused parallel dual branches; N is the number of modal branches; are the weights of different modal branches.

[0089] The dual-modal signal fusion method based on the adaptive spatiotemporal convolutional attention network provided by the present invention has the following beneficial effects:

[0090] 1. Aiming at the needs of brain cognitive multimodal multitask recognition and deep learning big data, the present invention explores the application of convolutional networks and attention mechanisms in EEG and fNIRS signals. In the EEG time branch, an EEG-based adaptive multiscale time convolutional network is proposed, which can dynamically adjust its three different scales to capture the time information in the EEG signal, thereby showing excellent generalization performance in a cross-task environment. Subsequently, the key time information in the EEG signal is extracted by combining time attention. In the fNIRS space branch, the equidistant azimuth projection method is used to convert the two hemoglobin concentration changes into three-dimensional space tensors, which is helpful for the subsequent extraction of spatial features. Then, a combination of deep spatial convolution and attention is used to realize the local feature extraction and global feature capture capabilities of fNIRS signals. Finally, a decision fusion strategy is used to integrate the temporal dynamic changes of EEG and the spatial activity patterns of fNIRS for the classification of brain cognitive tasks.

[0091] 2. This paper proposes an adaptive multi-scale temporal convolutional network-temporal attention (AMTCN-TA) block. The AMTCN-TA block integrates multi-scale TCN and attention mechanism, which can selectively focus on the temporal features in EEG signals, thereby improving the accuracy and efficiency of signal processing. Specifically, the AMTCN block makes full use of the time-varying power characteristics of EEG signals, enabling TCN to adaptively scale to capture key information in different tasks, effectively meeting the needs of multi-task recognition and enhancing overall generalization.

[0092] 3. The present invention uses equidistant azimuth projection technology to successfully obtain three-dimensional space tensor data. In order to cope with the challenges of gradient vanishing and overfitting that may occur in the deep convolution process, the present invention uses deep spatial convolution blocks with residual connections, which significantly improves the stability and generalization ability of the model. Furthermore, by using spatial attention, different weights are given to channels and spatial dimensions, respectively, greatly enhancing the ability to capture spatial information. The present invention can fully mine and utilize the potential information contained in fNIRS data, providing strong technical support for more accurate data analysis and processing.

[0093] 4. The present invention adopts a parallel dual-branch structure design, aiming to simultaneously capture the temporal dynamic changes in EEG signals and the spatial activity patterns of fNIRS; in order to achieve the final classification performance, a decision fusion strategy is adopted, which shows excellent performance when performing multiple tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 Schematic diagram of the process of the dual-modal signal fusion method based on the adaptive spatiotemporal convolutional attention network of the present invention, wherein is the weight of the EEG time branch, is the weight of the fNIRS spatial branch;

[0095] Figure 2 This is a network structure diagram of the convolution block of the present invention;

[0096] Figure 3 It is a schematic diagram of the process of the adaptive multi-scale temporal convolutional network of the present invention;

[0097] Figure 4 This is a network structure diagram of the attention block of the temporal convolutional network of the present invention;

[0098] Figure 5 A network structure diagram of a deep spatial convolutional network with residual connections according to the present invention;

[0099] Figure 6 A network structure diagram of the spatial attention implemented in the present invention. DETAILED DESCRIPTION

[0100] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0101] Example 1

[0102] This embodiment provides a dual-modal signal fusion method based on an adaptive spatiotemporal convolutional attention network. This embodiment explores the application of convolutional networks and attention mechanisms in EEG and fNIRS in response to the needs of brain cognitive multimodal multi-task recognition and deep learning big data; among them, the adaptive multi-scale temporal convolutional network can dynamically adjust three different scales to capture the time information in the EEG signal to adapt to the generalization in a cross-task environment. Figure 1 , which specifically includes the following:

[0103] Step S1, collecting raw data of target EEG activity based on EEG acquisition equipment, and preprocessing the raw data to obtain processed EEG signals, which specifically includes the following sub-steps:

[0104] Step S11, using an EEG acquisition device to continuously monitor the change in the target brain electrical activity, and acquiring the original EEG data of the target brain electrical activity;

[0105] Step S12: filter, perform the first segmentation, baseline correction and the second segmentation on the raw EEG data to obtain the processed EEG signal. .

[0106] This step can obtain normalized EEG signals with high signal-to-noise ratio, sufficient training volume and meeting the requirements of classification tasks. data, thereby effectively improving the performance of the classification model.

[0107] Step S2: perform two-dimensional convolution operations on the processed EEG signal, and perform convolution-based sliding window processing on the EEG signal after the two-dimensional convolution operations in the time dimension to obtain multiple narrow time series. Figure 2 , which specifically includes the following sub-steps:

[0108] Step S21: Processing the EEG signal Perform the first two-dimensional convolution operation:

[0109]

[0110] in, EEG Middle The convolution result of elements; EEG Elements in is the convolution kernel elements; A is the length of the first dimension of the convolution kernel in the first two-dimensional convolution operation; They are the row index and column index of the convolution kernel in the first convolution operation respectively; are the row index and column index of the current signal respectively;

[0111] Step S22: EEG signal Middle The convolution result of elements Perform a second two-dimensional convolution operation:

[0112]

[0113] in, for Middle The convolution result of elements; is the convolution kernel elements; They are the row index and column index of the convolution kernel in the second two-dimensional convolution operation respectively; They are the sizes of the first dimension and the second dimension of the convolution kernel in the second two-dimensional convolution operation respectively;

[0114] Step S23: Perform convolution-based sliding window processing on the convolution result after the convolution operation in the time dimension:

[0115]

[0116]

[0117] in, is the end time point; for The length of the original time series data; is the number of narrow time series; is the starting time point of a narrow time series; is the length of a narrow time series; The original time series data is captured as , to obtain multiple narrow time series .

[0118] In this embodiment, the number of narrow time series in the convolution-based sliding window operation is specified as 7.

[0119] This step S2 aims to extract global spatial information from the original EEG data, moderately increase the network depth, and expand the amount of data training, which can improve the accuracy of the network model in the classification of dual-modal brain cognitive tasks.

[0120] Step S3, combining an adaptive multi-scale temporal convolutional network and a temporal attention mechanism to extract temporal features from multiple narrow time series; this embodiment proposes an adaptive multi-scale temporal convolutional network to automatically select the kernel size of multiple temporal convolutional networks (TCNs) to improve the accuracy and adaptability in cross-task scenarios, and combines the temporal attention mechanism to capture the important temporal features of the EEG signal. Figure 3 , which specifically includes the following sub-steps:

[0121] Step S31: Calculate the narrow time series of S trials The latency of the time-varying power is calculated using the short-time Fourier transform (STFT) The time-varying power of

[0122]

[0123] in, is the time-varying power of the Sth trial, tm is the time index, and pw is the frequency index; For the A narrow time series; is the Hanning window function; is the index of the narrow sample sequence; is the complex exponential term used for Fourier transform; according to the spectrum analysis results, the latency in the narrow time series is calculated, that is, the duration from the start of the experiment to the beginning of the peak;

[0124] Step S32: Select the minimum, mode and maximum values ​​of the latency in S trials as the kernel scales of the three groups of TCN blocks, and the kernel sizes are recorded as , and :

[0125]

[0126]

[0127]

[0128] Among them, min, mode, and max represent the minimum, mode, and maximum values ​​of the latency, respectively; Latency[] represents the latency calculation operation of S trials; is the time-varying power of the first trial; is the time-varying power of the Sth trial;

[0129] Step S33: each narrow time series They are input into three groups of TCN blocks with different kernel scales, and output EEG temporal features of different scales;

[0130] refer to Figure 4 ,The TCN block of this embodiment consists of two TCN residual blocks, each TCN residual block combines two dilated causal convolutional layers and residual connections, and each dilated causal convolutional layer is followed by a batch normalization and ELU activation function;

[0131] Among them, the receptive field size RFS of the TCN block is calculated as:

[0132]

[0133] in, is the convolution kernel size of the TCN residual block, is the number of residual blocks;

[0134] The formula for the residual connection is:

[0135]

[0136] in, is the residual mapping; is the output of the residual block;

[0137] The formula for batch normalization and ELU activation function is:

[0138]

[0139] in, is the result after batch normalization; For the The characteristics of the dimension; μ is The mean value in the current batch; for The standard deviation in the current batch; is a constant; and are the learnable scaling factor and offset parameters, respectively.

[0140]

[0141] in, is the result after being processed by the ELU activation function; is a positive number, usually 1; for The index of

[0142] Step S34: Input the output results of each group of the second TCN residual block, i.e., the EEG time features of different scales, into the TA block, adaptively obtain the global time information of each channel in the TA block, and output three groups of refined EEG time features:

[0143]

[0144] in, For the The output result of group TA block; For the The output results of the group TCN block; is the global average pooling function; It is a one-dimensional convolutional network; is the Sigmoid activation function; TA block is the time attention block, which is the abbreviation of Time Attention.

[0145] Among them, the global average pooling (GAP) is defined as:

[0146]

[0147] In the formula, is the length of a narrow time series; is the index of the narrow time series;

[0148] In one-dimensional convolution ( ), the convolution kernel How to calculate the size:

[0149]

[0150] in, For input The number of channels, and Determined by the trainable parameters, Round down to the nearest odd number.

[0151] Step S35: splicing the three groups of refined EEG time features output:

[0152]

[0153] in, It is the splicing result of three groups of TA blocks; is the matrix connection operation; , , These are the output results of the 1st, 2nd, and 3rd groups of TA blocks, respectively;

[0154] Step S36: multiple narrow time series The corresponding output multiple refined EEG time features are spliced:

[0155]

[0156] in, for The splicing result of the output of narrow time series; For the The output of a narrow time series after temporal attention, is the number of narrow time series.

[0157] This step S3 can make full use of the time-varying power characteristics of EEG data, enabling the network to adaptively capture EEG information and selectively focus on key time features in EEG data, effectively improving the classification accuracy of brain cognitive tasks and enhancing the generalization of the model.

[0158] Step S4: Input the extracted time features into the classification layer of the multi-layer perceptron to obtain the classification results of the brain cognitive tasks of the time branch of the EEG data. The classification results are expressed as:

[0159]

[0160] in, The classification probability of the brain cognitive task of the EEG time branch output by the classification layer of the multi-layer perceptron; is the weight matrix; is bias; is the normalized exponential function;

[0161] Step S5: collecting the near-infrared light intensity variation of the target brain tissue based on the fNIRS acquisition device, and processing the near-infrared light intensity variation to obtain the processed oxygenated hemoglobin concentration variation and deoxygenated hemoglobin concentration variation, which specifically includes the following contents:

[0162] Step S51, using fNIRS acquisition equipment to continuously measure the change in near-infrared light intensity absorbed or scattered by the target brain tissue;

[0163] Step S52: Use the modified Beer-Lambert law to convert the near-infrared light intensity change into the oxygenated hemoglobin concentration change and the deoxygenated hemoglobin concentration change:

[0164]

[0165] in, and are the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; ∆HbO and ∆HbR are the changes in the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; is the differential path length factor; is the distance between the light source and the detector; and For different wavelengths of light; and are the extinction coefficients of the two chromophores HbO and HbR, and Respectively and Changes in optical density;

[0166] Step S53: filtering, first segmenting, baseline correction and second segmenting the oxygenated hemoglobin concentration change amount and the deoxygenated hemoglobin concentration change amount to obtain processed oxygenated hemoglobin concentration change amounts respectively. and the change in deoxyhemoglobin concentration after treatment .

[0167] Step S6, using equidistant azimuthal projection to convert the processed oxygenated hemoglobin concentration change amount and deoxygenated hemoglobin concentration change amount from a one-dimensional time series into a three-dimensional space tensor, and reducing the dimension of the three-dimensional space tensor in the time dimension through a pooling operation, which specifically includes the following sub-steps:

[0168] Step S61: Select the change in oxygenated hemoglobin concentration after processing Or the change in deoxyhemoglobin concentration after treatment The center point of the path between all light sources and detectors is used as the reference point;

[0169]

[0170] in, is a reference point; , , Respectively represent the x, y, and z coordinates of the reference point; , , Respectively represent the changes in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment No. The x, y, z coordinates of each channel; represents the number of channels of the fNIRS acquisition device;

[0171] Step S62: Calculate the change in oxygenated hemoglobin concentration after processing Or the change in deoxyhemoglobin concentration after treatment The Euclidean distance between any channel and the reference point :

[0172]

[0173] Step S63: Calculate the change in oxygenated hemoglobin concentration after processing Or the change in deoxyhemoglobin concentration after treatment The position of each channel in two-dimensional coordinates:

[0174]

[0175]

[0176] in, , Respectively The position of each channel in x and y coordinates; is the cosine function; is the inverse tangent function; is a sine function; is the ratio of pi;

[0177] Step S64: Calculate the change in oxygenated hemoglobin concentration after processing Or the change in deoxyhemoglobin concentration after treatment Each channel in The position of the two-dimensional space matrix:

[0178]

[0179]

[0180] in, , Respectively The column and row positions of the channels in the two-dimensional space matrix; The size of the two-dimensional matrix representing the mapping, represents the minimum function, represents the maximum value function;

[0181] Step S65: The processed oxygenated hemoglobin concentration change is calculated according to the time dimension. Or the change in deoxyhemoglobin concentration after treatment The two-dimensional space matrices are stacked into three-dimensional space tensors and ;

[0182] Step S66: convert the three-dimensional space tensor and Through the time pooling block, the dimensionality reduction is performed on the time dimension, and the three-dimensional space tensors after dimensionality reduction are obtained respectively. and .

[0183] This step S6 not only preserves the spatial structural information of the data, but also allows the feature extraction algorithm to analyze the spatial distribution and pattern of brain activity in a more intuitive way, while also reducing the computational complexity of the fNIRS branch.

[0184] Step S7, combining deep spatial convolution and spatial attention mechanism to extract key spatial features in the three-dimensional spatial tensor after dimensionality reduction, which specifically includes the following sub-steps:

[0185] Step S71: The three-dimensional space tensor after dimensionality reduction and Stacked together to get fusion features ;

[0186] Step S72: Fusion features Divide it into M branches according to the size of the time dimension, record the The fusion feature of each branch is ;

[0187] Step S73: merge the branches of each branch Input into the deep spatial convolutional network, and output the spatial features ;

[0188] refer to Figure 5, the deep spatial convolutional network of this embodiment includes a residual connection mechanism of a 3D convolutional block, and three convolutional blocks are set. The number of filters of the three convolutional blocks is 32, 64 and 128 respectively, and the dimension size is (3, 3). The number of filters of a convolutional block on the residual connection is 128, and the dimension size is (7, 7);

[0189] Each convolutional block in the deep spatial convolutional network is used Processing is:

[0190]

[0191] in, For the The fusion characteristics of the branches; For the The output of the deep spatial convolutional network in the fusion features of the branches; , , The position index of the first, second and third dimensions of the fusion feature; is the size of the convolution kernel in the deep spatial convolutional network, , , They are the lengths of the first, second, and third dimensions of the convolution kernel in the deep spatial convolutional network, respectively; is the convolution kernel in the deep spatial convolutional network. elements;

[0192] Step S74: spatial features Input to the spatial attention block to obtain key spatial features .

[0193] As a preferred embodiment of this embodiment, refer to Figure 6 , step S74 specifically includes the following sub-steps:

[0194] Step S741: Input the output result of the deep spatial convolutional network into the channel attention module to obtain the weight feature based on channel allocation. :

[0195]

[0196] in, is the Sigmoid activation function; MLP is the multi-layer perceptron; MaxPool is the maximum pooling; AvgPool is the average pooling; is the output result of the deep spatial convolutional network;

[0197] Step S742: weight feature Input into the spatial attention module to obtain weight features based on spatial distribution :

[0198]

[0199] Among them, the weight feature based on spatial allocation That is the key spatial feature; is a two-dimensional convolutional network, It is a concatenated map of maximum pooling and average pooling based on convolution channels.

[0200] In this step S7, residual connections are introduced as an effective strategy to solve the gradient vanishing and gradient exploding problems often encountered in deep network training. At the same time, the spatial attention allocation mechanism assigns different weights to channels and spatial dimensions, significantly enhancing the model's ability to capture spatial information. This mechanism can more comprehensively and deeply explore and utilize the potential information embedded in fNIRS data, thereby improving the overall performance.

[0201] Step S8, input the extracted key spatial features into the multi-layer perceptron classification layer to obtain the classification results of the brain cognitive task of the fNIRS spatial branch. The classification results of the multi-layer perceptron classification layer are expressed as:

[0202]

[0203] in, The classification probability of the brain cognitive task of the fNIRS spatial branch output by the classification layer of the multi-layer perceptron; is the weight matrix; is bias; is the normalized exponential function.

[0204] Step S9: adopt a decision fusion strategy to fuse the classification results of the brain cognitive task of the time branch of the EEG data and the classification results of the brain cognitive task of the space branch of the fNIRS data to obtain the classification results of the target brain cognitive task:

[0205]

[0206] in, is the classification probability of brain cognitive tasks with fused parallel dual branches; N is the number of modal branches; are the weights of different modal branches.

[0207] Among them, the objective function of the bimodal signal fusion method, that is, the decision fusion strategy, is the cross entropy loss function:

[0208]

[0209] in, is the loss function result; Sample data for brain cognitive tasks The true label value of It is a sample of brain cognitive task data; The predicted label value of is the total number of samples.

[0210] Although the specific implementation of the invention is described in detail in conjunction with the drawings, it should not be understood as limiting the scope of protection of this patent. Within the scope described in the claims, various modifications and variations that can be made by those skilled in the art without creative work still fall within the scope of protection of this patent.

Claims

1. A bimodal signal fusion method based on adaptive spatiotemporal convolutional attention network, characterized in that: The following steps are involved: S1. Collecting the raw data of the target EEG activity based on the EEG acquisition device, and preprocessing the raw data to obtain the processed EEG signal; S2, performing two-dimensional convolution operations on the processed EEG signal, and performing convolution-based sliding window processing on the EEG signal after the two-dimensional convolution operations in the time dimension to obtain multiple narrow time series; S3, combining adaptive multi-scale temporal convolutional network and temporal attention mechanism to extract temporal features from multiple narrow time series; S4, inputting the extracted time features into the classification layer of the multi-layer perceptron to obtain the classification results of the brain cognitive task of the time branch of the EEG data; S5, collecting the change in near-infrared light intensity of the target brain tissue based on the fNIRS acquisition device, and processing the change in near-infrared light intensity to obtain the processed change in oxygenated hemoglobin concentration and deoxygenated hemoglobin concentration; S6, using equidistant azimuth projection to convert the processed oxygenated hemoglobin concentration change and deoxygenated hemoglobin concentration change from a one-dimensional time series into a three-dimensional space tensor, and reducing the dimension of the three-dimensional space tensor in the time dimension through a pooling operation; S7, combining deep spatial convolution and spatial attention mechanism to extract key spatial features in the 3D spatial tensor after dimensionality reduction; S8, input the extracted key spatial features into the multi-layer perceptron classification layer to obtain the classification results of the brain cognitive task of the fNIRS spatial branch; S9. A decision fusion strategy is used to fuse the classification results of the brain cognitive tasks of the time branch of the EEG data and the classification results of the brain cognitive tasks of the spatial branch of the fNIRS data to obtain the classification results of the target brain cognitive tasks.

2. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S1 specifically includes the following sub-steps: S11, using EEG acquisition equipment to continuously monitor the change in the target's brain electrical activity, and acquiring the original EEG data of the target's brain electrical activity; S12, filtering, first segmentation, baseline correction and second segmentation processing are performed on the raw EEG data to obtain the processed EEG signal .

3. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S2 specifically includes the following sub-steps: S21. Processed EEG signal Perform the first two-dimensional convolution operation: in, EEG Middle The convolution result of elements; EEG Elements in is the convolution kernel elements; A is the length of the first dimension of the convolution kernel in the first two-dimensional convolution operation; They are the row index and column index of the convolution kernel in the first convolution operation respectively; are the row index and column index of the current signal respectively; S22. EEG signals Middle The convolution result of elements Perform a second two-dimensional convolution operation: in, for Middle The convolution result of elements; is the convolution kernel elements; They are the row index and column index of the convolution kernel in the second two-dimensional convolution operation respectively; They are the sizes of the first dimension and the second dimension of the convolution kernel in the second two-dimensional convolution operation respectively; S23. Perform convolution-based sliding window processing on the convolution result after the convolution operation in the time dimension: in, is the end time point; for The length of the original time series data; is the number of narrow time series; is the starting time point of a narrow time series; is the length of a narrow time series; The original time series data is captured as , to obtain multiple narrow time series .

4. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S3 specifically includes the following sub-steps: S31. Calculate the narrow time series of S trials The latency of the time-varying power: in, is the time-varying power of the Sth trial, tm is the time index, and pw is the frequency index; For the A narrow time series; is the Hanning window function; is the index of the narrow sample sequence; is the complex exponential term used for Fourier transform; S32, select the minimum, mode and maximum values ​​of the latency in S trials as the kernel scales of the three groups of TCN blocks; S33, each narrow time series They are input into three groups of TCN blocks with different kernel scales, and output EEG temporal features of different scales; S34, inputting EEG time features of different scales into the TA block, adaptively acquiring the global time information of each channel in the TA block, and outputting three sets of refined EEG time features: in, For the The output result of group TA block; For the The output results of the group TCN block; is the global average pooling function; It is a one-dimensional convolutional network; is the Sigmoid activation function; S35, splicing the three groups of refined EEG time features output: in, It is the splicing result of three groups of TA blocks; is the matrix connection operation; , , These are the output results of the 1st, 2nd and 3rd groups of TA blocks respectively; S36, multiple narrow time series The corresponding output multiple refined EEG time features are spliced: in, for The stitching result of the narrow time series output; For the The output of a narrow time series after temporal attention, is the number of narrow time series.

5. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S5 specifically includes the following sub-steps: S51, using fNIRS acquisition equipment to continuously measure the change in near-infrared light intensity absorbed or scattered by the target brain tissue; S52. Use the modified Beer-Lambert law to convert the near-infrared light intensity change into the oxygenated hemoglobin concentration change and the deoxygenated hemoglobin concentration change: in, and are the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; ∆HbO and ∆HbR are the changes in the concentration of oxygenated hemoglobin and the concentration of deoxygenated hemoglobin, respectively; is the differential path length factor; is the distance between the light source and the detector; and For different wavelengths of light; and are the extinction coefficients of the two chromophores HbO and HbR, and Respectively and Changes in optical density; S53, filtering, first segmentation, baseline correction and second segmentation operations are performed on the oxygenated hemoglobin concentration change amount and the deoxygenated hemoglobin concentration change amount, respectively obtaining the processed oxygenated hemoglobin concentration change amount and the change in deoxyhemoglobin concentration after treatment .

6. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S6 specifically includes the following sub-steps: S61, select the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The center point of the path between all light sources and detectors is used as the reference point; in, is a reference point; , , Respectively represent the x, y, and z coordinates of the reference point; , , Respectively represent the changes in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment No. The x, y, z coordinates of each channel; represents the number of channels of the fNIRS acquisition device; S62. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The Euclidean distance between any channel and the reference point : S63. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment The position of each channel in two-dimensional coordinates: in, , Respectively The position of each channel in x and y coordinates; is the cosine function; is the inverse tangent function; is a sine function; is pi; S64. Calculate the change in oxygenated hemoglobin concentration after treatment Or the change in deoxyhemoglobin concentration after treatment Each channel in The position of the two-dimensional space matrix: in, , Respectively The column and row positions of the channels in the two-dimensional space matrix; The size of the two-dimensional matrix representing the mapping, represents the minimum function, represents the maximum value function; S65. According to the time dimension, the change in the concentration of oxygenated hemoglobin after treatment is calculated. Or the change in deoxyhemoglobin concentration after treatment The two-dimensional space matrices are stacked into three-dimensional space tensors and ; S66, the three-dimensional space tensor and Through the time pooling block, the dimensionality reduction is performed on the time dimension, and the three-dimensional space tensors after dimensionality reduction are obtained respectively. and .

7. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The S7 specifically includes the following sub-steps: S71. Reduce the dimension of the three-dimensional space tensor and Stacked together to get fusion features ; S72, fusion features Divide it into M branches according to the size of the time dimension, record the The fusion feature of each branch is ; S73, merge each branch Input into the deep spatial convolutional network, and output the spatial features : in, For the The output of the deep spatial convolutional network in the fusion features of the branches; , , The position index of the first, second and third dimensions of the fusion feature; is the size of the convolution kernel in the deep spatial convolutional network, , , They are the lengths of the first, second, and third dimensions of the convolution kernel in the deep spatial convolutional network, respectively; is the convolution kernel in the deep spatial convolutional network. elements; S74, spatial features Input to the spatial attention block to obtain key spatial features .

8. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 7, characterized in that: The S74 specifically includes the following sub-steps: S741. Input the output of the deep spatial convolutional network into the channel attention module to obtain the weight feature based on channel allocation. : in, is the Sigmoid activation function; MLP is the multi-layer perceptron; MaxPool is the maximum pooling; AvgPool is the average pooling; is the output result of the deep spatial convolutional network; S742, weight feature Input into the spatial attention module to obtain weight features based on spatial distribution : Among them, the weight feature based on spatial allocation That is the key spatial feature; is a two-dimensional convolutional network, It is a concatenated map of maximum pooling and average pooling based on convolution channels.

9. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 1, characterized in that: The classification results of the multi-layer perceptron classification layers in S4 and S8 are expressed as: in, The classification probability of the brain cognitive task of the independent branch output by the classification layer of the multi-layer perceptron is the classification probability of the EEG time branch or the fNIRS space branch; is the weight matrix; is bias; is the processed feature output, which is The stitching result of narrow time series output or key spatial features ; is the normalized exponential function.

10. The method for bimodal signal fusion based on adaptive spatiotemporal convolutional attention network according to claim 9, characterized in that: In S9, a decision fusion strategy is used to fuse the classification results of the brain cognitive task of the time branch of the EEG data and the classification results of the brain cognitive task of the space branch of the fNIRS data to obtain the classification results of the target brain cognitive task, including: in, is the classification probability of brain cognitive tasks with fused parallel dual branches; N is the number of modal branches; are the weights of different modal branches.

Citation Information

Patent Citations

  • Fatigue classification method based on four-dimensional attention convolutional recurrent neural network

    CN114781442A

  • Motion imagination electroencephalogram decoding method based on MSFF-SENet

    CN116662782A

  • Object state determination method, deep learning model training method and electronic equipment

    CN117716356A