A radiotherapy plan generation system and method based on gradient analysis and dense constraints

By using a radiotherapy planning generation system based on gradient analysis and dense constraints, the problems of long time consumption and unstable quality in radiotherapy planning design are solved. This system achieves efficient and automatic radiotherapy planning optimization, improves target dose conformity, and reduces normal organ dose.

CN122201606APending Publication Date: 2026-06-12CANCER INST & HOSPITAL CHINESE ACADEMY OF MEDICAL SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CANCER INST & HOSPITAL CHINESE ACADEMY OF MEDICAL SCI
Filing Date
2026-03-19
Publication Date
2026-06-12

Smart Images

  • Figure CN122201606A_ABST
    Figure CN122201606A_ABST
Patent Text Reader

Abstract

The application discloses a radiotherapy plan generation system and method based on gradient analysis and dense constraint, relates to the technical field of radiotherapy plan generation, and comprises a data acquisition module, a gradient analysis and dense constraint module, a plan optimization anomaly detection module and an optimization scheme screening module; the data acquisition module extracts dose distribution data as reference dose and collects image data of a patient; the gradient analysis and dense constraint module optimizes the obtained reference dose based on gradient analysis and a dense constraint function; the plan optimization anomaly detection module is used for detecting the output value of the obtained optimization result; and the optimization scheme screening module is used for screening the best scheme by using an optimization algorithm according to the generated optimization constraint; by introducing the optimization constraint based on the gradient analysis and the dense constraint function, the constraint adjustment of full-automatic optimization can be realized, and the automatic adjustment of the radiotherapy plan is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of radiotherapy planning technology, specifically a radiotherapy planning system and method based on gradient analysis and dense constraints. Background Technology

[0002] Radiotherapy planning is a labor-intensive process, with a single patient's radiotherapy plan potentially taking hours or even days. Furthermore, the quality of the plan is highly dependent on the experience of the clinical radiotherapy planner, leading to instability in plan quality. In summary, rapid automated planning is of significant clinical importance and value for radiotherapy, but it is also challenging and currently difficult to implement clinically. Dose-mimicking is an important method for automated planning, automatically setting optimization functions based on the dose parameters used in the initial or previous fractionation protocol, and then replanning on the fractionated images in the current protocol. However, automated and high-quality dose-mimicking methods... Achieving this fully automated plan presents certain challenges, namely, the difficulty in achieving high-quality automated planning. For example, the Dose-mimicking method for proton radiotherapy reported by Liu et al. in 2025 can automatically set dose constraints based on a reference plan, but it still requires manual setting of optimization weights. Manual replanning is slow, increasing clinical time and human burden, as well as waiting time and tolerance burden, such as discomfort and stress caused by lying on the treatment bed for a long time. Existing Dose-mimicking methods can achieve semi-automatic radiotherapy planning, but still require some manual intervention, and the quality of automated planning is poor, resulting in cumbersome and inefficient operation. Summary of the Invention

[0003] The purpose of this invention is to provide a radiotherapy planning system and method based on gradient analysis and dense constraints to solve the problems raised in the prior art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a radiotherapy plan generation system based on gradient analysis and dense constraints, the system comprising a data acquisition module, a gradient analysis and dense constraints module, a plan optimization anomaly detection module, and an optimization scheme screening module; The data acquisition module is used to extract historical dose distribution data as a reference dose and to acquire the patient's medical imaging data; The gradient analysis and dense constraint module optimizes the obtained reference dose based on the gradient analysis and dense constraint Dose-mimicking function to generate optimized constraints; The planned optimization anomaly detection module is used to detect the obtained optimization result output value, mark the abnormal optimization constraint result as invalid constraint, and perform anomaly detection in the gradient analysis process; The optimization scheme selection module is used to select the best scheme based on the generated optimization constraints and an optimization algorithm.

[0005] Furthermore, the data acquisition module is used to acquire medical image data, radiotherapy equipment parameters, and dose distribution data from historical radiotherapy processes as reference doses; and to preprocess the acquired images to obtain clear, aligned medical images.

[0006] Furthermore, the gradient analysis and dense constraint module performs gradient analysis based on the acquired reference dose and introduces dense constraint conditions to impose different constraints on the target tissue and normal tissue. The gradient analysis results are combined with the dense constraint conditions to generate optimized constraints. The planned optimization anomaly detection module detects the deviation between the output optimization result and the reference value, marks the abnormal optimization constraint result as invalid constraint, and detects anomalies in the gradient analysis process by analyzing the stationarity of the gradient norm change in the gradient analysis. The optimization scheme selection module uses an optimization algorithm to obtain a dose uniformity index based on the generated optimization constraints to determine the uniformity of the dose in the target area. The scheme with the highest dose uniformity in the target area and the lowest dose to normal organs is selected as the optimal scheme.

[0007] A radiotherapy plan generation method based on gradient analysis and dense constraints, comprising the following steps: S1—Extract historical dose distribution data as a reference dose and collect the patient's medical imaging data; S2—The Dose-mimicking function based on gradient analysis and dense constraints optimizes the obtained reference dose and generates optimization constraints; S3—Detects the obtained optimization result output values, marks abnormal optimization constraint results as invalid constraints, and performs anomaly detection in the gradient analysis process; S4—Based on the generated optimization constraints, the optimal solution is selected using an optimization algorithm.

[0008] Furthermore, in step S1, dose distribution data from historical radiotherapy data or dose distribution data from standard technical solutions for similar cases are used as reference doses; and the acquired images are preprocessed to obtain clear, aligned medical images.

[0009] Furthermore, in step S2: based on the obtained reference dose, the optimized dose for the target area and normal tissue area is analyzed according to the following formula: ; ; ; ; in, This represents the Dose-mimicking function based on gradient analysis and dense constraints; ROIs represent the regions of interest to be optimized. This represents the smallest dose among the reference doses of the ROI, sorted from smallest to largest. This represents the dose that is 10% of the highest dose in the order of reference doses for the ROI from smallest to largest; H x Represents a step function, when ROI x It belongs to the target area, and the reference dose value belongs to [𝐸 100 , 𝐸 90 When H is in the interval, x The value is -1, otherwise H x The value is 1; Indicates ROI x The reference dose; Indicates ROI x Optimized dosage; This indicates the maximum value of the penalty for a specific voxel among all uncertainties; mean indicates that when calculating the penalty for the ROI, the penalty values ​​of all voxels are averaged. Indicates ROI x The dose-effect matrix; 𝜔 represents the optimized weights; This represents a piecewise function, used to enhance the optimization gradient; Based on gradient analysis and densely constrained Dose-mimicking function formula It can target the ROI of the area to be detected. x The organization's region type automatically selects different optimization adjustment trends: if ROI x It belongs to the target area, and the reference dose value belongs to [D]. 100 D 90 Constraints are applied within the interval [D]. 90 There are other options, such as D. 95 Or D 85 etc.; changed to D 95 At that time, optimized dosage tended to protect normal tissues; changed to D 85 At the same time, optimizing the dosage tends to improve the dose conformity of the target area; The piecewise function Elu(a) alters the gradient of the penalty function. The gradients of the conventional gradient function Max and the Elu function differ. Through gradient analysis, Elu can further improve target dose conformity and reduce normal organ dose when the optimized dose reaches the optimization target. The Elu introduced in the technical solution can be replaced by other functions, such as Selu and Tanh, to achieve different optimization gradients.

[0010] Further, in step S3: When generating optimization using the Dose-mimicking function based on gradient analysis and dense constraints and the reference dose, detect gradient anomalies during the optimization process and perform anomaly detection on the output optimization results; collect n output values of the optimization results, denoted as ; Introduce an evaluation value of the effectiveness of the optimization results to detect whether there are anomalies in the optimization results. Calculate the evaluation value of the effectiveness of the optimization results according to the following formula: ; Where, represents the evaluation value of the effectiveness of the optimization results; k represents the number of the output value of the collected optimization results, k = 1, 2,..., n; represents the k-th output value of the optimization results in the collected data, represents the reference value; Set the effectiveness evaluation threshold W0, compare the obtained evaluation value of the effectiveness of the optimization results with the set threshold, and the analysis results are as follows: If W < W0, it is judged that the evaluation value of the effectiveness of the optimization results is normal; If W ≥ W0, it is judged that the evaluation value of the effectiveness of the optimization results is abnormally high, then mark the optimization result as an invalid optimization and perform anomaly detection on the optimization process.

[0011] Further, in step S3: When detecting the optimization process, detect whether there are iterative anomalies during the gradient analysis process, and calculate the gradient norm S in real time k and record the gradient norms of the last m iterations, denoted as {S1, S2,..., S m}, k represents the gradient norm number, k = 1, 2,..., m; According to the evaluation value of the smoothness of the collected gradient norms: , where μ represents the gradient smoothness in the last m iterations, represents the mean of m gradient norms; Continuously record z groups of gradient norms, calculate the evaluation value of the stability of the gradient norms, and sort the calculated evaluation values of the stability of the gradient norms in chronological order, denoted as Set the evaluation value thresholds p1 and p2 of the gradient norm smoothness; Usually , for example, it can be set as p1 = 0.5, p2 = 1. Use the two set thresholds to distinguish between iterative anomalies and normal fluctuations of the gradient norm, reducing the probability of misjudging iterative anomalies in the anomaly detection of the optimization process; Compare the obtained evaluation value of the smoothness of the gradient norms with the set thresholds to analyze whether there are iterative anomalies in the gradient analysis: If and This indicates that the gradient norm changes smoothly, the iteration process converges positively, and there are no iteration anomalies. like and and This indicates that the gradient norm exhibits normal fluctuations. like If a value greater than p2 exists, it indicates that the gradient norm is fluctuating drastically, indicating an iteration anomaly during the iteration process, and generating an iteration anomaly warning.

[0012] Furthermore, in step S4: based on gradient analysis and the dense constraint Dose-mimicking function formula F(ω), the obtained reference dose point can be set as the optimization constraint; based on the generated and detected optimization constraints that are free of anomalies, the optimization scheme is screened.

[0013] Compared with existing technologies, the beneficial effects of this invention are as follows: the dense constraint-based method solves the problem of underdose in the target area caused by traditional methods, and gradient analysis, such as using the Elu() function to achieve gradient enhancement, can further improve the target area dose conformity and reduce the dose to normal organs; furthermore, by introducing the Dose-mimicking function based on gradient analysis and dense constraints to generate optimization constraints, and by marking abnormal optimization constraint results as invalid constraints and performing anomaly detection in the gradient analysis process, the accuracy of optimization results is improved, and optimization constraint adjustment can be performed fully automatically without manual intervention, thereby realizing automatic adjustment of radiotherapy plans. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the system structure of a radiotherapy planning generation system based on gradient analysis and dense constraints according to the present invention; Figure 2 This is a schematic diagram of the method flow for a radiotherapy planning generation method based on gradient analysis and dense constraints according to the present invention. Detailed Implementation

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

[0016] like Figures 1-2 As shown, the present invention provides a technical solution, such as... Figure 1As shown, a radiotherapy planning generation system based on gradient analysis and dense constraints is disclosed. The system includes a data acquisition module, a target contour anomaly detection module, a gradient analysis and dense constraint module, a planning optimization anomaly detection module, and an optimization scheme screening module. The data acquisition module is used to extract historical dose distribution data as a reference dose and to acquire the patient's medical imaging data; The gradient analysis and dense constraint module optimizes the obtained reference dose based on gradient analysis and the Dose-mimicking function of dense constraints to generate optimized constraints; The planned optimization anomaly detection module is used to detect the obtained optimization result output values, mark the abnormal optimization constraint results as invalid constraints, and perform anomaly detection in the gradient analysis process; The optimization scheme selection module is used to select the best scheme based on the generated optimization constraints and the optimization algorithm.

[0017] The data acquisition module is used to collect medical image data, radiotherapy equipment parameters, and dose distribution data from historical radiotherapy processes as reference doses; and to preprocess the acquired images to obtain clear, aligned medical images.

[0018] The gradient analysis and dense constraint module performs gradient analysis based on the acquired reference dose and introduces dense constraint conditions to impose different constraints on the target area and normal tissue. The gradient analysis results are combined with the dense constraint conditions to generate optimized constraints. The planned optimization anomaly detection module detects the deviation between the output optimization results and the reference values, marks the abnormal optimization constraint results as invalid constraints, and performs anomaly detection in the gradient analysis process by analyzing the stationarity of the gradient norm change. The optimization scheme selection module uses the particle swarm optimization algorithm to obtain the dose uniformity index based on the generated optimization constraints, which is used to determine the uniformity of the dose in the target area. The scheme with the highest dose uniformity in the target area is selected as the best scheme.

[0019] A radiotherapy planning method based on gradient analysis and dense constraints, such as Figure 2 As shown, the method includes the following steps: S1—Extract historical dose distribution data as a reference dose and collect the patient's medical imaging data; S2—The Dose-mimicking function based on gradient analysis and dense constraints optimizes the obtained reference dose and generates optimization constraints; S3—Detects the obtained optimization result output values, marks abnormal optimization constraint results as invalid constraints, and performs anomaly detection in the gradient analysis process; S4—Based on the generated optimization constraints, the optimal solution is selected using an optimization algorithm.

[0020] In step S1: the dose distribution data from historical radiotherapy data or the dose distribution data from standard technical solutions for similar cases are used as reference doses; and the acquired images are preprocessed to obtain clear, aligned medical images.

[0021] In step S2: Based on the obtained reference dose, the optimized dose for the target area and normal tissue area is analyzed according to the following formula: ; ; ; ; in, This represents the Dose-mimicking function based on gradient analysis and dense constraints; ROIs represent the regions of interest to be optimized. This represents the smallest dose among the reference doses of the ROI, sorted from smallest to largest. This represents the dose that is 10% of the highest dose in the order of reference doses for the ROI from smallest to largest; H x Represents a step function, when ROI x It belongs to the target area, and the reference dose value belongs to [𝐸 100 , 𝐸 90 When H is in the interval, x The value is -1, otherwise H x The value is 1; Indicates ROI x The reference dose; Indicates ROI x Optimized dosage; This indicates the maximum value of the penalty for a specific voxel among all uncertainties; mean indicates that when calculating the penalty for the ROI, the penalty values ​​of all voxels are averaged. Indicates ROI x The dose-effect matrix; 𝜔 represents the optimized weights; This represents a piecewise function, used to enhance the optimization gradient; Based on gradient analysis and densely constrained Dose-mimicking function formula It can target the ROI of the area to be detected. x The organization's region type automatically selects different optimization adjustment trends: if ROI x It belongs to the target area, and the reference dose value belongs to [D]. 100 D 90 Constraints are applied within the interval [D]. 90There are other options, such as D 95 or D 85 etc.; change to D 95 When it is changed to D, the optimized dose has a tendency to protect normal tissues; change to D 85 When it is changed to D, the optimized dose has a tendency to improve the dose conformity of the target area; The piecewise function Elu(a) changes the gradient of the penalty function. There are differences between the gradients of the conventional gradient function Max and the Elu function. Through gradient analysis, Elu can further improve the dose conformity of the target area and reduce the dose of normal organs when the optimized dose reaches the optimization goal; the Elu introduced in the technical solution can be replaced by other functions according to the gradient function, such as Selu and Tanh, etc., to achieve different optimization gradients.

[0022] In step S3: When generating the optimization using the Dose-mimicking function and the reference dose based on gradient analysis and dense constraints, detect the gradient anomalies during the optimization process, and perform anomaly detection on the output optimization results; collect n output values of the optimization results, denoted as ; Introduce an evaluation value of the effectiveness of the optimization result to detect whether there are anomalies in the optimization result. Calculate the evaluation value of the effectiveness of the optimization result according to the following formula: ; where represents the evaluation value of the effectiveness of the optimization result; k represents the number of the output value of the optimization result collected, k = 1, 2,..., n; represents the k-th output value of the optimization result in the collected data, represents the reference value; Set the effectiveness evaluation threshold W0, and compare and analyze the obtained evaluation value of the effectiveness of the optimization result with the set threshold. The analysis results are as follows: If W < W0, it is judged that the evaluation value of the effectiveness of the optimization result has no anomaly; If W ≥ W0, it is judged that the evaluation value of the effectiveness of the optimization result is abnormally high, then mark the optimization result as an invalid optimization, and perform anomaly detection on the optimization process.

[0023] In step S3: When detecting the optimization process, detect whether there are iterative anomalies during the gradient analysis process, and calculate the gradient norm S in real time k and record the gradient norms of the most recent m iterations, denoted as {S1, S2,..., S m}, k represents the gradient norm number, k = 1, 2,..., m; According to the collected evaluation value of the gradient norm stationarity: where μ represents the gradient stationarity in the most recent m iterations, Let represent the mean of m gradient norms; continuously record z groups of gradient norms, calculate the evaluation value of gradient norm stability, and sort the calculated evaluation values ​​of gradient norm stability in chronological order, denoted as . Set threshold values ​​p1 and p2 for evaluating gradient norm stationarity; compare the obtained evaluation values ​​of gradient norm stationarity with the set thresholds to analyze whether there are iteration anomalies in the gradient analysis. like and This indicates that the gradient norm changes smoothly, the iteration process converges positively, and there are no iteration anomalies. like and and This indicates that the gradient norm exhibits normal fluctuations. like If there is a value greater than p2, it indicates that the gradient norm is fluctuating drastically, indicating an iteration anomaly during the iteration process, and generating an iteration anomaly warning. The effectiveness of the Dose-mimicking function setting can be evaluated based on the collected gradient norm stationarity assessment value. For example, gradient enhancement is implemented using the Elu() function, which can further improve target dose conformity and reduce the dose to normal organs.

[0024] In step S4: Based on gradient analysis and the dense constraint Dose-mimicking function formula F(ω), the obtained reference dose point can be set as the optimization constraint; based on the generated and detected optimization constraints that are free of anomalies, the optimization scheme is screened.

[0025] Example 1: In step S3: When using the Dose-mimicking function based on gradient analysis and dense constraints and the reference dose to generate optimization, gradient anomalies during the optimization process are detected, and anomalies in the output optimization results are detected; five optimization result output values ​​are collected, denoted as {2.3, 1.9, 2.6, 2.2, 2.0}; an evaluation value for the effectiveness of the optimization results is introduced to detect whether there are anomalies in the optimization results, and the evaluation value for the effectiveness of the optimization results is calculated according to the following formula: ; in, The evaluation value represents the effectiveness of the optimization result; k represents the number of the collected optimization result output value, k=1,2,…,n; This represents the output value of the k-th optimization result in the collected data. =2.1 indicates a reference value; W=0.06 The effectiveness evaluation threshold W0=0.08 was set, and the evaluation value of the effectiveness of the obtained optimization results was compared with the set threshold. The analysis results are as follows: If W < W0, the evaluation value for judging the effectiveness of the optimization result is normal.

[0026] In step S3: When detecting the optimization process, it is detected whether there is an iterative anomaly in the gradient analysis process, and the gradient norm S is calculated in real time k , and the gradient norms of the last 5 iterations are recorded, denoted as {S1, S2,..., S m}, where k represents the gradient norm number; According to the evaluation value of the gradient smoothness of the collected gradient norms: , where μ represents the gradient smoothness in the last 5 iterations, represents the mean of m gradient norms; Continuously record z groups of gradient norms, calculate the evaluation value of the gradient norm stability, and sort the calculated evaluation values of the gradient norm stability in chronological order, denoted as {0.5, 0.45, 0.4, 0.35, 0.3}, and set the evaluation value thresholds p1 = 0.5 and p2 = 1.2 for the gradient norm smoothness; Compare the obtained evaluation value of the gradient norm smoothness with the set thresholds to analyze whether there is iterative oscillation in the gradient analysis: Then μ1 ≤ p1 and μ1 > μ2 >... > μz; It indicates that the change of the gradient norm is stable, the iterative process is converging forward, and it is judged that there is no iterative anomaly.

[0027] According to the evaluation value of the gradient smoothness of the collected gradient norms, the effectiveness of the Dose - mimicking function setting can be evaluated. For example, the use of the Elu() function realizes gradient enhancement, which can further improve the target dose conformity and reduce the dose of normal organs.

[0028] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non - restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be regarded as limiting the claimed rights.

Claims

1. A radiotherapy planning generation system based on gradient analysis and dense constraints, characterized in that: The system includes a data acquisition module, a gradient analysis and intensive constraint module, a plan optimization anomaly detection module, and an optimization scheme screening module; The data acquisition module is used to extract historical dose distribution data as a reference dose and acquire the patient's medical image data; The gradient analysis and intensive constraint module optimizes the acquired reference dose based on the gradient analysis and the Dose-mimicking function of intensive constraint to generate optimization constraints; The plan optimization anomaly detection module is used to detect the output value of the acquired optimization result, mark the abnormal optimization constraint result as an invalid constraint, and detect anomalies in the gradient analysis process; The optimization scheme screening module is used to screen the best scheme by using an optimization algorithm according to the generated optimization constraints.

2. The radiotherapy planning generation system based on gradient analysis and dense constraints according to claim 1, characterized in that: The data acquisition module is used to acquire medical image data, radiotherapy equipment parameters, and dose distribution data during the historical radiotherapy process as a reference dose; and preprocess the acquired images to obtain clear and aligned medical images.

3. The radiotherapy planning generation system based on gradient analysis and dense constraints according to claim 1, characterized in that: The gradient analysis and intensive constraint module performs gradient analysis based on the acquired reference dose, introduces intensive constraint conditions to perform different constraints on the target tissue and normal tissue, combines the gradient analysis result with the intensive constraint conditions to generate optimization constraints; The plan optimization anomaly detection module detects the output value of the acquired optimization result by analyzing the deviation between the output optimization result and the reference value, marks the abnormal optimization constraint result as an invalid constraint, and detects anomalies in the gradient analysis process by analyzing the change smoothness of the gradient norm in the gradient analysis; The optimization scheme screening module uses an optimization algorithm to obtain the dose uniformity index for the uniformity of the target area dose according to the generated optimization constraints, and takes the technical scheme with the highest target area dose uniformity and the lowest normal organ dose as the best scheme.

4. A radiotherapy planning generation method based on gradient analysis and dense constraints, characterized in that: The method includes the following steps: S1 - Extract historical dose distribution data as a reference dose and acquire the patient's medical image data; S2 - Optimize the acquired reference dose based on the gradient analysis and the Dose-mimicking function of intensive constraint to generate optimization constraints; S3 - Detect the output value of the acquired optimization result, mark the abnormal optimization constraint result as an invalid constraint, and detect anomalies in the gradient analysis process; S4 - Screen the best scheme by using an optimization algorithm according to the generated anomaly-free optimization constraints.

5. The radiotherapy planning generation method based on gradient analysis and dense constraints according to claim 4, characterized in that: In step S1: Use the dose distribution data in the historical radiotherapy data or the dose distribution data in the standard scheme of the reference same-type cases as the reference dose, and preprocess the acquired images to obtain clear and aligned medical images.

6. The radiotherapy planning generation method based on gradient analysis and dense constraints according to claim 4, characterized in that: In step S2: Based on the acquired reference dose, analyze the optimized dose for the target area and normal tissue area according to the following formula: ; ; ; ; in, This represents the Dose-mimicking function based on gradient analysis and dense constraints; ROIs represent the regions of interest to be optimized. This represents the smallest dose among the reference doses of the ROI, sorted from smallest to largest. This represents the dose that is 10% of the highest dose in the order of reference doses for the ROI from smallest to largest; H x Represents a step function, when ROI x It belongs to the target area, and the reference dose value belongs to [𝐸 100 , 𝐸 90 When H is in the interval, x The value is -1, otherwise H x The value is 1; Indicates ROI x The reference dose; Indicates ROI x Optimized dosage; This indicates the maximum value of the penalty for a specific voxel among all uncertainties; mean indicates that when calculating the penalty for the ROI, the penalty values ​​of all voxels are averaged. Indicates ROI x The dose-effect matrix; 𝜔 represents the optimized weights; This represents a piecewise function, used to enhance the optimization gradient.

7. The radiotherapy planning generation method based on gradient analysis and dense constraints according to claim 4, characterized in that: In step S3: When using the Dose-mimicking function based on gradient analysis and dense constraints, and the reference dose to generate optimization, gradient anomalies during the optimization process are detected, and anomalies in the output optimization results are detected; n optimization result output values ​​are collected, denoted as... An evaluation value for the effectiveness of the optimization results is introduced to detect whether there are any anomalies in the optimization results. The evaluation value for the effectiveness of the optimization results is calculated according to the following formula: ; Where W represents the evaluation value of the effectiveness of the optimization result; k represents the number of the collected optimization result output value, k=1,2,…,n; This represents the output value of the k-th optimization result in the collected data. Indicates a reference value; Set the effectiveness evaluation threshold W0, compare and analyze the evaluation value of the effectiveness of the acquired optimization result with the set threshold, and the analysis results are as follows: If W < W0, it is determined that the evaluation value of the optimization result effectiveness is normal; If W≥W0, the evaluation value for judging the validity of the optimization result is abnormally high, then the optimization result is marked as invalid optimization, and anomaly detection is performed in the optimization process.

8. The radiotherapy planning generation method based on gradient analysis and dense constraints according to claim 4, characterized in that: In step S3: When checking the optimization process, detect whether there are iterative anomalies during gradient analysis and calculate the gradient norm S in real time. k And record the gradient norm of the most recent m iterations, denoted as {S1, S2, ..., S...} m }, where k represents the gradient norm number, k=1, 2, ..., m; based on the collected evaluation values ​​of gradient norm stationarity: Where μ represents the gradient stationarity in the most recent m iterations, Let represent the mean of m gradient norms; continuously record z groups of gradient norms, calculate the evaluation value of gradient norm stability, and sort the calculated evaluation values ​​of gradient norm stability in chronological order, denoted as . Set threshold values ​​p1 and p2 for evaluating gradient norm stationarity; compare the obtained evaluation values ​​of gradient norm stationarity with the set thresholds to analyze whether there are iteration anomalies in the gradient analysis. like and This indicates that the gradient norm changes smoothly, the iteration process converges positively, and there are no iteration anomalies. like and and This indicates that the gradient norm exhibits normal fluctuations. like If a value greater than p2 exists, it indicates that the gradient norm is fluctuating drastically, indicating an iteration anomaly during the iteration process, and generating an iteration anomaly warning.

9. The radiotherapy planning generation method based on gradient analysis and dense constraints according to claim 4, characterized in that: In step S4: Based on gradient analysis and the dense constraint Dose-mimicking function formula F(ω), the obtained reference dose point can be set as the optimization constraint; based on the generated and detected optimization constraints that are free of anomalies, the optimization scheme is screened.