A method, system, and storage medium for detecting time-series data mutations based on multi-stage dynamic optimization.

By employing a multi-stage dynamically optimized time-series data mutation detection method, the system automatically identifies state mutation points of radiotherapy equipment, solving the problems of inaccurate detection and high cost in existing technologies, and achieving efficient and stable equipment status monitoring.

CN120805003BActive Publication Date: 2025-12-02WEST CHINA HOSPITAL SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511254825.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-12-02
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing methods for monitoring the status of radiotherapy equipment struggle to guarantee accuracy and robustness when detecting abrupt changes in non-stationary time-series data. Furthermore, the sensitivity of penalty parameter settings leads to inconsistent test results, increases computational costs, and hinders the rapid deployment and automated implementation of quality control processes.

Method used

A multi-stage dynamically optimized time-series data mutation detection method is adopted. Through steps such as initial change point detection, supplementary change point, local fine-tuning and redundancy removal, the Dynp algorithm and radial basis function model in the ruptures tool library are used to automatically identify mutation points in equipment status data, avoiding the need to manually set penalty parameters.

Benefits of technology

It improves the accuracy and robustness of equipment state change detection, reduces computational costs, supports single-index and multi-index parallel processing, is applicable to various quality control indicators of radiotherapy equipment, and ensures the stability and safety of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805003B_ABST
    Figure CN120805003B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, and storage medium for detecting time-series data mutations based on multi-stage dynamic optimization, belonging to the field of radiotherapy equipment status monitoring and quality control. This invention provides a method for detecting equipment status change points without penalty parameters, based on "multi-stage dynamic optimization." The method is based on the Dynp and RBF models from the Ruptures toolkit, and effectively improves the accuracy and stability of change point detection through staged processing such as supplementing candidate change points, local refinement, and deleting redundant change points. This invention can be used to detect time-series data mutations related to quality control in radiotherapy equipment, ensuring the stability and safety of radiotherapy equipment during use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of radiotherapy equipment status monitoring and quality control, specifically relating to a method, system and storage medium for detecting time-series data mutations based on multi-stage dynamic optimization. Background Technology

[0002] In the daily and periodic quality control of radiotherapy equipment (e.g., based on the AAPM TG-142 standard), the time-series recording and analysis of multiple numerical indicators such as output dose, field shape, symmetry, and energy consistency are often involved. The stability of equipment performance is directly related to the accuracy of treatment dosage and patient safety. However, during long-term operation, equipment may experience sudden changes in state such as dose deviation, energy drift, and mechanical deviation. Currently commonly used statistical process control methods include univariate control charts (such as Shewhart and CUSUM) and multivariate control charts (such as Hotelling's T²). However, these methods generally assume process stability and are difficult to effectively handle sudden changes in state in non-stationary time-series data.

[0003] Current change point detection methods, such as PELT and Binseg, require setting a penalty parameter to balance fitting accuracy and model complexity. However, the value of the penalty parameter is highly sensitive; different settings can produce significantly different detection results, severely impacting the consistency and reliability of quality assurance (QA) analysis. On the other hand, traversing all penalty parameters or fusing multiple algorithms significantly increases computational costs, hindering rapid deployment and automated implementation in actual quality control processes. Summary of the Invention

[0004] To address the aforementioned problems, this invention provides a method, system, and storage medium for detecting time-series data mutations based on multi-stage dynamic optimization. The detection method of this invention can automatically identify, filter, and optimize change-points in device status data without requiring manual setting of penalty parameters, thereby improving the accuracy and robustness of abnormal state identification.

[0005] This invention provides a method for detecting sudden changes in time-series data based on multi-stage dynamic optimization, which includes the following steps:

[0006] (1) Collect time-series quality control data of radiotherapy equipment; the time-series quality control data is daily or periodic QA test time-series data;

[0007] (2) Perform initial change point detection on the collected time series data to obtain an initial candidate change point set;

[0008] (3) Execution of the supplementation phase: Insert new variable points between any two adjacent variable points. If the Bayesian Information Criterion (BIC) value decreases after insertion, add the new variable points to the candidate set until the BIC value no longer decreases.

[0009] (4) Perform local fine-tuning stage: Adjust the position of each candidate variable point in its neighborhood. If the BIC value decreases after adjustment, update it to a new variable point position.

[0010] (5) Redundancy removal phase: Traverse all current variable points, remove them one by one, and recalculate the overall BIC value of the segment. If the overall BIC value decreases after removing a variable point, the variable point is identified as a redundant point and is removed.

[0011] (6) Iterative loop: The above steps (3) to (5) are executed sequentially in the main loop. Each iteration takes the current set of variable points as input and executes a complete variable point optimization process. After each iteration, the overall BIC value is recalculated. If the current BIC value decreases less than the set convergence threshold compared to the previous iteration, the iteration stops.

[0012] (7) Output the final set of variable points.

[0013] Furthermore,

[0014] In step (1), the QA detection timing data includes the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error or collimator position error;

[0015] And / or, in step (2), the initial change point detection uses the Dynp algorithm from the ruptures library, and the model type is the radial basis function model RBF;

[0016] And / or, in step (3), the method of inserting new variable points is: specify the number of variable points to be inserted, use the Dynp algorithm between any two adjacent variable points, the model type is radial basis function model RBF to detect new variable points, if the overall segmentation BIC value decreases after inserting new variable points, then include the variable point in the candidate set, repeat the process until the BIC value no longer decreases;

[0017] And / or, in step (4), during the local fine-tuning stage, the search range for the variable point fine-tuning is a neighborhood window composed of radius points before and after it, where the value of radius is an integer from 1 to 10; wherein, for the i-th variable point c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, Let r be the minimum segment length and r be the value of radius; preferably, the value of radius is an integer between 3 and 5; more preferably, the value of radius is 5.

[0018] And / or, in step (6), the convergence threshold is 0.01~1.5; preferably, the convergence threshold is 0.01~0.05; more preferably, the convergence threshold is 0.01.

[0019] And / or, in step (7), the final set of change points is output in the form of a visual chart. If a change point appears, the location of the change point is marked, and an alarm or prompt is triggered for manual verification.

[0020] Furthermore,

[0021] In step (2), the minimum segment length between the variable points is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0022] And / or, in step (2), the number of variable points during the initial variable point detection is set to 1~3; preferably, the number of variable points is set to 1~2; more preferably, the number of variable points is set to 1.

[0023] And / or, in step (2), the step length parameter is set to 1, 2 or 3 during the initial change point detection; preferably, the step length parameter is set to 1 or 2; more preferably, the step length parameter is set to 1.

[0024] And / or, in step (3), the number of insertion points is 1 or 2;

[0025] And / or, in step (3), the length of all sub-segments generated when inserting the variable point is not less than the minimum segment length, which is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0026] And / or, in step (4), the minimum segment length is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0027] And / or, in step (6), the maximum number of iterations is 50.

[0028] Furthermore, the formula for calculating the BIC value is as follows:

[0029]

[0030] in,

[0031] n represents the total number of samples in the time series;

[0032] RSS represents the sum of squares of the model fitting error;

[0033] p represents the number of model parameters, which is 2k, and k is the number of segments.

[0034] This invention also provides a time-series data mutation detection system based on multi-stage dynamic optimization, the system comprising:

[0035] The input module is configured to input the time-series quality control data of the radiotherapy equipment; the time-series quality control data is daily or periodic QA test time-series data.

[0036] The initial change point generation module is configured to perform initial change point detection on the collected time series data to obtain an initial candidate change point set;

[0037] The supplement module is configured to insert a new variable between any two adjacent variables. If the Bayesian Information Criterion (BIC) value decreases after insertion, the new variable is added to the candidate set until the BIC value no longer decreases.

[0038] The local fine-tuning module is configured to adjust the position of each candidate variable point within its neighborhood. If the BIC value decreases after the adjustment, the new variable point position is updated.

[0039] The redundancy removal module is configured to iterate through all current variable points, remove them one by one, and recalculate the overall BIC value of the segment. If the overall BIC value decreases after removing a variable point, the variable point is identified as a redundant point and removed.

[0040] The loop iteration module is configured to execute the above-mentioned supplementation module, local fine-tuning module and redundancy removal module in the main loop in turn. Each iteration takes the current set of variable points as input and executes a complete round of variable point optimization process. After each iteration, the overall BIC value is recalculated. If the current BIC value decreases less than the set convergence threshold compared to the previous round, the iteration stops.

[0041] The output module is configured to output the final set of variable points.

[0042] Furthermore,

[0043] In the input module, the QA detection timing data includes the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error, or collimator position error;

[0044] And / or, in the initial change point generation module, the initial change point detection adopts the Dynp algorithm in the ruptures library, and the model type is the radial basis function model RBF;

[0045] And / or, in the supplementary module, the method for inserting new variable points is as follows: specify the number of variable points to be inserted, use the Dynp algorithm between any two adjacent variable points, and use the radial basis function model (RBF) to detect new variable points. If the overall segmentation BIC value decreases after inserting a new variable point, then the variable point is included in the candidate set. Repeat the process until the BIC value no longer decreases.

[0046] And / or, in the local fine-tuning module, the search range for the position adjustment is a neighborhood window consisting of radius time points before and after the change point, where the value of radius is an integer from 1 to 10; wherein, for the i-th change point... c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, Let r be the minimum segment length and r be the value of radius; preferably, the value of radius is an integer between 3 and 5; more preferably, the value of radius is 5.

[0047] And / or, in the iterative loop module, the convergence threshold is 0.01~1.5; preferably, the convergence threshold is 0.01~0.05; more preferably, the convergence threshold is 0.01.

[0048] And / or, in the output module, the final set of change points is output in the form of a visual chart. If a change point occurs, the location of the change point is marked, and an alarm or prompt is triggered for manual verification.

[0049] Furthermore,

[0050] In the initial variable point generation module, the minimum segment length between the variable points is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0051] And / or, in the initial variable point generation module, the variable point number parameter is set to 1~3; preferably, the variable point number parameter is set to 1~2; more preferably, the variable point number parameter is set to 1.

[0052] And / or, in the initial change point generation module, the step length parameter is set to 1, 2 or 3; preferably, the step length parameter is set to 1 or 2; more preferably, the step length parameter is set to 1.

[0053] And / or, in the supplementary module, the number of inserted variable points is 1 or 2;

[0054] And / or, in the supplementary module, the length of all sub-segments generated when inserting variable points is not less than the minimum segment length, which is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0055] And / or, in the local fine-tuning module, the minimum segment length is 3 to 10 sampling points; preferably, the minimum segment length is 3 to 5 sampling points; more preferably, the minimum segment length is 3 sampling points.

[0056] And / or, in the loop iteration module, the maximum number of iterations is 50.

[0057] Furthermore, the formula for calculating the BIC value is as follows:

[0058]

[0059] in,

[0060] n represents the total number of samples in the time series;

[0061] RSS represents the sum of squares of the model fitting error;

[0062] p represents the number of model parameters, which is 2k, and k is the number of segments.

[0063] The present invention also provides a computer-readable storage medium for implementing the aforementioned computer program for detecting time-series data mutations based on multi-stage dynamic optimization.

[0064] The present invention also provides a computer-readable storage medium for implementing the aforementioned computer program for a time-series data mutation detection system based on multi-stage dynamic optimization.

[0065] This invention can be widely applied to:

[0066] (1) QA monitoring of radiotherapy accelerators (including Edge, Versa-HD, Unity MR-Linac, etc.);

[0067] (2) Identification of output drift and calibration anomalies based on time series;

[0068] (3) Quantitatively evaluate state changes such as hardware degradation, software updates, or environmental interference;

[0069] (4) It can be extended to other QA scenarios such as image quality control, dosimetry QA, and patient-specific verification.

[0070] Compared with the prior art, the present invention has achieved the following beneficial effects:

[0071] (1) No penalty parameter is required, thus avoiding performance instability caused by subjective parameter tuning;

[0072] (2) It has better detection accuracy and robustness, avoiding overfitting or missed detection of change points;

[0073] (3) It supports parallel and grid search, and has good scalability and automation capabilities;

[0074] (4) Applicable to multiple indicators of radiotherapy QA (such as output dose, flatness, energy spectrum drift, etc.), and supports parallel processing of single and multiple indicators.

[0075] In summary, this invention provides a device state change detection method based on "multi-stage dynamic optimization" without penalty parameters. The method is based on the Dynp (Dynamic Programming) and RBF models from the Ruptures toolkit, and effectively improves the accuracy and stability of change detection through staged processing such as supplementing candidate changes (single and double points), local refinement, and deleting insignificant changes. This invention can be used to detect abrupt changes in time-series data related to quality control in radiotherapy equipment, ensuring the stability and safety of radiotherapy equipment during use.

[0076] Obviously, based on the above description of the present invention, and according to common technical knowledge and conventional methods in the field, various other modifications, substitutions or alterations can be made without departing from the basic technical concept of the present invention.

[0077] The following detailed embodiments further illustrate the above-described content of the present invention. However, this should not be construed as limiting the scope of the present invention to the following embodiments. All technologies implemented based on the above-described content of the present invention fall within the scope of the present invention. Attached Figure Description

[0078] Figure 1 This is a flowchart of a time-series data mutation detection method based on multi-stage dynamic optimization.

[0079] Figure 2 The following are graphs showing the results of the detection of change points in the radiotherapy output dose time series data using the detection method of the present invention: (A) Output dose change graph in 2020; (B) Output dose change graph in 2021; (C) Output dose change graph in 2022. Detailed Implementation

[0080] It should be noted that the algorithms for data acquisition, transmission, storage and processing steps not specifically described in the embodiments, as well as the hardware structures and circuit connections not specifically described, can all be implemented using content already disclosed in the prior art.

[0081] Example 1: A method for detecting sudden changes in time-series data based on multi-stage dynamic optimization

[0082] The flowchart of the time-series data mutation detection method based on multi-stage dynamic optimization is as follows: Figure 1 As shown.

[0083] This embodiment provides a method for detecting abrupt changes in timing quality control data of radiotherapy equipment based on multi-stage dynamic optimization. The detection method includes the following steps:

[0084] (1) Collect time-series quality control data of radiotherapy equipment; the time-series quality control data is daily or periodic QA detection time-series data (including output dose or dose rate of ionization chamber or reference dosimeter in radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error or collimator position error, etc.).

[0085] (2) Initial change point detection is performed on the time-series quality control data collected by the radiotherapy equipment to obtain an initial candidate change point set. The initial change point detection adopts the Dynp algorithm in the ruptures library, and the model type is radial basis function (RBF). The minimum segment length (min_size) between change points is set to 3 to ensure that each segment of data has sufficient statistical stability. Given that the actual number of change points in the actual data is unpredictable, the change point number parameter (n_bkps) is set to 1 in the initial change point detection stage to prioritize the extraction of the most significant structural change points globally. This conservative setting helps to reduce the risk of false detection and provides a simple and stable starting point for the subsequent multi-stage optimization process (including adding candidate change points, local adjustment of change point positions, and screening of redundant change points). The jump length parameter (jump) is set to 1, that is, no jump sampling is performed during the change point position search process. The minimum step size is used for full search to maximize the retention of the discrimination accuracy of change point positions and avoid missing potential change points due to jump sampling.

[0086] (3) Execution of the supplementation phase: Insert a single variable or a double variable between any two adjacent variable points. If the Bayesian Information Criterion (BIC value) decreases after insertion, the newly added variable point is added to the candidate set until the BIC value no longer decreases.

[0087] The variable point insertion method specifies the number of variable points to insert (either 1 or 2). Within the segment between any two adjacent variable points, and under the premise of satisfying the minimum segment length constraint (set to 3 in this embodiment), it applies a dynamic programming-based variable point detection algorithm (Dynp) and a radial basis function cost model (Rbf) to detect new candidate variable points. The insertion operation is only performed if the length of all sub-segments generated before and after the insertion is not less than the minimum segment length. If the Bayesian Information Criterion (BIC) value of the overall segmented structure decreases after inserting the variable point, then the variable point is included in the candidate set. The above process can be iteratively performed until further insertion no longer leads to a decrease in the BIC value.

[0088] The formula for calculating the BIC value is:

[0089]

[0090] Where n represents the total number of samples in the time series; RSS (Residual Sum of Squares) represents the sum of squares of the model fitting error; and p is the number of free parameters of the model.

[0091] The sum of squared errors (RSS) of the model fit is automatically calculated by the cost function (CostL2 in this example) from the Ruptures tool library, representing the sum of squared errors between the observed values ​​and their fitted values ​​within each segment. For each set of variable point partitions, the RSS is a fixed and unique value.

[0092] In this embodiment, the BIC evaluation uses the L2 model as the error metric, assuming that each segment fits a mean and a variance, thus each segment contains two free parameters. If divided into k segments, the total number of parameters is: p = 2k, where k is the number of segments.

[0093] (4) Local Fine-tuning Phase: For each candidate variable point, adjust its position within its neighborhood. If the BIC value decreases after adjustment, update it to the new variable point position. In the local fine-tuning phase, the search range for variable point fine-tuning is a neighborhood window consisting of radius points before and after it, with a default value of 5 for radius. For the i-th variable point... c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, The minimum segment length is set to 3, and r is the value of radius.

[0094] (5) Redundancy removal phase: Traverse all current variable points, attempt to remove them one by one, and recalculate the overall BIC value of the segment. If the overall BIC value decreases after removing a variable point, the variable point is identified as a redundant point and is removed.

[0095] (6) Iterative Loop: Steps (3) to (5) above are executed sequentially in the main loop. Each iteration takes the current set of variable points as input and performs a complete round of variable point optimization. After each iteration, the overall BIC value is recalculated. If the decrease in the current BIC value compared to the previous round is less than the set convergence threshold (0.01), the iteration stops. The maximum number of iterations (max_iter) is set to 50 to prevent infinite loops.

[0096] (7) Output the final set of change points in the form of a visual chart. If a change point appears, mark the location of the change point and trigger an alarm or prompt for manual verification.

[0097] The above methods support batch processing, automatic parameter selection, and visualization output, making them suitable for real-time monitoring and historical traceability analysis of clinical quality control data.

[0098] Example 2: A Time-Series Data Abrupt Change Detection System Based on Multi-Stage Dynamic Optimization

[0099] This embodiment provides a system for detecting abrupt changes in timing quality control data of radiotherapy equipment based on multi-stage dynamic optimization. The system includes:

[0100] The input module is configured to input the collected time-series quality control data of the radiotherapy equipment. The time-series quality control data is daily or periodic QA test time-series data (including the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error or collimator position error, etc.).

[0101] The initial change point generation module is configured to use a dynamic programming-based change point detection algorithm to perform initial change point detection on the time-series quality control data of radiotherapy equipment, obtaining an initial candidate change point set. The change point detection algorithm adopts the Dynp algorithm from the Ruptures library, with a radial basis function (RBF) model. The minimum segment length (min_size) between change points is set to 3 to ensure sufficient statistical stability for each data segment. Given that the actual number of change points in the data is unpredictable, the change point count parameter (n_bkps) is set to 1 in the initial change point detection stage to prioritize the extraction of the most significant structural mutation points globally. This conservative setting helps reduce the risk of false detections and provides a simple and stable starting point for subsequent multi-stage optimization processes (including adding candidate change points, local adjustment of change point positions, and screening of redundant change points). The jump length parameter (jump) is set to 1, meaning that no skip sampling is performed during the change point position search process; a full search is conducted using the minimum step size to maximize the accuracy of change point position discrimination and avoid missing potential change points due to skip sampling.

[0102] The supplementary module is configured to insert a single or double variable point between any two adjacent variable points. If the Bayesian Information Criterion (BIC value) decreases significantly after insertion, the newly added variable point is added to the candidate set until the BIC value no longer decreases.

[0103] The variable point insertion method specifies the number of variable points to insert (either 1 or 2). Within the segment between any two adjacent variable points, and under the premise of satisfying the minimum segment length constraint (set to 3 in this embodiment), it applies a dynamic programming-based variable point detection algorithm (Dynp) and a radial basis function cost model (Rbf) to detect new candidate variable points. The insertion operation is only performed if the length of all sub-segments generated before and after the insertion is not less than the minimum segment length. If the Bayesian Information Criterion (BIC) value of the overall segmented structure decreases after inserting the variable point, then the variable point is included in the candidate set. The above process can be iteratively performed until further insertion no longer leads to a decrease in the BIC value.

[0104] The formula for calculating the BIC value is:

[0105]

[0106] Where n represents the total number of samples in the time series; RSS (Residual Sum of Squares) represents the sum of squares of the model fitting error; and p is the number of free parameters of the model.

[0107] The sum of squared errors (RSS) of the model fit is automatically calculated by the cost function (CostL2 in this example) from the Ruptures tool library, representing the sum of squared errors between the observed values ​​and their fitted values ​​within each segment. For each set of variable point partitions, the RSS is a fixed and unique value.

[0108] In this embodiment, the BIC evaluation uses the L2 model as the error metric, assuming that each segment fits a mean and a variance, thus each segment contains two free parameters. If divided into k segments, the total number of parameters is: p = 2k, where k is the number of segments.

[0109] The local fine-tuning module is configured to adjust the position of each candidate change point within its neighborhood. If the BIC value decreases after adjustment, the new change point position is updated. During the local fine-tuning phase, the search range for change point fine-tuning is a neighborhood window consisting of `radius` time points before and after it, with a default value of 5 for `radius`. For the i-th change point... c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, The minimum segment length is set to 3, and r is the value of radius.

[0110] The redundancy removal module is configured to iterate through all current variable points, attempt to remove them one by one, and recalculate the overall segmentation BIC value. If the overall BIC value decreases after removing a variable point, the variable point is considered a redundant point and is removed.

[0111] The iterative loop module is configured to execute the supplementary module to the redundancy removal module sequentially within the main loop. Each iteration uses the current set of variable points as input and performs a complete round of variable point optimization. After each iteration, the overall BIC value is recalculated. If the decrease in the current BIC value compared to the previous round is less than the set convergence threshold (0.01), the iteration stops. The maximum number of iterations (max_iter) is set to 50 to prevent infinite loops.

[0112] The output module is configured to output the final set of change points in the form of a visual chart. If a change point occurs, the location of the change point is marked, and an alarm or prompt is triggered for manual verification.

[0113] The following specific experiments illustrate the beneficial effects of the present invention.

[0114] Experiment Example 1, Experimental Verification

[0115] To verify the effectiveness and superiority of the detection method described in Example 1 of this invention in actual radiotherapy equipment quality assurance (QA) data, output dose data recorded during morning inspections of an Elekta medical linear accelerator at West China Hospital from January 2020 to December 2022 were selected as the evaluation sample, containing 682 consecutive quantitative measurements. The experimental objective was to identify potential state change points in this time-series data and to compare and analyze the detection performance of each change point detection method. Table 1 shows the statistical results of the example data.

[0116] Table 1. Example Data Statistics

[0117]

[0118] This experiment systematically compares the proposed "Dynp + RBF + multi-stage optimization algorithm" with several mainstream change point detection methods, covering four types of algorithms: Binseg, BottomUp, Pelt, and Window, and their performance under different model assumptions (L1, L2, RBF, and AR). All comparison methods employ parameter traversal to obtain the optimal penalty setting. The four types of algorithms (Binseg, BottomUp, Pelt, and Window) and the four model assumptions (L1, L2, RBF, and AR) are all known techniques.

[0119] The performance comparison results of each method are shown in Table 2. The main evaluation indicators include:

[0120] 12_cost: Represents the squared error between the predicted segment and the original signal;

[0121] BIC value: Bayesian information criterion used for model selection; generally, the smaller the value, the better.

[0122] Precision, recall, and F1 score: These measures the accuracy and completeness of change detection.

[0123] Sensitivity and specificity: These reflect the ability to detect true changes and non-changes, respectively.

[0124] AUC (Area Under the ROC Curve): A comprehensive evaluation of the classifier's discriminative ability.

[0125] Table 2. Performance comparison of different variable point detection methods on radiotherapy equipment output dose data.

[0126]

[0127]

[0128] As shown in Table 2, the Dynp multi-stage optimization method proposed in this invention still achieves the best overall performance without requiring manual setting of the penalty parameter.

[0129] (1) With an AUC of 0.96, it achieved a recall of 1.00 and a precision of 0.96, with an F1 score as high as 0.98;

[0130] (2) The required l2 cost is only 71.86, which is better than all other methods;

[0131] (3) The BIC value is -1208.42, which is slightly worse than Pelt (L2)'s -1231.93. However, considering that this method does not require penalty parameter tuning, its model simplicity and automation are significantly better.

[0132] (4) Compared with methods such as Pelt and Binseg, this method achieves a better balance in detection performance in avoiding severe false detections (such as BottomUp (AR) with 0% precision) or excessive smoothing (such as Window (L2) with 100% precision but low recall).

[0133] Taking all indicators into account, the method of this invention demonstrates higher detection robustness and practical value in real-world QA scenarios, and is particularly suitable for detecting state change points in radiotherapy equipment that do not require manual parameter tuning and need to be deployed automatically.

[0134] Figure 2 The results of the detection method of the present invention on the output dose timing data of a certain Elekta medical linear accelerator (682 times) are shown. The red vertical lines indicate the locations of the identified mutation points. It can be seen that the method can accurately locate the potential equipment status change points without excessive segmentation or obvious missed detection.

[0135] In summary, this invention provides a device state change detection method based on "multi-stage dynamic optimization" without penalty parameters. The method is based on the Dynp (Dynamic Programming) and RBF models from the Ruptures toolkit, and effectively improves the accuracy and stability of change detection through staged processing such as supplementing candidate changes (single and double points), local refinement, and deleting insignificant changes. This invention can be used to detect abrupt changes in time-series data related to quality control in radiotherapy equipment, ensuring the stability and safety of radiotherapy equipment during use.

Claims

1. A method for detecting sudden changes in time-series data based on multi-stage dynamic optimization, characterized in that: It includes the following steps: (1) Collect time-series quality control data of radiotherapy equipment; the time-series quality control data is daily or periodic QA detection time-series data; the QA detection time-series data includes the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error or collimator position error; (2) Perform initial change point detection on the collected time series data to obtain an initial candidate change point set; (3) Execution of the supplementation phase: Insert new variable points between any two adjacent variable points. If the Bayesian Information Criterion (BIC) value decreases after insertion, add the new variable points to the candidate set until the BIC value no longer decreases. (4) Perform local fine-tuning stage: Adjust the position of each candidate variable point in its neighborhood. If the BIC value decreases after adjustment, update it to a new variable point position. (5) Redundancy removal phase: Traverse all current variable points, remove them one by one, and recalculate the overall BIC value of the segment. If the overall BIC value decreases after removing a variable point, the variable point is identified as a redundant point and is removed. (6) Iterative loop: The above steps (3) to (5) are executed sequentially in the main loop. Each iteration takes the current set of variable points as input and executes a complete variable point optimization process. After each iteration, the overall BIC value is recalculated. If the current BIC value decreases less than the set convergence threshold compared to the previous iteration, the iteration stops. (7) Output the final set of variable points.

2. The detection method according to claim 1, characterized in that: In step (2), the initial change point detection uses the Dynp algorithm from the ruptures library, and the model type is the radial basis function model (RBF). And / or, in step (3), the method of inserting new variable points is: specify the number of variable points to be inserted, use the Dynp algorithm between any two adjacent variable points, the model type is radial basis function model RBF to detect new variable points, if the overall segmentation BIC value decreases after inserting new variable points, then include the variable point in the candidate set, repeat the process until the BIC value no longer decreases; And / or, in step (4), during the local fine-tuning stage, the search range for the variable point fine-tuning is a neighborhood window composed of radius points before and after it, where the value of radius is an integer from 1 to 10; wherein, for the i-th variable point c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, Where r is the minimum segment length, and r is the value of radius; And / or, in step (6), the convergence threshold is 0.01~1.5; And / or, in step (7), the final set of change points is output in the form of a visual chart. If a change point appears, the location of the change point is marked, and an alarm or prompt is triggered for manual verification.

3. The detection method according to claim 2, characterized in that: In step (2), the minimum segment length between the variable points is 3 to 10 sampling points; And / or, in step (2), the number of time-varying points during the initial time-varying point detection is set to 1~3; And / or, in step (2), the step length parameter during the initial change point detection is set to 1, 2 or 3; And / or, in step (3), the number of insertion points is 1 or 2; And / or, in step (3), the length of all sub-segments generated when inserting the variable point is not less than the minimum segment length, and the minimum segment length is 3 to 10 sampling points; And / or, in step (4), the minimum segment length is 3 to 10 sampling points; And / or, in step (6), the maximum number of iterations is 50.

4. The detection method according to any one of claims 1 to 3, characterized in that: The formula for calculating the BIC value is as follows: in, n represents the total number of samples in the time series; RSS represents the sum of squares of the model fitting error; p represents the number of model parameters, which is 2k, and k is the number of segments.

5. A time-series data mutation detection system based on multi-stage dynamic optimization, characterized in that: The system includes: The input module is configured to input the time-series quality control data of the radiotherapy equipment; the time-series quality control data is daily or periodic QA detection time-series data; the QA detection time-series data includes the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indication, flatness, symmetry, MLC blade position error, gantry position error or collimator position error; The initial change point generation module is configured to perform initial change point detection on the collected time series data to obtain an initial candidate change point set; The supplement module is configured to insert a new variable between any two adjacent variables. If the Bayesian Information Criterion (BIC) value decreases after insertion, the new variable is added to the candidate set until the BIC value no longer decreases. The local fine-tuning module is configured to adjust the position of each candidate variable point within its neighborhood. If the BIC value decreases after the adjustment, the new variable point position is updated. The redundancy removal module is configured to iterate through all current variable points, remove them one by one, and recalculate the overall BIC value of the segment. If the overall BIC value decreases after removing a variable point, the variable point is identified as a redundant point and removed. The loop iteration module is configured to execute the above-mentioned supplementation module, local fine-tuning module and redundancy removal module in the main loop in turn. Each iteration takes the current set of variable points as input and executes a complete round of variable point optimization process. After each iteration, the overall BIC value is recalculated. If the current BIC value decreases less than the set convergence threshold compared to the previous round, the iteration stops. The output module is configured to output the final set of variable points.

6. The detection system according to claim 5, characterized in that: In the initial change point generation module, the initial change point detection adopts the Dynp algorithm in the ruptures library, and the model type is the radial basis function model RBF; And / or, in the supplementary module, the method for inserting new variable points is as follows: specify the number of variable points to be inserted, use the Dynp algorithm between any two adjacent variable points, and use the radial basis function model (RBF) to detect new variable points. If the overall segmentation BIC value decreases after inserting a new variable point, then the variable point is included in the candidate set. Repeat the process until the BIC value no longer decreases. And / or, in the local fine-tuning module, the search range for the position adjustment is a neighborhood window consisting of radius time points before and after the change point, where the value of radius is an integer from 1 to 10; wherein, for the i-th change point... c i The search scope is defined as: And maintain the length of any adjacent segments. ; It is a turning point The previous variable point, It is a turning point The next variable point, Where r is the minimum segment length, and r is the value of radius; And / or, in the iterative loop module, the convergence threshold is 0.01~1.5; And / or, in the output module, the final set of change points is output in the form of a visual chart. If a change point occurs, the location of the change point is marked, and an alarm or prompt is triggered for manual verification.

7. The detection system according to claim 6, characterized in that: In the initial variable point generation module, the minimum segment length between the variable points is 3 to 10 sampling points; And / or, in the initial variable point generation module, the variable point number parameter is set to 1~3; And / or, in the initial change point generation module, the step length parameter is set to 1, 2 or 3; And / or, in the supplementary module, the number of inserted variable points is 1 or 2; And / or, in the supplementary module, the length of all sub-segments generated when inserting variable points is not less than the minimum segment length, and the minimum segment length is 3 to 10 sampling points; And / or, in the local fine-tuning module, the minimum segment length is 3 to 10 sampling points; And / or, in the loop iteration module, the maximum number of iterations is 50.

8. The detection system according to any one of claims 5 to 7, characterized in that: The formula for calculating the BIC value is as follows: in, n represents the total number of samples in the time series; RSS represents the sum of squares of the model fitting error; p represents the number of model parameters, which is 2k, and k is the number of segments.

9. A computer-readable storage medium, characterized in that: A computer program for implementing the time-series data mutation detection method based on multi-stage dynamic optimization as described in any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: A computer program for implementing the time-series data mutation detection system based on multi-stage dynamic optimization as described in any one of claims 5 to 8.

Citation Information

Patent Citations

  • Method and device for detecting position and category of change point

    CN114818969A

  • Elevator fault prediction method and device, electronic equipment and storage medium

    CN116119478A