Adaptive optimization and correction method for time series prediction results

By using adaptive correction processing and iterative early stopping conditions to generate the optimal prediction sequence, the problems of insufficient prediction result quality assessment and weak trend correction ability in existing technologies are solved, and high-quality prediction result output and reliable prediction interval generation are achieved.

CN122153846APending Publication Date: 2026-06-05BEIJING LANGE CLOUD BUSINESS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LANGE CLOUD BUSINESS TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient mechanisms for quality assessment and screening of prediction results in the post-processing and delivery of time series prediction results, weak adaptive trend correction capabilities of predicted sequences, and unreliable generation of prediction intervals and quality warnings.

Method used

By performing adaptive correction processing on the candidate prediction sequences, at least two corrected prediction sequences are generated, and the optimal prediction sequence is determined according to the preset evaluation criteria. The final prediction sequence is generated by combining iteration conditions and early stopping conditions, and then trend processing and quality control detection are performed.

Benefits of technology

It achieves adaptive optimization of prediction results, improves the quality assessment and screening capabilities of prediction results, enhances the adaptive trend correction capability of prediction sequences, and provides a reliable prediction interval generation and quality early warning mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153846A_ABST
    Figure CN122153846A_ABST
Patent Text Reader

Abstract

The application discloses a kind of adaptive optimization and correction method of timing prediction result.The method includes: receiving the preliminary prediction sequence of the object to be predicted and corresponding historical true value sequence;Quality assessment is carried out on preliminary prediction sequence and candidate prediction sequence is determined;Adaptive correction processing is carried out on candidate prediction sequence, at least two correction prediction sequences are generated and the optimal prediction sequence is determined according to preset evaluation criteria;When meeting iteration condition, repeat correction and terminate iteration when meeting early stop condition;Trend processing is carried out on the prediction sequence obtained by iteration termination to obtain the final prediction sequence, the prediction interval corresponding to the final prediction sequence is generated based on historical error, and quality control detection is carried out on the final prediction sequence and / or prediction interval, and early warning information is output when meeting early warning condition.Through the above scheme, the evaluation screening, optimal correction and iteration control of the prediction result are realized, and the interval generation and early warning are combined to improve the reliability of prediction delivery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of adaptive optimization and correction technology for time series prediction results, and in particular to an adaptive optimization and correction method for time series prediction results. Background Technology

[0002] In time-series forecasting applications such as finance, industrial product prices, energy load, and supply chain demand, forecasting models typically output forecast sequences for several future periods, which are then used for decision-making, risk control, and resource allocation. Since business operations often focus on usability metrics such as the trend direction, key inflection points, smoothness of end-point transitions, and uncertainty intervals of the forecast sequence, post-processing optimization, trend correction, interval generation, and quality monitoring after obtaining preliminary forecast results have become crucial steps in the engineering implementation of forecasting systems.

[0003] In existing technologies, post-processing methods for model output prediction sequences typically include: simple smoothing of the predicted values ​​(such as moving average or exponential smoothing), overall bias correction of the prediction sequence (such as adding or subtracting constants or scaling), or manual rule adjustment and manual verification when the prediction results deviate significantly. However, these processing methods are mostly single-strategy or fixed-parameter processing, often lacking a systematic evaluation and screening mechanism for the quality of prediction results. It is difficult to adaptively select correction strategies based on the characteristics of the prediction sequence in terms of directional changes, local fluctuations, and gradient changes. At the same time, when there are jumps or systematic deviations between the prediction sequence and the historical true sequence, simple smoothing or bias correction can easily cause trend distortion or local error accumulation. In addition, existing technologies often use fixed confidence intervals or fixed error assumptions to generate prediction uncertainty intervals, making it difficult to dynamically adjust the interval width according to the historical error distribution and target fluctuation level, and interval update lag is likely to occur in scenarios with frequent data updates. Furthermore, the lack of quality control and early warning mechanisms for indicators such as abnormal fluctuations and trend change frequency in the prediction output makes it difficult to identify and deal with low-quality prediction results in a timely manner.

[0004] Therefore, in the post-processing and delivery of time series prediction results, the lack of quality assessment and screening mechanisms for prediction results, the weak adaptive trend correction capability of prediction sequences, and the unreliability of prediction interval generation and quality early warning have become urgent problems to be solved. Summary of the Invention

[0005] This application provides an adaptive optimization and correction method for time series forecasting results, aiming to solve the problems in the post-processing and delivery of time series forecasting results in the prior art, such as insufficient quality assessment and screening mechanisms for forecasting results, weak adaptive trend correction capability of forecasted sequences, and unreliable forecast interval generation and quality warning.

[0006] An adaptive optimization and correction method for time series prediction results, the method comprising:

[0007] Receive the preliminary prediction sequence of the object to be predicted and the historical true value sequence corresponding to the object to be predicted;

[0008] The preliminary predicted sequence is quality evaluated and candidate predicted sequences are determined based on preset conditions;

[0009] An adaptive correction process is performed on the candidate prediction sequence, the adaptive correction process including: generating at least two corrected prediction sequences, and determining the optimal prediction sequence from the corrected prediction sequences according to a preset evaluation criterion;

[0010] When the iteration condition is met, the adaptive correction process is repeatedly executed with the optimal prediction sequence as input, and the iteration is terminated when the early stopping condition is met.

[0011] Perform trend processing on the predicted sequence obtained at the end of the iteration to obtain the final predicted sequence;

[0012] Based on historical errors, a prediction interval corresponding to the final prediction sequence is generated, and quality control detection is performed on the final prediction sequence and / or the prediction interval. When the warning conditions are met, a warning message is output.

[0013] Optionally, in the above scheme, the quality assessment includes:

[0014] The directional accuracy is calculated based on the directional change relationship between the historical true value sequence and the preliminary prediction sequence, and the directional accuracy is compared with a preset quality threshold to determine the candidate prediction sequence.

[0015] And / or, calculate a comprehensive score, which is obtained by combining the direction accuracy and error index according to a preset weight, and determine the candidate prediction sequence and / or use it for the preset evaluation criteria based on the comprehensive score.

[0016] Optionally, in the above scheme, the adaptive correction process includes performing an initial correction on the candidate prediction sequence, the initial correction including:

[0017] The candidate predicted sequence is shifted and corrected, and the mean square error of the predicted sequence before and after shift correction is compared with the historical true value sequence to determine whether to adopt the shift correction result.

[0018] Optionally, in the above scheme, the adaptive correction process includes multi-policy parallel correction, which includes one or a combination of the following:

[0019] Correction based on trend-based voting;

[0020] Endpoint smoothing correction;

[0021] Sequence reconstruction correction based on gradient consistency.

[0022] Optionally, in the above scheme, the trend-based voting correction includes forward trend voting correction and backward trend voting correction; wherein, for the same prediction time point, voting is conducted based on the upward or downward trend of multiple predictions at that time point, and the corrected prediction value for that time point is determined according to the voting results, thereby forming a trend voting correction prediction sequence.

[0023] Optionally, in the above scheme, the endpoint smoothing correction includes smoothing constraint processing on the connection position between the start segment of the predicted sequence and the end of the historical true value sequence, so as to output the endpoint smoothing corrected predicted sequence.

[0024] The gradient consistency-based sequence reconstruction correction includes calculating the gradient change between adjacent time points, determining the target gradient pattern based on the gradient change patterns of historical multi-period predictions, and then reconstructing the prediction sequence based on the target gradient pattern to output a gradient consistency-corrected prediction sequence.

[0025] Optionally, in the above scheme, the early stopping condition includes: terminating the iteration when the optimal prediction sequence obtained based on the preset evaluation criterion does not meet the preset improvement condition relative to the previous optimal prediction sequence in a certain iteration.

[0026] Optionally, in the above scheme, the trend processing includes: performing data smoothing and trend extraction processing and / or secondary trend cycle optimization processing on the predicted sequence; wherein, the data smoothing and trend extraction processing includes at least one of exponential weighted moving average smoothing, simple moving average smoothing, and seasonal adjustment processing; the secondary trend cycle optimization processing includes trend consistency judgment and screening based on clustering and / or trend consistency correction based on benchmark data.

[0027] Optionally, generating the prediction interval in the above scheme includes: determining the error distribution based on the historical error set corresponding to the historical true value sequence and the final prediction sequence; performing adaptive adjustment of the quantiles in the candidate quantile set according to the error distribution to determine the upper and lower bound quantiles of the interval; and constraining the interval width of the prediction interval based on the target volatility range, wherein the target volatility range is 0.02 to 0.05.

[0028] Optionally, in the above scheme, the quality control detection includes: performing numerical anomaly detection on the final predicted sequence; performing fluctuation frequency detection on the final predicted sequence; performing directional accuracy evaluation on the final predicted sequence; and outputting early warning information when any detection result meets the early warning conditions.

[0029] Compared with the prior art, this application has at least the following beneficial effects:

[0030] Based on further analysis and research of existing technical problems, this application recognizes that existing technologies suffer from deficiencies in the post-processing and delivery of time series prediction results, including insufficient quality assessment and screening mechanisms, weak adaptive trend correction capabilities of prediction sequences, and unreliable prediction interval generation and quality warnings. By performing adaptive correction processing on candidate prediction sequences, at least two corrected prediction sequences are generated, and the optimal prediction sequence is determined according to preset evaluation criteria. This eliminates the reliance on a single, fixed post-processing method, instead forming a "multi-candidate—evaluation and selection" mechanism. This leads to the derivation that prediction sequences can adaptively obtain more suitable correction paths based on their own performance differences. When the iteration conditions are met, adaptive correction is repeatedly executed, and the iteration is terminated when the early stopping condition is met. This allows the correction process to continue when the evaluation results can be improved and to stop in time when the improvement is insufficient. This leads to the conclusion that the prediction correction has a controllable iterative closed loop rather than a one-time static adjustment. Subsequently, trend processing is performed on the prediction sequence obtained after the iteration is terminated to obtain the final prediction sequence. Based on the historical error, a prediction interval corresponding to the final prediction sequence is generated. At the same time, quality control checks are performed on the final prediction sequence and / or prediction interval, and warning information is output when the warning conditions are met. Therefore, not only single-point predictions are output, but also the uncertainty expression that matches them is output, and abnormal results are monitored and prompted.

[0031] This method establishes corresponding mechanisms in each stage of quality assessment and screening, adaptive correction and selection, iterative early stopping control, trend processing output, and interval generation and quality early warning, thereby providing a direct solution to the problems proposed in the existing technology, such as "lack of systematic assessment and screening, fixed correction strategies that are difficult to adapt, and insufficient interval generation and quality monitoring leading to poor delivery reliability". Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating an adaptive optimization and correction method for timing prediction results provided in one embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0034] In one embodiment, such as Figure 1 As shown, an adaptive optimization and correction method for time series prediction results is provided, including the following steps:

[0035] Receive the preliminary prediction sequence of the object to be predicted and the historical true value sequence corresponding to the object to be predicted;

[0036] The preliminary predicted sequence is quality evaluated and candidate predicted sequences are determined based on preset conditions;

[0037] An adaptive correction process is performed on the candidate prediction sequence, the adaptive correction process including: generating at least two corrected prediction sequences, and determining the optimal prediction sequence from the corrected prediction sequences according to a preset evaluation criterion;

[0038] When the iteration condition is met, the adaptive correction process is repeatedly executed with the optimal prediction sequence as input, and the iteration is terminated when the early stopping condition is met.

[0039] Perform trend processing on the predicted sequence obtained at the end of the iteration to obtain the final predicted sequence;

[0040] Based on historical errors, a prediction interval corresponding to the final prediction sequence is generated, and quality control detection is performed on the final prediction sequence and / or the prediction interval. When the warning conditions are met, a warning message is output.

[0041] In one implementation, this method is used to post-process and optimize the "preliminary prediction sequence" generated by any prediction model and deliver it. The preliminary prediction sequence can be the output of a single model or the output of multiple integrated models; the historical true value sequence is the observation value of the same prediction object corresponding to the preliminary prediction sequence within a historical time period. Both are arranged in chronological order and have alignable time indices. To ensure consistency in subsequent calculations, it is preferable to perform time alignment at the input stage to ensure that the start time of the preliminary prediction sequence and the end time of the historical true value sequence meet a preset connection relationship. If necessary, missing time points can be filled in or removed.

[0042] In another implementation, quality assessment is used to screen candidate predicted sequences for the optimization process. Quality assessment can be calculated based on indicators such as trend direction, volatility, and error between the predicted sequence and historical true value sequences, and compared with preset conditions. If the conditions are not met, the sequence can be directly marked as low-quality and stopped from entering the subsequent correction process, or it can enter another fallback processing process (e.g., only outputting a conservative range or only outputting warning information). After the candidate predicted sequences are determined, they enter the adaptive correction process.

[0043] In another embodiment, the adaptive correction process includes at least two steps: "generating multiple corrected prediction sequences" and "selecting the optimal prediction sequence." Multiple corrected prediction sequences can be generated in parallel using different correction strategies or different correction parameters. The optimal sequence can be selected by uniformly evaluating each corrected prediction sequence using preset evaluation criteria. The preset evaluation criteria can be a single indicator (e.g., an error indicator) or a combination of multiple indicators (e.g., weighting trend consistency with the error indicator), and necessary constraints can be set (e.g., the trend direction must not significantly contradict historical trends) to ensure the usability of the optimal prediction sequence.

[0044] In another implementation, iteration and early stopping are used to gradually approach an acceptable prediction result through multiple rounds of correction. Iteration conditions can be determined based on the prediction period length, the allowed number of iterations, or whether the evaluation result still has room for improvement; early stopping conditions are used to terminate the iteration when the evaluation result no longer improves or the improvement is insufficient, avoiding ineffective and repeated corrections. The prediction sequence obtained after iteration termination serves as input for subsequent trend processing.

[0045] In another implementation, trend processing is used to further process the predicted sequence after the iteration terminates to obtain a final predicted sequence for delivery. Trend processing may include smoothing the predicted sequence, trend extraction, seasonal adjustment, or secondary trend cycle optimization to make the final predicted sequence more consistent with delivery requirements in terms of trend. After trend processing, a prediction interval corresponding to the final predicted sequence is generated based on historical errors, and quality control checks are performed. The prediction interval can be output synchronously with the final predicted sequence. The quality control checks are used to identify abnormal values, abnormal fluctuations, or directional distortions, and output warning information when warning conditions are met.

[0046] This embodiment provides a solution to the problems in the background technology of "lack of systematic evaluation and screening, difficulty in adaptive correction, and unreliable interval and quality control" by performing quality assessment and screening of the preliminary prediction sequence, generating multi-strategy corrected sequences and selecting the best, obtaining a deliverable prediction sequence under the iterative and early stopping mechanism, and further performing trend processing, interval generation and quality control early warning.

[0047] In this embodiment, the quality assessment includes:

[0048] The directional accuracy is calculated based on the directional change relationship between the historical true value sequence and the preliminary prediction sequence, and the directional accuracy is compared with a preset quality threshold to determine the candidate prediction sequence.

[0049] And / or, calculate a comprehensive score, which is obtained by combining the direction accuracy and error index according to a preset weight, and determine the candidate prediction sequence and / or use it for the preset evaluation criteria based on the comprehensive score.

[0050] In one implementation, directional accuracy is used to characterize the matching of the predicted sequence at the "direction of rise or fall". Specifically, the direction of change of adjacent time points in the historical true value sequence can be used as a reference. For example, if the difference between two adjacent true values ​​is positive, it is recorded as an increase; if it is negative, it is recorded as a decrease; and if it is zero, it is recorded as no change. The direction of change of adjacent time points is also calculated for the preliminary predicted sequence, and the number of times the two match directions within the same time period is counted to obtain the directional accuracy. The calculation interval for directional accuracy can be selected from the last few periods of the historical true value sequence as a verification window to reflect the consistency of recent trends.

[0051] In another implementation, the error index can be selected from mean absolute percentage error, mean absolute error, mean squared error, or a combination thereof. The comprehensive score can be obtained by combining the directional accuracy and the error index according to a preset weight. The weight can be preset based on the importance that the business places on "direction" and "numerical error," or it can be determined through parameter tuning using historical samples. The comprehensive score can be used as a condition for screening candidate prediction sequences, or as part of the subsequent selection evaluation criteria. The quality threshold and the comprehensive score threshold can be obtained based on historical data statistics, or set by business rules, and thresholds can be set separately for different prediction objects to adapt to different fluctuation characteristics.

[0052] This embodiment introduces a comprehensive score formed by the combination of directional accuracy and error indicators to perform quantifiable evaluation and screening of the preliminary prediction sequence, so that the prediction sequence entering the subsequent correction process meets the preset quality conditions, thereby enhancing the ability of the post-processing process to identify and control low-quality prediction outputs.

[0053] In this embodiment, the adaptive correction process includes performing an initial correction on the candidate prediction sequence, the initial correction including:

[0054] The candidate predicted sequence is shifted and corrected, and the mean square error of the predicted sequence before and after shift correction is compared with the historical true value sequence to determine whether to adopt the shift correction result.

[0055] In one implementation, initial correction is used to apply bias-type adjustments to the candidate predicted sequence to reduce historical transition points or overall level bias. Shift correction can be achieved by adding or subtracting a shift amount from the candidate predicted sequence as a whole. The shift amount can be determined by the difference between the end of the historical true value sequence and the beginning of the candidate predicted sequence, for example, using the average difference over several periods at the end as the shift amount, or using the difference at a single point at the end as a candidate value for the shift amount. To avoid introducing overcorrection, the shift amount can also be searched within the candidate set, and the shift amount that optimizes the evaluation metrics can be selected.

[0056] In another implementation, whether to adopt the translation correction result is determined by comparing the mean squared error. The mean squared error can be calculated within a historical verification window: the candidate predicted sequence and the historical true value sequence are aligned within the same time period, the error before correction is calculated, and then the error after correction is calculated for the translated sequence; when the error after correction meets the preset adoption conditions (e.g., less than the error before correction, or the decrease exceeds a threshold), the translation correction result is adopted as the input for subsequent correction; otherwise, the untranslated candidate predicted sequence is retained for subsequent correction strategies.

[0057] This embodiment performs bias-based initial correction on candidate prediction sequences by using translation correction and adoption judgment based on mean square error, and controls whether the correction takes effect, so that subsequent correction strategies are executed on a more reasonable benchmark, reducing the difficulty of correction caused by overall bias or connection bias.

[0058] In this embodiment, the adaptive correction process includes multi-policy parallel correction, which includes one or a combination of the following:

[0059] Correction based on trend-based voting;

[0060] Endpoint smoothing correction;

[0061] Sequence reconstruction correction based on gradient consistency.

[0062] In one implementation, multi-strategy parallel correction is used to generate correction results for different types of problems that may exist in the predicted sequence. Trend-voting-based correction is used to handle problems such as unstable trend direction or divergence in prediction direction across multiple periods; endpoint smoothing correction is used to handle jumps or abrupt changes at the junction of the predicted sequence and the historical true value sequence; and gradient consistency-based sequence reconstruction correction is used to handle problems such as unreasonable local slope changes or abnormal gradient fluctuations in the predicted sequence. The above strategies can be executed in parallel to generate multiple candidate correction sequences for selection in the same round of correction.

[0063] In another implementation, the parallelism of parallel correction can be computational (multi-threaded / multi-process / multi-task) or logical (independently generating multiple candidate correction sequences within the same processing flow). Each correction prediction sequence preferably retains its source strategy identifier and key parameter records for subsequent evaluation, iteration, and tracing. The multiple prediction sequences output by parallel correction will be uniformly entered into the evaluation phase, where a preset evaluation criterion will select the optimal prediction sequence, which will then serve as the input for the next iteration or as the input for trend processing.

[0064] This embodiment sets up multiple strategies such as trend voting, endpoint smoothing and gradient consistency reconstruction in parallel to correct the path, so that the predicted sequence can form multiple candidate correction results for different types of trend and pattern problems, and provide candidate space for subsequent selection and iteration.

[0065] In this embodiment, the trend-based voting correction includes forward trend voting correction and backward trend voting correction; wherein, for the same prediction time point, voting is conducted based on the upward or downward trend of multiple predictions at that time point, and the corrected prediction value for that time point is determined according to the voting results, thereby forming a trend voting correction prediction sequence.

[0066] In one implementation, trend voting correction utilizes "multi-period forecast information" to vote on the trend direction at the same forecast point in time. Multi-period forecasting refers to the possibility of multiple versions of predicted values ​​for the same future point in time during rolling or multiple-update forecasting. Forward trend voting correction can proceed backward from the forecast starting point, comparing and voting on the upward / downward trends of multiple versions at adjacent forecast points; backward trend voting correction can proceed backward from the forecast ending point, performing reverse voting based on trend consistency near the ending point, thereby creating another directional constraint on the forecast sequence.

[0067] In another implementation, for a given prediction time point, first determine a set of available predicted values ​​(corresponding values ​​from different prediction versions or different correction paths). Count the trend directions corresponding to each predicted value. If a certain direction receives a majority of votes, then select the corresponding corrected predicted value from the set of available predicted values ​​under the constraint of that direction. The selection rule can be to select a predicted value that is consistent with the majority direction and has a small magnitude deviation, or to take the average or weighted average of the predicted values ​​that are consistent with the majority direction. Repeat the above process for all prediction time points to obtain the trend voting correction prediction sequence.

[0068] This embodiment determines the revised forecast value by voting on the trend direction of multiple forecast periods at the same forecast time point, thereby ensuring consistency of the forecast sequence at the direction level and reducing the trend instability caused by directional conflicts between different forecast versions.

[0069] In this embodiment, the endpoint smoothing correction includes smoothing constraint processing on the connection position between the start segment of the predicted sequence and the end of the historical true value sequence, so as to output the endpoint smoothing corrected predicted sequence.

[0070] The gradient consistency-based sequence reconstruction correction includes calculating the gradient change between adjacent time points, determining the target gradient pattern based on the gradient change patterns of historical multi-period predictions, and then reconstructing the prediction sequence based on the target gradient pattern to output a gradient consistency-corrected prediction sequence.

[0071] In one implementation, endpoint smoothing correction is used to handle the transition between the start of the predicted sequence and the end of the historical true value sequence. Endpoint smoothing constraints can be manifested as follows: the difference between the start point of the predicted sequence and the end value of the historical sequence does not exceed a preset threshold; or the transition slope at several points at the transition meets continuity constraints; or a transition function is introduced within the transition segment to allow the predicted sequence to gradually transition to the predicted trend over the initial few periods. Endpoint smoothing can be implemented using methods such as local weighted smoothing, interpolation transition, or applying smoothing filtering to the transition segment, and an endpoint smoothing corrected predicted sequence is output.

[0072] In another implementation, gradient consistency sequence reconstruction is used to make the magnitude and rhythm of changes in the predicted sequence between adjacent time points more consistent with a preset gradient pattern. Specifically, the gradient change of the first corrected predicted sequence between adjacent time points can be calculated first. Then, the gradient change pattern of the corresponding interval can be extracted from historical multi-period predictions, and these gradient patterns can be voted on or aggregated to determine the target gradient pattern. Subsequently, while maintaining the length of the predicted sequence and the initial conditions, the predicted sequence is reconstructed according to the target gradient pattern. For example, a new sequence can be generated by gradually accumulating according to the target gradient, or a gradient correction term can be applied to the original sequence to obtain the reconstruction result, thereby outputting the gradient consistency corrected predicted sequence.

[0073] This embodiment handles the connection between the historical end and the prediction start point through endpoint smoothing constraints, and constrains the change pattern of adjacent points through gradient consistency reconstruction, so that the prediction sequence is more in line with the preset shape requirements in terms of connection and local slope change, providing a more stable candidate sequence for subsequent selection and trend processing.

[0074] In this embodiment, the early stopping condition includes: in a certain round of iteration, if the optimal prediction sequence obtained based on the preset evaluation criterion does not meet the preset improvement condition relative to the previous round's optimal prediction sequence, the iteration is terminated.

[0075] In one implementation, an early stopping condition is used to control the termination timing of multiple rounds of iterative correction. A preset evaluation criterion calculates the evaluation results for each of the multiple corrected prediction sequences generated in each round and determines the best one; simultaneously, the best one in this round is compared with the best one in the previous round. Preset improvement conditions can be manifested as follows: the evaluation result must be better than the best one in the previous round, or the improvement must exceed a preset threshold, or the constraint of not decreasing trend consistency must be met while satisfying error improvement.

[0076] In another implementation, if the best predicted sequence in a given iteration does not meet the improvement criteria compared to the best predicted sequence in the previous iteration, it is considered that continuing the iteration may not bring acceptable improvement, and therefore early stopping is triggered to terminate the iteration. Early stopping can also be used in conjunction with the maximum number of iterations, i.e., terminating the iteration regardless of whether there is improvement when the maximum number of iterations is reached; alternatively, a minimum number of iterations can be set to ensure that at least a certain number of correction rounds are performed. The best predicted sequence after the iteration terminates enters the trend processing step.

[0077] This embodiment sets up an early termination mechanism based on the evaluation result improvement conditions, so that the iterative correction process can automatically terminate when the evaluation result no longer improves, avoiding invalid iterations, and the output prediction sequence is driven by the evaluation criteria to select the best.

[0078] In this embodiment, the trend processing includes: performing data smoothing and trend extraction processing and / or secondary trend cycle optimization processing on the predicted sequence; wherein, the data smoothing and trend extraction processing includes at least one of exponential weighted moving average smoothing, simple moving average smoothing, and seasonal adjustment processing; the secondary trend cycle optimization processing includes trend consistency judgment and screening based on clustering and / or trend consistency correction based on benchmark data.

[0079] In one implementation, trend processing includes data smoothing and trend extraction. Exponentially weighted moving average smoothing applies time-decay weights to the forecast sequence, giving greater weight to recent points to preserve recent trends; simple moving average smoothing averages the forecast sequence over a fixed window to suppress local noise. Seasonally adjusted processing decomposes the sequence to obtain a trend term, a seasonal term, and a residual term, and outputs the trend term or trend periodic component as the trend extraction forecast sequence. The above smoothing and trend extraction processes can be used individually or in combination, for example, smoothing first and then decomposing to extract the trend term.

[0080] In another implementation, secondary trend cycle optimization is used to further optimize the trend cycle based on trend extraction. Cluster-based trend consistency judgment and screening can cluster multiple candidate trend sequences according to morphological characteristics and select the target trend category or representative sequence based on consistency criteria. Benchmark data-based trend consistency correction can select benchmark sequences comparable to the object to be predicted, establish a correspondence according to preset matching rules, and use the benchmark sequences to constrain and correct the trend of the sequence to be corrected, thereby obtaining the final predicted sequence for delivery.

[0081] This embodiment achieves a deliverable trend pattern expression at the trend level by smoothing, extracting trends, seasonally adjusting, and optimizing the secondary trend cycle of the iteratively terminated prediction sequence, and provides a stable trend benchmark for interval generation and quality control detection.

[0082] In this embodiment, generating the prediction interval includes: determining the error distribution based on the historical error set corresponding to the historical true value sequence and the final prediction sequence; performing adaptive adjustment of the quantiles in the candidate quantile set according to the error distribution to determine the upper and lower bound quantiles of the interval; and constraining the interval width of the prediction interval based on the target volatility range, wherein the target volatility range is 0.02 to 0.05.

[0083] In one implementation, the prediction interval is generated based on a historical error set to determine the error distribution. The historical error set can consist of the differences between a sequence of historical true values ​​and their corresponding historical predicted values. The historical predicted values ​​can come from the output of similar models or the output of the same post-processing flow within a historical window. Errors can be expressed as absolute errors, relative errors, or standardized errors, and can be grouped statistically according to the prediction period. For example, separate error sets can be established for short-term and long-term prediction errors to make the error distribution more consistent with the error characteristics of each period.

[0084] In another implementation, adaptive quantile adjustment is used to select upper and lower bound quantiles for the interval from a set of candidate quantiles. The set of candidate quantiles can be preset as several pairs of upper and lower quantile combinations, such as (0.1, 0.9), (0.05, 0.95), (0.2, 0.8), etc. Adaptive adjustment can select quantile combinations based on the target coverage level, historical error skewness, or the latest window error statistical characteristics, thereby determining the upper and lower bounds of the interval. Interval width constraint is used to ensure that the volatility level of the predicted interval meets the target volatility range. The target volatility can be determined based on the interval width relative to the predicted value or relative to historical volatility, and is limited to the range of 0.02 to 0.05. When the calculated interval width exceeds this range, the interval width can be adjusted back by adjusting the quantile combination or scaling the error distribution.

[0085] This embodiment establishes an error distribution using historical error sets, determines the upper and lower bounds of the interval using quantile adaptive adjustment, and constrains the interval width with a target volatility range. This allows the prediction interval to be adjusted according to changes in error statistical characteristics, and outputs the interval result corresponding to the final prediction sequence within a preset volatility range.

[0086] In this embodiment, the quality control detection includes: performing numerical anomaly detection on the final predicted sequence; performing fluctuation frequency detection on the final predicted sequence; performing directional accuracy evaluation on the final predicted sequence; and outputting warning information when any detection result meets the warning conditions.

[0087] In one implementation, numerical anomaly detection is used to identify outliers in the prediction sequence that do not conform to the value range or business constraints. Numerical anomaly detection may include: determining whether the predicted value exceeds preset upper and lower limits; determining whether the jump amplitude between adjacent time points exceeds a threshold; and determining whether the predicted value contains an unacceptable sign or an unacceptable extreme value. If an anomaly is detected, the prediction result containing the anomaly can be marked as an anomaly and enter the early warning logic, or a rollback strategy can be triggered (e.g., using a more conservative correction sequence or expanding the interval).

[0088] In another embodiment, fluctuation frequency detection is used to identify situations where the predicted sequence frequently reverses or oscillates at high frequencies within a short period. The fluctuation frequency can be determined by statistically analyzing the number of directional reversals, peaks and troughs, or the number of high-frequency changes exceeding a threshold within a sliding window, and then comparing it with a preset frequency threshold. Directional accuracy assessment is used to detect whether the directional changes of the predicted sequence conform to historical trends. This can be achieved using the directional matching method described in the above embodiments, calculating a directional consistency index within the prediction start segment or verification window. The above detection items can be performed individually or in combination. When any detection result meets the warning conditions, a warning message is output; the warning message may include the anomaly type, trigger time period, anomaly severity, and suggested handling methods.

[0089] This embodiment performs quality control checks such as numerical anomaly detection, fluctuation frequency detection, and direction accuracy assessment on the final predicted sequence, and outputs warning information when the warning conditions are met. This enables the prediction delivery process to automatically identify and alert to abnormal results, thereby enhancing the operability of prediction result quality control.

[0090] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. An adaptive optimization and correction method for time series prediction results, characterized in that, The method includes: Receive the preliminary prediction sequence of the object to be predicted and the historical true value sequence corresponding to the object to be predicted; The preliminary predicted sequence is quality evaluated and candidate predicted sequences are determined based on preset conditions; An adaptive correction process is performed on the candidate prediction sequence, the adaptive correction process including: generating at least two corrected prediction sequences, and determining the optimal prediction sequence from the corrected prediction sequences according to a preset evaluation criterion; When the iteration condition is met, the adaptive correction process is repeatedly executed with the optimal prediction sequence as input, and the iteration is terminated when the early stopping condition is met. Perform trend processing on the predicted sequence obtained at the end of the iteration to obtain the final predicted sequence; Based on historical errors, a prediction interval corresponding to the final prediction sequence is generated, and quality control detection is performed on the final prediction sequence and / or the prediction interval. When the warning conditions are met, a warning message is output.

2. The method according to claim 1, characterized in that, The quality assessment includes: The directional accuracy is calculated based on the directional change relationship between the historical true value sequence and the preliminary prediction sequence, and the directional accuracy is compared with a preset quality threshold to determine the candidate prediction sequence. And / or, calculate a comprehensive score, which is obtained by combining the direction accuracy and error index according to a preset weight, and determine the candidate prediction sequence and / or use it for the preset evaluation criteria based on the comprehensive score.

3. The method according to claim 1, characterized in that, The adaptive correction process includes performing an initial correction on the candidate prediction sequence, the initial correction including: The candidate predicted sequence is shifted and corrected, and the mean square error of the predicted sequence before and after shift correction is compared with the historical true value sequence to determine whether to adopt the shift correction result.

4. The method according to claim 1, characterized in that, The adaptive correction process includes multi-policy parallel correction, which includes one or a combination of the following: Correction based on trend-based voting; Endpoint smoothing correction; Sequence reconstruction correction based on gradient consistency.

5. The method according to claim 4, characterized in that, The trend-based voting correction includes forward trend voting correction and backward trend voting correction; wherein, for the same prediction time point, a vote is taken based on the upward or downward trend of multiple predictions at that time point, and the corrected prediction value for that time point is determined according to the voting results, thereby forming a trend voting correction prediction sequence.

6. The method according to claim 4, characterized in that, The endpoint smoothing correction includes smoothing constraint processing on the connection position between the start segment of the predicted sequence and the end of the historical true value sequence, so as to output the endpoint smoothing correction predicted sequence. The gradient consistency-based sequence reconstruction correction includes calculating the gradient change between adjacent time points, determining the target gradient pattern based on the gradient change patterns of historical multi-period predictions, and then reconstructing the prediction sequence based on the target gradient pattern to output a gradient consistency-corrected prediction sequence.

7. The method according to claim 1, characterized in that, The early stopping condition includes: in a certain round of iteration, if the optimal prediction sequence obtained based on the preset evaluation criterion does not meet the preset improvement condition relative to the previous round's optimal prediction sequence, the iteration is terminated.

8. The method according to claim 1, characterized in that, The trend processing includes: performing data smoothing and trend extraction processing and / or secondary trend cycle optimization processing on the predicted sequence; wherein, the data smoothing and trend extraction processing includes at least one of exponential weighted moving average smoothing, simple moving average smoothing, and seasonal adjustment processing; the secondary trend cycle optimization processing includes trend consistency judgment and screening based on clustering and / or trend consistency correction based on benchmark data.

9. The method according to claim 1, characterized in that, Generating the prediction interval includes: determining the error distribution based on the historical error set corresponding to the historical true value sequence and the final prediction sequence; performing adaptive adjustment of the quantiles in the candidate quantile set according to the error distribution to determine the upper and lower bound quantiles of the interval; and constraining the interval width of the prediction interval based on the target volatility range, wherein the target volatility range is 0.02 to 0.

05.

10. The method according to claim 1, characterized in that, The quality control detection includes: performing numerical anomaly detection on the final predicted sequence; performing fluctuation frequency detection on the final predicted sequence; performing directional accuracy assessment on the final predicted sequence; and outputting early warning information when any detection result meets the early warning conditions.