Transcranial electrical stimulation parameter optimization method, electronic device, and storage medium
By generating candidate scenarios and screening effective scenarios on an individual spatial model, constructing target areas and calculating area weights, and generating target stimulation parameters, the fault tolerance and reliability issues of existing transcranial electrical stimulation parameter optimization methods are resolved, ensuring robust coverage of electrical stimulation.
Patent Information
- Application Number
- CN202611686163.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing methods for optimizing transcranial electrical stimulation parameters suffer from poor fault tolerance and low reliability. They are difficult to balance registration errors and operator placement errors, target area evaluation relies on average field strength, local low-field areas may be masked, and the control of electrical stimulation intensity is unstable.
By acquiring the baseline target point on the individual spatial model, multiple candidate scenarios are generated based on the preset error model. Valid scenarios are selected using preset judgment rules, the target area is constructed and the area weight is calculated. Target stimulation parameters are generated based on the area coverage index to ensure that the electrical stimulation design requirements are met under the most unfavorable scenario.
It improves the fault tolerance and reliability of transcranial electrical stimulation parameters, ensures reliable electrical stimulation coverage under target location uncertainty, overcomes the defect of local low field area masking, and achieves robust electrical stimulation parameter optimization.
Smart Images

Figure CN123183035A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of model simulation technology, and in particular to a method for optimizing transcranial electrical stimulation parameters, an electronic device, and a storage medium. Background Technology
[0002] Transcranial electrical stimulation (TES) is a non-invasive neuromodulation technique that generates an electric field in a target area of the cerebral cortex by applying a weak electrical current to the scalp surface, thereby modulating neuronal activity. Personalized TES parameter planning aims to determine the optimal stimulation parameters based on individual brain anatomy, improving the specificity and effectiveness of the modulation effect.
[0003] Existing transcranial electrical stimulation (TCS) parameter planning schemes typically begin by acquiring individual imaging data to establish a spatial model and determine target points. Then, numerical simulations are used to calculate the electric field distribution under different electrode configurations. The average field strength of the target area is adjusted to approach a preset value or the target point field strength reaches a threshold, and the stimulation intensity is determined accordingly. However, existing schemes only optimize for fixed target points during parameter generation, making it difficult to account for registration errors and operator placement errors. Target area evaluation relies heavily on average field strength, and local low-field areas may be masked by the average value. Stimulation intensity control is scaled based on single-point field strength or average field strength, making it difficult to guarantee the electric field coverage effect after target point offset. Furthermore, while some schemes simulate errors by applying a fixed offset to the target point in three-dimensional space, the offset candidate position may cross anatomical boundaries and fall into the sulcus region, and Euclidean distance alone cannot identify such errors.
[0004] It is evident that existing methods for optimizing transcranial electrical stimulation parameters suffer from technical problems such as poor fault tolerance and low reliability. Summary of the Invention
[0005] The main objective of this application is to provide a method, electronic device, and storage medium for optimizing transcranial electrical stimulation parameters, aiming to solve the technical problems of poor fault tolerance and low reliability in the method for optimizing transcranial electrical stimulation parameters.
[0006] To achieve the above objectives, this application proposes a method for optimizing transcranial electrical stimulation parameters, the method comprising: Obtain a benchmark target point on an individual spatial model, wherein the individual spatial model includes multiple nodes, and the benchmark target point is one of the nodes; Based on a preset error model, multiple candidate scenarios corresponding to the benchmark target are generated. By using preset judgment rules, each candidate scenario is screened to obtain multiple effective scenarios corresponding to the benchmark target. Based on the individual spatial model, target regions corresponding to each of the effective scenarios are constructed, and area weight sets corresponding to each of the target regions are determined. The area weight sets include area weights corresponding to multiple nodes within the target region. Based on the preset initial stimulation parameters and the area weight set corresponding to each target region, at least one area coverage index for each effective scenario is calculated. Target stimulus parameters are generated based on the minimum value of each area coverage index and the preset design threshold.
[0007] For example, the step of obtaining the benchmark target point on the individual spatial model includes: Read the image data of the target to be stimulated, and construct the individual spatial model based on the image data; The preset target points are mapped onto the individual spatial model to obtain the target point spatial coordinates; The node in the individual spatial model that is closest to the target point's spatial coordinates is taken as the reference target point.
[0008] For example, the candidate scenario includes offset coordinates and offset node information corresponding to the offset node; The step of generating multiple candidate scenarios corresponding to the benchmark target point based on a preset error model includes: Obtain the coordinates of the reference target point on the individual spatial model to obtain the reference coordinates; Based on preset perturbation parameters, the reference coordinates are perturbed by the error model to obtain offset coordinates corresponding to multiple reference target points. The error model includes at least one of the following: fixed axial offset model, cortical tangent plane offset model, probability distribution sampling model, confidence ellipsoid model, registration error model, or equipment placement error model. For each offset coordinate, the offset coordinate is associated with the offset node that is closest to the offset coordinate, and the offset node information corresponding to the offset node is obtained to obtain the candidate scenario. The offset node information includes at least one of coordinate value, local normal vector and connected component label.
[0009] For example, the valid scenario includes the offset coordinates and the offset node information corresponding to the offset node; The step of constructing target regions corresponding to each of the effective scenarios based on the individual spatial model, and determining the area weight set corresponding to each of the target regions, includes: For each of the valid scenarios, obtain the neighboring node information corresponding to multiple neighboring nodes of the offset node; Based on the offset node information, the information of each of the adjacent nodes, the preset normal consistency condition, and the preset target area distance threshold, each of the adjacent nodes is filtered to obtain a target area node set. The area covered by the adjacent patches of all nodes in the target area node set is taken as the target area corresponding to the effective scenario; According to the preset area calculation rules, calculate the total area of the target area corresponding to the target area, and the area of each node in the target area. Based on the total area of the target region and the area of each node, the area weight of each node is calculated to obtain the set of area weights corresponding to the target region.
[0010] For example, the step of filtering each candidate scenario according to a preset judgment rule includes: Calculate the anatomical indices of each candidate scenario relative to the benchmark target, wherein the anatomical indices include at least one of surface connectivity component, geodesic path distance, local normal angle, and anatomical partition label; The anatomical indicators of each candidate scenario are compared with the preset consistency conditions. For each candidate scenario, if the anatomical indicators of the candidate scenario meet the consistency condition, the candidate scenario is marked as a valid scenario; If the anatomical indicators of the candidate scenario do not meet the consistency criteria, the candidate scenario is marked as an invalid scenario.
[0011] For example, the step of calculating at least one area coverage index for each effective scenario based on preset initial stimulus parameters and area weight sets corresponding to each target region includes: For each target region, the electric field value corresponding to each node is obtained through simulation calculation based on preset initial stimulation parameters. According to the electric field values corresponding to each node in ascending order, the area weights corresponding to each electric field value are accumulated one by one, and after each accumulation, the current accumulated weight is compared with the preset area coverage threshold. The current accumulated weight is the sum of the area weights corresponding to each electric field value that has been accumulated. When the accumulated weight is greater than or equal to the area coverage threshold, the accumulation of the area weight corresponding to each electric field value is stopped, and the electric field value corresponding to the last accumulated area weight is used as the area coverage index of the effective scenario corresponding to the target area.
[0012] For example, the step of generating target stimulus parameters based on the minimum value of each of the area coverage indicators and a preset design threshold includes: Read the minimum value of each of the area coverage indicators, the initial stimulus parameter, and the design threshold; The target stimulation parameters are obtained by calculating the minimum value of the area coverage index, the initial stimulation parameters, and the design threshold through a preset parameter algorithm. The target stimulation parameters include at least one of the following: total current, channel current, electrode position, polarity, electrode size, number of electrodes, branch opening and closing, and waveform parameters.
[0013] For example, after the step of generating the target stimulus parameters, the method further includes: Read the preset device constraints; The target stimulus parameters are rounded up according to the device constraints to obtain the device execution parameters. The device's execution parameters are simulated and verified using a preset verification method, which includes at least one of the following: direct finite element method, boundary element method, finite difference method, experimental current measurement, head model measurement, and multi-solver cross-verification. If the simulation verification is successful, the device execution parameters will be output as effective stimulus parameters.
[0014] Furthermore, to achieve the above objectives, this application also proposes a transcranial electrical stimulation parameter optimization device, which includes: The processing module is used to obtain the benchmark target point on the individual spatial model and generate multiple candidate scenarios corresponding to the benchmark target point based on the preset error model. The filtering module is used to filter each candidate scenario according to preset judgment rules to obtain multiple effective scenarios corresponding to the benchmark target. The allocation module is used to construct target regions corresponding to each of the effective scenarios based on the individual spatial model, and to determine the area weight set corresponding to each of the target regions. The calculation module is used to calculate at least one area coverage index for each effective scenario based on preset initial stimulus parameters and area weight sets corresponding to each target region, and to generate target stimulus parameters based on the minimum value of each area coverage index and a preset design threshold.
[0015] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the transcranial electrical stimulation parameter optimization method as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the transcranial electrical stimulation parameter optimization method described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the transcranial electrical stimulation parameter optimization method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains a baseline target point on an individual spatial model and generates multiple candidate scenarios corresponding to the baseline target point based on a preset error model. This modeling addresses the uncertainty of the target point's location, enabling subsequent parameter generation to be comprehensively evaluated across multiple possible offset locations. Preset judgment rules filter each candidate scenario to obtain valid scenarios, eliminating target points that fall into unreasonable anatomical structures due to error offsets. By constructing a corresponding target area for each valid scenario and determining the area weight of each node, at least one area coverage index for each valid scenario is calculated based on preset initial stimulation parameters. This accurately reflects the coverage of the simulated electric field within each target area, overcoming the defect of average field strength masking local low-field regions. By generating target stimulation parameters based on the minimum value among the area coverage indices and a preset design threshold, the electrical stimulation design requirements are ensured even under the most unfavorable valid scenarios. This application optimizes electrical stimulation parameters while considering both target point location uncertainty and coverage reliability, solving the problems of poor fault tolerance and low reliability in transcranial electrical stimulation parameter optimization methods. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating an embodiment of the transcranial electrical stimulation parameter optimization method of this application. Figure 2 This is a schematic diagram illustrating the conversion of the target point to an individual spatial model in one embodiment of the transcranial electrical stimulation parameter optimization method of this application. Figure 3 A schematic diagram of candidate scenarios provided for one embodiment of the transcranial electrical stimulation parameter optimization method of this application; Figure 4 This is a schematic diagram of the same-layer target area and cross-sulcus exclusion principle provided for one embodiment of the transcranial electrical stimulation parameter optimization method of this application; Figure 5 The five-electrode implementation results and channel connection diagram provided for one embodiment of the transcranial electrical stimulation parameter optimization method of this application; Figure 6 This is a system architecture diagram provided for one embodiment of the transcranial electrical stimulation parameter optimization method of this application; Figure 7 This is a schematic diagram of the module structure of the transcranial electrical stimulation parameter optimization device according to an embodiment of this application; Figure 8 This is a schematic diagram of the hardware operating environment involved in the transcranial electrical stimulation parameter optimization method in this application embodiment.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] The main solution in this application embodiment is: Existing electrical stimulation parameter generation schemes typically optimize only for a single fixed target, making it difficult to account for registration errors and operator placement errors. Target area evaluation often relies on average field strength, which may mask local low-field areas. Stimulation intensity control is based on scaling of a single point or average field strength, making it difficult to guarantee coverage after target offset. While some schemes apply a fixed offset to the target in three-dimensional space to simulate errors, the offset candidate position may cross anatomical boundaries and fall into adjacent areas, and Euclidean distance alone cannot identify such errors. Therefore, it is necessary to ensure that the positions involved in the evaluation correspond to the effective positions that may occur in clinical applications, while considering the uncertainty of target position.
[0026] This application provides a solution. First, an individual spatial model is constructed using image data. A preset target point is mapped onto the individual model to obtain a reference target point, which serves as the reference origin for subsequent positional uncertainty and parameter generation. Based on a preset error model, multiple candidate scenarios corresponding to the reference target point are generated, quantifying potential target positioning errors, registration errors, or operator placement errors in practical applications into a finite number of discrete positions. By calculating the anatomical indices of the candidate scenarios relative to the reference target point and comparing them with preset consistency conditions, invalid scenarios that fall into unreasonable anatomical structure regions due to three-dimensional spatial offset are eliminated. For each valid scenario, a corresponding target area is constructed on the individual spatial model, and the area weight of each node within the target area is calculated, so that the area coverage index can be calculated based on the actual area size represented by each node. Based on preset initial stimulus parameters, at least one area coverage index for each valid scenario is calculated to comprehensively reflect the coverage of the simulated electric field within each target area. Finally, target stimulus parameters are generated based on the minimum value among the area coverage indices and a preset design threshold, ensuring that preset requirements are still met even under the most unfavorable valid scenarios. Furthermore, the device execution parameters can be obtained by rounding up according to device constraints, and then verified and output after verification using a preset verification method. Through the above-mentioned methods, this application can generate electrical stimulation parameters that take into account both the uncertainty of target location and the reliability of coverage, effectively improving the fault tolerance of electrical stimulation parameters to different positional deviations and the stability of target area coverage.
[0027] Based on this, embodiments of this application provide a method for optimizing transcranial electrical stimulation parameters, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the transcranial electrical stimulation parameter optimization method of this application.
[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, processor, or instrument-built-in processing unit capable of performing the above functions. The following description uses an electronic computer as an example to illustrate this embodiment and the subsequent embodiments.
[0029] In this embodiment, the transcranial electrical stimulation parameter optimization method includes steps S10~S60: Step S10: Obtain the benchmark target point on the individual spatial model, wherein the individual spatial model includes multiple nodes, and the benchmark target point is one of the nodes. It should be noted that the individual spatial model is a three-dimensional digital model built based on the individual image data of the target to be stimulated. This model can discretize the target tissue using triangular mesh or tetrahedral mesh and is composed of multiple nodes and units. The nodes in the individual spatial model are the basic units that make up the mesh. Each node has attribute information such as spatial coordinates, local normal vectors, and connected component labels. The reference target point is the node corresponding to the desired stimulus position specified by the user on the individual spatial model. It is the reference origin for all subsequent position uncertainty modeling and parameter generation.
[0030] Additionally, it should be noted that the individual spatial model can include a volume mesh for solving the electric field and a cortical surface mesh for target location and coverage evaluation. The elements of the volume mesh are assigned tissue conductivity to obtain the three-dimensional electric field vectors at the volume mesh nodes using the finite element method. The cortical surface mesh is used to determine the baseline target, screen candidate scenarios, construct the target area, and calculate area weights. After the three-dimensional electric field vectors at the volume mesh nodes are mapped or interpolated to the cortical surface nodes, they are projected onto the local normal vectors at the cortical surface nodes. That is, the directional normal electric field is the component of the three-dimensional electric field vector in the direction of the local normal vector.
[0031] Specifically, image data of the target to be stimulated, such as magnetic resonance imaging (MRI), computed tomography (CT), or ultrasound images, is read. Image segmentation algorithms are used to segment the target tissue, and then surface reconstruction algorithms are used to construct an individual spatial model. Pre-defined target points are mapped onto the individual spatial model. These target points can be derived from MNI (Montreal Neurological Institute) standard spatial coordinates, brain atlases, structural MRI, electroencephalography (EEG) source localization, task-state or resting-state functional magnetic resonance imaging (fMRI), or transcranial magnetic stimulation (TMS). Various methods, such as Magnetic Stimulation (TMS) localization or clinical annotation, are used to transform the target point from standard space to individual space using image registration algorithms when the target point is located in standard space, obtaining the target point coordinates in the individual space model. Within the grid of the individual space model, the Euclidean distance between each node and the target point's spatial coordinates is calculated, and the node closest to the target point's spatial coordinates is determined as the reference target point. Preferably, anatomical constraints can be added when determining the reference target point, such as requiring the node to be located on the surface of the target tissue rather than inside it, to ensure that the reference target point is located in an effective position where electrical stimulation can be applied.
[0032] Step S20: Based on the preset error model, generate multiple candidate scenarios corresponding to the benchmark target. It should be noted that the error model is a mathematical model used to quantitatively describe the uncertainty of the target position. This model quantifies the uncertainties that may occur in practical applications, such as image registration error, functional positioning error, and operator placement error, into calculable perturbation parameters. The candidate scenario is a set of possible positions generated after applying position perturbation on the basis of the reference target. Preferably, each candidate scenario may include offset coordinates and the node information corresponding to the offset coordinates.
[0033] Specifically, the spatial coordinates of the reference target point on the individual spatial model are obtained as the reference coordinates, which serve as the origin for all subsequent perturbations. Based on preset perturbation parameters, the reference coordinates are perturbed using an error model. The error model can be any one or more combinations of the following methods: fixed axial offset model (applying a fixed amplitude offset along the positive and negative directions of the X, Y, and Z axes), cortical tangent plane offset model (sliding the offset point along the tissue surface), probability distribution sampling model (randomly sampling the offset from a preset probability distribution), confidence ellipsoid model (sampling within the confidence ellipsoid region), registration error model (generating the offset based on the error distribution of image registration), or device placement error model (generating the offset based on the operational deviation of electrode placement). The perturbation amplitude and the number of candidate scenarios can be configured according to the actual application scenario. For each offset coordinate, the node closest to the offset coordinate is found in the grid of the individual spatial model as the offset node. The node information of the offset node, such as coordinate values, local normal vectors, and connected component labels, is obtained. The offset coordinate is associated with the corresponding offset node information to form a candidate scenario.
[0034] Step S30: The candidate scenarios are screened according to the preset judgment rules to obtain multiple effective scenarios corresponding to the benchmark target. It should be noted that the judgment rules are a set of preset conditions used to determine whether a candidate scenario is located in the same anatomically continuous region as the baseline target; a valid scenario refers to a candidate scenario that has been selected by the judgment rules and meets the preset anatomical consistency conditions with the baseline target.
[0035] Specifically, for each candidate scenario, its anatomical indices relative to the benchmark target are calculated. These indices may include connected components, geodesic path distance, local normal angle, curvature, sulcus labels, cortical layer orientation, or anatomical zone labels. The anatomical indices of each candidate scenario are compared with preset consistency conditions. Preferably, the consistency conditions may include one or more of the following: the candidate scenario and the benchmark target are located in the same connected component; the geodesic path distance is less than or equal to a preset distance threshold (e.g., 5 mm); the local normal angle is less than or equal to a preset angle threshold (e.g., 60°); and the anatomical zone labels are consistent. If the anatomical indices of a candidate scenario meet the consistency conditions, the candidate scenario is marked as a valid scenario; otherwise, it is marked as an invalid scenario and is not included in any subsequent calculations.
[0036] Step S40: Construct the target area corresponding to each effective scenario based on the individual spatial model, and determine the area weight set corresponding to each target area. The area weight set includes the area weights corresponding to multiple nodes within the target area. It should be noted that the target area is a continuous region constructed around the center of the effective scenario on the surface of the individual spatial model, and is the electric field coverage evaluation range corresponding to the effective scenario; the area weight is the ratio of the actual cortical area represented by each node in the target area to the total area of the target area, which is used to reflect the degree of contribution of each node to the actual coverage area in the subsequent coverage index calculation.
[0037] Specifically, for each valid scenario, information about the neighboring nodes corresponding to multiple neighboring nodes of its offset node is obtained. A neighboring node is a node directly connected to the offset node through an edge of a triangular mesh. Based on the offset node information, the information of each neighboring node, a preset normal consistency condition, and a preset target area distance threshold, each neighboring node is filtered. Preferably, starting from the offset node, a region growing algorithm or a shortest path search algorithm is used to check whether each neighboring node satisfies the normal consistency condition and the distance condition. Nodes that simultaneously satisfy the above conditions are included in the target area node set, and the process continues to expand outwards from the newly included node until no more nodes meet the conditions. The areas covered by the adjacent faces of all nodes in the target area node set are merged to form the target area corresponding to the effective scenario. According to the preset area calculation rules, the node area corresponding to each node in the target area is calculated. For example, for each node in the target area, all triangular faces adjacent to the node are obtained, the area of each triangular face is calculated, and one-third of the sum of the areas of each triangular face is taken as the node area of the node. The node areas of all nodes in the target area are added together to obtain the total area of the target area. Based on the total area of the target area and the node areas of each node, the node area of each node is divided by the total area of the target area to obtain the area weight of the node. The sum of the area weights of all nodes in the target area is 1.
[0038] Step S50: Based on the preset initial stimulation parameters and the area weight set corresponding to each target area, calculate at least one area coverage index for each effective scenario. It should be noted that the initial stimulation parameters are the user-preset initial exploratory stimulation schemes, which may include parameters such as baseline total current, electrode position, and electrode size; the area coverage index is a value used to characterize the electric field coverage effect within a single effective scenario target area, which may include one or more of the following: area-weighted quantile, over-threshold area ratio, conditional risk value, and lower tail mean. Preferably, the area coverage index adopts the area-weighted lower tail quantile, which is the lowest electric field value that the worst part of the target area can achieve. This index comprehensively reflects the electric field strength of each node in the target area and the actual area size it represents.
[0039] For example, for each target region, based on preset initial stimulus parameters, the electric field value corresponding to each node is calculated through numerical simulation. The nodes are sorted in ascending order of their normal electric field values. The purpose of sorting is to start accumulating from the region with the lowest electric field strength to identify the region with the weakest electric field coverage within the target region. Starting from the node with the smallest electric field value, the area weight of each node is accumulated one by one to obtain the current accumulated weight. After each accumulation, the current accumulated weight is compared with a preset area coverage threshold. When the current accumulated weight first reaches or exceeds the area coverage threshold, the accumulation stops, and the electric field value corresponding to the last accumulated node is used as the area coverage index of the effective scenario corresponding to that target region.
[0040] Step S60: Based on the minimum value among the area coverage indicators and the preset design threshold, generate target stimulus parameters.
[0041] It should be noted that the minimum value in the area coverage index is used to characterize the electric field coverage level of the target area under the most unfavorable effective scenario; the design threshold is a preset electric field strength target value, which represents the minimum electric field strength expected to be reached by the target area under the worst-case scenario; the target stimulation parameters are the final output executable stimulation scheme, which may include one or more of the following: total current, current of each channel, electrode position, polarity, electrode size, number of electrodes, branch opening and closing status, and waveform parameters.
[0042] Specifically, the area coverage index of each effective scenario is read, and the minimum value is selected as the robust coverage index. The effective scenario corresponding to this minimum value is the one with the most unfavorable electric field coverage effect among all anatomically reasonable positions. The preset design threshold is read. The design threshold can be determined according to clinical needs, literature reports or previous experience. For example, in transcranial electrical stimulation, it can be set to any value in the range of 0.1 V / m to 0.5 V / m. Based on the robust coverage index and the design threshold, the target stimulation parameters are generated under the constraint that the robust coverage index is not lower than the design threshold.
[0043] This embodiment obtains a baseline target point on an individual spatial model and generates multiple candidate scenarios corresponding to the baseline target point based on a preset error model. This modeling addresses the uncertainty of the target point's location, enabling subsequent parameter generation to be comprehensively evaluated across multiple possible offset locations. Preset judgment rules are used to filter each candidate scenario to obtain valid scenarios, eliminating target points that fall into unreasonable anatomical structures due to error offsets. By constructing a corresponding target area for each valid scenario and determining the area weight of each node, at least one area coverage index for each valid scenario is calculated based on preset initial stimulation parameters. This accurately reflects the coverage of the simulated electric field within each target area, overcoming the defect of average field strength masking local low-field regions. Target stimulation parameters are generated based on the minimum value among the area coverage indices and a preset design threshold, ensuring that the electrical stimulation design requirements are met even under the most unfavorable valid scenarios. This application can optimize electrical stimulation parameters while considering both target point location uncertainty and coverage reliability, solving the problems of poor fault tolerance and low reliability in transcranial electrical stimulation parameter optimization methods.
[0044] In one feasible implementation, step S10 may further include steps S11 to S13: Step S11: Read the image data of the target to be stimulated and construct an individual spatial model based on the image data; Step S12: Map the preset target points to the individual spatial model to obtain the target point spatial coordinates; Step S13: Select the node in the individual spatial model that is closest to the target point's spatial coordinates as the reference target point.
[0045] It should be noted that imaging data refers to three-dimensional medical image data that can reflect the morphological characteristics of the target tissue to be stimulated, and is used to provide individualized anatomical information; the target point refers to the coordinate representation of the target location where the user expects to perform electrical stimulation in standard space or functional imaging space, and its source can be standard spatial coordinates, functional imaging activation areas, brain atlas partitions, or clinically designated locations; the target point spatial coordinates are a three-dimensional spatial point in the individual spatial model, which usually does not fall exactly on a grid node, but is located inside or on the edge of a triangular facet of the grid; the reference target point is the node corresponding to the expected stimulation location specified by the user on the individual spatial model, and is the reference origin for all subsequent location uncertainty modeling and parameter generation.
[0046] Specifically, the image data of the target to be stimulated is read. In transcranial electrical stimulation applications, T1-weighted structural MRI data is preferred because it provides good tissue contrast for gray and white matter, facilitating subsequent segmentation and modeling. Based on the acquired image data, an image segmentation algorithm is used to segment the target tissue. The segmentation algorithm can be any one of threshold-based segmentation, region-growing-based segmentation, active contour model-based segmentation, or deep learning-based segmentation algorithms. After segmentation, a binary mask image of the target tissue is obtained, and then a three-dimensional surface mesh model is generated using a surface reconstruction algorithm (such as the moving cube algorithm). This model typically contains hundreds of thousands of nodes and triangular facets. Preset target points are obtained. When the target point is located at the target... In quasi-space, image registration algorithms are needed to transform the data from standard space to individual space. First, the spatial transformation relationship between individual image data and the standard template image is calculated (using linear affine registration, nonlinear registration, or deep learning-based registration methods). Then, this transformation relationship is applied to the standard spatial coordinates of the target point to obtain the target point's spatial coordinates in the individual space. When the target point directly originates from the individual space (e.g., a clinician directly selects it on an individual MRI), no mapping is required, and the coordinates can be used directly. In the grid of the individual space model, all nodes are traversed, and the Euclidean distance between each node and the target point's spatial coordinates is calculated. The distance values corresponding to all nodes are compared, and the node with the closest distance is identified as the baseline target point. Preferably, anatomical constraints can be added when determining the baseline target point, such as requiring the node to be located on the surface of the target tissue rather than inside it. A maximum search radius can also be set; if the minimum distance exceeds this radius, the user is prompted to reconfirm whether the target point location is reasonable.
[0047] For example, please refer to Figure 2 , Figure 2 This diagram illustrates the conversion of the target point to the individual spatial model provided in this embodiment. An individual head model is constructed using structural MRI. The target point [-37, -21, 58] mm is a standard spatial target point located in the MNI space. Through registration or coordinate transformation, it is mapped to the individual space of the individual head model to obtain the scalp projection of the target point. Then, through nearest node matching, the 60964th cortical node [-33.2738, 0.4536, 61.2900] mm is found. This node is the reference target point corresponding to the target point.
[0048] This implementation method reads the image data of the target to be stimulated and constructs an individual spatial model based on the image data, obtaining a digital model that reflects the anatomical morphology of the individual tissue. This allows subsequent electric field simulation and parameter planning to be based on the actual anatomical structure rather than a general template, improving the individualization and accuracy of stimulation parameter planning. By mapping the preset target points to the individual spatial model, target points from various sources can be unified into the individual spatial coordinate system. By using the node in the individual spatial model that is closest to the target point's spatial coordinates as the reference target point, a directly referable node position is provided for subsequent calculations, avoiding physical field interpolation errors caused by the target point position being suspended inside the grid patch, thus improving the fault tolerance and reliability of the transcranial electrical stimulation parameter optimization method.
[0049] In one feasible implementation, the candidate scenarios include offset coordinates and offset node information corresponding to the offset nodes, and step S20 may further include steps S21 to S23: Step S21: Obtain the coordinates of the reference target point on the individual spatial model to obtain the reference coordinates; Step S22: Based on the preset perturbation parameters, the reference coordinates are perturbed by the error model to obtain the offset coordinates corresponding to multiple reference target points. The error model includes at least one of the following: fixed axial offset model, cortical tangent plane offset model, probability distribution sampling model, confidence ellipsoid model, registration error model or equipment placement error model. Step S23: For each offset coordinate, associate the offset coordinate with the offset node that is closest to the offset coordinate, obtain the offset node information corresponding to the offset node, and obtain the candidate scenario. The offset node information includes at least one of the following: coordinate value, local normal vector, and connected component label.
[0050] It should be noted that the perturbation parameters are the specific execution parameters of the error model, including the perturbation direction, perturbation amplitude, and number of candidate scenarios, used to control the generation range and distribution of candidate scenarios; the offset coordinates are a set of three-dimensional spatial coordinates obtained after the reference coordinates are perturbed by the error model, representing the various offset positions that the target point may appear at; the offset node is the node in the individual spatial model mesh that is closest to the offset coordinate, used to anchor the offset coordinate to the specific mesh cell of the model, so that the subsequent calculation of anatomical indicators and extraction of electric field values have clear node indexes; the offset node information is the attribute data carried by the offset node, which may include one or more of the following: the node's coordinate value, local normal vector, node number, connected component label, list of adjacent nodes, list of adjacent patches, surface curvature, and anatomical partition label.
[0051] Specifically, the three-dimensional spatial coordinates corresponding to the reference target point are read from the individual spatial model, and these coordinates are used as the reference coordinates for subsequent perturbation operations. According to the preset perturbation parameters, the reference coordinates are perturbed through the error model to generate multiple offset coordinates. For each offset coordinate, all nodes are traversed in the mesh of the individual spatial model, the Euclidean distance between each node and the offset coordinate is calculated, and the node with the closest distance is selected as the offset node corresponding to the offset coordinate. The attribute information carried by the offset node is read from the individual spatial model, including at least the coordinate value, local normal vector, and connected component label. The offset coordinate is associated with the corresponding offset node information to form a candidate scenario. The data processing process can be represented by formula (1): x s =x0+Δx s , s∈S (1) Where x0 represents the three-dimensional coordinate vector of the reference target point on the individual spatial model, Δx s Let x represent the three-dimensional perturbation vector corresponding to the s-th candidate scenario. s Let S represent the offset coordinates corresponding to the s-th candidate scenario, and let S represent the set of all candidate scenarios.
[0052] For example, please refer to Figure 3 , Figure 3 This is a schematic diagram of the candidate scenarios. The target area is the left primary motor cortex, and the individual spatial coordinates of the reference target point are [-33.2738, 0.4536, 61.2900] mm. The perturbation amplitude is set to 3 mm. A fixed axial offset model is used as the error model, and the offset is 3 mm in each of the positive and negative directions of the X, Y, and Z axes, generating a total of 7 candidate scenarios. Taking the positive Y-axis offset as an example: after the reference coordinates are perturbed by 3 mm along the positive Y-axis, the offset coordinates are obtained as [-33.2738, 3.4536, 61.2900] mm. The nodes of the individual cortical surface model are traversed, and the node with the closest Euclidean distance to the offset coordinate is found as the offset node. The coordinate value, local normal vector and connected component label of the node are read. The offset coordinates are associated with the offset node information to form the Y+3 mm candidate scenario. Similarly, the offset coordinates in the other six directions are associated with the corresponding offset nodes to form a complete set of 7 candidate scenarios. The offset of the reference target point scenario is zero. The X+3 mm, X-3 mm, Y-3 mm, Z+3 mm and Z-3 mm scenarios correspond to the offset positions of each axis, providing input for subsequent same-layer determination. The candidate scenario set consists of the reference target point and multi-directional position perturbations, which are used to describe the uncertainty of the target point position.
[0053] This implementation method, by acquiring and perturbing the reference coordinates, can quantify various positioning errors that may occur in practical applications into a finite number of discrete candidate positions. This allows subsequent parameter generation to be comprehensively evaluated across multiple possible positions rather than relying solely on a single ideal position. By using different types of error models to generate offset coordinates, it can adapt to different error sources and application scenarios. By associating the offset coordinates with the nearest offset node and obtaining its node information, it provides directly referential node indices and grid attribute data for subsequent anatomical index calculations. This avoids attribute interpolation errors caused by coordinates being suspended inside the grid patch, further improving the accuracy and fault tolerance of the transcranial electrical stimulation parameter optimization method.
[0054] In one feasible implementation, step S30 may further include steps S31 to S34: Step S31: Calculate the anatomical indices of each candidate scenario relative to the baseline target point. The anatomical indices include at least one of the following: surface connectivity component, geodesic path distance, local normal angle, and anatomical partition label. It should be noted that anatomical metrics are a set of parameters used to quantify the anatomical positional relationship between candidate scenarios and benchmark targets. These metrics reflect whether the candidate scenario and the benchmark target are located within the same anatomically continuous region. Surface connectivity components (or cortical surface connectivity components) are the smallest independent units of interconnected surface regions in the individual spatial model. There exists a continuous path between any two nodes within the same connectivity component, entirely lying on that surface. Different connectivity components are separated by anatomical fissures (such as sulci) or tissue boundaries. Geodesic path distance refers to the shortest path length along the surface of the individual spatial model from one node to another, measured in millimeters. This differs from Euclidean linear distance in three-dimensional space and reflects the true cortical surface distance. Local normal angle refers to the spatial angle between the local normal vector of the candidate scenario's location and the local normal vector of the benchmark target's location, measured in degrees. The size of this angle reflects the degree of difference in the surface orientation of the two locations. Anatomical partition labels are the identifiers of the anatomical functional or structural partitions to which each node in the individual spatial model belongs, used to determine whether the candidate scenario and the benchmark target belong to the same anatomical region.
[0055] Step S32: Compare the anatomical indicators of each candidate scenario with the preset consistency conditions; Step S33: For each candidate scenario, if the anatomical indicators of the candidate scenario meet the consistency condition, the candidate scenario is marked as a valid scenario. Step S34: If the anatomical indicators of the candidate scenario do not meet the consistency condition, the candidate scenario is marked as an invalid scenario.
[0056] It should be noted that the consistency condition is a preset judgment criterion used to determine whether the anatomical indicators of the candidate scenario meet the requirement that they are located in the same anatomical slice as the benchmark target; a valid scenario refers to a candidate scenario that passes the consistency condition judgment, and an invalid scenario refers to a candidate scenario that fails the consistency condition judgment.
[0057] Specifically, for each candidate scenario, its anatomical indices relative to the baseline target are calculated. When the anatomical indices include surface connectivity components, the system obtains the connectivity component labels of the nodes where the candidate scenario is located and compares them with the connectivity component labels of the baseline target. When the anatomical indices include geodesic path distances, the system uses the offset node of the candidate scenario as the starting point and the baseline target as the ending point, and employs a shortest path algorithm to calculate the shortest path length between them along the surface of the individual spatial model. When the anatomical indices include local normal angles, the system reads the local normal vectors of the offset node of the candidate scenario and the local normal vectors of the baseline target, calculates the spatial angle between them, and then calculates the angle between them. When the label includes anatomical partition labels, the anatomical partition labels of the candidate scenario offset nodes are obtained and compared with the anatomical partition labels of the baseline target points; the anatomical indicators of each candidate scenario are compared with the preset consistency conditions, which can be a single condition or a combination of multiple conditions; each candidate scenario is marked according to the comparison results. If the anatomical indicators of the candidate scenario meet the preset consistency conditions, the candidate scenario is marked as a valid scenario and allowed to enter the subsequent target area construction and area coverage indicator calculation process; if it does not meet the consistency conditions, the candidate scenario is marked as an invalid scenario and excluded from all subsequent calculations. The data processing process can be represented by formula (2): valid(s) = 1{d geo (s)≤d max , angle(n s ,n ref )≤α max C s =C ref} (2) Where s is the index number of the candidate scenario currently being evaluated; valid(s) represents the validity marking function of candidate scenario s, with a value of 1 indicating that the candidate scenario is marked as a valid scenario, and a value of 0 indicating that it is marked as an invalid scenario; d geo d represents the geodesic path distance from candidate scenario s along the cortical surface to the reference target point; max n is the preset geodetic distance threshold; s n represents the local unit normal vector at the location of candidate scenario s; ref This represents the local unit normal vector at the location of the reference target point; angle(n) s ,n refα represents the spatial angle between the local normal vector of candidate scenario s and the local normal vector of the reference target point; max This represents the preset normal angle threshold; C s C represents the cortical connectivity component label or anatomical sheet label to which candidate scenario s belongs. ref This indicates the cortical connectivity component label or anatomical slice label to which the baseline target belongs.
[0058] To facilitate understanding of the solution described in this embodiment, please refer to... Figure 4 , Figure 4 The diagram of the same-layer target area and cross-sulcus exclusion principle provided in this embodiment shows that if only (a) simple Euclidean offset is used to determine the candidate scenario, the reference target point is located at a position on the left sulcus wall, and the candidate point Y+3 mm is obtained by a 3 mm Euclidean straight line offset. Since the gyral walls on both sides of the sulcus are very close in three-dimensional space, the 3 mm offset is sufficient to allow the candidate point to cross from the sulcus wall where the reference target point is located to the adjacent sulcus wall. At this time, the local normal direction of the candidate point is significantly different from that of the reference target point. However, since the Euclidean distance between the two in three-dimensional space is very small, it is impossible to identify that the candidate point has crossed the anatomical boundary by simply relying on the distance threshold. The same-layer constraint screening method of this embodiment (b) first checks whether the candidate point and the reference target point are located on the same surface connectivity component, that is, whether they are on the same continuous cortical surface. Then, the geodesic path distance between the two (the shortest path along the cortical surface) is calculated, and the local normal angle between the candidate point and the reference target point is measured. Only when the candidate point meets multiple conditions such as surface connectivity, geodesic distance less than or equal to a preset threshold, and normal angle less than or equal to a preset threshold, is it considered to be on the same cortical layer as the reference target point. This can effectively eliminate the mismatch of adjacent sulci walls caused by three-dimensional coordinate offset.
[0059] This implementation method calculates the anatomical indices of candidate scenarios relative to the baseline target point, enabling the quantification of the anatomical positional relationship between the candidate scenarios and the baseline target point from multiple dimensions such as connectivity, distance, orientation, and region affiliation. This overcomes the limitation of relying solely on three-dimensional Euclidean distance, which cannot identify cross-boundary offsets. By comparing the anatomical indices of each candidate scenario with preset consistency conditions, it can distinguish between valid and invalid scenarios using quantifiable criteria, avoiding the uncertainty introduced by subjective judgment. Based on this, candidate scenarios that meet the consistency conditions are selected as valid scenarios, ensuring that the candidate positions participating in subsequent target area construction and coverage evaluation all meet the preset anatomical consistency requirements with the baseline target point, thereby improving the accuracy and reliability of transcranial electrical stimulation parameters.
[0060] In one feasible implementation, the effective scenario includes offset coordinates and offset node information corresponding to the offset node, and step S40 may further include steps S41 to S45: Step S41: For each valid scenario, obtain the neighboring node information corresponding to multiple neighboring nodes of the offset node; Step S42: Based on the offset node information, the information of each adjacent node, the preset normal consistency condition and the preset target area distance threshold, each adjacent node is filtered to obtain the target area node set. It should be noted that adjacent nodes refer to nodes directly connected to offset nodes through the edges of the triangular mesh; adjacent node information refers to the attribute data carried by adjacent nodes; the normal consistency condition is an orientation constraint used to determine whether adjacent nodes and offset nodes are located in the same anatomical slice, specifically, the angle between the local normal vector of the adjacent node and the local normal vector of the offset node is less than or equal to a preset angle threshold. This condition ensures that the target area will not cross anatomical boundaries (such as the edge of the sulcus) and extend into areas where the orientation changes abruptly; the target area distance threshold is the upper limit of the geodesic distance used to limit the extent of the target area on the cortical surface, specifically, the geodesic path distance from the adjacent node to the offset node along the cortical surface is less than or equal to a preset distance threshold; the target area node set is the set of nodes obtained after dual screening by the normal consistency condition and the target area distance threshold.
[0061] Specifically, for each valid scenario, the first-order neighbor nodes of its offset node in the individual spatial model grid are obtained, that is, all nodes directly connected to the offset node through the edges of the triangular mesh, and the attribute information carried by these neighboring nodes is read, including at least coordinate values and local normal vectors. Based on the offset node information (including at least the local normal vector and coordinate values of the offset node), the information of each neighboring node (including at least the local normal vector and coordinate values of the neighboring node), the preset normal consistency condition (angle threshold, such as 60°), and the preset target area distance threshold (geodetic distance upper limit, such as 3 mm), each neighboring node is screened. The screening process starts from the offset node and can use a region growing algorithm to check whether the angle between the local normal vector of each neighboring node and the local normal vector of the offset node is less than or equal to the angle threshold. At the same time, the geodesic path distance from the neighboring node along the cortical surface to the offset node is calculated to see if it is less than or equal to the distance threshold. The neighboring nodes that meet both of the above conditions are included in the target area node set, and the process continues to expand outward from the newly included nodes until no more nodes can be included.
[0062] Step S43: The area covered by the adjacent patches of all nodes in the target area node set is taken as the target area corresponding to the effective scenario. Step S44: Calculate the total area of the target area and the area of each node in the target area according to the preset area calculation rules. Step S45: Based on the total area of the target area and the area of each node, calculate the area weight of each node to obtain the set of area weights corresponding to the target area.
[0063] It should be noted that adjacent facets refer to triangular or polygonal facets with any node in the target area node set as a vertex. The continuous surface area formed by merging all adjacent facets is the target area corresponding to the effective scenario. The area calculation rule is a mathematical rule used to calculate the area of nodes. The total area of the target area is the sum of the areas of all nodes in the target area, reflecting the size of the physical area covered by the target area. The area weight is the ratio of the node area to the total area of the target area. The sum of the area weights of all nodes in the target area is 1, which is used to reflect the actual area ratio represented by each node in the subsequent coverage index calculation.
[0064] Specifically, the system merges the areas covered by the triangular facets (i.e., adjacent facets) of all nodes in the target area node set to form a continuous surface area, which serves as the target area corresponding to the effective scenario. The system calculates the node area corresponding to each node in the target area according to preset area calculation rules: For each node in the target area, all adjacent triangular facets are obtained, the geometric area of each triangular facet is calculated, and the sum of the areas of each triangular facet is divided by 3. The result is the node area of that node. The node areas of all nodes in the target area are added together to obtain the total area of the target area. The system divides the node area of each node by the total area of the target area to obtain the area weight corresponding to each node. The sum of the area weights of all nodes is 1. The node number is associated with and stored with the corresponding area weight to form the area weight set of the target area. The data processing process can be represented by formula (3): (3) in, Let i represent the cortical area represented by node i, N(i) represent the set of triangular faces adjacent to node i, f is any triangular face in N(i), and Area(f) represent the geometric area of triangular face f.
[0065] As an example, referring to Table 1, which shows the results of scene screening and area calculation within the same layer provided in this embodiment, the consistency condition for the local normal angle is set to ≤60°. Among these, the candidate scene with a positive Y-direction offset of 3mm has a normal angle of 85.54°, exceeding the 60° threshold. Furthermore, upon inspection, this candidate scene has crossed the sulcus and entered the adjacent gyral wall, no longer belonging to the same surface connected component as the reference target point. Therefore, it does not meet the consistency condition and is marked as an invalid scene. The normal angles of the remaining 6 candidate scenes are all less than or equal to 60°, and all are located in the same surface connected component as the reference target point, meeting the consistency condition and being marked as valid scenes. Each scene has a different number of nodes and physical area in its target region.
[0066] Table 1. Examples of Scene Filtering and Area Calculation Results for the Same Layer
[0067] This implementation method acquires the neighboring node information of the offset node for each valid scenario, providing an initial set of candidate nodes for target area construction. It then filters neighboring nodes based on the offset node information, neighboring node information, preset normal consistency conditions, and target area distance thresholds, excluding neighboring nodes with excessively large local normal angles or excessively long geodesic path distances from the target area. By constructing a continuous target area, it calculates the node area and the total target area according to area calculation rules, determining the area weight of each node within the target area. This ensures that the area weight objectively reflects the actual area proportion of each node within the target area, providing an accurate data foundation for subsequent area coverage index calculations and improving the reliability of the transcranial electrical stimulation parameter optimization method.
[0068] In one feasible implementation, step S50 may further include steps S51 to S53: Step S51: For each target region, based on the preset initial stimulation parameters, the electric field value corresponding to each node is obtained through simulation calculation. Step S52: According to the electric field values corresponding to each node in ascending order, the area weights corresponding to each electric field value are accumulated one by one, and the current accumulated weight is compared with the preset area coverage threshold after each accumulation. The current accumulated weight is the sum of the area weights corresponding to each electric field value that has been accumulated. Step S53: When the accumulated weight is greater than or equal to the area coverage threshold, stop accumulating the area weights corresponding to each electric field value, and use the electric field value corresponding to the last accumulated area weight as the area coverage index of the effective scenario corresponding to the target area.
[0069] It should be noted that simulation calculation refers to the process of calculating the electric field distribution of each node in the individual spatial model through numerical solution methods; the electric field value in this embodiment is preferably the directional normal electric field value, that is, the component value obtained by projecting the three-dimensional electric field vector of each node onto the local normal direction of the node, which reflects the electric field intensity perpendicular to the cortical surface; the area coverage threshold is a preset proportion value, which can be represented by p, indicating that the user expects at least this proportion of the cortical area in the target area to reach or exceed a certain electric field intensity; the current accumulated weight is the sum of the area weights of each node accumulated during the accumulation process, indicating the proportion of the target area that has been cumulatively covered from the region with the lowest electric field to the total area; the area coverage index is the final evaluation result of a single effective scenario, which characterizes the lowest electric field value that can be achieved by the (1-p) proportion of the area with the worst electrical stimulation effect in the target area under the effective scenario. For example, when p is set to 90%, the area coverage index is the lowest electric field value that can be achieved by the 10% of nodes with the worst electrical stimulation effect in the target area.
[0070] Specifically, for each target region, based on the electrode position, electrode size, and baseline total current in the initial stimulation parameters, the finite element method is used. The method (FEM) solves the Laplace equation or Maxwell's equations to obtain the three-dimensional electric field vectors of each node in the individual spatial model. The three-dimensional electric field vectors of each node are projected onto the local normal direction of that node to obtain the normal electric field value of each node. All nodes in the target area are sorted in ascending order of their electric field values. Starting from the node with the smallest electric field value, the area weights corresponding to each node are accumulated one by one. After each accumulation, the current accumulated weight is recorded in real time and compared with a preset area coverage threshold. The physical meaning of the current accumulated weight is the proportion of the target area covered, starting from the region with the lowest electric field, to the total area. When the current accumulated weight reaches or exceeds the area coverage threshold, accumulation stops, and the electric field value corresponding to the last accumulated node is used as the area coverage index p of the effective scenario corresponding to that target area. This index means that under this effective scenario, at least p proportions of the area within the target area reach or exceed the electric field value. Nodes with lower electric fields but larger area weights contribute more during the accumulation process, avoiding the evaluation bias caused by substituting the number of nodes for the actual coverage area, and overcoming the defect of the average field strength masking local low field areas.
[0071] Preferably, the area coverage index is defined for the target node set R in scenario s. s According to area weight a i To calculate the weighted quantiles of the directional normal electric field, if a target area of at least p proportion is required to reach the design field strength, then the lower tail quantile of 1-p is used. The data processing can be represented by formula (4): (4) in, The area coverage index represents the effective scenario s, p represents the preset area coverage ratio (ranging from 0 to 1), and (1-p) represents the lower tail area ratio, that is, the proportion of the area with the lowest electric field intensity in the target region. This is the area-weighted quantile function, where the superscript (A) indicates area weighting and the subscript (1) indicates area weighting. p) indicates that the function takes the cumulative area percentage to reach (1) The electric field value corresponding to p), The set of target nodes representing the effective scenario s, This represents the directional normal electric field value at node i, which is the component of the three-dimensional electric field vector projected onto the local normal direction at that node.
[0072] This implementation method simulates and calculates the electric field value of each node in the target area of each effective scenario based on preset initial stimulation parameters. The electric field values are sorted from smallest to largest and then accumulated with area weights. This accumulation process starts from the node with the lowest electric field, directly locating the area with the weakest electric field coverage in the target area, avoiding the defect of the average field strength masking local low field areas. By comparing the current accumulated weight with a preset area coverage threshold, and using the electric field value corresponding to the current node as the area coverage index when the accumulated weight reaches the threshold, this index can intuitively reflect the lowest electric field value that can be achieved in the area with the worst electrical stimulation effect in the target area. This provides a quantifiable evaluation basis for subsequent cross-scenario worst value selection and parameter generation, improving the fault tolerance and reliability of the transcranial electrical stimulation parameter optimization method.
[0073] In one feasible implementation, step S60 may further include steps S61 to S62: Step S61: Read the minimum value, initial stimulus parameters, and design threshold of each area coverage index; Step S62: Calculate the minimum value, initial stimulation parameters, and design threshold in the area coverage index using a preset parameter algorithm to obtain the target stimulation parameters. The target stimulation parameters include at least one of the following: total current, channel current, electrode position, polarity, electrode size, number of electrodes, branch opening / closing, and waveform parameters.
[0074] It should be noted that the minimum value among the various area coverage indices is used to characterize the electric field coverage level of the target area under the most unfavorable effective scenario, serving as a robust coverage index for optimizing electrical stimulation parameters. The design threshold is a user-preset target value for electric field strength, representing the minimum electric field strength expected to be reached by the target area under the worst-case scenario. Its value can be determined based on clinical needs, literature reports, or previous experimental experience. For example, in transcranial electrical stimulation, it can be set to any value within the range of 0.1 V / m to 0.5 V / m. The parameter algorithm is a mathematical method used to generate target stimulation parameters based on the robust coverage index and the design threshold. Its core is to calculate or search for the optimal combination of stimulation parameters under the constraint that the robust coverage index is not lower than the design threshold. It can be one of the following algorithms: analytical scaling, convex optimization, integer programming, enumeration search, multi-objective optimization, or a combination of several of these algorithms.
[0075] Specifically, the minimum value among the various area coverage indicators is used as the robust coverage indicator. The system reads the area coverage indicators of each effective scenario calculated in step S50 and selects the minimum value as the robust coverage indicator. Simultaneously, the system reads the preset design threshold and initial stimulation parameters. The design threshold can be set by the user according to clinical needs; based on the preset parameter algorithm, the target stimulation parameters are generated under the constraint that the robust coverage indicator is not lower than the design threshold.
[0076] For example, when the electrode geometry is fixed and the quasi-static linearity condition is satisfied, the electric field and current are linearly related. The target total current can be calculated based on the baseline total current, robust coverage index, and design threshold. The data processing can be expressed by formula (5): I rec =I base ×E design / R min (5) Among them, I base R is the baseline total current. min E represents the minimum value among all area coverage indicators (i.e., the robust coverage indicator). design The target total current is set as the preset design threshold. After calculating the target total current, the current of each electrode is synchronously scaled according to the ratio of the target total current to the baseline total current to obtain the target current of each channel. When it is necessary to optimize the electrode position or electrode on / off state simultaneously, algorithms such as convex optimization, integer programming, or multi-objective optimization can be used to solve for the optimal combination of stimulation parameters under the constraint that the robust coverage index is not lower than the design threshold.
[0077] This implementation method calculates the minimum value of the area coverage index, the initial stimulation parameters, and the design threshold using a preset parameter algorithm. Under the constraint that the robust coverage index is not lower than the design threshold, the parameters are generated in reverse. This ensures that even the most unfavorable coverage result in all effective scenarios can meet the design requirements during subsequent parameter generation. It avoids overfitting schemes caused by optimizing only the baseline target point. The target stimulation parameters are generated under the constraint that the robust coverage index is not lower than the design threshold, thus ensuring the fault tolerance of the transcranial electrical stimulation parameter optimization method.
[0078] In one feasible implementation, after the step of generating the target stimulation parameters in step S60, the transcranial electrical stimulation parameter optimization method further includes steps A10 to A40: Step A10: Read the preset device constraints; Step A20: Calculate the target stimulus parameters by rounding up according to the equipment constraints to obtain the equipment execution parameters; It should be noted that device constraints refer to the hardware limitations and operational constraints of the stimulation device, including parameters such as current step size (the minimum current increment that the device can output), maximum allowable current for a single electrode, and total current limit, which are used to ensure that the generated stimulation parameters can be accurately executed on a real physical device; rounding up calculation refers to the process of rounding the theoretical calculated value up to the minimum executable value that is not less than the theoretical value when the device has discrete current step size; device execution parameters are a set of executable parameters obtained by adjusting the target stimulation parameters according to the device constraints.
[0079] Specifically, the system reads preset device constraints, including current step size, maximum allowable current per electrode, and total current limit. These constraints can be preset during system initialization or manually configured by the user based on the specific stimulation device being used. The target stimulation parameters are rounded up according to the device constraints. When the target total current calculated in step S60 is a continuous theoretical value, it is rounded up according to the device current step size to ensure that the rounded value is greater than or equal to the theoretical target value. The target total current is divided by the current step size, rounded up, and then multiplied by the current step size to obtain the total current value that the device can execute. After rounding, the system checks whether the current in each channel exceeds the maximum allowable current per electrode. If it does, a warning is issued or automatic adjustment is performed. Under the current conservation constraint, the sum of all anode currents is equal to the absolute value of the sum of all cathode currents.
[0080] Step A30: Simulate and verify the device execution parameters using a preset verification method. The verification method shall include at least one of the following: direct finite element method, boundary element method, finite difference method, experimental current measurement, head model measurement, and multi-solver cross-verification. Step A40: If the simulation verification is successful, output the device execution parameters as valid stimulus parameters.
[0081] It should be noted that the preset verification methods are used to confirm whether the electric field distribution of the device's execution parameters in the physical model is consistent with the design expectations; Direct Finite Element Method (FEM) refers to directly solving the complete model and given electrode configuration using complete finite element methods, as opposed to reduced-order models or surrogate models that may be used in the optimization iteration process; Boundary Element Method (BEM) is a numerical method that discretizes only the region boundaries; Finite Difference Method (FDM) is a numerical method that transforms partial differential equations into difference equations for solution; Experimental current measurement is a method that directly measures the current or electric field distribution through physical experiments; Head model measurement is a method that verifies the results by combining a physical head model with measurement equipment; Multi-solver cross-validation is a method that uses two or more different numerical methods to solve the same problem and compares the consistency of the results to improve credibility; Simulation verification passing means that the verification results meet the preset conditions, including robust coverage index reaching or exceeding the design threshold, and the relative L2 error of the whole cortex being within an acceptable range; Effective stimulation parameters are the final output parameters that are verified to meet the design requirements.
[0082] Specifically, the device execution parameters are simulated and verified using a preset verification method. Verification can employ any one or more combinations of the following methods: direct finite element method, boundary element method, finite difference method, experimental current measurement, head model measurement, or multi-solver cross-verification. After verification, the system integrates the verification results, including whether the robust coverage index reaches the design threshold, worst-case scenario identification, worst-case coverage rate, and relative L2 error across the entire cortex. If the verification results meet preset conditions (e.g., the robust coverage index reaches the design threshold and the relative L2 error is within an acceptable range), the verification is considered successful, and the device execution parameters are output as valid stimulus parameters. If the verification results do not meet preset conditions, the system can return to step S60, i.e., under the constraint that the robust coverage index is not lower than the design threshold, the target stimulus parameters are regenerated. Preferably, the system can recalculate the target stimulus parameters based on the deviation between the actual robust coverage index and the design threshold in the verification results, using a parameter algorithm. For example, the design threshold can be appropriately increased, or the total current value in the initial stimulus parameters can be readjusted. The parameter generation and verification process is then re-executed, and after successful re-verification, the corresponding device execution parameters are output as valid stimulus parameters. If the verification fails after multiple attempts, the system will output a verification failure message and terminate the process.
[0083] For example, the final output of the transcranial electrical stimulation parameter optimization method may include: the baseline target point and effective location scenario, excluded scenarios and reasons for exclusion, stimulation electrode position, size, polarity and channel connection, recommended total current and current of each channel, worst-case scenario and robust coverage guarantee field, worst-case area coverage rate under the target threshold, current reduction ratio or robust margin relative to a fixed dose, root mean square electric field strength in the non-target area, high field area at the distal end and other optional evaluation indicators, as well as simulation verification status and consistency error.
[0084] As an example, please refer to Figure 5 , Figure 5 This embodiment provides the implementation results and channel connection diagram for a five-electrode setup. Specifically, in this embodiment, using the international 10-10 electrode placement system, a stimulation array is constructed with five electrodes. Channel 1 is the central anode (labeled "Anode / +1"), and channels 2 to 5 are the common cathode (labeled "Common Cathode / -I Total Return"). The sum of the currents at the common cathode is equal to the absolute value of the anode current to achieve current conservation. The electrode parameters include a circular shape with a diameter of 50 mm and a thickness of 5 mm. The stimulation parameters include a baseline total current of 2.0 mA, a stimulation time of 20 min, and a maximum allowable current per electrode of 2.0 mA.
[0085] Specifically, based on a robust 2 mA baseline field and a design threshold of 0.100 V / m, the system generated a theoretically lowest total current of 1.851639605 mA, a reduction of approximately 7.4180% compared to 2 mA. While maintaining the geometry of the C3 central anode and the four common cathodes (Cz, F3, T7, P3), the Direct FEM was re-run for verification. The verification results showed that the recommended total current was 1.851639605 mA, with the C3 central anode at +1.851639605 mA and the surrounding common cathodes totaling -1.851639605 mA. The robust 90% normal field of the Direct FEM was 0.100000000 V / m, perfectly consistent with the design threshold of 0.100 V / m. The worst-case scenario was Z-3 mm, with a worst 0.100 V / m coverage of 91.3769%, and a full-skin relative L2 error of 1.2468 × 10⁻⁶. -13 The relative L2 error of the electric field amplitude across the entire cortex is 5.7947 × 10⁻⁶. -14 The overall verification status is passed. The above verification results show that, for a fixed individual head model, electrode positions, and tissue properties, the electric field and current have a highly linear relationship, and the recommended current meets the robust area coverage requirements for all effective location scenarios.
[0086] This implementation method reads preset device constraints to match the generated target stimulation parameters with the actual hardware specifications of the stimulation device, ensuring consistency between theoretical calculations and physical execution values. By rounding the target stimulation parameters up according to the device constraints, the actual output value after rounding is ensured not to be lower than the theoretical target value during discretization, avoiding the failure to meet coverage targets due to rounding down. By simulating and verifying the device execution parameters, the device execution parameters are output as valid stimulation parameters if the simulation verification is successful. This ensures that the final output parameters are verified, meet the preset robust coverage requirements, and can be accurately executed on real stimulation devices, further improving the reliability and fault tolerance of the transcranial electrical stimulation parameter optimization method.
[0087] In one feasible implementation, please refer to Figure 6 , Figure 6 The system architecture diagram provided for this embodiment is shown below. Specifically, the transcranial electrical stimulation parameter optimization system is divided into an input layer, a core processing layer, and an output layer. The input layer contains three types of input data: individual image and model input (structural MRI, head model, cortical surface mesh, tissue properties), target input (MNI target, functional localization target, brain atlas target, clinically designated target), and device and constraint input (candidate electrode, single electrode upper limit, total current upper limit, number of active electrodes, device step size). The above three types of inputs together constitute the entire data foundation for subsequent processing.
[0088] The core processing layer processes the input data, including: Module 1, the image and model input module, which receives individual images and model data from the input layer; Module 2, the individual target determination module, which receives target input and determines the baseline target; Module 3, the scenario generation module, which generates multiple candidate scenarios around the baseline target; Module 4, the same-layer determination module, which uses anatomical indicators such as surface connectivity, geodesic distance, and normal angle to screen candidate scenarios and outputs valid location scenarios and reasons for exclusion; Module 5, the electric field solution module, which calculates the electric field distribution of the target area based on valid scenarios and input stimulus parameters; Module 6, the area coverage evaluation module, which calculates the area coverage index of each scenario based on the electric field distribution and area weight and takes the worst value across scenarios; Module 7, the parameter generation module, which generates the minimum total current or electrode parameters based on the worst coverage index and design threshold; and Module 8, the verification and output module, which verifies the generated parameters through methods such as Direct FEM and outputs the recommended total current and current of each channel.
[0089] The output layer outputs four core results: effective location scenarios and reasons for exclusion, stimulation electrode configuration and channel connection, recommended total current and current of each channel, worst-case scenario and robust coverage index, and Direct FEM validation results.
[0090] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the transcranial electrical stimulation parameter optimization method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0091] This application also provides a transcranial electrical stimulation parameter optimization device; please refer to [reference needed]. Figure 7 The transcranial electrical stimulation parameter optimization device includes: The processing module 10 is used to obtain the benchmark target point on the individual spatial model and generate multiple candidate scenarios corresponding to the benchmark target point based on the preset error model. The filtering module 20 is used to filter each candidate scenario according to a preset judgment rule to obtain multiple effective scenarios corresponding to the benchmark target. Allocation module 30 is used to construct target regions corresponding to each of the effective scenarios based on the individual spatial model, and to determine the area weight set corresponding to each of the target regions. The calculation module 40 is used to calculate at least one area coverage index for each effective scenario based on preset initial stimulation parameters and area weight sets corresponding to each target area, and to generate target stimulation parameters based on the minimum value of each area coverage index and a preset design threshold.
[0092] The transcranial electrical stimulation (TES) parameter optimization device provided in this application employs the TES parameter optimization method described in the above embodiments, which can solve the technical problems of poor fault tolerance and low reliability in the TES parameter optimization method. Compared with the prior art, the beneficial effects of the TES parameter optimization device provided in this application are the same as those of the TES parameter optimization method provided in the above embodiments, and other technical features in the TES parameter optimization device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0093] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the transcranial electrical stimulation parameter optimization method in Embodiment 1 above.
[0094] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0095] like Figure 8As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0096] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0097] The electronic device provided in this application employs the transcranial electrical stimulation parameter optimization method described in the above embodiments, which can solve the technical problems of poor fault tolerance and low reliability in the transcranial electrical stimulation parameter optimization method. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the transcranial electrical stimulation parameter optimization method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0098] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0099] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0100] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the transcranial electrical stimulation parameter optimization method in the above embodiments.
[0101] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0102] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0103] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: Obtain a benchmark target point on an individual spatial model, wherein the individual spatial model includes multiple nodes, and the benchmark target point is one of the nodes; Based on a preset error model, multiple candidate scenarios corresponding to the benchmark target are generated. By using preset judgment rules, each candidate scenario is screened to obtain multiple effective scenarios corresponding to the benchmark target. Based on the individual spatial model, target regions corresponding to each of the effective scenarios are constructed, and area weight sets corresponding to each of the target regions are determined. The area weight sets include area weights corresponding to multiple nodes within the target region. Based on the preset initial stimulation parameters and the area weight set corresponding to each target region, at least one area coverage index for each effective scenario is calculated. Target stimulus parameters are generated based on the minimum value of each area coverage index and the preset design threshold.
[0104] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0106] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0107] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described transcranial electrical stimulation parameter optimization method. This solves the technical problems of poor fault tolerance and low reliability in the transcranial electrical stimulation parameter optimization method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the transcranial electrical stimulation parameter optimization method provided in the above embodiments, and will not be repeated here.
[0108] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the transcranial electrical stimulation parameter optimization method as described above.
[0109] The computer program product provided in this application can solve the technical problems of poor fault tolerance and low reliability in the transcranial electrical stimulation parameter optimization method. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the transcranial electrical stimulation parameter optimization method provided in the above embodiments, and will not be repeated here.
[0110] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for optimizing transcranial electrical stimulation parameters, characterized in that, The method includes: Obtain a benchmark target point on an individual spatial model, wherein the individual spatial model includes multiple nodes, and the benchmark target point is one of the nodes; Based on a preset error model, multiple candidate scenarios corresponding to the benchmark target are generated. By using preset judgment rules, each candidate scenario is screened to obtain multiple effective scenarios corresponding to the benchmark target. Based on the individual spatial model, target regions corresponding to each of the effective scenarios are constructed, and area weight sets corresponding to each of the target regions are determined. The area weight sets include area weights corresponding to multiple nodes within the target region. Based on the preset initial stimulation parameters and the area weight set corresponding to each target region, at least one area coverage index for each effective scenario is calculated. Target stimulus parameters are generated based on the minimum value of each area coverage index and the preset design threshold.
2. The method as described in claim 1, characterized in that, The steps for obtaining the baseline target points on the individual spatial model include: Read the image data of the target to be stimulated, and construct the individual spatial model based on the image data; The preset target points are mapped onto the individual spatial model to obtain the target point spatial coordinates; The node in the individual spatial model that is closest to the target point's spatial coordinates is taken as the reference target point.
3. The method as described in claim 1, characterized in that, The candidate scenarios include offset coordinates and offset node information corresponding to the offset nodes; The step of generating multiple candidate scenarios corresponding to the benchmark target point based on a preset error model includes: Obtain the coordinates of the reference target point on the individual spatial model to obtain the reference coordinates; Based on preset perturbation parameters, the reference coordinates are perturbed by the error model to obtain offset coordinates corresponding to multiple reference target points. The error model includes at least one of the following: fixed axial offset model, cortical tangent plane offset model, probability distribution sampling model, confidence ellipsoid model, registration error model, or equipment placement error model. For each offset coordinate, the offset coordinate is associated with the offset node that is closest to the offset coordinate, and the offset node information corresponding to the offset node is obtained to obtain the candidate scenario. The offset node information includes at least one of coordinate value, local normal vector and connected component label.
4. The method as described in claim 3, characterized in that, The valid scenario includes the offset coordinates and the offset node information corresponding to the offset node; The step of constructing target regions corresponding to each of the effective scenarios based on the individual spatial model, and determining the area weight set corresponding to each of the target regions, includes: For each of the valid scenarios, obtain the neighboring node information corresponding to multiple neighboring nodes of the offset node; Based on the offset node information, the information of each of the adjacent nodes, the preset normal consistency condition, and the preset target area distance threshold, each of the adjacent nodes is filtered to obtain a target area node set. The area covered by the adjacent patches of all nodes in the target area node set is taken as the target area corresponding to the effective scenario; According to the preset area calculation rules, calculate the total area of the target area corresponding to the target area, and the area of each node in the target area. Based on the total area of the target region and the area of each node, the area weight of each node is calculated to obtain the set of area weights corresponding to the target region.
5. The method as described in claim 1, characterized in that, The step of filtering each candidate scenario using preset judgment rules includes: Calculate the anatomical indices of each candidate scenario relative to the benchmark target, wherein the anatomical indices include at least one of surface connectivity component, geodesic path distance, local normal angle, and anatomical partition label; The anatomical indicators of each candidate scenario are compared with the preset consistency conditions. For each candidate scenario, if the anatomical indicators of the candidate scenario meet the consistency condition, the candidate scenario is marked as a valid scenario; If the anatomical indicators of the candidate scenario do not meet the consistency criteria, the candidate scenario is marked as an invalid scenario.
6. The method as described in claim 1, characterized in that, The step of calculating at least one area coverage index for each effective scenario based on preset initial stimulation parameters and area weight sets corresponding to each target region includes: For each target region, the electric field value corresponding to each node is obtained through simulation calculation based on preset initial stimulation parameters. According to the electric field values corresponding to each node in ascending order, the area weights corresponding to each electric field value are accumulated one by one, and after each accumulation, the current accumulated weight is compared with the preset area coverage threshold. The current accumulated weight is the sum of the area weights corresponding to each electric field value that has been accumulated. When the accumulated weight is greater than or equal to the area coverage threshold, the accumulation of the area weight corresponding to each electric field value is stopped, and the electric field value corresponding to the last accumulated area weight is used as the area coverage index of the effective scenario corresponding to the target area.
7. The method as described in claim 1, characterized in that, The step of generating target stimulus parameters based on the minimum value of each of the area coverage indicators and a preset design threshold includes: Read the minimum value of each of the area coverage indicators, the initial stimulus parameter, and the design threshold; The target stimulation parameters are obtained by calculating the minimum value of the area coverage index, the initial stimulation parameters, and the design threshold through a preset parameter algorithm. The target stimulation parameters include at least one of the following: total current, channel current, electrode position, polarity, electrode size, number of electrodes, branch opening and closing, and waveform parameters.
8. The method as described in claim 1, characterized in that, Following the step of generating the target stimulus parameters, the method further includes: Read the preset device constraints; The target stimulus parameters are rounded up according to the device constraints to obtain the device execution parameters. The device's execution parameters are simulated and verified using a preset verification method, which includes at least one of the following: direct finite element method, boundary element method, finite difference method, experimental current measurement, head model measurement, and multi-solver cross-verification. If the simulation verification passes, the device execution parameters will be output as valid stimulus parameters.
9. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the transcranial electrical stimulation parameter optimization method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the transcranial electrical stimulation parameter optimization method as described in any one of claims 1 to 8.
