A method and system for multi-channel cooperative control of a transcranial magnetic stimulator
Patent Information
- Application Number
- CN202610836283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]针对以上问题,本申请提供一种经颅磁刺激仪的多通道协同控制方法,用于解决现有技术往往局限于对单一区域的刺激,忽略了大脑不同区域之间复杂的互动关系的技术问题
[0019]The technical solution proposed in this application acquires initial frequency parameters and temporal sequence parameters for multiple channels from a transcranial magnetic stimulation (TMS) device. Based on a pre-set brain network model, it maps brain interaction relationships and generates channel frequency coordination benchmark values, providing a unified reference standard for multi-channel coordination and solving the problem of asynchronous brain region activity caused by independent channel settings. A support vector machine (SVM) algorithm processes the benchmark values and activity synchronization data, intelligently identifying channels with mismatched frequencies and generating correction sequences, making parameter adjustments targeted and avoiding blind trial and error. A gradient descent algorithm is used to optimize the correction sequences, iteratively solving for the optimal parameter combination with the goal of maximizing the synchronization exponent, improving the coordination accuracy of multi-channel stimulation. Furthermore, a neural network algorithm is used to fuse temporal sequence parameters and activity synchronization update schemes, training a new mapping structure that reflects the individual brain network interaction characteristics, enabling the control method to adapt to differences in brain functional connectivity among different patients. Finally, an optimized parameter set for the entire brain is output, generating multi-channel coordinated control commands, achieving a complete closed loop from parameter acquisition, deviation correction, gradient optimization to personalized new mapping construction. This application improves the effectiveness of TMS in complex brain network modulation, enhancing the accuracy of neuromodulation and treatment response rate.
Smart Images

Figure CN122643589A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of deep neural network technology, specifically a multi-channel collaborative control method and system for a transcranial magnetic stimulation device. Background Technology
[0002] Transcranial magnetic stimulation (TMS), as a non-invasive method of brain neuromodulation, has irreplaceable value in neuroscience research and clinical treatment. By applying an external magnetic field to the brain, it can influence neural activity, providing an important tool for exploring brain function and treating related diseases. However, research and application in this field still face many challenges, and there is an urgent need to overcome the limitations of existing technologies to achieve more precise and effective modulation.
[0003] Currently, common transcranial magnetic stimulation (TMS) methods have significant limitations in multi-point synergistic manipulation, making it difficult to meet the needs of complex brain network modulation. Many techniques are often limited to stimulating a single region, ignoring the complex interactions between different brain regions. This limitation makes it difficult to adapt the stimulation effect to individual differences and to flexibly adjust it for specific neural activity patterns, especially in scenarios requiring multi-regional synergistic action, where the results are often unsatisfactory. Summary of the Invention
[0004] To address the above issues, this application provides a multi-channel collaborative control method for a transcranial magnetic stimulation (TMS) device, which solves the technical problem that existing technologies are often limited to stimulating a single region and neglect the complex interactive relationships between different regions of the brain.
[0005] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0006] Initial frequency parameters and time sequence parameters of multiple channels are obtained from the transcranial magnetic stimulation device;
[0007] Based on a preset brain network model, the brain interaction relationship corresponding to the initial frequency parameters and the time sequence parameters is mapped to generate a channel frequency coordination benchmark value.
[0008] The channel frequency coordination reference value and active synchronization data are processed by the support vector machine algorithm to determine the correction sequence of the frequency coordination parameters;
[0009] The correction sequence is optimized using the gradient descent algorithm to obtain an activity synchronization update scheme.
[0010] A new mapping structure of brain network interaction is obtained by fusing the time sequence parameters with the activity synchronization update scheme based on a neural network algorithm.
[0011] The new mapping structure outputs the final set of parameters for overall brain optimization and generates multi-channel collaborative control commands for the transcranial magnetic stimulation device.
[0012] In addition, to achieve the above objectives, this application also proposes a multi-channel collaborative control system for a transcranial magnetic stimulation device, the system comprising: a multi-channel data acquisition module, a brain-network interaction benchmark mapping module, a coordination parameter correction module, a correction sequence optimization module, a brain-network new structure fusion module, and a final parameter and command output module;
[0013] The multi-channel data acquisition module is used to acquire initial frequency parameters and time sequence parameters of multiple channels from the transcranial magnetic stimulation device;
[0014] The brain-network interaction benchmark mapping module is used to map the brain interaction relationship corresponding to the initial frequency parameters and the time sequence parameters based on a preset brain network model, and generate channel frequency coordination benchmark values.
[0015] The coordination parameter correction module is used to process the channel frequency coordination reference value and active synchronization data through a support vector machine algorithm to determine the correction sequence of the frequency coordination parameters;
[0016] The corrected sequence optimization module is used to optimize the corrected sequence using a gradient descent algorithm to obtain an activity synchronization update scheme.
[0017] A new brain network structure fusion module is used to fuse the time sequence parameters and the activity synchronization update scheme based on a neural network algorithm to obtain a new mapping structure of brain network interaction relationships.
[0018] The final parameter and instruction output module is used to output the final parameter set for overall brain optimization based on the new mapping structure, and to generate multi-channel collaborative control instructions for the transcranial magnetic stimulation device.
[0019] The technical solution proposed in this application acquires initial frequency parameters and temporal sequence parameters for multiple channels from a transcranial magnetic stimulation (TMS) device. Based on a pre-set brain network model, it maps brain interaction relationships and generates channel frequency coordination benchmark values, providing a unified reference standard for multi-channel coordination and solving the problem of asynchronous brain region activity caused by independent channel settings. A support vector machine (SVM) algorithm processes the benchmark values and activity synchronization data, intelligently identifying channels with mismatched frequencies and generating correction sequences, making parameter adjustments targeted and avoiding blind trial and error. A gradient descent algorithm is used to optimize the correction sequences, iteratively solving for the optimal parameter combination with the goal of maximizing the synchronization exponent, improving the coordination accuracy of multi-channel stimulation. Furthermore, a neural network algorithm is used to fuse temporal sequence parameters and activity synchronization update schemes, training a new mapping structure that reflects the individual brain network interaction characteristics, enabling the control method to adapt to differences in brain functional connectivity among different patients. Finally, an optimized parameter set for the entire brain is output, generating multi-channel coordinated control commands, achieving a complete closed loop from parameter acquisition, deviation correction, gradient optimization to personalized new mapping construction. This application improves the effectiveness of TMS in complex brain network modulation, enhancing the accuracy of neuromodulation and treatment response rate. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating an embodiment of the multi-channel collaborative control method for a transcranial magnetic stimulation device according to this application.
[0021] Figure 2 This is a flowchart illustrating Embodiment 2 of the multi-channel collaborative control method for the transcranial magnetic stimulation device of this application.
[0022] Figure 3 This is a flowchart illustrating Embodiment 3 of the multi-channel collaborative control method for the transcranial magnetic stimulation device of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solution, the present application will be described in detail below with reference to the embodiments. The description in this section is only exemplary and explanatory, and should not be used to limit the scope of protection of the present application in any way.
[0024] In existing technologies, the multi-channel collaborative control method of transcranial magnetic stimulation (TMS) has the following drawbacks: It lacks an effective mapping between the initial frequency parameters and temporal sequence parameters of the multiple channels and the preset brain network model, failing to generate channel frequency coordination benchmark values, resulting in a coarse characterization of brain interaction; the support vector machine algorithm, when processing frequency matching and activity synchronization data, does not form a closed-loop correction with the temporal sequence coordination parameters, making it difficult for the correction sequence to adapt to individual differences; the gradient descent algorithm's optimization of the correction sequence lacks dynamic integration with the activity synchronization update scheme, resulting in an inaccurate new mapping structure of brain network interaction; and the final parameter set output fails to integrate real-time monitoring data, leading to low personalization of multi-channel collaborative control commands, affecting the stimulation effect and the stability of brain network modulation.
[0025] Therefore, this application provides a solution: initial frequency parameters and temporal sequence parameters of multiple channels are obtained from a transcranial magnetic stimulation (TMS) device; brain interaction relationships are mapped based on a preset brain network model to generate channel frequency coordination benchmark values; the benchmark values and activity synchronization data are processed using a support vector machine algorithm to determine the correction sequence of frequency coordination parameters; the correction sequence is optimized using a gradient descent algorithm to obtain an activity synchronization update scheme; the temporal sequence parameters and activity synchronization update scheme are fused based on a neural network algorithm to obtain a new mapping structure of brain network interaction relationships; the final parameter set of overall brain optimization is output according to the new mapping structure, and multi-channel collaborative control instructions are generated, thereby forming a complete closed loop from benchmark value generation, parameter correction, gradient optimization to new mapping construction, significantly improving the multi-channel collaborative accuracy of TMS and the adaptability of brain network modulation.
[0026] It should be noted that the executing entity of each embodiment of this application can be a computing service system with data processing, network communication, and program execution functions, such as an electronic system capable of realizing the above functions, a multi-channel collaborative control system of a transcranial magnetic stimulator, etc. The following uses the multi-channel collaborative control system of a transcranial magnetic stimulator (hereinafter referred to as "the system") as an example to describe the following embodiments.
[0027] Based on this, embodiments of this application provide a multi-channel collaborative control method for a transcranial magnetic stimulation (TMS) device, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the multi-channel collaborative control method for the transcranial magnetic stimulation device of this application.
[0028] In this embodiment, the multi-channel collaborative control method of the transcranial magnetic stimulation device includes steps S10 to S60:
[0029] Step S10: Obtain the initial frequency parameters and time sequence parameters of multiple channels from the transcranial magnetic stimulation device.
[0030] It's important to note that transcranial magnetic stimulation (TMS) devices contain multiple stimulation coils, each corresponding to an independent stimulation channel. Each channel can independently adjust the frequency, intensity, pulse width, and trigger time of the stimulation pulses. The initial frequency parameter refers to the pulse repetition frequency output by each channel in its default or preset state, measured in Hertz (Hz). For example, a channel might be set to 10 Hz, meaning it outputs 10 pulses per second. The time sequence parameter refers to the temporal relationship and time interval between pulse triggers from different channels, measured in milliseconds. For example, channel A triggers at 0 milliseconds, channel B triggers after 5 milliseconds, and channel C triggers after 10 milliseconds; these time offsets constitute the time sequence parameter. This data is read directly through the TMS device's control interface or acquired through real-time monitoring sensors. When acquiring this data, it's crucial to pay attention to the correspondence between each channel's identifier and the subsequent brain region mapping; typically, the channel number and its physical coordinates on the scalp need to be recorded.
[0031] Step S20: Based on the preset brain network model, map the brain interaction relationship corresponding to the initial frequency parameters and time sequence parameters to generate channel frequency coordination benchmark values.
[0032] A pre-defined brain network model is a model of functional or structural connectivity between brain regions established in advance based on neuroscience knowledge. The brain network model includes anatomical connectivity maps and functional connectivity maps. This model defines which brain regions have direct neural pathways and the approximate transmission delay characteristics of these pathways.
[0033] It should be understood that the mapping process involves mapping the placement of each transcranial magnetic stimulation (TMS) channel to one or more brain region nodes in the brain network model. For example, if channel 1 is located above the dorsolateral prefrontal cortex, it is mapped to a left prefrontal cortex node in the model. Initial frequency and temporal parameters are assigned to these nodes, indicating that these brain regions will receive magnetic stimulation at the corresponding frequency and timing.
[0034] Furthermore, based on the connectivity relationships in the brain network model, the interactions triggered by these stimuli between brain regions are analyzed. For example, if there is an excitatory connection between node A and node B, and the stimulation frequency of node A is close to the intrinsic oscillation frequency of node B, a resonance enhancement effect may occur. The channel frequency coordination benchmark is a quantitative indicator used to characterize the suitability of the current frequency and timing parameters for the overall coordination of the brain network. The higher the benchmark value, the more conducive the current settings are to synchronous activity between brain regions. The calculation of this benchmark value can be based on statistics such as mutual information and coherence, and subsequent steps will use this as a standard for adjustment.
[0035] Step S30: Process the channel frequency coordination reference value and active synchronization data using the support vector machine algorithm to determine the correction sequence of frequency coordination parameters.
[0036] After obtaining the baseline values, real-time activity synchronization data is processed. Activity synchronization data refers to the synchronicity indicators of neural activity in various brain regions monitored in real time through functional imaging methods such as electroencephalography (EEG) and magnetoencephalography (MEG), for example, the coherence coefficient or phase lock value between two brain regions. Support Vector Machine (SVM) is a supervised learning algorithm that can classify data based on input features.
[0037] In the specific implementation, the difference between the current frequency parameter and the reference value of each channel, along with the current active synchronization data, are used as input features. The support vector machine (SVM) determines each channel as either "frequency matched" or "frequency mismatched." For channels determined to be mismatched, their frequency coordination parameters need to be corrected. The correction sequence refers to adjusting the frequency or time sequence parameters of these channels in a certain order and step size, so that the adjusted parameters are closer to the reference value, thereby improving synchronization. The correction sequence is an ordered list of parameter adjustment instructions, such as "Channel 2 frequency reduced from 10 Hz to 9.5 Hz, Channel 3 delay time increased by 2 milliseconds."
[0038] Step S40: Use the gradient descent algorithm to optimize the correction sequence and obtain the activity synchronization update scheme.
[0039] The correction sequence provides a preliminary adjustment direction, but it is not optimal. Gradient descent is an iterative optimization method that calculates the gradient of the objective function with respect to the parameters and gradually updates the parameters along the gradient descent direction until the optimal value is reached. Here, the objective function is the negative value of activity synchronization, i.e., maximizing synchronization is equivalent to minimizing negative synchronization. The gradient descent algorithm starts with the parameter adjustments in the correction sequence, calculates the partial derivative of the synchronization index with respect to each parameter under the current parameters, and updates the parameters according to the learning rate multiplied by the gradient direction. After each update, synchronization is re-evaluated, and this process is repeated multiple times until synchronization no longer significantly improves. The final set of optimal parameters is the activity synchronization update scheme. This scheme includes optimized frequency and temporal order parameters for each channel, enabling neural activity in various brain regions to achieve a high level of synchronization.
[0040] Step S50: Based on the neural network algorithm, a new mapping structure of brain network interaction relationship is obtained by fusing time sequence parameters and activity synchronization update scheme.
[0041] It should be understood that temporal sequence parameters and activity synchronization update schemes describe the relationship between stimulus parameters and brain responses from different dimensions. Neural network algorithms (such as Long Short-Term Memory networks) are capable of learning complex nonlinear mappings.
[0042] Using time-series parameters as input and synchronicity indicators from the activity synchronization update scheme as supervisory signals, a neural network model is trained. The trained model can predict the interaction intensity between brain regions based on the time-series parameters. A weight matrix describing the interaction relationships between brain regions can be extracted from the model; this matrix constitutes the new mapping structure. This new mapping structure incorporates real-time monitoring data and, unlike the preset brain network model, better reflects the actual brain functional connectivity state of the individual.
[0043] Step S60: Output the final parameter set for overall brain optimization based on the new mapping structure, and generate multi-channel collaborative control instructions for the transcranial magnetic stimulation device.
[0044] The new mapping structure reflects the actual interaction between different brain regions under the current stimulation conditions. Based on this structure, parameters can be further optimized to achieve the best synergistic state of the overall brain network. The final parameter set includes the optimal stimulation frequency, intensity, timing sequence, and number of pulses for each channel. These parameters are converted into an instruction format executable by the transcranial magnetic stimulation (TMS) device, such as sending control commands via serial port or network to set the output waveform parameters of each channel. The final parameter set and synergistic control instructions can be directly applied to the TMS device to achieve precise synergistic stimulation of multiple channels.
[0045] For example, initial frequency parameters were obtained from a 32-channel transcranial magnetic stimulation (TMS) device, where channel 1 was 10 Hz, channel 2 was 10.5 Hz, and channel 3 was 9.8 Hz. The timing parameters were that channel 1 was triggered first, channel 2 was delayed by 3 milliseconds, and channel 3 was delayed by 6 milliseconds. The preset brain network model used an automatic anatomical labeling template, mapping channel 1 to the left dorsolateral prefrontal cortex, channel 2 to the right dorsolateral prefrontal cortex, and channel 3 to the anterior cingulate cortex. The calculated channel frequency coordination baseline value was the mutual information between the dominant frequency of each channel and the intrinsic oscillation frequency of the brain region: 0.75 for channel 1, 0.68 for channel 2, and 0.72 for channel 3. Real-time activity synchronization data showed that the coherence coefficient between channel 1 and channel 2 was 0.55, lower than the expected value of 0.7. The support vector machine classification result indicated a frequency mismatch in channel 2, generating a correction sequence: the channel 2 frequency was reduced by 0.3 Hz, and the delay was increased by 1 millisecond. After 15 iterations of gradient descent optimization, the synchronicity improved from 0.55 to 0.81, resulting in an update scheme: channel 2 with a frequency of 10.2 Hz and a delay of 4.5 ms. A Long Short-Term Memory (LSTM) network was used to fuse the temporal parameters and the update scheme. After training, the connection weight matrix was extracted, revealing that the interaction weight between the left and right prefrontal cortexes increased from 0.6 to 0.85, forming a new mapping structure. The final output parameter set was: channel 1 10 Hz 0 ms, channel 2 10.2 Hz 4.5 ms, and channel 3 9.8 Hz 6 ms, generating collaborative control commands that were sent to the stimulator.
[0046] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes steps S201 to S205:
[0047] Step S201: Based on the brain region nodes in the preset brain network model, map the initial frequency parameters of each channel to the corresponding brain region nodes.
[0048] It should be noted that the pre-defined brain network model contains several predefined brain region nodes, each representing a specific anatomical region, such as a region in the Broadman partition or an automatically anatomically labeled template. The transcranial magnetic stimulation coil for each channel is placed at a specific location on the scalp, and the corresponding cortical region at that location can be determined using a neuronavigation system. Therefore, each channel can be uniquely mapped to one or more brain region nodes. During mapping, a correspondence table between channels and nodes is recorded. An initial frequency parameter is assigned to the node, representing the frequency of the external stimulus received by that node. For example, if channel 1 has a frequency of 10 Hz and is mapped to a node in the left motor cortex, then the external driving frequency for that node is 10 Hz.
[0049] Step S202: Perform frequency domain analysis on the initial frequency parameters of each brain region node and extract the dominant frequency component of each node.
[0050] It should be understood that each brain node, in addition to receiving external stimuli, also possesses its own intrinsic neural oscillation frequency. The initial frequency parameter is the frequency of the external stimulus, but the response of the brain node may also contain harmonic components. Frequency domain analysis transforms the node's time-series signal (obtainable through electroencephalography or generated through model simulation) into the frequency domain to identify the frequency component with the highest power, i.e., the dominant frequency component. The dominant frequency component reflects the most active oscillation rhythm of that node. The method for extracting the dominant frequency is to perform a fast Fourier transform on the node signal, calculate the power spectral density, and find the frequency corresponding to the peak value.
[0051] Step S203: The Granger causal analysis algorithm is used to process the time sequence parameters and calculate the causal influence values between nodes in each brain region.
[0052] Granger causality analysis is a statistical method used to determine whether one time series helps predict another. If historical information of node A significantly improves the prediction accuracy of the current value of node B, then A is considered a Granger cause of B. In transcranial magnetic stimulation (TMS), the time sequence parameter determines the order of stimulation pulses, which may induce causal flow between brain regions. Specifically, the time sequence parameter of each channel is converted into a time series of stimulation received by each brain region node (the time point of pulse occurrence), and then a Granger causality test is performed on each pair of nodes to obtain the causal influence value. This value is a number between 0 and 1, with a larger value indicating a stronger causal influence. The statistical significance level is usually set to p < 0.05.
[0053] Step S204: Based on the dominant frequency component and causal influence value, construct a directed graph of brain interaction relationships, wherein the topological structure of the directed graph conforms to the connection constraints of the preset brain network model.
[0054] The nodes in the directed graph are brain region nodes, and the directed edges point from cause nodes to result nodes. The edge weights can be set as causal influence values or the product of the dominant frequency matching degree and the causal influence value. The pre-defined brain network model provides structural constraints; for example, if there is no known anatomical connection between two nodes, even if the calculated causal influence value is high, an edge cannot be added to the graph to avoid spurious connections. Therefore, by determining which node pairs have potential connections based on the adjacency matrix of the pre-defined brain network model, and calculating and assigning causal influence values only to these node pairs, the generated directed graph conforms to both physiological basis and reflects stimulus-induced functional connections.
[0055] Step S205: The mutual information algorithm is used to quantify the frequency synchronization between nodes in the directed graph, and the statistical results of the mutual information values are used as the reference values for channel frequency coordination.
[0056] Mutual information is an information-theoretic metric that measures the interdependence between two random variables. For the frequency signals of the nodes at both ends of each edge in a directed graph, their mutual information value is calculated, which is the difference between the joint entropy and the marginal entropy of the frequency distributions of node i and node j. A larger mutual information value indicates more synchronized frequencies between the two nodes. The mutual information values of all edges are statistically analyzed, for example, by taking the mean, median, or weighted sum, as a baseline value for channel frequency coordination. A higher baseline value indicates better frequency synchronization between regions in the brain network due to the current frequency parameters. This baseline value will serve as the target baseline for subsequent support vector machine classification.
[0057] For example, the preset brain network model contains 90 brain region nodes. 32 transcranial magnetic stimulation (TMS) channels are mapped to 32 corresponding nodes. Frequency domain analysis is performed on the initial frequency parameters of each node (10, 10.5, 9.8… Hz) to extract the dominant frequency. The results are basically consistent with the external stimulation frequency, but channel 5 shows a 12 Hz harmonic. Using Granger causality analysis with time sequence parameters (pulse trigger time of each channel), the causal influence value of node 1 on node 2 is calculated to be 0.65, while that of node 2 on node 1 is only 0.12, indicating a unidirectional drive. When constructing the directed graph, according to the model constraints, there is a bidirectional connection between node 1 and node 2; therefore, both 0.65 and 0.12 are retained, but with different edge directions. The mutual information value of each edge is calculated: the mutual information between node 1 and node 2 is 2.3 bits, and between node 1 and node 3 is 1.8 bits. The mean mutual information of all edges is 2.1 bits, with a standard deviation of 0.4; the mean of 2.1 bits is taken as the baseline value.
[0058] As one implementation, step S202 includes:
[0059] Arrange the initial frequency parameters corresponding to each brain region node into a time series in chronological order;
[0060] The time series was converted to the frequency domain using a fast Fourier transform to obtain the power spectral density distribution;
[0061] The frequency corresponding to the peak frequency is identified from the power spectral density distribution and used as the dominant frequency component of the brain region node to obtain the dominant frequency component of each brain region node.
[0062] In practice, although the initial frequency parameter is a set value, it needs to be considered as a time series that changes over time in order to analyze the dominant frequency. More reasonably, the frequency of the actual neural signals generated by the nodes under stimulation should be the object of analysis. In practice, the neural signals of each brain region node can be sampled using electroencephalography (EEG) or functional magnetic resonance imaging (fMRI). The sampled values are arranged in chronological order to form a time series with a length of N time points and a sampling interval of Δt seconds.
[0063] In the power spectral density distribution, find the global maximum point; the frequency corresponding to this point is the dominant frequency component of that node. If multiple obvious peaks exist, the highest peak can be selected, or the peak within the frequency band of interest can be selected according to task requirements (e.g., the alpha band 8-12 Hz). The dominant frequency component is expressed in Hertz, rounded to one decimal place. Repeat the above process for all brain regions to be analyzed to obtain the dominant frequency component of each node.
[0064] For example, a 10-second EEG signal was acquired from a node in the left motor cortex at a sampling rate of 1000 Hz, resulting in a time series of 10,000 data points. A Fast Fourier Transform was used to calculate the power spectral density, which showed a maximum peak at 10.2 Hz, with a power density of 50 microvolts squared per Hz. Therefore, the dominant frequency component of this node is 10.2 Hz. Another node showed a maximum peak at 7.8 Hz, with a dominant frequency of 7.8 Hz. The dominant frequency components of all 32 nodes were: 10.2, 10.5, 9.8, 11.0, … etc.
[0065] In one implementation, step S30 includes steps S301 to S306:
[0066] Step S301: Compare the channel frequency coordination reference value with the actual frequency parameters of each channel, calculate the frequency deviation value of each channel, and construct a frequency deviation vector based on the frequency deviation value.
[0067] The channel frequency coordination baseline value is a scalar or a reference value for each channel. The actual frequency parameter refers to the stimulation frequency set for each channel of the current transcranial magnetic stimulation device. For each channel, the frequency deviation value equals the actual frequency minus the baseline frequency. If the baseline frequency is a general statistical value, the deviation for each channel may be different. Arranging the deviation values of all channels in channel order forms a vector called the frequency deviation vector. The deviation can be positive or negative.
[0068] Step S302: Extract the synchronization index of each channel from the activity synchronization data and combine it with the frequency deviation vector to form a feature vector.
[0069] Activity synchronization data, obtained through electroencephalography (EEG) or other monitoring methods, reflects the degree of synchronization between brain regions corresponding to different channels. For each channel, its average synchronization index with other channels, or the synchronization index of a specific functional network to which it belongs, can be extracted. The synchronization index can be the coherence coefficient, phase lock value, or mutual information value. The synchronization index of each channel is concatenated with the frequency deviation value to form a two-dimensional feature vector. For example, the feature vector of channel i is [deviation_i, synchronization_i]. For all channels, this constitutes a set of feature vectors.
[0070] Step S303: Using the feature vector as input, the support vector machine algorithm is used to perform classification training on each channel to obtain the classification result.
[0071] Support Vector Machines (SVMs) are a type of binary classifier. A subset of channels are pre-labeled as training samples, labeled as "frequency-matched" or "frequency-mismatched." During training, the SVM finds a hyperplane that maximizes the separation of the two classes. For unlabeled channels, their feature vectors are input, and the SVM outputs the class. The classification result is a Boolean value indicating whether the channel has a frequency mismatch.
[0072] Step S304: Based on the channels identified as having frequency mismatches in the classification results, determine the set of channels for which the time sequence coordination parameters need to be adjusted.
[0073] It should be understood that only channels identified as having a "frequency mismatch" require adjustment. The identifiers of these channels constitute the set of channels requiring adjustment. The goal of the adjustment is to reduce their frequency deviation, thereby improving synchronization.
[0074] Step S305: Calculate the corresponding time sequence parameter adjustment amount based on the frequency deviation value of each channel in the channel set.
[0075] The adjustment amount of the timing sequence parameter reflects the need to compensate for the frequency mismatch by changing the trigger delay. An empirical model can be established: the larger the frequency deviation, the larger the time offset that needs to be adjusted.
[0076] Step S306: Correct the time sequence coordination parameter of each channel in the channel set according to the time sequence parameter adjustment amount, and use the corrected time sequence coordination parameter as the correction sequence of the frequency coordination parameter.
[0077] For each channel requiring adjustment, the original time sequence parameter is increased by the adjustment amount Δτ to obtain the new time sequence parameter. The corrected time sequence parameters of all channels are arranged in channel order to form a correction sequence. This sequence will serve as the initial point for subsequent gradient descent algorithms.
[0078] For example, there are 10 channels. The baseline value is 2.1 bits, and the actual frequencies are: 10.2, 9.8, 10.1, 9.7, 10.5, 9.9, 10.0, 10.3, 9.6, 10.4 Hz. The bias vectors are: 0.1, -0.3, 0.0, -0.4, 0.4, -0.2, -0.1, 0.2, -0.5, 0.3. The synchronization indices are: 0.75, 0.68, 0.72, 0.65, 0.70, 0.71, 0.69, 0.73, 0.64, 0.72. After training the support vector machine, channels 2, 4, 5, and 9 are determined to be frequency mismatched. With k = 5 milliseconds per hertz, the adjustments are as follows: Channel 2: -1.5 milliseconds, Channel 4: -2.0 milliseconds, Channel 5: +2.0 milliseconds, Channel 9: -2.5 milliseconds. The original time sequence parameters are: Channel 1 0 milliseconds, Channel 2 5 milliseconds, Channel 3 10 milliseconds, Channel 4 15 milliseconds, Channel 5 20 milliseconds, Channel 6 25 milliseconds, Channel 7 30 milliseconds, Channel 8 35 milliseconds, Channel 9 40 milliseconds, Channel 10 45 milliseconds. After correction: Channel 2 becomes 3.5 milliseconds, Channel 4 becomes 13 milliseconds, Channel 5 becomes 22 milliseconds, and Channel 9 becomes 37.5 milliseconds. The corrected sequence is a list of these new parameters.
[0079] As one implementation, step S303 includes:
[0080] Arrange the feature vectors of each channel in channel order to construct a feature matrix;
[0081] Set the kernel function of the support vector machine to the radial basis kernel function;
[0082] The optimal values of the kernel parameters and penalty parameters of the radial basis kernel function are determined by cross-validation.
[0083] Based on the optimal value, the feature matrix is trained for classification to obtain a classification hyperplane;
[0084] The classification hyperplane determines the category of each channel, which includes frequency matching and non-matching, and generates a classification result.
[0085] In the specific implementation, the feature vector of each channel is two-dimensional or higher-dimensional. The feature vectors of all channels are stacked row by row to form a matrix. The number of rows is the number of channels, and the number of columns is the feature dimension. For example, for 10 channels, each channel has 2 features, then the feature matrix is a 10-row, 2-column matrix.
[0086] Radial basis function (RBF) kernels can map inputs to an infinite-dimensional space, handling nonlinear classification problems. In transcranial magnetic stimulation (TMS) scenarios, the relationship between frequency deviation and synchronization may be nonlinear, making RBF kernels a suitable choice.
[0087] The kernel parameter γ and the penalty parameter C have a significant impact on the performance of support vector machines. Cross-validation divides the training data into K parts, using K-1 parts for training and 1 part for validation alternately, and calculates the average classification accuracy. Among multiple parameter combinations (e.g., γ=0.01, 0.1, 1; C=1, 10, 100), the combination with the highest accuracy is selected as the optimal parameters. Typically, 5-fold or 10-fold cross-validation is used.
[0088] Using optimal γ and C, a support vector machine is trained on the entire training feature matrix. After training, the weight vector w and bias b of the classification hyperplane are obtained. For a new sample x, the decision function is f(x) = sign(w·φ(x) + b), where φ is the implicit mapping of the radial basis kernel function.
[0089] The feature vector of each channel is substituted into the decision function. If the output is positive, it is considered a match; if it is negative, it is considered a mismatch. This yields the class label for each channel.
[0090] For example, the feature matrix for 32 channels is 32 rows and 2 columns. The radial basis function kernel is set with candidate values for γ [0.01, 0.1, 1] and candidate values for C [1, 10, 100]. 10-fold cross-validation results show that the average accuracy is 92% when γ=0.1 and C=10. The entire feature matrix is trained using these parameters to obtain the classification hyperplane. The feature vectors of the 32 channels are input one by one, and the classification results are output: 8 channels are judged as mismatches, and the remaining 24 are matches.
[0091] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S40 may include steps S401 to S405:
[0092] Step S401: Extract the frequency coordination parameters to be optimized for each channel from the corrected sequence and use them as the initial variables for the gradient descent algorithm.
[0093] It should be noted that the correction sequence includes the adjusted time sequence parameters or frequency parameters for each channel. These parameters are used as optimization variables, denoted as θ = (θ1, θ2, ..., θn), where n is the number of parameters to be optimized. The initial values are those given by the correction sequence.
[0094] Step S402: Using the negative value of the inter-channel synchronization index as the loss function, the gradient descent algorithm is used to calculate the gradient of the loss function with respect to each frequency coordination parameter to be optimized.
[0095] Let the objective be to maximize the synchronicity exponent S(θ), then the loss function is L(θ) = -S(θ). The gradient is ∇L = (∂L / ∂θ1, ∂L / ∂θ2, ...). The gradient can be calculated using numerical differentiation or analytical methods.
[0096] Step S403: Update the frequency coordination parameters to be optimized along the gradient descent direction according to the preset learning rate.
[0097] It should be noted that transcranial magnetic stimulation is a real-time dynamic control process that requires parameter optimization and output of control commands within seconds. Therefore, the preset learning rate cannot be too small: an excessively small learning rate will lead to a surge in the number of iterations, which will not meet the real-time requirements of clinical practice. Under the premise of ensuring stability, the maximum feasible learning rate should be selected to control the number of iterations within the preset maximum number (500 times in the document), and convergence should be completed within 50-100 times.
[0098] Step S404: Repeat the steps of calculating the gradient and updating the frequency coordination parameters to be optimized until the value of the loss function converges, then stop the iteration and obtain the optimized frequency coordination parameters.
[0099] After each iteration, calculate the new synchronization S(θ_new) and loss L(θ_new). Stop when the change in L is less than a preset threshold, or the gradient magnitude is less than the threshold, or the maximum number of iterations is reached.
[0100] Step S405: Generate an activity synchronization update scheme based on the optimized frequency coordination parameters.
[0101] The update scheme is a parameter table containing the optimal frequency or temporal sequence parameters for each channel. These parameters can be directly applied to achieve a high degree of synchronization in brain region activity stimulated by each channel.
[0102] For example, the temporal sequence parameters of three channels need to be optimized, with initial values of 3.5 ms, 13 ms, and 22 ms. The loss function is a negative synchronicity exponent, calculated using the EEG coherence coefficient. The learning rate α = 0.1. In the first iteration, the gradient is calculated, yielding [-0.2, -0.5, -0.3]. Updates: θ1 = 3.5 - 0.1 * (-0.2) = 3.52, θ2 = 13 - 0.1 * (-0.5) = 13.05, θ3 = 22 - 0.1 * (-0.3) = 22.03. Synchronicity improves from 0.72 to 0.74. Continuing the iteration, after 30 iterations, the change in the loss function value is less than 0.0001, indicating convergence. Final parameters: 3.8 ms, 14.2 ms, and 23.1 ms, with a synchronicity of 0.89. This is used as the activity synchronization update scheme.
[0103] In one implementation, step S404 includes:
[0104] Record the current iteration number and the current loss function value;
[0105] Calculate the difference between the current loss function value and the loss function value of the previous iteration;
[0106] When the absolute value of the difference is less than a preset convergence threshold, the loss function value is determined to be converged.
[0107] When the number of iterations reaches the preset maximum number of iterations, the iteration is terminated and the current frequency coordination parameter is taken as the optimized frequency coordination parameter.
[0108] In the specific implementation, at the beginning of each iteration, the current iteration count k and the loss function value L_k are recorded. Initially, k=0.
[0109] When k≥1, calculate ΔL = |L_k - L_{k-1}|, and this difference reflects the magnitude of the decrease in the loss function.
[0110] The preset convergence threshold is a very small number. If ΔL < the preset convergence threshold, the loss function is considered to have stabilized, and further iterations will not provide significant improvement, so the process can be stopped. It should be noted that transcranial magnetic stimulation (TMS) is a real-time dynamic control process, and parameter optimization must be completed during the patient preparation phase (within seconds to minutes). A preset convergence threshold that is too small will lead to a surge in iterations / training rounds, failing to meet the time requirements of clinical procedures. Therefore, the maximum feasible preset convergence threshold should be selected while ensuring parameter accuracy, keeping the optimization time within a clinically acceptable range.
[0111] It should be noted that transcranial magnetic stimulation (TMS) is a clinical treatment procedure, and there are strict regulations regarding patient preparation time and the duration of a single treatment session. The parameter optimization process must not interrupt the clinical workflow: the maximum number of iterations must ensure that optimization is completed within a clinically acceptable timeframe for over 99% of normal cases to avoid prolonged patient waiting or treatment interruption; furthermore, sufficient time must be reserved for device response, command transmission, and security checks, and the total optimization time must not exceed the clinically preset upper limit for single-patient preparation time. For example, to prevent infinite loops or prolonged operation due to a very small gradient that has not reached the threshold, a maximum number of iterations, such as 1000 or 500, is set to forcibly terminate the process, and the current parameters are taken as the optimization result.
[0112] For example, the preset convergence threshold is 0.0001, and the maximum number of iterations is 500. In the 45th iteration, the loss value L = 0.02345; in the 46th iteration, L = 0.02342; the difference ΔL = 0.00003, which is less than 0.0001, indicating convergence, and the process terminates at the 46th iteration. In another training iteration, if the difference is still greater than the threshold at the 500th iteration, the process terminates after reaching the maximum number of iterations, and the result of the 500th iteration is taken.
[0113] In one implementation, step S50 includes steps S501 to S505:
[0114] Step S501: Arrange the time sequence parameters into a time series matrix according to the channel order.
[0115] The time sequence parameter describes the relative timing of each channel's pulse trigger. To input into a recurrent neural network, a time series matrix is constructed, where each row represents a time step and each column represents a channel. For example, with a step size of 1 millisecond, a matrix of length equal to the maximum delay time is constructed. At each time step, if a channel triggers at that moment, the corresponding element in the matrix is 1; otherwise, it is 0. Alternatively, the trigger times can be encoded as a continuous numerical sequence.
[0116] Step S502: Use the synchronization index in the activity synchronization update scheme as a monitoring signal.
[0117] The activity synchronization update scheme is a synchronization index obtained under parameter configuration after gradient descent optimization. These synchronization indices (e.g., the coherence coefficient between each pair of brain regions) are used as output supervision signals to train the neural network to learn the mapping from temporal parameters to brain network interaction patterns.
[0118] Step S503: Use a long short-term memory network as the neural network algorithm, take the time series matrix as input and the supervision signal as the output target to construct a neural network model.
[0119] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network that effectively handles long-term dependencies in time-series data. The number of nodes in the input layer equals the number of channels, the hidden layers contain several LSTM units, and the number of nodes in the output layer equals the number of interactions to be predicted (e.g., the number of node pairs). The loss function is mean squared error.
[0120] Step S504: Train the neural network model using the backpropagation algorithm, update the network weights of the neural network model, and obtain the trained network weights.
[0121] The backpropagation algorithm propagates the output error from the output layer back to each layer, updates the weights using gradient descent, and employs the Adam optimizer, among other methods. During training, the output is calculated forward in each iteration, the loss is calculated, and the weights are updated via backpropagation. This process is repeated until the loss converges.
[0122] Step S505: Extract weight values representing the interaction strength between channels from the trained network weights, and organize the weight values into a connection weight matrix according to channel pairs, as a new mapping structure of brain network interaction relationships.
[0123] In LSTM networks, the weight matrices of the input or forget gates can reflect the importance of input features at different time steps to some extent. However, a more direct approach is to use the network output (predicted synchronicity index) of all samples as a new mapping structure after training, or to calculate the correlation using the activation values of the intermediate layers of the network. The trained network can be viewed as a function, with time-series parameters as input and the predicted synchronicity matrix as output, i.e., the new mapping structure, where each element represents the interaction strength between corresponding channel pairs.
[0124] For example, the time series matrix is 100 time steps multiplied by 32 channels, where the trigger time of each channel is encoded as a pulse sequence. The synchronization supervision signal is a 32×32 coherence coefficient matrix with 496 upper triangular elements. An LSTM network is constructed with 32 input layers, 64 hidden LSTM units, and 496 neurons in the output layer, using a linear activation function. The Adam optimizer is used with a learning rate of 0.001 for 500 training epochs. After training, the loss decreases to 0.01. The network's output to the validation set samples is extracted to obtain the predicted interaction intensity matrix, which is used as the new mapping structure.
[0125] In one implementation, step S504 includes:
[0126] Initialize the weight parameters of the forget gate, input gate, and output gate of the Long Short-Term Memory network;
[0127] The time series matrix is input into the Long Short-Term Memory network step by step, and the hidden state of each time step is calculated forward.
[0128] Calculate the loss value based on the difference between the hidden state and the monitoring signal;
[0129] The gradient of the loss value is propagated backward along time to update the weight parameters of the forget gate, input gate, and output gate;
[0130] Repeat the process of forward computation, loss calculation, and gradient backpropagation to update weights until the loss value converges, and obtain the trained network weights.
[0131] An LSTM unit contains three gates: the forget gate determines which information is discarded from the previous time step, the input gate determines which information is updated in the current input, and the output gate determines which information is output. The weight matrices and bias terms of these gates need to be randomly initialized using uniformly distributed or normally distributed small random numbers.
[0132] At each time step t, the input x_t is combined with the hidden state h_{t-1} and cell state c_{t-1} from the previous time step. Following the forward propagation formula of the LSTM, the forget gate, input gate, candidate cell state, updated cell state, output gate, and current hidden state are calculated sequentially. The final output is either the hidden state of the last time step or a summary of the hidden states from all time steps. The final hidden state is then mapped to the output dimension through a fully connected layer to obtain the predicted value. Furthermore, the mean squared error is used to calculate the loss value.
[0133] The gradient is calculated backwards in time using the backpropagation algorithm, and all gating weights are updated using gradient descent. Since gradients may explode or vanish, gradient clipping is employed.
[0134] Repeatedly iterate, monitoring the loss value after each iteration, and stop training when the loss value decreases slowly or reaches the preset number of rounds.
[0135] For example, the LSTM network has 2 layers and 128 hidden units. The weights are initialized with a normal distribution with a mean of 0 and a variance of 0.01. 32 channels of data from 100 time steps are input sequentially. Forward propagation yields a prediction synchronization matrix of 496 values, with a mean squared error of 0.15 calculated between this matrix and the true coherence coefficient. Backpropagation calculates the gradient, and the Adam optimizer is used to update the weights. After 200 iterations, the loss decreases to 0.02, and training stops. The network's weight parameters are saved for subsequent predictions.
[0136] This application also provides a multi-channel collaborative control system for a transcranial magnetic stimulation device, the system comprising: a multi-channel data acquisition module, a brain-network interaction benchmark mapping module, a coordination parameter correction module, a correction sequence optimization module, a brain-network new structure fusion module, and a final parameter and command output module;
[0137] The multi-channel data acquisition module is used to acquire initial frequency parameters and time sequence parameters of multiple channels from the transcranial magnetic stimulation device;
[0138] The brain-network interaction benchmark mapping module is used to map the brain interaction relationship corresponding to the initial frequency parameters and the time sequence parameters based on a preset brain network model, and generate channel frequency coordination benchmark values.
[0139] The coordination parameter correction module is used to process the channel frequency coordination reference value and active synchronization data through a support vector machine algorithm to determine the correction sequence of the frequency coordination parameters;
[0140] The corrected sequence optimization module is used to optimize the corrected sequence using a gradient descent algorithm to obtain an activity synchronization update scheme.
[0141] A new brain network structure fusion module is used to fuse the time sequence parameters and the activity synchronization update scheme based on a neural network algorithm to obtain a new mapping structure of brain network interaction relationships.
[0142] The final parameter and instruction output module is used to output the final parameter set for overall brain optimization based on the new mapping structure, and to generate multi-channel collaborative control instructions for the transcranial magnetic stimulation device.
[0143] The multi-channel collaborative control system for transcranial magnetic stimulation (TMS) provided in this application employs the multi-channel collaborative control method for TMS in the above embodiments. This solves the technical problem that existing technologies often limit stimulation to a single region, neglecting the complex interactions between different brain regions. Compared to existing technologies, the beneficial effects of the multi-channel collaborative control system for TMS provided in this application are the same as those of the multi-channel collaborative control method for TMS provided in the above embodiments. Furthermore, other technical features in the multi-channel collaborative control system for TMS are the same as those disclosed in the methods of the above embodiments, and will not be elaborated upon here.
[0144] It should be noted that, in this document, the terms "comprising," "including," and any other variations 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 a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the technical solutions of this application. These examples are only intended to help understand the methods and core ideas of this application. The above descriptions are merely preferred embodiments of this application. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the concept and technical solutions of this application to other situations without modification, should all be considered within the scope of protection of this application.
Claims
1. A multi-channel coordinated control method for a transcranial magnetic stimulation (TMS) device, characterized in that, include: Initial frequency parameters and time sequence parameters of multiple channels are obtained from the transcranial magnetic stimulation device; Based on a preset brain network model, the brain interaction relationship corresponding to the initial frequency parameters and the time sequence parameters is mapped to generate a channel frequency coordination benchmark value. The channel frequency coordination reference value and active synchronization data are processed by the support vector machine algorithm to determine the correction sequence of the frequency coordination parameters; The correction sequence is optimized using the gradient descent algorithm to obtain an activity synchronization update scheme. A new mapping structure of brain network interaction is obtained by fusing the time sequence parameters with the activity synchronization update scheme based on a neural network algorithm. The new mapping structure outputs the final set of parameters for overall brain optimization and generates multi-channel collaborative control commands for the transcranial magnetic stimulation device.
2. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 1, characterized in that, The process of mapping the brain interaction relationships corresponding to the initial frequency parameters and the time sequence parameters based on a preset brain network model to generate channel frequency coordination benchmark values includes: Based on the brain region nodes in the preset brain network model, the initial frequency parameters of each channel are mapped to the corresponding brain region nodes; Frequency domain analysis was performed on the initial frequency parameters of each brain region node to extract the dominant frequency component of each node; The Granger causality analysis algorithm was used to process the time sequence parameters and calculate the causal influence values between nodes in each brain region. Based on the dominant frequency component and the causal influence value, a directed graph of brain interaction is constructed, wherein the topology of the directed graph conforms to the connection constraints of the preset brain network model. The mutual information algorithm is used to quantify the frequency synchronization between nodes in the directed graph, and the statistical results of the mutual information values are used as the reference values for channel frequency coordination.
3. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 2, characterized in that, The initial frequency parameters of each brain region node are analyzed in the frequency domain to extract the dominant frequency component of each node, including: Arrange the initial frequency parameters corresponding to each brain region node into a time series in chronological order; The time series was converted to the frequency domain using a fast Fourier transform to obtain the power spectral density distribution; The frequency corresponding to the peak frequency is identified from the power spectral density distribution and used as the dominant frequency component of the brain region node to obtain the dominant frequency component of each brain region node.
4. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 1, characterized in that, The step of processing the channel frequency coordination reference value and active synchronization data using a support vector machine algorithm to determine the correction sequence of frequency coordination parameters includes: The channel frequency coordination reference value is compared with the actual frequency parameters of each channel to calculate the frequency deviation value of each channel, and a frequency deviation vector is constructed based on the frequency deviation value. The synchronization index of each channel is extracted from the activity synchronization data and combined with the frequency deviation vector to form a feature vector; Using the feature vectors as input, a support vector machine algorithm is used to perform classification training on each channel to obtain the classification results; Based on the channels identified as having frequency mismatches in the classification results, determine the set of channels for which the time sequence coordination parameters need to be adjusted; Calculate the corresponding time sequence parameter adjustment based on the frequency deviation value of each channel in the channel set; The time sequence coordination parameter of each channel in the channel set is corrected according to the time sequence parameter adjustment amount, and the corrected time sequence coordination parameter is used as the correction sequence of the frequency coordination parameter.
5. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 4, characterized in that, The process of using the feature vector as input and employing a support vector machine algorithm to perform classification training on each channel to obtain classification results includes: Arrange the feature vectors of each channel in channel order to construct a feature matrix; Set the kernel function of the support vector machine to the radial basis kernel function; The optimal values of the kernel parameters and penalty parameters of the radial basis kernel function are determined by cross-validation. Based on the optimal value, the feature matrix is trained for classification to obtain a classification hyperplane; The classification hyperplane determines the category of each channel, which includes frequency matching and non-matching, and generates a classification result.
6. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 1, characterized in that, The step of optimizing the corrected sequence using the gradient descent algorithm to obtain an activity synchronization update scheme includes: The frequency coordination parameters to be optimized for each channel are parsed from the corrected sequence and used as the initial variables for the gradient descent algorithm. Using the negative value of the inter-channel synchronization index as the loss function, the gradient of the loss function with respect to each frequency coordination parameter to be optimized is calculated using the gradient descent algorithm. The frequency coordination parameter to be optimized is updated along the gradient descent direction according to the preset learning rate. Repeat the steps of calculating the gradient and updating the frequency coordination parameters to be optimized until the value of the loss function converges, then stop the iteration and obtain the optimized frequency coordination parameters. An activity synchronization update scheme is generated based on the optimized frequency coordination parameters.
7. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 6, characterized in that, The step of repeatedly calculating the gradient and updating the frequency coordination parameter to be optimized until the value of the loss function converges includes: Record the current iteration number and the current loss function value; Calculate the difference between the current loss function value and the loss function value of the previous iteration; When the absolute value of the difference is less than a preset convergence threshold, the loss function value is determined to be converged. When the number of iterations reaches the preset maximum number of iterations, the iteration is terminated and the current frequency coordination parameter is taken as the optimized frequency coordination parameter.
8. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 1, characterized in that, The method of fusing the temporal sequence parameters with the activity synchronization update scheme based on a neural network algorithm to obtain a new mapping structure of brain network interaction relationships includes: Arrange the time sequence parameters into a time series matrix according to channel order; The synchronization index in the activity synchronization update scheme is used as a monitoring signal; A neural network model is constructed by using a long short-term memory network as the neural network algorithm, with the time series matrix as the input and the supervision signal as the output target. The neural network model is trained using the backpropagation algorithm, and the network weights of the neural network model are updated to obtain the trained network weights. The weight values representing the intensity of interaction between channels are extracted from the trained network weights, and the weight values are organized into a connection weight matrix according to channel pairs, which serves as a new mapping structure for brain network interaction relationships.
9. The multi-channel coordinated control method for a transcranial magnetic stimulation device according to claim 8, characterized in that, The process of training the neural network model using the backpropagation algorithm, updating the network weights of the neural network model, and obtaining the trained network weights includes: Initialize the weight parameters of the forget gate, input gate, and output gate of the Long Short-Term Memory network; The time series matrix is input into the Long Short-Term Memory network step by step, and the hidden state of each time step is calculated forward. Calculate the loss value based on the difference between the hidden state and the monitoring signal; The gradient of the loss value is propagated backward along time to update the weight parameters of the forget gate, input gate, and output gate; Repeat the process of forward computation, loss calculation, and gradient backpropagation to update weights until the loss value converges, and obtain the trained network weights.
10. A multi-channel collaborative control system for a transcranial magnetic stimulation (TMS) device, characterized in that, include: A multi-channel data acquisition module is used to acquire initial frequency parameters and time sequence parameters of multiple channels from a transcranial magnetic stimulation device; The brain-network interaction benchmark mapping module is used to map the brain interaction relationship corresponding to the initial frequency parameters and the time sequence parameters based on a preset brain network model, and generate channel frequency coordination benchmark values. The coordination parameter correction module is used to process the channel frequency coordination reference value and active synchronization data through a support vector machine algorithm to determine the correction sequence of the frequency coordination parameters; The corrected sequence optimization module is used to optimize the corrected sequence using a gradient descent algorithm to obtain an activity synchronization update scheme. A new brain network structure fusion module is used to fuse the time sequence parameters and the activity synchronization update scheme based on a neural network algorithm to obtain a new mapping structure of brain network interaction relationships. The final parameter and instruction output module is used to output the final parameter set for overall brain optimization based on the new mapping structure, and to generate multi-channel collaborative control instructions for the transcranial magnetic stimulation device.