A Data Representation Method Based on Electroencephalogram (EEG) Signals

By processing EEG signals using a cross-differential self-attention adjacency matrix and a one-dimensional sequential convolution module, the problem of EEG signal feature extraction and interpretability under limited computing resources is solved, achieving efficient feature extraction and interpretable analysis.

CN119326419BActive Publication Date: 2025-11-14FUDAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411175537.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-11-14
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively distinguish and interpret information from EEG signals when computational resources are limited. Feature extraction and model training are challenging, especially when dealing with diverse EEG signals.

Method used

We employ a cross-differential self-attention adjacency matrix and a one-dimensional sequential convolution module to preprocess and extract features from EEG signals. Through node aggregation operations, we represent the matrix as a one-dimensional vector and then use the reduced-dimensional dataset for analysis.

Benefits of technology

It improves computational efficiency and interpretability, reduces computational resource requirements, is suitable for processing EEG signals, extracts local and sequential features, and reduces computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119326419B_ABST
    Figure CN119326419B_ABST
Patent Text Reader

Abstract

A method for representing analytical data based on electroencephalogram (EEG) signals involves acquiring the EEG signals of a single target object and representing them as usable analytical data. Step S1 involves preprocessing the EEG signals to obtain preprocessed EEG signal data. Step S2 involves constructing a cross-difference self-attention adjacency matrix o based on the preprocessed EEG signal data. Step S3 involves representing the cross-difference self-attention adjacency matrix o as a one-dimensional vector through node aggregation, extracting features from the one-dimensional vector through a one-dimensional sequential convolution module, and representing these features as a feature one-dimensional vector, resulting in a dimensionality-reduced data set Z containing all feature one-dimensional vectors. all Step S4, reduce the dimensionality of the dataset Z. all The data is organized and output; this invention balances computational efficiency and interpretability through a cross-difference self-attention adjacency matrix, providing a prerequisite for convenient subsequent applications of the analyzed data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electroencephalogram (EEG) signal analysis, and more particularly to a method for representing analytical data based on EEG signals. Background Technology

[0002] Electroencephalography (EEG) signals are nonlinear electrophysiological signals collected from different regions of the brain. Their waveforms contain complex spectral energy information, and EEG signals placed in different locations receive discharges from different brain regions.

[0003] In recent years, with the rapid advancement of artificial intelligence technology, AI methods have been widely applied in many fields. In some tasks involving the detection of electroencephalogram (EEG) signals, AI methods are needed to effectively distinguish the information represented by EEG signals under limited computing resources. More importantly, it is hoped that the basis for classification can be interpreted so that the correctness of the results analyzed by AI methods can be evaluated.

[0004] To improve the ability to distinguish between different types of EEG signals, it is necessary to combine the frequency characteristics and channel discharge characteristics of different types of EEG signals for feature extraction and model training. Distinguishing the diverse features among numerous EEG signals is very difficult, and it is necessary to analyze the data by combining a large number of features. How to represent and analyze the data is a huge challenge for the design of the method. Summary of the Invention

[0005] The purpose of this invention is to provide a data representation method based on electroencephalogram (EEG) signals, which has the advantages of high computational efficiency and interpretability.

[0006] To achieve the above objectives, this invention provides a method for representing analytical data based on electroencephalogram (EEG) signals. The method involves acquiring the EEG signals of a single target object and representing them as usable analytical data. Step S1 involves preprocessing the EEG signals to obtain preprocessed EEG signal data. Step S2 involves constructing a cross-difference self-attention adjacency matrix O based on the preprocessed EEG signal data. Step S3 involves representing the cross-difference self-attention adjacency matrix O as a one-dimensional vector through node aggregation operations, extracting features from the one-dimensional vector through a one-dimensional sequential convolution module, and representing these features as a feature one-dimensional vector, resulting in a dimensionality-reduced data set Z containing all feature one-dimensional vectors. all Step S4, reduce the dimensionality of the data set Z. all Organize the data into analytical data and output it.

[0007] Preferably, the electroencephalogram (EEG) signal includes A EEG channels X i i = 1, 2...A; Single EEG channel X i Each contains B signal points S (i,b)b = 1, 2...B, a single EEG channel X i ={S (i,1) S (i ,2)……S (i,B)}, S (i,b) This represents the b-th signal point of the i-th EEG channel.

[0008] Preferably, step S1 includes: step S11, segmenting the signal points of each EEG channel to obtain the signal points of each EEG channel X. i The corresponding set of EEG channel signal fragments X i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y)}, y = 1, 2, ..., Y; where, D (i,y) X represents the set of signal segments from the i-th EEG channel. i The signal segment of the y-th EEG channel within (partition) is used to obtain X1 (partition) ~ X A (partition); Step S12, process the EEG channel signal fragment set X one by one. i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) Perform time-frequency transformation to obtain the set G of EEG channel signal segments represented in the corresponding frequency domain. i G i ={F (i,1) , ...F (i,y) ...F (i,Y)}, F (i,y) In step S13, the y-th EEG information segment is represented within the set of EEG channel signal segments represented by the frequency domain information; G1~G2 represents all sets of EEG channel signal segments represented by the frequency domain information. A The complete EEG information fragments F are obtained by performing one-dimensional arrangement. a1l ={F (1,1) ~F (1,Y) ~F (A,1) ~F (A,Y)}; and for all EEG information fragments F all One-dimensional vectorization is performed to obtain a one-dimensional vector set H = {f} of EEG signals. (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y)}; where f (i,y) Let y be the one-dimensional vector representation of the y-th EEG information segment within the set of signal segments of the i-th EEG channel under frequency domain information representation.

[0009] Preferably, in step S12, the time-frequency transformation employs a Fourier transform:

[0010]

[0011] Among them, F (i,y) Xi represents the y-th EEG information segment within the set of signal segments of the i-th EEG channel in the frequency domain representation; Xi{(partition), S(i, b)} represents the signal value of the b-th signal point within the set of signal segments of the i-th EEG channel; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the y-th EEG information segment within the set of signal segments of the i-th EEG channel.

[0012] Preferably, step S2 includes: step S21, constructing the Hadamard product I0 of the one-dimensional vector H of the EEG signal:

[0013] I0 = [w (1,1) f (1,1) w (1,2) f (1,2) ...w (a,1) f (A,1) ...w (a,Y) f (A,Y) ]

[0014] Among them, W (i , y) f (i,y) The corresponding learnable parameter, I0, is a one-dimensional matrix; step S22, construct the cross-difference self-attention adjacency matrix O based on the Hadamard product I0.

[0015] Preferably, step S22 includes:

[0016]

[0017]

[0018]

[0019] Here, I1 and I2 represent intermediate operation matrices.

[0020] Preferably, step S3 includes: step S31, performing node aggregation operation on the cross-differential self-attention adjacency matrix O to obtain a one-dimensional vector I3;

[0021] I3 = W2O

[0022] Where W2 is a learnable parameter of the cross-difference self-attention adjacency matrix O; in step S32, the one-dimensional vector I3 of the matrix is ​​input into the one-dimensional sequential convolution module to extract features, and the features are represented by one-dimensional vectors to obtain the corresponding feature one-dimensional vectors, thereby obtaining the dimensionality-reduced data set Z. all The dimensionality reduction dataset Z all It contains a one-dimensional vector of all features.

[0023] Preferably, the one-dimensional sequential convolution module sequentially includes: a one-dimensional sequential convolution layer, used to extract features from the one-dimensional vector I3 of the matrix; a pooling layer, which receives data from the one-dimensional sequential convolution layer and is used to optimize the features extracted by the one-dimensional sequential convolution layer; and a fully connected layer, which receives data from the pooling layer and is used to represent all the optimized data in the pooling layer as a one-dimensional vector representation.

[0024] Preferably, step S32 includes:

[0025] Step S321: The one-dimensional sequential convolutional layer receives a matrix and a one-dimensional vector I3, and performs a convolution operation on it to obtain a set of convolution output values ​​I4 = {I... 4,1 ~I 4,J}, and then pass I4 to the pooling layer;

[0026]

[0027] Where l is the length of the convolutional kernel in the one-dimensional sequential convolutional layer, the length l of the convolutional kernel must be greater than 1, there are J convolutional kernels in total, j = 1...J, J≥2; 4,j In a one-dimensional sequential convolutional layer, w is the output value obtained by convolving the one-dimensional vector formed by aggregating the nodes of the cross-difference self-attention adjacency matrix corresponding to the j-th convolutional kernel; 3,j is the learnable parameter corresponding to the j-th convolution kernel; bias is the bias parameter; ReLU is the activation function; in step S322, the pooling layer receives the set of convolution operation output values ​​I4 of the one-dimensional sequential convolution layer, performs max pooling on it to obtain pooled data I5, and performs vector stretching operation on the pooled data I5 to flatten it into a one-dimensional vector to obtain flattened data I6, and transmits the flattened data I6 to the fully connected layer;

[0028] I 5,j =max(I 4,j )

[0029] I6 = Vector stretch{I 5,1 ,I 5,2 ,…,I 5,J}={I 6,1 ,I 6,2,…,I 6,J}

[0030] Where max is the pooling function; Vectorstretch represents the vector stretching function; I 5,j The pooled representation of the output value after convolution operation on the one-dimensional vector formed by aggregating the nodes of the cross-differential self-attention adjacency matrix corresponding to the j-th convolution kernel; I 6,j This represents the result of the pooling of the output value after convolution of the one-dimensional vector aggregated from the cross-differential self-attention adjacency matrix nodes corresponding to the j-th convolution kernel; Step S323, the fully connected layer receives the flattened data I6={I 6,1 ,I 6,2 ,…,I 6,J The data is then subjected to dimensionality reduction optimization and represented as a one-dimensional vector to obtain the dimensionality-reduced data set Z. all ={Z1~Z J}, where Z j Let Z represent the j-th feature as a one-dimensional vector, and let Z be the dimensionality-reduced data set. all It contains a one-dimensional vector of all features.

[0031] Preferably, if there are K different EEG signals, k = 1, 2...K;

[0032] Step S3 also includes:

[0033] Z all,k =σ(w 4,k ·I 6(k) +bias)

[0034] We obtain a total of K flattened data points, I 6(k) w represents the k-th flattened data. 4,k Z represents the learning parameters corresponding to the k-th flattened data, σ represents the dimensionality reduction function, bias represents the bias parameter, and Z represents the learning parameters. all , k Let Z represent the k-th dimensionality-reduced dataset; this yields the dimensionality-reduced dataset Z of all K EEG signals. all,1 ~Z all,K .

[0035] In summary, compared with the prior art, the data representation method based on electroencephalogram (EEG) signals provided by this invention has the following beneficial effects:

[0036] First, the cross-difference self-attention adjacency matrix balances computational efficiency and interpretability.

[0037] Second, by adopting the cross-differential self-attention method, the number of computational parameters is reduced, the computational overhead during training and inference is decreased, the dependence on computing resources is less, and there is no need to purchase expensive large servers to run it.

[0038] Third, by using convolution to extract features from data such as cross-differential self-attention adjacency matrices, not only can local features be extracted, but also sequential features that are not included in traditional structures can be effectively extracted, making it more suitable for processing EEG signals than traditional graph neural networks. Attached Figure Description

[0039] Figure 1 This is a flowchart of the present invention.

[0040] Figure 2 This describes the specific computation process of the cross-difference self-attention adjacency matrix in this invention. Detailed Implementation

[0041] The following will be combined with the appendix in the embodiments of the present invention. Figure 1 ~Attached Figure 2 The technical solutions, structural features, objectives and effects achieved in the embodiments of the present invention will be described in detail.

[0042] It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions. They are only used to facilitate and clarify the purpose of illustrating the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationship, or adjustments to the size should still fall within the scope of the technical content disclosed in the present invention, provided that they do not affect the effects and objectives that the present invention can produce.

[0043] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only the expressly listed elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0044] This invention provides a method for representing analytical data based on electroencephalogram (EEG) signals. By acquiring the EEG signals of a single target object, the EEG signals are represented as usable analytical data; as mentioned above, the analytical data is convenient for subsequent use.

[0045] The electroencephalogram (EEG) signal is represented by A EEG channels X. i , i=1, 2...A, that is, X1~X A Single EEG channel X iEach contains B signal points S (i,b) b = 1, 2...B, that is, a single EEG channel X i ={S (i,1) S (i,2) ...S (i,B)}, S (i,b) This represents the b-th signal point of the i-th EEG channel.

[0046] It is also important to emphasize here that, as described in the background section, EEG signals may be transmitted through multiple transmission media, or undergo coupling processing during transmission, resulting in varying numbers of EEG channels X. i However, the number of signal points in any two EEG channels in the obtained EEG signal is always consistent, always containing B signal points.

[0047] In addition, regarding the methods for acquiring EEG signals, invasive techniques, extracellular recording, tetragonometers and multi-electrode arrays, cortical electroencephalography, etc., can be used. There are no restrictions on these methods; the goal is to acquire EEG signals that can be processed.

[0048] Finally, the initial manifestation of the EEG signal (several EEG channels) is time-domain information, which is the relationship between the amplitude variation of the EEG signal (several EEG channels) and time.

[0049] like Figure 1 As shown, the method includes:

[0050] Step S1: Preprocess the EEG signal to obtain preprocessed EEG signal data; the EEG signal preprocessing refers to the process of representing the EEG signal from time domain information to frequency domain information.

[0051] Because the initial manifestations of EEG signals are relatively easy to extract and capture in the time domain, representing the relationship between time and amplitude; while the frequency domain information represents the relationship between the frequency and amplitude of the EEG signal. Compared with the time domain information, the frequency domain information is more conducive to the identification and extraction of the features of relevant signal points in the EEG signal.

[0052] In addition, to obtain better results, when the representation of EEG signals changes from time domain information to frequency domain information, the EEG signals in the frequency domain information representation can be truncated to obtain the EEG signals in the optimal frequency domain information representation, thereby facilitating the calculation in subsequent steps.

[0053] If a truncation is performed here, the aforementioned parameters A, B, etc., need to be relabeled; these are existing technologies, so they will not be described in detail in this case.

[0054] Step S2: Construct a cross-differential self-attention adjacency matrix O based on the preprocessed EEG signal data;

[0055] The aforementioned cross-differential self-attention adjacency matrix is ​​an improved method based on the self-attention mechanism, which is a mechanism that can calculate the weight of the data at each position in a single matrix and can effectively analyze and judge the values ​​in the matrix.

[0056] The reason for using the cross-difference self-attention adjacency matrix is ​​that, in practical applications, the traditional self-attention mechanism includes a Q, K, V structure. Q, K, and V refer to the three input representation vectors used in the self-attention mechanism. Q represents the query vector, K represents the key vector, and V represents the numerical vector. These three vectors are obtained from the original input vector through linear transformation. If the traditional self-attention mechanism is used, at least two matrix multiplication operations are required to obtain the required calculation result. Its computational complexity increases quadratically with the size of the input vector. The number of parameters for generating the Q, K, and V matrices is also enormous, requiring a huge amount of training data to effectively train the model parameters and prevent overfitting.

[0057] The cross-difference self-attention adjacency matrix, while representing relevant information of EEG signals, has relatively low computational complexity and the number of parameters is consistent with the number of elements in the input data. It requires fewer parameters to be trained and is more suitable for labeled data containing only a small number of samples.

[0058] Step S3: The cross-difference self-attention adjacency matrix O is represented as a one-dimensional vector through node aggregation operation. Features in the one-dimensional vector are extracted through a one-dimensional sequential convolution module, and the features in the one-dimensional vector are represented as a feature one-dimensional vector to obtain the dimensionality-reduced data set Z. all The dimensionality reduction dataset Z all It contains a one-dimensional vector of all features.

[0059] In a specific embodiment, the cross-differential self-attention adjacency matrix constructed in step S2 is represented as a one-dimensional vector by performing an aggregation operation on the nodes (wherein, the node aggregation operation is to aggregate the information of adjacent nodes in the graph structure through the edge to the current node, so that the one-dimensional vector can represent the relationship features between nodes and connected edges in the graph structure of the two-dimensional adjacency matrix), and input into the one-dimensional sequential convolution module for feature extraction.

[0060] The one-dimensional sequential convolution module includes a one-dimensional convolution module, a pooling layer, and a fully connected layer. The one-dimensional sequential convolution module extracts features from the matrix one-dimensional vector formed after the cross-differential self-attention adjacency matrix is ​​aggregated at the nodes. Then, all the extracted matrix one-dimensional vectors are processed to obtain the feature one-dimensional vector. The representation of the feature one-dimensional vector can facilitate the generation of analysis data in step S4. For details, please refer to the following description.

[0061] Step S4, reduce the dimensionality of the data set Z all Organize the data into analytical data and output it.

[0062] The data processing here is only for correcting computational problems or fluctuations in the data to ensure the accuracy of the final output analysis data.

[0063] The following is a detailed explanation of steps S1 to S4.

[0064] As mentioned earlier, the data representation of the acquired EEG signals at this time is as follows:

[0065] Includes A EEG channels X i , i=1, 2...A, that is, X1~X A ;

[0066] Single EEG channel X i Each contains B signal points S (i,b) b = 1, 2...B;

[0067] The i-th brainwave channel X i ={S (i,1) S (i,2) ...S (i,b) ...S (i,B) The brainwave channel manifests as time-domain information.

[0068] Step S1 includes:

[0069] Step S11: Segment the signal points of each EEG channel one by one to obtain X for each EEG channel. i The corresponding set of EEG channel signal fragments X i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y)}, y = 1, 2, ..., Y, where D (i,y) X represents the set of signal segments from the i-th EEG channel. i The signal segment of the y-th EEG channel within (partition) is used to obtain X1 (partition) ~ X A (partition).

[0070] Specifically, step S11 only involves connecting a single EEG channel X. i The operation of segmenting the EEG signal into Y EEG channel segments, and each EEG channel X i All were identically segmented into Y EEG channel signal segments.

[0071] Collection of EEG channel signal fragments X i(partition) and the corresponding EEG channel X i Between, because of the set of brainwave channel signal fragments X i (partition) is achieved through the brainwave channel X i The signal points within the two sets are segmented, and no computation occurs. Therefore, the arrangement of signal points and data information within both sets are essentially the same. Thus, the set of EEG channel signal segments X... i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) The signal points in} are still related to the EEG channel X. i The corresponding signal points in the diagram.

[0072] In other words, X is a set of signal segments from a single EEG channel. i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) The number of all signal points in} is equal to the number of brainwave channels X. i The number of all signal points in the array is equal to B.

[0073] Regarding the segmentation method, it can be segmented using an equal number of signal points, so that the number of signal points in each EEG channel signal segment is as consistent as possible; or it can be segmented randomly, or segmented according to actual needs. There are no restrictions here, but each EEG information segment must include at least one signal point, and EEG information segments cannot be left empty.

[0074] Step S12, process the EEG channel signal fragment set X one by one. i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) Perform time-frequency transformation to obtain the set G of EEG channel signal segments represented in the corresponding frequency domain. i G i ={F (i,1) , ...F (i,y) ...F (i,Y)}, F (i,y) This represents the y-th EEG information segment within the set of signal segments of the i-th EEG channel, represented in the frequency domain.

[0075] That is, through the aforementioned steps, X1(partition) to X A(partition) The representation of time-domain information (since only segmentation was performed in step S11, it is still a time-domain representation here) is transformed into a frequency-domain representation, resulting in the set of EEG channel signal segments G1~G1 under all frequency-domain representations. A Among them, F i Let F represent the set of EEG channel signal segments represented by the i-th frequency domain information, and F i Is it with X i The transformation is performed in a one-to-one correspondence between (partition) and (partition).

[0076] Therefore, F in it (i,y) Also with D (i,y) The transformation is performed in a one-to-one correspondence, so the set G of EEG channel signal segments in the transformed frequency domain information representation is... i In this process, there are a total of Y frequency domain information representations of EEG channel signal segments. This means that this step only changes the representation, without changing the number of signal points or the number of EEG channel signal segments. Therefore, the parameters i, y, etc. should be consistent with the above.

[0077] Specifically, this step uses Fourier transform to transform the time-domain information representation into a frequency-domain information representation:

[0078]

[0079] Among them, as mentioned above, F (i,y) Xi represents the y-th EEG information segment within the set of signal segments of the i-th EEG channel in the frequency domain representation; Xi{(partition), S(i, b)} represents the signal value of the b-th signal point within the set of signal segments of the i-th EEG channel; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the y-th EEG information segment within the set of signal segments of the i-th EEG channel.

[0080] By performing Fourier transform operations, the set of EEG channel signal segments corresponding to the frequency domain information representation of each set of EEG channel signal segments is obtained.

[0081] The following example demonstrates the computational process of the first EEG channel:

[0082] The first EEG channel is X1, which contains B signal points, so the first EEG channel X1 = {S (1,1) S (1,2) ...S (1,b) ...S (1,B)};

[0083] Here, the first EEG channel is segmented to obtain a total of Y EEG channel signal segments. These segments are then organized to obtain the set of EEG channel signal segments X1(partition) corresponding to the first EEG channel, X1 = {D}. (1,1) D (1,2) ...D (1,y) ...D (1,Y)}, y = 1, 2, ..., Y;

[0084] X1(partition) is transformed from time-domain information representation to frequency-domain information representation, resulting in the set of signal segments F1 = {F1, F2, ..., F3} of the first EEG channel in the frequency-domain information representation. (1,1) , ...F (1,y) ...F (1,Y)};

[0085] To further illustrate, suppose that in the first set of EEG channel signal segments X1 (partition), the first EEG information segment contains two signal points, namely, D. (1,1) ={S (1,1) S (1,2)};

[0086] Then F (1,1) That is, by using D (1,1) Using the aforementioned formula:

[0087]

[0088] Perform a Fourier transform (where b = 1, 2) to transform D(1, 1), which is the original time-domain representation, into a frequency-domain representation, to obtain F. (1,1) .

[0089] And so on, one by one for D (1,1) ~D (1,y) Processing is then performed to obtain F (1,1) ~F (1,y) That is, G1; similarly, we obtain the set of EEG channel signal segments G1~G1 under all frequency domain information representations. A .

[0090] If, as mentioned above, the set of EEG channel signal segments G1~G1 under all frequency domain information representations is considered... A When truncating, attention should be paid to adaptively adjusting the numbering of the EEG signals under the newly formed frequency domain information representation.

[0091] Step S13: Set G1 to G2 of all EEG channel signal segments represented by frequency domain information. A The complete EEG information fragments F are obtained by performing one-dimensional arrangement. all ={F (1,1) ~F (1,Y) ~F(A,1) ~F (A,Y)}; and for all EEG information fragments F all One-dimensional vectorization is performed to obtain a one-dimensional vector set H = {f} of EEG signals. (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y)}; where f (i,y) Let y be the one-dimensional vector representation of the y-th EEG information segment within the set of signal segments of the i-th EEG channel under frequency domain information representation.

[0092] Here, because step S12 above obtained the set of EEG channel signal segments G1 to G2 represented by all frequency domain information, A Here, the signal fragments of individual EEG channels are processed one by one, forming a set G. i F segment of internal EEG information (i,y) Each signal is represented by a one-dimensional vector to obtain a set of one-dimensional vectors H for the EEG signals.

[0093] Thus, the one-dimensional vector set H of EEG signals is represented as a one-dimensional vector with a total of 1×(A×Y) elements. This configuration of one-dimensional vectors facilitates the subsequent construction of the cross-difference self-attention adjacency matrix, which is also the purpose of preprocessing.

[0094] To further explain, following the example above, F (1,1) As an explanation, F here (1,1) Since it is already a frequency domain information representation, then F (1,1) One-dimensional vectorization yields the corresponding one-dimensional vector f. (1,1) The same principle applies to subsequent iterations; this is equivalent to obtaining a one-dimensional vector set H = {f} of EEG signals. (1,1) f (1,2) ~f (A,1) ~f (A,Y)}, here without a doubt, f (i,y) F (i,y) and D (i,y) They are mutually corresponding, and both have the same and corresponding original signal points.

[0095] Specifically, step S2 involves using the one-dimensional vector set H = {f} of the electroencephalogram (EEG) signals. (1,1) f (1,2) ~f (A,1) ~f (A,Y) Construct a cross-difference self-attention adjacency matrix O.

[0096] Step S2 includes:

[0097] Step S21, construct the Hadamard product I0 of the one-dimensional EEG signal vector H:

[0098] I0 = [w (1,1) f (1,1) w (1,2) f (1,2) ...w (i , y) f (i,y) ...w (A,1) f (A,1) ...w (A,Y) f (A,Y) ]

[0099] Among them, W (i , y) f (i,y) The corresponding learnable parameters; I0 is a one-dimensional matrix;

[0100] The learnable parameters here can be obtained by backpropagating from an existing model and continuously adapting to the final output results corresponding to the data. When the learning parameters take different values, it means that the model attaches different degrees of importance to the EEG channels and corresponding frequencies of each EEG signal, thus providing interpretability for the classification results regarding which one or more channels and frequencies are more relevant to the corresponding data.

[0101] The Hadamard product is a type of matrix operation that multiplies corresponding elements of two vectors to obtain a new vector. The purpose of performing the Hadamard product operation is to enable learnable parameters to correspond one-to-one and to interpret the correlation between different channels, different frequencies, and classification results.

[0102] Step S22: Construct the cross-difference self-attention adjacency matrix O based on the Hadamard product I0;

[0103]

[0104] Here, I1 and I2 represent intermediate operation matrices.

[0105] Specifically, such as Figure 2 As shown, by constructing a cross-differential self-attention adjacency matrix O, the relationship features between different channels and frequencies can be extracted, which is beneficial for interpretable analysis of EEG signal classification.

[0106] The specific construction method of the cross-differential self-attention adjacency matrix o can be processed according to actual needs; this embodiment is only an example.

[0107] Step S3 includes:

[0108] Step S31: Perform node aggregation operation on the cross-differential self-attention adjacency matrix o to obtain a one-dimensional vector after node aggregation of the cross-differential self-attention adjacency matrix, namely the matrix one-dimensional vector I3.

[0109] I3 = W2o

[0110] Where W2 is a learnable parameter of the cross-difference self-attention adjacency matrix o.

[0111] The learnable parameter W2 here is used to characterize the importance of the edges between different nodes, thus providing a feature vector for the one-dimensional vector I3 of the matrix that is closer to the classification result.

[0112] Step S32: Input the one-dimensional vector I3 of the matrix into the one-dimensional sequential convolution module to extract features, and represent the features as one-dimensional vectors to obtain the corresponding one-dimensional feature vectors, thereby obtaining the dimensionality-reduced data set Z. all The dimensionality reduction dataset Z all Features that include all features in a one-dimensional vector.

[0113] Specifically, the one-dimensional sequential convolution module includes, in sequence:

[0114] The one-dimensional sequential convolutional layer is used to extract features from the one-dimensional vector I3 after the aggregation of nodes in the cross-difference self-attention adjacency matrix. These features are one of the important data for obtaining the final result.

[0115] The pooling layer receives data from the one-dimensional sequential convolutional layer; the function of the pooling layer is to optimize the features extracted by the one-dimensional sequential convolutional layer, effectively accelerating the computation speed.

[0116] The fully connected layer receives data from the pooling layer; its function is to represent all the optimized data in the pooling layer as a one-dimensional vector representation (dimensionality reduction) to facilitate subsequent analysis.

[0117] Specifically, step S32 includes:

[0118] Step S321: The one-dimensional sequential convolutional layer receives a matrix and a one-dimensional vector I3, and performs a convolution operation on it to obtain a set of convolution output values ​​I4 = {I... 4,1 ~I 4,J}, and then pass I4 to the pooling layer;

[0119]

[0120] in,

[0121] l is the length of the convolution kernel in the one-dimensional sequential convolutional layer. The length of the convolution kernel must be greater than 1. There are J convolution kernels in total, j = 1...J, J ≥ 2. There cannot be only one convolution kernel.

[0122] I 4,jIn a one-dimensional sequential convolutional layer, the output value is the one-dimensional vector after the aggregation of nodes in the cross-differential self-attention adjacency matrix corresponding to the j-th convolutional kernel is performed by convolution.

[0123] w 3,j is the learnable parameter corresponding to the j-th convolutional kernel; the learnable parameter here is used to learn local features in multiple different one-dimensional vectors, thereby ensuring that the relationship features between adjacent nodes are effectively extracted;

[0124] bias is a bias parameter;

[0125] ReLU is the activation function.

[0126] The purpose of step S321 is to obtain the relationship characteristics between different channels and different frequencies of the EEG signal.

[0127] In step S322, the pooling layer receives the set of convolution operation output values ​​I4 from the one-dimensional sequential convolution layer, performs max pooling on it to obtain pooled data I5, performs vector stretching operation on I5 to flatten it into a one-dimensional vector to obtain flattened data I6, and transmits flattened data I6 to the fully connected layer.

[0128] The purpose of performing maximum pooling is to reduce data redundancy and reduce the amount of data computation.

[0129] The vector stretching operation yields the flattened data I6. This is because stretching stretches the local features extracted by different convolutional kernels to one dimension, which is intended to enable subsequent fully connected layers to effectively extract the local features extracted by different convolutional kernels, thereby obtaining global features.

[0130] Specifically,

[0131] I 5,j =max(I 4,j )

[0132] I6 = Vector stretch{I 5,1 ,I 5,2 ,…,I 5,J}={I 6,1 ,I 6,2 ,…,I 6,J}

[0133] Where max is the pooling function and Vectorstretch represents the vector stretching function;

[0134] The following I 4,1 ~I 4,J As an example, since J convolution kernels are used for the convolution operation, I 4,1 ~I 4,JLet J be the total number of rows and C be the number of columns, as an example;

[0135] So I 4,1 ~I 4,J The total size is J×C. Assuming the pooling size is 1×2 and the pooling step size is 1;

[0136] Therefore, for I 4,1 ~I 4,J Pool each data point individually to obtain the pooled data I5.

[0137] I5={I 5,1 ,I 5,2 ,…,I 5,j}

[0138] Among them, I 5,j The pooled representation of the output value after performing convolution operation on the one-dimensional vector formed by aggregating the nodes of the cross-differential self-attention adjacency matrix corresponding to the j-th convolution kernel.

[0139] After the max pooling layer, the size of the pooled data I5 is By stretching and flattening, and representing it as a one-dimensional vector, the flattened data I6={I 6,1 ,I 6,2 ,…,I 6,J The dimensions of data I6 after flattening are:

[0140] Among them, I 6,j This represents the result of the pooling of the output value of the one-dimensional vector after convolution operation on the node aggregation of the cross-differential self-attention adjacency matrix corresponding to the j-th convolution kernel, which is the result of the vector stretching operation.

[0141] Step S323, the fully connected layer receives the flattened data I6 = {I 6,1 ,I 6,2 ,…,I 6,J The data is then subjected to dimensionality reduction optimization and represented as a one-dimensional vector to obtain the dimensionality-reduced data set Z. all ={Z1~Z J}, where Z j Let Z represent the j-th feature as a one-dimensional vector, and let Z be the dimensionality-reduced data set. all It contains a one-dimensional vector of all features.

[0142] Steps S321 to S323 describe how to obtain the dimensionality-reduced dataset Z. all .

[0143] However, in some embodiments, multiple independent EEG signals may appear. A specific embodiment for this situation is described here.

[0144] Suppose there are K different EEG signals, k = 1, 2, ... K. The difference here means that it is impossible to represent all EEG signals using A EEG channels.

[0145] Therefore, through the aforementioned steps, we will obtain a total of K flattened data points, I. 6(k) w represents the k-th flattened data. 4,k σ represents the learning parameters corresponding to the kth flattened data, σ represents the dimensionality reduction function, and bias represents the bias parameter.

[0146] The aforementioned step S323 should be based on Z. all,k Z represents the dimensionality-reduced data set of the k-th EEG signal, and thus the dimensionality-reduced data set of all K EEG signals is obtained. all,1 ~Z all,K ;

[0147] Z all,k =σ(w 4,k ·I 6(k) +bias)

[0148] Similarly, this data is compared with the aforementioned single dimensionality-reduced dataset Z. all The forms of expression are the same, and they can all be substituted into step S4 for the final calculation.

[0149] Step S4, as described above, will not be repeated here.

[0150] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for representing analytical data based on electroencephalogram (EEG) signals, characterized in that, By acquiring the electroencephalogram (EEG) signals of a single target object, the EEG signals are represented as usable analytical data; Step S1: Preprocess the EEG signals to obtain preprocessed EEG signal data; Step S2: Construct a cross-differential self-attention adjacency matrix O based on the preprocessed EEG signal data; Step S3: Through node aggregation operation, the cross-difference self-attention adjacency matrix O is represented as a one-dimensional vector. Features are extracted from this one-dimensional vector using a one-dimensional sequential convolution module, and these features are represented as feature one-dimensional vectors, resulting in a dimensionality-reduced dataset Z containing all feature one-dimensional vectors. all ; Step S4, reduce the dimensionality of the data set Z all Organize the data into analytical data and output it.

2. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 1, characterized in that, The EEG signal contains A EEG channels X i i = 1, 2, ..., A; Single EEG channel X i Each contains B signal points S (i,b) b = 1, 2...B, a single EEG channel X i ={S (i,1) S (i,2) ...S (i,B) }, S (i,b) This represents the b-th signal point of the i-th EEG channel.

3. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 2, characterized in that, Step S1 includes: Step S11: Segment the signal points of each EEG channel one by one to obtain X for each EEG channel. i The corresponding set of EEG channel signal fragments X i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) }, y = 1, 2, ..., Y; where, D (i,y) X represents the set of signal segments from the i-th EEG channel. i The signal segment of the y-th EEG channel within (partition) is used to obtain X1 (partition) ~ X A (partition); Step S12, process the EEG channel signal fragment set X one by one. i (partition) = {D (i,1) D (i,2) ...D (i,y) ...D (i,Y) Perform time-frequency transformation to obtain the set G of EEG channel signal segments represented in the corresponding frequency domain. i G i ={F (i,1) , ...F (i,y) ...F (i,Y) }, F (i,y) This represents the y-th EEG information segment within the set of signal segments of the ith EEG channel, represented in the frequency domain. Step S13: Set G1 to G2 of all EEG channel signal segments represented by frequency domain information. A The complete EEG information fragments F are obtained by performing one-dimensional arrangement. all ={F (1,1) ~F (1,Y) ~F (A,1) ~F (A,Y) }; and for all EEG information fragments F al1 One-dimensional vectorization is performed to obtain a one-dimensional vector set H = {f} of EEG signals. (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y) }; where f (i,y) Let y be the one-dimensional vector representation of the y-th EEG information segment within the set of signal segments of the i-th EEG channel under frequency domain information representation.

4. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 3, characterized in that, In step S12, the time-frequency transformation employs Fourier transform: Among them, F (i,y) Xi represents the y-th EEG information segment within the set of signal segments of the i-th EEG channel in the frequency domain representation; Xi{(partition), S(i, b)} represents the signal value of the b-th signal point within the set of signal segments of the i-th EEG channel; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the y-th EEG information segment within the set of signal segments of the i-th EEG channel.

5. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 4, characterized in that, Step S2 includes: Step S21, construct the Hadamard product I0 of the one-dimensional EEG signal vector H: I0=[w (1,1) f (1,1) In (1,2) f (1,2) ……In (A,1) f (A,1) ……In (A,Y) f (A,Y) ] Among them, W (i , y) f (i,y) The corresponding learnable parameters, I0, are a one-dimensional matrix; Step S22: Construct the cross-difference self-attention adjacency matrix O based on the Hadamard product I0.

6. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 5, characterized in that, Step S22 includes: Here, I1 and I2 represent intermediate operation matrices.

7. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 6, characterized in that, Step S3 includes: Step S31: Perform node aggregation operation on the cross-differential self-attention adjacency matrix O to obtain a one-dimensional vector I3. I3 = W2O Where W2 is a learnable parameter of the cross-difference self-attention adjacency matrix O; Step S32: Input the one-dimensional vector I3 of the matrix into the one-dimensional sequential convolution module to extract features, and represent the features as one-dimensional vectors to obtain the corresponding one-dimensional feature vectors, thereby obtaining the dimensionality-reduced data set Z. all The dimensionality reduction dataset Z all It contains a one-dimensional vector of all features.

8. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 7, characterized in that, The one-dimensional sequential convolution module includes, in sequence: A one-dimensional sequential convolutional layer is used to extract features from a one-dimensional vector I3 of a matrix. Pooling layers receive data from one-dimensional sequential convolutional layers and are used to optimize the features extracted from the one-dimensional sequential convolutional layers. The fully connected layer receives data from the pooling layer and is used to represent all the optimized data in the pooling layer as a one-dimensional vector representation.

9. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 8, characterized in that, Step S32 includes: Step S321: The one-dimensional sequential convolutional layer receives a matrix and a one-dimensional vector I3, and performs a convolution operation on it to obtain a set of convolution output values ​​I4 = {I... 4,1 ~I 4,J }, and then pass I4 to the pooling layer; Where l is the length of the convolution kernel in the one-dimensional sequential convolutional layer, the length l of the convolution kernel must be greater than 1, there are J convolution kernels in total, j = 1......J, J≥2; I 4,j In a one-dimensional sequential convolutional layer, the output value is the one-dimensional vector after the aggregation of nodes in the cross-differential self-attention adjacency matrix corresponding to the j-th convolutional kernel is performed by convolution. w 3,j These are the learnable parameters corresponding to the j-th convolutional kernel; bias is a bias parameter; ReLU is the activation function; In step S322, the pooling layer receives the set of output values ​​I4 from the convolution operation of the one-dimensional sequential convolution layer, performs max pooling on it to obtain pooled data I5, performs vector stretching operation on the pooled data I5 to flatten it into a one-dimensional vector to obtain flattened data I6, and transmits the flattened data I6 to the fully connected layer. I 5,j =max(I 4,j ) I6=Vector stretch{I 5,1 ,I 5,2 ,...,I 5,J }={I 6,1 ,I 6,2 ,...,I 6,J } Where max is the pooling function; Vector stretch represents the vector stretching function; I 5,j The pooled representation of the output value after convolution operation on the one-dimensional vector formed by aggregating the nodes of the cross-difference self-attention adjacency matrix corresponding to the j-th convolution kernel; I 6,j This represents the result of the pooling of the output value of the one-dimensional vector after convolution operation on the convolution operation of the one-dimensional vector after aggregation of nodes in the cross-differential self-attention adjacency matrix corresponding to the j-th convolution kernel; Step S323, the fully connected layer receives the flattened data I6 = {I 6,1 I 6,2 , ..., I 6,J The data is then subjected to dimensionality reduction optimization and represented as a one-dimensional vector to obtain the dimensionality-reduced data set Z. all ={Z1~Z J }, where Z j Let Z represent the j-th feature as a one-dimensional vector, and let Z be the dimensionality-reduced data set. all It contains a one-dimensional vector of all features.

10. The method for representing analytical data based on electroencephalogram (EEG) signals according to claim 9, characterized in that, If there are K different EEG signals, k = 1, 2, ..., K; Step S3 also includes: WITH all,k =σ(W 4,k ·AND 6(k) +bias) We obtain a total of K flattened data points, I 6(k) W represents the k-th flattened data. 4,k Z represents the learning parameters corresponding to the k-th flattened data, σ represents the dimensionality reduction function, bias represents the bias parameter, and Z represents the learning parameters. all,k This represents the k-th dimension-reduced data set; Obtain the dimensionality-reduced dataset Z of all K EEG signals. all,1 ~Z all,K .

Citation Information

Patent Citations

  • Self-adaptive filtering method based on different measuring characteristics of GPS (Global Positioning System) / INS (Inertial Navigation System) integrated navigation system

    CN102096086A

  • Activity ability evaluation method and device based on video sequence, medium and equipment

    CN113743292A