A method and system for automatic electroencephalogram analysis

Through the dynamic routing and feature enhancement technology of the EEG signal denoising model, the problem of EEG signals being susceptible to noise interference is solved, and higher quality signal processing and analysis are achieved.

CN119474826BActive Publication Date: 2025-04-15南昌大学第一附属医院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510019466.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-04-15
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

EEG signals are susceptible to noise interference, resulting in a decrease in signal quality and affecting subsequent analysis and diagnostic results. Traditional denoising methods are difficult to effectively deal with complex and dynamically changing noise environments.

Method used

The EEG signal denoising model is adopted, and the noise mode features in the original signal data are aggregated through the dynamic routing layer. The feature enhancement layer strengthens the noise mode feature vector, the feature splicing layer is spliced ​​with the original signal data, and finally the full connection operation is performed through the EEG signal reconstruction layer to generate the noise reduction signal.

Benefits of technology

Effectively reduce the influence of noise, improve the quality of electrical activity expression in the cerebral cortex, adapt to the dynamically changing noise environment, and improve the noise reduction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474826B_ABST
    Figure CN119474826B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical data analysis technology, and in particular to an automatic electroencephalogram analysis method and system. An automatic electroencephalogram analysis method comprises: taking original electroencephalogram signal data; sending the electroencephalogram signal data into an electroencephalogram signal noise reduction model for processing to output noise-reduced electroencephalogram signal data. The present invention performs noise reduction processing on the original electroencephalogram signal data through the electroencephalogram signal noise reduction model, which can reduce the influence of various noise sources in the original electroencephalogram signal data, thereby improving the quality of the expression of the electrical activity of the patient's cerebral cortex, and facilitating the subsequent use of the electroencephalogram signal data; and in the electroencephalogram signal noise reduction model, the features similar to the influence of noise patterns in the original electroencephalogram signal data are aggregated by dynamic routing, providing a reference for subsequent noise reduction operations, and can effectively adapt to dynamically changing noise to obtain a better noise reduction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical data analysis, and in particular to an electroencephalogram (EEG) automatic analysis method and system. Background Art

[0002] As a non-invasive brain neural activity monitoring technology, electroencephalogram (EEG) has broad application prospects in disease diagnosis, brain-computer interface, cognitive analysis and other fields. However, EEG signals are extremely weak and easily interfered by various noise sources, such as electromyographic noise (EMG), eye movement artifacts (EOG), environmental noise, and electronic noise of the device itself. The presence of these noises seriously affects the quality of EEG signals, making subsequent signal analysis difficult and may even lead to incorrect diagnosis or control results. Although traditional denoising methods, such as wavelet transform, independent component analysis (ICA) and various filter designs, can remove some noise to a certain extent, they are usually based on fixed parameters and assumptions and are difficult to effectively handle complex and dynamically changing noise environments. Especially in application scenarios that require dynamic and real-time monitoring, their limitations are more prominent. Summary of the invention

[0003] The present invention performs noise reduction processing on original electroencephalogram signal data through an electroencephalogram signal noise reduction model, which can reduce the influence of various noise sources in the original electroencephalogram signal data, thereby improving the quality of the expression of the electrical activity of the patient's cerebral cortex, and facilitating the subsequent use of the electroencephalogram signal data; and in the electroencephalogram signal noise reduction model, the features similar to the influence of noise patterns in the original electroencephalogram signal data are aggregated through dynamic routing to provide a reference for subsequent noise reduction operations, which can effectively adapt to dynamically changing noise and obtain better noise reduction effects; and based on the characteristic information of the original electroencephalogram signal data, the feature vector of the brain wave noise pattern is feature-enhanced, which can allocate the weight of the noise pattern, thereby reducing the influence of redundant feature information.

[0004] An automatic electroencephalogram analysis method, comprising:

[0005] Acquire original EEG signal data; send the EEG signal data to the EEG signal denoising model for processing to output denoised EEG signal data;

[0006] The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature splicing layers and EEG signal reconstruction layers. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct EEG noise pattern enhanced feature vectors; the feature splicing layer is used to splice all the EEG noise pattern enhanced feature vectors with the original EEG signal data to construct the EEG signal data to be reconstructed; the EEG signal reconstruction layer is used to perform a full connection operation on the EEG signal data to be reconstructed to construct the denoised EEG signal data.

[0007] As a preferred aspect of the present invention, the fragments of the original EEG signal data are analyzed by a dynamic routing layer to achieve feature unification of different noise patterns and construct several EEG noise pattern feature vectors, which specifically includes the following steps:

[0008] For the first dynamic routing layer, the original EEG signal data is framed through a sliding window to obtain M original EEG signal fragment data, and the operations corresponding to the following formulas are performed: , where S j (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the first dynamic routing layer, j=1, 2, 3, ..., J1, J1 is the total number of local EEG noise pattern feature vectors output by the first dynamic routing layer, A mj (t) is the routing weight between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector at the tth iteration corresponding to the first dynamic routing layer, m=1, 2, 3, ..., M, W mj is the transformation matrix between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector corresponding to the first dynamic routing layer, U m is the mth original EEG signal segment data, and the routing weight A is adjusted after each iteration. mj (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the first dynamic routing layer;

[0009] For the nth dynamic routing layer from the second dynamic routing layer to the Nth dynamic routing layer, n=2, 3, ..., N, the dynamic routing output feature vector output by the previous dynamic routing layer is recorded as the target output feature vector F e, e=1, 2, 3, ..., E, E is the total number of dynamic routing output feature vectors output by the previous dynamic routing layer, and the operations corresponding to the following formulas are performed: , where S k (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the nth dynamic routing layer, k = 1, 2, 3, ..., J n , J n is the total number of local EEG noise pattern feature vectors output by the nth dynamic routing layer, B ek (t) is the routing weight between the e-th target output feature vector and the k-th local EEG noise pattern feature vector at the t-th iteration corresponding to the n-th dynamic routing layer, H ek is the transformation matrix between the e-th target output feature vector corresponding to the n-th dynamic routing layer and the k-th local EEG noise pattern feature vector. After each iteration, the routing weight B ek (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the nth dynamic routing layer;

[0010] The dynamic routing output feature vector output by the Nth dynamic routing layer is used as the brain wave noise pattern feature vector.

[0011] As a preferred aspect of the present invention, updating the routing weight specifically includes the following steps:

[0012] For route weight A mj (t) To update, execute the following content and execute the following formula: A mj (t+1)=A mj (t)+W mj U m S j (t), based on all routing weights A mj (t) Construct a weight matrix, perform self-attention mechanism operation based on the weight matrix, update the weight matrix, and store the updated routing weight A in the updated weight matrix mj (t);

[0013] For routing weight B ek (t) Update, execute the following content, execute the following formula: B ek (t+1)=B ek (t)+H ek F ej S k (t), which is based on all routing weights Bek (t) Construct a weight matrix, perform self-attention mechanism operation based on the weight matrix, update the weight matrix, and store the updated routing weight B in the updated weight matrix ek (t).

[0014] As a preferred aspect of the present invention, a self-attention mechanism operation is performed based on a weight matrix to update the weight matrix, specifically comprising the following steps:

[0015] The weight matrix is ​​multiplied with the value weight matrix, key weight matrix and query weight matrix respectively to construct the corresponding value feature vector V, key feature vector K and query feature vector Q, and then the attention weight matrix is ​​calculated by the following formula , where D is the dimension of the weight matrix, which is J1 or J n , and then use the output of the matrix multiplication operation between the attention weight matrix ATT and the value feature vector V as the new weight matrix to update the weight matrix.

[0016] As a preferred aspect of the present invention, the feature enhancement layer performs feature enhancement on different brain wave noise pattern feature vectors based on the feature information of the original electroencephalogram signal data to construct a brain wave noise pattern enhanced feature vector, which specifically includes the following steps:

[0017] The characteristic information of the original electroencephalogram signal data is extracted to form an original electroencephalogram signal feature vector, the original electroencephalogram signal feature vector is added to the end of the brain wave noise pattern feature vector, and all the brain wave noise pattern feature vectors with the original electroencephalogram signal feature vector added to the end are sent to the multi-layer perceptron for processing to obtain the reinforcement weight of the brain wave noise pattern feature vector, and the reinforcement weights of all brain wave noise pattern feature vectors are normalized, and finally the brain wave noise pattern feature vector is multiplied by the corresponding reinforcement weight after the normalization operation to obtain the corresponding brain wave noise pattern reinforcement feature vector.

[0018] As a preferred aspect of the present invention, training the EEG signal denoising model specifically includes the following steps:

[0019] A number of EEG signal denoising training samples are obtained, the EEG signal denoising training samples include original EEG signal data with noise and corresponding denoised EEG signal data, all EEG signal denoising training samples are combined into an EEG signal denoising training set, and then the EEG signal denoising training set is sent to the parameter-initialized EEG signal denoising model for training. During the training, the original EEG signal data with noise is used as input, and the corresponding denoised EEG signal data is used as the target output, and the loss value is calculated to determine whether the loss value is within a preset range. If the loss value is within the preset range, the trained EEG signal denoising model is output; otherwise, the EEG signal denoising model is continuously trained through the EEG signal denoising training set.

[0020] An electroencephalogram automatic analysis system, comprising:

[0021] A raw EEG signal data acquisition module, used to acquire raw EEG signal data;

[0022] The EEG signal denoising module is used to send the EEG signal data to the EEG signal denoising model for processing to output denoised EEG signal data;

[0023] The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature splicing layers and EEG signal reconstruction layers. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct EEG noise pattern enhanced feature vectors; the feature splicing layer is used to splice all the EEG noise pattern enhanced feature vectors with the original EEG signal data to construct the EEG signal data to be reconstructed; the EEG signal reconstruction layer is used to perform a full connection operation on the EEG signal data to be reconstructed to construct the denoised EEG signal data.

[0024] The present invention has the following advantages:

[0025] The present invention performs noise reduction processing on original electroencephalogram signal data through an electroencephalogram signal noise reduction model, which can reduce the influence of various noise sources in the original electroencephalogram signal data, thereby improving the quality of the expression of the electrical activity of the patient's cerebral cortex, and facilitating the subsequent use of the electroencephalogram signal data; and in the electroencephalogram signal noise reduction model, the features similar to the influence of noise patterns in the original electroencephalogram signal data are aggregated through dynamic routing to provide a reference for subsequent noise reduction operations, which can effectively adapt to dynamically changing noise and obtain better noise reduction effects; and based on the characteristic information of the original electroencephalogram signal data, the feature vector of the brain wave noise pattern is feature-enhanced, which can allocate the weight of the noise pattern, thereby reducing the influence of redundant feature information. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of the structure of the EEG signal denoising model used in an embodiment of the present invention.

[0027] Figure 2 Schematic diagram of the structure of the automatic EEG analysis system used in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable persons skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] Embodiment 1, an electroencephalogram automatic analysis method, comprising:

[0030] Obtaining raw EEG signal data, where raw EEG signal data refers to voltage fluctuation data recorded by electrodes placed on the patient's scalp, which can reflect the electrical activity of the patient's cerebral cortex, including a variety of noise sources (such as electromyographic noise, eye movement artifact noise, and environmental noise, etc.); sending the EEG signal data to an EEG signal denoising model for processing to output denoised EEG signal data, which removes the influence of various noise sources in the raw EEG signal data, can improve the quality of expressing the electrical activity of the patient's cerebral cortex, and facilitate the subsequent use of the EEG signal data;

[0031] See also Figure 1The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature concatenation layers and EEG signal reconstruction layers, where N is generally 3. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors. The EEG noise pattern feature vectors can describe the high-level expression of all fragments of the original EEG signal data including similar noise effects. These high-level expressions of similar noise effects can guide subsequent denoising operations; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data. The brain wave noise pattern enhancement feature vector is constructed. The brain wave noise pattern enhancement feature vector expresses the influence of different noise patterns on the original electroencephalogram signal data. By performing feature enhancement on different brain wave noise pattern feature vectors, it is possible to achieve weight distribution of different noise patterns, thereby reducing the influence of redundant feature information and improving the quality of the brain wave noise pattern enhancement feature vector; the feature concatenation layer is used to concatenate all brain wave noise pattern enhancement feature vectors with the original electroencephalogram signal data to construct the electroencephalogram signal data to be reconstructed; the electroencephalogram signal reconstruction layer is used to perform a full connection operation on the electroencephalogram signal data to be reconstructed to construct the denoised electroencephalogram signal data;

[0032] The present application performs noise reduction processing on the original EEG signal data through an EEG signal noise reduction model, which can reduce the influence of various noise sources in the original EEG signal data, thereby improving the quality of the expression of the electrical activity of the patient's cerebral cortex and facilitating the subsequent use of the EEG signal data; and in the EEG signal noise reduction model, the features similar to the influence of noise patterns in the original EEG signal data are aggregated through dynamic routing to provide a reference for subsequent noise reduction operations, which can effectively adapt to dynamically changing noise and obtain better noise reduction effects; and based on the characteristic information of the original EEG signal data, the feature vector of the EEG noise pattern is feature-enhanced, which can allocate weights of the noise pattern and reduce the influence of redundant feature information.

[0033] The fragments of the original EEG signal data are analyzed through the dynamic routing layer to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors, which specifically includes the following steps:

[0034] For the first dynamic routing layer, the original EEG signal data is framed through a sliding window to obtain M original EEG signal fragment data. The length of the sliding window is C. The specific value of C is determined by the developer. When the original EEG signal data is framed through a sliding window, the step size of the sliding window is generally C. It can also be set a priori according to the length of time affected by the noise. Perform the operation corresponding to the following formula: , where Sj (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the first dynamic routing layer, j=1, 2, 3, ..., J1, J1 is the total number of local EEG noise pattern feature vectors output by the first dynamic routing layer, A mj (t) is the routing weight between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector at the tth iteration corresponding to the first dynamic routing layer, m=1, 2, 3, ..., M, A mj (t) represents the degree of aggregation of the mth original EEG signal segment data to the jth local EEG noise pattern feature vector in the first dynamic routing layer, A mj The larger the value of (t), the more similar the noise influence of the mth original EEG signal segment data and the jth local EEG noise pattern feature vector is. mj is the transformation matrix between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector corresponding to the first dynamic routing layer, U m is the mth original EEG signal segment data, through W mj To U m After each iteration, the routing weight A mj (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the first dynamic routing layer;

[0035] For the nth dynamic routing layer from the second dynamic routing layer to the Nth dynamic routing layer, n=2, 3, ..., N, the dynamic routing output feature vector output by the previous dynamic routing layer is recorded as the target output feature vector F e , e=1, 2, 3, ..., E, E is the total number of dynamic routing output feature vectors output by the previous dynamic routing layer, and the operations corresponding to the following formulas are performed: , where S k (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the nth dynamic routing layer, k = 1, 2, 3, ..., J n , J n is the total number of local EEG noise pattern feature vectors output by the nth dynamic routing layer, and satisfies the following conditions from J1 to J n Getting smaller and smaller, B ek(t) is the routing weight between the e-th target output feature vector and the k-th local EEG noise pattern feature vector at the t-th iteration corresponding to the n-th dynamic routing layer, H ek is the transformation matrix between the e-th target output feature vector corresponding to the n-th dynamic routing layer and the k-th local EEG noise pattern feature vector. After each iteration, the routing weight B ek (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the nth dynamic routing layer;

[0036] The dynamic routing output feature vector output by the Nth dynamic routing layer is used as the brain wave noise pattern feature vector.

[0037] The route weight is updated, which specifically includes the following steps:

[0038] For route weight A mj (t) To update, execute the following content and execute the following formula: A mj (t+1)=A mj (t)+W mj U m S j (t), where W mj U m S j (t) represents the similarity between the mth original EEG signal segment data aligned to the space corresponding to the jth local EEG noise pattern feature vector and the jth local EEG noise pattern feature vector, which means that the higher the similarity between the mth original EEG signal segment data aligned to the space corresponding to the jth local EEG noise pattern feature vector and the jth local EEG noise pattern feature vector, the higher the aggregation degree of the mth original EEG signal segment data to the jth local EEG noise pattern feature vector. Based on all routing weights A mj (t) Construct a weight matrix with a size of M×J1. Perform a self-attention mechanism operation based on the weight matrix to update the weight matrix. The updated weight matrix stores the updated routing weight A. mj (t);

[0039] For routing weight B ek (t) Update, execute the following content, execute the following formula: B ek (t+1)=B ek (t)+H ek F ej S k(t), where H ek F ej S k (t) represents the similarity between the e-th target output feature vector aligned to the space corresponding to the k-th local EEG noise pattern feature vector and the k-th local EEG noise pattern feature vector, which means that the higher the similarity between the e-th target output feature vector aligned to the space corresponding to the k-th local EEG noise pattern feature vector and the k-th local EEG noise pattern feature vector, the higher the aggregation degree of the e-th target output feature vector to the k-th local EEG noise pattern feature vector. Based on all routing weights B ek (t) Construct a weight matrix whose size is M×J n , based on the weight matrix, the self-attention mechanism is operated to update the weight matrix. The updated weight matrix stores the updated routing weight B ek (t);

[0040] The self-attention mechanism operation is performed based on the weight matrix to update the weight matrix, which specifically includes the following steps:

[0041] The weight matrix is ​​multiplied with the value weight matrix, key weight matrix and query weight matrix respectively to construct the corresponding value feature vector V, key feature vector K and query feature vector Q, and then the attention weight matrix is ​​calculated by the following formula , where D is the dimension of the weight matrix, which is J1 or J n , and then use the output of the matrix multiplication operation of the attention weight matrix ATT and the value feature vector V as the new weight matrix to update the weight matrix; the value weight matrix, the key weight matrix and the query weight matrix are set based on the multi-head attention mechanism in the Transformer model, and the specific parameters of the value weight matrix, the key weight matrix and the query weight matrix are adjusted following the training of the EEG signal denoising model;

[0042] The feature enhancement layer performs feature enhancement on different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct an EEG noise pattern enhanced feature vector, which specifically includes the following steps:

[0043] The characteristic information of the original EEG signal data is extracted to form an original EEG signal feature vector. The characteristic information of the original EEG signal data includes the corresponding time domain characteristics (such as variance, peak value and autocorrelation coefficient, etc.), frequency domain characteristics (such as spectral power, etc.), and entropy characteristics (such as sample entropy and approximate entropy, etc.) of the original EEG signal data. The original EEG signal feature vector is added to the end of the EEG noise pattern feature vector, and all the EEG noise pattern feature vectors with the original EEG signal feature vector added to the end are sent to the multi-layer perceptron for processing to obtain the reinforcement weight of the EEG noise pattern feature vector, and the reinforcement weights of all the EEG noise pattern feature vectors are normalized. Finally, the EEG noise pattern feature vector is multiplied by the corresponding reinforcement weight after the normalization operation to obtain the corresponding EEG noise pattern reinforcement feature vector.

[0044] Training the EEG signal denoising model includes the following steps:

[0045] A number of EEG signal denoising training samples are obtained, and the EEG signal denoising training samples include original EEG signal data with noise and corresponding denoised EEG signal data. It should be noted that the original EEG signal data with noise here can be the actually collected brain wave data, and the corresponding denoised EEG signal data is the brain wave data after artificial denoising processing. The original EEG signal data with noise can also be obtained by artificially adding noise based on the noise-free denoised EEG signal data. All EEG signal denoising training samples are combined into an EEG signal denoising training set, and then the EEG signal denoising training set is sent to the parameter-initialized EEG signal denoising model for training. During the training, the original EEG signal data with noise is used as input, and the corresponding denoised EEG signal data is used as the target output. The loss value is calculated to determine whether the loss value is within a preset range. The preset range is set by the developer. If the loss value is within the preset range, the trained EEG signal denoising model is output; otherwise, the EEG signal denoising model is continuously trained through the EEG signal denoising training set.

[0046] Embodiment 2, an electroencephalogram automatic analysis system, such as Figure 2 As shown, including:

[0047] The raw EEG signal data acquisition module is used to obtain raw EEG signal data. The raw EEG signal data here refers to the voltage fluctuation data recorded by the electrodes placed on the patient's scalp, which can reflect the electrical activity of the patient's cerebral cortex, including various noise sources (such as electromyographic noise, eye movement artifact noise and environmental noise, etc.);

[0048] The EEG signal denoising module is used to send the EEG signal data to the EEG signal denoising model for processing to output denoised EEG signal data. The denoised EEG signal data removes the influence of various noise sources, can improve the quality of the expression of the electrical activity of the patient's cerebral cortex, and facilitate the subsequent use of the EEG signal data;

[0049] The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature splicing layers and EEG signal reconstruction layers, where N is generally 3. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors. The EEG noise pattern feature vectors can describe the high-level expression of all fragments of the original EEG signal data including similar noise effects. These high-level expressions of similar noise effects can guide subsequent denoising operations; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data. The brain wave noise pattern enhancement feature vector is constructed. The brain wave noise pattern enhancement feature vector expresses the degree of influence of different noise patterns on the original electroencephalogram signal data. By performing feature enhancement on different brain wave noise pattern feature vectors, it is possible to achieve weight allocation for different noise patterns, thereby weakening the influence of redundant feature information and improving the quality of the brain wave noise pattern enhancement feature vector; the feature splicing layer is used to splice all the brain wave noise pattern enhancement feature vectors and the original electroencephalogram signal data to construct the electroencephalogram signal data to be reconstructed; the electroencephalogram signal reconstruction layer is used to perform a full connection operation on the electroencephalogram signal data to be reconstructed to construct the denoised electroencephalogram signal data.

[0050] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims

1. An automatic electroencephalogram analysis method, characterized in that: include: Obtain raw EEG signal data; Sending the electroencephalogram signal data to the electroencephalogram signal denoising model for processing to output denoised electroencephalogram signal data; The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature splicing layers and EEG signal reconstruction layers. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct EEG noise pattern enhanced feature vectors; the feature splicing layer is used to splice all EEG noise pattern enhanced feature vectors with the original EEG signal data to construct the EEG signal data to be reconstructed; the EEG signal reconstruction layer is used to perform a full connection operation on the EEG signal data to be reconstructed to construct the denoised EEG signal data; The fragments of the original EEG signal data are analyzed through the dynamic routing layer to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors, which specifically includes the following steps: For the first dynamic routing layer, the original EEG signal data is framed through a sliding window to obtain M original EEG signal fragment data, and the operations corresponding to the following formulas are performed: , where S j (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the first dynamic routing layer, j=1, 2, 3, ..., J1, J1 is the total number of local EEG noise pattern feature vectors output by the first dynamic routing layer, A mj (t) is the routing weight between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector at the tth iteration corresponding to the first dynamic routing layer, m=1, 2, 3, …, M, W mj is the transformation matrix between the mth original EEG signal segment data and the jth local EEG noise pattern feature vector corresponding to the first dynamic routing layer, U m is the mth original EEG signal segment data, and the routing weight A is adjusted after each iteration. mj (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the first dynamic routing layer; For the nth dynamic routing layer from the second dynamic routing layer to the Nth dynamic routing layer, n=2, 3, ..., N, the dynamic routing output feature vector output by the previous dynamic routing layer is recorded as the target output feature vector F e , e=1, 2, 3, ..., E, E is the total number of dynamic routing output feature vectors output by the previous dynamic routing layer, and the operations corresponding to the following formulas are performed: , where S k (t) is the local EEG noise pattern feature vector obtained after the tth iteration in the nth dynamic routing layer, k = 1, 2, 3, ..., J n , J n is the total number of local EEG noise pattern feature vectors output by the nth dynamic routing layer, B ek (t) is the routing weight between the e-th target output feature vector and the k-th local EEG noise pattern feature vector at the t-th iteration corresponding to the n-th dynamic routing layer, H ek is the transformation matrix between the e-th target output feature vector corresponding to the n-th dynamic routing layer and the k-th local EEG noise pattern feature vector. After each iteration, the routing weight B ek (t) Update and generate a new local EEG noise pattern feature vector S j (t); until the number of iterations reaches the maximum number of dynamic routing iterations T, the local EEG noise pattern feature vector is recorded as the dynamic routing output feature vector, and all dynamic routing output feature vectors are used as the output of the nth dynamic routing layer; The dynamic routing output feature vector output by the Nth dynamic routing layer is used as the brain wave noise pattern feature vector.

2. The method for automatic electroencephalogram analysis according to claim 1, characterized in that: The route weight is updated, which specifically includes the following steps: For route weight A mj (t) To update, execute the following content and execute the following formula: A mj (t+1)=A mj (t)+W mj U m S j (t), based on all routing weights A mj (t) Construct a weight matrix, perform self-attention mechanism operation based on the weight matrix, update the weight matrix, and store the updated routing weight A in the updated weight matrix mj (t); For routing weight B ek (t) Update, execute the following content, execute the following formula: B ek (t+1)=B ek (t)+H ek F ej S k (t), which is based on all routing weights B ek (t) Construct a weight matrix, perform self-attention mechanism operation based on the weight matrix, update the weight matrix, and store the updated routing weight B in the updated weight matrix ek (t).

3. The method for automatic electroencephalogram analysis according to claim 2, characterized in that: The self-attention mechanism operation is performed based on the weight matrix to update the weight matrix, which specifically includes the following steps: The weight matrix is ​​multiplied with the value weight matrix, key weight matrix and query weight matrix respectively to construct the corresponding value feature vector V, key feature vector K and query feature vector Q, and then the attention weight matrix is ​​calculated by the following formula , where D is the dimension of the weight matrix, which is J1 or J n , and then use the output of the matrix multiplication operation between the attention weight matrix ATT and the value feature vector V as the new weight matrix to update the weight matrix.

4. The method for automatic electroencephalogram analysis according to claim 3, characterized in that: The feature enhancement layer performs feature enhancement on different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct an EEG noise pattern enhanced feature vector, which specifically includes the following steps: The characteristic information of the original electroencephalogram signal data is extracted to form an original electroencephalogram signal feature vector, the original electroencephalogram signal feature vector is added to the end of the brain wave noise pattern feature vector, and all the brain wave noise pattern feature vectors with the original electroencephalogram signal feature vector added to the end are sent to the multi-layer perceptron for processing to obtain the reinforcement weight of the brain wave noise pattern feature vector, and the reinforcement weights of all brain wave noise pattern feature vectors are normalized, and finally the brain wave noise pattern feature vector is multiplied by the corresponding reinforcement weight after the normalization operation to obtain the corresponding brain wave noise pattern reinforcement feature vector.

5. The method for automatic electroencephalogram analysis according to claim 4, characterized in that: Training the EEG signal denoising model includes the following steps: A number of EEG signal denoising training samples are obtained, the EEG signal denoising training samples include original EEG signal data with noise and corresponding denoised EEG signal data, all EEG signal denoising training samples are combined into an EEG signal denoising training set, and then the EEG signal denoising training set is sent to the parameter-initialized EEG signal denoising model for training. During the training, the original EEG signal data with noise is used as input, and the corresponding denoised EEG signal data is used as the target output, and the loss value is calculated to determine whether the loss value is within a preset range. If the loss value is within the preset range, the trained EEG signal denoising model is output; otherwise, the EEG signal denoising model is continuously trained through the EEG signal denoising training set.

6. An electroencephalogram automatic analysis system, characterized in that: The system applies an electroencephalogram automatic analysis method according to any one of claims 1 to 5, comprising: A raw EEG signal data acquisition module, used to acquire raw EEG signal data; The EEG signal denoising module is used to send the EEG signal data to the EEG signal denoising model for processing to output denoised EEG signal data; The EEG signal denoising model includes N dynamic routing layers, feature enhancement layers, feature splicing layers and EEG signal reconstruction layers. The dynamic routing layer is used to analyze the fragments of the original EEG signal data to unify the features containing different noise patterns and construct several EEG noise pattern feature vectors; the feature enhancement layer is used to enhance the features of different EEG noise pattern feature vectors based on the feature information of the original EEG signal data to construct EEG noise pattern enhanced feature vectors; the feature splicing layer is used to splice all the EEG noise pattern enhanced feature vectors with the original EEG signal data to construct the EEG signal data to be reconstructed; the EEG signal reconstruction layer is used to perform a full connection operation on the EEG signal data to be reconstructed to construct the denoised EEG signal data.

Citation Information

Patent Citations

  • Small sample feature extraction method based on electroencephalogram motor imagery

    CN113081004A

  • Electroencephalogram denoising method and device and readable storage medium

    CN113208614A