Electroencephalogram signal amplification method, device and equipment based on topology gradient field coding

Through the combination of topological gradient field encoding and generative adversarial networks, the phase information of EEG signals is extracted and enhanced, and the problem of traditional methods ignore phase information is solved, and efficient amplification of EEG signals and improvement of signal quality is achieved.

CN120067658AActive Publication Date: 2025-05-30XIAOZHOU TECH CO LTD

Patent Information

Application Number
CN202510545493.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-05-30
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

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.

Method used

Through the topological gradient field encoding method, the phase information of the EEG signal is extracted, the topological gradient field is calculated, the critical points and manifold are identified, the phase information is encoded as a topological structure, and the enhanced phase field is generated using a generative adversarial network (GAN), combined with the low-frequency amplitude component of wavelet decomposition, a complex field is constructed, and the spatiotemporal evolution of the complex field is simulated based on a nonlinear dynamic model, and finally the enhanced amplified EEG signal is generated through wavelet reconstruction.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067658A_ABST
    Figure CN120067658A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of brain-computer interfaces, in particular to an electroencephalogram signal amplification method, device and equipment based on topological gradient field coding. The method comprises the following steps: acquiring a first data set corresponding to a scalp electroencephalogram of a testee through electroencephalogram acquisition equipment, and performing Hilbert transform to extract phase information so as to calculate a topological gradient field; key phase features meeting the energy concentration ratio feature and the duration feature are extracted from the topological gradient field, so that the key phase features with the energy concentration ratio threshold value larger than a preset value and the duration exceeding a time threshold value are screened out; inputting the key phase features to a pre-constructed generative adversarial network, and generating an enhanced phase field by a generator of the generative adversarial network through adversarial training; and combining the enhanced phase field with the low-frequency amplitude component, subjected to wavelet decomposition, of the first data set to construct a complex field, simulating spatio-temporal evolution of the complex field based on a nonlinear dynamic model, and generating a finally enhanced and amplified electroencephalogram signal. And efficient characterization of electroencephalogram phase information is realized.
Need to check novelty before this filing date? Find Prior Art

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 scalp electroencephalogram of a subject 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 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 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 a 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 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;

[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 non-linear 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 scalp electroencephalogram of a subject 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 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 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 out 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 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. Generative Adversarial Network (GAN) Enhancement: 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, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are presented 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, 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 the present 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 the present 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 the present application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted 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]" depending on the context.

[0036] In addition, in the description of the specification of the present 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 the present application means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present 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 the present 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, using the relevant API interface of the brain headband device, appropriate electrode systems are selected by passing in parameters, such as dry electrode arrays or wet electrode arrays. 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, guide the correct wearing and adjust the position and angle of the brain headband so that the electrodes fit the scalp. For wet electrodes, an appropriate amount of conductive gel is automatically distributed 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). Dynamic baseline drift detection is set, requiring the drift amplitude to be controlled within 50 μV / min, and real-time signal-to-noise ratio monitoring is implemented to ensure that the signal-to-noise ratio of all channels is greater than 10 dB. When an anomaly 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, and conducts 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 specifications, sampling frequency, gain settings, and filter parameters, and stores them 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 ratio statistics, data integrity verification, etc. 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, using independent component analysis method to separate and remove electrooculogram (EOG) artifacts, 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 of time 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 carried out. 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, segment averaging is performed on the data. 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 segment 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 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 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 a 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 at 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, performing a 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 through wavelet transform, aiming to extract phase information from the time-domain signal to form the phase matrix \(\varPsi(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 the angle \(\varPsi(t)=\tan^{-1}(\frac{f_H(t)}{f(t)})\) respectively. Therefore, through the Hilbert transform, the phase information \(\varPsi(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 \(\varPsi(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 \(\varPsi(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 modes.

[0056] Then, a topological gradient field framework is constructed. Regarding the phase matrix \(\varPsi(n,p,q)\) as a scalar field defined on the electrode space, its gradient field \(\varPsi(n,p,q)\) is calculated. where \(\nabla\) is the gradient operator, \(\varPsi(i,j,k)=( Ψ / x, Ψ / y, Ψ / z)|(i, j, k), that is, the phase gradient of the i-th electrode at the k-th time point in the j-th event. 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). 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. 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 integral equations are dx / dt = Ψ / x, dy / dt = Ψ / y, dz / dt = Ψ / z. The integral 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 manifolds 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 meet the energy concentration feature and duration feature from the topological gradient field to screen out key phase features with an energy concentration threshold greater than a preset value and a duration exceeding the 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 connections 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, define the energy concentration feature E_c(i,j,k)=|Ψ(i,j,k)|×exp(-|| Ψ(i,j,k)||^2 / σ^2), 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, and the more concentrated the energy. This is because the phase gradient norm || Ψ(i,j,k)|| is small, which means that the phase change near this point is relatively gentle, consistent with the characteristics of the phase extreme point, and the 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, the extraction of 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 connections 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)\times T_m(l,j)\). \(F_m(l,j)\) is the manifold feature of the \(l\)-th manifold in the \(j\)-th event, which reflects 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, that is, 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 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.

[0069] Specifically, by using the first algorithm, perform a 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 and aims to find a probability distribution \(q(\Psi)\) to approximate the true EEG phase distribution \(p(\Psi|Y)\) such that the Kullback-Leibler divergence \(D_{KL}(q(\Psi)||p(\Psi|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(\Psi)\) can better fit the true EEG phase distribution. To this end, introduce the variational free energy functional \(F(q,\theta)=E_q[\ln q(\Psi)-\ln p(\Psi,Y|\theta)] = D_{KL}(q(\Psi)||p(\Psi|Y,\theta))+L(q,\theta)\), where \(\theta\) is the hidden parameter and \(L(q,\theta)\) is called the expected lower bound, defined as \(L(q,\theta)=E_q[\ln p(\Psi,Y|\theta)] - E_q[\ln q(\Psi)]\). Since the KL divergence is non-negative, \(F(q,\theta)\geq L(q,\theta)\), and the equality holds if and only if \(q(\Psi)=p(\Psi|Y,\theta)\).

[0070] Therefore, the variational free energy F(q, θ) can be approximately minimized by maximizing the lower bound of the expectation L(q, θ), so that q(Ψ) approximates the true distribution p(Ψ|Y, θ). According to the idea of variational inference, assume that q(Ψ) is compatible with a parametric family of probability distributions Q, that is, q(Ψ) ∈ Q = {q(Ψ; ξ)|ξ ∈ Ξ}, where ξ is the variational parameter and Ξ is the parameter space. Thus, maximizing L(q, θ) is equivalent to minimizing the KL divergence under the given Q, that is: ξ* = argmin_ξ D_KL(q(Ψ; ξ)||p(Ψ|Y, θ)) = argmax_ξ L(q(Ψ; ξ), θ) = argmax_ξ E_q[lnp(Ψ, Y|θ)] - E_q[lnq(Ψ; ξ)]; By iteratively optimizing to solve ξ*, a variational posterior distribution q(Ψ; ξ*) that approximates the true distribution p(Ψ|Y, θ) can be obtained. Assume that q(Ψ; ξ) is a mean-field Gaussian distribution, that is: q(Ψ; ξ) = N(Ψ; Ψ_μ, Σ_Ψ), where ξ = {Ψ_μ, Σ_Ψ} is the mean-field and covariance field, then the lower bound of the expectation L(q, θ) can be further expressed as: L(q, θ) = E_q[lnp(Ψ, Y|θ)] - E_q[lnq(Ψ; ξ)] = E_q[lnp(Y|Ψ, θ) + lnp(Ψ|θ) - lnq(Ψ; ξ)] = E_q[lnp(Y|Ψ, θ)] + E_q[lnp(Ψ|θ)] + H(q); where H(q) = -E_q[lnq(Ψ; ξ)] is the entropy of q(Ψ; ξ), which only depends on the mean-field Ψ_μ and covariance field Σ_Ψ. Under the condition of given data Y and hidden parameter θ, maximizing L(q, θ) is equivalent to optimizing the mean-field Ψ_μ and covariance field Σ_Ψ, that is: {Ψ_μ*, Σ_Ψ*} = argmax_Ψ_μ,Σ_Ψ L(q, θ) = argmax_Ψ_μ,Σ_Ψ (E_q[lnp(Y|Ψ, θ)] + E_q[lnp(Ψ|θ)] + H(q)); The above optimization can be solved by the variational Bayesian method. First, according to the probability model and observed data, an analytical expression of the joint log-likelihood lnp(Ψ, Y|θ) and its logarithmic prior distribution lnp(Ψ|θ) is constructed, and then partial derivatives are taken with respect to the mean-field Ψ_μ and covariance field Σ_Ψ respectively and set to 0, a series of implicit equations about Ψ_μ and Σ_Ψ can be obtained. By solving this system of equations through numerical iteration, the optimal mean-field Ψ_μ and covariance field Σ_Ψ can be obtained, so as to obtain the optimal variational distribution q(Ψ; ξ*) that approximates the true distribution p(Ψ|Y, θ).

[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 output of the enhanced key phase features.

[0077] Specifically, first, the target distribution \(p(\varPsi|Y,\theta)\) near the mean field \(\varPsi_{\mu}\) is expanded by the second-order Taylor expansion using the Laplace approximation method to obtain the approximate Gaussian distribution \(q_{L}(\varPsi;\xi) = N(\varPsi;\varPsi_{\mu}^*,\varSigma_{\varPsi}^*)\), where \(\varPsi_{\mu}\) and \(\varSigma_{\varPsi}\) are the optimal mean field and covariance field obtained above. Then, samples are drawn from this approximate Gaussian distribution \(q_{L}(\varPsi;\xi^*)\) to generate \(M\) enhanced key phase feature samples \(\{\varPsi^{(1)},...,\varPsi^{(M)}\}\).

[0078] The sample generation process is as follows: First, the covariance matrix \(\varSigma_{\varPsi}\) is decomposed into \(\varSigma_{\varPsi}=LL^{T}\) by Cholesky decomposition, where \(L\) is a lower triangular matrix. Then, \(M\) independent and identically distributed standard normal random vectors \(\{\varepsilon^{(1)},...,\varepsilon^{(M)}\}\sim N(0,I)\) are generated. Thus, \(\varPsi^{(m)}=\varPsi_{\mu}^* + L\varepsilon^{(m)}\) also follows the \(N(\varPsi_{\mu}^*,\varSigma_{\varPsi}^*)\) 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 changes in phase features in the local area on topological scene encoding and find an optimal topological encoding method that can meet the feature requirements of EEG signals. Specifically, the algorithm first extracts all 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. Too large a σ will cause large changes in the phase features, while too small a σ may not introduce sufficient perturbations. A common 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 convenient 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, reflecting 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-skeletons (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 indicates 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-skeletons (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 indicates 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 diagram 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 size 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, which 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 in 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 optimal topological coding method that satisfies the second condition. Assume the second condition is: the optimal 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 dimension N×P×Q. 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 the 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 be consistent with 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 for illustration. 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$ in the above steps can be used. 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. In order to convert this abstract topological coding into EEG phase information with physiological significance, a decoding operator $D: \Psi \to \widehat{\Phi}$ is needed 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 a potential field and use the Laplace equation $\nabla^2\Phi =$ $\gamma\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, in order 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 focus is on low-frequency EEG activities, 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 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, making it 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 performed 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] Among them, 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 modes can be realized, such as second-order phase transition, first-order phase transition, three-arm phase diagram, 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, prevent it from generating high-frequency oscillations or sharp jumps, so that the simulation results are more credible and stable.

[0102] After giving the initial field \(\Psi(n,m,t = 0)=Y(n,m,t)\) and the free energy functional \(F(\Psi)\), 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 adopt the classical finite difference method, 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 the 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, thus discretizing the continuous dynamic equation 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}\) \(\frac{\delta F}{\delta}\) \(\Psi\) term in the above formula, 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 an automatic differentiation tool. 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 consistency: C_Phase(n, m, t) = 〈exp(iIm(Ψ))〉, which quantifies the synchronization degree of phases in different brain regions. 3) Amplitude consistency: C_Amp(n, m, t) = 〈Re(Ψ)〉 / max{Re(Ψ)}, which quantifies the concentration degree of the amplitude distribution. 4) Phase change rate: C_Evo(n, m, t) = | Im(Ψ) / t|, which reflects the speed of change of the phase field. 5) Phase change intensity: C_Tran(n, m, t) = | ^2Im(Ψ) / t^2|, which quantifies the sudden degree of the phase change.

[0105] The value ranges and dynamic evolution laws of these measures can reflect the interaction mode between the phase field and the amplitude field in space-time. For example, when C_PA is large, it indicates that there is 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 in the whole region; while too large C_Evo and C_Tran may indicate an impending phase change, 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 can be judged when the complex field reaches a stable equilibrium and when a phase change will occur, thereby capturing the key coupling moments and their internal 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 electroencephalogram signal.

[0107] Specifically, in the above steps, the coupled-field dynamics simulation based on the Ginzburg-Landau model was performed on the synthesized third data set Y(n, m, t) in the above steps, and the evolution trajectory of the complex field Ψ(n, m, t) over time was obtained, 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 a time-domain enhanced EEG signal that simultaneously includes optimized low-frequency phase features and original high-frequency details through an inverse transform.

[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 the phase information optimized by topological coding, and the phase distribution is smoother and more regular, and the energy is more concentrated in key components; (3) Through dynamic 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 of low frequency and high frequency, which is 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] Suppose that through the dynamic simulation of 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 into 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, a frequency band index, and a 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 non - linear 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 - mentioned electroencephalogram signal amplification device 200 can implement the electroencephalogram signal amplification method based on topological gradient field encoding in the above - mentioned method embodiment. The optional items in the above - mentioned method embodiment are also applicable to this embodiment, which will not be elaborated here. The remaining content of the embodiment of the present application can refer to the content of the above - mentioned method embodiment and will not be repeated in this embodiment.

[0123] Figure 3 It is a schematic structural diagram of a computer device provided in 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 here), 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 - mentioned method embodiments are implemented.

[0124] The computer device 3 can 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 this is only an example of the computer device 3, and does not constitute a limitation on the computer device 3. It may include more or fewer components than 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. 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 further 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 by the present 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 contains 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 an order different 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 above 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 the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The 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 the present application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs and other various media that can store program codes.

[0131] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present application. It should be understood that the above description is only specific embodiments of the present application and is not used to limit the protection scope of the present 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 the present application shall be included in the protection scope of the present 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

  • Electroencephalogram function connection construction method based on phase locking edge

    CN117860269A

  • 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

  • Apparatus and method for "transplanting" brain states via brain entrainment

    US20230404466A1

Cited By

  • Ripple signal detection and identification system based on IED events and time-frequency characteristics

    CN120938466A

  • EEG self-supervised representation learning method based on potential diffusion model

    CN121030338A

  • Brain-computer interface signal enhancement method and system based on sound wave coupling

    CN121092853A

  • Product quality full life cycle management method based on big data

    CN121169215A

  • Dynamic response optimization system based on electric energy metering chip

    CN121481175A