Time series data mutation detection method and system based on multi-stage dynamic optimization and storage medium
Through a multi-stage dynamically optimized time series data mutation detection method, the state mutation of radiotherapy equipment is automatically identified, which solves the problems of inconsistent detection results and high computational costs in the existing technology and realizes efficient and stable equipment status monitoring.
Patent Information
- Application Number
- CN202511254825.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing radiotherapy equipment status monitoring methods have difficulty in effectively detecting sudden changes in equipment status when processing non-stationary time series data. The sensitivity of penalty parameter settings leads to inconsistent detection results and high computational costs, which affects the rapid deployment and automated implementation of quality control processes.
A multi-stage dynamic optimization method for time series data mutation detection is adopted. Through the steps of initial change point detection, supplementary stage, local fine-tuning and redundant deletion, the mutation points in the device status data are automatically identified. The Dynp algorithm and radial basis function model RBF in the ruptures library are used to avoid manually setting penalty parameters.
It improves the accuracy and robustness of device state mutation detection, reduces computing costs, supports single-indicator and multi-indicator parallel processing, is suitable for quality control of radiotherapy equipment, and ensures equipment stability and safety.
Smart Images

Figure CN120805003A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of radiotherapy equipment state monitoring and quality control, and particularly relates to a time series data mutation detection method, system and storage medium based on multi-stage dynamic optimization. BACKGROUND
[0002] In daily and periodic quality control of radiotherapy equipment (such as based on the AAPM TG-142 standard), time series records and analysis of multiple numerical indicators such as output dose, field shape, symmetry, energy consistency, etc. are often involved. The stability of the device performance is directly related to the accuracy of the treatment dose and the safety of the patient. However, the device may have state mutations such as dose deviation, energy drift, mechanical deviation, etc. in long-term operation. The commonly used statistical process control methods include univariate control charts (such as Shewhart, 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, Binseg, etc. require setting a penalty parameter to balance the fitting accuracy and model complexity. However, the value of the penalty parameter is highly sensitive, and different settings may produce significantly different detection results, seriously affecting the consistency and reliability of quality assurance (QA) analysis. On the other hand, traversing the penalty parameter or fusing multiple algorithms will greatly increase the computational cost, which is not conducive to the rapid deployment and automated implementation in actual quality control processes. SUMMARY
[0004] To solve the above problems, the application provides a time series data mutation detection method, system and storage medium based on multi-stage dynamic optimization. The detection method of the application can automatically identify, filter and optimize the mutation points (Change-points) in the device state data without manually setting the penalty term parameter, thereby improving the accuracy and robustness of abnormal state identification.
[0005] The application provides a time series data mutation detection method based on multi-stage dynamic optimization, which comprises the following steps: (1) collecting time series quality control data of a radiotherapy device; the time series quality control data is daily or periodic QA detection time series data; (2) performing initial change point detection on the collected time series data to obtain an initial candidate change point set; (3) performing an augmentation stage: inserting a new change point between any two adjacent change points, if the Bayesian Information Criterion (BIC) value decreases after insertion, the new change point is added to the candidate set, until the BIC value no longer decreases; (4) Perform local fine-tuning: adjust the position of each candidate change point within its neighborhood. If the BIC value decreases after adjustment, update it to the new change point position. (5) Execute the redundant deletion phase: traverse all current change points, remove them one by one, and recalculate the BIC value of the overall segmentation. If the overall BIC value decreases after removing a change point, the change point is considered a redundant point and is deleted; (6) Loop iteration: The above steps (3) to (5) are executed sequentially in the main loop. Each round of iteration takes the current change point set as input and executes a complete change point optimization process. The overall BIC value is recalculated after each round of iteration. If the current BIC value decreases below the set convergence threshold compared with the previous round, the iteration is stopped. (7) Output the final set of change points.
[0006] Furthermore, In step (1), the QA detection timing data includes the output dose or dose rate of the ionization chamber or reference dose meter in the radiotherapy equipment, energy consistency indicator, flatness, symmetry, MLC leaf position error, gantry position error or collimator position error; And / or, in step (2), 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 step (3), the method of inserting new change points is as follows: specifying the number of change points to be inserted, using the Dynp algorithm between any two adjacent change points, and using the radial basis function model RBF to detect new change points; if the BIC value of the overall segmentation decreases after the new change point is inserted, then the change point is included in the candidate set, and the execution is repeated until the BIC value no longer decreases; And / or, in step (4), in the local fine-tuning stage, the search range of the change point fine-tuning is a neighborhood window consisting of radius time points before and after it, and 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 keep any adjacent segment length ; It's a turning point The previous change point, It's a turning point The next inflection point, is the minimum segment length, r is the value of radius; preferably, the value of radius is an integer from 3 to 5; more preferably, the value of radius is 5.
[0007] 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.
[0008] And / or, in step (7), the final change point set is output in the form of a visualization chart, if a change point occurs, the change point position is marked, and an alarm or a prompt for manual verification is triggered.
[0009] Further, In step (2), the minimum segment length between change points is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0010] And / or, in step (2), the number of change points parameter is set to 1-3 when the initial change point detection is performed; preferably, the number of change points parameter is set to 1-2; more preferably, the number of change points parameter is set to 1.
[0011] And / or, in step (2), the step length parameter is set to 1, 2 or 3 when the initial change point detection is performed; preferably, the step length parameter is set to 1 or 2; more preferably, the step length parameter is set to 1.
[0012] And / or, in step (3), the number of inserted change points is 1 or 2; And / or, in step (3), all sub-segment lengths generated when the change points are inserted are not less than the minimum segment length, and the minimum segment length is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0013] And / or, in step (4), the minimum segment length is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0014] And / or, in step (6), the maximum number of iterations is 50.
[0015] Further, the BIC value calculation formula is: wherein, n represents the total number of samples of the time series; RSS represents the sum of squares of model fitting errors; p represents the number of model parameters, which is 2k, k is the number of segments.
[0016] The application also provides a time series data mutation detection system based on multi-stage dynamic optimization, which comprises: The input module is configured to input the collected time sequence quality control data of the radiotherapy device; the time sequence quality control data is daily or periodic QA detection time sequence data; The initial change point generation module is configured to perform initial change point detection on the collected time sequence data to obtain an initial candidate change point set; The supplement module is configured to insert a new change point between any two adjacent change points, and if the Bayesian information criterion (BIC) value decreases after the insertion, the new change point 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 change point in its neighborhood, and if the BIC value decreases after the adjustment, the position is updated to a new change point position; The redundancy deletion module is configured to traverse all current change points, remove them one by one, and recalculate the BIC value of the overall segmentation, and if the overall BIC value decreases after removing a change point, the change point is identified as a redundant point and is deleted; The loop iteration module is configured to sequentially execute the supplement module, the local fine-tuning module, and the redundancy deletion module in the main loop, and each iteration takes the current change point set as input to execute a complete change point optimization process. The overall BIC value is recalculated after each iteration, and if the current BIC value decreases by less than a set convergence threshold compared to the previous iteration, the iteration is stopped; The output module is configured to output the final change point set.
[0017] Further, In the input module, the QA detection time sequence data includes the output dose or dose rate of an ionization chamber or a reference dosimeter in the radiotherapy device, an energy consistency indicator, flatness, symmetry, MLC leaf position error, gantry position error, or collimator position error; And / or, in the initial change point generation module, the initial change point detection uses the Dynp algorithm in the ruptures library, and the model type is a radial basis function model (RBF); And / or, in the supplement module, the method for inserting a new change point is to specify the number of inserted change points, use the Dynp algorithm between any two adjacent change points, and detect new change points using a radial basis function model (RBF). If the overall segmentation BIC value decreases after inserting a new change point, the change point is included in the candidate set, and the process is repeated until the BIC value no longer decreases; And / or, in the local fine-tuning module, the search range of the position adjustment is a neighborhood window consisting of radius time points before and after the change point, and the value of radius is an integer from 1 to 10. The search range of the i-th change point is defined as: c i And the length of any adjacent segment is maintained ; is a turning point is a turning point preceding the turning point is a turning point succeeding the turning point is a turning point succeeding the turning point is a minimum segment length, and r is a value of radius; preferably, the value of radius is an integer of 3-5; more preferably, the value of radius is 5.
[0018] And / or, in the loop iteration 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.
[0019] And / or, in the output module, the final turning point set is output in the form of a visual chart, if a turning point occurs, the position of the turning point is marked, and an alarm or a prompt for manual verification is triggered.
[0020] Further, In the initial turning point generation module, the minimum segment length between the turning points is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0021] And / or, in the initial turning point generation module, the number of turning points parameter is set to 1-3; preferably, the number of turning points parameter is set to 1-2; more preferably, the number of turning points parameter is set to 1.
[0022] And / or, in the initial turning 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.
[0023] And / or, in the supplement module, the number of inserted turning points is 1 or 2; And / or, in the supplement module, all the sub-segment lengths generated when the turning points are inserted are not less than the minimum segment length, and the minimum segment length is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0024] And / or, in the local fine-tuning module, the minimum segment length is 3-10 sampling points; preferably, the minimum segment length is 3-5 sampling points; more preferably, the minimum segment length is 3 sampling points.
[0025] And / or, in the loop iteration module, the maximum number of iterations is 50.
[0026] Further, the BIC value calculation formula is: wherein, n represents the total number of samples in the time series; RSS represents the sum of squares of model fitting errors; p represents the number of model parameters, which is 2k, k is the number of segments.
[0027] The application also provides a computer readable storage medium for implementing the computer program of the aforementioned multi-stage dynamic optimization-based time series data mutation detection method.
[0028] The application also provides a computer readable storage medium for implementing the computer program of the aforementioned multi-stage dynamic optimization-based time series data mutation detection system.
[0029] The application can be widely applied to: (1) QA monitoring of radiotherapy accelerators (including Edge, Versa-HD, Unity MR-Linac, etc.); (2) identification of output drift and calibration abnormalities based on time series; (3) quantitative evaluation of state transitions such as hardware degradation, software updates, or environmental interference; (4) can be extended to image quality control, dosimetric QA, patient-specific verification, and other QA scenarios.
[0030] Compared with the prior art, the application has the following beneficial effects: (1) No penalty parameter (penalty) is needed to avoid performance instability caused by subjective parameter tuning; (2) It has better detection accuracy and robustness, avoiding overfitting or missing detection of variable points; (3) It supports parallel and grid search, has good scalability and automation capability; (4) It is suitable for various indicators of radiotherapy QA (such as output dose, flatness, energy spectrum drift, etc.), and supports single indicator and multi-indicator parallel processing.
[0031] In summary, the application provides a device state variable point detection method based on "multi-stage dynamic optimization" without penalty parameters. The method is based on Dynp (Dynamic Programming) and RBF model in the ruptures tool library, and through the stages of supplementing candidate variable points (single point, double point), local refinement, deleting redundant variable points (deleteinsignificant), the accuracy and stability of variable point detection are effectively improved. The application can be used for detecting time series data mutations related to quality control in radiotherapy devices, ensuring the stability and safety of radiotherapy devices during use.
[0032] Obviously, according to the above content of the present application, according to the ordinary technical knowledge and common practice in the art, other various forms of modifications, replacements or changes can be made without departing from the above basic technical idea of the present application.
[0033] The above content of the present application will be further described in detail through the specific embodiments in the form of examples. However, it should not be understood that the above subject matter of the present application is limited to the following examples. Any technology realized based on the above content of the present application belongs to the scope of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 Flow chart of the multi-stage dynamic optimization-based time series data mutation detection method.
[0035] Figure 2 The detection result chart of the detection method of the present application on the time series data of the output dose of radiotherapy: (A) is the output dose change chart of 2020; (B) is the output dose change chart of 2021; (C) is the output dose change chart of 2022. DETAILED DESCRIPTION
[0036] It should be particularly pointed out that the algorithms of the data acquisition, transmission, storage and processing steps not specifically explained in the examples, and the hardware structure, circuit connection, etc. not specifically explained can be realized through the existing technology disclosed.
[0037] Example 1, multi-stage dynamic optimization-based time series data mutation detection method The flow chart of the multi-stage dynamic optimization-based time series data mutation detection method is shown in Figure 1 .
[0038] The present embodiment provides a multi-stage dynamic optimization-based radiotherapy equipment time series quality control data mutation detection method, which comprises the following steps: (1) collecting 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 (including the output dose or dose rate of the ionization chamber or reference dosimeter in the radiotherapy equipment, energy consistency indicator, flatness, symmetry, MLC leaf position error, gantry position error or collimator position error, etc.).
[0039] (2) Perform initial change point detection 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 a radial basis function model (RBF), wherein the minimum segment length (min_size) between change points is set to 3 to ensure that each segment of data has sufficient statistical stability. Since the number of real change points in the actual data is unpredictable, the number of change points parameter (n_bkps) is set to 1 in the initial change point detection stage to preferentially extract the globally most significant structural mutation point. 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 out redundant change points). The jump length parameter (jump) is set to 1, that is, no jump sampling is performed in the change point position search process, and full search is performed with the smallest step size to maximize the discrimination accuracy of the change point position and avoid missing potential change points due to jump sampling.
[0040] (3) Perform an additional stage: insert a single change point or a double change point between any two adjacent change points, and if the Bayesian information criterion (BIC value) decreases after insertion, add the new change point to the candidate set until the BIC value no longer decreases.
[0041] The change point insertion method inserts a specified number of change points (which can be one or two) between any two adjacent change points, and under the premise of meeting the minimum segment length constraint (set to 3 in this embodiment), applies the dynamic programming-based change point detection algorithm (Dynp) and the radial basis function cost model (Rbf) to detect new candidate change points. The insertion operation is only performed if the length of all subsegments generated before and after insertion is not less than the minimum segment length. If the Bayesian information criterion (BIC) value of the overall segmentation structure decreases after inserting the change point, the change point is included in the candidate set. The above process can be iterated until further insertion no longer results in a decrease in the BIC value.
[0042] The BIC value calculation formula is: Where n represents the total number of time series samples; RSS (Residual Sum of Squares) represents the sum of squares of model fitting errors; and p is the number of model free parameters.
[0043] The sum of squares of model fitting errors (RSS) is automatically calculated by the cost function (this embodiment uses CostL2) in the ruptures tool library, which represents the sum of squares of errors between observed values and their fitted values in each segment. For each set of change point division, RSS is a fixed and unique value.
[0044] In this example, the BIC evaluation uses the L2 model as the error metric. Assuming each segment is fitted with a mean and a variance, each segment contains two free parameters. If the segment is divided into k segments, the total number of parameters is: p = 2k, where k is the number of segments.
[0045] (4) Perform local fine-tuning phase: adjust the position of each candidate change point within its neighborhood. If the BIC value decreases after adjustment, update it to the new change point position. In the local fine-tuning phase, the search range of the change point fine-tuning is the neighborhood window consisting of radius time points before and after it. The default value of radius is 5. For the i-th change point c i The search scope is defined as: , and keep any adjacent segment length ; It's a turning point The previous change point, It's a turning point The next inflection point, is the minimum segment length (set to 3), and r is the radius value.
[0046] (5) Execute the redundant removal phase: traverse all current change points, try to remove them one by one, and recalculate the BIC value of the overall segmentation. If the overall BIC value decreases after removing a change point, the change point is considered a redundant point and is deleted.
[0047] (6) Iteration: Steps (3) to (5) are executed sequentially in the main loop. Each iteration uses the current set of change points as input and executes a complete change point optimization process. The overall BIC value is recalculated after each iteration. If the current BIC value decreases below the set convergence threshold (0.01) compared to the previous round, the iteration is terminated. The maximum number of iterations (max_iter) is set to 50 to prevent infinite loops.
[0048] (7) Output the final set of change points in the form of a visual chart. If a change point occurs, mark the location of the change point and trigger an alarm or prompt for manual verification.
[0049] The above method supports batch processing, automatic parameter selection and visual output, and is suitable for real-time monitoring and historical retrospective analysis of clinical quality control data.
[0050] Example 2: Time Series Data Mutation Detection System Based on Multi-stage Dynamic Optimization This embodiment provides a radiotherapy equipment timing quality control data mutation detection system based on multi-stage dynamic optimization, the system comprising: The input module is configured to input the collected radiotherapy equipment timing quality control data, and the timing quality control data is daily or periodic QA detection timing data (including output dose or dose rate of an ionization chamber or a reference dosimeter in the radiotherapy equipment, energy consistency indication quantity, flatness, symmetry, MLC leaf position error, gantry position error or collimator position error, etc.).
[0051] The initial change point generation module is configured to perform initial change point detection on the radiotherapy equipment timing quality control data by using a change point detection algorithm based on dynamic programming to obtain an initial candidate change point set; the change point detection algorithm adopts a Dynp algorithm in a ruptures library, and a model type is a radial basis function model (RBF), wherein a minimum segment length (min_size) between change points is set to 3 to ensure that each segment of data has sufficient statistical stability. In view of the unpredictable number of real change points in actual data, the number of change points parameter (n_bkps) is set to 1 in the initial change point detection stage to preferentially extract a globally most significant structural mutation point. 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 increasing candidate change points, local adjustment of change point positions and screening out redundant change points). The skip length parameter (jump) is set to 1, that is, no skip sampling is performed in the change point position search process, and full search is performed by using the minimum step length to maximize the discrimination accuracy of the change point position and avoid missing potential change points due to skip sampling.
[0052] The supplement module is configured to insert a single change point or a double change point between any two adjacent change points, and if the Bayesian information criterion (BIC value) is significantly reduced after insertion, the new change point is added to the candidate set until the BIC value is no longer reduced.
[0053] The change point insertion method inserts a change point (which can be one or two) between any two adjacent change points, and under the premise of meeting the minimum segment length constraint (set to 3 in this embodiment), applies a change point detection algorithm (Dynp) based on dynamic programming and a radial basis function cost model (Rbf) to detect new candidate change points. The insertion operation is only performed under the condition that the lengths of all subsegments generated before and after insertion are not less than the minimum segment length. If the Bayesian information criterion (BIC) value of the overall segmentation structure is reduced after inserting the change point, the change point is included in the candidate set. The above process can be iterated until further insertion no longer brings a reduction in the BIC value.
[0054] The BIC value calculation formula is: Wherein, n represents the total number of samples in the time series; RSS (Residual Sum of Squares) represents the sum of squares of model fitting errors; p is the number of free parameters of the model.
[0055] The sum of squares of model fitting errors (RSS) is automatically calculated by the cost function (CostL2 is used in this embodiment) in the ruptures tool library, which represents the sum of squares of errors between the observed values and their fitted values in each segment. For each set of change point division, RSS is a fixed and unique value.
[0056] In this embodiment, the BIC evaluation adopts L2 model as the error measurement method, assuming that a mean and a variance are fitted for each segment, so each segment contains two free parameters. If divided into k segments, the total number of parameters is: p = 2k, k is the number of segments.
[0057] The local fine-tuning module is configured to adjust the position of each candidate change point in its neighborhood. If the BIC value decreases after adjustment, it is updated to the new change point position. In the local fine-tuning stage, the search range of change point fine-tuning is the neighborhood window composed of radius time points before and after it, and the default value of radius is 5. The search range of the i-th change point c i is defined as: , and the length of any adjacent segment is kept ; is the previous change point of the change point , is the next change point of the change point , is the minimum segment length (set to 3), and r is the value of radius.
[0058] The redundancy deletion module is configured to traverse all current change points, try to remove them one by one, and recalculate the BIC value of the overall segmentation. If the overall BIC value decreases after removing a change point, it is determined that the change point is a redundant point and is deleted.
[0059] The loop iteration module is configured to execute the above supplement module to the redundancy deletion module in the main loop in turn. Each iteration takes the current change point set as input and executes a complete change point optimization process. After each iteration, the overall BIC value is recalculated. If the current BIC value decreases by less than the set convergence threshold (0.01) compared with the last round, the iteration is stopped. The maximum number of iterations (max_iter) is set to 50 to prevent infinite loops.
[0060] The output module is configured to output the final change point set in the form of a visual chart. If a change point appears, the change point position is labeled, and an alarm or prompt is triggered for manual verification.
[0061] The beneficial effects of the present application are illustrated below by specific experiments.
[0062] Experimental Example 1, Experimental Verification To verify the effectiveness and superiority of the detection method described in Embodiment 1 of the present application in actual radiotherapy equipment quality assurance (QA) data, the output dose data recorded in the morning inspection of a Varian medical electronic linear accelerator in West China Hospital from January 2020 to December 2022 were selected as evaluation samples, containing 682 consecutive quantitative measurement values. The experimental goal is to identify the potential state mutation points in the time series data and compare the detection performance of each change point detection method. Table 1 shows the statistical data.
[0063] Table 1. Statistical data of the example In this experiment, the "Dynp + RBF + multi-stage optimization algorithm" proposed in the present application was compared with a variety of mainstream change point detection methods, covering Binseg, BottomUp, Pelt, Window four algorithms and their performance under different model assumptions (L1, L2, RBF, AR). All comparison methods use parameter traversal to obtain the optimal penalty (penalty) setting. Binseg, BottomUp, Pelt, Window four algorithms and L1, L2, RBF, AR four model assumptions are known technologies.
[0064] The performance comparison results of each method are shown in Table 2, and the main evaluation indicators include: 12_cost: represents the squared error between the predicted segment and the original signal; BIC value: Bayesian Information Criterion for model selection, generally the smaller the better; Precision, Recall and F1 score: measure the accuracy and integrity of change point detection; Sensitivity and specificity: reflect the ability to detect true change points and non-change points, respectively; AUC (area under the ROC curve): comprehensive evaluation of the discriminant ability of the classifier.
[0065] Table 2. Performance comparison of different change point detection methods on radiotherapy equipment output dose data From the results in Table 2, it can be seen that the Dynp multi-stage optimization method proposed in the present application still achieves the optimal comprehensive performance without the need for manual setting of the penalty parameter: (1) Achieved 1.00 recall rate and 0.96 precision rate with AUC value of 0.96, F1 score as high as 0.98; (2) The required l2_cost is only 71.86, which is better than all other methods; (3) The BIC value is -1208.42, although it is slightly inferior to -1231.93 of Pelt(L2), considering that this method does not need to fine-tune the parameters, the model simplicity and automation degree are significantly better; (4) Compared with Pelt, Binseg and other methods, this method better balances the detection performance in avoiding serious false detection (such as 0% precision rate of BottomUp(AR)) or excessive smoothing (such as 100% precision rate but low recall of Window(L2)).
[0066] In summary, the method of the present application shows higher detection robustness and practical value in actual QA scenarios, and is particularly suitable for detecting state change points of radiotherapy equipment without manual parameter tuning and automatic deployment.
[0067] Figure 2 The detection results of the method of the present application on the 682 output dose time series data of a certain medical electron linear accelerator are shown, and the red vertical lines represent the positions of the identified mutation points. It can be seen that the method can accurately locate the potential device state change time point, and there is no excessive segmentation or obvious omission.
[0068] In summary, the present application provides a device state change point detection method based on "multi-stage dynamic optimization" without penalty parameters. The method is based on Dynp (Dynamic Programming) and RBF model in the ruptures tool library, and through the stages of supplementing candidate change points (single point, double point), local refinement, deleting redundant change points (deleteinsignificant), the accuracy and stability of change point detection are effectively improved. The present application can be used for detecting the mutation of time series data related to quality control in radiotherapy equipment, and ensuring the stability and safety of radiotherapy equipment during use.
Claims
1. A method for detecting mutations in time series data based on multi-stage dynamic optimization, characterized by: It includes the following steps: (1) Collecting time series quality control data of radiotherapy equipment; the time series quality control data is daily or periodic QA test time series data; (2) Perform initial change point detection on the collected time series data to obtain the initial candidate change point set; (3) Execute the supplementation phase: insert a new change point between any two adjacent change points. If the Bayesian Information Criterion (BIC) value decreases after the insertion, the new change point will be added to the candidate set until the BIC value no longer decreases. (4) Perform local fine-tuning: adjust the position of each candidate change point within its neighborhood. If the BIC value decreases after adjustment, update it to the new change point position. (5) Execute the redundant deletion phase: traverse all current change points, remove them one by one, and recalculate the BIC value of the overall segmentation. If the overall BIC value decreases after removing a change point, the change point is considered a redundant point and is deleted; (6) Loop iteration: The above steps (3) to (5) are executed sequentially in the main loop. Each round of iteration takes the current change point set as input and executes a complete change point optimization process. The overall BIC value is recalculated after each round of iteration. If the current BIC value decreases below the set convergence threshold compared with the previous round, the iteration is stopped. (7) Output the final set of change points.
2. The detection method according to claim 1, wherein: In step (1), the QA detection timing data includes the output dose or dose rate of the ionization chamber or reference dose meter in the radiotherapy equipment, energy consistency indicator, flatness, symmetry, MLC leaf position error, gantry position error or collimator position error; And / or, in step (2), 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 step (3), the method of inserting new change points is as follows: specifying the number of change points to be inserted, using the Dynp algorithm between any two adjacent change points, and using the radial basis function model RBF to detect new change points; if the BIC value of the overall segmentation decreases after the new change point is inserted, then the change point is included in the candidate set, and the execution is repeated until the BIC value no longer decreases; And / or, in step (4), in the local fine-tuning stage, the search range of the change point fine-tuning is a neighborhood window consisting of radius time points before and after it, and 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 keep any adjacent segment length ; It's a turning point The previous change point, It's a turning point The next inflection point, is the minimum segment length, r is the value of radius; And / or, in step (6), the convergence threshold is 0.01 to 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 position of the change point is marked, and an alarm is triggered or a prompt is given to perform manual verification.
3. The detection method according to claim 2, wherein: In step (2), the minimum segment length between the change points is 3 to 10 sampling points; And / or, in step (2), the number of change points parameter for the initial change point detection is set to 1-3; And / or, in step (2), the jump length parameter is set to 1, 2 or 3 during the initial change point detection; and / or, in step (3), the number of inserted change points is 1 or 2; And / or, in step (3), the lengths of all sub-segments generated when inserting the change point are 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 BIC value calculation formula is: in, n represents the total number of samples in the time series; RSS represents the sum of squares of model fitting errors; 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 by: The system comprises: An 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 detection time series data; 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 supplementation module is configured to insert a new change point between any two adjacent change points. If the Bayesian Information Criterion (BIC) value decreases after the insertion, the new change point 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 change point within its neighborhood. If the BIC value decreases after adjustment, it is updated to the new change point position. The redundancy removal module is configured to traverse all current change points, remove them one by one, and recalculate the BIC value of the overall segmentation. If the overall BIC value decreases after removing a change point, the change point is considered redundant and deleted. The loop iteration module is configured to execute the above-mentioned supplementation module, local fine-tuning module and redundancy removal module in sequence in the main loop. Each iteration takes the current change point set as input and executes a complete change point optimization process. The overall BIC value is recalculated after each iteration. If the current BIC value decreases below the set convergence threshold compared with the previous round, the iteration is stopped. The output module is configured to output the final set of change points.
6. The detection system according to claim 5, characterized in that: In the input module, the QA detection timing data includes the output dose or dose rate, energy consistency indicator, flatness, symmetry, MLC leaf position error, gantry position error or collimator position error of the ionization chamber or reference dosimeter in the radiotherapy equipment; 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; And / or, in the supplementing module, the method for inserting new change points is as follows: specifying the number of change points to be inserted, using the Dynp algorithm between any two adjacent change points, using a radial basis function model (RBF) to detect new change points, and if the BIC value of the overall segmentation decreases after the new change point is inserted, then adding the change point to the candidate set, and repeating the process until the BIC value no longer decreases; And / or, in the local fine-tuning module, the search range for position adjustment is a neighborhood window consisting of radius time points before and after the change point, and 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 keep any adjacent segment length ; It's a turning point The previous change point, It's a turning point The next inflection point, is the minimum segment length, r is the value of radius; And / or, in the loop iteration 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 appears, the position of the change point is marked, and an alarm is triggered or a prompt is given to perform manual verification.
7. The detection system according to claim 6, characterized in that: In the initial change point generation module, the minimum segment length between the change points is 3 to 10 sampling points; and / or, in the initial change point generation module, the change point number parameter is set to 1 to 3; and / or, in the initial change point generation module, the jump length parameter is set to 1, 2, or 3; and / or, in the supplementary module, the number of the inserted change points is 1 or 2; And / or, in the supplementing module, the lengths of all sub-segments generated when inserting the change points are 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 BIC value calculation formula is: in, n represents the total number of samples in the time series; RSS represents the sum of squares of model fitting errors; 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 method for detecting mutations in time series data 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
Genetic variants on chr2 and chr16 as markers for use in breast cancer risk assessment, diagnosis, prognosis and treatment
CN101874120A
Method and device for detecting position and category of change point
CN114818969A
Statistical model and deep learning-based equipment multi-stage degradation evolution prediction method, equipment and storage medium
CN115935813A
Elevator fault prediction method and device, electronic equipment and storage medium
CN116119478A
Bulk commodity supply chain management system and method
CN120450577A
Cited By
Leakage detection method based on resident gas consumption
CN121350841A