Closed-loop non-invasive neuromodulation system and method based on real-time EEG

By constructing a closed-loop system with a personalized energy landscape and a dual-feedback mechanism, the problems of unstable brain state recognition and insufficient parameter prediction in existing systems are solved, and personalized neuromodulation effects are achieved.

CN123058752APending Publication Date: 2026-11-10THE FIRST AFFILIATED HOSPITAL OF ANHUI MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611177985.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing closed-loop non-invasive neuromodulation systems struggle to stably identify brain states under real-time causal conditions, lack individualized stimulation targets and parameter prediction models, and rely on a single health benchmark for abnormal identification, leading to misjudgments and failing to adapt to the heterogeneity of brain dynamics.

Method used

A closed-loop system based on real-time EEG is used to construct an individualized energy landscape through a pairwise maximum entropy model. Combined with phenotypic stratification and a dual-path feedback mechanism, the landscape parameter increment of the stimulus scheme is predicted. The stimulus parameters are then optimized through group sharing and individual adaptation operators to form a self-correcting loop.

Benefits of technology

It achieves stable brain state recognition under real-time causal conditions, adapts to individual brain dynamic heterogeneity, and improves the accuracy of stimulation targets and parameters as well as the system's self-refinement ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123058752A_ABST
    Figure CN123058752A_ABST
Patent Text Reader

Abstract

This invention relates to the field of medical neuromodulation technology, specifically to a closed-loop non-invasive neuromodulation system and method based on real-time EEG. The system includes an EEG modeling module, a phenotypic stratification module, a predictive modulation module, and a dual-path feedback module. The predictive modulation module estimates the increment of landscape parameters caused by candidate stimuli using a stimulus-landscape evolution dynamic prediction model, and superimposes this with pre-stimulation parameters for optimal selection, upgrading the decision-making process from a static landscape to a dynamic landscape that characterizes stimulus perturbations. The phenotypic stratification module generates target brain dynamics indicators based on abnormal phenotypes and abnormal-relief trajectories, taking into account heterogeneity within the same diagnosis. The dual-path feedback separately fills the reference database and corrects the predictive model, forming a closed self-correcting loop. This enables the inversion of stimulus commands from the target brain state and continuous refinement with treatment. EEG modeling provides unified landscape parameter coordinates, combined with causal thresholds and slow-varying baseline trends, improving the robustness of real-time recognition against awakening drift.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical neuromodulation technology, specifically to a closed-loop non-invasive neuromodulation system and method based on real-time electroencephalography. Background Technology

[0002] Non-invasive neuromodulation techniques, using physical methods such as transcranial magnetic stimulation (TMS), transcranial electrical stimulation (tES), and transcranial time-domain interference stimulation (tTIS), can stimulate specific brain regions to regulate neural activity without craniotomy. These techniques are widely used in the treatment of neuropsychiatric disorders such as depression, autism spectrum disorder, Alzheimer's disease, and schizophrenia. Such products typically consist of a stimulation generation and execution device, a target localization and navigation system, and an optional electroencephalogram (EEG) acquisition and analysis unit. To improve the temporal precision of therapeutic effects, the industry has further developed closed-loop neuromodulation systems that use real-time EEG as a trigger signal, aiming to apply stimulation under appropriate brain conditions.

[0003] Existing brain state-based closed-loop non-invasive neuromodulation schemes typically follow this process: First, multi-channel EEG is collected offline in the subject's resting state. The activity time series of each functional network is binarized using the time average of the entire data segment as a threshold to obtain a whole-brain network activity vector. Then, a pairwise maximum entropy model is fitted to construct the subject's individualized energy landscape, and attractor states are defined by the local minima of the energy function, resulting in a static map reflecting the distribution of the subject's brain states. In actual modulation, the system monitors the attractor states into which the subject's EEG falls in real time. When the subject enters a pre-set target state or meets a preset trigger condition, a stimulus is applied to a fixed target point with fixed parameters. Abnormal states are typically identified using a single healthy population reference value as a benchmark; brain dynamics indicators deviating from this reference are judged as abnormal.

[0004] Existing closed-loop non-invasive neuromodulation systems rely on resting-state, offline constructed energy landscapes for decision-making. After stimulation, the whole-brain dynamics are significantly disturbed, and the landscape topography changes accordingly. However, the system still makes the next decision based on the static map before stimulation, creating a contradiction where stimulation renders the map invalid, yet decisions are still made based on the discarded map. Landscape construction depends on the time average threshold of the entire data segment. This statistic cannot be calculated online under real-time causal conditions, and the drift in alertness causes a systematic shift in the mean across the entire segment, leading to inaccurate state recognition. Anomaly recognition uses a single health benchmark as a reference, ignoring the high heterogeneity of brain dynamic abnormalities under the same diagnosis, misjudging normal individual differences as pathological or conflating abnormalities of different mechanisms. Existing systems can only answer when to stimulate, lacking a process model for retrieving stimulation targets and parameters from the target brain state. They cannot predict how different candidate stimulation schemes will change the landscape, and can only be passively triggered under fixed targets and parameters. These defects collectively lead to a disconnect between the decision-making basis and the actual state of the regulated system, instability of state recognition under real-time causal conditions, and a lack of adaptation of target setting to individual brain dynamic abnormal phenotypes. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a closed-loop non-invasive neuromodulation system and method based on real-time EEG, which solves the problems of existing systems, such as the inability of energy landscape models to characterize stimulus perturbations, insufficient robustness of real-time causal modeling to wakefulness drift, neglect of neurodynamic phenotypic heterogeneity in anomaly identification, and lack of a process model for inverting stimulus commands from the target brain state and self-correcting.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a closed-loop non-invasive neuromodulation system based on real-time electroencephalography (EEG), the system comprising:

[0008] The EEG modeling module is used to extract the functional network state based on multi-channel EEG signals, construct an individualized energy landscape based on the pairwise maximum entropy model, and generate landscape parameters and brain dynamic index vectors for the individualized energy landscape.

[0009] The phenotypic hierarchical module is used to maintain an energy landscape reference database that stores abnormal trajectories according to the classification of abnormal phenotypes of brain dynamics. It determines the abnormal phenotype and abnormality level based on the current brain dynamics index vector, and determines the target brain dynamics index vector based on the corresponding abnormal-relief trajectory.

[0010] The prediction and regulation module is used to predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increase and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, select the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate regulation instructions, and output the regulation instructions to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target.

[0011] The dual-feedback module is used to obtain measured landscape parameters and measured brain dynamics index vectors after stimulation based on the EEG signals after stimulation. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.

[0012] Furthermore, the EEG modeling module acquires multi-channel EEG signals according to a preset channel configuration and sampling rate, performs filtering processing according to preset bandpass filtering parameters, and after stimulus artifact removal and low confidence data labeling, extracts the activity time series of each functional network according to a specified functional network partitioning scheme, and binarizes the activity time series into a network state vector sequence in which each component takes a value of +1 or -1.

[0013] The energy value of the individualized energy landscape is determined by adding the sum of the products of the local field of each functional network and the corresponding network state component, and the sum of the products of the coupling coefficient between functional networks and the corresponding two network state components, and taking the negative value. The local field and the coupling coefficient between functional networks constitute the landscape parameters. The brain dynamics index vector includes attractor depth and energy barrier height.

[0014] Furthermore, the EEG modeling module uses the robust median of the corresponding functional network activity envelope within a sliding time window of a preset length prior to the current moment as the binarization threshold, and performs detrending processing on the activity time series through a slowly varying baseline with a preset time constant; data marked as low confidence are removed during the pairwise maximum entropy model fitting and EEG index vector calculation.

[0015] Furthermore, the stimulus-landscape evolution dynamic prediction model takes the pre-stimulus landscape parameters and the fixed-length encoding vector of the candidate stimulus schemes as input, and uses the sum of the output of the group-shared operator and the output of the individual-fitting operator as the increment of the landscape parameters. The group-shared operator uses a graph neural network to characterize the common stimulus response patterns among different subjects, and the individual-fitting operator is used to characterize the stimulus sensitivity of the current subject. In the fixed-length encoding vector, one-hot encoding is used for stimulus type and discrete stimulus target, and normalized real number encoding is used for stimulus intensity, stimulus frequency and stimulus timing. The pulse train mode uses encoding including train length, intra-train frequency, train interval and duty cycle.

[0016] Furthermore, the stimulus-landscape evolution dynamic prediction model is established through a transfer learning approach that combines pre-training with individual longitudinal data fine-tuning. The pre-training with the group data is used to train the group-shared operator, and the fine-tuning with the individual longitudinal data is used to train the individual-adaptive operator.

[0017] The stimulus-landscape evolution dynamic prediction model is trained based on training samples. Each training sample includes pre-stimulus landscape parameters, stimulus scheme encoding vector, and post-stimulus landscape parameters, with intermediate-state landscape parameters as auxiliary supervision data.

[0018] Furthermore, the individual longitudinal data fine-tuning only uses longitudinal training samples from the same subject, and the pre-stimulus landscape parameters are separated into individual intrinsic baseline and state fluctuation components;

[0019] The individual intrinsic baseline is determined based on the median of the subject's resting-state landscape parameters over time and is removed from the pre-stimulation landscape parameters before they are input into the group-shared operator. The individual adaptation operator adopts a low-rank parameterized structure with a rank lower than the dimension of the landscape parameters. During the fine-tuning of the individual longitudinal data, the parameters of the group-shared operator are frozen and the parameters of the low-rank parameterized structure are updated.

[0020] Furthermore, the phenotypic hierarchical module standardizes the current neurodynamic index vector relative to the reference distribution of each abnormal phenotype to obtain the standardized score of each neurodynamic index. It determines the abnormal phenotype based on the index dimension used to characterize each abnormal phenotype and the direction of its standardized score, and determines the abnormality level based on the absolute value of the corresponding standardized score. The phenotypic hierarchical module determines the target position on the corresponding abnormal-relief trajectory based on the abnormal phenotype and abnormality level, and obtains the target neurodynamic index vector through interpolation between adjacent trajectory nodes.

[0021] Furthermore, the candidate stimulation scheme includes stimulation target, stimulation type, stimulation intensity, stimulation frequency, pulse train mode, and stimulation timing;

[0022] The prediction and regulation module uses the phenotypic weighted distance between the predicted brain dynamics index vector and the target brain dynamics index vector as a measure of deviation, and assigns a higher weight to the index dimension used to determine the abnormal phenotype of the subject than to the other index dimensions.

[0023] Furthermore, the stimulus-landscape evolution dynamic prediction model includes an integrated structure composed of multiple model instances; the prediction regulation module selects candidate stimulus schemes that are located within the safe stimulus parameter set and whose confidence level for predicting brain dynamics index vectors is not lower than a preset confidence threshold. The safe stimulus parameter set sets preset upper and lower limits for stimulus intensity, single stimulus dose, cumulative stimulus dose, stimulus frequency, and pulse train duty cycle. The confidence level is determined based on the variance between the outputs of multiple model instances in the integrated structure. When the number of training samples used to train the individual adaptation operator for the current subject is lower than a preset sample threshold, the prediction regulation module only uses the group-shared operator to perform incremental prediction of landscape parameters and simultaneously reduces the upper limit of stimulus intensity.

[0024] When the phenotypic weighted distance between the measured post-stimulation brain dynamics index vector and the target brain dynamics index vector increases by more than a preset offset threshold compared to the pre-stimulation brain dynamics index vector and the target brain dynamics index vector, the dual-path feedback module reduces the weight of the corresponding abnormal phenotype and stimulation target combination in the selection of candidate stimulation schemes, and marks the corresponding pre- and post-stimulation state data and stimulation schemes as training samples with negative response labels, which are used to update the stimulation-landscape evolution dynamic prediction model.

[0025] Secondly, the present invention also provides a closed-loop non-invasive neuromodulation method based on real-time electroencephalography, comprising the following steps:

[0026] S1: Based on the state of the functional network extracted from the multi-channel EEG signal, an individualized energy landscape is constructed based on the pairwise maximum entropy model, and landscape parameters and brain dynamic index vectors of the individualized energy landscape are generated.

[0027] S2: Maintain an energy landscape reference database that stores abnormal phenotypes and abnormal-relief trajectories according to the classification of abnormal phenotypes in neurodynamics. Determine the abnormal phenotype and abnormality level based on the current neurodynamic index vector, and determine the target neurodynamic index vector based on the corresponding abnormal-relief trajectory.

[0028] S3: Predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increment and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, screen the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate the control command, and output the control command to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target.

[0029] S4: Based on the EEG signals after stimulation, the measured landscape parameters and measured brain dynamics index vectors are obtained. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.

[0030] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0031] This invention uses a predictive regulation module to predict the increase in landscape parameters caused by each candidate stimulus scheme using a stimulus-landscape evolution dynamic prediction model. The sum of this increase and the pre-stimulation landscape parameters is then used as the post-stimulation landscape parameters for selection, upgrading the decision-making model from a static landscape to a dynamic landscape that reflects stimulus disturbances. This effectively alleviates the problem of making decisions based on obsolete maps even when the stimulus has rendered them ineffective. The phenotypic stratification module uses abnormal brain dynamics phenotypes and their abnormal-relief trajectories to replace a single healthy baseline to generate target brain dynamics index vectors, ensuring that target generation takes into account the brain dynamics heterogeneity within the same diagnosis. The dual-feedback module uses a first feedback path to backfill the reference database and a second feedback path to correct the prediction model, refining the reference data and the prediction model synchronously, forming a closed self-correction loop. This facilitates the derivation from the target brain state to the stimulus command and allows the system to continuously refine itself with treatment.

[0032] By using an EEG modeling module as a unified source of landscape parameters within the system, reference data, training data, and real-time data are placed in the same feature coordinate system, improving the comparability of landscapes at different stages. It employs a sliding window robust median threshold combined with a slowly varying baseline for detrending, ensuring that the threshold depends only on past data to satisfy real-time causality, and absorbs alertness drift into the baseline while retaining rapid state fluctuations, thus more stably identifying brain states. The predictive model predicts landscape parameter increments in the form of residuals, and decouples stimulus effects from individual differences by removing individual-inherent baselines and low-rank individual-fit operators, allowing the individual-fit part to learn stimulus-specific responses rather than baseline differences, which helps to accelerate convergence after a small number of individual events. The safe stimulus parameter set, confidence threshold, degradation mode, and circuit breaker mechanism jointly enhance the safety margin and robustness of the modulation process. Attached Figure Description

[0033] Figure 1 This is the main flowchart of the closed-loop neuromodulation based on real-time EEG of the present invention;

[0034] Figure 2 This is a diagram showing the collaborative relationship between the modules of the closed-loop neural modulation system of the present invention.

[0035] Figure 3This is a comparison diagram of the energy landscape evolution effect before and after stimulation according to the present invention;

[0036] Figure 4 A flowchart is provided to illustrate the method steps of this invention. Detailed Implementation

[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] In this embodiment, the landscape parameters characterizing the individualized energy landscape are denoted as follows: Local fields of each functional network Coupling coefficient between functional networks Composition; brain dynamics index vector denoted as The target brain dynamics index vector is denoted as .

[0039] Example 1

[0040] Please see Figure 1-3 This invention provides a closed-loop non-invasive neuromodulation system based on real-time electroencephalography (EEG), the system comprising:

[0041] The EEG modeling module is used to extract the functional network state based on multi-channel EEG signals, construct an individualized energy landscape based on the pairwise maximum entropy model, and generate landscape parameters and brain dynamic index vectors for the individualized energy landscape.

[0042] In this embodiment, all energy landscapes within the system, including the maps in the reference database, the maps used to train the dynamic prediction model, and the real-time maps of the current subject, are generated by the same EEG modeling module with the same processing flow, so that the reference data, model training data, and the real-time data of the current subject are in the same feature coordinate system, ensuring the comparability of landscapes at each stage.

[0043] The EEG modeling module acquires multi-channel EEG signals according to the preset channel configuration and sampling rate. In this embodiment, 128 channels are used and the acquisition is carried out at a fixed sampling rate for about 10 minutes. The number of channels must meet the spatial resolution requirements of the selected functional network partitioning scheme, that is, the number of channels is not less than the minimum number of spatial samples required to distinguish each functional network. The acquisition time must meet the sample size requirements of the pairwise maximum entropy model for estimating the first and second moments, that is, the number of network state vector samples acquired within this time is sufficient to make the estimation variance of the local field and coupling coefficient converge to an acceptable range.

[0044] A 128-channel, approximately 10-minute sampling period is a suitable approach that satisfies both the commonly used functional network partitioning scheme and the requirement of a fixed sampling rate. Using a fixed channel configuration and sampling rate ensures consistency in the spectra across different times and subjects at the sampling level. The acquired signals are filtered according to preset bandpass filtering parameters to remove power frequency interference and components outside the band of interest. Subsequently, artifact removal processing is performed to remove artifacts introduced by transcranial magnetic stimulation or transcranial electrical stimulation. Low-confidence data labels are applied to the stimulation period data to differentiate potentially distorted data from the moment of stimulation in subsequent steps, preventing model contamination. After artifact removal, the activity time series of each functional network is extracted according to the specified functional network partitioning scheme, and the activity time series is binarized into a network state vector sequence where each component is incremented or decremented by one. The specific calculation formula is as follows:

[0045] (1)

[0046] in, for The network state vector at time t; For the first Each functional network in The binary state at time t is incremented by one to indicate that the function network is in high activation and decremented by one to indicate that it is in low activation. This represents the number of functional networks.

[0047] The EEG modeling module uses the robust median of the corresponding functional network activity envelope within a sliding time window of preset length prior to the current moment as the binarization threshold. The specific calculation formula is as follows:

[0048] (2)

[0049] in, For the first Each functional network in The activity envelope at any given moment; For the first Each functional network in The binarization threshold at time step; This represents the median operation, which operates on the current time. The previous length was All values ​​of the network activity envelope for this function within the sliding time window; The length of the sliding time window is set to 2 to 5 seconds; This indicates a sign operation, where the value is incremented by one when the independent variable is greater than or equal to zero, and decremented by one when it is less than zero. For the binarized first... Each functional network in The binary state at time point. The length of the sliding time window. The basis for choosing 2 to 5 seconds is that the number of samples within the window within this range is sufficient to bring the variance of the median estimate to an acceptable range, while the window length is shorter than the second-level state change timescale of interest, so as to obtain a stable threshold and follow the state change. If the value is too short, the variance of the median estimate will be too large; if the value is too long, the threshold will become less responsive to changes in state. Therefore, a range of 2 to 5 seconds is used as the upper and lower bounds. This threshold only depends on data before the current moment and does not require future data, thus satisfying causality. It can operate stably under online conditions, and the median is not sensitive to transient artifacts, which can suppress the impact of individual outlier samples on the threshold.

[0050] The EEG modeling module performs detrending processing on the activity time series using a slowly varying baseline with a preset time constant. The specific calculation formula is as follows:

[0051] (3)

[0052] in, For the first Each functional network in The slowly varying baseline at any given time; The time step for baseline updates is the time interval between adjacent sampling points, and its value is equal to the reciprocal of the sampling rate. This is the exponential smoothing coefficient, with a value between zero and one. For the detrended first Each functional network in The signal at time, the smoothing coefficient With slow time constant The conversion relationship is as follows equal Divide by Therefore, the required time constant can be used to determine... The value of the slow time constant in this embodiment Take approximately 30 to 120 seconds, slow time constant The basis for using approximately 30 to 120 seconds is that the timescale of consciousness drift is on the order of tens of seconds to minutes. It needs to be significantly longer than the second-level state fluctuation timescale of interest, and significantly shorter than the total duration of a single treatment, so that the slow-varying baseline only tracks the awakening drift and does not absorb the effective state fluctuations; If the value is too small, it will mistakenly absorb the effective state fluctuations; if the value is too large, it will be unable to track the drift in time. Therefore, 30 to 120 seconds is used as the upper and lower bounds. The slow drifts on the order of tens of seconds to minutes caused by changes in alertness are absorbed into the slow-changing baseline and subtracted from the signal. The remaining signal retains the rapid state fluctuations on the order of seconds and is no longer affected by the drift, so that the binarization will not be systematically shifted as the subject gradually becomes drowsy or awake. The activity envelope used for binarization in equation (2) The signal after detrending using equation (3) Data marked as low confidence are removed during pairwise maximum entropy model fitting and brain dynamics index vector calculation, ensuring that landscape parameters are determined only by reliable data and improving landscape accuracy.

[0053] The EEG modeling module constructs an individualized energy landscape based on a pairwise maximum entropy model. When only the average activation rate and pairwise correlations of each functional network are constrained, the distribution with the maximum information entropy is the Boltzmann distribution, and the specific calculation formula is as follows:

[0054] (4)

[0055] in, This is the network state vector; Network state vector The corresponding energy value is given by the following formula (5); The partition function, whose purpose is to normalize the probabilities so that the sum of the probabilities of all network states equals one, is defined as follows: Summing and traversing all 2s The exponential number of possible network state vectors , The number of functional networks. The energy value of the individualized energy landscape is determined by the sum of the products of the local field of each functional network and the corresponding network state component, plus the sum of the products of the coupling coefficient between functional networks and the corresponding two network state components, and then taking the negative value. The specific calculation formula is as follows:

[0056] (5)

[0057] in, For the first The binary state of each functional network takes a value of +1 or -1; For the first Local field of a functional network; For the first The functional network and the first The symmetric coupling coefficients between the functional networks satisfy the following conditions: equal In the first summation term Take 1 to The second summation term satisfies all conditions. Not equal to The summation of network pairs, with half the coefficient used to cancel out repeated counting of the same network pair, local field Coupling coefficient between functional networks Landscape parameters The entire landscape is entirely determined by parameters equal( This determines that landscape evolution can be equivalent to the movement of a point in the parameter space, when the number of functional networks is... At that time, the specific formula for calculating the dimensions of landscape parameters is as follows:

[0058] (6)

[0059] in, Landscape parameters The dimension; The number of local field components is equal to the number of functional networks; for The number of pairwise combinations of functional networks, i.e., the number of coupling coefficient components. The fitting process is the adjustment... To ensure that the model's predicted first and second moments match the actual measurements, methods such as pseudo-likelihood, minimum probability flow, or gradient ascent can be used.

[0060] The brain dynamics index vector includes attractor depth and energy barrier height. An attractor is a network state where the energy of any configuration resulting from a single spin flip is not lower than its own energy; that is, a network state with local energy minima. The attraction domain is the set of configurations that descend most rapidly by a single spin flip and eventually fall into a certain attractor. The specific calculation formulas for energy barrier height and attractor depth are as follows:

[0061] (7)

[0062] (8)

[0063] in, , All are attractors; For attractors to attractor Energy barrier height; For attractors Energy value; For attractors and The saddle point energy between them is defined as the attractor. and The minimum of the highest energy of all paths connecting them; For attractors The attractor depth is equal to the depth of all elements other than attractor Pick minus the minimum value ; This indicates the minimum value operation. Attractor depth and energy barrier height directly characterize the stability of a state and the ease of transitions between states, providing a physical basis for subsequent phenotypic stratification and target generation. In addition to attractor depth and energy barrier height, the brain dynamics index vector also includes attractor dwell time, occurrence frequency, direct transition frequency, and indirect transition frequency. All of these quantities participate as components of the brain dynamics index vector in subsequent phenotypic stratification, target generation, and bias measurement. Dwell time is the average continuous duration from entering the attractor domain to leaving; occurrence frequency is the percentage of time spent in that attractor domain; and direct transition frequency is the percentage of time spent in that domain. arrive Furthermore, the proportion of transitions that do not pass through a third attraction domain, and the indirect transition frequency, are determined by... arrive Furthermore, the transition rate is at least one intermediate attraction domain, i.e., the pivot state, during the transition.

[0064] The phenotypic hierarchical module is used to maintain an energy landscape reference database that stores abnormal trajectories according to the classification of abnormal phenotypes of brain dynamics. It determines the abnormal phenotype and abnormality level based on the current brain dynamics index vector, and determines the target brain dynamics index vector based on the corresponding abnormal-relief trajectory.

[0065] The phenotypic stratification module maintains an energy landscape reference database categorized by abnormal neurodynamic phenotypes and stored as anomaly-relief trajectories. The maps in this database are also generated by the EEG modeling module to ensure comparability. The phenotypic stratification module standardizes the current neurodynamic index vector relative to the reference distributions of each abnormal phenotype to obtain standardized scores for each neurodynamic index. ,in The standardized score is equal to the observed value of the indicator minus the mean of the reference distribution of the phenotype, and then divided by the standard deviation of the reference distribution of the phenotype, so that the standardized score can express the degree and direction of the subject's deviation from the typical state of the phenotype.

[0066] The phenotypic hierarchical module determines anomalous phenotypes based on the indicator dimensions used to characterize each anomalous phenotype and the direction of their standardized scores, and determines the anomalous level based on the absolute value of the corresponding standardized scores. Taking the decreasing indirect transition frequency phenotype as an example, this phenotype is characterized by the indirect transition frequency dimension, and the determination criterion is that the standardized score of this dimension is less than or equal to negative one, i.e., the direction is decreasing. The anomalous level is divided according to the absolute value of the standardized scores, for example... Satisfy negative two less and A value less than or equal to -1 indicates a mild case. Satisfying -3 is less than and A value less than or equal to negative two is considered moderate. A score of -3 or less is considered severe, providing clear and quantifiable criteria for both phenotypic and severity assessments, facilitating reproducibility and review. The phenotypic stratification module determines the target location on the corresponding abnormal-remission trajectory based on the abnormal phenotype and severity level. It then obtains the target neurodynamic index vector through interpolation between adjacent trajectory nodes, resulting in a continuous target neurodynamic index vector that matches the subject's current severity. This avoids jumping directly to a fixed node, which could lead to the target being too close or too far. The resulting target neurodynamic index vector represents the optimal state towards which the subject should move to bring the abnormal indicators towards normal. The target state is derived from the subject's actual remission process, taking into account intra-pathological heterogeneity.

[0067] The prediction and regulation module is used to predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increase and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, select the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate regulation instructions, and output the regulation instructions to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target.

[0068] The prediction and regulation module uses a stimulus-landscape evolution dynamic prediction model to predict the increase in landscape parameters caused by each candidate stimulus scheme. Since the entire landscape is entirely determined by parameters... The decision states that landscape evolution is equivalent to In the movement within the parameter space, the model does not directly predict the final state landscape, but rather predicts the increment of landscape parameters caused by the stimulus. The sum of the pre-stimulus landscape parameters and the increment is then used to predict the post-stimulus landscape parameters. The stimulus-landscape evolution dynamic prediction model takes the pre-stimulus landscape parameters and the fixed-length encoded vectors of candidate stimulus schemes as input, and uses the sum of the outputs of the group-shared operator and the individual-fitting operator as the landscape parameter increment to predict the post-stimulus landscape parameters. The specific calculation formula is as follows:

[0069] (9)

[0070] in, To stimulate foreground landscape parameters; To predict landscape parameters after stimulation; A fixed-length encoding vector for candidate stimulus schemes; It is a group-shared operator whose input is the state fluctuation component. ; The state fluctuation component is equal to the foreground landscape parameter of the stimulus. Subtract individual baseline ; For the individual's inherent baseline; For individual adaptation operators, the input is the pre-stimulus landscape parameters. With encoding vector ; and The sum is the increment of the landscape parameter. The increment is predicted in the form of residuals, so that the model output... That is, the amount of disturbance to the landscape topography caused by the stimulus itself corresponds one-to-one with the requirement of the decision model to reflect the stimulus disturbance, and in the absence of a stimulus... Approaching zero Approximately equal to It is naturally established. The group sharing operator uses a graph neural network to represent the stimulus response patterns shared by different subjects. The message passing mechanism of the graph neural network fits the graph structure with functional networks as nodes and coupling coefficients as edges. It can express how a stimulus spreads along the network connection and affects the coupling and local field of other networks. The individual adaptation operator is used to represent the stimulus sensitivity of the current subject and carries the response components that are unique to the subject but not shared by the group. It splits the prediction into the sum of the group sharing and individual adaptation parts. It can both use group data to improve generalization and retain individual specificity. The input of the group sharing operator in Equation (9) uses state fluctuation components, so that the group sharing operator only sees the relative quantity and prevents the differences between individuals from entering the prediction through the group channel from the source.

[0071] Candidate stimulus schemes include stimulus targets, stimulus type, stimulus intensity, stimulus frequency, pulse train pattern, and stimulus timing. In the fixed-length encoding vector, one-hot encoding is used for stimulus type and discrete stimulus targets to prevent the introduction of non-existent order relationships between categories. Normalized real-number encoding is used for stimulus intensity, stimulus frequency, and stimulus timing to unify the dimensions and facilitate model training. The pulse train pattern uses encoding including train length, intra-train frequency, train interval, and duty cycle to fully express the temporal structure of the pulse train in the fixed-length vector. The train length is the number of pulses within a pulse train, the intra-train frequency is the repetition frequency of adjacent pulses within the same pulse train, the train interval is the time interval between two adjacent pulse trains, and the duty cycle is the ratio of the duration of a pulse train to the sum of its duration and the subsequent train interval. Using fixed-length vectors to uniformly encode various candidate schemes allows the model to process candidate schemes of different stimulus types with a single input interface, facilitating batch prediction and comparison of a large number of candidate schemes.

[0072] The stimulus-landscape evolution dynamic prediction model is established through transfer learning, combining pre-training with individual longitudinal data fine-tuning. Pre-training with group data trains the group-shared operator, while fine-tuning with individual longitudinal data trains the individual-fitting operator, thus rapidly approximating the subject's true response with limited individual data. The model is trained based on training samples, each of which includes pre-stimulus landscape parameters, stimulus scheme encoding vectors, and post-stimulus landscape parameters, i.e., paired triples. The training objective is to minimize the deviation between the predicted landscape parameters after the stimulus and the measured landscape parameters after the stimulus. The specific calculation formula is as follows:

[0073] (10)

[0074] in, For training loss; The training sample number. This represents summing over all training samples; For the first The predicted landscape parameters after stimulation for each sample are given by equation (9); For the first Measured post-stimulus landscape parameters for each sample; The weighted norm square represents the weights assigned according to the clinical relevance of each landscape parameter component. The weights of each component are either pre-set based on the degree of influence of the corresponding landscape parameter component on the neurodynamic index vector or determined on the validation set based on the criterion of minimizing the prediction error. To allow the group to share the parameters of the operator, Parameters for adapting operators to individuals; , The corresponding regularization coefficient is determined through cross-validation on the validation set based on the criterion of minimizing prediction error. This training identifies the unobservable process of how stimuli alter whole-brain dynamics as a predictable input-output mapping. During training, intermediate state landscape parameters are also used as auxiliary supervision data, introducing intermediate states during the stimulus process in addition to paired triples. As a mid-process supervision, a weighted norm squared term of the difference between the predicted intermediate state and the measured intermediate state is added to the loss of Equation (10), so that the model learns the reasonable evolution of the process and improves the reliability of the prediction on new stimulus schemes.

[0075] Individual longitudinal data fine-tuning uses only longitudinal training samples from the same subject, enabling the individual adaptation operator to learn the stimulus sensitivity specific to that subject. In this embodiment, the pre-stimulus landscape parameters are separated into the individual's intrinsic baseline and state fluctuation components, i.e., in equation (9). equal minus Individual inherent baseline The parameters are determined based on the median of the subjects' resting-state landscape parameters over time, and the specific calculation formula is as follows:

[0076] (11)

[0077] in, The individual baseline of the subject; For the subject's first Sub-resting state landscape parameters Take 1 to ; This represents the historical frequency of the subject's resting-state landscape parameters; This indicates that the median is used for calculation based on the components. The median is not sensitive to individual outliers and provides a more robust estimate. Before inputting pre-stimulus landscape parameters into the population-shared operator, individual intrinsic baselines are removed from the pre-stimulus landscape parameters. This means only the state fluctuation components are fed into the population-shared operator, preventing inter-individual differences from entering the prediction through the population channel at the source. This individual-fit operator... A low-rank parameterization structure with a rank lower than that of the landscape parameter dimension is adopted, and its explicit expression is as follows: ,in, State fluctuation components With encoding vector The concatenated vector; and For each subject, there are two small matrices, both with rank 1. ; superscript Indicates matrix transpose; It is a non-linear activation function; It is a low-rank number, much smaller than the dimensions of landscape parameters. Its value is taken as the minimum rank that minimizes the longitudinal verification error of individuals or according to the landscape parameter dimension. The preset ratio setting allows individual-specific responses to be expressed with far fewer parameters than full-rank, reducing the risk of overfitting when individual data is scarce. The parameters of the population-shared operator are frozen during fine-tuning of individual longitudinal data. And only update the parameters of the low-rank parameterized structure. and Since the individual's intrinsic baseline is constant within the subject, the difference between the post-stimulus landscape parameters and the pre-stimulus landscape parameters observed during the fine-tuning period can only come from the stimulus input. The individual-fitting operator learns the individual's stimulus-specific response rather than the inter-individual baseline difference, thus decoupling the stimulus effect from individual differences. The error in predicting the post-stimulus landscape parameters converges rapidly after several individual events.

[0078] The prediction and regulation module performs the above predictions for each candidate stimulus scheme, and calculates the sum of the landscape parameter increments and the pre-stimulation landscape parameters to obtain the predicted post-stimulation landscape parameters. Based on this, the landscape was recalculated and predictive brain dynamics index vectors were extracted. The prediction and regulation module uses the phenotypic weighted distance between the predicted and target neurodynamic index vectors as a measure of bias, and assigns a higher weight to the index dimension used to determine the abnormal phenotype of the subject than to the other index dimensions. The specific calculation formula is as follows:

[0079] (12)

[0080] in, Phenotypic weighted distance; subscript The index is the dimension number, ranging from 1 to... ; The dimension of the neurodynamic index vector; For the first The weights of each indicator dimension are determined by assigning higher values ​​to the indicator dimensions that define the subject's phenotype and lower values ​​to the other dimensions. The specific high and low values ​​can be set a priori according to the degree of association between each dimension and the subject's phenotype. To predict landscape parameters after stimulation The calculated predicted brain dynamics index vector of the first One component; Target brain dynamics index vector The Each component assigns greater weight to the indicator dimensions that define the subject's phenotype, prioritizing the core indicator dimensions towards the target. For example, for subjects with a reduced indirect transition frequency, the weight corresponding to the indirect transition frequency dimension is... Assigning values ​​higher than those of other dimensions encourages the selection of candidate schemes that best enhance the frequency of indirect transitions. The predictive regulation module filters candidate stimulation schemes with the smallest deviation from the target neurodynamic index vector, generates regulation instructions, and outputs these instructions to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target.

[0081] The stimulus-landscape evolution dynamic prediction model includes an integrated structure consisting of multiple model instances. The output variance of multiple model instances for the same candidate scheme is used to estimate the confidence of the prediction. The prediction regulation module selects candidate stimulus schemes that are located within the safe stimulus parameter set and whose confidence of the predicted brain dynamics index vector is not lower than the preset confidence threshold. That is, it finds the candidate with the smallest phenotypic weighted distance defined by equation (12) within the candidate set that satisfies both safety and confidence constraints.

[0082] The safety stimulation parameter set sets preset upper and lower limits for stimulation intensity, single stimulation dose, cumulative stimulation dose, stimulation frequency, and pulse train duty cycle. These limits comply with relevant clinical safety guidelines, ensuring that the system does not output stimuli exceeding safety boundaries. The confidence level is determined based on the variance between the outputs of multiple model instances in the ensemble structure; the smaller the variance, the higher the confidence level, i.e., the confidence level is a monotonically decreasing function of the variance. The confidence level threshold is set according to the quantile of the distribution of the ensemble output variance on historical data; that is, it is a quantile where the measured error of predictions exceeding this threshold on historical data remains within an acceptable range, preventing the system from applying stimuli based on unreliable predictions.

[0083] When the number of training samples used to train the individual adaptation operator for the current subject is lower than the preset sample threshold, the prediction and control module only uses the group-shared operator to predict the incremental landscape parameters, that is, the output of the individual adaptation operator in equation (9) is set to zero, and the upper limit of the stimulus intensity is reduced simultaneously. When the individual response is not yet clear, the safety margin is increased. The sample threshold is 10 to 20, and its value is based on the rank of the individual adaptation operator. The low-rank individual adaptation operator can generally provide individualized corrections with acceptable variance after paired stimulus events of this magnitude. Therefore, this interval is used as the boundary between enabling the individual adaptation operator and switching to the degraded mode. When the number of samples is lower than this interval, the individual adaptation operator has not yet converged. Therefore, it switches to the degraded mode that only uses the group-shared operator. The data before and after the stimulus generated in this round of degraded mode will still be used to quickly accumulate training samples for the individual adaptation operator in order to meet the activation conditions as soon as possible.

[0084] The dual-feedback module is used to obtain measured landscape parameters and measured brain dynamics index vectors after stimulation based on the EEG signals after stimulation. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.

[0085] The dual-feedback module obtains measured post-stimulation landscape parameters and measured neurodynamic index vectors from the EEG modeling module based on the post-stimulation EEG signals. Through the first feedback path, the landscape parameters and neurodynamic index vectors before and after the stimulus are written into the corresponding anomalous-relief trajectory to update the energy landscape reference database, making subsequent phenotypic stratification and target generation more accurate. Through the second feedback path, the stimulus-landscape evolution dynamic prediction model is updated based on the deviation between the predicted and measured neurodynamic index vectors, making subsequent stimulus consequence predictions more accurate.

[0086] The first and second feedback paths serve the target generation and consequence prediction stages, respectively. Independent updates avoid error propagation caused by mutual coupling. When the phenotypic weighted distance between the measured post-stimulation brain dynamics index vector and the target brain dynamics index vector increases by more than a preset offset threshold compared to the pre-stimulation brain dynamics index vector and the target brain dynamics index vector, the dual-path feedback module reduces the weight of the corresponding abnormal phenotype and stimulus target combination in the selection of candidate stimulus schemes, and marks the corresponding pre- and post-stimulation state data and stimulus schemes as training samples with negative response labels for updating the stimulus-landscape evolution dynamic prediction model. The two phenotypic weighted distances mentioned above are calculated according to formula (12), the difference being that the post-stimulation distance is substituted with the measured post-stimulation brain dynamics index vector. The pre-stimulation distance is substituted into the pre-stimulation brain dynamics index vector. The offset threshold is set according to the fluctuation range of the phenotypic weighted distance change before and after a single stimulus for the same type of subject. That is, a value higher than the normal fluctuation range is taken so that the distance fluctuation within the normal range does not trigger the circuit breaker, but only when it is abnormally increased. This allows the system to reduce the weight or stop the abnormal strategy in time to avoid repeated application of harmful stimuli, and allows the model to learn the negative response of the combination. After the two paths are updated, the system is triggered to enter the next regulation cycle.

[0087] The above four modules are sequentially connected to form a closed loop that uses landscape parameters as the decision-making object, predicts stimulus disturbances by a dynamic prediction model, and performs dual-path self-correction. The model on which the decision is based is upgraded from a static landscape to a dynamic landscape that can reflect stimulus disturbances. The target generation takes into account the brain dynamic heterogeneity within the same diagnosis. The reference data and prediction model are refined synchronously during the regulation process, realizing the complete derivation from the target brain state to the stimulus command and enabling the system to continuously refine itself with treatment.

[0088] Example 2

[0089] Please see Figure 4 A closed-loop, non-invasive neuromodulation method based on real-time EEG includes the following steps:

[0090] S1: Based on the state of the functional network extracted from the multi-channel EEG signal, an individualized energy landscape is constructed based on the pairwise maximum entropy model, and landscape parameters and brain dynamic index vectors of the individualized energy landscape are generated.

[0091] First, based on the multi-channel EEG signal extraction functional network state, an individualized energy landscape was constructed based on the pairwise maximum entropy model, and landscape parameters and brain dynamic index vectors of the individualized energy landscape were generated. EEG was collected for about 10 minutes with 128 channels, fixed sampling rate and bandpass filtering. After artifact removal and low confidence labeling, the binarization threshold was calculated online with the robust median of the activity envelope within the sliding time window according to Equation (2), and the network state vector sequence shown in Equation (1) was obtained by detrending the slow-varying baseline according to Equation (3). The individualized energy landscape of the subject was constructed by fitting the pairwise maximum entropy model according to Equations (4) and (5), and several attractors were identified. Brain dynamic index vectors including indirect transition frequency, energy barrier height and attractor depth were extracted according to Equations (7) and (8).

[0092] S2: Maintain an energy landscape reference database that stores abnormal phenotypes and abnormal-relief trajectories according to the classification of abnormal phenotypes in neurodynamics. Determine the abnormal phenotype and abnormality level based on the current neurodynamic index vector, and determine the target neurodynamic index vector based on the corresponding abnormal-relief trajectory.

[0093] Next, an energy landscape reference database is maintained, categorized by abnormal phenotypes of neurodynamic abnormalities and stored using abnormal-relief trajectories. The abnormal phenotype and abnormality level are determined based on the current neurodynamic index vector, and the target neurodynamic index vector is determined based on the corresponding abnormal-relief trajectory. The longitudinal abnormal-relief trajectory of the same type of subject is retrieved by using the indirect transition frequency reduction type as the classification key. The subject's index vector is standardized and scored. The standardized score of the indirect transition frequency dimension is determined to be -2.3, which is considered moderate. Subsequently, the target position is determined on the same type of trajectory, and the target neurodynamic index vector for this period is generated by interpolation and inversion of adjacent nodes. That is, the index vector corresponding to the shallower attractor configuration where the indirect transition frequency tends to be normal.

[0094] S3: Predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increment and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, screen the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate the control command, and output the control command to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target.

[0095] Subsequently, the stimulus-landscape evolution dynamic prediction model is used to predict the increments of landscape parameters caused by each candidate stimulus scheme. The sum of the landscape parameter increments and the pre-stimulation landscape parameters is calculated to obtain the predicted post-stimulation landscape parameters and the predicted neurodynamic index vector. The candidate stimulus scheme with the smallest deviation from the target neurodynamic index vector is selected to generate a regulatory instruction. The regulatory instruction is output to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target. This step provides a reproducible example, taking the number of functional networks... The value equals 4, which represents the default mode network, executive control network, salience network, and sensorimotor network. Therefore, the landscape parameter dimension is obtained from equation (6). 4 plus 6 equals 10, current landscape Two corresponding attractors and Its indirect transition frequency is low, and several candidate stimulus schemes are encoded one by one into fixed-length vectors. Input a dynamic prediction model for a candidate protocol, with the stimulation type being repetitive transcranial magnetic stimulation, the stimulation target being the dorsolateral prefrontal cortex, the stimulation intensity being 110% of the resting motor threshold, the stimulation frequency being 10 Hz, the pulse train being continuous, and the stimulation timing being the entry of the attractor. After 200 milliseconds, the model, according to equation (9), first uses the pre-stimulus landscape parameters. Subtract individual baseline Obtain the state fluctuation components ,Will With encoding vector Input group shared operator, and The individual adaptation operator is input, and the outputs of the two are added together to obtain the landscape parameter increment. This increases the coupling coefficient between the executive control network and the salience network, and decreases the local field of the default mode network, thus obtaining the landscape parameters after the predicted stimulus. Based on this, after recalculating the landscape according to equations (5), (7), and (8), the attractor and The saddle point energy decreases and the direct transition channel opens, predicting that the indirect transition frequency will increase and approach the target value. Within the safe stimulus parameter set and the candidate set with a confidence level not lower than the confidence threshold, the phenotypic weighted distance between the predicted neurodynamic index vector and the target neurodynamic index vector of each candidate scheme is compared according to Equation (12). The stimulus type, target point, intensity, frequency, pulse train pattern and timing corresponding to the smallest distance are selected to generate the regulatory instruction. When the value is small, enumerate all values ​​of 2. Accurate recalculation of landscape configurations to the power of 1 When the value is large, Monte Carlo sampling is used as an approximation.

[0096] S4: Based on the EEG signals after stimulation, the measured landscape parameters and measured brain dynamics index vectors are obtained. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.

[0097] Finally, based on the EEG signal after stimulation, the measured landscape parameters and measured brain dynamics index vectors are obtained. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. The stimulation-landscape evolution dynamic prediction model is updated according to the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector through the second feedback path. After the update is completed, the system is triggered to enter the next regulation cycle. After the stimulation device applies stimulation to the target point at the time specified by the instruction, the updated energy landscape after stimulation is measured and the actual relief trajectory is backfilled into the reference database. Another path is to correct the dynamic prediction model according to the deviation between the predicted final state and the measured final state according to formula (10). If the key index deviates beyond the threshold in the direction away from the target, the circuit is triggered and the negative sample is backfilled. Then the system returns to step S1 to enter the next cycle. After several closed cycles, the subject's indirect transition frequency steadily approaches normal along the target direction, and the reference database and prediction model are refined synchronously.

[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0099] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A closed-loop non-invasive neuromodulation system based on real-time EEG, characterized in that, The system includes: The EEG modeling module is used to extract the functional network state based on multi-channel EEG signals, construct an individualized energy landscape based on the pairwise maximum entropy model, and generate landscape parameters and brain dynamic index vectors for the individualized energy landscape. The phenotypic hierarchical module is used to maintain an energy landscape reference database that stores abnormal trajectories according to the classification of abnormal phenotypes of brain dynamics. It determines the abnormal phenotype and abnormality level based on the current brain dynamics index vector, and determines the target brain dynamics index vector based on the corresponding abnormal-relief trajectory. The prediction and regulation module is used to predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increase and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, select the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate regulation instructions, and output the regulation instructions to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target. The dual-feedback module is used to obtain measured landscape parameters and measured brain dynamics index vectors after stimulation based on the EEG signals after stimulation. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.

2. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 1, characterized in that, The EEG modeling module acquires multi-channel EEG signals according to a preset channel configuration and sampling rate, performs filtering according to preset bandpass filtering parameters, and after stimulus artifact removal and low confidence data labeling, extracts the activity time series of each functional network according to a specified functional network partitioning scheme, and binarizes the activity time series into a network state vector sequence in which each component takes a value of +1 or -1. The energy value of the individualized energy landscape is determined by adding the sum of the products of the local field of each functional network and the corresponding network state component, and the sum of the products of the coupling coefficient between functional networks and the corresponding two network state components, and taking the negative value. The local field and the coupling coefficient between functional networks constitute the landscape parameters. The brain dynamics index vector includes attractor depth and energy barrier height.

3. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 2, characterized in that, The EEG modeling module uses the robust median of the corresponding functional network activity envelope within a sliding time window of a preset length before the current moment as the binarization threshold, and performs detrending processing on the activity time series through a slowly varying baseline with a preset time constant. Data marked as low confidence were discarded during the pairwise maximum entropy model fitting and brain dynamics index vector calculation.

4. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 1, characterized in that, The stimulus-landscape evolution dynamic prediction model takes the pre-stimulus landscape parameters and the fixed-length encoding vector of candidate stimulus schemes as input, and uses the sum of the output of the group-shared operator and the output of the individual-fitting operator as the increment of the landscape parameters. The group-shared operator uses a graph neural network to represent the common stimulus response patterns among different subjects, and the individual-fitting operator is used to represent the stimulus sensitivity of the current subject. In the fixed-length encoding vector, one-hot encoding is used for stimulus type and discrete stimulus target, and normalized real number encoding is used for stimulus intensity, stimulus frequency and stimulus timing. The pulse train mode uses encoding including train length, intra-train frequency, train interval and duty cycle.

5. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 4, characterized in that, The stimulus-landscape evolution dynamic prediction model is established through a transfer learning approach that combines pre-training with individual longitudinal data fine-tuning. The pre-training with the group data is used to train the group-shared operator, and the individual longitudinal data fine-tuning is used to train the individual-adaptive operator. The stimulus-landscape evolution dynamic prediction model is trained based on training samples. Each training sample includes pre-stimulus landscape parameters, stimulus scheme encoding vector, and post-stimulus landscape parameters, with intermediate-state landscape parameters as auxiliary supervision data.

6. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 5, characterized in that, The individual longitudinal data fine-tuning uses only longitudinal training samples from the same subject, and separates the pre-stimulus landscape parameters into individual intrinsic baseline and state fluctuation components; The individual intrinsic baseline is determined based on the median of the subject's resting-state landscape parameters over time and is removed from the pre-stimulation landscape parameters before they are input into the group-shared operator. The individual adaptation operator adopts a low-rank parameterized structure with a rank lower than the dimension of the landscape parameters. During the fine-tuning of the individual longitudinal data, the parameters of the group-shared operator are frozen and the parameters of the low-rank parameterized structure are updated.

7. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 1, characterized in that, The phenotypic hierarchical module standardizes the current neurodynamic index vector relative to the reference distribution of each abnormal phenotype to obtain the standardized score of each neurodynamic index. It determines the abnormal phenotype based on the index dimension used to characterize each abnormal phenotype and the direction of its standardized score, and determines the abnormality level based on the absolute value of the corresponding standardized score. The phenotypic hierarchical module determines the target location on the corresponding abnormal-relief trajectory based on the abnormal phenotype and abnormality level, and obtains the target neurodynamic index vector through interpolation between adjacent trajectory nodes.

8. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 4, characterized in that, The candidate stimulation scheme includes stimulation target, stimulation type, stimulation intensity, stimulation frequency, pulse train mode, and stimulation timing. The prediction and regulation module uses the phenotypic weighted distance between the predicted brain dynamics index vector and the target brain dynamics index vector as a measure of deviation, and assigns a higher weight to the index dimension used to determine the abnormal phenotype of the subject than to the other index dimensions.

9. The closed-loop non-invasive neuromodulation system based on real-time EEG according to claim 8, characterized in that, The stimulus-landscape evolution dynamic prediction model includes an integrated structure composed of multiple model instances. The prediction and regulation module selects candidate stimulus schemes that are located within a safe stimulus parameter set and whose confidence level for predicting brain dynamics index vectors is not lower than a preset confidence threshold. The safe stimulus parameter set sets preset upper and lower limits for stimulus intensity, single stimulus dose, cumulative stimulus dose, stimulus frequency, and pulse train duty cycle. The confidence level is determined based on the variance between the outputs of multiple model instances in the integrated structure. When the number of training samples used to train the individual adaptation operator for the current subject is lower than a preset sample threshold, the prediction and regulation module only uses the group-shared operator to perform incremental prediction of landscape parameters and simultaneously reduces the upper limit of stimulus intensity. When the phenotypic weighted distance between the measured post-stimulation brain dynamics index vector and the target brain dynamics index vector increases by more than a preset offset threshold compared to the pre-stimulation brain dynamics index vector and the target brain dynamics index vector, the dual-path feedback module reduces the weight of the corresponding abnormal phenotype and stimulation target combination in the selection of candidate stimulation schemes, and marks the corresponding pre- and post-stimulation state data and stimulation schemes as training samples with negative response labels, which are used to update the stimulation-landscape evolution dynamic prediction model.

10. A closed-loop, non-invasive neuromodulation method based on real-time EEG, characterized in that, The execution of the closed-loop non-invasive neuromodulation system based on real-time EEG according to any one of claims 1-9 includes the following steps: S1: Based on the state of the functional network extracted from the multi-channel EEG signal, an individualized energy landscape is constructed based on the pairwise maximum entropy model, and landscape parameters and brain dynamic index vectors of the individualized energy landscape are generated. S2: Maintain an energy landscape reference database that stores abnormal phenotypes and abnormal-relief trajectories according to the classification of abnormal phenotypes in neurodynamics. Determine the abnormal phenotype and abnormality level based on the current neurodynamic index vector, and determine the target neurodynamic index vector based on the corresponding abnormal-relief trajectory. S3: Predict the increase in landscape parameters caused by each candidate stimulus scheme through the stimulus-landscape evolution dynamic prediction model, calculate the sum of the landscape parameter increment and the landscape parameters before stimulation, obtain the predicted landscape parameters after stimulation and the predicted brain dynamic index vector, screen the candidate stimulus scheme with the smallest deviation from the target brain dynamic index vector to generate the control command, and output the control command to drive the stimulation device to apply non-invasive physical stimulation to the corresponding stimulation target. S4: Based on the EEG signals after stimulation, the measured landscape parameters and measured brain dynamics index vectors are obtained. The landscape parameters and brain dynamics index vectors before and after stimulation are written into the abnormal-relief trajectory through the first feedback path to update the energy landscape reference database. Through the second feedback path, the stimulation-landscape evolution dynamic prediction model is updated based on the deviation between the predicted brain dynamics index vector and the measured brain dynamics index vector. After the update is completed, the system is triggered to enter the next regulation cycle.