Electroencephalogram signal-based analysis data representation method
By constructing mutual differential self -attention adjacent matrix and the use of one -dimensional sequential convolutional module extraction features, the distinction between brain electrical signals and explanation problems is solved, efficient calculations and explanatoryness are achieved, and the efficiency of computing resource utilization of computing resource analysis of brain electrical signal analysis is improved. Essence
Patent Information
- Application Number
- CN202411175537.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The prior art is difficult to effectively distinguish and interpret information in EEG signals when computing resources are limited, especially when frequency characteristics and channel discharge characteristics are complex.
By acquiring the EEG signal of a single target object, preprocessing and constructing a mutual differential self-attention adjacency matrix, combined with the one-dimensional sequential convolution module to extract features, a dimensionality reduction data set is obtained, and then organized into usable analysis data.
The high -computing efficiency and explanatoryness are realized, the dependence of computing resources is reduced, the local and sequential characteristics in the brain electrical signal can be effectively extracted, and the distinction of different types of brain electrical signals can be improved.
Smart Images

Figure CN119326419A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electroencephalogram (EEG) signal analysis, and in particular to an analysis data representation method based on EEG signals. Background Art
[0002] EEG signals are a type of nonlinear electrophysiological signal collected from different areas of the brain. Their waveforms contain complex spectral energy information, and EEG signals placed in different positions correspond to discharges received from different brain regions.
[0003] In recent years, with the rapid progress of artificial intelligence technology, artificial intelligence methods have been widely used in many fields. In some EEG signal detection tasks, artificial intelligence methods are required to be able to effectively distinguish the information represented by EEG signals under limited computing resources. More importantly, it is hoped that the basis of its classification can be explained, so that the correctness of the results of the artificial intelligence method analysis can be evaluated.
[0004] In order to improve the ability to distinguish 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. It is very difficult to distinguish the diverse features among many EEG signals. It is necessary to analyze the data by combining a large number of features. How to represent the analyzed data is a huge challenge for the design of the method. Summary of the invention
[0005] The purpose of the present invention is to provide a method for representing analytical data based on EEG signals, which has the advantages of high computational efficiency and interpretability.
[0006] To achieve the above-mentioned purpose, the present invention provides an analysis data representation method based on EEG signals, which obtains the EEG signals of a single target object and represents the EEG signals as available analysis data; step S1, preprocessing the EEG signals to obtain EEG signal preprocessing data; step S2, constructing a mutual difference self-attention adjacency matrix O according to the EEG signal preprocessing data; step S3, representing the mutual difference self-attention adjacency matrix O as a matrix one-dimensional vector through a node aggregation operation, extracting features in the matrix one-dimensional vector through a one-dimensional sequential convolution module, and representing the features in the matrix one-dimensional vector as a feature one-dimensional vector, thereby obtaining a reduced dimension data set Z containing all the feature one-dimensional vectors all ; Step S4, reduce the dimension data set Z all Organize and output analytical data.
[0007] Preferably, the EEG signal comprises 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, single EEG channel X i ={S (i,1) , S (i , 2) ... S (i,B)},S (i,b) Represents the bth signal point of the ith EEG channel.
[0008] Preferably, the step S1 includes: step S11, performing signal point segmentation on each EEG channel one by one, obtaining the signal point X of each EEG channel i The corresponding EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y)}, y = 1, 2, ..., Y; where D (i,y) Represents the set of signal segments of the i-th EEG channel X i (partition) in the yth EEG channel signal segment, and obtain X1(partition)~X A (partition); Step S12, one by one the EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y)} Perform time-frequency transformation to obtain the corresponding EEG channel signal segment set G represented by frequency domain information i , G i ={F (i,1) , ... F (i,y) ……F (i,Y)}, F (i,y) represents the yth EEG information segment in the ith EEG channel signal segment set represented by the frequency domain information; step S13, all the EEG channel signal segment sets G1 to G A , perform one-dimensional arrangement to obtain all EEG information fragments F a1l ={F (1,1) ~F (1,Y) ~F (A,1) ~F (A,Y)}; and for all EEG information fragments F all Perform one-dimensional vectorization to obtain the one-dimensional vector set of EEG signals H = {f (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y)}; where f (i,y) Represents the one-dimensional vector representation of the yth EEG information segment in the ith EEG channel signal segment set under the frequency domain information representation.
[0009] Preferably, in step S12, the time-frequency transformation adopts Fourier transform:
[0010]
[0011] Among them, F (i,y) represents the yth EEG information segment in the ith EEG channel signal segment set under frequency domain information representation; Xi{(partition), S(i, b)} represents the signal value of the bth signal point in the ith EEG channel signal segment set; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the yth EEG information segment in the i-th EEG channel signal segment set.
[0012] Preferably, the step S2 comprises: 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, constructing the mutual difference self-attention adjacency matrix O according to the Hadamard product I0.
[0015] Preferably, the step S22 includes:
[0016]
[0017]
[0018]
[0019] Among them, I1 and I2 represent intermediate operation matrices.
[0020] Preferably, step S3 comprises: step S31, performing a node aggregation operation on the mutual differential self-attention adjacency matrix O to obtain a one-dimensional matrix vector I3;
[0021] I3=W2O
[0022] Wherein, W2 is the learnable parameter of the mutual differential self-attention adjacency matrix O; Step S32, the matrix one-dimensional vector I3 is input into the one-dimensional sequential convolution module, and the feature is extracted, and the feature is represented by a one-dimensional vector to obtain the corresponding feature one-dimensional vector, and then the dimension reduction data set Z is obtained. all , the dimension reduction data set Z all A one-dimensional vector containing all features.
[0023] Preferably, the one-dimensional sequential convolution module includes in sequence: a one-dimensional sequential convolution layer, which is used to extract features in the matrix one-dimensional vector I3; a pooling layer, which receives data from the one-dimensional sequential convolution layer and is used to optimize the features extracted in the one-dimensional sequential convolution layer; a fully connected layer, which receives data from the pooling layer and is used to represent all optimized data in the pooling layer as a one-dimensional vector representation.
[0024] Preferably, the step S32 includes:
[0025] Step S321, the one-dimensional sequential convolution layer receives the one-dimensional vector I3 of the matrix and performs a convolution operation on it to obtain a convolution operation output value set I4 = {I 4,1 ~I 4,J}, and transfer I4 to the pooling layer;
[0026]
[0027] Wherein, l is the length of the convolution kernel in the one-dimensional sequential convolution layer. The length of the convolution kernel l must be greater than 1. There are J convolution kernels in total, j = 1...J, J ≥ 2; I 4,j is the output value corresponding to the convolution operation of the jth convolution kernel in the one-dimensional sequential convolution layer on the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix; w 3,j is the learnable parameter corresponding to the jth convolution kernel; bias is the bias parameter; ReLU is the activation function; Step S322, the pooling layer receives the convolution operation output value set I4 of the one-dimensional sequential convolution layer, performs maximum pooling on it to obtain the pooled data I5, and performs vector stretching operation on the pooled data I5 to flatten it into a one-dimensional vector to obtain the 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] Among them, max is the pooling function; Vectorstretch represents the vector stretching function; I 5,j I is the pooled representation of the output value after the convolution operation of the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix corresponding to the j-th convolution kernel; 6,j The vector stretching operation result after the pooling of the output value corresponding to the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix corresponding to the j-th convolution kernel is convolved; Step S323, the fully connected layer receives the flattened data I6 = {I 6,1 ,I 6,2 ,…,I 6,J}, perform dimensionality reduction optimization on it and express it as a one-dimensional vector to obtain the dimensionality reduction data set Z all ={Z1~Z J}, where Z j represents the jth feature one-dimensional vector, the dimension reduction data set Z all A one-dimensional vector containing all features.
[0031] Preferably, if there are K different EEG signals, k = 1, 2, ..., K;
[0032] The step S3 also includes:
[0033] Z all,k =σ(w 4,k I 6(k) +bias)
[0034] Get a total of K flattened data, I 6(k) represents the k-th flattened data, w 4,k represents the learning parameter corresponding to the k-th flattened data, σ represents the dimensionality reduction function, bias represents the bias parameter, and Z all , k Represents the kth dimensionality reduction data set; Get the dimensionality reduction data set Z of all K EEG signals all,1 ~Z all,K .
[0035] In summary, compared with the prior art, the method for representing analysis data based on EEG signals provided by the present invention has the following beneficial effects:
[0036] First, the computational efficiency and interpretability are balanced by mutually differencing the self-attention adjacency matrix.
[0037] Second, by adopting the mutual differential self-attention method, the number of operation parameters is reduced, the computational overhead in the training and reasoning process is reduced, the dependence on computing resources is smaller, and there is no need to purchase expensive large servers to run.
[0038] Third, by using convolution to extract features from data such as the mutual differential self-attention adjacency matrix, not only can the local features be extracted, but also the sequential features that are not included in the traditional structure can be effectively extracted. This makes it more suitable for processing EEG signals than traditional graph neural networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of the present invention.
[0040] Figure 2 This is the specific operation process of the mutual differential self-attention adjacency matrix of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the attached embodiment of the present invention Figure 1 ~Attached Figure 2 , the technical solutions, structural features, objectives achieved and effects in the embodiments of the present invention are described in detail.
[0042] It should be noted that the drawings are in a very simplified form and use non-precise proportions. They are only used to conveniently and clearly assist in explaining the embodiments of the present invention, and are not used to limit the conditions for the implementation of the present invention. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical content disclosed by the present invention.
[0043] It should be noted that, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only the elements explicitly listed, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0044] The present invention provides a method for representing analysis data based on EEG signals, which obtains the EEG signals of a single target object and represents the EEG signals as usable analysis data; wherein the analysis data is as described above and is convenient for subsequent use.
[0045] The EEG signal is expressed in the form of 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) Represents the bth signal point of the ith EEG channel.
[0046] Here, it should be emphasized that, as described in the background technology, EEG signals may be transmitted via a variety of transmission media, or EEG signals may be coupled during transmission, resulting in different numbers of EEG channels X. i ; However, the number of signal points of any two EEG channels in the EEG signal is always consistent, and both contain B signal points.
[0047] In addition, regarding the means of acquiring EEG signals, invasive techniques, extracellular recording, tetrodes and multi-electrode arrays, cortical electroencephalography and other technical means can be used. There is no limitation here, and it is sufficient to acquire EEG signals that can be processed.
[0048] Finally, the initial representation form of the EEG signal (several EEG channels) is time domain information, and the time domain information is the relationship between the amplitude change of the EEG signal (several EEG channels) and time.
[0049] like Figure 1 As shown, the method includes:
[0050] Step S1, preprocessing the EEG signal to obtain EEG signal preprocessing data; the EEG signal preprocessing refers to the process of converting the EEG signal from time domain information to frequency domain information.
[0051] Because the initial manifestations of EEG signals are time domain information that is more convenient to extract and capture, representing the relationship between time and amplitude; 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 characteristics of relevant signal points of the EEG signal.
[0052] In addition, in order to obtain better results, when the expression form of the EEG signal is changed from time domain information to frequency domain information, the EEG signal represented by the frequency domain information can be truncated to obtain the most excellent EEG signal represented by the frequency domain information, thereby facilitating calculations in subsequent steps.
[0053] If truncation is performed here, the aforementioned parameters such as A and B need to be re-labeled; these are existing technologies, so they will not be described in detail in this case.
[0054] Step S2, constructing a mutual difference self-attention adjacency matrix O based on the EEG signal preprocessing data;
[0055] The mutual difference self-attention adjacency matrix is an improved method based on the self-attention mechanism. The self-attention mechanism is a mechanism that can calculate the weight of the data at each position in a single matrix and can analyze and judge the values in the matrix well.
[0056] The reason for using the mutual difference self-attention adjacency matrix is that, in practical applications, the traditional self-attention mechanism contains a Q, K, V structure, where 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 need to be completed to obtain the required calculation results. The computational complexity increases quadratically with the increase in the size of the input vector. The number of parameters for generating the Q, K, and V matrices is also very large, and a huge amount of training data is required to effectively train the model parameters and prevent overfitting.
[0057] When the mutual-differential self-attention adjacency matrix represents the relevant information of the EEG signal, its computational complexity is relatively small, and the number of parameters is consistent with the number of elements contained in the input data. Fewer parameters need to be trained, and it is more suitable for labeled data with only a small number of samples.
[0058] Step S3, the mutual difference self-attention adjacency matrix O is represented as a matrix one-dimensional vector through the node aggregation operation, and the features in the matrix one-dimensional vector are extracted through the one-dimensional sequential convolution module, and the features in the matrix one-dimensional vector are represented as feature one-dimensional vectors to obtain the reduced dimension data set Z all , the dimension reduction data set Z all A one-dimensional vector containing all features.
[0059] In a specific embodiment, the mutual differential self-attention adjacency matrix constructed in step S2 is represented as a one-dimensional vector of the matrix by performing an aggregation operation on the nodes (wherein the node aggregation operation is to aggregate the information of the adjacent nodes through the edges in the graph structure to the current node, so that the one-dimensional vector can represent the relationship characteristics between the nodes and the edges in the graph structure on the two-dimensional adjacency matrix), and is input into a 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 features in the matrix one-dimensional vector formed by the mutual differential self-attention adjacency matrix after node aggregation are extracted through the one-dimensional sequential convolution module, and then all the extracted matrix one-dimensional vectors are processed to obtain the feature one-dimensional vector; the expression form of the feature one-dimensional vector can facilitate the generation of analysis data in step S4, and the specific content is described later.
[0061] Step S4: Reduce the dimension data set Z all Organize and output analytical data.
[0062] The collation here is only used as a correction for calculation problems or fluctuations in the data to ensure the accuracy of the final output analysis data.
[0063] Steps S1 to S4 are described in detail below.
[0064] As mentioned above, the data representation of the EEG signal obtained at this time is:
[0065] Contains 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 EEG channel X i ={S (i,1) , S (i,2) ……S (i,b) ……S (i,B)}, the EEG channel is expressed as time domain information.
[0068] The step S1 comprises:
[0069] Step S11, segment the EEG channels one by one to obtain the signal points of each EEG channel X i The corresponding EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y)}, y = 1, 2, ..., Y, where D (i,y) Represents the set of signal segments of the i-th EEG channel X i (partition) in the yth EEG channel signal segment, and obtain X1(partition)~X A (partition).
[0070] Specifically, the step S11 only performs the process of converting a single EEG channel X i The operation of splitting into Y EEG channel signal segments, and each EEG channel X i They are all divided into Y EEG channel signal segments in the same way.
[0071] EEG channel signal fragment collection X i(partition) and the corresponding EEG channel X i Because the EEG channel signal segment set X i (partition) is achieved by i The signal points in the EEG channel are segmented and no operation is performed, so the signal point arrangement and data information in the two channels are actually the same. i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y)}, is still the same as the signal point of EEG channel X i The corresponding signal points in .
[0072] That is, the set of single EEG channel signal segments X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y) The number of all signal points in} is equal to EEG channel X i The number of all signal points in is equal to B.
[0073] Regarding the segmentation method, the number of signal points can be equalized so that the number of signal points in each EEG channel signal segment is as consistent as possible; or random segmentation can be used, or segmentation can be performed according to actual needs. There is no restriction here, but each EEG information segment must include at least one signal point, and the EEG information segment cannot be left empty.
[0074] Step S12: one by one, the EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y)} Perform time-frequency transformation to obtain the corresponding EEG channel signal segment set G represented by frequency domain information i , G i ={F (i,1) , ... F (i,y) ……F (i,Y)}, F (i,y) Represents the yth EEG information segment in the ith EEG channel signal segment set under frequency domain information representation.
[0075] That is, through the above steps, X1(partition)~X A(partition) transforms the representation of time domain information (because step S11 only performs segmentation, it is still the time domain information representation here) into the representation of frequency domain information, and obtains the set of EEG channel signal segments G1~G1 under all frequency domain information representations. A Among them, F i represents the set of EEG channel signal fragments under the i-th frequency domain information representation, and F i Yes and X i (partition) is transformed one by one.
[0076] Therefore, the F (i,y) Also with D (i,y) The transformation is performed one by one, so the set of EEG channel signal fragments represented by the transformed frequency domain information is G i There are also Y EEG channel signal segments represented by frequency domain information in total, which is equivalent to that this step only changes the form of expression without changing the number of signal points and the number of EEG channel signal segments, so 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 frequency domain information representation:
[0078]
[0079] As mentioned above, F (i,y) represents the yth EEG information segment in the ith EEG channel signal segment set under frequency domain information representation; Xi{(partition), S(i, b)} represents the signal value of the bth signal point in the ith EEG channel signal segment set; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the yth EEG information segment in the i-th EEG channel signal segment set.
[0080] Through Fourier transform operation, the set of EEG channel signal segments represented by the frequency domain information corresponding to each set of EEG channel signal segments is obtained.
[0081] The following is an example of the operation 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, and then the EEG channel signal segment set X1 (partition) corresponding to the first EEG channel X1 is obtained. (1,1) , D (1,2) ...D (1,y) ...D (1,Y)}, y = 1, 2, ..., Y;
[0084] X1(partition) is transformed from the time domain information representation to the frequency domain information representation, and the first EEG channel signal segment set F1 under the frequency domain information representation is obtained = {F (1,1) , ... F (1,y) ……F (1,Y)};
[0085] Here is a further example. Assume that in the first EEG channel signal segment set X1(partition), the first EEG information segment contains 2 signal points, namely, D (1,1) ={S (1,1) , S (1,2)};
[0086] Then F (1,1) By (1,1) Using the above formula:
[0087]
[0088] Perform Fourier transform (where b = 1, 2) to transform D(1, 1) from the original time domain information to the frequency domain information, and obtain F (1,1) .
[0089] And so on, one by one D (1,1) ~D (1,y) Processing to obtain F (1,1) ~F (1,y) , i.e. G1; then, in the same way, we can obtain the set of EEG channel signal fragments G1 to G1 under all frequency domain information representation. A .
[0090] If this is as described above, if all EEG channel signal segments G1~G A When truncation is performed, attention should be paid to adaptively adjusting the numbering of the EEG signal under the new frequency domain information representation.
[0091] Step S13: collect all the EEG channel signal segments G1 to G2 represented by the frequency domain information. A , perform one-dimensional arrangement to obtain all EEG information fragments F all ={F (1,1) ~F (1,Y) ~F(A,1) ~F (A,Y)}; and for all EEG information fragments F all Perform one-dimensional vectorization to obtain the one-dimensional vector set of EEG signals H = {f (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y)}; where f (i,y) Represents the one-dimensional vector representation of the yth EEG information segment in the ith EEG channel signal segment set under the frequency domain information representation.
[0092] Here, because the aforementioned step S12 obtains all the EEG channel signal segment sets G1 to G2 represented by the frequency domain information, A Here, the signal segments of a single EEG channel G are analyzed one by one. i A single EEG information fragment F (i,y) , represent them one by one, and get the one-dimensional vector set H of EEG signals.
[0093] In this way, the expression of the one-dimensional vector set H of the EEG signal is a one-dimensional vector representation with a total of 1×(A×Y) elements. The one-dimensional vector of this configuration is conducive to the convenience of subsequently constructing the mutual difference self-attention adjacency matrix, which is also the purpose of preprocessing.
[0094] Further explanation is as follows. According to the above example, F (1,1) As an illustration, here F (1,1) It is already the frequency domain information representation, so F (1,1) Perform one-dimensional vectorization to obtain the corresponding one-dimensional vector f (1,1) The following is analogous; it is equivalent to obtaining the one-dimensional vector set of EEG signals H = {f (1,1) , f (1,2) ~f (A,1) ~f (A,Y)}, there is no doubt that f (i,y) 、F (i,y) and D (i,y) They correspond to each other, and there are identical and corresponding original signal points.
[0095] Specifically, step S2 is to calculate the one-dimensional vector set H = {f (1,1) , f (1,2) ~f (A,1) ~f (A,Y)}Construct the mutual difference self-attention adjacency matrix O.
[0096] The step S2 comprises:
[0097] Step S21, constructing the Hadamard product I0 of the one-dimensional vector H of the EEG signal:
[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 continuously adapting to the final output results corresponding to the data after backpropagation through the existing model; when the learning parameters have different values, it means that the model attaches different importance to the EEG channels and corresponding frequencies of each EEG signal, thereby providing the classification results with interpretability as to which channel or frequencies are more relevant to the corresponding data.
[0101] The Hadamard product is a type of matrix operation, which is a new vector obtained by multiplying the elements in corresponding positions of two vectors. The purpose of the Hadamard product operation is to achieve one-to-one correspondence between learnable parameters and to explain the correlation between different frequencies of different channels and classification results.
[0102] Step S22, constructing a mutual difference self-attention adjacency matrix O according to the Hadamard product I0;
[0103]
[0104] Among them, I1 and I2 represent intermediate operation matrices.
[0105] Specifically, Figure 2 As shown in the figure, by constructing the mutual difference self-attention adjacency matrix O, the relationship features between different channels and different frequencies can be extracted later, which is conducive to the interpretability analysis of EEG signal classification.
[0106] The specific construction method of the mutual differential self-attention adjacency matrix o can be processed according to actual needs, and this embodiment is only used as an example.
[0107] Step S3 includes:
[0108] Step S31, performing a node aggregation operation on the mutual difference self-attention adjacency matrix o to obtain a one-dimensional vector after node aggregation of the mutual difference self-attention adjacency matrix, that is, a matrix one-dimensional vector I3;
[0109] I3=W2o
[0110] Where W2 is the learnable parameter of the mutually differentiated self-attention adjacency matrix o.
[0111] The learnable parameter W2 here is used to characterize the importance of the edges between different nodes, thereby 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 matrix one-dimensional vector I3 into the one-dimensional sequential convolution module, extract its features, and represent the features with one-dimensional vectors to obtain the corresponding feature one-dimensional vectors, and then obtain the reduced dimension data set Z. all , the dimension reduction data set Z all Features that contain all feature one-dimensional vectors.
[0113] Specifically, the one-dimensional sequential convolution module includes:
[0114] One-dimensional sequential convolution layer, the one-dimensional sequential convolution layer is used to extract the features in the one-dimensional vector I3 after the nodes of the mutual differential self-attention adjacency matrix are aggregated. The features here are one of the important data for obtaining the final result;
[0115] A pooling layer receives data from the one-dimensional sequential convolution layer; the function of the pooling layer is to optimize the features extracted from the one-dimensional sequential convolution layer, thereby effectively speeding up the operation;
[0116] The fully connected layer receives data from the pooling layer. The function of the fully connected layer 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, the step S32 includes:
[0118] Step S321, the one-dimensional sequential convolution layer receives the one-dimensional vector I3 of the matrix and performs a convolution operation on it to obtain a convolution operation output value set I4 = {I 4,1 ~I 4,J}, and transfer I4 to the pooling layer;
[0119]
[0120] in,
[0121] l is the length of the convolution kernel in the one-dimensional sequential convolution layer. The length of the convolution kernel must be greater than 1. There are J convolution kernels in total, j=1...J, J≥2, and the convolution kernel cannot be 1;
[0122] I 4,jis the output value corresponding to the convolution operation of the jth convolution kernel in the one-dimensional sequential convolution layer on the one-dimensional vector after the nodes of the mutually differential self-attention adjacency matrix are aggregated;
[0123] w 3,j is the learnable parameter corresponding to the jth convolution kernel; the learnable parameter here is used to learn the local features in multiple different one-dimensional vectors, so as to ensure that the relationship features between adjacent nodes are effectively extracted;
[0124] Bias is the 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 convolution operation output value set I4 of the one-dimensional sequential convolution layer, performs maximum pooling on it to obtain pooled data I5, and performs a vector stretching operation on 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.
[0128] The purpose of performing maximum pooling is to reduce data redundancy and reduce the amount of data computation.
[0129] The vector stretching operation obtains the flattened data I6, because the local features extracted by different convolution kernels are stretched to one dimension after stretching, in order to enable the subsequent fully connected layer to effectively extract the local features extracted from different convolution 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] Among them, 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 convolution operation, I 4,1 ~I 4,JThe total number of rows is J, and the number of columns is C, as an example;
[0135] Then I 4,1 ~I 4,J The total size is J×C, assuming that the pooling size is 1×2 and the pooling step is 1;
[0136] So for I 4,1 ~I 4,J Pooling is performed one by one to obtain pooled data I5;
[0137] I5={I 5,1 ,I 5,2 ,…,I 5,j}
[0138] Among them, I 5,j It is the pooled representation of the output value corresponding to the j-th convolution kernel after the convolution operation on the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix.
[0139] After the maximum pooling layer, the size of the pooled data I5 is By stretching and flattening, it is represented by a one-dimensional vector, and the flattened data I6 = {I 6,1 ,I 6,2 ,…,I 6,J}, the size of the flattened data I6 is
[0140] Among them, I 6,j It represents the result of the vector stretching operation after the pooling of the output value corresponding to the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix corresponding to the j-th convolution kernel is convolved.
[0141] Step S323, the fully connected layer receives the flattened data I6 = {I 6,1 ,I 6,2 ,…,I 6,J}, perform dimensionality reduction optimization on it and express it as a one-dimensional vector to obtain the dimensionality reduction data set Z all ={Z1~Z J}, where Z j represents the jth feature one-dimensional vector, the dimension reduction data set Z all A one-dimensional vector containing all features.
[0142] Thus, step S321 to step S323 introduces how to obtain the dimension reduction data set Z all .
[0143] However, in some embodiments, multiple independent EEG signals may appear. Here, a specific embodiment for this situation is introduced;
[0144] Assume that there are K different EEG signals, k = 1, 2, ... K, where the difference means that all EEG signals cannot be represented by A EEG channels;
[0145] Then through the above steps, we will get a total of K flattened data, I 6(k) represents the k-th flattened data, w 4,k represents the learning parameter corresponding to the k-th flattened data, σ represents the dimensionality reduction function, and bias represents the bias parameter;
[0146] The step S323 should be Z all,k represents the dimensionality reduction data set of the kth EEG signal, and then the dimensionality reduction data set Z 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 similar to the single dimension reduction data set Z all There is no difference in the expression form of , and both can be substituted into step S4 for the final calculation.
[0149] Step S4 is as described above and will not be described again.
[0150] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A method for representing analysis data based on electroencephalogram signals, characterized in that: By acquiring the EEG signal of a single target object, the EEG signal is represented as usable analysis data; Step S1, preprocessing the EEG signal to obtain EEG signal preprocessing data; Step S2, constructing a mutual difference self-attention adjacency matrix O based on the EEG signal preprocessing data; Step S3, through the node aggregation operation, the mutual difference self-attention adjacency matrix O is represented as a matrix one-dimensional vector, and the features in the matrix one-dimensional vector are extracted through the one-dimensional sequential convolution module, and the features in the matrix one-dimensional vector are represented as feature one-dimensional vectors, and the reduced dimension data set Z containing all feature one-dimensional vectors is obtained. all ; Step S4: Reduce the dimension data set Z all Organize and output analytical data.
2. The method for representing analysis data based on electroencephalogram signals according to claim 1, characterized in that: The 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, single EEG channel X i ={S (i,1) , S (i,2) ……S (i,B) },S (i,b) Represents the bth signal point of the ith EEG channel.
3. The method for representing analysis data based on electroencephalogram signals according to claim 2, characterized in that: The step S1 comprises: Step S11, segment the EEG channels one by one to obtain the signal points of each EEG channel X i The corresponding EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y) }, y = 1, 2, ..., Y; where D (i,y) Represents the set of signal segments of the i-th EEG channel X i (partition) in the yth EEG channel signal segment, and obtain X1(partition)~X A (partition); Step S12: one by one, the EEG channel signal segment set X i (partition) = {D (i,1) , D (i,2) ...D (i,y) ...D (i,Y) } Perform time-frequency transformation to obtain the corresponding EEG channel signal segment set G represented by frequency domain information i , G i ={F (i,1) , ... F (i,y) ……F (i,Y) }, F (i,y) represents the yth EEG information segment in the ith EEG channel signal segment set under the frequency domain information representation; Step S13: collect all the EEG channel signal segments G1 to G2 represented by the frequency domain information. A , perform one-dimensional arrangement to obtain all EEG information fragments F all ={F (1,1) ~F (1,Y) ~F (A,1) ~F (A,Y) }; and for all EEG information fragments F al1 Perform one-dimensional vectorization to obtain the one-dimensional vector set of EEG signals H = {f (1,1) ~f (1,Y) ~f (A,1) ~f (A,Y) }; where f (i,y) Represents the one-dimensional vector representation of the yth EEG information segment in the ith EEG channel signal segment set under the frequency domain information representation.
4. The method for representing analysis data based on electroencephalogram signals according to claim 3, characterized in that: In step S12, the time-frequency transformation adopts Fourier transform: Among them, F (i,y) represents the yth EEG information segment in the ith EEG channel signal segment set under frequency domain information representation; Xi{(partition), S(i, b)} represents the signal value of the bth signal point in the ith EEG channel signal segment set; e -j2πft is a complex exponential function, representing a sine wave; number(D) represents the number of signal points in the yth EEG information segment in the i-th EEG channel signal segment set.
5. The method for representing analysis data based on electroencephalogram signals according to claim 4, characterized in that: The step S2 comprises: Step S21, constructing the Hadamard product I0 of the one-dimensional vector H of the EEG signal: I0=[in (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 is a one-dimensional matrix; Step S22, construct a mutual difference self-attention adjacency matrix O according to the Hadamard product I0.
6. The method for representing analysis data based on electroencephalogram signals according to claim 5, characterized in that: The step S22 comprises: Among them, I1 and I2 represent intermediate operation matrices.
7. The method for representing analysis data based on electroencephalogram signals according to claim 6, characterized in that: Step S3 includes: Step S31, performing a node aggregation operation on the mutual difference self-attention adjacency matrix O to obtain a one-dimensional matrix vector I3; I3=W2O Among them, W2 is the learnable parameter of the mutual difference self-attention adjacency matrix O; Step S32: Input the matrix one-dimensional vector I3 into the one-dimensional sequential convolution module to extract features, and represent the features with one-dimensional vectors to obtain the corresponding feature one-dimensional vectors, and then obtain the reduced dimension data set Z. all , the dimension reduction data set Z all A one-dimensional vector containing all features.
8. The method for representing analysis data based on electroencephalogram signals according to claim 7, characterized in that: The one-dimensional sequential convolution module includes: A one-dimensional sequential convolution layer, wherein the one-dimensional sequential convolution layer is used to extract features in the one-dimensional vector I3 of the matrix; The pooling layer receives data from the one-dimensional sequential convolution layer and is used to optimize the features extracted from the one-dimensional sequential convolution layer; The fully connected layer receives data from the pooling layer and is used to represent all optimized data in the pooling layer as a one-dimensional vector.
9. The method for representing analysis data based on electroencephalogram signals according to claim 8, characterized in that: The step S32 comprises: Step S321, the one-dimensional sequential convolution layer receives the one-dimensional vector I3 of the matrix and performs a convolution operation on it to obtain a convolution operation output value set I4 = {I 4,1 ~I 4,J }, and transfer I4 to the pooling layer; Wherein, l is the length of the convolution kernel in the one-dimensional sequential convolution layer. The length of the convolution kernel l must be greater than 1. There are J convolution kernels in total, j=1...J, J≥2; I 4,j is the output value corresponding to the convolution operation of the jth convolution kernel in the one-dimensional sequential convolution layer on the one-dimensional vector after the nodes of the mutually differential self-attention adjacency matrix are aggregated; w 3,j is the learnable parameter corresponding to the jth convolution kernel; Bias is the bias parameter; ReLU is the activation function; Step S322, the pooling layer receives the convolution operation output value set I4 of the one-dimensional sequential convolution layer, performs maximum 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; 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 } Among them, max is the pooling function; Vector stretch represents the vector stretching function; I 5,j I is the pooled representation of the output value after the convolution operation of the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix corresponding to the j-th convolution kernel; 6,j Represents the result of the vector stretching operation after the pooling of the output value corresponding to the one-dimensional vector after the aggregation of the nodes of the mutual differential self-attention adjacency matrix corresponding to the j-th convolution kernel is convolved; Step S323, the fully connected layer receives the flattened data I6 = {I 6,1 , I 6,2 , ..., I 6,J }, perform dimensionality reduction optimization on it and express it as a one-dimensional vector to obtain the dimensionality reduction data set Z all ={Z1~Z J }, where Z j represents the jth feature one-dimensional vector, the dimension reduction data set Z all A one-dimensional vector containing all features.
10. The method for representing analysis data based on electroencephalogram signals according to claim 9, characterized in that: If there are K different EEG signals, k = 1, 2, ... K; The step S3 also includes: WITH all,k =σ(W 4,k ·AND 6(k) +bias) Get a total of K flattened data, I 6(k) represents the k-th flattened data, W 4,k represents the learning parameter corresponding to the k-th flattened data, σ represents the dimensionality reduction function, bias represents the bias parameter, and Z all,k represents the kth dimensionality reduction data set; Get the dimension-reduced data set 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
Personnel attention detection method, device and equipment and computer medium
CN114065812A
Legal case similarity calculation method and system based on knowledge graph matching
CN114092283A
Novel lower limb rehabilitation training system based on electroencephalogram acquisition equipment and application
CN114756131A
Cited By
Epilepsy auxiliary diagnosis method and equipment based on electroencephalogram signals
CN120114073A