Artificial intelligence-based implantation regulation electroencephalogram signal enhancement method and computer system
Through artificial intelligence-based methods, the feature representation and perturbation suppression of implanted EEG signals is solved, and the signal denoising and continuity problems in the prior art are achieved, and higher quality EEG signal processing is achieved.
Patent Information
- Application Number
- CN202411899774.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The prior art has difficulty in effectively handling implantable EEG signals, especially in terms of noise removal and maintaining continuity and stationary signals.
Using an artificial intelligence-based method, a signal characterization vector and feature combination factor are generated by using the potential difference smoothing matrix and smoothing matrix factor for perturbation suppression, combining information from adjacent signal segments to improve signal quality.
Effective denoising of implantable EEG signals and smoothness and stationarity between signal segments are achieved, and the analysis effect and diagnostic accuracy of the signal are improved.
Smart Images

Figure CN120030320A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and more specifically, to an artificial intelligence-based implantable regulated electroencephalogram signal enhancement method and computer system. Background Art
[0002] In the field of neuroscience research and clinical diagnosis and treatment, electroencephalogram (EEG) is a non-invasive or implantable means of brain function monitoring, which is widely used in the diagnosis and treatment of various neurological diseases such as epilepsy, sleep disorders, cognitive dysfunction, etc. However, since the EEG signal itself is relatively weak and is easily affected by various factors such as various bioelectric interferences, electromagnetic noise and instrument noise, the quality of the collected original EEG signal is uneven, which seriously affects the accuracy of subsequent signal analysis, feature extraction and disease diagnosis.
[0003] Traditionally, simple filtering and denoising methods are often used for preprocessing EEG signals, such as using low-pass filters to remove high-frequency noise, or using wavelet transforms to decompose and reconstruct signals. Although these methods can improve signal quality to a certain extent, it is often difficult to take into account the continuity and stability within and between signals at the same time. Especially for implantable EEG signals, since the electrodes are fixed in position and in direct contact with brain tissue, the signal quality is more significantly affected by a variety of complex physiological factors.
[0004] In recent years, with the rapid development of machine learning technology, more and more researchers have begun to explore the application of these advanced technologies in the processing and analysis of EEG signals. By building a complex neural network model, the deep features in the EEG signal can be automatically learned to achieve intelligent denoising and feature enhancement of the signal. However, when processing EEG signals, existing machine learning methods mostly focus on the independent processing of a single signal segment, ignoring the temporal correlation and spatial continuity between signals, resulting in discontinuities or mutations between signal segments in the processed signal, affecting the analysis effect of the overall signal. Summary of the invention
[0005] The purpose of the present invention is to provide an artificial intelligence-based implantable electroencephalogram signal enhancement method and computer system. This application is implemented as follows:
[0006] In a first aspect, the present application provides an implantable regulated EEG signal enhancement method based on artificial intelligence, the method comprising: performing feature representation on a target EEG signal in an implantable EEG signal set, obtaining a first signal representation vector of the target EEG signal and a first feature combination factor corresponding to the first signal representation vector, and obtaining a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference according to the potential difference vector representation of each potential difference included in the first signal representation vector; performing disturbance suppression on the potential difference vector representation of each potential difference in the first signal representation vector through the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference, and obtaining a potential difference vector table after disturbance suppression for each potential difference. The method shows that, according to the first feature combination factor, feature information of each potential difference vector representation after potential difference disturbance suppression is merged to obtain a signal segment disturbance suppression result of the target electroencephalogram signal; if the implantable electroencephalogram signal set includes a previous signal segment adjacent to the target electroencephalogram signal, a second signal representation vector obtained by feature representation of the previous signal segment and a previous signal segment after disturbance suppression obtained by performing disturbance suppression on the previous signal segment are obtained; the second signal representation vector, the previous signal segment after disturbance suppression and the signal segment disturbance suppression result of the target electroencephalogram signal are merged to obtain a merged signal segment, and disturbance suppression is performed on the merged signal segment to obtain the target electroencephalogram signal after disturbance suppression.
[0007] In a second aspect, the present application provides a computer system comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method as described above is implemented.
[0008] The beneficial effects of the present application include at least: the present application performs feature representation on the target electroencephalogram signal in the implantable electroencephalogram signal set to obtain a first signal characterization vector of the target electroencephalogram signal and a first feature combination factor corresponding to the first signal characterization vector; based on the potential difference vector representation of each potential difference included in the first signal characterization vector, a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference are obtained; the potential difference vector representation of each potential difference in the first signal characterization vector is subjected to disturbance suppression through the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference to obtain a potential difference vector representation after the disturbance is suppressed for each potential difference; based on the first feature combination The factor combines the characteristic information of the potential difference vector representation after each potential difference disturbance suppression to obtain the signal segment disturbance suppression result of the target EEG signal. If the implantable EEG signal set includes the previous signal segment adjacent to the target EEG signal, obtain the second signal representation vector obtained by characteristic representation of the previous signal segment, and perform disturbance suppression on the previous signal segment to obtain the previous signal segment after disturbance suppression, merge the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target EEG signal to obtain a merged signal segment, and perform disturbance suppression on the merged signal segment to obtain the target EEG signal after disturbance suppression. Based on the present application, after obtaining the signal segment disturbance suppression result, the current signal segment is subjected to disturbance suppression by the disturbance suppression result of the previous signal segment, and the EEG signal in the implantable EEG signal set can be subjected to disturbance suppression within and between signals (that is, in time domain and frequency domain), so as to achieve better smoothness and stability between signal segments on the basis of accurate disturbance suppression of the EEG signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0010] Figure 1 This is a flow chart of an artificial intelligence-based implantable regulated EEG signal enhancement method provided in an embodiment of the present application.
[0011] Figure 2 It is a schematic diagram of the composition of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] The execution subject of the artificial intelligence-based implantation control EEG signal enhancement method in the embodiment of the present application is a computer system, including but not limited to a server, a personal computer, a laptop, a tablet computer, a smart phone, etc. Figure 1 A flowchart of a method for enhancing electroencephalogram signals by implantable regulation based on artificial intelligence is shown, the method comprising:
[0013] Step S100: Feature representation of the target EEG signal in the implantable EEG signal set, obtain a first signal representation vector of the target EEG signal and a first feature combination factor corresponding to the first signal representation vector, and obtain a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference based on the potential difference vector representation of each potential difference included in the first signal representation vector.
[0014] In step S100, the computer system selects a target EEG signal from the implanted EEG signal set as a processing object. These signals are usually recorded by multiple electrodes and reflect the electrical activity state of the brain at different time points. In order to perform effective analysis, the computer system first features these original signals, that is, converts them into a series of numerical vectors or matrices for further processing.
[0015] In the feature representation process, the computer system may use a variety of machine learning algorithms or neural network models to automatically learn the features of the EEG signal. For example, a convolutional neural network (CNN) can be used to process the time series data of the EEG signal. CNN can automatically extract local features in space and time from the original signal, which are essential for subsequent signal classification, denoising and other operations. For example, suppose there is a target EEG signal with a duration of 1 second, containing electrode recordings of 16 channels. The computer system will first divide this signal into multiple time windows (for example, each window contains 0.1 seconds of data), and then apply the CNN model to the signal in each window for feature extraction. The input layer of the CNN receives the multi-channel EEG signal matrix (shape [time step, number of channels]) in each time window, and finally outputs the feature vector of each time window through multiple convolutional layers, pooling layers and activation function layers.
[0016] After feature extraction, the computer system obtains a set of feature vectors, which together constitute the first signal representation vector of the target EEG signal. Each feature vector represents the key information of the original signal within a certain time window. For example, if 10 time windows are used for feature extraction and each feature vector contains 64 eigenvalues, the shape of the first signal representation vector will be [10,64].
[0017] When obtaining the first signal characterization vector, the computer system also calculates the first feature combination factor corresponding thereto. These factors are used to describe the relationship or importance between different feature vectors, which is helpful for subsequent signal processing and feature fusion.
[0018] The calculation of the feature combination factor can be designed according to the specific application scenario and requirements. One way is to use the attention mechanism to dynamically adjust the weight of each feature vector. The attention mechanism assigns an importance score (i.e., feature combination factor) to each feature vector by calculating the similarity between the input features and the query vector.
[0019] For example, in an embodiment of the present application, it is assumed that a self-attention mechanism is used to calculate a feature combination factor. For each feature vector in the first signal characterization vector, the computer system first generates a query vector (which may be a learnable parameter or obtained based on some transformation of the current feature vector), and then performs similarity calculations (such as dot product operations) on the query vector and all feature vectors, and obtains the weight of each feature vector (i.e., feature combination factor) by normalizing through a softmax function. After obtaining the first signal characterization vector and the first feature combination factor, the computer system further processes the potential difference vector representation of each potential difference to obtain a potential difference smoothing matrix and a smoothing matrix factor. These matrices and factors play a key role in the subsequent disturbance suppression step.
[0020] The potential difference vector representation refers to the feature vector corresponding to each potential difference (or time window) in the first signal representation vector. In EEG signal processing, the potential difference refers to the difference in electrical signals between adjacent electrodes or adjacent time points.
[0021] In order to obtain the potential difference smoothing matrix, the computer system can further transform or map the potential difference vector representation. One way is to transform the potential difference vector representation into two different feature spaces (for example, through different linear transformations or nonlinear activation functions), and then perform a dot multiplication operation on the vector elements in the two feature spaces to obtain the potential difference smoothing matrix.
[0022] The smoothing matrix factors are used to adjust the influence of the potential difference smoothing matrix. These factors can be calculated in a variety of ways, such as using a normalized exponential function (softmax) to normalize the smoothing matrix to obtain the smoothing weight of each element (i.e., the smoothing matrix factor).
[0023] For example, suppose the potential difference vector of a certain potential difference is expressed as [v 1 ,v 2 ,...,v n ], the computer system first maps it to two feature spaces through two linear transformation matrices A and B, and obtains a new vector representation [A v1 ,A v2 ,...,A vn ] and [B v1 ,Bv2 ,...,B vn Then, the elements at the corresponding positions are multiplied to obtain the potential difference smoothing matrix M, where M[i,j] = A vi *B vj (When i=j, it indicates autocorrelation, otherwise it indicates cross-correlation.) Finally, the softmax function is used to normalize each row of the smoothing matrix M to obtain the smoothing matrix factor F, where F[i,j] represents the smoothing weight of the i-th potential difference on the j-th feature.
[0024] Through the above steps, the computer system completes the preliminary feature representation and preprocessing of the target EEG signal, laying the foundation for subsequent signal disturbance suppression and enhancement processing.
[0025] Step S200: For the potential difference vector representation of each potential difference in the first signal characterization vector, disturbance suppression is performed through the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference to obtain the potential difference vector representation after each potential difference disturbance suppression, and feature information is merged for each potential difference vector representation after the potential difference disturbance suppression according to the first feature combination factor to obtain the signal segment disturbance suppression result of the target electroencephalogram signal.
[0026] In step S200, the computer system uses the potential difference smoothing matrix and the smoothing matrix factor to fine-tune the potential difference vector representation of each potential difference, and then integrates the processing results through the feature information merging technology to finally generate the signal segment disturbance suppression result of the target EEG signal.
[0027] In step S100, the computer system has obtained a first signal representation vector of the target electroencephalogram signal, which includes a potential difference vector representation of each potential difference. In step S200, these potential difference vector representations will be further processed to suppress noise and interference in the signal.
[0028] For each potential difference vector representation in the first signal characterization vector, the computer system first searches for the corresponding potential difference smoothing matrix and smoothing matrix factor. These matrices and factors have been calculated based on the potential difference vector representation in step S100 to describe the spatial and temporal correlations between potential differences and smoothing weights. Next, the computer system performs a matrix multiplication operation on the potential difference vector representation and the potential difference smoothing matrix to adjust each element in the potential difference vector. This step is intended to use the correlation between potential differences to smooth the signal and reduce the impact of noise. Subsequently, the computer system multiplies the result of the matrix multiplication by the smoothing matrix factor to further adjust the degree of smoothing.
[0029] For example, suppose the potential difference vector of a certain potential difference is expressed as v = [v 1 ,v2 ,…,v n ] T , the corresponding potential difference smoothing matrix is M, and the smoothing matrix factor is f = [f 1 ,f 2 ,…,f n ] T (Here, for simplicity, it is assumed that the smoothing matrix factor is a vector with the same dimension as the potential difference vector. The actual application may be more complicated.) The disturbance suppression process can be expressed as M v ⊙f; where ⊙ represents element-by-element multiplication. This operation multiplies the potential difference vector by the smoothing matrix and adjusts the result by the smoothing matrix factor to obtain the potential difference vector after noise suppression.
[0030] After the disturbance suppression process, the computer system obtains the potential difference vector representation after each potential difference disturbance is suppressed. However, these vector representations are still independent and need to be further merged to form the overall signal segment disturbance suppression result. During the merging process, the first characteristic combination factor describes the relative importance between different potential difference vector representations, which helps to give appropriate weights when merging.
[0031] The computer system performs weighted summation or a more complex fusion operation on the potential difference vector representation after disturbance suppression according to the first characteristic combination factor. The weighted summation is to assign a weight to each potential difference vector according to the characteristic combination factor and add them together to obtain the final signal segment disturbance suppression result.
[0032] In practical applications, feature information merging can also be achieved by using complex neural network layers or fusion strategies, such as attention mechanisms, gating mechanisms, or recurrent neural networks (RNNs).
[0033] For example, suppose that after the disturbance suppression process, m potential difference disturbance suppression potential difference vectors are obtained {v 1 ′,v 2 ′,…,v m ′}, and the corresponding first feature combination factor {α 1 ,α 2 ,…,α m}. The simplest way to merge is weighted summation:
[0034] Step S200 performs disturbance suppression processing on the potential difference vector representation through the potential difference smoothing matrix and the smoothing matrix factor, effectively reducing the noise and interference in the signal. Subsequently, the disturbance-suppressed potential difference vector representation is integrated into the overall signal segment disturbance suppression result through the feature information merging technology. This process not only improves the clarity and stability of the signal, but also provides a data basis for subsequent signal analysis and processing.
[0035] In practical applications, the computer system can adjust the calculation method of the potential difference smoothing matrix, the determination method of the smoothing matrix factor, and the strategy of merging feature information according to the specific EEG signal characteristics and processing requirements. By continuously optimizing these key steps, more efficient and accurate EEG signal enhancement processing can be achieved.
[0036] Step S300: If the implantable EEG signal set includes a previous signal segment adjacent to the target EEG signal, obtain a second signal representation vector obtained by performing feature representation on the previous signal segment, and a disturbance-suppressed previous signal segment obtained by performing disturbance suppression on the previous signal segment.
[0037] Before executing step S300, the computer system first determines whether there is a previous signal segment adjacent to the target EEG signal in the implantable EEG signal set. This determination process is based on the organizational structure and time sequence of the signal set. If the previous signal segment exists, the subsequent operations are continued; if not, step S300 is skipped and the next step is directly entered (such as step S400, but before this, the target signal can be specially processed or defaulted).
[0038] Once the previous signal segment is confirmed to exist, the computer system will first perform feature representation on it to extract key information and generate a second signal representation vector. This process is similar to the feature representation of the target EEG signal in step S100, but is applied to different signal segments.
[0039] The feature representation method may include using a machine learning model (such as a convolutional neural network CNN, a recurrent neural network RNN or its variant LSTM / GRU) to analyze the time series data of the previous signal segment and extract discriminative features. These features can reflect the local and global characteristics of the signal segment and provide important information for subsequent processing. For example, assume that the previous signal segment also contains data from multiple time windows, and each time window corresponds to an EEG signal segment. The computer system will use the same CNN model as step S100 (or a model optimized for the characteristics of the previous signal segment) to perform convolution, pooling and activation operations on the signal segments of each time window, and finally generate a second signal representation vector containing multiple feature vectors. Each feature vector represents the key information of the signal within a time window.
[0040] After obtaining the second signal representation vector, the computer system will then perform disturbance suppression processing on the representation vector to remove or reduce the noise and interference components in the previous signal segment. This process is similar to the disturbance suppression of the target EEG signal in step S200, but the calculation method of the smoothing matrix and the smoothing factor can be adjusted according to the characteristics of the previous signal segment.
[0041] The disturbance suppression process, for example, includes: based on each potential difference vector representation in the second signal characterization vector, calculating the corresponding potential difference smoothing matrix and smoothing factor. These matrices and factors reflect the spatial and temporal correlation between the potential differences, as well as the degree of smoothing. The potential difference vector representation is multiplied with the corresponding potential difference smoothing matrix and multiplied by the smoothing factor to adjust each element in the potential difference vector to achieve the purpose of suppressing noise. If the disturbance suppression is performed independently at the feature level, then after completing the disturbance suppression of all potential differences, the disturbance suppression results of each potential difference can also be combined according to the feature combination factor to form the previous signal segment after the overall disturbance suppression. For example, assume that the computer system has calculated the corresponding potential difference smoothing matrix M for each potential difference vector representation of the previous signal segment. i and the smoothing factor f i (where i represents the index of the potential difference). The disturbance suppression process can be expressed as: the potential difference vector after suppression i =M i ×Original potential difference vector i ×f i .
[0042] After performing the above operations on all potential differences, a set of potential difference vectors after disturbance suppression is obtained. If these potential difference vectors are processed independently, they can also be combined according to the characteristic combination factor α i A weighted summation or other form of merging is performed to generate a final disturbance-suppressed representation of the previous signal segment.
[0043] After completing the above steps, the computer system will have the previous signal segment after disturbance suppression and the current processing state of the target EEG signal (i.e., the output of step S200). This information will be used in subsequent steps (such as step S400) to further optimize the processing effect of the target EEG signal, by considering the continuity and correlation between adjacent signal segments, to improve the accuracy and stability of the overall signal processing.
[0044] Step S300 ensures that the information of adjacent signal segments can be fully utilized when processing the target EEG signal. By obtaining the feature representation of the previous signal segment and performing disturbance suppression processing, the computer system provides a more comprehensive and accurate data basis for subsequent steps, improving the efficiency and quality of signal processing.
[0045] Step S400: merging the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target EEG signal to obtain a merged signal segment, and performing disturbance suppression on the merged signal segment to obtain the target EEG signal after disturbance suppression.
[0046] In step S400, the computer system combines the previous signal segment (after feature representation and disturbance suppression processing) with the current processing result of the target EEG signal to form a more comprehensive signal representation, and further suppresses disturbances to obtain a clearer and more stable EEG signal.
[0047] At the beginning of step S400, the computer system first merges the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target EEG signal to construct a merged signal segment. This merging process needs to comprehensively consider the temporal continuity, spatial correlation and feature importance of the signal.
[0048] The construction of the merged signal segment can be carried out in a variety of ways, including but not limited to direct concatenation, weighted averaging, feature fusion, etc. The selection of a specific method depends on the characteristics of the signal and the processing requirements.
[0049] Here is an example of one possible merge approach:
[0050] First, ensure that the previous signal segment is aligned with the target EEG signal on the time axis so that subsequent processing can consider the temporal continuity between the signals. If the feature dimensions of the second signal representation vector and the signal segment perturbation suppression result of the target EEG signal are inconsistent, feature mapping or dimensionality reduction / increase operations are performed to make them have the same feature space. For the time-aligned signal segments, weighted averages can be performed according to their relative importance (such as calculated by feature combination factors or attention mechanisms). For example, a learnable weight matrix can be used to weight the second signal representation vector and the previous signal segment after perturbation suppression, and then merged with the signal segment perturbation suppression result of the target EEG signal. In addition to simple weighted averaging, more complex feature fusion strategies can also be adopted, such as using neural network layers (such as fully connected layers, convolutional layers, etc.) to further process the merged features to extract higher-level feature representations.
[0051] For example, assuming that the second signal representation vector is V 2 ∈R m×n (where R is the set of all real numbers, m is the number of features, and n is the number of time windows), and the previous signal segment after disturbance suppression is S prev ∈R p×q (where R is the set of all real numbers, p is the number of channels or features, and q is the time step), the signal segment disturbance suppression result of the target EEG signal is S target ∈R r×s (R is the set of all real numbers, r is the number of channels or features, and s is the time step.) To merge these signal segments, the computer system may first map V 2 Convert to Sprev and S target Representation of the same feature space V 2 ′∈R p×n .
[0052] Then, the weight of each signal segment is calculated using an attention mechanism or a learnable weight matrix and weighted averaged. For example, suppose the weights are α prev and α target (For V 2 ′, which can be regarded as a supplement to the previous signal segment feature and assigned a corresponding weight α 2 ), then the merged signal segment S merged It can be expressed as:
[0053] S merged =A+B;
[0054] Where A = α prev ·reshape(S prev ,[p,n]);
[0055] B=α 2 ·V 2 ′+α target ·reshape(S target ,[p,max(n,s)]);
[0056] The reshape function is used here to ensure that the signal segments are aligned in the time dimension (or to select the largest time step as the merged time step and pad or truncate the shorter signal segments).
[0057] After obtaining the merged signal segment, the computer system will further perform disturbance suppression processing on it to remove or reduce the noise and interference components in the signal. This process is similar to the disturbance suppression of a single signal segment in step S200, but can be adjusted according to the characteristics of the merged signal segment. The disturbance suppression method includes, for example, the use of smoothing filters, wavelet transforms, sparse representations, low-rank approximations, etc., or combined with machine learning models (such as deep neural networks) for adaptive noise suppression.
[0058] The following is an example of a disturbance suppression method based on deep learning: First, a neural network model is designed that can receive the merged signal segment as input and output the disturbance suppressed signal. The network structure may include convolutional layers, pooling layers, activation function layers, attention layers, etc., which are used to extract signal features, suppress noise and retain useful information. The disturbance suppression network is trained using an EEG signal dataset with noise suppression labels. During the training process, the network parameters are optimized by minimizing the loss function (such as mean square error MSE, structural similarity SSIM, etc.). The merged signal segment is input into the trained disturbance suppression network to obtain the target EEG signal after disturbance suppression.
[0059] For example, suppose a disturbance suppression model based on a convolutional neural network has been trained, which includes multiple convolutional layers for feature extraction, an attention layer for dynamically adjusting feature weights, and an upsampling layer for restoring the temporal resolution of the signal. In step S400, the computer system merges the signal segment S merged After being input into the model and processed by multiple layers of convolution and attention mechanism, the feature map after disturbance suppression is obtained. Then, the feature map is restored to the time resolution of the original signal through the upsampling layer, and finally the target EEG signal S after disturbance suppression is obtained. final .
[0060] Step S400 integrates the information of adjacent signal segments and uses advanced technologies such as deep learning to further suppress disturbances on the merged signal segments, effectively improving the clarity and stability of the EEG signal. This process not only takes into account the temporal continuity and spatial correlation between signals, but also makes full use of the powerful feature extraction and noise suppression capabilities of the machine learning model.
[0061] In one embodiment, step S100, performing feature representation on a target electroencephalogram signal in an implantable electroencephalogram signal set to obtain a first signal representation vector of the target electroencephalogram signal and a first feature combination factor corresponding to the first signal representation vector, may include:
[0062] Step S110: performing different levels of feature representation on the target EEG signal in the implantable EEG signal set to obtain a first signal representation vector and a first feature combination factor at each feature representation level.
[0063] Based on this, step S200, for each potential difference in the first signal characterization vector, the potential difference vector representation of each potential difference is subjected to disturbance suppression by using the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference, to obtain the potential difference vector representation after each potential difference disturbance is suppressed, and the potential difference vector representation after each potential difference disturbance is suppressed is subjected to feature information merging according to the first feature combination factor, to obtain the signal segment disturbance suppression result of the target electroencephalogram signal, which may include:
[0064] Step S210: for each potential difference vector representation in the first signal representation vector corresponding to each feature representation level, disturbance suppression is performed using a potential difference smoothing matrix and a smoothing matrix factor corresponding to the potential difference vector representation to obtain a disturbance-suppressed potential difference vector representation corresponding to each potential difference;
[0065] Step S220: Merge feature information of the potential difference vector representation after disturbance suppression of each potential difference at different feature representation levels according to the first feature combination factor corresponding to each feature representation level to obtain a signal segment disturbance suppression result of the target EEG signal.
[0066] In step S100, the computer system performs multi-level feature representation on the target EEG signal in the implantable EEG signal set to extract key information at different abstract levels in the signal. This process not only helps to capture the local details of the signal, but also reveals the global characteristics of the signal, providing a rich feature set for subsequent signal processing and analysis.
[0067] In step S110, the computer system first defines a set of feature representation levels, each of which is designed to capture different aspects of the signal. These levels can range from simple statistical features (such as mean, variance) to complex pattern recognition features (such as time-frequency features, spatial patterns). By gradually increasing the complexity and abstraction level of the features, the system is able to more fully understand the nature of the EEG signal.
[0068] Assume that three feature representation levels are defined: L1 (basic statistical features), L2 (time-frequency features) and L3 (deep features).
[0069] L1 (basic statistical features): including the signal's mean, standard deviation, skewness, kurtosis and other basic statistics. These features are easy to calculate and can quickly give the overall distribution of the signal.
[0070] L2 (time-frequency characteristics): Use short-time Fourier transform (STFT), wavelet transform and other methods to extract the time-frequency distribution characteristics of the signal. These characteristics can reveal the energy distribution of the signal at different times and frequencies, and are particularly useful for analyzing non-stationary signals.
[0071] L3 (deep features): Automatically learn high-level abstract features from raw signals by training a deep learning model such as a convolutional neural network (CNN) or a recurrent neural network (RNN). These features are usually difficult to describe with simple rules, but have extremely high discrimination and generalization capabilities for specific tasks (such as signal classification and denoising).
[0072] For each feature representation level, the computer system performs the following steps to extract features: First, the target EEG signal is subjected to necessary preprocessing, such as filtering, detrending, and resampling, to eliminate unnecessary noise and interference, while making the signal format uniform for subsequent processing.
[0073] Then, feature calculation is performed. For the L1 level, the mean, standard deviation and other statistics of the signal are directly calculated. For example, for an EEG signal x=[x 1 ,x 2 ,…,x N ], its mean μ and standard deviation σ can be calculated by the following formulas:
[0074]
[0075]
[0076] For the L2 level, short-time Fourier transform (STFT) can be applied to extract time-frequency features. The signal is divided into multiple overlapping time windows, and FFT transform is applied to each window to obtain the energy distribution map in the time-frequency plane. Then, various statistics (such as energy mean, maximum value position, etc.) can be extracted from the distribution map as features.
[0077] For the L3 level, the original signal can be input into a pre-trained deep learning model (such as CNN or RNN), and the model automatically outputs a series of high-level abstract features. These features are usually the activation values of the hidden layer of the model, which can be used for subsequent analysis after appropriate processing.
[0078] For each level, all the extracted features are combined into a feature vector. For example, at the L1 level, the feature vector may be [μ, σ, skewness, kurtosis]; at the L2 level, the feature vector may contain time-frequency statistics of multiple time windows; at the L3 level, the feature vector is the activation value sequence output by the deep learning model.
[0079] In addition to the feature vectors, the computer system can also calculate the first feature combination factors corresponding to each feature representation level. These factors are used to describe the relative importance or weight between different feature vectors. In practical applications, feature combination factors can be obtained through a variety of methods, such as data-driven learning algorithms, expert knowledge rules, etc.
[0080] For example, suppose the target EEG signal is a single-channel signal with a length of 1024 sampling points. At the L1 level, the mean, standard deviation, skewness and kurtosis of the signal are extracted as features to obtain the feature vector f L1=[μ,σ,skewness,kurtosis]. At the L2 level, the signal is divided into 32 overlapping time windows, each with a length of 128 samples and a step size of 64 samples. The STFT transform is applied to each window, and the energy mean and maximum position are extracted from the time-frequency distribution as features, finally obtaining a feature vector fL2 containing 64 features (32 windows × 2 features / window). At the L3 level, the signal is input into a pre-trained CNN model, and 128 activation values are extracted from the last convolutional layer as the feature vector fL3.
[0081] At the same time, the computer system may calculate the feature combination factor α of each level through some mechanism (such as attention mechanism, optimization algorithm, etc.) L1 , α L2 and α L3 , these factors will be used in the subsequent feature information merging step.
[0082] In step S200, the computer system performs disturbance suppression processing on the target EEG signal using the multi-level feature representation extracted in step S100. By applying the potential difference smoothing matrix and the smoothing matrix factor, the system can effectively remove noise and interference components in the signal while retaining useful physiological information.
[0083] In step S210, the computer system applies the corresponding potential difference smoothing matrix and smoothing matrix factor to each potential difference vector representation in the first signal representation vector at each feature representation level for disturbance suppression. This process aims to use the spatial and temporal correlation between potential differences to smooth the signal and reduce the impact of noise.
[0084] In step S100, when the potential difference vector representation of each potential difference is extracted, the computer system may have calculated the corresponding potential difference smoothing matrix and smoothing matrix factor based on these vector representations. The calculation methods of these matrices and factors may vary depending on the specific definition of the potential difference and the signal characteristics, but generally involve some correlation measurement between the potential difference vectors (such as covariance matrix, similarity matrix, etc.) and the allocation strategy of smoothing weights.
[0085] Assume that we have expressed v for each potential difference vector i (where i represents the index of the potential difference) the corresponding potential difference smoothing matrix M is calculated i and the smoothing matrix factor f i In practical applications, M i It may be a square matrix whose elements represent the correlation between different elements in the potential difference vector; f i Probably a i A vector of the same dimension used to adjust the degree of smoothing.
[0086] For each potential difference vector representation v in the first signal representation vector at each feature representation level i , the computer system performs the following disturbance suppression steps:
[0087] The potential difference vector is represented by v i The corresponding potential difference smoothing matrix M i A matrix multiplication operation is performed to adjust each element in the potential difference vector. This step aims to smooth the signal by exploiting the spatial correlation between the potential differences. i ′=M i v i ; where v i ′ represents the potential difference vector after smoothing.
[0088] Alternatively, the smoothed potential difference vector vi′ and the corresponding smoothing matrix factor f i Perform element-by-element multiplication (assuming f i Has been expanded to be compatible with v i ′) to further adjust the degree of smoothing. i ″=v i ′⊙f i ; where ⊙ represents element-by-element multiplication, v i ″ represents the potential difference vector after the final disturbance suppression.
[0089] For example, suppose that at a certain feature representation level, there is a potential difference vector v 1 =[v 11 ,v 12 ,…,v 1n ] T (where n represents the vector dimension), the corresponding potential difference smoothing matrix is
[0090]
[0091] The smoothing matrix factor is f 1 =[f 11 ,f 12 ,…,f 1n ] T According to the above disturbance suppression process, first calculate the smoothed potential difference vector v 1 ′=M 1 v 1 , and then get the final disturbance suppressed potential difference vector v 1 ″=v 1 ′⊙f 1 .
[0092] In step S220, the computer system uses the first feature combination factor corresponding to each feature representation level calculated in step S110 to merge the potential difference vector representations after disturbance suppression at different feature representation levels to obtain the signal segment disturbance suppression result of the target EEG signal. This process comprehensively considers the feature information of the signal at different abstract levels, which helps to improve the accuracy and robustness of signal processing.
[0093] There are many ways to merge feature information, including but not limited to weighted averaging, feature concatenation, attention mechanism, etc. The choice of specific method depends on the characteristics of the signal and the processing requirements.
[0094] For each signal segment in the target EEG signal (which may contain multiple potential differences), the above weighted average process is repeated to obtain a combined potential difference vector sequence for each signal segment. Then, these vector sequences are arranged in chronological order to form the final signal segment disturbance suppression result.
[0095] For example, suppose there are three feature representation levels L1, L2 and L3, and each level is subjected to disturbance suppression to obtain the corresponding potential difference vector representation set {v 1,i ″},{v 2,i ″},{v 3,i ″} (where i represents the index of the potential difference). At the same time, it is known that the characteristic combination factor of each level is α 1 ,α 2 ,α 3 (and α 1 +α 2 +α 3 =1).
[0096] For a certain signal segment (containing multiple potential differences) in the target EEG signal, perform weighted average merging on each potential difference: v merged,i =α 1 v 1,i ″+α 2 v 2,i ″+α 3 v 3,i ″; where v merged,i represents the potential difference vector after the ith potential difference is merged. Then, all the merged potential difference vectors are arranged in time order to form the disturbance suppression result of the signal segment. By repeating this process, a corresponding disturbance suppression result can be generated for each signal segment in the target EEG signal.
[0097] In step S100, the system defines multiple feature representation levels and extracts feature vectors and feature combination factors at each level. In step S200, the system uses the potential difference smoothing matrix and smoothing matrix factor to perform disturbance suppression processing on the potential difference vector representation at each level, and integrates the feature information of different levels through the feature information merging method to obtain the final signal segment disturbance suppression result. This process not only improves the clarity and stability of the EEG signal, but also provides strong support for subsequent signal analysis and diagnosis.
[0098] In one embodiment, step S220, merging feature information of the potential difference vector representation after disturbance suppression of each potential difference at different feature representation levels according to the first feature combination factor corresponding to each feature representation level to obtain a signal segment disturbance suppression result of the target electroencephalogram signal, may include:
[0099] Step S221: perform a pooling operation on the potential difference vector representation with a sequence of 2 in the feature representation hierarchy according to an arrangement from low to high, obtain a pooling operation result, and interpolate the pooling operation result to obtain a first interpolation vector representation, and interpolate the potential difference vector representation with a sequence of 1 to obtain a second interpolation vector representation.
[0100] Step S221 performs pooling and interpolation operations on the potential difference vector representations from different feature representation levels so as to effectively merge the feature information in subsequent steps. In this step, the computer system follows the order of the feature representation levels from low to high, performs a pooling operation on the potential difference vector representation with a sequence of 2, and then interpolates the pooling result to obtain a first interpolation vector representation that matches the dimension of the potential difference vector representation with a sequence of 1. At the same time, the potential difference vector representation with a sequence of 1 is also interpolated to generate a second interpolation vector representation. The following is a detailed explanation of step S221, including specific examples and descriptions of the calculation process. Pooling is a dimensionality reduction technique that reduces the spatial size of the data (i.e., the dimension of the feature vector) by aggregating statistics on the local area of the feature vector, thereby reducing the amount of calculation and the number of parameters, while retaining important features. In step S221, the computer system performs a pooling operation on the potential difference vector representation in the feature representation level with a sequence of 2.
[0101] There are many pooling methods, the most common ones are Max Pooling and Average Pooling. In this application, the choice of pooling method depends on the specific application requirements and signal characteristics. For example, if the goal is to retain the strongest response in the signal (which may be a potential change caused by a specific event), you may tend to use Max Pooling; if the goal is to smooth the signal and reduce the impact of noise, Average Pooling may be more appropriate.
[0102] The pooling operation requires setting the pooling window size and step size. The pooling window size determines the size of the local area covered by each pooling operation, while the step size determines the movement interval of the pooling window on the feature vector. In step S221, the computer system needs to reasonably set these parameters according to the dimensions of the potential difference vector represented by the 2-level potential difference vector and the dimensions of the potential difference vector represented by the 1-level potential difference vector, so as to ensure that the pooling result can match the vector dimension of the 1-level vector through the interpolation operation.
[0103] For example, suppose a potential difference vector of level 2 is represented by v 2,i =[v 2,i1 ,v 2,i2 ,v 2,i3 ,v 2,i4 ], and decided to use the maximum pooling method, the pooling window size is 2, and the step size is also 2. The pooling operation can be expressed as:
[0104] Pooling result = [max(v 2,i1 ,v 2,i2 ),max(v 2,i3 ,v 2,i4 )];
[0105] Assume v 2,i1 =0.5,v 2,i2 =0.3,v 2,i3 =0.8,v 2,i4 =0.6, the pooling result is [0.5,0.8].
[0106] Interpolation is a method of estimating the value of an unknown data point through known data points. In step S221, the interpolation operation is used to expand the pooled potential difference vector representation (whose dimension may be reduced due to pooling) to the same dimension as the potential difference vector representation of the first level in sequence, so as to facilitate subsequent feature merging. At the same time, in order to maintain the consistency of the feature representation, the potential difference vector representation of the first level in sequence is also interpolated for feature representation (although in some cases, this may be just a simple dimension confirmation or format adjustment).
[0107] There are also many interpolation methods, such as linear interpolation, polynomial interpolation, spline interpolation, etc. In the scenario of implantable control EEG signal enhancement, linear interpolation is often used due to its simplicity and computational efficiency, while for situations that require higher accuracy, more complex interpolation methods can be considered.
[0108] In step S221, the computer system calculates interpolation points based on the pooling result and the target dimension. For linear interpolation, this usually involves calculating the slope between two known points and using the slope to estimate the value of the intermediate point.
[0109] For example, continuing the above pooling example, assume that the dimension of the potential difference vector representation of level 1 is 4 (the same as the original v2,i), and the pooling result [0.5,0.8] needs to be expanded to the same dimension. Using linear interpolation, additional values can be inserted between the two pooling results. A simple way is to keep the first and last values unchanged and evenly interpolate values between them (although this is not necessarily the optimal interpolation method, it is only used as an example): The first interpolation vector representation = [0.5, interp 1 ,interp 2 ,0.8]; where interp 1 and interp 2 is the intermediate value obtained by interpolation. In the simplest linear interpolation, you can choose interp 1 =0.5+31×(0.8-0.5)=0.6 (assuming that two points are evenly inserted between the two pooled values, so the interval is 31 of the total interval). Similarly, interp 2 However, please note that this interpolation method may not be optimal, especially when the signal characteristics are complex and changeable. In practical applications, a more appropriate interpolation method can be selected or interpolation parameters can be adjusted according to the specific characteristics of the signal.
[0110] For the potential difference vector v of the first level, 1,i , if its dimension already matches the target dimension, the interpolated feature representation may just be to confirm its dimension or make simple format adjustments (such as data type conversion, standardization, etc.). But if the dimension does not match, a similar interpolation method needs to be applied to adjust its dimension.
[0111] Step S221 aligns the potential difference vector representations from different feature representation levels in dimension through pooling and interpolation operations, in preparation for the subsequent merging of feature information. The pooling operation reduces the spatial size of the data and retains important features, while the interpolation operation ensures the consistency of feature vectors at different levels in dimension. By reasonably selecting the pooling method and the interpolation method, the computer system can more effectively process and fuse multi-level feature information, thereby improving the enhancement effect of the implanted regulated EEG signal.
[0112] Step S222: According to the potential difference vector representation of sequence 2, the first interpolation vector representation, the second interpolation vector representation and the first feature combination factor corresponding to the potential difference vector representation of sequence 2, feature information merging and smoothing processing is performed on the potential difference vector representation of sequence 2 to obtain the potential difference vector representation of sequence 2 after disturbance suppression.
[0113] Step S222 combines and smoothes the feature information of the potential difference vector representations from different feature representation levels and their corresponding interpolation results, aiming to enhance the signal quality and remove noise components by combining multi-level feature information, thereby obtaining a clearer and more stable EEG signal.
[0114] In step S222, the computer system first represents the potential difference vector (denoted as v 2,i ), its corresponding first interpolation vector representation (denoted as i 2,i , obtained by interpolation of the pooling result), the second interpolation vector represented by the potential difference vector represented by 1 in sequence (denoted as i 1,i ) and the potential difference vector of sequence 2 represents the corresponding first characteristic combination factor (denoted as α 2 ) to merge feature information. The merging of feature information is a complex process. It is not just a simple numerical addition or concatenation, but it needs to take into account the intrinsic connection and relative importance between feature vectors at different levels.
[0115] One strategy for merging feature information is to use a weighted merging method, in which each feature vector is assigned a weight according to its importance, and then these weighted feature vectors are combined to form the final merged result. In this example, the potential difference vector v 2,i And the first interpolation vector after interpolation represents i 2,i (Although in practice, i 2,i It may be more as auxiliary information rather than directly participating in weighted merging) and the second interpolation vector representation i of the first level in sequence 1,i By combining the feature factor α 2 to balance their impact on the final merge result.
[0116] Due to the direct 2,i 、i 2,i and i 1,i Weighted merging may not be the best choice because i 2,i It is based on v 2,i There is some information redundancy between them. Therefore, in another embodiment, v 2,i with i that has been adjusted or transformed in some way 1,i to merge.
[0117] For example, suppose v 2,i =[v 2,i1 ,v 2,i2 ,…,v 2,in ], where n is the pooled v 2,i Dimension; i 1,i =[i 1,i1,i 1,i2 ,…,i 1,im ], where m is the original dimension of the potential difference vector representation of the first level, and m>n. To merge these two vectors, we can first transform i by some means (such as linear transformation, convolution operation, or neural network layer). 1,i Mapped to a 2,i The space with the same dimension is obtained to obtain the adjusted second interpolation vector representation i 1,i ′=[i 1,i1 ′,i 1,i2 ′,…,i 1,in ′].
[0118] Then, using the feature combination factor α 2 v 2,i and i 1,i 'Weighted merging:
[0119] v merged,i =α 2 v 2,i +(1-α 2 )i 1,i ′; here (1-α 2 )i 1,i The ′ part may not directly participate in the merger in this form, but may act as a regularization term or constraint to affect v 2,i adjustment process.
[0120] After the feature information is merged, in order to remove the noise or small fluctuations that may be introduced in the merging process, the computer system usually smoothes the merged result. Such as low-pass filtering, median filtering, moving average, etc. In this example, since the data processed is in the form of vectors rather than images or time series data, it is more likely to adopt a smoothing method based on mathematical operations. In the embodiment of the present application, it is more implicit in the process of merging feature information. For example, if the merging strategy itself has a smoothing effect (such as using a neural network layer or regularization term with smoothing characteristics), an explicit smoothing step is no longer required. If there is indeed obvious noise or fluctuation in the merged result, it can be considered to apply additional smoothing techniques after the merge.
[0121] For example, if the feature information merging strategy (such as the weighted merging combined with feature adjustment described above) already has a built-in smoothing mechanism (for example, through the activation function or regularization term of the neural network layer), no additional smoothing step is required. If the merged result is noisy or volatile, you can consider applying explicit smoothing techniques. For example, you can use a moving average filter to smooth the merged vector:
[0122]
[0123] where k is the radius of the filter, and v merged,i,j is the j-th element of the i-th potential difference in the merged vector, and is the corresponding element after smoothing processing.
[0124] In step S222, the potential difference vector representations from different feature representation levels and their interpolation results are merged and smoothed for feature information to enhance the quality of the electroencephalogram (EEG) signal and remove noise. During the merging process, the computer system adopts a weighted merging strategy and combines feature combination factors to balance the influence of different-level feature vectors on the merging result.
[0125] Step S223: Filter the potential difference vector representations with sequential order 1 in the arrangement method, then continue to perform a pooling operation on the potential difference vector representations with sequential order 2 in the arrangement method from low to high feature representation levels to obtain a pooling operation result, and perform an interpolation operation on the pooling operation result to obtain a first interpolation vector representation, perform an interpolation feature representation on the potential difference vector representations with sequential order 1 to obtain a second interpolation vector representation, stop when the potential difference vector representation with sequential order 2 is the last potential difference vector representation in the arrangement method, and use the potential difference vector representation after perturbation suppression of the obtained potential difference vector representation with sequential order 2 as the signal segment perturbation suppression result of the target EEG signal.
[0126] In step S223, the computer system follows the arrangement order from low to high feature representation levels and performs iterative processing on the potential difference vector representations of each pair of adjacent levels (assumed to be levels with sequential order 1 and sequential order 2). This processing flow includes the following key steps:
[0127] Filter the potential difference vector representations with sequential order 1: At the beginning of each iteration, the system first "filters" out the potential difference vector representations of the level with sequential order 1 that have been processed in the previous iteration. Here, "filtering" does not mean that these vectors are deleted or discarded, but rather that they are not directly processed in the current iteration because their information has been incorporated into the potential difference vector representations of higher levels through interpolation and feature merging.
[0128] Perform a pooling operation on the potential difference vector representations with sequential order 2: Then, the system performs a pooling operation on the potential difference vector representations of the level with sequential order 2 to reduce the spatial size of the data and retain important features. The specific method of the pooling operation (such as max pooling, average pooling, etc.) and parameters (such as pooling window size, stride, etc.) are selected according to the signal characteristics and processing requirements.
[0129] Interpolation of pooling results: The vector dimension obtained after the pooling operation may change. In order to keep the dimension consistent with the potential difference vector representation (or its interpolation result) of the first level, the system needs to interpolate the pooling result. The selection of interpolation method and the setting of interpolation parameters also depend on the specific application scenario and signal characteristics.
[0130] Interpolated feature representation of potential difference vector representations with order 1: Although the potential difference vector representations with order 1 are no longer directly involved in the current iteration, the system still needs to interpolate feature representations for them (if their dimensions do not match the current processing level). This step ensures that the feature vectors of different levels are consistent in dimension when the features are merged.
[0131] After completing the above steps, the system performs feature information merging and smoothing based on the potential difference vector representation of the second level (or its interpolation result), the interpolation result of the potential difference vector representation of the first level, and the corresponding feature combination factor. This step aims to fuse multi-level feature information and remove noise and small fluctuations through smoothing.
[0132] The system repeats the above steps until all feature representation levels that need to be merged are processed. When the potential difference vector representation with a sequence of 2 is the last potential difference vector representation in the arrangement, the iteration is terminated, and the potential difference vector representation with a sequence of 2 obtained at this time (after disturbance suppression and smoothing) is output as the signal segment disturbance suppression result of the target EEG signal.
[0133] For example, suppose there are two feature representation levels L1 and L2, where L1 is the lower level and L2 is the higher level. In each level, there is a series of potential difference vector representations, corresponding to different time periods or spatial positions in the EEG signal.
[0134] Assume that the potential difference vector representation of the L1 level has been preliminarily processed and is ready to be merged with the potential difference vector representation of the L2 level. In the first iteration, since L1 is the lowest level, there is no "previous" level to filter. 2,1 Perform pooling operation and obtain the pooling result p 2,1 . For the pooling result p 2,1 Perform interpolation operation to obtain the first interpolation vector representation i 2,1 , so that its dimension is the same as the corresponding potential difference vector v at the L1 level 1,1 matches (or is close to). If v 1,1 The dimension and i 2,1 If it does not match, then interpolate the feature representation to obtain the second interpolation vector representation i 1,1But in this case, we assume that their dimensions match, so i 1,1 =v 1,1 According to i 2,1 、i 1,1 And the feature combination factor α corresponding to the L2 level 2 , perform feature merging and smoothing to obtain the potential difference vector representation v after disturbance suppression 2,1 ′. For the subsequent potential difference vector representation of the L2 level (such as v 2,2 、v 2,3 The system repeats the above steps of pooling, interpolation, feature merging and smoothing. In each iteration, the potential difference vector representation of the L1 level that has been processed in the previous iteration is "filtered" out (although in actual operation, this is more of a logical "filtering" because the information of the L1 level has been integrated into the L2 level through interpolation and feature merging).
[0135] When the last potential difference vector representation of the L2 level is processed, the iteration ends. At this time, the potential difference vector representation sequence obtained after disturbance suppression (such as v 2,1 ′、v 2,2 ′、v 2,3 ′, etc.) is the signal segment disturbance suppression result of the target EEG signal. Step S223 iteratively processes the potential difference vector representation of different feature representation levels, gradually fuses the multi-level feature information, and removes noise and small fluctuations through pooling, interpolation and feature merging smoothing, and finally obtains a clear and stable target EEG signal segment disturbance suppression result. This process improves the signal quality and provides a reliable data basis for subsequent EEG signal analysis and application.
[0136] In one embodiment, step S222, according to the potential difference vector representation of sequence 2, the first interpolation vector representation, the second interpolation vector representation, and the first characteristic combination factor corresponding to the potential difference vector representation of sequence 2, performs characteristic information merging and smoothing processing on the potential difference vector representation of sequence 2 to obtain the potential difference vector representation after disturbance suppression of the potential difference vector representation of sequence 2, may specifically include:
[0137] Step S2221: multiply the first interpolation vector representation by the characteristic combination factor corresponding to the potential difference vector representation of sequence 2 to obtain the filtered disturbance of the potential difference vector representation of sequence 2;
[0138] Step S2222: multiply the second interpolation vector representation by the characteristic combination factor corresponding to the potential difference vector representation of sequence 2 to obtain the compensation disturbance of the potential difference vector representation of sequence 2;
[0139] Step S2223: subtract the potential difference vector representation of sequence 2 from the filtered disturbance, and then add the subtraction result to the compensation disturbance to obtain the potential difference vector representation of sequence 2 after the disturbance is suppressed.
[0140] In step S222, the computer system merges and smoothes the feature information of the potential difference vector representations from different feature representation levels through a series of sophisticated operations, aiming to remove noise, enhance signal quality, and generate a disturbance-suppressed potential difference vector representation. This process pays special attention to how to effectively combine the potential difference vector representation of order 2 (representing the features of the higher level), its corresponding first interpolation vector representation (obtained by interpolation after pooling to match the dimensions of the lower level), the second interpolation vector representation (obtained by interpolation of the potential difference vector representation of order 1), and the first feature combination factor corresponding to the potential difference vector representation of order 2 (reflecting the importance of the features at this level).
[0141] In step S2221, the computer system first focuses on how to use the first interpolation vector representation (denoted as i 2,i , obtained by interpolating the potential difference vector representation of the 2-level potential difference vector after pooling) and the potential difference vector representation of the 2-level potential difference vector (denoted as v 2,i ) corresponding to the feature combination factor (denoted as α 2 ) to generate a "filter disturbance". The "filter disturbance" here can be understood as an adjustment based on feature importance, which aims to perform a certain form of "filtering" on the potential difference vector representation of sequence 2 through the first interpolation vector representation to remove noise or unnecessary information therein.
[0142] Assume that the potential difference vector of sequence 2 is represented by v 2,i =[v 2,i1 ,v 2,i2 ,v 2,i3 ], the corresponding first interpolation vector is represented as i 2,i =[i 2,i1 ,i 2,i2 ,i 2,i3 ] (Here we assume that the two dimensions are the same, and interpolation adjustment can be performed in actual situations), and the feature combination factor is α 2 =0.7.
[0143] According to step S2221, the computer system multiplies the first interpolation vector representation with the feature combination factor to obtain the filtered disturbance f filter,i :f filter,i =α 2 ·i 2,i =[0.7·i 2,i1 ,0.7·i 2,i2 ,0.7·i 2,i3].
[0144] In step S2222, the computer system uses the second interpolation vector representation (denoted as i 1,i , obtained by interpolation of potential difference vectors representing the first level in sequence) and the same characteristic combination factor α 2 To generate another disturbance, namely "compensation disturbance". Different from the filtering disturbance, the compensation disturbance aims to compensate or adjust the potential difference vector representation of level 2 in some form by introducing feature information of level 1 to enhance the overall quality and stability of the signal.
[0145] Assume that the second interpolation vector is represented by i 1,i =[i 1,i1 ,i 1,i2 ,i 1,i3 ](Here we also assume that the dimension is the same as v 2,i and i 2,i same), then according to the description of step S2222, the computer system generates a compensation disturbance f comp,i :f comp,i =α 2 ·i 1,i =[0.7·i 1,i1 ,0.7·i 1,i2 ,0.7·i 1,i3 ].
[0146] It can be understood that the above “·” represents multiplication.
[0147] Similar to the filtering perturbation, the compensation perturbation is also a weighted second interpolation vector representation. It does not directly affect v 2,i It is not a compensation operation, but rather a component of the subsequent feature merging and smoothing process.
[0148] In step S2223, the computer system combines the filtered disturbance and the compensated disturbance generated in the previous step with the original potential difference vector representation of order 2, and generates a disturbance-suppressed potential difference vector representation through a specific operation. The operation process here is actually a fusion and adjustment process of feature information, which aims to enhance the quality of the signal and remove noise by introducing feature information of different levels.
[0149] Step S2223 represents the potential difference vector v of the original sequence 2 2,i Adjust the potential difference vector after denoising to get v 2,i ′=Denoise(v 2,i ,f filter,i ). Then the denoised and adjusted potential difference vector is represented by v 2,i ′ and compensation disturbance f comp,iIn practical applications, weighted summation can be used for merging.
[0150] Subtract the filtered disturbance:
[0151] v temp,i =v 2,i -f filter,i =[v 2,i1 -0.7·i 2,i1 ,v 2,i2 -0.7·i 2,i2 ,v 2,i3 -0.7·i 2,i3 ];
[0152] Then add the compensating disturbance:
[0153] v 2,i ″=v temp,i +f comp,i =[v 2,i1 -0.7·i 2,i1 +0.7·i 1,i1 ,…];
[0154] The final v 2,i ″ is the potential difference vector representation after disturbance suppression.
[0155] In one embodiment, step S110, performing different levels of feature representation on the target EEG signal in the implanted EEG signal set to obtain a first signal representation vector and a first feature combination factor at each feature representation level, may include: performing different levels of feature representation on the target EEG signal in the implanted EEG signal set through a feature representation network that has been debugged in advance to obtain a first signal representation vector of the target EEG signal at each feature representation level and a first feature combination factor corresponding to the first signal representation vector, wherein the feature representation network that has been debugged in advance is debugged based on multiple groups of implanted EEG signal samples, and each group of implanted EEG signal samples includes multiple disturbance signal samples belonging to an implanted EEG signal set and a disturbance suppression signal sample corresponding to each disturbance signal sample.
[0156] In step S110, the computer system uses a pre-debugged feature representation network to perform feature representation of the target EEG signal at different levels. This feature representation network is a complex machine learning model, usually built based on a deep learning framework such as TensorFlow or PyTorch. The design of the network needs to take into account the characteristics of the EEG signal, including its time series, high dimensionality, and potential noise interference.
[0157] The feature representation network may contain multiple convolutional layers, pooling layers, activation function layers, and possibly recurrent neural network (RNN) or long short-term memory network (LSTM) layers to adapt to the temporal characteristics of EEG signals. Each layer is designed to extract features of different scales and levels of abstraction in the signal.
[0158] The convolution layer is used to automatically learn the local features of the signal. It extracts the spatial pattern by sliding the window operation on the signal through the convolution kernel. The pooling layer is used to reduce the dimension of the feature map, reduce the amount of calculation, and retain important features. Common pooling operations include maximum pooling and average pooling. The activation function layer is used to introduce nonlinear factors so that the network can learn complex nonlinear relationships. Common activation functions include ReLU, Sigmoid, and Tanh. The RNN / LSTM layer is an optional structure used to capture the temporal dependencies in the signal.
[0159] The feature representation network needs to go through a lot of debugging and optimization before it can be applied to the actual target EEG signal. This process usually includes the following steps:
[0160] Data preparation: Collect multiple groups of implantable EEG signal samples, each group of samples contains multiple perturbation signal samples belonging to an implantable EEG signal set and perturbation suppression signal samples corresponding to each perturbation signal sample. Perturbation signal samples are original EEG signals containing noise or interference, while perturbation suppression signal samples are signals after noise removal in some way (such as manual labeling or existing algorithm processing).
[0161] Network training: The feature representation network is trained using the prepared dataset. During the training process, the network calculates the output through forward propagation, and calculates the gradient through the back-propagation algorithm according to the loss function (such as mean square error MSE, cross entropy loss, etc.) to update the network weights. The loss function measures the difference between the network output and the true label (i.e., the perturbation suppression signal sample).
[0162] Hyperparameter tuning: Optimize the network's training process and generalization ability by adjusting hyperparameters such as learning rate, batch size, and number of iterations. This process can be tried and verified multiple times.
[0163] Validation and testing: Evaluate the performance of the network on independent validation and test sets. By comparing the difference between the network output and the true label, the accuracy, stability, and generalization ability of the network are evaluated.
[0164] Model saving: Once the network shows good performance on the validation set, it is saved as a previously debugged feature representation network for subsequent use in processing new target EEG signals.
[0165] After the feature representation network is debugged, the computer system uses the network to perform multi-level feature representation of the target EEG signal. Each layer in the network outputs a feature vector that represents the representation of the signal at different levels of abstraction.
[0166] For each feature representation level, the network outputs a feature vector (first signal representation vector) as the signal representation of that level. These vectors contain the key information of the signal at that level. The first feature combination factors are used to describe the relative importance of different feature vectors. They can be learned through the network or calculated based on some rules or heuristic methods. In practical applications, feature combination factors may appear in the form of weights and be used in subsequent feature information merging steps. For example, suppose that the feature representation network contains three convolutional layers, each followed by a pooling layer. For a target EEG signal, the network outputs a feature vector after each convolution layer. After the dimensionality reduction of these feature vectors by the pooling layer, they are flattened into one-dimensional vectors to form the first signal representation vector.
[0167] For the first convolutional layer, assume that its output feature map is flattened into a vector v 1 , the corresponding feature combination factor is α 1 For the second convolutional layer, the output feature map is flattened into a vector v 2 , the corresponding feature combination factor is α 2 For the third convolutional layer, the output feature map is flattened into a vector v 3 , the corresponding feature combination factor is α 3 These first signal characterization vectors and first feature combination factors will be used in subsequent signal processing steps, such as disturbance suppression and feature information merging in step S200.
[0168] Step S110 uses a pre-debugged feature representation network to perform multi-level feature representation on the target EEG signal, extracting key information at different abstract levels in the signal. This process not only provides a rich feature set for subsequent signal processing, but also describes the relative importance of different features through feature combination factors.
[0169] In one embodiment, before performing different levels of feature representation on the target EEG signal in the implantable EEG signal set through the pre-debugged feature representation network, the method further includes:
[0170] Step S101: Loading multiple groups of implantable electroencephalogram signal samples into a neural network respectively, so as to perform feature representation on the disturbance signal samples in each group of implantable electroencephalogram signal samples through the neural network, and obtain a disturbance signal sample representation vector and a corresponding sample feature combination factor of each disturbance signal sample;
[0171] Step S102: obtaining a sample potential difference smoothing matrix and a sample smoothing matrix factor corresponding to each sample potential difference according to the sample potential difference vector representation included in each potential difference in the disturbance signal sample characterization vector;
[0172] Step S103: for the sample potential difference vector representation of each sample potential difference in any target disturbance signal sample, disturbance suppression is performed through the sample potential difference smoothing matrix and the sample smoothing matrix factor corresponding to the sample potential difference, and the sample potential difference vector representation after disturbance suppression corresponding to each sample potential difference is obtained; and the feature information of the sample potential difference vector representation after disturbance suppression of each sample potential difference is merged according to the sample feature combination factor, so as to obtain the signal segment disturbance suppression result of the target disturbance signal sample;
[0173] Step S104: if the implantable electroencephalogram signal samples to which the target disturbance signal sample belongs include a previous disturbance signal sample adjacent to the target disturbance signal sample, obtaining the previous disturbance signal sample after disturbance suppression obtained by performing disturbance suppression on the previous disturbance signal sample;
[0174] Step S105: merging the sample signal characterization vector of the previous disturbance signal sample, the previous signal sample after disturbance suppression, and the signal segment disturbance suppression result of the target disturbance signal sample to obtain a sample merged signal segment, and smoothing the sample merged signal segment to obtain the disturbance suppression result of the target disturbance signal sample;
[0175] Step S106: performing error determination according to the disturbance suppression result of the target disturbance signal sample, the disturbance suppression result of the previous disturbance signal sample, the disturbance suppression signal sample corresponding to the target disturbance signal sample, and the disturbance suppression signal sample corresponding to the previous disturbance signal sample to obtain a network training error;
[0176] Step S107: Optimizing the network parameters of the neural network according to the network training error, and obtaining a debugged neural network when a preset optimization stop condition is reached.
[0177] The training of neural networks is a crucial step, which directly determines the effects of subsequent feature representation and signal processing.
[0178] In step S101, the computer system loads multiple groups of implantable EEG signal samples into a pre-designed neural network. These samples include disturbance signals (i.e., original EEG signals containing noise or interference) and their corresponding disturbance suppression signals (i.e., relatively clean signals processed in some way). Each group of samples belongs to an implantable EEG signal set, and there may be temporal continuity or spatial correlation between the signal samples in the set.
[0179] For example, suppose there are two sets of implantable EEG signal samples, each set contains 10 perturbation signal samples and corresponding perturbation suppression signal samples. Each perturbation signal sample is a time series data, containing multiple potential differences (i.e., the sampled values of the signal at different time points). For example, the first perturbation signal sample in the first set of samples can be represented as a matrix X 1 ∈R T×C , where T is the length of the time series (i.e., the number of sampling points) and C is the number of channels (i.e., the number of electrodes). The corresponding disturbance suppression signal sample is also a matrix Y with a shape of T×C 1 The neural network receives these samples as input and represents each disturbance signal sample through its internal structure (such as convolution layer, pooling layer, fully connected layer, etc.). The feature representation process is automatic. The network converts the original signal into a series of high-dimensional feature vectors by learning the inherent laws and patterns of the input data. For each disturbance signal sample, the network outputs two main results: one is the disturbance signal sample representation vector v i (represents the representation of the signal in the feature space), and the second is the corresponding sample feature combination factor α i (Describes the importance of different elements in the eigenvector).
[0180] In step S102, after obtaining the disturbance signal sample characterization vectors, the computer system further processes each potential difference in these vectors (i.e., each element or subvector in the eigenvector) to calculate the corresponding sample potential difference smoothing matrix and smoothing matrix factor. These matrices and factors play a key role in the subsequent disturbance suppression step.
[0181] For example, suppose the perturbation signal sample representation vector v i is a vector of length N, where each element v ij represents a potential difference (in actual applications, the potential difference may be composed of multiple continuous sampling points. Here, for simplicity, it is regarded as a single value). ij The system first calculates a sample potential difference smoothing matrix M based on the relationship between the potential difference and its adjacent potential differences. ij ∈R k×k , where k is the size of the potential difference neighborhood under consideration (for example, taking the current potential difference as the center and taking k / 2 potential differences before and after). ij The elements of reflect the correlation between the potential differences within the neighborhood.
[0182] Next, the system calculates the sample smoothing matrix factor f corresponding to the smoothing matrix by some method (such as the normalized exponential function softmax) ijThese factors are usually a vector of the same dimensions as the smoothing matrix, used to adjust the degree of smoothing. However, in practice, the smoothing matrix factors may appear in a simpler form, such as a scalar value that uniformly adjusts the effect of the entire smoothing matrix.
[0183] In step S103, the computer system uses the sample potential difference smoothing matrix and smoothing matrix factor calculated in step S102 to perform disturbance suppression processing on each sample potential difference in the target disturbance signal sample. The purpose of disturbance suppression is to remove noise and interference components in the signal and retain useful physiological information.
[0184] For example, for each sample potential difference v in the target disturbance signal sample ij , the system first finds its corresponding sample potential difference smoothing matrix M ij and the smoothing matrix factor f ij (or scalar factor). Then, through matrix multiplication and adjustment of the smoothing factor, the vector representation of the sample potential difference after disturbance suppression is calculated: v ij ′ is v ij and its neighborhood potential difference (if v ij If v is a vector, no conversion is required. ij is a scalar, it needs to be converted to a vector form first). ⊙ represents element-by-element multiplication. Note that the multiplication operation here can be based on M ij and f ij The specific form of the adjustment (for example, if f ij is a scalar, it is directly multiplied by the result of the matrix multiplication).
[0185] After all sample potential differences have been subjected to disturbance suppression processing, the system combines the factor α according to the sample characteristics. i , the potential difference vector representations after disturbance suppression are combined with feature information to obtain the signal segment disturbance suppression result of the target disturbance signal sample. Feature information merging usually involves weighted summation, splicing, and further processing through neural networks.
[0186] In steps S104 and S105, if the target disturbance signal sample has an adjacent previous disturbance signal sample in the implantable EEG signal sample set, the system needs to additionally process the relationship between the two signal samples. This usually involves obtaining the disturbance suppression result of the previous disturbance signal sample, and merging and smoothing it with the disturbance suppression result of the target disturbance signal sample.
[0187] For example, assuming that the target disturbance signal sample is the second signal sample in the second group of samples, and its previous disturbance signal sample is the first signal sample in the same group of samples. The system first obtains the disturbance suppression result of the first signal sample (which may be a disturbance-suppressed signal segment or a disturbance-suppressed version of the entire signal). Then, the disturbance suppression results of the two signal samples are merged to form a sample merged signal segment.
[0188] The merging methods may include direct concatenation, overlap addition, further fusion through neural networks, etc. After merging, the system can also smooth the entire sample merge signal segment to eliminate mutations or inconsistencies that may be introduced during the merging process. Smoothing can be achieved through a low-pass filter, a moving average filter, or a smoothing layer based on a neural network.
[0189] In step S106, after obtaining the final disturbance suppression result of the target disturbance signal sample, the computer system needs to evaluate the difference between the result and the real disturbance suppression signal sample. This difference is quantified by calculating the error (or loss) and used to guide the training process of the neural network.
[0190] Error calculation formula example:
[0191] Assume that the final disturbance suppression result of the target disturbance signal sample is The corresponding real disturbance suppression signal sample is Y i The system can use mean square error (MSE) as the loss function to calculate the training error:
[0192]
[0193] Where T is the length of the time series, C is the number of channels, and Y itc are the values of the final disturbance suppression result and the real disturbance suppression signal sample at time point t and channel c respectively.
[0194] If the target disturbance signal sample has an adjacent previous disturbance signal sample, the system may also consider the error between these two samples and combine them into the total error in some way (such as weighted summation).
[0195] Finally, the computer system optimizes the network parameters (such as weights and biases) of the neural network through a back propagation algorithm based on the network training error calculated in step S106. The optimization process involves steps such as gradient calculation and parameter update, aiming to minimize the training error and improve the generalization ability of the network.
[0196] During the optimization process, the system will periodically check whether the preset optimization stop conditions are met. These conditions may include the training round reaching the preset upper limit, the training error is lower than a certain threshold, the performance on the validation set is no longer significantly improved, etc. Once the stop conditions are met, the system considers that the neural network has been debugged and can be used in subsequent feature representation and signal processing tasks.
[0197] Through the above steps, the computer system can train a neural network suitable for implanting and regulating EEG signal enhancement. The network can automatically extract key features from the original disturbance signal and generate relatively clean signal segments through multi-level feature representation and disturbance suppression processing. The error calculation, parameter optimization and other steps involved in the training process ensure that the network can accurately learn the useful information in the signal and remove noise interference.
[0198] In one implementation, step S106, performing error determination according to the disturbance suppression result of the target disturbance signal sample, the disturbance suppression result of the previous disturbance signal sample, the disturbance suppression signal sample corresponding to the target disturbance signal sample, and the disturbance suppression signal sample corresponding to the previous disturbance signal sample to obtain the network training error may include:
[0199] Step S1061: determining a signal error according to the disturbance suppression result of the target disturbance signal sample and the disturbance suppression signal sample corresponding to the target disturbance signal sample to obtain a signal disturbance suppression error;
[0200] Step S1062: performing error determination according to the potential difference vector representation difference between the disturbance suppression result of the target disturbance signal sample and the disturbance suppression result of the previous disturbance signal sample, and the potential difference vector representation difference between the disturbance suppression signal sample corresponding to the target disturbance signal sample and the disturbance suppression signal sample corresponding to the previous disturbance signal sample, to obtain the inter-signal consistency disturbance suppression error;
[0201] Step S1063: Fusing the inter-signal consistency disturbance suppression error and the signal disturbance suppression error to obtain a network training error.
[0202] In step S1061, the computer system first focuses on the difference between the disturbance suppression result of the target disturbance signal sample and its corresponding real disturbance suppression signal sample. This difference is quantified by calculating the signal disturbance suppression error, which reflects the processing effect of the model on a single signal sample.
[0203] Assume that the disturbance suppression result of the target disturbance signal sample is Where T is the length of the time series, C is the number of channels (i.e. the number of electrodes). The corresponding real disturbance suppression signal sample is Y t ∈R T×CThe signal disturbance suppression error can be calculated by the mean square error (MSE).
[0204] In step S1062, the computer system further considers the continuity between the target disturbance signal sample and its adjacent previous disturbance signal sample. Since the EEG signal is a time series data, a certain smoothness and consistency should be maintained between adjacent signal samples. Therefore, the system evaluates the performance of the model in maintaining consistency between signals by calculating the difference between the potential difference vector representation of the disturbance suppression results of the two signal samples and the difference between their corresponding real signals.
[0205] For example, the potential difference vector is defined as follows. For any two adjacent time points t and t+1 in the disturbance suppression result (or real signal), the potential difference vector on channel c can be expressed as:
[0206]
[0207] (Similarly, ΔYtc can be defined as the potential difference vector of the real signal)
[0208] Then, the potential difference vector representation difference between the target disturbance signal sample and its previous disturbance signal sample on the disturbance suppression result is calculated:
[0209]
[0210] in,‖·‖ F Represents the Frobenius norm, which is used to calculate the Euclidean norm of a matrix.
[0211] At the same time, the potential difference vector representation difference of the two real signal samples at the corresponding time points is calculated:
[0212] ΔTD=‖ΔY t -ΔY t-1 ‖ F ;
[0213] The signal-to-signal consistency disturbance rejection error can be calculated by comparing the two differences above, but it is more common to incorporate them into a more comprehensive measure, such as by calculating a relative error (ICE) or ratio:
[0214]
[0215] Among them, ∈ is a small positive number used to prevent the denominator from being zero. It can be understood that the calculation formula here is a simplified representation and can be adjusted according to specific needs in actual applications.
[0216] For example, continuing with the previous example, assume that there are already disturbance suppression results and true signals for the target disturbance signal sample and its previous disturbance signal sample. The system first calculates the potential difference vectors of the two sets of signals at adjacent time points, and then calculates the difference between the disturbance suppression result and the true signal in the potential difference vector (i.e., the difference in the amount of change). By comparing these two differences, the system can evaluate the performance of the model in maintaining consistency between signals. If the change in the potential difference in the disturbance suppression result is highly consistent with the change in the true signal, the inter-signal consistency disturbance suppression error will be small; conversely, if the difference is large, the error is large, indicating that the model may have introduced unnecessary mutations or inconsistencies when processing adjacent signal samples.
[0217] In step S1063, after obtaining the signal disturbance suppression error and the signal consistency disturbance suppression error, the computer system needs to fuse the two error terms to obtain the final network training error. The fusion process usually involves weighted summation or other forms of combination of the two error terms.
[0218] Step S106 calculates the signal disturbance suppression error and the signal consistency disturbance suppression error and merges them into the network training error, which can comprehensively evaluate the performance of the model in processing implantable EEG signals. This evaluation process not only considers the processing effect of a single signal sample (the degree of signal distortion), but also pays attention to the continuity between adjacent signal samples (consistency between signals). By optimizing this comprehensive error index, the system can continuously improve the performance of the model, so that it can show higher accuracy and stability when processing complex and changeable EEG signals.
[0219] In one embodiment, in step S100, obtaining a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference according to the potential difference vector representation of each potential difference included in the first signal characterization vector may include:
[0220] Step S120: transform the potential difference vector representation of each potential difference in the first signal characterization vector into two feature sequences with the same feature dimension, and determine the multiplication result of the elements corresponding to the potential difference in the two feature sequences as the potential difference smoothing matrix corresponding to the potential difference;
[0221] Step S130: Determine the smoothing matrix factor corresponding to the potential difference smoothing matrix by using a normalized exponential function.
[0222] In step S100, after obtaining the first signal characterization vector of the target electroencephalogram signal, the computer system further processes the potential difference vector representation of each potential difference to generate a corresponding potential difference smoothing matrix and a smoothing matrix factor. These matrices and factors play a key role in the subsequent disturbance suppression step, helping to remove noise from the signal and retain useful physiological information. In step S120, the computer system processes the potential difference vector representation of each potential difference in the first signal characterization vector to generate a corresponding potential difference smoothing matrix. This process involves transforming the potential difference vector representation into two feature sequences with consistent feature dimensions, and constructing a smoothing matrix by multiplying the elements in the two sequences.
[0223] The potential difference vector representation (denoted as vi, where i represents the index of the potential difference) is a multidimensional vector that contains the representation of the potential difference in the feature space. In order to generate a smoothing matrix, this vector needs to be transformed into two new feature sequences, and the feature dimensions of the two sequences need to be consistent.
[0224] The purpose of the transformation is to extract information from the potential difference vector from different perspectives in order to subsequently calculate the smoothing matrix. For example, a linear transformation (such as matrix multiplication) can be used to map the original potential difference vector into a new feature space, or this can be achieved through a nonlinear transformation (such as through a neural network layer).
[0225] Assuming that linear transformation is adopted, two transformation matrices A and B are defined (the dimensions of these two matrices need to be carefully designed to ensure that the dimensions of the characteristic sequences after transformation are consistent). Then, the potential difference vector v i After these two matrix transformations, two new feature sequences v can be obtained i,A ′=A vi and v i,B ′=B vi .
[0226] After obtaining two feature sequences with the same feature dimensions, the computer system constructs the potential difference smoothing matrix M by calculating the product of the corresponding elements in the two sequences. i Specifically, if v i,A ′=[a 1 ,a 2 ,…,a n ] and v i,B ′=[b 1 ,b 2 ,…,b n ] (Here it is assumed that the length of the transformed characteristic sequence is n), then the potential difference smoothing matrix M i It can be expressed as:
[0227]
[0228] For example, assuming that the potential difference vector vi = [1, 2, 3], and the transformation matrices A and B are:
[0229]
[0230] The transformation matrix here is a random example and can be designed according to specific circumstances in actual applications.
[0231] Through transformation, two feature sequences are obtained:
[0232]
[0233] Then, the potential difference smoothing matrix is constructed from these two series:
[0234]
[0235] It can be understood that the dimension of the matrix here is small for ease of understanding as an example, and in actual applications, the dimension of the potential difference smoothing matrix may be much larger.
[0236] After generating the potential difference smoothing matrix, the computer system further determines a smoothing matrix factor corresponding to the matrix. The smoothing matrix factor is usually used to adjust the smoothing degree of the potential difference vector representation by the smoothing matrix to ensure that important features in the signal are not over-smoothed while removing noise.
[0237] One way is to use a normalized exponential function (such as a softmax function) to calculate the smooth matrix factor. This process, for example, is to input certain features of the smooth matrix (such as row sums, column sums, diagonal elements, etc.) into the softmax function and generate the smooth matrix factor accordingly, or to calculate the smooth matrix factor based on specific properties of the smooth matrix (such as eigenvalues, singular values, etc.).
[0238] For example, suppose we are only interested in the smoothing matrix M i The diagonal elements [4,10,30] of are used as the input of the softmax function. The calculation formula of the softmax function is:
[0239]
[0240] Among them, z j is the jth element in the input vector and n is the length of the input vector.
[0241] Applying the softmax function to the diagonal elements [4, 10, 30] yields the smooth matrix factors [0.018, 0.119, 0.863].
[0242] In step S100, the computer system generates a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference. These matrices and factors play an important role in the subsequent disturbance suppression step, helping to remove noise from the signal and retain useful physiological information.
[0243] In one embodiment, in step S400, merging the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target electroencephalogram signal to obtain a merged signal segment may include:
[0244] Step S410: mapping the previous signal segment after disturbance suppression to the target electroencephalogram signal to obtain the mapped previous signal segment, mapping the second signal representation vector to the target electroencephalogram signal to obtain the mapped second signal representation vector;
[0245] Step S420: stacking the mapped previous signal segment and the mapped second signal representation vector to obtain a stacked representation vector sequence, and convolving the stacked representation vectors to obtain a continuous feature sequence;
[0246] Step S430: performing weighted averaging on the continuous feature sequence and the signal segment disturbance suppression result of the target EEG signal to obtain a merged signal segment.
[0247] In step S400, the computer system combines the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target EEG signal through a series of sophisticated operations to generate a more comprehensive and optimized combined signal segment. This process not only takes into account the continuity of the signal in the time dimension, but also integrates the information represented by different levels of features, thereby improving the stability and clarity of the signal.
[0248] In step S410, the computer system first performs mapping processing on the previous signal segment and the second signal representation vector after disturbance suppression to ensure that they can be compared and merged with the target EEG signal in the same feature space or time frame.
[0249] The previous signal segment after disturbance suppression may be processed at a different feature representation level or time scale. In order to align it with the target EEG signal, the computer system needs to perform a mapping operation. This mapping may involve resampling in time, interpolation in space, or transformation in feature space.
[0250] If the temporal resolution of the previous signal segment does not match the target EEG signal, the system adjusts it to the same time interval as the target signal through resampling techniques. For example, if the sampling rate of the target EEG signal is 1000Hz and the sampling rate of the previous signal segment is 500Hz, the system will upsample the previous signal segment to 1000Hz. If the electrode positions of the previous signal segment and the target EEG signal are not exactly the same, the system can perform spatial interpolation on the previous signal segment to estimate the signal value of the missing electrode position. This is usually achieved by weighted averaging based on neighboring electrode signals or more complex interpolation algorithms. If the previous signal segment is processed at a different feature representation level (such as through different neural network layers), the system can transform it into the same feature space as the target EEG signal. This transformation may involve linear transformations, nonlinear activation functions, or more complex neural network layers.
[0251] Assume that the previous signal segment after disturbance suppression is S prev_inh , the signal segment obtained after the mapping operation is S mapped_prev Similarly, for the second signal characterization vector (denoted as V 2 ), the system also needs to perform a similar mapping operation to align it with the target EEG signal. This usually involves expanding the feature vector to the same time length and number of channels as the target signal, or extracting the features of the target signal into the same feature space as the second signal representation vector. The mapped second signal representation vector is denoted by V mapped .
[0252] For example, suppose the target EEG signal is a signal segment containing 16 channels and a time length of 1000 sampling points. The previous signal segment S after disturbance suppression prev_inh The system first spatially interpolates S prev_inh Expand to 16 channels and get the mapped signal segment S mapped_prev For the second signal characterization vector V 2 , if it is a feature vector of length 64 (each feature corresponds to a specific aspect of the original signal), the system may expand it into a signal segment with a time length of 1000 samples and 16 channels through some means (such as a decoder network), and obtain the mapped second signal representation vector V mapped .
[0253] After mapping the disturbance-suppressed previous signal segment and the second signal representation vector to the feature space of the target EEG signal, the computer system then stacks them to form a longer representation vector sequence. Then, a convolution operation is applied to this stacked representation vector sequence to extract a continuous feature sequence.
[0254] The stacking operation is the process of concatenating two or more signal segments or feature vectors in a certain dimension. Here, the system may map the previous signal segment S mapped_prev and the mapped second signal representation vector V mapped Stacking is done on the time dimension or the feature dimension.
[0255] In step S420, only one or a few convolution layers are needed to extract continuous features useful for merging signal segments. The output of the convolution operation is a new feature sequence (denoted as F), which contains the key information in the stacked representation vector sequence and has better continuity and stability.
[0256] For example, suppose the stacked representation vector sequence Z is a matrix of shape [1000,32] (where 1000 is the time length and 32 is the number of channels or feature dimensions). The system applies a convolutional layer containing multiple convolution kernels to Z. Each convolution kernel slides over Z and calculates the dot product to generate a portion of the feature map. Suppose the convolution layer uses 32 convolution kernels of size 3×1 and applies a ReLU activation function. The output of the convolution operation is a new feature sequence F, whose shape may vary depending on the number of convolution kernels, stride, and padding, but generally still maintains a length close to the time length and a certain number of feature channels.
[0257] After obtaining the continuous feature sequence F, the computer system compares it with the signal segment disturbance suppression result of the target EEG signal (denoted as S target_inh ) are weighted averaged to generate a merged signal segment. This step aims to combine the global information in the continuous feature sequence and the local details in the target signal segment to obtain a more comprehensive and optimized signal representation.
[0258] The system is a continuous feature sequence F and a target signal segment disturbance suppression result S target_inh Different weights are assigned and summed up to get the merged signal segment. The weights are chosen based on the importance, reliability or other relevant factors of the signal.
[0259] Assume that the weight of the continuous feature sequence F is α (a scalar or vector between 0 and 1), the target signal segment disturbance suppression result S target_inh The weight of is 1-α (if α is a scalar) or the corresponding residual weight (if α is a vector). The weighted average operation can be expressed as: merged =α⊙F+(1-α)⊙S target_inh ; where ⊙ represents element-by-element multiplication (when α is a vector) or scalar multiplication (when α is a scalar). Note that this assumes that F and S target_inh Have the same shape or have been resized to the same shape in some way (such as interpolation or clipping).
[0260] In practical applications, F can be converted into a signal segment with the same shape and feature space as the target signal segment, and then weighted averaged. For example, suppose the continuous feature sequence F has been converted into a signal segment with a shape of [1000, 16] (same as the target signal segment S) by some means (such as additional convolutional layers or fully connected layers). target_inh The system chooses a scalar weight α = 0.7 to represent the importance of consecutive feature sequences.
[0261] The final combined signal segment S merged It is an optimized signal representation that combines the continuous feature sequence and the disturbance suppression results of the target signal segment. It not only retains the key information in the target signal segment, but also enhances the continuity and stability of the signal by introducing the continuous feature sequence. This makes the merged signal segment more reliable and effective in subsequent signal processing and analysis.
[0262] In one embodiment, in step S400, performing disturbance suppression on the combined signal segment to obtain a disturbance-suppressed target electroencephalogram signal includes:
[0263] Step S440: performing feature representation on the combined signal segment to obtain a combined signal representation vector and a second feature combination factor;
[0264] Step S450: obtaining a combined potential difference smoothing matrix and a combined smoothing matrix factor corresponding to each combined signal segment potential difference according to the vector elements included in each combined signal segment potential difference in the combined signal characterization vector;
[0265] Step S460: for each combined potential difference vector representation in the combined signal representation vector, disturbance suppression is performed by using a combined potential difference smoothing matrix and a combined smoothing matrix factor corresponding to the combined potential difference vector representation to obtain a combined potential difference vector representation after disturbance suppression corresponding to each potential difference;
[0266] Step S470: Merge feature information of each combined potential difference vector representation after the potential difference disturbance is suppressed according to the second feature combination factor to obtain the target EEG signal after the disturbance is suppressed.
[0267] In step S400, when the computer system completes the construction of the merged signal segment, the next task is to further perform disturbance suppression processing on the merged signal segment to generate a target EEG signal after disturbance suppression. This process not only involves feature representation of the merged signal segment, but also includes calculating the merged potential difference smoothing matrix and smoothing matrix factors, and applying these matrices and factors to perform disturbance suppression on each potential difference in the merged signal segment.
[0268] In step S440, the computer system performs feature representation on the merged signal segment, aiming to extract feature vectors and corresponding feature combination factors that can reflect the key characteristics of the signal. Since the merged signal segment already contains the target EEG signal, the previous signal segment after disturbance suppression, and the second signal representation vector, its feature representation process needs to be able to fully capture the inherent connections and differences of this information.
[0269] Feature representation can be achieved using a variety of machine learning or deep learning models, such as convolutional neural networks (CNN), recurrent neural networks (RNN) or their variants (such as LSTM, GRU), etc. Here, it is assumed that a pre-trained CNN model is used to extract features from the merged signal segments. The model automatically learns the spatial and temporal patterns in the signal through multiple convolutional layers, pooling layers, and activation function layers, and outputs a high-dimensional feature vector.
[0270] For example, assume that the merged signal segment is a multidimensional array (or tensor) containing multiple time windows and channel numbers, with a shape of [number of time windows, number of channels, number of sampling points]. The computer system inputs the merged signal segment into the pre-trained CNN model, and the model extracts local features within each time window through convolution operations and reduces the dimension of the feature map through pooling operations. Finally, the model outputs a merged signal representation vector matrix with a shape of [number of time windows, number of features], where each row represents a feature vector of a time window. At the same time, the model may also output a second feature combination factor vector corresponding to the feature vector for subsequent feature information merging.
[0271] After obtaining the combined signal representation vector, the computer system needs to calculate the corresponding combined potential difference smoothing matrix and smoothing matrix factor for each combined potential difference in the vector (i.e., each element or subvector in the eigenvector). These matrices and factors play a key role in the subsequent disturbance suppression step, and they can use the correlation between potential differences to smooth the signal and remove noise.
[0272] The calculation of the combined potential difference smoothing matrix may involve a variety of strategies, such as a covariance matrix, a similarity matrix or an adaptive matrix obtained by learning based on the potential difference vectors. In the present application, it is assumed that each potential difference vector representation in the combined signal representation vector is transformed into a feature sequence with two consistent feature dimensions; then, the product of the corresponding elements in the two feature sequences is calculated as the element of the smoothing matrix. The smoothing matrix factor can be determined by a normalized exponential function (such as a softmax function) or simply set to a fixed scalar value. Since the combined signal representation vector already contains rich feature information, and this feature information has undergone a certain smoothing process (such as through stacking, convolution, etc.) during the merging process, in practical applications, whether it is necessary to additionally calculate the combined potential difference smoothing matrix and the smoothing matrix factor can be determined according to the specific situation. If the combined signal representation vector is already smooth enough and the noise level is low, no additional smoothing is required.
[0273] In step S460, the computer system uses the combined potential difference smoothing matrix and the smoothing matrix factor to perform disturbance suppression processing on each potential difference vector representation in the combined signal representation vector. The purpose of disturbance suppression is to remove noise components in the signal and retain useful physiological information.
[0274] For each potential difference vector v in the combined signal representation vector i The computer system first finds the corresponding combined potential difference smoothing matrix M i and smoothing matrix factors. These matrices and factors are then applied in some way (e.g., matrix multiplication, element-wise multiplication, or more complex operations) to update the potential difference vector representation. Assume that there is a disturbance suppression function f(·) that accepts the potential difference vector representation, the smoothing matrix, and the factors as inputs and outputs the disturbance-suppressed potential difference vector representation:
[0275]
[0276] The disturbance suppression function f(·) is, for example, part of a deep neural network model comprising multiple neural network layers, which can automatically learn how to extract the disturbance suppressed signal from the original potential difference vector representation and the smoothing matrix.
[0277] After obtaining the combined potential difference vector representation after each potential difference disturbance suppression, the computer system needs to merge the feature information of these vector representations according to the second feature combination factor. The purpose of the feature information merging is to integrate the key feature information in different potential differences to generate the final target EEG signal after disturbance suppression.
[0278] There are many ways to combine feature information, such as weighted summation, concatenation followed by further processing through a neural network, attention mechanism, etc. Here, we assume that the weighted summation method is used as an example to illustrate this process. Specifically, the potential difference vector representation after disturbance suppression is weighted summed according to the second feature combination factor (a weight vector with the same length as the number of potential differences).
[0279] For example, assuming that the potential difference vector representation set after disturbance suppression has been obtained through step S460 And the corresponding feature combination factor vector α = [α 1 ,α 2 ,…,α N ] T Now we need to perform weighted summation of these vector representations according to the feature combination factor to generate the final disturbance-suppressed target EEG signal S merged_inh .
[0280] Assume that each potential difference vector is represented by All of these vector representations can be stacked into a matrix of shape [N,M] if they are all column vectors of length M (where M is the number of features). (where each row corresponds to a vector representation of a potential difference). The feature combination factor vector α is then expanded into a column vector of shape [N, 1] and combined with the matrix Perform matrix multiplication operations (such as dot products or inner products),
[0281] Through the processing flow of steps S440 to S470, the computer system can perform in-depth feature representation, smoothing matrix calculation, disturbance suppression, and feature information merging on the merged signal segments to generate a target EEG signal after disturbance suppression. It not only considers noise suppression within the signal, but also utilizes the related information between adjacent signal segments to enhance the continuity and smoothness of the signal.
[0282] In one embodiment, if the implantable EEG signal set does not include a previous signal segment adjacent to the target EEG signal, the disturbance suppression result of the signal segment of the target EEG signal is used as the target EEG signal after disturbance suppression.
[0283] When the implanted EEG signal set does not contain the previous signal segment adjacent to the target EEG signal, the computer system adopts a simplified strategy in processing. In this case, since the continuity and correlation between adjacent signal segments cannot be used to assist in processing the current target signal, the computer system will directly rely on the feature representation, disturbance suppression, and feature information merging operations of the target EEG signal itself to obtain the final processing result.
[0284] When there is no previous signal segment adjacent to the target EEG signal in the implantable EEG signal set, the computer system performs the following steps: feature representation of the target EEG signal, extracting key features in the signal through a pre-trained feature representation network (such as a convolutional neural network CNN, a recurrent neural network RNN or its variant LSTM / GRU, etc.), and generating a first signal representation vector. In this step, the feature representation network can automatically learn the spatial and temporal patterns in the signal and convert the original signal into a vector representation in a high-dimensional feature space. Next, the computer system uses the potential difference smoothing matrix and the smoothing matrix factor to perform disturbance suppression processing on each potential difference vector representation in the first signal representation vector. In this process, the potential difference smoothing matrix reflects the correlation between the potential difference vectors, and the smoothing matrix factor is used to adjust the degree of smoothing. Through matrix multiplication and element-level multiplication operations, the system can effectively remove the noise component in the signal while retaining useful physiological information. After obtaining the potential difference vector representation after each potential difference disturbance suppression, the computer system merges the feature information according to the first feature combination factor (these factors describe the relative importance between different feature vectors). This step may involve weighted summation, concatenation and further processing through neural networks, etc., aiming to integrate the information in different feature vectors to generate the final signal segment disturbance suppression result. Since there is no adjacent previous signal segment, the computer system cannot perform additional signal merging and smoothing operations. Therefore, it directly outputs the signal segment disturbance suppression result of the target EEG signal as the target EEG signal after disturbance suppression. This output signal not only removes the noise and interference in the original signal, but also retains the key physiological characteristics of the signal, providing a clearer and more stable data basis for subsequent signal analysis and application.
[0285] For example, suppose there is an implantable electroencephalogram signal set, in which a target electroencephalogram signal is the only member, that is, there is no previous signal segment adjacent to it. The target electroencephalogram signal contains data of multiple time windows, and each time window corresponds to a potential difference vector. The computer system extracts features from the target electroencephalogram signal through a pre-trained CNN feature representation network. Assume that the network outputs a first signal representation vector matrix with a shape of [number of time windows, number of features]. For example, if the target electroencephalogram signal contains 100 time windows, and the dimension of the feature vector of each time window is 64, the shape of the first signal representation vector is [100,64]. For each potential difference vector representation in the first signal representation vector (that is, each row in the matrix), the computer system calculates the corresponding potential difference smoothing matrix and smoothing matrix factor, and performs disturbance suppression processing through matrix multiplication and element-wise multiplication. After this step, each potential difference vector is updated to a disturbance-suppressed version. Since there is no information of adjacent signal segments to be fused, the computer system directly performs weighted summation or other forms of merging processing on the disturbance-suppressed potential difference vector according to the first feature combination factor. The result of this step is a signal segment disturbance suppression result that integrates all potential difference vector information. Finally, the computer system outputs the signal segment disturbance suppression result as the target EEG signal after disturbance suppression. This output signal not only removes the noise and interference components in the original signal, but also enhances the clarity and stability of the signal through feature representation and disturbance suppression processing. Through the above process, the computer system can effectively enhance the target EEG signal without the assistance of adjacent signal segments, thereby improving the quality and analysis value of the signal.
[0286] The present application embodiment provides a computer system, such as Figure 2 The computer system 100 shown in the figure includes: a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, such as through a bus 102. Optionally, the computer system 100 may also include a transceiver 104. It should be noted that in actual applications, the transceiver 104 is not limited to one, and the structure of the computer system 100 does not constitute a limitation on the embodiments of the present application.
[0287] An embodiment of the present application provides a computer system. The computer system in the embodiment of the present application includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors. When the one or more programs are executed by the processor, the method described above in the present application is implemented.
Claims
1. A method for enhancing electroencephalogram signals by implantation control based on artificial intelligence, characterized in that: The method comprises: Performing feature representation on a target electroencephalogram signal in the implantable electroencephalogram signal set, obtaining a first signal representation vector of the target electroencephalogram signal and a first feature combination factor corresponding to the first signal representation vector, and obtaining a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference according to a potential difference vector representation of each potential difference included in the first signal representation vector; For the potential difference vector representation of each potential difference in the first signal characterization vector, disturbance suppression is performed using the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference to obtain the potential difference vector representation after each potential difference disturbance is suppressed, and feature information is merged for each potential difference vector representation after each potential difference disturbance is suppressed according to the first feature combination factor to obtain a signal segment disturbance suppression result of the target electroencephalogram signal; If the implantable electroencephalogram signal set includes a previous signal segment adjacent to the target electroencephalogram signal, obtaining a second signal representation vector obtained by performing feature representation on the previous signal segment, and a disturbance-suppressed previous signal segment obtained by performing disturbance suppression on the previous signal segment; The second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target electroencephalogram signal are combined to obtain a combined signal segment, and disturbance suppression is performed on the combined signal segment to obtain the target electroencephalogram signal after disturbance suppression.
2. The method according to claim 1, characterized in that The step of performing feature representation on a target electroencephalogram signal in an implantable electroencephalogram signal set to obtain a first signal representation vector of the target electroencephalogram signal and a first feature combination factor corresponding to the first signal representation vector includes: Performing different levels of feature representation on the target electroencephalogram signal in the implantable electroencephalogram signal set to obtain a first signal representation vector and a first feature combination factor at each feature representation level; The potential difference vector representation of each potential difference in the first signal characterization vector is subjected to disturbance suppression through the potential difference smoothing matrix and the smoothing matrix factor corresponding to the potential difference to obtain the potential difference vector representation after each potential difference disturbance is suppressed, and the potential difference vector representation after each potential difference disturbance is suppressed is subjected to feature information merging according to the first feature combination factor to obtain the signal segment disturbance suppression result of the target electroencephalogram signal, including: For each potential difference vector representation in the first signal representation vector corresponding to each feature representation level, disturbance suppression is performed using a potential difference smoothing matrix and a smoothing matrix factor corresponding to the potential difference vector representation to obtain a disturbance-suppressed potential difference vector representation corresponding to each potential difference; According to the first feature combination factor corresponding to each feature representation level, the feature information of the potential difference vector representation after disturbance suppression of each potential difference at different feature representation levels is merged to obtain the signal segment disturbance suppression result of the target electroencephalogram signal.
3. The method according to claim 2, characterized in that The step of combining feature information of the potential difference vector representation after disturbance suppression of each potential difference at different feature representation levels according to the first feature combination factor corresponding to each feature representation level to obtain a signal segment disturbance suppression result of the target electroencephalogram signal includes: Performing a pooling operation on the potential difference vector representations with a sequence of 2 in the feature representation hierarchy according to an arrangement from low to high to obtain a pooling operation result, and performing an interpolation operation on the pooling operation result to obtain a first interpolation vector representation, and performing an interpolation feature representation on the potential difference vector representation with a sequence of 1 to obtain a second interpolation vector representation; According to the potential difference vector representation of sequence 2, the first interpolation vector representation, the second interpolation vector representation and the first characteristic combination factor corresponding to the potential difference vector representation of sequence 2, the characteristic information merging and smoothing processing is performed on the potential difference vector representation of sequence 2 to obtain the potential difference vector representation after the disturbance suppression is performed on the potential difference vector representation of sequence 2; In the arrangement, the potential difference vector representation with a sequence of 1 is filtered, and then the potential difference vector representation with a sequence of 2 in the feature representation level is continuously pooled to obtain a pooling operation result, and the pooling operation result is interpolated to obtain a first interpolation vector representation, and the potential difference vector representation with a sequence of 1 is interpolated to obtain a second interpolation vector representation, and the method stops when the potential difference vector representation with a sequence of 2 is the last potential difference vector representation in the arrangement, and the potential difference vector representation obtained after perturbation suppression is used as the signal segment perturbation suppression result of the target electroencephalogram signal.
4. The method according to claim 3, characterized in that According to the potential difference vector representation of sequence 2, the first interpolation vector representation, the second interpolation vector representation and the first characteristic combination factor corresponding to the potential difference vector representation of sequence 2, the characteristic information merging and smoothing processing is performed on the potential difference vector representation of sequence 2 to obtain the potential difference vector representation after the disturbance suppression is performed on the potential difference vector representation of sequence 2, including: A first interpolation vector representation is multiplied by a characteristic combination factor corresponding to the potential difference vector representation of the order 2 to obtain a filtered disturbance of the potential difference vector representation of the order 2; Multiplying the second interpolation vector representation with the characteristic combination factor corresponding to the potential difference vector representation of order 2 to obtain a compensation disturbance of the potential difference vector representation of order 2; The potential difference vector representation of the order 2 is then subtracted from the filtered disturbance, and then the subtraction result is added to the compensation disturbance to obtain the potential difference vector representation of the potential difference vector representation of the order 2 after the disturbance is suppressed.
5. The method according to claim 2, characterized in that: The step of performing different levels of feature representation on the target EEG signal in the implantable EEG signal set to obtain a first signal representation vector and a first feature combination factor at each feature representation level includes: The target EEG signal in the implanted EEG signal set is represented by features of different levels through a feature representation network that has been debugged in advance, and a first signal representation vector of the target EEG signal at each feature representation level and a first feature combination factor corresponding to the first signal representation vector are obtained, wherein the feature representation network that has been debugged in advance is debugged based on multiple groups of implanted EEG signal samples, and each group of implanted EEG signal samples includes multiple disturbance signal samples belonging to an implanted EEG signal set and a disturbance suppression signal sample corresponding to each disturbance signal sample.
6. The method according to claim 5, characterized in that Before the feature representation network that has been debugged in advance performs feature representation of different levels on the target EEG signal in the implantable EEG signal set, the method further includes: Loading multiple groups of implantable electroencephalogram signal samples into the neural network respectively, so as to perform feature representation on the disturbance signal samples in each group of implantable electroencephalogram signal samples through the neural network, and obtain the disturbance signal sample representation vector and the corresponding sample feature combination factor of each disturbance signal sample; According to the sample potential difference vector representation included in each potential difference in the disturbance signal sample characterization vector, a sample potential difference smoothing matrix and a sample smoothing matrix factor corresponding to each sample potential difference are obtained; For the sample potential difference vector representation of each sample potential difference in any target disturbance signal sample, disturbance suppression is performed through the sample potential difference smoothing matrix and the sample smoothing matrix factor corresponding to the sample potential difference, so as to obtain the sample potential difference vector representation after disturbance suppression corresponding to each sample potential difference, and feature information is merged for the sample potential difference vector representation after disturbance suppression of each sample potential difference according to the sample feature combination factor, so as to obtain the signal segment disturbance suppression result of the target disturbance signal sample; If the implantable electroencephalogram signal samples to which the target disturbance signal sample belongs include a previous disturbance signal sample adjacent to the target disturbance signal sample, obtaining a disturbance-suppressed previous disturbance signal sample obtained by performing disturbance suppression on the previous disturbance signal sample; Merging the sample signal characterization vector of the previous disturbance signal sample, the previous signal sample after disturbance suppression, and the signal segment disturbance suppression result of the target disturbance signal sample to obtain a sample merged signal segment, and smoothing the sample merged signal segment to obtain the disturbance suppression result of the target disturbance signal sample; Determine the error according to the disturbance suppression result of the target disturbance signal sample, the disturbance suppression result of the previous disturbance signal sample, the disturbance suppression signal sample corresponding to the target disturbance signal sample, and the disturbance suppression signal sample corresponding to the previous disturbance signal sample to obtain a network training error; The network parameters of the neural network are optimized according to the network training error, and when a preset optimization stop condition is reached, a debugged neural network is obtained.
7. The method according to claim 6, characterized in that The step of performing error determination according to the disturbance suppression result of the target disturbance signal sample, the disturbance suppression result of the previous disturbance signal sample, the disturbance suppression signal sample corresponding to the target disturbance signal sample, and the disturbance suppression signal sample corresponding to the previous disturbance signal sample to obtain a network training error comprises: Determine a signal error according to the disturbance suppression result of the target disturbance signal sample and the disturbance suppression signal sample corresponding to the target disturbance signal sample to obtain a signal disturbance suppression error; Determine the error according to the potential difference vector representation difference between the disturbance suppression result of the target disturbance signal sample and the disturbance suppression result of the previous disturbance signal sample, and the potential difference vector representation difference between the disturbance suppression signal sample corresponding to the target disturbance signal sample and the disturbance suppression signal sample corresponding to the previous disturbance signal sample, to obtain the inter-signal consistency disturbance suppression error; The inter-signal consistency disturbance suppression error and the signal disturbance suppression error are fused to obtain a network training error.
8. The method according to claim 1, characterized in that The step of obtaining a potential difference smoothing matrix and a smoothing matrix factor corresponding to each potential difference according to the potential difference vector representation of each potential difference included in the first signal characterization vector comprises: The potential difference vector representation of each potential difference in the first signal characterization vector is transformed into two feature sequences with the same feature dimension respectively, and the multiplication result of the elements corresponding to the potential difference in the two feature sequences is determined as the potential difference smoothing matrix corresponding to the potential difference; The smoothing matrix factor corresponding to the potential difference smoothing matrix is determined by a normalized exponential function.
9. The method according to claim 1, characterized in that: The step of merging the second signal representation vector, the previous signal segment after disturbance suppression, and the signal segment disturbance suppression result of the target electroencephalogram signal to obtain a merged signal segment includes: Mapping the previous signal segment after disturbance suppression to the target electroencephalogram signal to obtain the mapped previous signal segment, mapping the second signal representation vector to the target electroencephalogram signal to obtain the mapped second signal representation vector; The mapped previous signal segment and the mapped second signal representation vector are stacked to obtain a stacked representation vector sequence, and the stacked representation vectors are convolved to obtain a continuous feature sequence; Performing weighted averaging on the continuous feature sequence and the signal segment disturbance suppression result of the target electroencephalogram signal to obtain a merged signal segment; The step of performing disturbance suppression on the combined signal segment to obtain a disturbance-suppressed target electroencephalogram signal comprises: Performing feature representation on the combined signal segment to obtain a combined signal representation vector and a second feature combination factor; According to the vector elements included in each combined signal segment potential difference in the combined signal characterization vector, a combined potential difference smoothing matrix and a combined smoothing matrix factor corresponding to each combined signal segment potential difference are obtained; For each combined potential difference vector representation in the combined signal characterization vector, disturbance suppression is performed using a combined potential difference smoothing matrix and a combined smoothing matrix factor corresponding to the combined potential difference vector representation to obtain a combined potential difference vector representation after disturbance suppression corresponding to each potential difference; Merging feature information of the combined potential difference vector representation after each potential difference disturbance is suppressed according to the second feature combination factor to obtain a target electroencephalogram signal after disturbance suppression; The method further comprises: If the implantable electroencephalogram signal set does not include a previous signal segment adjacent to the target electroencephalogram signal, the disturbance suppression result of the signal segment of the target electroencephalogram signal is used as the target electroencephalogram signal after disturbance suppression.
10. A computer system, characterized in that: include: one or more processors; Memory; one or more computer programs; The one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Adversarial disturbance generation method for electroencephalogram signal classification system
CN115659168A
Method and system for front potential detection and feature extraction during deep brain stimulation
CN116584959A
Method for augmenting magnetoencephalogram data in machine learning
CN117257312A
Brain function state detection method, device and equipment based on electroencephalogram
CN118830858A
Electric energy quality disturbance identification method and system based on convolutional neural network, and medium
CN119066463A