A transcranial magnetic stimulation system, method and magnetic therapy instrument

CN122516539APending Publication Date: 2026-08-07HANGZHOU CIXIAOTANG SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU CIXIAOTANG SCI & TECH CO LTD
Filing Date
2026-04-17
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]首先,传统TMS多采用单线圈或简单双线圈设计,其产生的感应电场在脑内的分布范围较宽、空间分辨率不高,且易受头皮-颅骨-脑组织界面的电磁特性影响,尽管有研究引入导航系统辅助线圈定位,但多数仍依赖操作者经验手动调整,无法在三维空间内对电场方向、深度和聚焦形状进行实时电子化调控,导致刺激目标脑区的准确性与一致性难以保证

Benefits of technology

[0032]1、系统采用多个独立控制的线圈组合成一个立体阵列,通过协调各线圈的电流,可以在大脑内部“合成”出一个方向、深度和范围都可控的聚焦电场,再结合根据用户个人大脑结构建立的动态模型,系统能够实时计算并显示刺激效果,不用物理移动设备就能灵活调节刺激的位置和方向,从而实现了更精准、可控的大脑刺激。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122516539A_ABST
    Figure CN122516539A_ABST
Patent Text Reader

Abstract

The present disclosure provides a transcranial magnetic stimulation system, method and magnetic therapy instrument, the system comprises a transcranial magnetic stimulation coil module for generating a pulsed magnetic field, a pulse generation and control module for providing driving current for the transcranial magnetic stimulation coil module, an individual brain model construction and processing module, a biological signal synchronous acquisition and closed-loop feedback module, and a navigation positioning module for positioning the stimulation target: the system adopts a plurality of independently controlled coils to form a three-dimensional array, by coordinating the current of each coil, a focused electric field with controllable direction, depth and range can be "synthesized" inside the brain, combined with the dynamic model established according to the individual brain structure of the user, the system can calculate and display the stimulation effect in real time, without physically moving the device, the position and direction of the stimulation can be flexibly adjusted, so that more accurate and controllable brain stimulation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual relates to the field of transcranial magnetic stimulation technology, and in particular to a transcranial magnetic stimulation system, method and magnetic therapy device. Background Technology

[0002] Transcranial magnetic stimulation (TMS) is a non-invasive neuromodulation technique that uses a coil placed on the scalp to generate a pulsed magnetic field, which in turn induces an electric field in the cerebral cortex and affects neuronal activity. This technique has been widely used in the research and treatment of various neurological diseases such as depression, anxiety, post-stroke rehabilitation, and chronic pain, and has shown great potential for clinical application.

[0003] However, in the actual promotion and precision treatment process, the existing TMS technology still has the following problems:

[0004] First, traditional TMS often uses a single-coil or simple dual-coil design, which results in a wide distribution range of the induced electric field in the brain with low spatial resolution. It is also easily affected by the electromagnetic properties of the scalp-skull-brain tissue interface. Although some studies have introduced navigation systems to assist in coil positioning, most still rely on manual adjustment based on the operator's experience. It is impossible to electronically control the direction, depth, and focusing shape of the electric field in three-dimensional space in real time, which makes it difficult to guarantee the accuracy and consistency of stimulating the target brain region.

[0005] Secondly, existing systems typically plan stimulation based on population average brain models or standard brain templates, without fully considering the differences in brain anatomy, tissue conductivity, and white matter fiber orientation among individuals. Furthermore, there is a lack of a mechanism for sensing and responding to the patient's real-time neurological state during treatment, and stimulation parameters are often fixed in a single treatment session, making it difficult to dynamically adjust based on the brain's immediate feedback, which affects the accuracy and effectiveness of the treatment.

[0006] Finally, in traditional TMS devices, modules such as stimulation generation, navigation and positioning, and neural signal acquisition are often separate, resulting in weak information coordination capabilities and the lack of universally achieved true closed-loop control. Although some studies have attempted to acquire neural signals such as EEG during stimulation intervals, the large electromagnetic interference and difficulty in signal extraction have prevented the formation of a stable and reliable real-time feedback pathway, thus hindering the development of TMS towards adaptive and intelligent treatment. Summary of the Invention

[0007] This specification provides one or more embodiments of a transcranial magnetic stimulation (TMS) system, the system comprising a TMS coil module for generating a pulsed magnetic field, a pulse generation and control module for providing driving current to the TMS coil module, a personalized brain model construction and processing module, a biological signal synchronous acquisition and closed-loop feedback module, and a navigation and positioning module for locating stimulation targets.

[0008] The transcranial magnetic stimulation coil module is a three-dimensional coil array containing at least three independent driving coil units. The spatial arrangement of each driving coil unit enables the pulsed magnetic field generated by it to couple in three-dimensional space to form a synthetic induced electric field with a predetermined direction and focusing characteristics.

[0009] The personalized brain model construction and processing module is used to integrate the user's individual brain imaging data, the real-time spatial pose data obtained by the navigation and positioning module, and the real-time scalp and brain tissue impedance data, dynamically calculate and visualize the real-time electric field distribution generated in the brain by the three-dimensional coil array under the current pose.

[0010] The pulse generation and control module is configured to execute a synchronous multi-channel stimulation protocol. Based on the real-time electric field distribution calculated by the individualized brain model construction and processing module, it independently and collaboratively electronically modulates the timing, phase, and intensity parameters of the stimulation pulses of each coil unit in the three-dimensional coil array to achieve non-mechanical dynamic adjustment of the focusing depth, spatial range, and vector direction of the synthetic induced electric field and target tracking.

[0011] The biosignal synchronous acquisition and closed-loop feedback module is used to acquire and process neural response features during the interval of applying stimulation pulses, and feed the extracted neural response features back to the pulse generation and control module to adaptively adjust the parameters of the synchronous multi-channel stimulation protocol, thereby forming a real-time closed-loop regulation of the neural circuit state.

[0012] In some embodiments, the navigation and positioning module includes a spatial pose acquisition unit and a physiological parameter sensing unit;

[0013] The spatial pose acquisition unit acquires six-degree-of-freedom spatial pose data of the coil module relative to the user's head in real time by using optical markers set on the user's head and the transcranial magnetic stimulation coil module.

[0014] The physiological parameter sensing unit is used to measure the impedance distribution data of the scalp and intracranial tissues in real time.

[0015] In some embodiments, the driving coil unit of the three-dimensional coil array adopts an integrated packaging structure of magnetic core and thermally conductive composite material, and the pulse generation and control module integrates a distributed temperature monitoring and dynamic power adjustment unit, which can independently compensate the current waveform of each driving coil unit according to real-time temperature data to maintain the stability of stimulation output and ensure safety.

[0016] In some embodiments, the personalized brain model construction and processing module uses a deep learning network to perform fully automatic tissue segmentation of the user's brain images and integrates diffusion tensor imaging data to construct a personalized electromagnetic model containing the orientation of white matter fibers. The dynamic calculation is based on this model and real-time spatial pose data, and solves Maxwell's equations in real time using a GPU-accelerated finite element method to achieve millisecond-level updates and visualization of the induced electric field distribution.

[0017] In some embodiments, the synchronous multi-channel stimulation protocol executed by the pulse generation and control module is parameter-tuned based on a closed-loop optimization controller.

[0018] The closed-loop optimization controller takes the deviation between the real-time electric field distribution calculated by the individualized brain model construction and processing module and the preset target electric field distribution, as well as the neural response features extracted by the biological signal synchronous acquisition and closed-loop feedback module, as joint inputs. It then uses a model predictive control algorithm to solve for the optimal stimulation parameter sequence of each driving coil unit that minimizes the joint loss function.

[0019] In some embodiments, the biosignal synchronous acquisition and closed-loop feedback module is specifically used to acquire electroencephalogram signals induced by magnetic stimulation during the stimulation pulse interval, and extract specific frequency band neural oscillation energy or cross-brain region coherence with stimulation lock-in through phase-locked amplification and blind source separation technology as response features characterizing the state of neural circuits.

[0020] In some embodiments, the system further includes a treatment effect prediction and parameter recommendation unit;

[0021] This unit trains a machine learning prediction model based on individualized brain models of historical patients, the stimulation parameters implemented, and the final clinical efficacy data, which is used to recommend initial stimulation targets and stimulation protocol parameters for new patients.

[0022] This specification provides one or more embodiments of a transcranial magnetic stimulation method, implemented using the aforementioned transcranial magnetic stimulation system, comprising the following steps:

[0023] S1. Obtain individual brain imaging data, construct an individualized brain electromagnetic model including the distribution of brain tissue conductivity, and set the target stimulation area and electric field distribution based on the treatment goal.

[0024] S2. By integrating the navigation and positioning module into the wearable magnetic therapy device, the spatial pose of the three-dimensional coil array on the wearable transcranial magnetic stimulation device relative to the user's head is tracked in real time.

[0025] Meanwhile, based on the individualized brain electromagnetic model and the real-time acquired scalp and intracranial tissue impedance data, the distribution of the real-time induced electric field generated in the brain by the three-dimensional coil array under the current pose is dynamically simulated and calculated.

[0026] S3. Based on the difference between the real-time electric field distribution and the desired electric field distribution, the pulse generation and control module integrated into the wearable magnetic therapy device generates a synchronous multi-channel stimulation protocol to drive at least three spatially arranged coil units to generate coupled synthetic induced electric fields.

[0027] S4. During the interval between the application of stimulation pulses, the neurophysiological signals induced by magnetic stimulation are collected by the biosignal synchronous acquisition module integrated into the wearable magnetic therapy device, and the neural response features characterizing the changes in the state of the neural circuit are extracted.

[0028] S5. Based on the degree of conformity between the neural response characteristics and the treatment target, adaptively adjust the stimulation protocol parameters for the next cycle;

[0029] S6. Repeat steps S2 to S5 to form a closed-loop treatment until the course of treatment is completed.

[0030] This specification provides one or more embodiments of a magnetic therapy device, which includes the transcranial magnetic stimulation system described above. The magnetic therapy device also includes a flexible electronic headband, an integrated power supply, and a management module. The transcranial magnetic stimulation system is highly integrated into a flexible electronic headband, which has an adaptive fit structure and is powered by the integrated power supply and management module.

[0031] Beneficial effects:

[0032] 1. The system uses multiple independently controlled coils combined into a three-dimensional array. By coordinating the current of each coil, a focused electric field with controllable direction, depth and range can be "synthesized" inside the brain. Combined with a dynamic model established based on the user's individual brain structure, the system can calculate and display the stimulation effect in real time. The position and direction of the stimulation can be flexibly adjusted without physical mobile devices, thus achieving more precise and controllable brain stimulation.

[0033] 2. The system integrates each individual's brain scan data, real-time head position, and scalp impedance information to construct a personalized electromagnetic model of the brain. During treatment, the system simulates the electric field distribution inside the brain in real time based on this model and the current coil position, and dynamically adjusts the stimulation parameters of each coil accordingly, optimizing for each individual's unique brain structure and real-time condition.

[0034] 3. During the interval between two stimulations, the system synchronously collects the electrical signals generated by the brain and extracts key features reflecting the state of neural activity. These features are immediately fed back to the control module to automatically adjust the stimulation parameters for the next round. This forms a closed loop. The system automatically optimizes the treatment based on the brain's immediate response, making the regulation more intelligent and more in line with the patient's real-time neural activity state, which helps to improve efficacy and safety. Attached Figure Description

[0035] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. The same numbers in the drawings denote the same structures or steps.

[0036] Figure 1 This is a diagram illustrating the overall system architecture and module interaction based on some embodiments of this specification.

[0037] Figure 2 This is a data flow diagram illustrating the construction of an individualized brain model and pretreatment, based on some embodiments of this specification.

[0038] Figure 3 This is a flowchart of real-time closed-loop control during the treatment process, as shown in some embodiments of this specification.

[0039] Figure 4 This is a schematic diagram of a three-dimensional coil array structure according to some embodiments of this specification.

[0040] Figure 5 This is a schematic diagram of the structure of a wearable magnetic therapy device according to some embodiments of this specification.

[0041] Figure 6 This is a flowchart illustrating the prediction of treatment effects and the recommendation of parameters based on some embodiments of this specification. Detailed Implementation

[0042] To more clearly illustrate the technical solutions of the embodiments in this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the content described below are some examples or embodiments of this specification. For those skilled in the art, without creative effort, the technical solutions or means disclosed in this specification can be applied to other scenarios based on this technical content.

[0043] It should be understood that the terms "system," "device," "unit," and / or "module" used in this specification are a method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.

[0044] Unless otherwise specified, the technical terms used to describe components, elements, etc. in this specification are not singular but may include plural. Generally speaking, terms such as "comprising" or "including" only indicate that explicitly identified steps, elements, or components are included, and these steps, elements, and components do not constitute an exclusive list, as the described method or apparatus may also include other steps or components.

[0045] This specification uses flowcharts to illustrate the operational steps performed by the apparatus or system of related embodiments. However, unless otherwise specified, the order in which these steps are described should not be construed as a limitation on the order of execution. Those skilled in the art can adjust the order of these steps based on the knowledge and information conveyed by the embodiments in this specification. Such adjustments include, but are not limited to, reversing the order of steps, merging multiple steps, and splitting a step.

[0046] Transcranial magnetic stimulation (TMS) is a non-invasive neuromodulation technique that uses a coil placed on the scalp to generate a pulsed magnetic field, which in turn induces an electric field in the cerebral cortex and affects neuronal activity. This technique has been widely used in the research and treatment of various neurological diseases such as depression, anxiety, post-stroke rehabilitation, and chronic pain, and has shown great potential for clinical application.

[0047] However, in the actual promotion and precision treatment process, the existing TMS technology still has the following problems:

[0048] First, traditional TMS often uses a single-coil or simple dual-coil design, which results in a wide distribution range of the induced electric field in the brain with low spatial resolution. It is also easily affected by the electromagnetic properties of the scalp-skull-brain tissue interface. Although some studies have introduced navigation systems to assist in coil positioning, most still rely on manual adjustment based on the operator's experience. It is impossible to electronically control the direction, depth, and focusing shape of the electric field in three-dimensional space in real time, which makes it difficult to guarantee the accuracy and consistency of stimulating the target brain region.

[0049] Secondly, existing systems typically plan stimulation based on population average brain models or standard brain templates, without fully considering the differences in brain anatomy, tissue conductivity, and white matter fiber orientation among individuals. Furthermore, there is a lack of a mechanism for sensing and responding to the patient's real-time neurological state during treatment, and stimulation parameters are often fixed in a single treatment session, making it difficult to dynamically adjust based on the brain's immediate feedback, which affects the accuracy and effectiveness of the treatment.

[0050] Finally, in traditional TMS devices, modules such as stimulation generation, navigation and positioning, and neural signal acquisition are often separate, resulting in weak information coordination capabilities and the lack of universally achieved true closed-loop control. Although some studies have attempted to acquire neural signals such as EEG during stimulation intervals, the large electromagnetic interference and difficulty in signal extraction have prevented the formation of a stable and reliable real-time feedback pathway, thus hindering the development of TMS towards adaptive and intelligent treatment.

[0051] Therefore, some embodiments of this specification propose a transcranial magnetic stimulation method, including the following steps:

[0052] S1. Obtain individual brain imaging data of the user, construct an individualized brain electromagnetic model containing the electrical conductivity distribution of brain tissue through the individualized brain model construction and processing module integrated into the wearable magnetic therapy device, and set the target stimulation target area and electric field distribution based on the treatment goal.

[0053] Specifically, a specialized scan of the user's head is performed using a clinical 3.0 Tesla ultra-high field magnetic resonance scanner. During the scan, high-resolution T1 structural images, diffusion tensor imaging, and magnetic susceptibility weighted imaging data are automatically and sequentially acquired.

[0054] A weak, safe, multi-frequency current is applied to the user's head using electrodes of a multi-band scalp bioelectrical impedance measurement device, and the voltage response on the scalp surface is measured.

[0055] The collected data is input into the magnetic therapy device, specifically including:

[0056] S1.1 The raw DICOM images and EIT data undergo preliminary processing on the edge computing server (removing sensitive information such as facial features and performing rigid registration of each image sequence) to generate an anonymous, standardized data packet;

[0057] Among them, the edge computing server is a server connected to the PACS. Its core is to run the "automated preprocessing pipeline" software. This software automatically monitors the PACS and, when it detects that the image data of the target patient is complete, it automatically triggers all subsequent processing (desensitization, registration, AI segmentation, modeling, and lightweighting) to finally generate a data packet containing the user's magnetic resonance scan data.

[0058] S1.2. Upload the data packets to a secure medical cloud platform using a proprietary medical information security protocol (compliant with HIPAA / GDPR standards);

[0059] The medical cloud platform mainly includes:

[0060] a) Main architecture:

[0061] Hybrid cloud architecture: Adopting a "private cloud + public cloud" model, the private cloud is deployed inside the hospital (or in an IDC with high-speed interconnection with the hospital network) to receive and process sensitive raw DICOM data, ensuring that core data is not published outside the hospital; the public cloud is used to carry user-facing web services, model storage, lightweight computing and device communication, leveraging its elastic scaling advantages.

[0062] Microservice architecture: This approach breaks down the platform into independent services, such as user services, data access services, AI model services, computing task services, and device management services. This facilitates independent development, deployment, and expansion.

[0063] Technology stack: Docker and Kubernetes are used to ensure service environment consistency and high availability; raw images are stored in object storage, structured data (user information, task records) are stored in relational databases, and Redis is used for high-speed caching; RabbitMQ or Kafka is used to handle asynchronous tasks, such as the triggering and status updates of AI modeling tasks.

[0064] b) Core Module:

[0065] Unified Data Access Module: Develops standard API interfaces and DICOM listening services to securely receive patient data packets pushed from the hospital PACS system or edge servers;

[0066] Task scheduling and management module: responsible for receiving modeling requests, distributing them to idle computing nodes (GPU clusters) to execute AI pipelines, and monitoring the entire lifecycle of tasks;

[0067] Device Management and Communication Module: Manages all registered wearable devices, is responsible for device authentication and status monitoring, and establishes a secure two-way communication link (such as based on the MQTT protocol) for sending models and receiving device data;

[0068] c) Automated AI modeling pipeline, mainly including:

[0069] Data preprocessing module: integrates automated desensitization algorithms (such as facial blurring) and multimodal image rigid / non-rigid registration algorithms;

[0070] AI Models: Encapsulate trained deep learning models (such as 3D U-Net for tissue segmentation, and algorithms like TrackVis for fiber bundle tracking) into callable microservices;

[0071] Finite element calculation engine: The electromagnetic field calculation process based on toolchains such as FEniCS and SimNIBS is scripted and parallelized, and deployed on cloud GPU clusters;

[0072] Model Lightweighting and Formatting Module: Develop conversion programs to transform large finite element mesh models into proprietary lightweight format files containing key nodes, transfer matrices, and metadata;

[0073] S1.3 The cloud platform calls the deployed AI automated modeling pipeline to perform resource-intensive tissue segmentation, fiber bundle tracking and finite element mesh generation, and finally builds a complete "digital twin brain" model. Then, the model is lightweighted (key parameters are extracted and the mesh is simplified for real-time calculation) to generate a model file for use on the device.

[0074] Among these measures, a dedicated data packet format and communication protocol were developed from the "hospital edge node" to the "cloud" and then to the "device end" to ensure that the model data can be accurately parsed and used.

[0075] S1.4 After the user is authenticated, the wearable magnetic therapy device securely downloads the lightweight, individualized brain model file belonging to the user from the cloud via Wi-Fi or 5G network and loads it into the local "Individualized Brain Model Construction and Processing Module".

[0076] S2. By integrating the navigation and positioning module into the wearable magnetic therapy device, the spatial pose of the three-dimensional coil array on the wearable transcranial magnetic stimulation device relative to the user's head is tracked in real time.

[0077] Meanwhile, based on the individualized brain electromagnetic model and the real-time acquired scalp and intracranial tissue impedance data, the distribution of the real-time induced electric field generated in the brain by the three-dimensional coil array under the current pose is dynamically simulated and calculated.

[0078] Specifically, 4-6 infrared reflective balls are evenly arranged on the outer shell of the magnetic therapy device as marker points, and two or more infrared optical motion capture cameras are installed at fixed positions in the treatment room with a sampling frequency ≥120Hz.

[0079] The camera captures two-dimensional images of the marker points, and the three-dimensional spatial coordinates of the marker points are reconstructed by stereo vision triangulation. Then, the optimal rigid body transformation (rotation matrix R and translation vector T) between the marker point set on the head-mounted device and the known "reference skull marker point set" is calculated in real time using a point set registration algorithm (Kabsch algorithm or iterative nearest point algorithm). This transformation is the six-degree-of-freedom pose of the coil array relative to the skull.

[0080] Real-time electric field simulation based on a pre-computed Green's function library:

[0081] Offline pre-calculation: Before treatment, using the generated individualized finite element model, a "Green's function library" is pre-calculated by solving the complete quasi-static Maxwell's equations. Specifically, each coil element is discretized into multiple small current elements. In the model space, a three-dimensional mesh containing all possible stimulation regions is defined. For each node on the mesh, the electric field vector generated at that node when each current element is supplied with a unit current is calculated. This process is computationally intensive, but only needs to be performed once before treatment.

[0082] Online real-time calculation: The system acquires the current coil's pose rotation matrix R and translation vector T in real time; based on the coil geometry, it determines the actual spatial coordinates and orientation of each current element in the current pose; for the target observation point (all nodes within the target area), it performs trilinear interpolation from the pre-calculated Green's function library based on its coordinates to quickly obtain the contribution of each current element to the electric field at that point; based on the current intensities I1, I2, I3, ... of each coil unit to be output by the pulse generation and control module, it applies the superposition principle: ,in It is the vector of the composite induced electric field at point x. It is the value of the Green's function corresponding to the i-th coil unit at point x. This is the actual drive current of the i-th coil unit; this calculation process is executed entirely in parallel by the GPU.

[0083] S3. Based on the difference between the real-time electric field distribution and the desired electric field distribution, the pulse generation and control module integrated into the wearable magnetic therapy device generates a synchronous multi-channel stimulation protocol to drive at least three spatially arranged coil units to generate coupled synthetic induced electric fields.

[0084] Specifically, the steps for generating a synchronous multi-channel stimulation protocol include:

[0085] a) Mathematical modeling:

[0086] The desired electric field distribution in the target area is discretized into electric field vectors at M target points. ;

[0087] Suppose the system has N independently driven coil units, and the unit current electric field matrix generated by each unit at M target points is A (a 3M×N matrix, directly obtained from the Green's function library).

[0088] Let the driving current of N coil units be an unknown vector I (N×1);

[0089] The problem is transformed into solving a system of linear equations: ;

[0090] b) Optimized solution algorithm:

[0091] Objective function: Design a loss function that incorporates multiple objectives to minimize:

[0092]

[0093] The above formula defines a loss function. The goal is to find a set of coil current vectors I that minimizes the value of this function;

[0094] Where I is the coil current vector to be optimized;

[0095] , These are the regularization coefficients of the system transfer matrix; these two positive numbers are pre-set weight parameters. The value ranges from 0.05 to 0.5. The value ranges from 0.01 to 0.3;

[0096] It is the total variational regularization term;

[0097] The first item: data fidelity, which forces the synthesized electric field to approximate the desired electric field.

[0098] The second term is the energy constraint term (L2 regularization), which prevents excessive current and ensures safety and low power consumption.

[0099] The third term is the total variational regularization term for the whole brain electric field, which is used to smooth the changes in the electric field in non-target areas and reduce unexpected focal points.

[0100] Solver: The solution employs either the alternating direction multiplier method or the fast iterative shrinking threshold algorithm. These algorithms can efficiently handle large-scale optimization problems with regularization terms. The solution runs on a high-performance embedded processor, and each optimization can be completed within 50-100 milliseconds, outputting the optimal current vector. ;

[0101] c) Each current value in the protocol, along with timing parameters such as pulse frequency, pulse width, and pulse length required for treatment, is packaged into a specific synchronous multi-channel stimulation protocol and sent to the pulse drivers of each channel for execution.

[0102] S4. During the interval between the application of stimulation pulses, the neurophysiological signals induced by magnetic stimulation are collected by the biosignal synchronous acquisition module integrated into the wearable magnetic therapy device, and the neural response features characterizing the changes in the state of the neural circuit are extracted.

[0103] Specifically, neural response feature acquisition includes:

[0104] a) Acquisition of highly interference-resistant neural signals:

[0105] The 64-128 channel dry electrode EEG cap is designed to conform to the TMS coil, and there is a millimeter-level magnetic shielding layer and active compensation circuit between the electrode and the coil.

[0106] After the TMS pulse ends, the system has a hardware quiescent period of about 2-3 milliseconds to eliminate saturation, and then starts ultra-high-speed sampling (≥10kHz), with the acquisition window covering 20-300 milliseconds after the pulse to capture the complete TMS induced response;

[0107] b) Neural response feature extraction algorithm:

[0108] Independent component analysis combined with template matching was used to remove artifacts from electrooculography and electrocardiography. An adaptive filter was used to further attenuate the residual electromagnetic artifacts generated by coil attenuation oscillation.

[0109] The signals near the corresponding electrodes in the target area were stimulated multiple times and time-locked to average the amplitude and latency of components such as N15, P30, N45, and P60.

[0110] When TMS pulses act on the cerebral cortex, they directly activate the subcortical neural network, triggering a brief EEG signal sequence that can be recorded from the scalp, namely TMS-EEG. By aligning and averaging the EEG fragments after dozens to hundreds of stimulations according to the stimulation time (i.e., "lock-time averaging"), random background EEG noise can be greatly suppressed, thereby extracting this stable characteristic waveform directly induced by TMS.

[0111] N indicates that the potential is negative, P indicates that the potential is positive, and the number indicates the latency period for the peak to appear. N15 means 15 milliseconds after stimulation, P30 means 30 milliseconds after stimulation, and so on.

[0112] Time-frequency analysis is performed on the single or averaged signals, and wavelet transform is used to calculate the event-related spectrum perturbation or event-related synchronization / desynchronization index in the theta, alpha, beta, and gamma frequency bands;

[0113] Calculate the phase-locked value or weighted phase lag index of EEG signals from the stimulation target area and a pre-defined distant brain region (limbic system) in a specific frequency band, as an indicator of loop connectivity strength;

[0114] S5. Based on the degree of conformity between the neural response characteristics and the treatment target, adaptively adjust the stimulation protocol parameters for the next cycle;

[0115] Specifically, adaptive control algorithms based on reinforcement learning:

[0116] Framework design: The treatment process is modeled as a partially observable Markov decision process;

[0117] State: Composed of the currently extracted neural response feature vector, current stimulus parameters, and the patient's historical response trend;

[0118] Action: Adjust the stimulation parameters for the next cycle, such as ±5% for the current intensity of each coil, fine-tuning the frequency by 0.5Hz, or slightly shifting the electric field focus point by 1mm.

[0119] Reward: Dynamically defined by the treatment goal; for example, if the goal is to enhance prefrontal inhibitory function (manifested as an increase in P60 amplitude), then the reward function is: This means rewarding effective improvements while penalizing excessive parameter changes to ensure stability.

[0120] in, The amplitude (in microvolts) of the extracted P60 evoked potential component during the current treatment cycle. );

[0121] The amplitude of the P60 evoked potential during the previous treatment cycle;

[0122] This is a sign function; it outputs +1 when the input is positive, -1 when the input is negative, and 0 when the input is zero.

[0123] This refers to the amount of parameter adjustments made in this treatment cycle relative to the previous one;

[0124] The penalty coefficient is a preset weight constant greater than 0.

[0125] Algorithm Implementation: A neural network policy function is trained using either a proximal policy optimization algorithm or a deep deterministic policy gradient algorithm. This network takes the current "state" as input and directly outputs the optimal "action" (parameter adjustment). The policy network is pre-trained in the cloud using a large amount of historical treatment data and fine-tuned online during the treatment of individual patients, achieving truly personalized adaptive control.

[0126] S6. Repeat steps S2 to S5 to form a closed-loop treatment until the course of treatment is completed.

[0127] This specification provides one or more embodiments of a transcranial magnetic stimulation (TMS) system for implementing the above-described TMS method. The system includes a TMS coil module for generating a pulsed magnetic field, a pulse generation and control module for providing driving current to the TMS coil module, a personalized brain model construction and processing module, a biological signal synchronous acquisition and closed-loop feedback module, and a navigation and positioning module for locating stimulation target points.

[0128] In some embodiments, the navigation and positioning module includes a spatial pose acquisition unit and a physiological parameter sensing unit;

[0129] The spatial pose acquisition unit acquires six-degree-of-freedom spatial pose data of the coil module relative to the user's head in real time by using optical markers set on the user's head and the transcranial magnetic stimulation coil module.

[0130] The physiological parameter sensing unit is used to measure the impedance distribution data of the scalp and intracranial tissues in real time.

[0131] Specifically, the spatial pose acquisition unit of the navigation and positioning module includes:

[0132] Optical marker array: At least four high-precision passive infrared reflective spheres or active near-infrared LED markers (optical markers) are fixedly installed on the shell of the wearable magnetic therapy device (head-mounted device) at non-coplanar and asymmetrical positions (e.g., the center of the forehead, the upper part of the temples on both sides, and the back of the head). This layout ensures that at least three markers can be stably captured by the camera in any common head posture, thereby solving the six-degree-of-freedom pose.

[0133] Meanwhile, lightweight reference markers are attached to the user's bridge of the nose and both ears to establish a head coordinate system at the beginning of treatment;

[0134] Optical motion capture system: Two or more high frame rate near-infrared optical cameras with precise global calibration are fixedly deployed on the walls or ceiling of the treatment room. The camera parameters must meet the following requirements: frame rate ≥ 120Hz, resolution sufficient to clearly distinguish the marker points at a distance of several meters, and equipped with infrared filters to suppress ambient light interference. These cameras constitute a stereo vision measurement network.

[0135] Data processing unit: integrated into the main controller of the magnetic therapy device, or as a separate small processing box, receives the raw image stream from the camera and runs real-time pose calculation algorithms;

[0136] The physiological parameter sensing unit of the navigation and positioning module consists of:

[0137] Multi-frequency bioelectrical impedance measurement electrode array: On the flexible liner of the magnetic therapy device, 16 to 32 dual-electrode measurement nodes are integrated according to the international 10-20 EEG electrode system standard. Each node contains a current injection electrode and a voltage measurement electrode. Silver / silver chloride or gold-plated materials are used to ensure good contact and electrochemical stability.

[0138] Multi-frequency impedance analyzer: A highly integrated miniature electronic module capable of generating multiple sinusoidal excitation currents with frequencies ranging from 10Hz to 100kHz. The current intensity is strictly controlled at the microampere level, complying with human safety standards (IEC60601). This module simultaneously measures the response signals on all voltage measurement electrodes.

[0139] The transcranial magnetic stimulation coil module is a three-dimensional coil array containing at least three independent driving coil units. The spatial arrangement of each driving coil unit enables the pulsed magnetic field generated by it to couple in three-dimensional space to form a synthetic induced electric field with a predetermined direction and focusing characteristics.

[0140] In some embodiments, the driving coil unit of the three-dimensional coil array adopts an integrated packaging structure of magnetic core and thermally conductive composite material;

[0141] Specifically, the basic unit design: Each independent drive coil unit adopts the classic "figure-eight" coil as the basic topology. This coil is composed of two planar spiral coils (usually circular or butterfly-shaped) with the same shape and number of turns but opposite current directions, closely arranged side by side. When a pulse current is applied, the magnetic fields generated by the two coils are superimposed in the same direction in the central region between the two coils, while canceling each other out in the outer region, thus forming an induced electric field region with a large spatial gradient and good focusing directly below it. This region is called the "hot spot".

[0142] To achieve vector superposition and dynamic control of magnetic fields in three-dimensional space, this embodiment preferably uses four of the above-mentioned "figure-eight" basic coil units. The four coil units are fixed at the four vertices of a regular tetrahedron, with their normal directions pointing towards the center of the tetrahedron or adjusted according to the target brain region. This configuration has the advantage of isotropy in three-dimensional space and can flexibly synthesize electric fields in different directions.

[0143] The spatial arrangement of each coil unit allows the magnetic field lines generated by any unit to penetrate the skull and interweave and vector superimpose with the magnetic field lines generated by other units in the target brain region.

[0144] The personalized brain model construction and processing module is used to integrate the user's individual brain imaging data, the real-time spatial pose data obtained by the navigation and positioning module, and the real-time scalp and brain tissue impedance data, dynamically calculate and visualize the real-time electric field distribution generated in the brain by the three-dimensional coil array under the current pose.

[0145] In some embodiments, the personalized brain model construction and processing module uses a deep learning network to perform fully automatic tissue segmentation of the user's brain images and integrates diffusion tensor imaging data to construct a personalized electromagnetic model containing the orientation of white matter fibers. The dynamic calculation is based on this model and real-time spatial pose data, and solves Maxwell's equations in real time using a GPU-accelerated finite element method to achieve millisecond-level updates and visualization of the induced electric field distribution.

[0146] Specifically, fully automated organization and segmentation based on deep learning networks includes:

[0147] a) Data preprocessing and network input:

[0148] The input data for the personalized brain model construction and processing module is a standardized data package downloaded from the cloud, which includes registered T1-weighted structural images, T2-weighted images, and baseline images from diffusion tensor imaging.

[0149] Data preprocessing: Intensity normalization to eliminate scanner differences; resampling of each modality image to isotropic voxels; cropping based on the outer contour of the skull to reduce computational load;

[0150] Multimodal images (T1, T2, and DTI B0 images) are stacked along the channel dimension to form a multi-channel 3D tensor [Batch, Channel, Depth, Height, Width], which is then used as input to a deep learning network.

[0151] b) Deep learning network architecture and training:

[0152] Employing the improved 3D nnU-Net framework, nnU-Net can automatically configure all hyperparameters, including network depth, kernel size, and downsampling strategy, based on a given training dataset, achieving "plug-and-play" high-performance segmentation.

[0153] To adapt to head tissue segmentation, a multi-scale spatial attention module was added between the encoder and decoder on the basis of the standard nnU-Net, so that the network can focus more on the boundaries of thin tissues such as skull and cerebrospinal fluid.

[0154] The network is trained using large-scale public datasets and private labeled data. The supervised learning goal is to make the predicted probability map of the output layer (Softmax) as close as possible to the gold standard of 7 tissues manually labeled by experts: background, scalp, skull, cerebrospinal fluid, gray matter, white matter, and deep gray matter nuclei.

[0155] A five-fold cross-validation strategy was adopted, and end-to-end training was performed using a hybrid loss function and the AdamW optimizer until the model's average Dice similarity coefficient on the independent validation set exceeded 0.95.

[0156] c) Automated segmentation production line:

[0157] Load the trained model and input the user's multimodal image tensor into the network;

[0158] The network performs forward inference and outputs a probability map of each voxel belonging to 7 tissue types;

[0159] The post-processing method of "maximum probability + connected component analysis" is used to generate the final segmentation label 3D volume data. The whole process is fully automated and requires no manual intervention.

[0160] Specifically, the construction of a personalized electromagnetic model that integrates diffusion tensor imaging data includes:

[0161] a) White protein fibers tend to fuse:

[0162] Using the preprocessed DTI data, the diffusion tensor of each voxel is calculated, thereby obtaining the fractional anisotropy map and the principal eigenvector map;

[0163] Within the segmented white matter region, the principal eigenvector (v1) of each voxel represents the dominant orientation of the white matter fiber bundle at that location. This vector field is the basis for defining the anisotropic conductivity tensor.

[0164] b) Personalized finite element electromagnetic mesh generation:

[0165] Using the moving cube algorithm, the segmented binary label volume data is converted into three-dimensional triangular facet surface models of each tissue category. Then, an adaptive tetrahedral mesh generation algorithm is used to generate a three-dimensional finite element mesh containing millions of tetrahedral elements with these surfaces as boundaries. The mesh is automatically refined near tissue interfaces (such as skull-cerebrospinal fluid) and preset stimulation target areas.

[0166] Electromagnetic property assignment:

[0167] Isotropic tissues: The scalp, skull, cerebrospinal fluid, gray matter, and deep nuclei are endowed with frequency-dependent scalar conductivity as reported in the literature, and can be fine-tuned based on real-time impedance data from physiological parameter sensing units.

[0168] Anisotropic tissue (white matter): A 3x3 conductivity tensor is calculated for each tetrahedral cell in the white matter region. This tensor is constructed based on the averaged fiber orientation vector v within the cell, assuming that the conductivity is along the fiber orientation. It spans the fiber direction If the conductivity is 5-10 times that of the given element, then the conductivity tensor σ of the element can be expressed as: Where I is the identity matrix, The outer product is indicated, which ensures that the electric field calculation takes into account the influence of fiber orientation.

[0169] c) GPU-accelerated real-time finite element calculation and visualization include:

[0170] 1. Offline pre-computation: A "Green function library" is built to avoid solving the computationally intensive Maxwell's equations in real time during treatment, and all calculations that depend on a fixed individual brain model are completed in advance;

[0171] The geometry of each coil unit is discretized into hundreds or thousands of current elements;

[0172] On the generated individualized finite element mesh, select all nodes that may become stimulus target areas (approximately tens of thousands to hundreds of thousands) to form the target point set;

[0173] For each current element, solve the first-order quasi-static Maxwell equations (in simplified form as follows). Where A is the magnetic vector potential and J is the current density), this is done by calling the finite element calculation engine. The calculation result is the electric field vector generated at all target nodes when the current element is supplied with a unit current of 1 ampere. , , );

[0174] The unit current electric field response of all current elements to all target nodes is stored in a large, sparse four-dimensional tensor, namely the "Green's function library". This library is a heavyweight component of the model file. It is computationally time-consuming, but it is a one-time solution.

[0175] 2. Online Real-Time Calculation: Electric Field Synthesis and Visualization

[0176] Input: Real-time pose, [R, T] from the navigation and positioning module; Real-time drive current, the output current vector I = [ from the pulse generation and control module]. , , ... ];

[0177] Coordinate Transformation and Interpolation: Based on the current coil pose [R, T], the new position of each current element in physical space is determined. For any target point x where the electric field needs to be calculated, the system uses trilinear interpolation from a pre-calculated Green's function library based on the coordinates of x to quickly obtain the unit electric field contribution of each current element at that point. ;

[0178] Linear superposition: Execute the formula This operation is a pure matrix-vector multiplication and summation, exhibiting extremely high data parallelism;

[0179] GPU parallel execution: The calculation task of tens of thousands of target points x is distributed to thousands of cores of the GPU to be performed simultaneously; the entire process from data reading, coordinate interpolation to vector superposition can be completed within 5 milliseconds, realizing the "real-time" update of the electric field distribution.

[0180] Visualization: Calculated three-dimensional vector electric field data The data is transmitted in real time to the graphics rendering pipeline, where it is mapped to color and transparency and overlaid onto the user's 3D brain anatomy model in the form of electric field cloud maps or dynamic equipotential surfaces, providing the operator with an intuitive "what you see is what you get" stimulus view.

[0181] The pulse generation and control module is configured to execute a synchronous multi-channel stimulation protocol. Based on the real-time electric field distribution calculated by the individualized brain model construction and processing module, it independently and collaboratively electronically modulates the timing, phase, and intensity parameters of the stimulation pulses of each coil unit in the three-dimensional coil array to achieve non-mechanical dynamic adjustment of the focusing depth, spatial range, and vector direction of the synthetic induced electric field and target tracking.

[0182] In some embodiments, the pulse generation and control module integrates a distributed temperature monitoring and dynamic power adjustment unit, which can independently compensate the current waveform of each drive coil unit based on real-time temperature data to maintain the stability of the stimulation output and ensure safety.

[0183] In some embodiments, the synchronous multi-channel stimulation protocol executed by the pulse generation and control module is parameter-tuned based on a closed-loop optimization controller.

[0184] The closed-loop optimization controller takes the deviation between the real-time electric field distribution calculated by the individualized brain model construction and processing module and the preset target electric field distribution, as well as the neural response features extracted by the biological signal synchronous acquisition and closed-loop feedback module, as joint inputs. It then uses a model predictive control algorithm to solve for the optimal stimulation parameter sequence of each driving coil unit that minimizes the joint loss function.

[0185] Specifically, the module hardware architecture and synchronous multi-channel stimulation protocol execution include:

[0186] a) Hardware system composition:

[0187] Multi-channel insulated gate bipolar transistor / gallium nitride pulse drive circuit: Each independent drive coil unit corresponds to an independent drive channel. The core of each channel is an H-bridge or half-bridge topology circuit composed of a high-voltage energy storage capacitor bank, an ultra-fast IGBT or GaN switch, a freewheeling diode, and a pulse shaping network.

[0188] A single channel can generate a peak current of up to 7000A, a pulse width that is precisely adjustable between 50μs and 300μs, a rise time of less than 20μs, and a timing synchronization accuracy between channels that is better than 100 nanoseconds.

[0189] Central control and signal generation unit: The core is a high-performance digital signal processor or field-programmable gate array, which runs a real-time operating system. This unit directly receives the synchronous multi-channel stimulation protocol from the upstream algorithm module. The protocol defines the following for each channel in a stimulation cycle: trigger absolute delay, pulse waveform, current amplitude, number of pulses and pulse train frequency.

[0190] b) Electronic modulation of the synchronous multi-channel stimulation protocol:

[0191] By generating high-resolution pulse-width modulation signals through DSP / FPGA or directly setting the reference voltage of the digital-to-analog converter, the conduction depth and time of each channel's switching transistors can be precisely controlled, thereby linearly adjusting the peak current output to the coil. ;

[0192] The pulse triggering of each channel is controlled by an independent, high-precision hardware timer. By setting different timer count values, precise delays ranging from microseconds to milliseconds can be achieved between pulses from each channel, which is crucial for beamforming and focusing using the time difference of magnetic field propagation.

[0193] For protocols that require specific phase relationships (such as generating a rotating electric field), this can be achieved by controlling the polarity and relative timing of the pulses in each channel. For example, by making the current pulses of two spatially perpendicular coils 90 degrees out of phase, an induced electric field with a rotating polarization direction can be synthesized.

[0194] The above Independent control of timing and phase enables the pulsed magnetic fields generated by multiple spatially arranged coil units to achieve coherent superposition or incoherent cancellation of vectors at the target point in the brain.

[0195] When it is necessary to change the depth of focus or track a moving target, there is no need to physically move the coils; the closed-loop optimization controller simply needs to recalculate a new set of parameters. The timing and phase parameters are updated to the stimulation protocol. For example, in order to move the focus point 2 mm deeper, the optimization algorithm may calculate that the current of the rear coil needs to be slightly increased (I2 increases), while the delay of the side coil is fine-tuned. The system can then execute this new protocol in the next stimulation cycle (milliseconds) to achieve "inertia-free" dynamic deflection of the electric field.

[0196] The distributed temperature monitoring and dynamic power regulation unit includes:

[0197] a) Hardware configuration:

[0198] Temperature sensing network: A high-precision digital temperature sensor is embedded in the Litz wire winding within the integrated package of each coil unit;

[0199] Monitoring circuit: Integrated into the main controller, it polls and reads the temperature values ​​of all sensors at a frequency of ≥10Hz. .

[0200] b) Dynamic power regulation algorithm:

[0201] The algorithm continuously monitors the temperature of each coil. With preset safety threshold and warning thresholds ;

[0202] Regulation strategy: When any is detected > At this time, the adjustment unit is activated, and its goal is to minimize the impact on the current synthesized electric field. While mitigating the impact, reduce the risk of overheating;

[0203] Step 1: The algorithm obtains the optimal current vector currently being executed. and the corresponding combined electric field distribution;

[0204] Step 2: Construct a constrained quadratic programming problem:

[0205] Optimization variable: New current vector ;

[0206] Objective function: Minimize That is, the smallest change;

[0207] Constraint 1: Current amplitude corresponding to the overheating channel It must be reduced (e.g.) );

[0208] Constraint 2: by The new composite electric field calculated using the Green's function library The field strength at key points in the target area and The deviation must not exceed the preset ratio (e.g., 5%).

[0209] Step 3: Quickly solve this optimization problem to obtain... The result is usually a slight reduction in the current of the overheated coil, while a slight increase in the current of other coils at normal temperatures in a specific ratio. Through synergistic compensation between the coils, the final therapeutic effect is improved. (1) Remain basically unchanged;

[0210] Step 4: The stimulation protocol is updated to the next cycle, a process completed within milliseconds, achieving a smooth transition and safe stability of the output.

[0211] Closed-loop optimization controller based on model predictive control:

[0212] a) System modeling and prediction models:

[0213] State-space equations: The controller discretizes the controlled system (brain-device) into a state-space model;

[0214] state variables It includes neural response feature vectors (such as P60 amplitude, Beta band ERS index), current stimulus parameters, and state history over the past few cycles (used to characterize neural plasticity trends).

[0215] Control quantity : That is, the stimulus parameter vector to be optimized, u=[ , , ... [Frequency, pulse width];

[0216] Output : These are the key indicators (such as maximum field strength and focusing volume) of the real-time electric field distribution in the target area calculated by the individualized brain model module.

[0217] Predictive model: ; .in and For a linear time-varying or simplified neural network model trained on historical treatment data, w and v are process and measurement noise, the model can predict the state and output several steps in the future given a control action u;

[0218] b) Model predictive control algorithm flow:

[0219] In each control cycle k:

[0220] Step 1: State estimation and feedback, obtaining the latest neural response features ( (partial) and real-time electric field distribution ( ).

[0221] Step 2: Rolling optimization (core), in the prediction time domain, solve the following optimization problem:

[0222] minimize

[0223] in, To predict the time domain, To control the time domain;

[0224] The first penalty is the deviation between the predicted output and the expected electric field / neural response;

[0225] The second penalty controls energy (corresponding to) ) and input change rate to ensure smoothness;

[0226] The third term penalizes the unexpected focusing of the predicted electric field distribution (total variational regularization);

[0227] Q and R are weight matrices. This optimization problem incorporates... Physical targets and neural response targets;

[0228] Step 3: Solving and Execution. The optimal control sequence for the next Nc steps is obtained online using sequential quadratic programming or the interior-point method. Only the control quantity of the first step. Execution is performed as a parameter output for a synchronous multichannel stimulation protocol;

[0229] Step 4: Rolling update. Repeat the above steps in the next period k+1, and re-optimize based on the new measurement values ​​to form a closed loop of "rolling time domain, feedback correction".

[0230] c) Synergy with reinforcement learning:

[0231] The MPC controller is responsible for short-term, precise physics field tracking. Its optimization objective is the desired neural response. It can be dynamically provided and adjusted by a higher-level reinforcement learning agent based on long-term efficacy (such as symptom scores over several days or weeks). The RL agent explores different By setting the impact on long-term efficacy, we can gradually learn to set the optimal short-term control target for MPC, forming a two-layer intelligent optimization architecture.

[0232] The biosignal synchronous acquisition and closed-loop feedback module is used to acquire and process neural response features during the interval of applying stimulation pulses, and feed the extracted neural response features back to the pulse generation and control module to adaptively adjust the parameters of the synchronous multi-channel stimulation protocol, thereby forming a real-time closed-loop regulation of the neural circuit state.

[0233] In some embodiments, the biosignal synchronous acquisition and closed-loop feedback module is specifically used to acquire electroencephalogram signals induced by magnetic stimulation during the stimulation pulse interval, and extract specific frequency band neural oscillation energy or cross-brain region coherence with stimulation lock-in through phase-locked amplification and blind source separation technology as response features characterizing the state of neural circuits.

[0234] Specifically, the hardware design of the biosignal synchronous acquisition and closed-loop feedback module, the high anti-interference acquisition timing, and the neural response feature extraction algorithm based on lock-in amplification and blind source separation technology include:

[0235] Modular hardware system and high interference immunity acquisition design:

[0236] a) Hardware system composition:

[0237] Conformal integrated high-density dry electrode array: Utilizing flexible printed circuit board technology, 64 to 128 gold-plated or silver-silver chloride multi-contact dry electrodes are arranged in a grid pattern and integrated onto a flexible pad that perfectly conforms to the curvature of the head and the geometry of the internal coil array. This "conformal design" ensures stable contact between the electrodes and the scalp while minimizing physical separation from the coils. Between the electrode layer and the upper coil layer, a layer of high-permeability permalloy sheet or nanocrystalline soft magnetic material is embedded. This layer effectively "absorbs" and "shunts" most of the transient magnetic field generated by the TMS pulse, preventing it from directly penetrating the electrode circuitry. This is crucial for suppressing primary induction artifacts.

[0238] Active compensation and high dynamic range acquisition circuit: Each electrode channel is connected to an ultra-low noise, high input impedance instrumentation amplifier. The "active pulse compensation circuit" injects a compensation signal with the same amplitude but opposite polarity to the predicted TMS induced artifact waveform through a high-speed digital-to-analog converter (DAC) just before the TMS pulse triggers, thus significantly canceling the primary artifact at the input. The circuit uses a 24-bit high-precision DAC supporting sampling rates ≥10kHz. The ADC has an extremely short saturation recovery time (<3 milliseconds). After the TMS pulse is emitted, the system hardware automatically switches to an extremely low gain setting to avoid saturation, entering a programmable silent period, and then quickly recovers to high-gain mode within hundreds of microseconds to acquire weak neural signals.

[0239] b) Synchronous acquisition timing:

[0240] The data collection process is strictly synchronized with the stimulation protocol, and the timeline for one cycle is as follows:

[0241] T0 (100μs before pulse emission): The active compensation circuit injects a pre-compensation signal;

[0242] T1 (pulse emission time): All acquisition channels switch to the lowest gain, and the ADC enters the silent period;

[0243] T1+2ms: The silent period ends, and the gain begins to recover exponentially;

[0244] T1+3ms to T1+300ms: The system acquires EEG signals at full speed and full gain. This window covers the early and late components of TMS evoked potentials.

[0245] After T1+300ms: the signal is transmitted to the digital signal processor for real-time processing.

[0246] Neural response feature extraction algorithms, from raw signals to quantized features, specifically include:

[0247] a) Preprocessing and artifact removal:

[0248] First, an adaptive template subtraction based on the TMS pulse trigger number is applied to dynamically update a "residual artifact template". This template is estimated from the EEG signal (containing only artifacts) a few milliseconds before the current pulse and subtracted from the acquired signal.

[0249] The time-domain signal of each channel is coherently detected with the stimulus trigger pulse. The signal is down-converted to baseband by a digital mixer and then passed through a low-pass filter with an extremely narrow bandwidth. This allows the extraction of neural oscillation components that are strictly time-locked and phase-locked with the stimulus. This method is particularly effective for extracting event-related synchronization energy in specific frequency bands (such as the Gamma band).

[0250] Meanwhile, independent component analysis is performed on the multi-channel signals. ICA decomposes the multi-channel observation signals into several statistically independent source signals. Through a pre-trained machine learning classifier, it automatically identifies and removes independent components related to eye movement, ECG, coil residual vibration, and electromagnetic artifacts that are not completely canceled, while retaining the neural source components.

[0251] b) Calculation of multi-dimensional neural response characteristics:

[0252] After the above processing, the signal is considered a "clean" TMS-evoked EEG, from which three types of core features are extracted:

[0253] Temporal characteristics: The signal of the electrode cluster above the target area is time-locked and averaged, and the number of averages is dynamically adjusted according to the signal stability; the peak amplitude and latency of components such as N15, P30, N45, and P60 are automatically detected and extracted from the average waveform. For example, the P60 amplitude is calculated as the difference between the maximum positive peak value and the average value of the baseline before and after stimulation within a time window of 45-75ms after stimulation.

[0254] Time-frequency domain characteristics: For the evoked response after a single or average stimulus, time-frequency decomposition is performed using complex Morlet wavelet transform to obtain the time-frequency spectrum; the event-related spectral perturbation of key frequency bands within a specific time window is calculated, for example: early Gamma ERS: calculate the percentage change in average energy in the 30-50Hz band relative to the baseline (-100 to 0ms) within 20-60ms after stimulus; Alpha band ERD: calculate the percentage decrease in energy in the 8-12Hz band within 100-250ms after stimulus.

[0255] Spatial network characteristics: The weighted phase lag index of EEG signals in the Theta or Beta band is calculated for the electrode clusters corresponding to the stimulation target area (such as the left DLPFC) and the target network nodes (such as the electrodes corresponding to the contralateral prefrontal cortex and anterior cingulate cortex). wPLI is not sensitive to volume conduction effects and can more realistically reflect the strength of functional connectivity. The overall activity intensity of whole-brain electrodes at specific latencies (such as the N45 peak) is calculated as an indicator of global brain excitability.

[0256] The implementation of closed-loop feedback and adaptive control specifically includes:

[0257] The extracted multidimensional feature vectors constitute the state observations describing the current "neural circuit state", which are pushed to the closed-loop optimization controller in the pulse generation and control module in real time.

[0258] The composition of feature vectors: A typical state vector might be: [ , Early prefrontal cortex ,...];

[0259] Integration with Optimization Controllers: Predictive Models in MPC In the middle, state Including these neural features, the controller compares the predicted neural responses. With expected therapeutic goals (For example, in the treatment of depression, there is a desire to enhance prefrontal inhibition, with the goal of increasing P60 amplitude and Gamma ERS) in order to optimize stimulation parameters. This allows future neural responses to approach the target;

[0260] As a reward signal in reinforcement learning: in the reward function middle, This refers to the real-time extracted values ​​from this module. By maximizing the cumulative sum of such rewards, the RL agent learns how to adjust stimulus parameters to guide the desired direction of neural circuit changes in a long-term and stable manner.

[0261] In some embodiments, the system further includes a treatment effect prediction and parameter recommendation unit;

[0262] This unit trains a machine learning prediction model based on individualized brain models of historical patients, the stimulation parameters implemented, and the final clinical efficacy data, which is used to recommend initial stimulation targets and stimulation protocol parameters for new patients.

[0263] Specifically, the treatment effect prediction and parameter recommendation unit includes:

[0264] The construction of a multimodal clinical treatment database specifically includes:

[0265] a) Data collection and standardization:

[0266] Data source: The database continuously aggregates treatment case data from various collaborative clinical centers, completed using standard procedures conforming to this system;

[0267] Data triples: Each case record contains three indivisible parts:

[0268] Personalized brain model features: Quantitative features extracted from the patient's "digital twin brain" model, including but not limited to: the average cortical thickness of the target brain tissue, the density and orientation of white matter fiber bundles below the target area (DTI-derived indicators), the structural connectivity strength between the target area and key networks (such as the default mode network and the emotion network), and the average distance from the scalp to the target area and the distribution of tissue impedance.

[0269] Stimulation parameter set: A detailed list of all stimulation parameters actually implemented during treatment and optimized via closed-loop control, including the final steady-state current vector of each coil unit. The peak intensity of the synthesized electric field in the target area, the focusing volume and orientation angle, the stimulation frequency, the pulse width, and the total number of pulses;

[0270] Clinical efficacy labels: changes in standardized clinical assessment scale scores before and after treatment (e.g., reduction rate of Hamilton Depression Rating Scale score for treating depression), and changes in baseline neurophysiological responses extracted from the patient's own biosignals (e.g., the degree of improvement in resting-state EEG alpha asymmetry before and after treatment). Efficacy was quantified as one or more continuous or categorical variables.

[0271] b) Data governance and privacy protection:

[0272] All data undergoes thorough de-identification before being stored in the database. Brain model features are stored in the form of abstract feature vectors and are not associated with personal identification information.

[0273] Data is stored in a private cloud database that complies with medical information security standards, and access is subject to strict role-based access control.

[0274] The construction and training of machine learning prediction models specifically include:

[0275] a) Model architecture selection:

[0276] This unit primarily addresses two prediction problems, corresponding to two sub-models:

[0277] Therapeutic efficacy prediction model: Given the brain model characteristics of a new patient and a set of candidate stimulus parameters, predict its possible clinical efficacy score. This is a regression or ordinal classification problem.

[0278] Parameter recommendation model: Given the brain model characteristics of a new patient and the expected therapeutic goals, recommend the optimal initial stimulation target and stimulation parameter set. This is an optimization problem, which is often solved by backpropagation of the prediction model or reinforcement learning.

[0279] Model selection: Given the high dimensionality and non-linear relationships of the data, ensemble learning models are adopted as the basic framework, such as gradient boosting decision trees (e.g., XGBoost, LightGBM) or deep neural networks.

[0280] Applicability of Graph Neural Networks (GNNs): Since the patient brain model is essentially a graph structure (composed of brain regions as nodes and structural / functional connections as edges), GNNs can effectively capture the topological features of brain networks and are a very promising model architecture.

[0281] b) Model training and validation process:

[0282] Deep processing of the original triplet data: extracting key features such as target area coverage and non-target area exposure from the electric field distribution, and calculating the network centrality index of the target area from the brain model;

[0283] Training and optimization:

[0284] The historical dataset is stratified and divided into training, validation and test sets by center sampling.

[0285] Taking the efficacy prediction model as an example, its training objective is to minimize the loss function between the predicted efficacy and the actual efficacy. To prevent overfitting, cross-validation and early stopping are used.

[0286] Use Bayesian optimization or grid search to tune the model's hyperparameters;

[0287] The model performance was evaluated on an independent test set. Key metrics included: root mean square error between predicted and actual values, Pearson correlation coefficient, and classification accuracy / recall.

[0288] Enhanced interpretability: By integrating interpretable AI tools such as SHAP or LIME, after training, the contribution factors of the model to each prediction are analyzed. For example, visualization shows whether the patient's "prefrontal cortex thickness" or "angle between the stimulation electric field and the fiber bundle" has a greater impact on the predicted efficacy. This provides a scientific basis for doctors to understand the recommended results.

[0289] The clinical application process provides personalized recommendations for new patients, specifically including:

[0290] The trained model is deployed as a microservice on a medical cloud platform for clinicians to use.

[0291] a) Recommended workflow:

[0292] Step 1: Feature Extraction. After a new patient completes the construction of an individualized brain model, the system automatically extracts brain model feature vectors from the model that are consistent with the historical database. ;

[0293] Step 2: Therapeutic effect simulation and parameter optimization, the system will... Input the efficacy prediction model, and simultaneously sample or enumerate thousands of candidate parameter combinations from a large, pre-generated, safe, and physically feasible stimulus parameter space. };

[0294] For each group The efficacy prediction model will output a predicted efficacy score. ;

[0295] The system executes an internal optimization loop to find the optimal solution. The set of parameters to be maximized This process can be efficiently completed based on Bayesian optimization;

[0296] Step 3: Generate a recommendation report. The system outputs a structured report, which includes:

[0297] Recommended initial targets: Based on the most similar successful cases in the database, or through model analysis of the brain regions that contribute the most to the therapeutic effect, highlight 1-2 recommended targets on the patient's 3D brain model;

[0298] Recommended initial stimulation protocol: includes specific coil current configuration ( ), desired electric field distribution target, and suggested stimulation frequency / intensity;

[0299] Predicted efficacy and confidence intervals: The predicted efficacy improvement and the model's prediction confidence are given after adopting the recommended parameters;

[0300] Key justification: Use interpretability tools to explain the rationale for the recommendation in natural language, such as "Because your white matter fiber orientation is highly similar to the subgroup of patients in the database who responded best to treatment, a matching electric field orientation is recommended."

[0301] b) Integration with closed-loop systems:

[0302] Recommended initial target and parameters ( It is not fixed, but serves as the initial value at the high starting point of the entire adaptive closed-loop system;

[0303] This recommended value is directly loaded into the MPC controller of the pulse generation and control module as the expected target for its first control cycle. ) and initial control quantity ( );

[0304] Starting from this intelligent recommendation, the system immediately enters the real-time closed-loop control process from S2 to S6, making fine adjustments based on the patient's unique real-time neural feedback. This greatly accelerates the treatment optimization process, avoids "blind trials" from scratch, and improves the effectiveness of the first treatment and the patient's confidence.

[0305] This specification provides one or more embodiments of a magnetic therapy device, which includes the transcranial magnetic stimulation system described above. The magnetic therapy device also includes a flexible electronic headband, an integrated power supply, and a management module. The transcranial magnetic stimulation system is highly integrated into a flexible electronic headband, which has an adaptive fit structure and is powered by the integrated power supply and management module.

[0306] For more information on each module, please refer to [link / reference]. Figure 1-6 The relevant explanations will not be repeated here. It should be understood that... Figure 1 , Figure 4 and Figure 5 The systems and modules shown can be implemented in various ways. For example, in some embodiments, the systems and modules can be implemented by hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the methods and systems described above can be implemented using computer-executable instructions and / or included in the control code of a processor, such as on a media such as a disk, CD, or DVD-ROM, or in the memory of a programmable device. The systems and modules of this specification can be implemented not only by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips and transistors, or programmable hardware devices such as field-programmable gate arrays and programmable logic devices, but also by software, for example, executed by various types of processors, or by a combination of the aforementioned hardware circuits and software (e.g., firmware).

[0307] It should be noted that the above description of the system and its modules is for convenience only and should not be construed as limiting this specification to the embodiments described. It is understood that those skilled in the art, after understanding the principles of this system, may arbitrarily combine the various modules without departing from these principles to form subsystems connected to other modules. Alternatively, some modules may be split to obtain more modules or multiple units under a single module. Such modifications are all within the scope of this specification.

[0308] The beneficial effects that the embodiments in this specification may bring may include, but are not limited to:

[0309] 1. The system uses multiple independently controlled coils combined into a three-dimensional array. By coordinating the current of each coil, a focused electric field with controllable direction, depth and range can be "synthesized" inside the brain. Combined with a dynamic model established based on the user's individual brain structure, the system can calculate and display the stimulation effect in real time. The position and direction of the stimulation can be flexibly adjusted without physical mobile devices, thus achieving more precise and controllable brain stimulation.

[0310] 2. The system integrates each individual's brain scan data, real-time head position, and scalp impedance information to construct a personalized electromagnetic model of the brain. During treatment, the system simulates the electric field distribution inside the brain in real time based on this model and the current coil position, and dynamically adjusts the stimulation parameters of each coil accordingly, optimizing for each individual's unique brain structure and real-time condition.

[0311] 3. During the interval between two stimulations, the system synchronously collects the electrical signals generated by the brain and extracts key features reflecting the state of neural activity. These features are immediately fed back to the control module to automatically adjust the stimulation parameters for the next round. This forms a closed loop. The system automatically optimizes the treatment based on the brain's immediate response, making the regulation more intelligent and more in line with the patient's real-time neural activity state, which helps to improve efficacy and safety.

[0312] The basic concepts have been described above. It is obvious that the detailed disclosure above is merely illustrative and does not constitute a limitation of this specification. Although not explicitly stated herein, various modifications, improvements, and corrections may be made to this specification by those skilled in the art. Such modifications, improvements, and corrections are taught in this specification and therefore remain within the spirit and scope of the exemplary embodiments described herein.

Claims

1. A transcranial magnetic stimulation system, characterized in that: The system includes a transcranial magnetic stimulation coil module for generating pulsed magnetic fields, a pulse generation and control module for providing driving current to the transcranial magnetic stimulation coil module, a personalized brain model construction and processing module, a biological signal synchronous acquisition and closed-loop feedback module, and a navigation and positioning module for locating stimulation target points. The transcranial magnetic stimulation coil module is a three-dimensional coil array containing at least three independent driving coil units. The spatial arrangement of each driving coil unit enables the pulsed magnetic field generated by it to couple in three-dimensional space to form a synthetic induced electric field with a predetermined direction and focusing characteristics. The personalized brain model construction and processing module is used to integrate the user's individual brain imaging data, the real-time spatial pose data obtained by the navigation and positioning module, and the real-time scalp and brain tissue impedance data, dynamically calculate and visualize the real-time electric field distribution generated in the brain by the three-dimensional coil array under the current pose. The pulse generation and control module is configured to execute a synchronous multi-channel stimulation protocol. Based on the real-time electric field distribution calculated by the individualized brain model construction and processing module, it independently and collaboratively electronically modulates the timing, phase, and intensity parameters of the stimulation pulses of each coil unit in the three-dimensional coil array to achieve non-mechanical dynamic adjustment of the focusing depth, spatial range, and vector direction of the synthetic induced electric field and target tracking. The biosignal synchronous acquisition and closed-loop feedback module is used to acquire and process neural response features during the interval of applying stimulation pulses, and feed the extracted neural response features back to the pulse generation and control module to adaptively adjust the parameters of the synchronous multi-channel stimulation protocol, thereby forming a real-time closed-loop regulation of the neural circuit state.

2. The transcranial magnetic stimulation system according to claim 1, characterized in that: The navigation and positioning module includes a spatial pose acquisition unit and a physiological parameter sensing unit; The spatial pose acquisition unit acquires six-degree-of-freedom spatial pose data of the coil module relative to the user's head in real time by using optical markers set on the user's head and the transcranial magnetic stimulation coil module. The physiological parameter sensing unit is used to measure the impedance distribution data of the scalp and intracranial tissues in real time.

3. The transcranial magnetic stimulation system according to claim 1, characterized in that, The driving coil unit of the three-dimensional coil array adopts an integrated packaging structure of magnetic core and thermally conductive composite material, and the pulse generation and control module integrates a distributed temperature monitoring and dynamic power adjustment unit, which can independently compensate the current waveform of each driving coil unit according to real-time temperature data to maintain the stability of stimulation output and ensure safety.

4. The transcranial magnetic stimulation system according to claim 1, characterized in that, The personalized brain model construction and processing module uses a deep learning network to perform fully automatic tissue segmentation of the user's brain images and integrates diffusion tensor imaging data to construct a personalized electromagnetic model containing the orientation of white matter fibers. The dynamic calculation is based on this model and real-time spatial pose data, and solves Maxwell's equations in real time using a GPU-accelerated finite element method to achieve millisecond-level updates and visualization of the induced electric field distribution.

5. The transcranial magnetic stimulation system according to claim 1, characterized in that, The synchronous multi-channel stimulation protocol executed by the pulse generation and control module has its parameter adjustment based on a closed-loop optimization controller. The closed-loop optimization controller takes the deviation between the real-time electric field distribution calculated by the individualized brain model construction and processing module and the preset target electric field distribution, as well as the neural response features extracted by the biological signal synchronous acquisition and closed-loop feedback module, as joint inputs. It then uses a model predictive control algorithm to solve for the optimal stimulation parameter sequence of each driving coil unit that minimizes the joint loss function.

6. The transcranial magnetic stimulation system according to claim 1, characterized in that, The biosignal synchronous acquisition and closed-loop feedback module is specifically used to acquire EEG signals induced by magnetic stimulation during the stimulation pulse interval, and to extract specific frequency band neural oscillation energy or cross-brain region coherence with stimulation lock-in through phase-locked amplification and blind source separation technology as response features characterizing the state of neural circuits.

7. The transcranial magnetic stimulation system according to claim 1, characterized in that, The system further includes a treatment effect prediction and parameter recommendation unit; This unit trains a machine learning prediction model based on individualized brain models of historical patients, the stimulation parameters implemented, and the final clinical efficacy data, which is used to recommend initial stimulation targets and stimulation protocol parameters for new patients.

8. A transcranial magnetic stimulation method, characterized in that, This is achieved using any one of the transcranial magnetic stimulation systems described in claims 1-7, and the method specifically includes the following steps: S1. Obtain individual brain imaging data, construct an individualized brain electromagnetic model including the distribution of brain tissue conductivity, and set the target stimulation area and electric field distribution based on the treatment goal. S2. By integrating the navigation and positioning module into the wearable magnetic therapy device, the spatial pose of the three-dimensional coil array on the wearable transcranial magnetic stimulation device relative to the user's head is tracked in real time. Meanwhile, based on the individualized brain electromagnetic model and the real-time acquired scalp and intracranial tissue impedance data, the distribution of the real-time induced electric field generated in the brain by the three-dimensional coil array under the current pose is dynamically simulated and calculated. S3. Based on the difference between the real-time electric field distribution and the desired electric field distribution, the pulse generation and control module integrated into the wearable magnetic therapy device generates a synchronous multi-channel stimulation protocol to drive at least three spatially arranged coil units to generate coupled synthetic induced electric fields. S4. During the interval between the application of stimulation pulses, the neurophysiological signals induced by magnetic stimulation are collected by the biosignal synchronous acquisition module integrated into the wearable magnetic therapy device, and the neural response features characterizing the changes in the state of the neural circuit are extracted. S5. Based on the degree of conformity between the neural response characteristics and the treatment target, adaptively adjust the stimulation protocol parameters for the next cycle; S6. Repeat steps S2 to S5 to form a closed-loop treatment until the course of treatment is completed.

9. A magnetic therapy device, wherein the magnetic therapy device comprises the transcranial magnetic stimulation system according to any one of claims 1-7, characterized in that, The magnetic therapy device also includes a flexible electronic headband, an integrated power supply, and a management module. The transcranial magnetic stimulation system is highly integrated into a flexible electronic headband, which has an adaptive fit structure and is powered by the integrated power supply and management module.