EEG Signal Amplification Method, Device and Equipment Based on Topological Gradient Field Encoding
Through topological gradient field encoding method, the phase information of the EEG signal is extracted and optimized, combined with traditional amplitude processing, the problem of traditional methods neglecting phase information is solved, and efficient amplification of EEG signal and signal quality is achieved.
Patent Information
- Application Number
- CN202510545493.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Traditional EEG signal enhancement methods mainly focus on the amplitude characteristics of the signal, ignore the importance of phase information to the cognitive process, resulting in low signal-to-noise ratio and dispersion of related features.
Using a topological gradient field encoding method, the phase information of the EEG signal is extracted through Hilbert transform, the topological gradient field is calculated, the critical points and manifolds are identified, the key phase characteristics are screened, and the enhanced phase field is generated by generating an adversarial network (GAN), combined with the low-frequency amplitude component of wavelet decomposition, and nonlinear dynamic model simulation is performed, and finally the final enhanced EEG signal is generated through wavelet reconstruction.
Effectively amplify the EEG characteristic information related to cognitive processes, suppress irrelevant noise interference, improve the spatial and temporal stability and fidelity of signals, and improve the analytical ability of cognitive processes.
Smart Images

Figure CN120067658B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of brain-computer interface technology, and in particular to a method, device and equipment for amplifying electroencephalogram (EEG) signals based on topological gradient field coding. Background Art
[0002] As a bioelectric signal reflecting the brain's neural activity, EEG signals have important application value in many fields such as neuroscience, cognitive computing, and brain-computer interface. However, raw EEG signals usually have problems such as low signal-to-noise ratio and scattered related features, which brings challenges to subsequent signal processing and cognitive analysis. Therefore, how to effectively amplify EEG feature information related to cognitive processes and suppress irrelevant noise interference has always been the focus and difficulty of EEG signal processing.
[0003] Traditional EEG signal enhancement methods mainly include wavelet analysis, independent component analysis (ICA), common spatial patterns (CSP), etc. They try to separate the components of interest from the original signal through time-frequency analysis, statistical separation or spatial filtering. However, these methods often only consider the amplitude characteristics of the signal, while ignoring the importance of phase information to cognitive processes. The latest neural coding research shows that the electric field activity in the cerebral cortex is not only reflected in the amplitude oscillation caused by neuronal discharge, but also its phase distribution and phase propagation pattern in space are also crucial to cognitive function. The topological invariant of the phase gradient field in space can encode the path of neural oscillations in the brain network, reflecting the functional connection and information flow between brain regions.
[0004] Based on the above understanding, some new methods have emerged that attempt to use phase information to analyze and decode EEG data, such as phase synchronization matrix analysis and phase lag index estimation, but most of these methods are limited to the statistical description of phase information and lack the means to deeply optimize the phase itself. On the other hand, the time-frequency characteristics of EEG signals have strong structural characteristics in time and space, which can be described by theoretical tools of topology and differential geometry, but the application of this mathematical framework in the field of EEG signal processing is still in its infancy and needs further development and improvement. Summary of the invention
[0005] The embodiment of the present application provides a method, device and apparatus for amplifying EEG signals based on topological gradient field coding, and the method aims to solve the problem that traditional EEG signal enhancement methods mainly include wavelet analysis, independent component analysis (ICA), common spatial pattern (CSP), etc., which try to separate components of interest from the original signal by means of time-frequency analysis, statistical separation or spatial filtering. However, these methods often only consider the amplitude characteristics of the signal, and ignore the importance of phase information to the cognitive process.
[0006] In a first aspect, an embodiment of the present application provides an electroencephalogram signal amplification method based on topological gradient field encoding, including:
[0007] Obtaining a first data set corresponding to the electroencephalogram of the subject's scalp through an electroencephalogram acquisition device, where the first data set includes the number of electrodes, the number of events, and the number of time points;
[0008] Performing Hilbert transform on the first data set to extract phase information, where the phase information includes the number of electrodes, the frequency band index, and the time window index, to calculate the topological gradient field, and determining the source manifold and sink manifold of the topological gradient field through critical point analysis, for encoding the phase information into a topological structure including the spatial distribution of critical points and the manifold connection relationship;
[0009] Extracting key phase features that satisfy the energy concentration feature and the duration feature from the topological gradient field, to screen key phase features with an energy concentration threshold greater than a preset value and a duration exceeding the time threshold;
[0010] Inputting the key phase features into a pre-constructed generative adversarial network, where the generator of the generative adversarial network generates an enhanced phase field through adversarial training, and introducing topological loss and phase continuity constraints into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network;
[0011] Combining the enhanced phase field with the low-frequency amplitude component obtained by wavelet decomposition of the first data set to construct a complex field, and simulating the spatio-temporal evolution of the complex field based on a nonlinear dynamics model;
[0012] Separating the phase field and the amplitude field from the simulated complex field, and performing wavelet reconstruction on the phase field and the original high-frequency detail components to generate a finally enhanced and amplified electroencephalogram signal.
[0013] In a second aspect, the present application further provides an electroencephalogram signal amplification device based on topological gradient field encoding, including:
[0014] A data acquisition module, configured to obtain a first data set corresponding to the electroencephalogram of the subject's scalp through an electroencephalogram acquisition device, where the first data set includes the number of electrodes, the number of events, and the number of time points;
[0015] A gradient calculation module, configured to perform Hilbert transform on the first data set to extract phase information, where the phase information includes the number of electrodes, the frequency band index, and the time window index, to calculate the topological gradient field, and determining the source manifold and sink manifold of the topological gradient field through critical point analysis, for encoding the phase information into a topological structure including the spatial distribution of critical points and the manifold connection relationship;
[0016] A feature extraction module, configured to extract key phase features that satisfy the energy concentration feature and the duration feature from the topological gradient field, so as to screen key phase features whose energy concentration threshold is greater than a preset value and whose duration exceeds a time threshold;
[0017] A feature input module, configured to input the key phase features into a pre-constructed generative adversarial network. The generator of the generative adversarial network generates an enhanced phase field through adversarial training, and introduces a topological loss and a phase continuity constraint into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network;
[0018] A component combination module, configured to combine the enhanced phase field with the low-frequency amplitude component obtained by wavelet decomposition of the first data set to construct a complex field, and simulate the spatio-temporal evolution of the complex field based on a non-linear dynamics model;
[0019] A signal amplification module, configured to separate the phase field and the amplitude field from the simulated complex field, perform wavelet reconstruction on the phase field and the original high-frequency detail component, and generate a finally enhanced and amplified electroencephalogram signal.
[0020] In a third aspect, the present application further provides a computer device, including a processor and a memory. The memory is used to store a computer program, and when the computer program is executed by the processor, it implements the electroencephalogram signal amplification method based on topological gradient field encoding as described in the first aspect.
[0021] This method proposes an electroencephalogram signal enhancement technology that combines topological gradient field encoding and a generative adversarial network (GAN). The core lies in using the topological structure features of phase information for signal amplification. The specific steps and technical key points are as follows:
[0022] 1. Phase information extraction and topological encoding: Hilbert transform: Extract the instantaneous phase information of the electroencephalogram signal through the Hilbert transform (traditional methods often ignore the phase), and construct a three-dimensional phase field including electrodes, frequency bands, and time windows. Topological gradient field analysis: Calculate the topological gradient based on the phase field, identify critical points (source manifolds and sink manifolds), and encode the phase information as a topological structure to characterize the dynamic spatial distribution and connection relationship of the electroencephalogram signal.
[0023] 2. Key phase feature screening: Combine energy concentration (threshold filtering noise) and duration (time window stability) to screen key features, and retain significant phase components related to the cognitive process.
[0024] 3. Enhancement of Generative Adversarial Network (GAN): Generator: Generate enhanced phase fields through adversarial training, introduce a topological loss function (to maintain the original topological consistency) and a phase continuity constraint (to avoid phase jumps), and improve the spatio-temporal stability of the generated signals. Adversarial optimization: Different from the amplitude reconstruction of traditional GANs, focus on optimizing the authenticity of the topological structure of the phase field.
[0025] 4. Complex field reconstruction and spatio-temporal evolution: Wavelet decomposition: Decompose the original signal into a low-frequency amplitude component (the main energy component) and a high-frequency detail component (noise and details).
[0026] Nonlinear dynamics model: Combine the enhanced phase field with the low-frequency amplitude to form a complex field, simulate its spatio-temporal evolution process, and preserve the state characteristics. Wavelet reconstruction: Fuse the enhanced phase field with the original high-frequency components and output the finally amplified EEG signal.
[0027] The method provided breaks through the limitation of traditional methods that only focus on amplitude, reveals the dynamic connection characteristics of EEG signals through phase topological coding, and improves the analytical ability for cognitive processes (such as attention and memory). Based on the dual feature screening of energy and time, combined with the topological consistency constraint of GAN, it effectively suppresses noise interference and enhances signal fidelity. Through the complex field nonlinear evolution model, it preserves the spatio-temporal dynamic characteristics of the signal and is applicable to the enhanced analysis of high-frequency EEG components (such as Gamma waves). It can be integrated into fields such as brain-computer interface (BCI), epilepsy warning, and neurological disease diagnosis to improve the detection sensitivity of weak signals.
[0028] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit this application. Brief Description of the Drawings
[0029] Figure 1 It is a schematic flowchart of the EEG signal amplification method based on topological gradient field coding shown in the embodiments of this application;
[0030] Figure 2 It is a schematic structural diagram of the EEG signal amplification device shown in the embodiments of this application;
[0031] Figure 3 It is a schematic structural diagram of the computer device shown in the embodiments of this application. Detailed Description of the Embodiments
[0032] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of this application. However, those skilled in the art should clearly understand that this application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of this application.
[0033] It should be understood that when used in the specification of this application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0034] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] As used in the specification of this application and the appended claims, the term "if" may be interpreted, depending on the context, as "when", "once", "in response to determining", or "in response to detecting". Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]".
[0036] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0037] Reference to "one embodiment" or "some embodiments" or the like described in the specification of this application means that a specific feature, structure or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0038] The technical solutions of the embodiments of this application will be introduced below.
[0039] As a bioelectrical signal reflecting brain nerve activities, electroencephalogram (EEG) signals have important application values in many fields such as neuroscience, cognitive computing, and brain-computer interfaces. However, the original EEG signals usually have problems such as low signal-to-noise ratio and scattered relevant features, which pose challenges to subsequent signal processing and cognitive analysis. Therefore, how to effectively amplify the EEG feature information related to the cognitive process and suppress the interference of irrelevant noise has always been the focus and difficulty of EEG signal processing.
[0040] Traditional EEG signal enhancement methods mainly include wavelet analysis, independent component analysis (ICA), common spatial patterns (CSP), etc. They try to separate the components of interest from the original signal through time-frequency analysis, statistical separation or spatial filtering. However, these methods often only consider the amplitude characteristics of the signal, while ignoring the importance of phase information to cognitive processes. The latest neural coding research shows that the electric field activity in the cerebral cortex is not only reflected in the amplitude oscillation caused by neuronal discharge, but also its phase distribution and phase propagation pattern in space are also crucial to cognitive function. The topological invariant of the phase gradient field in space can encode the path of neural oscillations in the brain network, reflecting the functional connection and information flow between brain regions.
[0041] Based on the above understanding, some new methods have emerged that attempt to use phase information to analyze and decode EEG data, such as phase synchronization matrix analysis and phase lag index estimation. However, most of these methods are limited to the statistical description of phase information and lack the means to deeply optimize the phase itself. On the other hand, the time-frequency characteristics of EEG signals have strong structural characteristics in time and space, which can be described by theoretical tools of topology and differential geometry. However, the application of this mathematical framework in the field of EEG signal processing is still in its infancy and needs further development and improvement. Please refer to Figure 1 , Figure 1 A schematic diagram of a process flow of an EEG signal amplification method based on topological gradient field coding provided in an embodiment of the present application. The EEG signal amplification method based on topological gradient field coding in an embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the EEG signal amplification method based on topological gradient field coding in this embodiment includes steps S101 to S106, which are described in detail as follows:
[0042] Step S101, obtaining a first data set corresponding to the scalp EEG of the subject through an EEG acquisition device, wherein the first data set includes the number of electrodes, the number of events, and the number of time points.
[0043] Specifically, use the relevant API interface of the brain headband device to pass in parameters to select an appropriate electrode system, such as a dry electrode array or a wet electrode array. Set the number of electrodes to 64 channels (32 for each hemisphere), with the layout following the international 10-20 system and the corresponding spatial resolution. At the same time, specify the headband model used, the conductive gel model (if using wet electrodes), etc. Call the subject information collection module to enter the basic information of the subject and automatically generate a number. Call the electrode placement algorithm to calculate the electrode position coordinates according to the selected electrode system, and guide the correct wearing and adjustment of the position and angle of the brain headband to make the electrodes fit the scalp. For wet electrodes, automatically distribute an appropriate amount of conductive gel to each electrode. Call the impedance detection module to scan the impedance values between each electrode and the scalp until the impedance of all electrodes is below the set acceptable range threshold, generally below 20 kΩ. Configure the data acquisition parameters, set the sampling frequency to 512 Hz to meet the requirements of the Nyquist sampling theorem, select the gain multiple, generally from several thousand to tens of thousands of times, configure the filter module, and load the preset Butterworth or Chebyshev filter parameters to filter out 50 / 60 Hz power frequency interference and electromyographic interference, etc. At the same time, to ensure signal quality, the system is configured with a real-time artifact detection module that can identify and mark common artifacts such as blinks (amplitude exceeding ±75 μV) and electromyograms (high-frequency signal amplitude exceeding ±25 μV). Set dynamic baseline drift detection, requiring the drift amplitude to be controlled within 50 μV / min, and implement real-time signal-to-noise ratio monitoring to ensure that the signal-to-noise ratio of all channels is greater than 10 dB. When an abnormality is detected, the system automatically adjusts the gain parameters or triggers the electrode re-fitting procedure. For electrodes with abnormal impedance, the system performs adaptive gain compensation through software algorithms to reduce signal distortion caused by impedance mismatch.
[0044] Start the electroencephalogram (EEG) data acquisition program, sample, amplify, and filter the weak voltage signals detected by 64 electrodes on the subject's scalp in real time, and continuously store the original data in the format of a three-dimensional matrix, namely X(64, 200, 512), where 64 is the number of electrodes, 200 is the number of sampling sequences, and 512 is the number of time points in each sequence. Each element X(i, j, k) represents the voltage value of the i-th electrode at the k-th time point in the j-th sequence, with the unit of μV. During the acquisition process, the system performs data quality control, including statistical processing such as arithmetic mean, weighted mean, outlier removal, and interpolation of missing data on the acquired signals to eliminate random noise. The system automatically records configuration information such as the electrode system type, conductive gel specification, sampling frequency, gain setting, and filter parameters, and stores it in association with the original EEG data. Quality assessment is performed on all channel data, including signal-to-noise ratio calculation, baseline stability scoring (0 - 100), artifact proportion statistics, and data integrity verification. Finally, the data with qualified quality is output as the first data set, and the data format is a standard three-dimensional matrix structure, containing the complete time series of 64-channel EEG signals.
[0045] In some embodiments, obtaining the first data set corresponding to the subject's scalp electroencephalogram through the EEG acquisition device includes: obtaining the original EEG signal corresponding to the subject's scalp electroencephalogram through the EEG acquisition device; performing band-pass filtering on the original EEG signal to remove high-frequency noise and baseline drift, separating and removing electrooculogram (EOG) artifacts using independent component analysis, segmenting and aligning the original EEG signal according to event markers to extract event-related potentials and performing amplitude normalization to eliminate individual differences, so as to form a three-dimensional time-domain EEG signal matrix including the number of electrodes, the number of events, and the number of time points as the first data set.
[0046] Preprocess the original EEG data set X(n, m, t) obtained in the above steps. First, perform baseline correction. The purpose of baseline correction is to remove the DC component offset between different trials. Usually, it is carried out by piecewise linear fitting and subtraction operation. Subtract the baseline voltage value of each trial (usually taking the average voltage in a period before the start of the trial as the baseline) from the voltage values of all time points in this trial, so as to eliminate the offset and improve the comparability between different trials. The data after baseline correction can be expressed as X'(n, m, t).
[0047] Next, resampling is performed. Since the sampling frequencies of different devices may vary, for the convenience of subsequent processing, the data needs to be resampled to a unified frequency. Commonly used resampling frequencies are 256Hz or 512Hz. Resampling algorithms can include cubic interpolation, wavelet interpolation, etc. The resampled data can be expressed as X''(n,m,t'). Based on X'(n,m,t), the system needs to adaptively adjust the filtering parameters according to the degree of DC component suppression. Specifically, when the baseline correction effect is good (residual DC component less than 1 microvolt), the low-frequency cut-off frequency of the band-pass filter can be set above 0.1Hz; when it is detected that the baseline drift has not been completely eliminated, the low-frequency cut-off frequency needs to be increased to above 0.5Hz to further suppress the residual drift. At the same time, the order and passband ripple parameters of the filter will also be dynamically optimized according to the signal-to-noise ratio level of X'(n,m,t) to reduce signal distortion while ensuring the filtering effect.
[0048] Then, band-pass filtering is carried out to remove the frequency bands of no interest and retain the frequency range meaningful for the experiment. For example, for event-related potential (ERP) experiments, the frequency band of 0.1 - 30Hz is retained, and for alpha wave analysis, the frequency band of 8 - 13Hz is retained. Filtering algorithms can use finite impulse response (FIR) or infinite impulse response (IIR) filters. Commonly used IIR filters include Butterworth, Chebyshev, etc. FIR filters are usually designed using the window function method. For the IIR Butterworth band-pass filter, its transfer function can be expressed as H(z)=A(z) / B(z), where A(z) and B(z) are the numerator and denominator polynomials respectively, and the coefficients are calculated through preset cut-off frequencies, passband, and stopband performance parameters. The data after band-pass filtering can be expressed as X'''(n,m,t'').
[0049] Next, artificial residual deduction is performed. Since blinking, small body movements, etc. will introduce large artifact voltages, these time points need to be marked and deducted. Algorithms such as independent component analysis (ICA) can be used to automatically detect and remove these artifact components. The ICA algorithm is based on the idea of decomposing the mixed signal into multiple statistically independent source signals. By maximizing the objective function of source non-Gaussianity and mutual statistical independence, the separation matrix and source signals are iteratively solved. Among them, the artifact components can be identified as independent components with large amplitudes and instantaneous characteristics. The data after residual deduction can be expressed as X''''(n,m,t''').
[0050] Finally, the data is segmented and averaged. For event-related experiments, multiple trials usually need to be segmented and aligned according to events (such as the stimulus presentation time point), and the data within each segment is arithmetically averaged or weighted averaged to remove random noise unrelated to the event and enhance the event-related EEG response components. For example, in a visual ERP experiment, each trial can be segmented into 500 ms before the stimulus and 1000 ms after the stimulus according to the image presentation time point, and the averages are calculated separately. The optimized data set after segmented averaging can be expressed as Y(n, p, q), where p is the event number and q is the number of time points before and after the event.
[0051] Step S102: Perform Hilbert transform on the first data set to extract phase information, where the phase information includes the number of electrodes, frequency band index, and time window index, to calculate the topological gradient field. Determine the source manifold and sink manifold of the topological gradient field through critical point analysis for encoding the phase information into a topological structure including the spatial distribution of critical points and the manifold connection relationship.
[0052] Specifically, perform discrete wavelet transform on the optimized data set Y(n, p, q) obtained in the above steps to decompose it into approximate components and detail components of different scales. This transformation process can be expressed as WT(Y(n, p, q)) = (A_J, D_1,..., D_J), where A_J is the approximate component, reflecting the low-frequency component of the signal, and D_j (j = 1,..., J) are the detail components, reflecting the high-frequency components. By selecting appropriate wavelet bases such as Haar, Daubechies, Coiflets, etc., EEG signals in different frequency bands can be effectively separated.
[0053] In some embodiments, the performing Hilbert transform on the first data set to extract phase information includes: performing band-pass filtering and frequency band division processing on the first data set according to a preset frequency band to construct a complex analytic signal; extracting the phase angle information of each time window corresponding to the complex analytic signal to form a three-dimensional phase information matrix with the electrode number as the first dimension, the event number as the second dimension, and the time window number as the third dimension as the phase information; where the phase angle information corresponding to the phase information is obtained through the arctangent operation of the ratio of the imaginary part to the real part of the Hilbert transform.
[0054] First, the phase extraction is performed on the approximation component \(A_J\) obtained by wavelet transform, aiming to extract phase information from the time-domain signal to form the phase matrix \(\Psi(n, p, q)\). The Hilbert transform method is usually adopted for phase extraction. The Hilbert transform is a linear time-invariant (LTI) transform that can convert any real-valued time-domain signal \(f(t)\) into an analytic signal \(f_A(t)\), where \(f_A(t)=f(t)+jf_H(t)\). \(f_H(t)\) is called the Hilbert transform of \(f(t)\) and is defined as \(f_H(t)=\frac{1}{\pi}\int_{-\infty}^{\infty}\frac{f(\tau)}{t - \tau}d\tau\), where the integral is the Cauchy principal value integral. It can be seen that \(f_H(t)\) is the convolution of \(f(t)\) and \(\frac{1}{\pi t}\), so it is equivalent to applying the convolution of the singular kernel \(\frac{1}{\pi t}\) to \(f(t)\). The real part of the analytic signal \(f_A(t)\) is the original real-valued signal \(f(t)\), and the imaginary part is \(f_H(t)\). The amplitude and phase of the analytic signal can be given by \(|f_A(t)|=\sqrt{f(t)^2 + f_H(t)^2}\) and \(\angle\Psi(t)=\tan^{-1}(\frac{f_H(t)}{f(t)})\), respectively. Therefore, through the Hilbert transform, the phase information \(\Psi(t)\) can be extracted from the real-valued time-domain signal \(f(t)\). For each time point, event, and electrode channel in the optimized dataset \(A_J(n, p, q)\), the Hilbert transform can be applied to extract the phase. Specifically, for the \(i\)-th electrode, \(j\)-th event, and \(k\)-th time point, the phase value \(\Psi(i, j, k)\) can be calculated by \(\tan^{-1}(\frac{\text{Im}(f_A(i, j, k))}{\text{Re}(f_A(i, j, k))})\), where \(f_A(i, j, k)\) is the Hilbert transform of \(A_J(i, j, k)\). Combining the phase values of all time points, events, and electrodes, the phase matrix \(\Psi(n, p, q)\) can be obtained.
[0055] Exemplarily, determining the source manifold and sink manifold of the topological gradient field through critical point analysis for encoding the phase information into a topological structure including the spatial distribution of critical points and the manifold connection relationship, includes: calculating the phase gradient field along the electrode spatial dimension for the three-dimensional phase information matrix; identifying the local extreme points of the three-dimensional phase information matrix as critical points through second derivative extreme value detection; discriminating the critical point type corresponding to the critical points according to the gradient direction field; the critical point type includes any one of saddle points, source points, and sink points; tracing the streamline set connecting each critical point based on the integral curve of the gradient vector field, and constructing the spatial topological connection network of the source manifold and sink manifold through the streamline convergence and divergence patterns.
[0056] Then, a topological gradient field framework is constructed. Regarding the phase matrix \(\Psi(n, p, q)\) as a scalar field defined on the electrode space, its gradient field \(\Psi(n, p, q)\) is the gradient operator, \(\Psi(i, j, k)=( Ψ / x, Ψ / y, Ψ / z)|(i, j, k), that is, the phase gradient at the k-th time point in the j-th event of the i-th electrode, where x, y, and z are the coordinates of the electrode in three-dimensional space. The phase gradient field Ψ(n, p, q) reflects the spatial variation trend of the phase.
[0057] Further calculate the topological invariants of Ψ(n, p, q), including critical points, manifolds, etc. A critical point refers to a point where Ψ(i, j, k) = 0. According to the index of the critical point, it can be divided into nodes, saddle points, etc. Nodes correspond to phase extreme points, saddle points correspond to saddle-shaped regions of the phase, and a manifold refers to the integral line of Ψ(n, p, q) in a certain direction, which reflects the propagation path of the phase in space. Manifolds can be divided into source manifolds and sink manifolds, corresponding to the maximum and minimum values of the phase respectively. The specific calculation process is as follows: For the phase matrix Ψ(n, p, q), first calculate its gradient field Ψ(n, p, q), where Ψ(i, j, k) = ( Ψ / x, Ψ / y, Ψ / z)|(i, j, k), where x, y, and z are the coordinates of the i-th electrode in three-dimensional space. The finite difference method can be used for numerical calculation, such as Ψ / x ≈ (Ψ(i + 1, j, k) - Ψ(i - 1, j, k)) / (x(i + 1) - x(i - 1)). Then search for Ψ(n, p, q) to find the points that satisfy Ψ(i, j, k) = 0, that is Ψ / x = 0, Ψ / y = 0, Ψ / z = 0. These points are the critical points, and the index of the critical point can be calculated from the eigenvalues of the Hessian matrix of Ψ(n, p, q). Let H(i, j, k) be the Hessian matrix, H(i, j, k) = ( ^2Ψ / x^2, ^2Ψ / x y, ^2Ψ / x z; ^2Ψ / y x, ^2Ψ / y^2, ^2Ψ / y z; ^2Ψ / z x, ^2Ψ / z y, ^2Ψ / z^2)|(i, j, k), then the critical point index is the sum of the eigenvalues of H(i, j, k). If the index is greater than 0, it is a node; if less than 0, it is a saddle point; if equal to 0, it is a degenerate critical point. For each node, numerical integration can be carried out along the direction of Ψ(i, j, k). For example, the fourth-order Runge-Kutta method can be used. The integration equations are dx / dt = Ψ / x, dy / dt = Ψ / y, dz / dt = Ψ / z. The integration termination condition is reaching another critical point or the streamline length exceeding a preset threshold, thereby obtaining the source manifold of the node, that is, the phase gradient field "diffuses" along this manifold from the maximum point. For the sink manifold, integration is carried out along the - direction of Ψ(i, j, k), indicating that the phase gradient field "converges" to the minimum point along this manifold.
[0058] By the above method, all critical points of the phase gradient field Ψ(n, p, q) and their source and sink manifolds can be calculated, thereby encoding the EEG phase information Ψ(n, p, q) into a topological structure. This topological encoding method can not only retain the amplitude information of the phase, but also capture the spatial variation pattern of the phase, thus revealing the propagation law of EEG activities on the cerebral cortex.
[0059] Step S103: Extract key phase features that satisfy the energy concentration feature and the duration feature from the topological gradient field to screen key phase features with an energy concentration threshold greater than a preset value and a duration exceeding a time threshold.
[0060] Specifically, key features need to be extracted from the encoded topological gradient field to meet the first condition, which is assumed to be that the key phase features should have a large energy concentration and duration, and be able to reflect the functional connectivity and information flow patterns between brain regions. To this end, features can be extracted from two levels: critical points and manifolds. First, for critical points, the energy concentration feature E_c(i,j,k) = |Ψ(i,j,k)| × exp(-|| Ψ(i,j,k)||^2 / σ^2) is defined, where |Ψ(i,j,k)| is the phase amplitude at the k-th time point of the j-th event of the i-th electrode, and || Ψ(i,j,k)|| is the norm of the phase gradient, and σ is the regularization parameter. The larger the value of E_c(i,j,k), the larger the phase amplitude at the location of the critical point and the smaller the gradient change, indicating more concentrated energy. This is because a smaller phase gradient norm || Ψ(i,j,k)|| means that the phase change near this point is relatively gentle, which is consistent with the characteristics of the phase extreme point, while a larger phase amplitude |Ψ(i,j,k)| reflects a higher electroencephalogram activity intensity corresponding to this point. By introducing the term exp(-|| Ψ(i,j,k)||^2 / σ^2), the gradient norm || Ψ(i,j,k)|| can be Gaussian weighted, making the energy concentration feature E_c(i,j,k) more sensitive to points with a smaller gradient norm, so as to better capture the phase extreme region.
[0061] Exemplarily, extracting the key phase features that meet the energy concentration feature and duration feature from the topological gradient field includes: calculating the energy concentration feature of each critical point, which is composed of the Gaussian weighted product of the phase amplitude and the gradient norm; calculating the energy duration feature of each critical point in the time dimension, and the duration feature is obtained by accumulating the normalized energy concentration sequence; setting an energy concentration threshold and a time threshold, and screening the critical points that simultaneously meet the energy concentration threshold and the time threshold as the key phase features reflecting the functional connectivity and information flow patterns between brain regions.
[0062] The energy duration characteristic T_c(i,j)=∑_kE_c(i,j,k) / (max_kE_c(i,j,k)) is further defined, that is, the energy concentration of the critical point is accumulated and normalized in the time dimension. The larger the value of T_c(i,j), the longer the energy of the critical point lasts in time. This is because if a critical point has a high energy concentration at multiple consecutive time points, the corresponding T_c(i,j) value will be larger. Phase characteristics with longer duration usually correspond to the brain's continuous cognitive processing process and have more important physiological significance.
[0063] Multiply the above two features, that is, F_c(i,j)=E_c(i,j,k_max)×T_c(i,j), where k_max is the time point when E_c(i,j,k) reaches the maximum value. F_c(i,j) is the critical point feature of the jth event of the i-th electrode, reflecting the energy concentration of the phase feature corresponding to the critical point in space and time. By calculating F_c(i,j) of all critical points, phase features with large energy concentration and duration can be identified. These features often correspond to the key cognitive processing areas and processes of the brain.
[0064] For the manifold, define the flow intensity feature I_m(l,j)=1 / L(l,j)∫_0^L(l,j)|| Ψ(x(s),j,t(s))||ds, where l is the manifold number, L(l,j) is the length of the lth manifold in the jth event, x(s) and t(s) are the spatial coordinates and time coordinates on the manifold, respectively. I_m(l,j) represents the average value of the phase gradient norm integrated along the manifold, reflecting the phase change rate or information flow intensity on the manifold. Phase gradient norm|| A larger Ψ(x(s),j,t(s))|| means that the phase change near this point is more drastic, corresponding to the rapid propagation of EEG signals in this area. By integrating the gradient norm along the manifold and taking the average, the intensity of information flow on the manifold can be quantified.
[0065] The flow duration characteristic T_m(l,j)=L(l,j) / v_max is further defined, where v_max is the preset maximum allowed flow rate. T_m(l,j) reflects the time required for the information on the manifold to propagate from one end to the other, that is, the duration of the manifold. Manifolds with longer durations usually correspond to long-range functional connections between brain regions and play an important role in cognitive processing.
[0066] Multiply the above two features, i.e., F_m(l,j)=I_m(l,j)×T_m(l,j). F_m(l,j) is the manifold feature of the l-th manifold in the j-th event, reflecting the phase propagation intensity and duration on this manifold. By calculating F_m(l,j) for all manifolds, manifolds with strong information flow intensity and long duration can be identified, and these manifolds often correspond to the key functional connections and information flow paths between brain regions.
[0067] By integrating the critical point feature F_c(i,j) and the manifold feature F_m(l,j), key phase features that meet the first condition can be identified, namely, phase features with large energy concentration, duration, and reflecting the functional connection and information flow pattern between brain regions. These key phase features will be used as the input for the free energy minimization simulation to optimize and amplify the EEG phase information.
[0068] Step S104, input the key phase features into a pre-constructed generative adversarial network. The generator of the generative adversarial network generates an enhanced phase field through adversarial training, and introduce topological loss and phase continuity constraints into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network.
[0069] Specifically, by using the first algorithm, perform free energy minimization simulation on the key phase features identified in the above steps to obtain a second data set with the minimum free energy. This algorithm is based on the principle of variational free energy, aiming to find a probability distribution q(Ψ) to approximate the true EEG phase distribution p(Ψ|Y), so that the Kullback-Leibler divergence D_KL(q(Ψ)||p(Ψ|Y)) between the two is minimized, that is, the expectation of the KL divergence with respect to the data Y is minimized, so that q(Ψ) can better fit the true EEG phase distribution. For this purpose, introduce the variational free energy functional F(q,θ)=E_q[lnq(Ψ)-lnp(Ψ,Y|θ)]=D_KL(q(Ψ)||p(Ψ|Y,θ))+L(q,θ), where θ is the hidden parameter, and L(q,θ) is called the expected lower bound, defined as L(q,θ)=E_q[lnp(Ψ,Y|θ)]-E_q[lnq(Ψ)]. Since the KL divergence is non-negative, so F(q,θ)≥L(q,θ), and the equality holds if and only if q(Ψ)=p(Ψ|Y,θ).
[0070] Therefore, the variational free energy \(F(q,\theta)\) can be approximately minimized by maximizing the lower bound of the expectation \(L(q,\theta)\), so that \(q(\varPsi)\) approximates the true distribution \(p(\varPsi|Y,\theta)\). According to the idea of variational inference, assume that \(q(\varPsi)\) is compatible with a parametric family of probability distributions \(Q\), that is, \(q(\varPsi)\in Q = \{q(\varPsi;\xi)|\xi\in\varXi\}\), where \(\xi\) is the variational parameter and \(\varXi\) is the parameter space. Then maximizing \(L(q,\theta)\) is equivalent to minimizing the KL divergence under the given \(Q\), that is: \(\xi^*=\arg\min_{\xi}D_{KL}(q(\varPsi;\xi)||p(\varPsi|Y,\theta))=\arg\max_{\xi}L(q(\varPsi;\xi),\theta)=\arg\max_{\xi}E_q[\ln p(\varPsi,Y|\theta)] - E_q[\ln q(\varPsi;\xi)]\); By iteratively optimizing to solve \(\xi^*\), a variational posterior distribution \(q(\varPsi;\xi^*)\) that approximates the true distribution \(p(\varPsi|Y,\theta)\) can be obtained. Assume that \(q(\varPsi;\xi)\) is a mean-field Gaussian distribution, that is: \(q(\varPsi;\xi)=N(\varPsi;\varPsi_{\mu},\varSigma_{\varPsi})\), where \(\xi = \{\varPsi_{\mu},\varSigma_{\varPsi}\}\) is the mean-field and covariance-field, then the lower bound of the expectation \(L(q,\theta)\) can be further expressed as: \(L(q,\theta)=E_q[\ln p(\varPsi,Y|\theta)] - E_q[\ln q(\varPsi;\xi)]=E_q[\ln p(Y|\varPsi,\theta)+\ln p(\varPsi|\theta)-\ln q(\varPsi;\xi)]=E_q[\ln p(Y|\varPsi,\theta)]+E_q[\ln p(\varPsi|\theta)]+H(q)\); where \(H(q)=-E_q[\ln q(\varPsi;\xi)]\) is the entropy of \(q(\varPsi;\xi)\), which only depends on the mean-field \(\varPsi_{\mu}\) and the covariance-field \(\varSigma_{\varPsi}\). Under the condition of given data \(Y\) and hidden parameter \(\theta\), maximizing \(L(q,\theta)\) is equivalent to optimizing the mean-field \(\varPsi_{\mu}\) and the covariance-field \(\varSigma_{\varPsi}\), that is: \(\{\varPsi_{\mu}^*,\varSigma_{\varPsi}^*\}=\arg\max_{\varPsi_{\mu},\varSigma_{\varPsi}}L(q,\theta)=\arg\max_{\varPsi_{\mu},\varSigma_{\varPsi}}(E_q[\ln p(Y|\varPsi,\theta)]+E_q[\ln p(\varPsi|\theta)]+H(q))\); The above optimization can be solved by the variational Bayesian method. First, according to the probability model and the observed data, the analytical expressions of the joint log-likelihood \(\ln p(\varPsi,Y|\theta)\) and its log-prior distribution \(\ln p(\varPsi|\theta)\) are constructed, and then the partial derivatives of the mean-field \(\varPsi_{\mu}\) and the covariance-field \(\varSigma_{\varPsi}\) are taken respectively and set to 0, a series of implicit equations about \(\varPsi_{\mu}\) and \(\varSigma_{\varPsi}\) can be obtained, and by solving this system of equations by numerical iteration, the optimal mean-field \(\varPsi_{\mu}\) and covariance-field \(\varSigma_{\varPsi}\) can be obtained, so as to obtain the optimal variational distribution \(q(\varPsi;\xi^*)\) that approximates the true distribution \(p(\varPsi|Y,\theta)\).
[0071] Specifically, assume that the conditional probability distribution of the observed data Y is a Gaussian distribution, i.e., p(Y|Ψ,θ)=N(Y;g(Ψ),Σ_Y), where g(Ψ) is the mean function and Σ_Y is the covariance matrix. The mean function g(Ψ) can be constructed by a linear model or a non-linear model. For example, for a linear model, g(Ψ)=WΨ+b, where W is the weight matrix and b is the bias vector. At the same time, assume that the prior distribution is a zero-mean Gaussian distribution, i.e., p(Ψ|θ)=N(Ψ;0,Σ_Ψ_prior). In this case, the lower bound of the expectation L(q,θ) can be written as:
[0072] L(q,θ)=E_q[lnN(Y;g(Ψ),Σ_Y)]+E_q[lnN(Ψ;0,Σ_Ψ_prior)]+H(q) =-1 / 2E_q[||Y-g(Ψ)||^2_Σ_Y^-1]-1 / 2E_q[||Ψ||^2_Σ_Ψ_prior^-1]+Const;
[0073] where ||x||_Σ^2=x^TΣ^-1x is the generalized norm and Const is a constant term independent of Ψ_μ and Σ_Ψ. Taking the partial derivative with respect to Ψ_μ and setting it equal to 0, we get:
[0074] L / Ψ_μ=E_q[-Ψ^TΣ_Ψ_prior^-1+ g(Ψ)^T(Y-g(Ψ))Σ_Y^-1]=0;
[0075] Since q(Ψ;ξ)=N(Ψ;Ψ_μ,Σ_Ψ), then E_q[Ψ]=Ψ_μ, and E_q g(Ψ)] is the gradient of g(Ψ) with respect to Ψ at the point Ψ_μ g(Ψ_μ). Substituting them into the above equation, we get the implicit equation: g(Ψ_μ)^T(Y-g(Ψ_μ))Σ_Y^-1=Ψ_μ^TΣ_Ψ_prior^-1;
[0076] Taking the partial derivative with respect to Σ_Ψ and setting it equal to 0, we get another implicit equation: Σ_Ψ^-1=Σ_Ψ_prior^-1+ g(Ψ_μ)^TΣ_Y^-1 g(Ψ_μ); Solving the above two implicit equations by numerical iteration, the optimal variational parameters Ψ_μ and Σ_Ψ can be obtained. Further, samples can be drawn from the optimal variational distribution q(Ψ;ξ*) as the enhanced key phase features for output.
[0077] Specifically, first, the second-order Taylor expansion of the target distribution p(Ψ|Y,θ) near the mean field Ψ_μ is performed by the Laplace approximation method to obtain the approximate Gaussian distribution q_L(Ψ;ξ)=N(Ψ;Ψ_μ*,Σ_Ψ*), where Ψ_μ and Σ_Ψ are the optimal mean field and covariance field obtained above. Then, samples are drawn from this approximate Gaussian distribution q_L(Ψ;ξ*) to generate M enhanced key phase feature samples {Ψ^(1),...,Ψ^(M)}.
[0078] The sample generation process is as follows: First, the covariance matrix Σ_Ψ is decomposed into Σ_Ψ = LL^T by Cholesky decomposition, where L is a lower triangular matrix. Then, M independent and identically distributed standard normal random vectors {ε^(1),...,ε^(M)}~N(0,I) are generated. Thus, Ψ^(m)=Ψ_μ*+Lε^(m) also follows the N(Ψ_μ*,Σ_Ψ*) distribution, which is the required key phase feature sample. By averaging or other statistical processing of these samples, the second data set after free energy minimization can be obtained.
[0079] Next, based on the second algorithm, perform a preset number of micro-perturbations and permutations on the phase features in the second dataset obtained in the above steps. The purpose of this algorithm is to explore the impact of the changes in phase features in the local area on topological scene encoding and to find an optimal topological encoding method that can meet the feature requirements of EEG signals. Specifically, the algorithm first extracts all the key phase features Ψ^(m) (m = 1,..., M) from the second dataset. Each sample Ψ^(m) is an N×P×Q-dimensional matrix, where N is the number of electrodes, P is the number of events, and Q is the number of time points. Then, construct a perturbation operator Γ for randomly perturbing the key phase features. This perturbation operator can adopt an additive Gaussian noise model, that is, Γ(Ψ^(m)) = Ψ^(m)+ε, where εN(0,σ^2I) is Gaussian noise with a mean of 0 and a covariance of σ^2I. The noise standard deviation σ controls the amplitude of the perturbation and can be set according to actual needs. An overly large σ will cause significant changes in the phase features, while an overly small σ may not introduce sufficient perturbations. A commonly used choice is to set σ equal to η times the standard deviation of each sample Ψ^(m), that is, σ = η×std(Ψ^(m)), where η is a preset constant, usually taking a value of 0.0101. For each sample Ψ^(m), first generate K perturbed versions {Γ_k(Ψ^(m))|k = 1,..., K}, where K is the preset number of perturbations. The perturbed versions can be obtained by repeatedly applying the perturbation operator Γ, that is, Γ_1(Ψ^(m)) = Γ(Ψ^(m)), Γ_2(Ψ^(m)) = Γ(Γ_1(Ψ^(m))), …, Γ_K(Ψ^(m)) = Γ(Γ_{K - 1}(Ψ^(m))). In this way, the impact of small changes in phase features on topological encoding can be explored in the local area.
[0080] Next, perform permutations on these K + 1 versions {Ψ^(m), Γ_1(Ψ^(m)),..., Γ_K(Ψ^(m))} to construct N_c = C(K + 1, r) different combinations of phase features, where r is the number of phase feature versions expected to be included in the combination, and C(n, r)=n! / (r!(n - r)!) is the combination number. Let the nth combination be Ψ_c^(m,n)={Ψ_c1^(m,n),...,Ψ_cr^(m,n)}. Since each Ψ_cj^(m,n) is an N×P×Q-dimensional matrix, for the convenience of encoding, it is straightened into a PN×Q-dimensional vector, that is, vec(Ψ_cj^(m,n)). By splicing these r vectors column by column, a PN×rQ-dimensional matrix Φ(Ψ_c^(m,n))=[vec(Ψ_c1^(m,n)),...,vec(Ψ_cr^(m,n))] can be obtained.
[0081] The matrix Φ(Ψ_c^(m,n)) is the topological scenario matrix corresponding to the (m,n)-th phase feature combination, which reflects the co-variation relationship between different phase features in space and time. By calculating the topological invariants of the matrix Φ(Ψ_c^(m,n)), this co-variation pattern can be encoded and quantified. Specifically, all k-lift maps (0 ≤ k ≤ r) of the matrix Φ(Ψ_c^(m,n)) are calculated respectively, obtaining a set of Betti numbers {β_k^(m,n)}. The Betti number β_k reflects the number of k-dimensional holes in the topological scenario. When it is 0, it means that there are no k-dimensional holes in this scenario. Therefore, {β_k^(m,n)} can be regarded as the topological encoding of the (m,n)-th phase feature combination, which completely characterizes the variation pattern of the phase features in space and time under this combination.
[0082] Based on the scenario matrix Φ(Ψ_c^(m,n)) obtained in the second paragraph, the system calculates its topological invariants. Specifically, all k-lift maps (0 ≤ k ≤ r) of the matrix Φ(Ψ_c^(m,n)) are calculated respectively, obtaining a set of Betti numbers {β_k^(m,n)}. The Betti number β_k reflects the number of k-dimensional holes in the topological scenario. When it is 0, it means that there are no k-dimensional holes in this scenario. This set {β_k^(m,n)} serves as the topological encoding of the (m,n)-th phase feature combination, which completely characterizes the variation pattern of the phase features in space and time under this combination. For each sample Ψ^(m), N_c different encodings {β_k^(m,n)|n = 1,..., N_c} can be obtained.
[0083] For the obtained topological encoding {β_k^(m,n)}, a decoding operator D is constructed. This operator maps the encoding back to the original phase feature space through the persistence mapping theory in topological data analysis. The specific steps are as follows: First, a persistence sheaf P_n is constructed based on the encoding {β_k^(m,n)}, where each element corresponds to a k-dimensional hole; then P_n is embedded into the high-dimensional Euclidean space R^{PN×rQ} to obtain an embedding mapping f: P_n → R^{PN×rQ}; finally, the original scenario matrix Ψ~_c^(m,n) is decoded through f^-1(P_n). Through this process, M×N_c different decoded versions {Ψ~_c^(m,n)|m = 1,..., M; n = 1,..., N_c} can be obtained. To ensure that the decoding results meet the expected feature requirements, an energy functional E(Ψ~_c) is defined to constrain and optimize the decoding results. This energy functional comprehensively considers indicators such as the energy concentration, duration, functional connectivity, and information flow pattern of the phase features. The specific expression is: .
[0084] Among them, α, β, γ, δ, ζ, and η are the weight coefficients of each item, which are used to balance the importance of different objectives. The first item α|Ψ~_c(i,j,k)|^2 reflects the amplitude of the phase feature. When α>0, it tends to select features with larger amplitudes. The second item β|| Ψ~_c(i,j,k)||^2 is the norm of the phase gradient. When β<0, it tends to select features with smoother changes. The third item γT_c(i,j) is the duration feature of the critical point. When γ>0, it preferentially retains phase features with longer time durations. The fourth item δI_c(i,j) is the flow intensity feature of the manifold. When δ>0, it retains information flows with larger intensities. The fifth item ζ|F_c(i,j)-F_c^0(i,j)|^2 is the deviation between the critical point feature and the original expected value. When ζ>0, it makes the decoding result closer to the original data. The sixth item η|F_m(l,j)-F_m^0(l,j)|^2 is the deviation between the manifold feature and the original expected value. When η>0, it also gets closer to the original data. F_c^0(i,j) and F_m^0(l,j) are the expected values of the critical point feature and the manifold feature in the original data, respectively, and can be obtained by statistical estimation of the second data set. By setting appropriate weight parameters, an objective energy functional E(Ψ~_c) that meets specific requirements can be constructed. Then, the energy functional is minimized for all decoding versions {Ψ~_c^(m,n)} to obtain the global optimal solution: {Ψ~c^*(m,n)} = argmin{Ψ~_c^(m,n)}E(Ψ~_c^(m,n)); this global optimal solution {Ψ~_c^*(m,n)} is the required optimal topological coding method that meets the feature requirements, which can well balance various indicators such as the amplitude, smoothness, duration, functional connectivity, and information flow pattern of the phase feature, and at the same time retain the statistical characteristics of the original data to the greatest extent.
[0085] In some embodiments, introducing topological loss and phase continuity constraints into the loss function of the generative adversarial network includes: adding an L2 norm difference term between the enhanced phase field and the topological gradient field of the original phase field as a topological loss term to the discriminator loss function of the generative adversarial network, introducing a regularization term of the second-order gradient norm of the phase field as a phase continuity constraint, and balancing the relationship between the adversarial loss of the generator of the generative adversarial network and the topological structure consistency by adjusting the topological loss weight coefficient and the regularization coefficient.
[0086] Calculate the binding free energy of all the perturbed phase features in the above steps, and find the best topological coding method that satisfies the second condition. Assume the second condition is: the best topological coding should be able to capture the long-range correlations and aggregation patterns of phase features in space-time to reveal the high-order statistical structure of EEG activities. To this end, regard the M×N_c decoded phase feature versions {Ψ~c^(m,n)|m = 1,..., M; n = 1,..., N_c} obtained in the above steps as a product space Ω = Ω_1×...×Ω_M×N_c, where each Ω(m,n) is a phase feature space of N×P×Q dimensions. Define a complex network model on this product space Ω, and take each Ψ~_c^(m,n) as a node in the network. Specifically, first construct a similarity matrix S between nodes, where S((m_1,n_1),(m_2,n_2)) = exp(-d(Ψ~_c^(m_1,n_1),Ψ~_c^(m_2,n_2)) / σ_d) is the similarity between nodes (m_1,n_1) and (m_2,n_2), d(*,*) is a certain distance metric, such as the L2 norm or kernel distance, and σ_d is a bandwidth parameter that controls the similarity decay rate. The similarity matrix S reflects the topological proximity relationship between different decoded versions and can be used to quantify their correlations in space-time. Next, define the binding free energy of node (m,n) as: F(m,n) = -lnZ^(m,n) + U(Ψ~_c^(m,n)); where Z^(m,n) = ∑_(m',n')S((m,n),(m',n')) is the partition function of node (m,n), and U(Ψ~_c^(m,n)) is the local free energy of node (m,n), which can be set as the logarithmic form of the aforementioned optimized objective energy functional E(Ψ~_c^(m,n)), i.e., U(Ψ~_c^(m,n)) = lnE(Ψ~_c^(m,n)). The physical meaning of the binding free energy F(m,n) is that it takes into account both the local feature optimization objective U(Ψ~_c^(m,n)) and the global topological structure Z^(m,n). When F(m,n) is minimized, the corresponding Ψ~_c^(m,n) can not only better meet the local optimization requirements but also match the global network topology.
[0087] For the entire complex network, define its total free energy as the sum of the binding free energies of all nodes: \(F = \sum_{m,n}F(m,n)=\sum_{m,n}(-\ln Z^{(m,n)}+U(\widetilde{\Psi}_c^{(m,n)}))\); thus, minimizing the total free energy \(F\) can obtain the optimal topological coding method that satisfies the second condition. To this end, it is necessary to perform free energy minimization sampling on the complex network to make the network reach the equilibrium state with the minimum free energy. Commonly used sampling methods include Monte Carlo Markov chain sampling algorithms such as the Metropolis-Hastings algorithm, heat bath simulation, and parallel relaxation. Here, the Metropolis-Hastings algorithm is taken as an example to illustrate. This algorithm includes the following iterative steps: Initialization, randomly select \(M\times N_c\) node states \(\{\widetilde{\Psi}_c^0(m,n)\}\) from the prior distribution as the initial value of the Markov chain, and calculate the initial total free energy \(F_0\). At the \(t\)-th iteration, starting from the existing state \(\{\widetilde{\Psi}_c^t(m,n)\}\), propose the next state \(\{\widetilde{\Psi}_c^{t}(m',n')\}\) according to the preset update strategy. The update strategy can be to resample some nodes or to perform local perturbations on all nodes simultaneously. The perturbation operator \(\Gamma\) can be used as in the above steps. Calculate the free energy \(F_1\) of the new state, and accept or reject this state transition according to the following criterion: If \(F_1\leq F_0\), accept the new state with probability 1, that is, \(\{\widetilde{\Psi}_c^{(t + 1)}(m,n)\}=\{\widetilde{\Psi}_c^t(m',n')\}\); if \(F_1>F_0\), accept the new state with probability \(\exp(-(F_1 - F_0) / T)\), where \(T\) is the simulated annealing temperature and gradually decreases as the number of iteration steps \(t\) increases. Repeat the above steps for several iterations until the Markov chain converges to the equilibrium state. The final sample \(\{\widetilde{\Psi}_c^*(m,n)\}\) is the global minimum point of the total free energy \(F\). Decode the optimal topological coding obtained in the above steps into enhanced EEG phase information, and synthesize it with the original amplitude information in the above steps to form the third dataset. Assume that the optimal topological coding obtained in the above steps is the topological field \(\Psi^*\), which is an \(N\times P\times Q\)-dimensional matrix, where \(N\) is the number of electrodes, \(P\) is the number of events, and \(Q\) is the number of time points. To convert this abstract topological coding into EEG phase information with physiological significance, it is necessary to apply a decoding operator \(D:\Psi\rightarrow\widehat{\Phi}\) to map \(\Psi\) to a phase field \(\widehat{\Phi}\) corresponding to the actual phase information.
[0088] The simplest and most direct approach is to regard \(\Psi\) as an electric potential field and use the Laplace equation \(\nabla^2\Phi = *\(\Psi\) to decode it into the phase field \(\widehat{\Phi}\). Where \(\nabla^2\) is the Laplace operator, * is a divergence operator, and the boundary conditions of Φ^* can be provided by physiological structures such as the scalp and skull. The advantage of this method is its directness and efficiency, while the disadvantage is that it cannot ensure that the decoding results satisfy certain specific physiological constraints. To overcome this defect, a decoding operator based on deep learning can be adopted, and the decoding process can be modeled as a generative adversarial network (GAN).
[0089] Specifically, a generator network G and a discriminator network D are constructed. The generator G: Z → Φ maps a Laplacian noise Z to a synthetic phase field Φ, and the discriminator D: Φ → [0, 1] determines whether the input phase field Φ is real or synthesized by the generator. The generator and the discriminator are trained through the following adversarial loss functions: L_D = E_Φp_data[logD(Φ)] + E_zp_z[log(1 - D(G(z)))]; L_G = E_z~p_z[log(1 - D(G(z)))].
[0090] Among them, p_data is the data distribution of the real phase field, and p_z is the noise distribution, usually taking the standard normal distribution. First, in each batch, the generator G is fixed, and only the discriminator D is updated to minimize L_D; then the discriminator D is fixed, and only the generator G is updated to minimize L_G. The above two steps are alternated until the GAN converges. At this time, G(z) is the required decoding operator D(Ψ*).
[0091] During the training process, the encoding Ψ obtained in the above steps is used as the input, and the original phase information obtained in the above steps is used as the training label. The entire GAN network will learn to map the encoding Ψ to a decoding result Φ^* close to the real phase information. Compared with the decoding method that directly applies the Laplace equation, this deep learning-based decoding method can better retain the detailed features of the phase information while constraining the decoding result to conform to the distribution of the real data.
[0092] Furthermore, a constraint term can be introduced into the loss function of the GAN to ensure that the decoding result Φ^ meets other expectations for the phase information. For example, to make the topological structure of Φ^ as close as possible to the encoding Ψ, the topological field Φ of Φ^ can be compared with Ψ, and a topological loss term is added to the loss function: L_Topology = || Φ^* - Ψ*||; L_Total = L_G + λL_Topology.
[0093] Among them, λ is the weight coefficient of the topological loss. By minimizing the total loss L_Total, the generator not only needs to generate a realistic phase field that can deceive the discriminator, but also needs to ensure that the topological gradient field of the synthesized phase field is as consistent as possible with the encoding Ψ. Similarly, other constraint terms can be added, such as the phase continuity constraint || ^2Φ^||, physiological prior constraint ||Φ^*-Φ_prior||, etc., to make the decoding result meet various expected features.
[0094] After the above decoding process, the enhanced phase information Φ^* is finally obtained. Next, it is necessary to combine it with the original amplitude information to synthesize the enhanced EEG time-domain information. Let the original EEG signal obtained in the above steps be X(n,m,t), which can be decomposed into an approximation component A_J and detail components {D_j} after wavelet transform: X(n,m,t) = A_J(n,m,t) + Σ_j D_j(n,m,t); where A_J(n,m,t) reflects the low-frequency component, and {D_j(n,m,t)} reflects the high-frequency detail components. Since the main concern is the low-frequency EEG activity, only A_J(n,m,t) needs to be retained. By combining its amplitude |A_J(n,m,t)| with the decoded phase Φ^*, the enhanced third dataset Y(n,m,t) can be synthesized: Y(n,m,t) =|A_J(n,m,t)|*exp(iΦ^*(n,m,t)).
[0095] Here, the property of the analytic signal is utilized. By decomposing the complex form of Y(n,m,t)=|A_J(n,m,t)|*exp(iΦ^*(n,m,t)) into real and imaginary parts, we can obtain:
[0096] Re(Y(n,m,t)) = |A_J(n,m,t)|*cos(Φ^(n,m,t)) Im(Y(n,m,t)) = |A_J(n,m,t)|*sin(Φ^(n,m,t)); where Re(Y(n,m,t)) and Im(Y(n,m,t)) are the real and imaginary parts of Y(n,m,t) respectively. In this way, the original amplitude information |A_J(n,m,t)| is perfectly combined with the enhanced phase information Φ^*(n,m,t) to generate the third dataset Y(n,m,t) that contains the advantages of both.
[0097] The generated third dataset Y(n,m,t) not only retains the statistical characteristics of the original amplitude information but also incorporates the optimized phase information. Therefore, it can take into account the advantages of both aspects: on the one hand, after topological coding optimization, the phase distribution of Y is smoother, more regular, and the energy is more concentrated, which is more relevant to the cognitive processing process; on the other hand, the original amplitude distribution remains unchanged during the synthesis process, so the amplitude statistical characteristics of Y remain the same and still follow the distribution of real EEG data.
[0098] Step S105: Combine the enhanced phase field with the low-frequency amplitude component obtained by wavelet decomposition of the first dataset to construct a complex field, and simulate the spatio-temporal evolution of the complex field based on a nonlinear dynamics model.
[0099] Specifically, by performing coupled-field dynamics simulations on the third data set synthesized in the above steps, the interaction and stability between the enhanced phase and the original amplitude information are analyzed. Taking the third data set Y(n, m, t) as the initial condition, coupled-field dynamics simulations based on the Ginzburg-Landau model are carried out on it. The Ginzburg-Landau model is often used to describe phase transition phenomena in complex systems and can well capture the spatio-temporal evolution and stability of field quantities. Regarding Y(n, m, t) as a complex field Ψ(n, m, t), where the phase field Φ^*(n, m, t) corresponds to the imaginary part Im(Ψ), and the amplitude field |A_J(n, m, t)| corresponds to the real part Re(Ψ). The dynamic equation of Ψ(n, m, t) in time t, space n, and event m is: Ψ(n,m,t) / t =-Γ F(Ψ) / Ψ* + η(n,m,t). Here, Γ is the coupling strength parameter, F(Ψ) is the Ginzburg-Landau free energy functional, and η(n,m,t) is the Gaussian white noise field, which reflects the influence from neuron noise and experimental observation errors. The free energy functional F(Ψ) consists of two parts: F(Ψ) = F_Bulk(Ψ) + F_Elastic(Ψ). F_Bulk(Ψ) is the bulk free energy, which describes the intrinsic phase transition behavior of the Ψ field, and F_Elastic(Ψ) is the elastic free energy, which reflects the coupling effect of the Ψ field in space and time. The bulk free energy can be constructed using the two-constant model: F_Bulk(Ψ) = ∫dndr∫dt{a|Ψ|^2 + b|Ψ|^4}.
[0100] Where a and b are two constant parameters that control the phase diagram topology of the Ψ field in the phase plane. By appropriately selecting the signs and magnitudes of a and b, various typical phase transition patterns can be achieved, such as second-order phase transitions, first-order phase transitions, three-arm phase diagrams, etc. For the elastic free energy F_Elastic(Ψ), the following generalized gradient-type expression is adopted: F_Elastic(Ψ) = ∫dndr∫dt{K_1| Ψ / t|^2 + K_2| Ψ|^2 + K_3| ^2Ψ|^2 +...}.
[0101] Here is the gradient operator, and \(K_1, K_2, K_3,\cdots\) are the coefficients of each order term, which reflect the strength of the correlation of the field quantity in time, space, and events. The purpose of introducing \(F_{Elastic}(\Psi)\) is to constrain the smoothness of the \(\Psi\) field in space-time and prevent it from generating high-frequency oscillations or sharp jumps, so that the simulation results are more reliable and stable.
[0102] After the initial field \(\Psi(n,m,t = 0)=Y(n,m,t)\) and the free energy functional \(F(\Psi)\) are given, the dynamic equation \(\frac{\partial\Psi}{\partial}\) \(t=-\Gamma\) \(\frac{\delta F}{\delta}\) \(\Psi^{*}+\eta(n,m,t)\) can be numerically solved to obtain the evolution trajectory of \(\Psi(n,m,t)\) over time. The solution method can use the classical finite difference method to discretize the time and space coordinates, and then apply common algorithms such as Runge - Kutta, linear multi-step, prediction - correction, etc. to advance the time. In specific implementation, the observation area needs to be discretized into a finite grid \(n = 1,\cdots,N\) in space, corresponding to the electrode array on the scalp, and discretized into a time series with an interval \(\Delta t\) in time , corresponding to the sampling time points of the experiment. For event \(m\), it depends on the design of the experimental paradigm, so that the continuous dynamic equation is discretized into:
[0103] . Here, \(\epsilon(n,m,t)\) is standard Gaussian white noise, which can be generated by methods such as rejection sampling, Box - Muller transform, etc. For the \(\frac{\delta F}{\delta}\) \(\Psi\) term, it can be analytically calculated by the variational derivative of the free energy functional \(F(\Psi)\) with respect to \(\Psi\), or numerically differentiated with the help of automatic differentiation tools. During the simulation process, appropriate boundary conditions also need to be clearly set. For example, for the time boundary, \(\Psi(n,m,0)=Y(n,m,t)\) can be set as the initial field observed in the experiment; for the space boundary, physiological structures such as the scalp and skull can be introduced as constraints.
[0104] Through the above simulation steps, the dynamic trajectory of the complex field Ψ(n,m,t) over time can be obtained, thereby analyzing the coupling mechanism and stability of its phase field Im(Ψ) and amplitude field Re(Ψ). A series of coupling and stability measures can be defined to study the evolution law of the complex field Ψ over time: 1) Phase-amplitude coupling strength: C_PA(n,m,t) = |〈Im(Ψ),Re(Ψ)〉| / [|Im(Ψ)||Re(Ψ)|], which reflects the degree of linear correlation between the phase and amplitude in space-time. 2) Phase coherence: C_Phase(n,m,t) = 〈exp(iIm(Ψ))〉, which quantifies the synchronization degree of phases in different brain regions. 3) Amplitude coherence: C_Amp(n,m,t) = 〈Re(Ψ)〉 / max{Re(Ψ)}, which quantifies the concentration degree of the amplitude distribution. 4) Phase evolution rate: C_Evo(n,m,t) = | Im(Ψ) / t|, which reflects the speed of change of the phase field. 5) Phase transition intensity: C_Tran(n,m,t) = | ^2Im(Ψ) / t^2|, which quantifies the suddenness of the phase transition.
[0105] The value ranges and dynamic evolution laws of these measures can reflect the interaction patterns between the phase field and the amplitude field in space-time. For example, when C_PA is large, it indicates a strong linear coupling relationship between the phase and the amplitude; when C_Phase and C_Amp are large, it means that the complex field Ψ tends to be synchronized and uniform throughout the region; while too large C_Evo and C_Tran may indicate an impending phase transition, and the complex field Ψ will transition from the current equilibrium state to a new phase state. By tracking the dynamic trajectories of these measures, it is possible to determine when the complex field reaches a stable equilibrium and when a phase transition will occur, thereby capturing the critical coupling moments and their underlying mechanisms between the phase and the amplitude.
[0106] Step S106: Separate the phase field and the amplitude field from the simulated complex field, and perform wavelet reconstruction on the phase field and the original high-frequency detail components to generate the final enhanced and amplified EEG signals.
[0107] Specifically, in the above steps, a coupled-field dynamics simulation based on the Ginzburg-Landau model was performed on the synthesized third dataset Y(n,m,t) in the above steps to obtain the evolution trajectory of the complex field Ψ(n,m,t) over time, where n is the number of electrodes, m is the number of events, and t is the number of time points.
[0108] In some embodiments, separating the phase field and the amplitude field from the simulated complex field, performing wavelet reconstruction on the phase field and the original high-frequency detail components to generate a final enhanced and amplified electroencephalogram (EEG) signal, includes: performing an inverse discrete wavelet transform on the simulated complex field to separate its imaginary part phase field and real part amplitude field, and retaining the high-frequency detail components obtained by wavelet decomposition of the original signal; layer-by-layer stacking the enhanced phase field and the high-frequency detail components according to the wavelet reconstruction algorithm, and synthesizing, through inverse transformation, a time-domain enhanced EEG signal that simultaneously includes optimized low-frequency phase features and the original high-frequency details.
[0109] Now, it is necessary to extract the phase and amplitude information after simulation enhancement from Ψ(n, m, t) and combine it with the original amplitude information to obtain the final enhanced electroencephalogram signal. The specific steps are as follows: (1) Separate the simulated phase field Φ(n, m, t) and amplitude field A(n, m, t) from the complex field Ψ(n, m, t), which correspond to the imaginary and real parts of Ψ(n, m, t) respectively: Φ(n, m, t) = Im(Ψ(n, m, t)) A(n, m, t) = Re(Ψ(n, m, t)) (2) Combine the simulated phase field Φ(n, m, t) with the original amplitude information |A_J(n, m, t)| obtained in the above step to obtain the simulated enhanced electroencephalogram signal Y'(n, m, t). Here, |A_J(n, m, t)| is the low-frequency approximation component of the original signal obtained by wavelet decomposition in the above step. Using the properties of the complex analytic signal, let: Y'(n, m, t) = A(n, m, t) * exp(iΦ(n, m, t)) = |A_J(n, m, t)| * exp(iΦ(n, m, t)). The real and imaginary parts of the above formula are: Re(Y'(n, m, t)) =|A_J(n, m, t)| *cos(Φ(n, m, t)) Im(Y'(n, m, t)) = |A_J(n, m, t)| * sin(Φ(n, m, t)); In this way, the phase information Φ(n, m, t) optimized by dynamic simulation is perfectly combined with the original amplitude information |A_J(n, m, t)| to generate Y'(n, m, t) that contains the advantages of both. (3) Perform wavelet reconstruction on Y'(n, m, t) and recombine it with the high-frequency detail components D_j(n, m, t) (j = 1,..., J) decomposed in the above step to obtain the final simulated enhanced electroencephalogram signal X'(n, m, t): X'(n, m, t) = Y'(n, m, t) + Σ_j D_j(n, m, t). Where J is the maximum scale level of wavelet decomposition. Through this reconstruction step, it is ensured that X'(n, m, t) not only retains the low-frequency main components in Y'(n, m, t) but also contains the high-frequency detail information of the original signal, so that X'(n, m, t) can better reflect the overall picture of real electroencephalogram activities. The generated X'(n, m, t) is the required enhanced electroencephalogram signal.Compared with the original EEG data X(n,m,t) obtained in the above steps and the synthetic data Y(n,m,t) in the above steps, X'(n,m,t) has the following advantages: (1) It retains the statistical characteristics of the original signal X(n,m,t), such as amplitude distribution, frequency characteristics, etc.; (2) It incorporates phase information optimized by topological coding, with a smoother and more regular phase distribution, and the energy is more concentrated in key components; (3) Through kinetic simulation, the coupling, consistency, and stability between phase and amplitude are further enhanced; (4) Wavelet reconstruction enables X'(n,m,t) to contain information at two scales, low-frequency and high-frequency, making it closer to the complete EEG activity pattern. The following is a specific example to illustrate how to extract X'(n,m,t) from the simulated trajectory Ψ(n,m,t):
[0110] Assume that through the kinetic simulation in the above steps, a complex field Ψ of 64×200×512 dimensions is obtained, corresponding to 64 electrodes, 200 trials, and 512 time points. First, perform a discrete wavelet transform on Ψ in the third dimension (time dimension) and decompose it into a low-frequency approximation component A_5 of scale 5 and its detail components {D_1, D_2, D_3, D_4, D_5}. Let the low-frequency approximation component of the original signal X be A_J, which has the same dimension of 64×200 as A_5. The specific calculation process is as follows: First, extract the imaginary part and the real part respectively: Φ = imag(Ψ) (extract the imaginary part as the phase field); A = real(Ψ) (extract the real part as the amplitude field); Y' = A.exp(1iΦ) (synthesize the simulated enhanced signal); where Y' is a 64×200×512-dimensional matrix. Then synthesize the low-frequency approximation component of Y' with D_j: Y'_A5 = idwt(Y','sym8', D_5, D_4, D_3, D_2, D_1); X' = Y'_A5 + A_J (obtain a 64×200×512-dimensional result); The finally obtained X' is the enhanced and amplified EEG signal.
[0111] The provided method has the following beneficial effects:
[0112] 1. Through an innovative topological gradient field coding method, an efficient representation of EEG phase information is achieved. This technical solution encodes the EEG phase information as a gradient field with a clear topological structure, and through topological invariants such as critical points and manifolds, a multi-dimensional description of phase characteristics is realized. The system can effectively identify and locate key phase characteristics, and concentrate the scattered phase information in the original signal. This coding method not only retains the integrity of the phase information but also reveals the internal law of phase change.
[0113] 2 Through dual optimization of free energy minimization and coupled field dynamics, the precise amplification of phase characteristics is achieved. First, this scheme uses variational inference and the principle of free energy minimization to optimize the phase characteristics after topological encoding, highlighting the key components with characteristics such as energy concentration and long duration. Then, through coupled field dynamics simulation, the coupling stability between the optimized phase and the original amplitude information is enhanced, ensuring the controllability of the phase amplification process. This dual optimization mechanism can specifically enhance the important phase characteristics related to cognitive activities.
[0114] 3 An innovative unified processing framework for phase optimization and amplitude preservation is established. This scheme uses wavelet decomposition and reconstruction techniques to enhance the key phase characteristics while preserving the original amplitude information, and ensures the reliability of the processing results through a systematic quality assessment mechanism. The finally generated enhanced signal not only has more prominent phase characteristics but also retains the statistical characteristics of the original signal, thus ensuring the authenticity and effectiveness of the signal while improving the signal quality.
[0115] To implement the electroencephalogram (EEG) signal amplification method based on topological gradient field encoding corresponding to the above method embodiments to achieve the corresponding functions and technical effects. Refer to Figure 2 , Figure 2 FIG. shows a structural block diagram of an EEG signal amplification device 200 provided by an embodiment of the present application. For ease of description, only the parts related to this embodiment are shown. The EEG signal amplification device 200 provided by the embodiment of the present application includes:
[0116] A data acquisition module 201, configured to obtain a first data set corresponding to the scalp electroencephalogram of a subject through an EEG acquisition device, where the first data set includes the number of electrodes, the number of events, and the number of time points;
[0117] A gradient calculation module 202, configured to perform a Hilbert transform on the first data set to extract phase information, where the phase information includes the number of electrodes, the frequency band index, and the time window index, to calculate a topological gradient field, and determine the source manifold and sink manifold of the topological gradient field through critical point analysis, for encoding the phase information into a topological structure including the spatial distribution of critical points and the manifold connection relationship;
[0118] A feature extraction module 203, configured to extract key phase characteristics that meet the energy concentration characteristics and duration characteristics from the topological gradient field, to screen out key phase characteristics with an energy concentration threshold greater than a preset value and a duration exceeding a time threshold;
[0119] A feature input module 204 is configured to input key phase features into a pre-constructed generative adversarial network. The generator of the generative adversarial network generates an enhanced phase field through adversarial training, and a topological loss and a phase continuity constraint are introduced into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network.
[0120] A component combination module 205 is configured to combine the enhanced phase field with the low-frequency amplitude component obtained by wavelet decomposition of the first data set to construct a complex field, and simulate the spatio-temporal evolution of the complex field based on a nonlinear dynamics model.
[0121] A signal amplification module 206 is configured to separate the phase field and the amplitude field from the simulated complex field, perform wavelet reconstruction on the phase field and the original high-frequency detail component, and generate a finally enhanced and amplified electroencephalogram signal.
[0122] The above electroencephalogram signal amplification device 200 can implement the electroencephalogram signal amplification method based on topological gradient field encoding in the above method embodiments. The optional items in the above method embodiments are also applicable to this embodiment, and will not be elaborated here. The remaining content of the embodiments of the present application can refer to the content of the above method embodiments, and will not be repeated in this embodiment.
[0123] Figure 3 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 3 shown, the computer device 3 in this embodiment includes: at least one processor 30 ( Figure 3 only one is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30. When the processor 30 executes the computer program 32, the steps in any of the above method embodiments are implemented.
[0124] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, and a cloud server. The computer device may include but is not limited to the processor 30 and the memory 31. Those skilled in the art can understand that Figure 3 merely examples of the computer device 3, and do not constitute a limitation on the computer device 3. It may include more or fewer components than those shown in the figure, or combine some components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0125] The so-called processor 30 may be a Central Processing Unit (CPU), and the processor 30 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0126] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as the hard disk or memory of the computer device 3. In some other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the computer device 3. Further, the memory 31 may also include both the internal storage unit and the external storage device of the computer device 3. The memory 31 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program, etc. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0127] In addition, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0128] An embodiment of the present application provides a computer program product, and when the computer program product runs on a computer device, the computer device is caused to implement the steps in each of the above method embodiments when executed.
[0129] In several embodiments provided in this application, it can be understood that each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, the program segment, or the part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
[0130] If the described functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, and other various media that can store program codes.
[0131] The specific embodiments described above have further elaborated on the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only for the specific embodiments of this application and is not used to limit the protection scope of this application. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.
Claims
1. A method for amplifying electroencephalogram signals based on topological gradient field coding, characterized in that: include: Acquire a first data set corresponding to the scalp EEG of the subject through an EEG acquisition device, wherein the first data set includes the number of electrodes, the number of events, and the number of time points; Performing Hilbert transform on the first data set to extract phase information, the phase information including the number of electrodes, frequency band index and time window index, so as to calculate the topological gradient field, and determining the source manifold and sink manifold of the topological gradient field by critical point analysis, so as to encode the phase information into a topological structure including the spatial distribution of critical points and the connection relationship of manifolds; Extracting key phase features that satisfy energy concentration features and duration features from the topological gradient field to screen key phase features whose energy concentration threshold is greater than a preset value and whose duration exceeds a time threshold; Inputting key phase features into a pre-built generative adversarial network, wherein the generator of the generative adversarial network generates an enhanced phase field through adversarial training, and introducing topological loss and phase continuity constraints into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network; Combining the enhanced phase field with the low-frequency amplitude component of the first data set decomposed by wavelet to construct a complex field, and simulating the spatiotemporal evolution of the complex field based on a nonlinear dynamics model; The phase field and amplitude field are separated from the simulated complex field, and the phase field and the original high-frequency detail component are reconstructed by wavelet to generate the final enhanced and amplified EEG signal.
2. The method according to claim 1, characterized in that The step of acquiring a first data set corresponding to the scalp electroencephalogram of the subject by using an electroencephalogram acquisition device includes: The original EEG signal corresponding to the subject's scalp EEG is obtained through an EEG acquisition device; The raw EEG signals are subjected to bandpass filtering to remove high-frequency noise and baseline drift, independent component analysis is used to separate and remove electrooculographic artifacts, the raw EEG signals are segmentally aligned according to event markers to extract event-related potentials and amplitude normalized to eliminate individual differences, so as to form a three-dimensional time-domain EEG signal matrix containing the number of electrodes, the number of events and the number of time points as the first data set.
3. The method according to claim 1, characterized in that The performing Hilbert transform on the first data set to extract phase information includes: Performing bandpass filtering and frequency division processing on the first data set according to a preset frequency band to construct a complex analytical signal; Extracting the phase angle information of each time window corresponding to the complex analytical signal, forming a three-dimensional phase information matrix with the electrode number as the first dimension, the event number as the second dimension, and the time window number as the third dimension as the phase information; The phase angle information corresponding to the phase information is obtained by the inverse tangent operation of the ratio of the imaginary part to the real part of the Hilbert transform.
4. The method according to claim 3, characterized in that The method of determining the source manifold and sink manifold of the topological gradient field by critical point analysis is used to encode the phase information into a topological structure including the critical point spatial distribution and the manifold connection relationship, including: Calculating the phase gradient field along the electrode spatial dimension for the three-dimensional phase information matrix; The local extreme value points of the three-dimensional phase information matrix are identified as critical points through second-order derivative extreme value detection; Determine the critical point type corresponding to the critical point according to the gradient direction field; the critical point type includes any one of a saddle point, a source point and a sink point; The set of streamlines connecting each critical point is traced based on the integral curve of the gradient vector field, and the spatial topological connection network of source manifolds and sink manifolds is constructed through the streamline convergence and divergence patterns.
5. The method according to claim 4, characterized in that The step of extracting key phase features satisfying energy concentration characteristics and duration characteristics from the topological gradient field comprises: Calculating an energy concentration feature of each critical point, wherein the energy concentration feature is composed of a Gaussian weighted product of a phase amplitude and a gradient norm; Calculating the energy duration characteristics of each critical point in the time dimension, wherein the duration characteristics are obtained by accumulating the normalized energy concentration sequence; The energy concentration threshold and time threshold were set, and the critical points that met both the energy concentration threshold and the time threshold were screened as the key phase features reflecting the functional connectivity and information flow patterns between brain regions.
6. The method according to claim 1, characterized in that The step of combining the enhanced phase field with the low-frequency amplitude component of the first data set decomposed by wavelet to construct a complex field, and simulating the spatiotemporal evolution of the complex field based on a nonlinear dynamics model includes: Performing discrete wavelet transform on the original EEG signal corresponding to the first data set to decompose the low-frequency approximate component and the high-frequency detail component; The enhanced phase field and low-frequency amplitude component of the generative adversarial network output are combined into a complex analytical signal, and a nonlinear partial differential equation model including diffusion terms and phase-amplitude coupling terms is established; The time-space evolution iterative calculation is performed by setting the diffusion coefficient, coupling strength parameters and boundary conditions until the energy distribution and phase gradient changes of the complex field tend to a stable state.
7. The method according to claim 1, characterized in that The introducing of topological loss and phase continuity constraint into the loss function of the generative adversarial network comprises: In the discriminator loss function of the generative adversarial network, the L2 norm difference term between the enhanced phase field and the original phase field topological gradient field is added as the topological loss term, and the regularization term of the second-order gradient norm of the phase field is introduced as the phase continuity constraint. By adjusting the topological loss weight coefficient and the regularization coefficient, the relationship between the generator adversarial loss and the topological structure consistency of the generative adversarial network is balanced.
8. The method according to claim 1, characterized in that: The method of separating the phase field and the amplitude field from the simulated complex field, performing wavelet reconstruction on the phase field and the original high-frequency detail component, and generating the final enhanced and amplified EEG signal includes: Performing inverse discrete wavelet transform on the simulated complex field to separate the imaginary phase field and the real amplitude field, and retaining the high-frequency detail components of the original signal obtained by wavelet decomposition; The enhanced phase field and high-frequency detail components are superimposed layer by layer according to the wavelet reconstruction algorithm, and a time-domain enhanced EEG signal containing both the optimized low-frequency phase features and the original high-frequency details is synthesized through inverse transformation.
9. An electroencephalogram signal amplification device based on topological gradient field coding, characterized in that: include: A data acquisition module, used to acquire a first data set corresponding to the scalp EEG of the subject through an EEG acquisition device, wherein the first data set includes the number of electrodes, the number of events, and the number of time points; A gradient calculation module, used for performing Hilbert transform on the first data set to extract phase information, wherein the phase information includes the number of electrodes, the frequency band index and the time window index, so as to calculate the topological gradient field, determine the source manifold and the sink manifold of the topological gradient field by critical point analysis, and encode the phase information into a topological structure including the critical point spatial distribution and the manifold connection relationship; A feature extraction module, used to extract key phase features satisfying energy concentration features and duration features from the topological gradient field, so as to screen key phase features whose energy concentration threshold is greater than a preset value and whose duration exceeds a time threshold; A feature input module, used to input key phase features into a pre-built generative adversarial network, wherein the generator of the generative adversarial network generates an enhanced phase field through adversarial training, and introduces topological loss and phase continuity constraints into the loss function of the generative adversarial network to optimize the topological consistency of the enhanced phase field generated by the generative adversarial network; A component combining module, used for combining the enhanced phase field with the low-frequency amplitude component of the first data set decomposed by wavelet to construct a complex field, and simulating the spatiotemporal evolution of the complex field based on a nonlinear dynamics model; The signal amplification module is used to separate the phase field and the amplitude field from the simulated complex field, reconstruct the phase field and the original high-frequency detail component by wavelet, and generate the final enhanced and amplified EEG signal.
10. A computer device, characterized in that: The method comprises a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the method according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Brain disease early-stage intelligent grading screening system based on multi-modal calculation
CN118248318A
Motor imagery electroencephalogram data generator based on generative adversarial network data enhancement
CN118708058A