A Visual Management and Automated Execution Method and System for Time Series Forecasting
By uniformly configuring data access, modeling, scheduling, and alarms in time series prediction tasks and adaptively determining the cross-validation window, the integration of training, prediction, and evaluation is achieved. This solves the problems of model instability and operational difficulties in time series prediction tasks, and improves the standardization of the prediction process and operational efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SI-TECH INFORMATION TECH CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies for time series prediction tasks suffer from problems such as diverse data access methods, fluctuating data quality, inconsistent sampling frequencies, unstable model training results, difficulty in reusing prediction outputs, biased hyperparameter selection, and inability to centrally display task execution status and alarms, resulting in unstable model performance and difficult operation and maintenance.
The system uses a visual interface to uniformly configure data access, modeling, scheduling, output, and alarm parameters. It automatically performs time-series data verification and frequency alignment, adaptively determines the cross-validation window, and integrates training, prediction, and evaluation. Furthermore, it uses Cron scheduling to achieve periodic automatic execution and status visualization, forming a prediction-evaluation-alarm closed loop.
It improves the standardization and reproducibility of the prediction process, reduces human configuration errors, enhances the stability of model performance and operational efficiency, strengthens the monitoring closed-loop capability, and realizes multi-task parallel management and process traceability.
Smart Images

Figure CN122087378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of forecasting technology, and in particular to a visualization management and automated execution method for time series forecasting, and a visualization management and automated execution system for time series forecasting. Background Technology
[0002] In scenarios such as business operations, equipment maintenance, production line monitoring, and capacity management, it is often necessary to predict indicator sequences collected at the minute, hour, or day level, and then use the prediction results for trend monitoring, threshold alarms, and automated handling. Existing technologies typically use scripts or distributed modeling tools to complete data extraction, model training, and prediction output. However, these methods often rely on manual orchestration and configuration, resulting in scattered task parameters, invisible processes, and untraceable execution, making it difficult to meet the requirements of multi-task parallel management and long-term stable operation.
[0003] Furthermore, time series prediction tasks commonly encounter problems during implementation, such as diverse data access methods, fluctuating data quality, and inconsistent sampling frequencies. Without a unified data validation and frequency alignment mechanism, the scope of training data is prone to drift, leading to unstable model training results and difficulty in reusing prediction outputs. In addition, the time series data span differs significantly from the business cycle; if cross-validation windows (such as the initial training window and validation span) rely on fixed parameters or manual experience settings, window mismatch, distorted evaluation results, and hyperparameter selection bias can easily occur, affecting model performance and generalization ability.
[0004] Meanwhile, in existing technologies, hyperparameter tuning, cross-validation evaluation, model training and prediction are often disconnected from task scheduling, result output, and alarm triggering. On the one hand, the tuning and evaluation process lacks a unified binding with task configuration, making it difficult to form a repeatable modeling process. On the other hand, the prediction results and evaluation results lack a unified output and storage mechanism, and alarm threshold determination and alarm history records mostly rely on external systems for splicing, resulting in a lack of closed loop between prediction, evaluation and alarm. The task execution status, results and alarms cannot be centrally displayed on the same interface, which is also not conducive to operation and maintenance and auditing. Summary of the Invention
[0005] To address the aforementioned issues, this invention provides a visual management and automated execution method and system for time series forecasting. Through a visual interface, it unifies the configuration of data access, modeling, scheduling, output, and alarm parameters. It automatically performs time series data verification and alignment according to prediction frequency, constructs model inputs, and adaptively generates cross-validation windows based on the data time span. Under window constraints, it automatically or according to configuration determines hyperparameter combinations, achieving integrated training, prediction, and evaluation. Prediction and evaluation results are output / stored according to configuration, and alarms are triggered based on thresholds, with historical records retained. Combined with Cron scheduling, it achieves periodic automatic execution and status visualization, thereby improving the standardization and reproducibility of the prediction process, reducing errors caused by manual configuration and window mismatch, improving model performance stability and operational efficiency, and strengthening monitoring closed-loop capabilities.
[0006] To achieve the above objectives, the present invention provides a method for visual management and automated execution of time series forecasting, comprising: The prediction task configuration is received and stored through a visual management interface. The prediction task configuration includes at least data access parameters, time series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters. The time series modeling parameters include at least prediction frequency and prediction period. Based on the prediction task configuration, time series data is loaded and data verification is performed. The time series data is then frequency aligned according to the prediction frequency to obtain training data. The model input data is constructed based on the training data, and the cross-validation window parameters are adaptively determined according to the time span of the training data. Determine the target hyperparameter combination, wherein: when hyperparameter tuning is enabled, under the cross-validation window parameter constraints, model training and cross-validation evaluation are performed on the preset hyperparameter combination based on the model input data to determine the target hyperparameter combination; when hyperparameter tuning is not enabled, the hyperparameter combination specified in the prediction task configuration is used as the target hyperparameter combination; A prediction model is obtained by training the model input data based on the target hyperparameter combination, and a future time point sequence is generated based on the prediction period. The prediction model is then used to predict the future time point sequence to obtain the prediction result. The prediction results are evaluated to generate model evaluation results, and the prediction results and model evaluation results are output and stored according to the result output parameters; Based on the alarm parameters, a threshold determination is made on the prediction results, and an alarm is issued and the alarm history is recorded when the alarm triggering conditions are met. The automated execution of the prediction task is triggered based on the task scheduling parameters, and the task execution status, prediction results, model evaluation results, and alarm history are displayed on the visualization management interface.
[0007] In the above technical solution, preferably, the data access parameters include a data source type identifier, a time column field identifier, and a value column field identifier, and include: file path information when the data source type identifier indicates a file data source; and database connection information and query statement when the data source type identifier indicates a database data source; The time series modeling parameters include prediction frequency and prediction period; The task scheduling parameters include a Cron expression used to trigger execution; The output parameters include an output medium identifier and an output position identifier corresponding to the output medium identifier; The alarm parameters include alarm thresholds and alarm channel identifiers.
[0008] In the above technical solution, preferably, the specific process of loading timing data and performing data verification and frequency alignment includes: When the data source type identifier indicates a file data source, the table file is read to obtain the original data; when the data source type identifier indicates a database data source, the query statement is executed to obtain the original data. Perform column existence checks, time format checks, and null value checks on the original data; The original data is resampled according to the prediction frequency to obtain the training data aligned with the prediction frequency.
[0009] In the above technical solution, preferably, the specific process of constructing the model input data includes: standardizing the training data into a data structure containing a time column ds and a target value column y; Furthermore, the visualization management and automated execution method for time series forecasting also includes: Perform a logarithmic transformation on the target value column y, wherein the logarithmic transformation is to add 1 to the target value and then take the natural logarithm; When outputting the prediction result, an inverse transformation is performed on the predicted value, which is to take the natural exponent of the predicted value and then subtract 1.
[0010] In the above technical solution, preferably, the cross-validation window parameters include at least the initial parameter and the horizon parameter, and the specific process of adaptively determining the cross-validation window parameters includes: The data span, data_length, is determined based on the maximum and minimum values of the time column ds in the training data. The initial parameter is set to a value that is no greater than a preset upper limit and no greater than half of the data span; The horizon parameter is set to a value that is no greater than a preset upper limit and no greater than the difference between the data span and the initial parameter.
[0011] In the above technical solution, preferably, the preset hyperparameter combination includes at least a combination of the changepoint_prior_scale parameter and the seasonality_mode parameter; The cross-validation evaluation includes at least calculating the RMSE index for each hyperparameter combination and determining the hyperparameter combination with the smallest RMSE as the target hyperparameter combination.
[0012] In the above technical solution, preferably, the time series modeling parameters further include holiday impact configuration, which includes holiday name, holiday date, lower bound impact window parameter lower_window, and upper bound impact window parameter upper_window; The specific process of training to obtain the prediction model includes: Based on the holiday impact configuration, a holiday feature dataset is generated, and the holiday feature dataset is used as model input to incorporate the holiday impact during the training and prediction phases.
[0013] In the above technical solution, preferably, the specific process of evaluating the prediction results and generating model evaluation results includes: Within the historical evaluation range, the predicted results are aligned and merged with the actual values; Based on the merged results, MSE, RMSE, and MAPE are calculated, and a comparison chart of the predicted and actual values is generated to obtain the model evaluation results.
[0014] In the above technical solution, preferably, the output and storage, as well as the alarm and scheduling, further include: When the output medium identifier indicates database output, the prediction result is written to the prediction result table forecast_results, and a joint index idx_task_time based on task_name and forecast_time is created for the prediction result table. When the output medium identifier indicates file output, the prediction result is written to the target file determined by the output location identifier, and the prediction time and prediction value are recorded in the target file; Record task execution logs, which include at least the task configuration, input file path or query statement, task start time, task end time, task execution status, model evaluation index, output path and alarm records. In addition, when the task execution status indicates an abnormality, record the abnormal information and abnormal stack information. In multi-instance deployment scenarios, distributed lock mechanisms or task queue mechanisms are used to ensure that the same prediction task is not executed repeatedly at the same trigger time.
[0015] This invention also proposes a visualization management and automated execution system for time series forecasting, the system being configured to execute the visualization management and automated execution method for time series forecasting disclosed in any of the above technical solutions, including: The task configuration module is used to receive and store prediction task configurations through a visual management interface. The prediction task configurations include at least data access parameters, time series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters. The time series modeling parameters include at least prediction frequency and prediction period. The data processing module is used to load time series data based on the prediction task configuration and perform data verification, and to perform frequency alignment processing on the time series data according to the prediction frequency to obtain training data. The parameter setting module is used to construct model input data based on the training data and adaptively determine the cross-validation window parameters according to the time span of the training data. The parameter tuning module is used to determine the target hyperparameter combination, and when hyperparameter tuning is enabled, under the cross-validation window parameter constraints, to perform model training and cross-validation evaluation on the preset hyperparameter combination based on the model input data to determine the target hyperparameter combination; when hyperparameter tuning is not enabled, the hyperparameter combination specified in the prediction task configuration is used as the target hyperparameter combination. The model prediction module is used to train the model input data based on the target hyperparameter combination to obtain a prediction model, generate a future time point sequence based on the prediction period, and use the prediction model to predict the future time point sequence to obtain a prediction result. The result evaluation module is used to evaluate the prediction results to generate model evaluation results, and to output and store the prediction results and the model evaluation results according to the result output parameters. The alarm triggering module is used to determine the threshold of the prediction result based on the alarm parameters, and to issue an alarm and record the alarm history when the alarm triggering conditions are met. The scheduling and execution module is used to trigger the automated execution of the prediction task based on the task scheduling parameters, and to display the task execution status, the prediction results, the model evaluation results, and the alarm history on the visualization management interface.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) By uniformly configuring data access, time series modeling, task scheduling, result output and alarm parameters in the visual management interface, the prediction task is transformed from "scripted and distributed configuration" to "task-based and visual management". The execution status, results and alarm history are centrally displayed in the interface, thereby improving the ability to manage multiple tasks in parallel and the traceability of the process, and reducing the cost of manual orchestration and operation and maintenance.
[0017] (2) By performing data verification on time series data and frequency alignment according to prediction frequency, training data and model input data with unified caliber are constructed, reducing training caliber drift caused by data missing, format abnormality and sampling inconsistency, improving the standardization of prediction process and the consistency of output results, and providing a reliable data foundation for subsequent adjustment and evaluation.
[0018] (3) By adaptively determining the cross-validation window parameters based on the time span of the training data, and performing hyperparameter tuning and cross-validation evaluation under window constraints to determine the target hyperparameter combination, the window setting is matched with the data scale, reducing the evaluation distortion and tuning bias caused by empirical window configuration, and improving the objectivity of model selection and the stability of prediction effect.
[0019] (4) By generating model evaluation results from the prediction results and outputting and storing them according to the configuration, combined with threshold judgment to trigger alarms and alarm history record, and using task scheduling parameters to trigger automated cycle execution, a closed loop of "prediction-evaluation-alarm-scheduling" is realized, which improves the efficiency of abnormal trend identification and handling response and enhances the system's sustainable operation capability in the production environment. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a visualization management and automated execution method for time series forecasting disclosed in one embodiment of the present invention; Figure 2 This is a schematic diagram of the logical framework of a visualization management and automated execution method for time series prediction disclosed in one embodiment of the present invention; Figure 3 This is a schematic diagram of the task creation and execution process disclosed in one embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] The present invention will now be described in further detail with reference to the accompanying drawings: like Figures 1 to 3 As shown, a visualization management and automated execution method for time series forecasting provided by the present invention includes: The system receives and stores prediction task configurations through a visual management interface, forming a unified entry point for "prediction task configuration-execution-monitoring." Prediction task configurations centrally house data access parameters, time-series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters under the same task entity, ensuring that tasks are end-to-end executable from creation. The time-series modeling parameters include at least prediction frequency and prediction period. Prediction frequency supports three configuration types: minute, hour, and day, to adapt to the sampling granularity of different business metrics.
[0023] Based on the prediction task configuration, time series data is loaded and verified. After verification, the time series data is frequency aligned according to the prediction frequency to obtain training data. The original sampling caliber is unified to the training caliber to avoid the accumulation of bias caused by the inconsistency between the time granularity of subsequent training and prediction.
[0024] During the training phase, model input data is constructed based on the training data, and the cross-validation window parameters are adaptively determined according to the time span of the training data to match the cross-validation split with the data scale and avoid evaluation distortion caused by a fixed window.
[0025] The determination of the target hyperparameter combination adopts two paths: "enable tuning / disable tuning". When tuning is enabled, a confirmatory evaluation is performed on the preset hyperparameter combination under the constraint of cross-validation window and the best combination is selected. When tuning is disabled, the hyperparameter combination specified in the task configuration is used as the target combination to ensure that the task is executable under different operation and maintenance strategies.
[0026] In the prediction phase, a prediction model is trained on the input data based on the target hyperparameter combination to obtain the prediction model, and a future time point sequence is generated based on the prediction period. The prediction model is then used to predict the future time point sequence to obtain the prediction result. The prediction results are evaluated to generate model evaluation results. The prediction results and model evaluation results are output and stored according to the output parameters to ensure that the prediction results and evaluation results are recorded in the same task chain.
[0027] The alarm process determines the threshold based on the prediction results according to the alarm parameters. When the alarm triggering conditions are met, an alarm is issued and the alarm history is recorded. The scheduling process triggers the automated execution of prediction tasks based on task scheduling parameters, and displays the task execution status, prediction results, model evaluation results, and alarm history on the visual management interface.
[0028] In this implementation, an integrated closed loop of visual configuration, adaptive verification and parameter tuning, training prediction, evaluation output, alarm and scheduling is achieved, which improves the reproducibility and controllability of the prediction process and reduces the effect fluctuation caused by manual orchestration and window mismatch.
[0029] In the above implementation, preferably, the data access parameters include a data source type identifier, a time column field identifier, and a value column field identifier, with the data source type identifier driving different access paths: when the data source type identifier indicates a file data source, the file path information points to the data file corresponding to the task; when the data source type identifier indicates a database data source, the database connection information and the query statement jointly determine the query result set. The time column field identifier and the value column field identifier take effect uniformly under both types of data sources, ensuring that data from different sources are aligned in terms of field scope before entering the training process. The file data source supports uploading tabular files in .xlsx and .xls formats; the database data source supports MySQL, PostgreSQL, and SQLite, and outputs time-series data with the same structure through a unified data loading interface and validation logic.
[0030] The time series modeling parameters include prediction frequency and prediction period. Prediction frequency is used to constrain the frequency alignment of training data, and prediction period is used to constrain the length of future time point sequences and prediction range.
[0031] The task scheduling parameters include a Cron expression used to trigger execution. The Cron expression represents the triggering rhythm, enabling tasks to run periodically according to the configuration.
[0032] The output parameters are determined by the combination of the output medium identifier and the output location identifier, so that the task results have a consistent delivery path.
[0033] The alarm parameters consist of an alarm threshold and an alarm channel identifier. The alarm channel identifier indicates one of the following: email alarm, WebHook alarm, or SMS alarm, making the delivery of alarms after threshold determination configurable.
[0034] In this implementation, by layering parameters such as data source, field, frequency / cycle, scheduling, output, and alarm, task configuration can be reused and migrated, reducing the cost of repetitive configuration across data sources and scenarios.
[0035] In the above implementation, preferably, when loading time-series data, the reading path is first selected based on the data source type identifier: When the data source type identifier indicates a file data source, the table file is read to obtain the raw data; when the data source type identifier indicates a database data source, a query statement is executed to obtain the raw data.
[0036] Subsequently, the original data is subjected to column existence checks to ensure that the time and value columns have a parsable basis; time format checks are performed to ensure that the time columns can be used for sorting, resampling, and window splitting; and null value checks are performed to prevent null values from directly entering resampling and training, which could cause anomaly propagation.
[0037] In frequency alignment, the original data is resampled according to the prediction frequency, mapping irregular or high-frequency samples to training data of uniform granularity. This ensures that the training data has a stable interval structure on the time axis, providing a consistent time reference for subsequent cross-validation window calculation and model input construction. For the three prediction frequencies of minutes, hours, and days, resampling is summarized according to the corresponding granularity to ensure that the time granularity of the training data is consistent with the time granularity of the generated future time series.
[0038] In this implementation, by controlling the order of verification before alignment, the training failure rate caused by data quality fluctuations is reduced, and the model evaluation bias caused by frequency inconsistency is reduced.
[0039] In the above implementation, preferably, the model input data construction is based on the data structure of the training data, which is standardized to include a time column ds and a target value column y, so that the input structure is consistent with the data interface of the subsequent cross-validation, training and prediction processes.
[0040] Furthermore, methods for visual management and automated execution of time series forecasting also include: A logarithmic transformation is performed on the target value column y (the natural logarithm is taken after adding 1 to the target value). This stabilizes the numerical range in business indicator scenarios that include zero values and reduces training instability caused by the increase in variance of the target sequence with magnitude. Correspondingly, log(y+1) processing is performed on the y column to make the transformed target sequence more conducive to stable evaluation during the model fitting and parameter search stages.
[0041] When outputting the prediction results, an inverse transformation is performed on the predicted value (the predicted value is taken as the natural exponent and then subtracted by 1) to restore the output to the original dimensions that can be interpreted by the business, thereby ensuring that the output result is consistent with the business definition of the alarm threshold. Correspondingly, the predicted value is processed by exp(·)-1 to make the predicted output consistent with the original y dimension, avoiding dimensional deviation in the threshold determination process.
[0042] In this implementation, the paired processing of input-side transformation and output-side inverse transformation improves the numerical stability of model training, ensures that the predicted output is consistent with the business indicator, and reduces the conversion cost of threshold alarm configuration.
[0043] In the above embodiments, preferably, the cross-validation window parameters include at least the initial parameter and the horizon parameter. Based on this, the specific process for adaptively determining the cross-validation window parameters includes: First, the data span (data_length) is determined based on the maximum and minimum values of the time column (ds) in the training data, and the actual coverage of the data is used as the upper-level constraint of the window parameters.
[0044] The initial parameter is determined according to the rule of "not greater than the preset upper limit and not greater than half the data span", so that the training start window maintains a relatively stable coverage ratio under different data lengths, and avoids underfitting caused by the window being too small.
[0045] The horizon parameter is determined according to the rule of "not exceeding the preset upper limit and not exceeding the difference between the data span and the initial value", so that the validation span avoids exceeding the effective sample range while ensuring that it is evaluable.
[0046] In one specific embodiment, the preset upper limit of initial can be 365 days, the preset upper limit of horizon can be 30 days, and data_length is determined by the number of days of (max(ds)-min(ds)), so that the window is automatically shortened when the data span is small, and the window size is constrained by the upper limit when the data span is large.
[0047] In this implementation, the data span drives window adaptation, reducing the mismatch caused by manually fixing the window and ensuring that cross-validation evaluation remains comparable and stable under different data volumes.
[0048] In the above embodiments, preferably, the preset hyperparameter combination includes at least a combination of the changepoint_prior_scale parameter and the seasonality_mode parameter.
[0049] Cross-validation evaluation generates corresponding evaluation results for each hyperparameter combination and calculates at least the RMSE index, which characterizes the overall level of prediction error. The hyperparameter combination with the smallest RMSE is determined as the target hyperparameter combination, giving the selection of the target combination a clear quantitative criterion and forming a closed loop with the optimization path when tuning is enabled.
[0050] During implementation, preset hyperparameter combinations are generated through a parameter grid; for each set of hyperparameter combinations, training and cross-validation are completed under the parameter constraints of the cross-validation window, and the RMSE is output by the performance evaluation process and the best is selected accordingly, thus connecting hyperparameter combination-cross-validation-index calculation-selection into an automated pipeline.
[0051] In this implementation, RMSE is used as a unified selection criterion, which reduces the subjectivity of hyperparameter selection, makes the model selection results auditable and reproducible, and improves the stability of prediction performance.
[0052] In the above embodiments, preferably, the time series modeling parameters also include holiday impact configuration, which includes holiday name, holiday date, lower bound impact window parameter lower_window and upper bound impact window parameter upper_window. lower_window and upper_window are used to characterize the impact window range before and after the holiday.
[0053] The specific process of training and obtaining the prediction model includes: Based on the configuration of holiday impact, a holiday feature dataset is generated, and the holiday feature dataset is used as the model input to introduce the impact of holidays under the same feature caliber during the training and prediction phases.
[0054] In one specific embodiment, the holiday configuration is converted into a holidays data structure required by the model. The holidays data structure includes the fields of holiday, ds, lower_window, and upper_window, and is input into the model training and future prediction so that the holiday window period perturbation is incorporated into the fitting and prediction process.
[0055] In this implementation, the holiday factor is transformed from an external, manual interpretation into part of the model input, which reduces the prediction error of the holiday window and improves the prediction consistency in cyclical fluctuation scenarios.
[0056] In the above embodiments, preferably, the specific process of evaluating the prediction results and generating model evaluation results includes: By aligning and merging predicted results with actual values within the historical assessment range, the assessment covers only the verifiable interval, avoiding distortion caused by future intervals being included in the assessment.
[0057] Based on the merged results, MSE, RMSE and MAPE are calculated, and evaluation profiles are formed from the perspectives of squared error, error scale and relative error, respectively. Comparison charts between predicted and actual values are generated to form a visual evaluation product for presentation and comparison on the management interface.
[0058] In one specific embodiment, the historical evaluation range is limited by a time interval parameter, and the MSE, RMSE, and MAPE are calculated within this interval after the data is aligned and merged; the comparison chart output is a time series curve, which is used to intuitively present the change of prediction bias over time.
[0059] In this implementation, the prediction quality is precipitated as model evaluation results in a measurable and visualized manner through the evaluation combination of indicators and charts, supporting horizontal comparison between tasks and version iteration decisions.
[0060] In the above embodiments, preferably, output and storage are separated according to the output medium identifier: When the output medium identifier indicates database output, the prediction results are written to the prediction results table forecast_results, and a composite index idx_task_time based on task_name and forecast_time is created for the prediction results table, so that subsequent retrieval by task and time has a definite query path.
[0061] When the output medium identifier indicates file output, the prediction results are written to the target file determined by the output location identifier, and the prediction time and prediction value are recorded in the target file, so that offline delivery and audit archiving have a consistent format.
[0062] Record task execution logs, which should include at least the task configuration, input file path or query statement, task start time, task end time, task execution status, model evaluation metrics, output path, and alarm records. Furthermore, when the task execution status indicates an anomaly, record the anomaly information and anomaly stack trace, providing a traceable chain of evidence for fault localization. In database output scenarios, a write interface can be called to write the last few prediction results corresponding to the prediction period to the `forecast_results` table, ensuring that the result set of the current prediction window is accumulated with each execution.
[0063] In multi-instance deployment scenarios, distributed lock mechanisms or task queue mechanisms are used to ensure that the same prediction task is not executed repeatedly at the same trigger time, thereby avoiding duplicate writes, duplicate alarms, and resource contention.
[0064] In this implementation, a delivery and operation platform with searchable results, auditable processes, and controllable concurrency is formed, improving stability and maintainability in the production environment.
[0065] This invention also proposes a visualization management and automated execution system for time series forecasting, the system being configured to execute the visualization management and automated execution method for time series forecasting disclosed in any of the above embodiments, including: The task configuration module serves as the task entry point for the system. It is used to receive and store prediction task configurations through a visual management interface. The prediction task configuration includes at least data access parameters, time series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters. Among them, the time series modeling parameters include at least prediction frequency and prediction period. The data processing module is used to load time series data based on the prediction task configuration, perform data verification, and perform frequency alignment processing on the time series data according to the prediction frequency to obtain training data. The parameter setting module is used to construct model input data based on training data and adaptively determine cross-validation window parameters according to the time span of training data, providing consistent constraints for subsequent tuning and training.
[0066] The parameter tuning module is used to determine the target hyperparameter combination. When hyperparameter tuning is enabled, it performs hyperparameter selection based on cross-validation evaluation. Under the cross-validation window parameter constraints, it performs model training and cross-validation evaluation on the preset hyperparameter combination based on the model input data to determine the target hyperparameter combination. When hyperparameter tuning is not enabled, the hyperparameter combination specified in the prediction task configuration is used as the target hyperparameter combination, so that the model prediction module obtains the determined target combination under both running strategies.
[0067] The model prediction module is used to train the model input data based on the target hyperparameter combination to obtain the prediction model, generate future time point sequences based on the prediction period, and use the prediction model to predict the future time point sequences to obtain the prediction results. The results evaluation module is used to evaluate the prediction results to generate model evaluation results, and output and store the prediction results and model evaluation results according to the results output parameters. The alarm triggering module is used to determine the threshold of the prediction result based on the alarm parameters, and to issue an alarm and record the alarm history when the alarm triggering conditions are met. The scheduling and execution module is used to trigger the automated execution of prediction tasks based on task scheduling parameters, and to display the task execution status, prediction results, model evaluation results, and alarm history on the visual management interface.
[0068] In terms of system deployment, the front end uses a web interface to handle task creation, configuration, and display; the back end is implemented using Python services and provides REST / HTTP interfaces to handle task scheduling, training, prediction, evaluation, storage, and alarm distribution. The system architecture organizes the prediction engine interface in a modular and plug-in manner to extend the implementation of new prediction algorithms or add data source access capabilities without changing the task orchestration chain.
[0069] In this implementation, end-to-end closed-loop operation is achieved through modular responsibility decomposition, enabling the prediction task to have configurable, repeatable, monitorable, and auditable engineering delivery capabilities.
[0070] The visualization management and automated execution system for time series forecasting disclosed in the above embodiments has modules whose functions correspond to the steps of the visualization management and automated execution method for time series forecasting disclosed in the above embodiments. In the implementation process, the above embodiments are referred to for operation, and will not be repeated here.
[0071] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for visual management and automated execution of time series forecasting, characterized in that, include: The prediction task configuration is received and stored through a visual management interface. The prediction task configuration includes at least data access parameters, time series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters. The time series modeling parameters include at least prediction frequency and prediction period. Based on the prediction task configuration, time series data is loaded and data verification is performed. The time series data is then frequency aligned according to the prediction frequency to obtain training data. The model input data is constructed based on the training data, and the cross-validation window parameters are adaptively determined according to the time span of the training data. Determine the target hyperparameter combination, wherein: when hyperparameter tuning is enabled, under the cross-validation window parameter constraints, model training and cross-validation evaluation are performed on the preset hyperparameter combination based on the model input data to determine the target hyperparameter combination; when hyperparameter tuning is not enabled, the hyperparameter combination specified in the prediction task configuration is used as the target hyperparameter combination; A prediction model is obtained by training the model input data based on the target hyperparameter combination, and a future time point sequence is generated based on the prediction period. The prediction model is then used to predict the future time point sequence to obtain the prediction result. The prediction results are evaluated to generate model evaluation results, and the prediction results and model evaluation results are output and stored according to the result output parameters; Based on the alarm parameters, a threshold determination is made on the prediction results, and an alarm is issued and the alarm history is recorded when the alarm triggering conditions are met. The automated execution of the prediction task is triggered based on the task scheduling parameters, and the task execution status, prediction results, model evaluation results, and alarm history are displayed on the visualization management interface.
2. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The data access parameters include a data source type identifier, a time column field identifier, and a value column field identifier, and include: file path information when the data source type identifier indicates a file data source; and database connection information and query statements when the data source type identifier indicates a database data source. The time series modeling parameters include prediction frequency and prediction period; The task scheduling parameters include a Cron expression used to trigger execution; The output parameters include an output medium identifier and an output position identifier corresponding to the output medium identifier; The alarm parameters include alarm thresholds and alarm channel identifiers.
3. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The specific process of loading timing data and performing data verification and frequency alignment includes: When the data source type identifier indicates a file data source, the table file is read to obtain the original data; when the data source type identifier indicates a database data source, the query statement is executed to obtain the original data. Perform column existence checks, time format checks, and null value checks on the original data; The original data is resampled according to the prediction frequency to obtain the training data aligned with the prediction frequency.
4. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The specific process of constructing the model input data includes: standardizing the training data into a data structure containing a time column ds and a target value column y; Furthermore, the visualization management and automated execution method for time series forecasting also includes: Perform a logarithmic transformation on the target value column y, wherein the logarithmic transformation is to add 1 to the target value and then take the natural logarithm; When outputting the prediction result, an inverse transformation is performed on the predicted value, which is to take the natural exponent of the predicted value and then subtract 1.
5. The visualization management and automated execution method for time series forecasting according to claim 4, characterized in that, The cross-validation window parameters include at least the initial parameter and the horizon parameter, and the specific process of adaptively determining the cross-validation window parameters includes: The data span, data_length, is determined based on the maximum and minimum values of the time column ds in the training data. The initial parameter is set to a value that is no greater than a preset upper limit and no greater than half of the data span; The horizon parameter is set to a value that is no greater than a preset upper limit and no greater than the difference between the data span and the initial parameter.
6. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The preset hyperparameter combination includes at least a combination of the changepoint_prior_scale parameter and the seasonality_mode parameter; The cross-validation evaluation includes at least calculating the RMSE index for each hyperparameter combination and determining the hyperparameter combination with the smallest RMSE as the target hyperparameter combination.
7. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The time series modeling parameters also include holiday impact configuration, which includes holiday name, holiday date, lower bound impact window parameter lower_window, and upper bound impact window parameter upper_window. The specific process of training to obtain the prediction model includes: Based on the holiday impact configuration, a holiday feature dataset is generated, and the holiday feature dataset is used as model input to incorporate the holiday impact during the training and prediction phases.
8. The visualization management and automated execution method for time series forecasting according to claim 1, characterized in that, The specific process of evaluating the prediction results and generating model evaluation results includes: Within the historical evaluation range, the predicted results are aligned and merged with the actual values; Based on the merged results, MSE, RMSE, and MAPE are calculated, and a comparison chart of the predicted and actual values is generated to obtain the model evaluation results.
9. The visualization management and automated execution method for time series forecasting according to claim 2, characterized in that, The output and storage, as well as alarm and scheduling, also include: When the output medium identifier indicates database output, the prediction result is written to the prediction result table forecast_results, and a joint index idx_task_time based on task_name and forecast_time is created for the prediction result table. When the output medium identifier indicates file output, the prediction result is written to the target file determined by the output location identifier, and the prediction time and prediction value are recorded in the target file; Record task execution logs, which include at least the task configuration, input file path or query statement, task start time, task end time, task execution status, model evaluation index, output path and alarm records. In addition, when the task execution status indicates an abnormality, record the abnormal information and abnormal stack information. In multi-instance deployment scenarios, distributed lock mechanisms or task queue mechanisms are used to ensure that the same prediction task is not executed repeatedly at the same trigger time.
10. A visualization management and automated execution system for time series forecasting, characterized in that, The system is configured to perform the visualization management and automated execution method for time series forecasting as described in any one of claims 1 to 9, comprising: The task configuration module is used to receive and store prediction task configurations through a visual management interface. The prediction task configurations include at least data access parameters, time series modeling parameters, task scheduling parameters, result output parameters, and alarm parameters. The time series modeling parameters include at least prediction frequency and prediction period. The data processing module is used to load time series data based on the prediction task configuration and perform data verification, and to perform frequency alignment processing on the time series data according to the prediction frequency to obtain training data. The parameter setting module is used to construct model input data based on the training data and adaptively determine the cross-validation window parameters according to the time span of the training data. The parameter tuning module is used to determine the target hyperparameter combination, and when hyperparameter tuning is enabled, under the cross-validation window parameter constraints, to perform model training and cross-validation evaluation on the preset hyperparameter combination based on the model input data to determine the target hyperparameter combination; when hyperparameter tuning is not enabled, the hyperparameter combination specified in the prediction task configuration is used as the target hyperparameter combination. The model prediction module is used to train the model input data based on the target hyperparameter combination to obtain a prediction model, generate a future time point sequence based on the prediction period, and use the prediction model to predict the future time point sequence to obtain a prediction result. The result evaluation module is used to evaluate the prediction results to generate model evaluation results, and to output and store the prediction results and the model evaluation results according to the result output parameters. The alarm triggering module is used to determine the threshold of the prediction result based on the alarm parameters, and to issue an alarm and record the alarm history when the alarm triggering conditions are met. The scheduling and execution module is used to trigger the automated execution of the prediction task based on the task scheduling parameters, and to display the task execution status, the prediction results, the model evaluation results, and the alarm history on the visualization management interface.