Time sequence prediction model construction method and device, computer equipment and storage medium

By constructing a power time series prediction model component library and adopting a phased training strategy, the power time series prediction scenarios are dynamically matched, which solves the problem of poor adaptability of existing models and improves the prediction effect.

CN121834332APending Publication Date: 2026-04-10CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511925766.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing time-series forecasting models are difficult to match the dynamic changes in different power forecasting scenarios, resulting in poor forecasting performance, physical inconsistencies, and poor scenario adaptability.

Method used

A model component library containing all the necessary components for the power time series forecasting process is constructed. Model components are selected according to the requirements and characteristics of the power time series forecasting scenario. The initial time series forecasting model is optimized through assembly and phased training strategies to form the target time series forecasting model.

Benefits of technology

It realizes the dynamic construction of matching time series prediction models based on power time series prediction scenarios, which improves prediction effect and adaptability, and overcomes the problems of physical inconsistencies and poor scenario adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834332A_ABST
    Figure CN121834332A_ABST
Patent Text Reader

Abstract

The invention relates to a time sequence prediction model construction method and device, computer equipment and a storage medium. The method comprises the following steps: constructing a model component library containing different function modules required by the whole flow of power time sequence prediction; according to demand characteristics of an electric power time sequence prediction scene, selecting model components corresponding to the different function modules from the model component library; assembling all model components to obtain an initial time sequence prediction model of the power time sequence prediction scene; and adopting a staged training strategy to train and optimize the initial time sequence prediction model, and taking the trained and optimized initial time sequence prediction model as a target time sequence prediction model of the power time sequence prediction scene. By adopting the method, the prediction effect of the constructed time sequence prediction model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power time series prediction model technology, and in particular to a method, apparatus, computer equipment and computer-readable storage medium for constructing a time series prediction model. Background Technology

[0002] With the rapid development of smart grids and the energy internet, massive amounts of time-series data have been generated in the power system, such as load data, new energy power generation and equipment status monitoring data. Time-series data has characteristics such as strong volatility, periodicity, correlation and scenario dependence. Therefore, how to accurately predict time-series data is of great significance to the safe and stable operation of the power grid, economic dispatch and market transactions.

[0003] Currently, time series data is typically predicted by constructing independent time series forecasting models. However, due to the complexity and variability of power forecasting scenarios, and the difficulty in effectively integrating the physical laws and operational experience of power systems into data-driven models, time series forecasting models struggle to match the dynamic changes under different forecasting scenarios. This leads to issues such as physical inconsistencies and poor scenario adaptability, resulting in poor prediction performance of currently constructed time series forecasting models. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, and computer-readable storage medium for constructing a time series prediction model to improve the prediction results of the constructed time series prediction model, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for constructing a time series prediction model, including:

[0006] Construct a model component library that includes different functional modules required for the entire process of power time series forecasting;

[0007] Based on the demand characteristics of the power time-series forecasting scenario, select the corresponding model components for each of the different functional modules from the model component library;

[0008] By assembling all model components, the initial time series prediction model for the power time series prediction scenario is obtained;

[0009] A phased training strategy is adopted to train and optimize the initial time series prediction model, and the trained and optimized initial time series prediction model is used as the target time series prediction model for the power time series prediction scenario.

[0010] In one embodiment, the construction of a model component library containing different functional modules required for the entire power time series forecasting process includes:

[0011] Based on the equipment nameplate parameters and the preset data configuration rule library, the initial power time series data is preprocessed to obtain standard power time series data;

[0012] Extract standard power time series features from standard power time series data;

[0013] Construct an initial model component that includes the different functional modules required for the entire power time series forecasting process;

[0014] Using the aforementioned standard power time series characteristics, all initial model components are tested to obtain at least one qualified model component;

[0015] All qualified model components are integrated into the model component library.

[0016] In one embodiment, selecting the corresponding model components for each of the different functional modules from the model component library based on the demand characteristics of the power time-series forecasting scenario includes:

[0017] Based on the demand characteristics of the power time series forecasting scenario, identify the scenario type of the power time series forecasting scenario;

[0018] Based on the scenario type, match the component selection rules for different functional modules under the power time series prediction scenario;

[0019] According to the component selection rules, the model components corresponding to the different functional modules are selected from the model component library.

[0020] In one embodiment, obtaining the initial time-series prediction model for the power time-series prediction scenario by assembling all model components includes:

[0021] Convert all the model components into a unified, standardized format;

[0022] Construct a core module assembly engine and dynamically associate all model components based on the standardized format;

[0023] Connect all the model components to form a preset time series prediction model for the power time series prediction scenario;

[0024] The preset time series prediction model is configured and its dependencies are injected globally to obtain the initial time series prediction model.

[0025] In one embodiment, the step of employing a phased training strategy to train and optimize the initial time-series prediction model includes:

[0026] The basic prediction module of the initial time series prediction model is pre-trained to obtain the pre-trained first time series prediction model.

[0027] The first time series prediction model is fine-tuned by domain knowledge fusion to obtain the fine-tuned second time series prediction model;

[0028] The second time series prediction model is adapted to the end-to-end scenario to obtain the trained and optimized initial time series prediction model.

[0029] In one embodiment, after using the trained and optimized initial time-series prediction model as the target time-series prediction model for the power time-series prediction scenario, the method further includes:

[0030] The target time series prediction model is standardized, packaged, and version-managed.

[0031] The packaged model is deployed as a service and resources are scheduled accordingly.

[0032] Execution model services are integrated with upstream and downstream systems.

[0033] In one embodiment, after the execution model service is integrated with upstream and downstream systems, the method further includes:

[0034] Detect the real-time prediction accuracy of the target time series prediction model deployed in the production environment;

[0035] If the real-time prediction accuracy index is detected to be greater than the preset prediction accuracy index threshold, the target time series prediction model is iteratively trained until the real-time prediction accuracy index of the iterated target time series prediction model is less than or equal to the preset prediction accuracy index threshold.

[0036] Secondly, this application also provides a time series prediction model construction apparatus, comprising:

[0037] The building module is used to build a model component library containing different functional modules required for the entire process of power time series forecasting;

[0038] The selection module is used to select the corresponding model components from the model component library based on the demand characteristics of the power time series prediction scenario.

[0039] An assembly module is used to obtain an initial time-series prediction model for the power time-series prediction scenario by assembling all model components;

[0040] The training optimization module is used to train and optimize the initial time series prediction model using a phased training strategy, and to use the trained and optimized initial time series prediction model as the target time series prediction model for the power time series prediction scenario.

[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0042] A model component library is constructed, containing different functional modules required for the entire power time series forecasting process. Based on the requirements and characteristics of the power time series forecasting scenario, model components corresponding to each functional module are selected from the model component library. By assembling all model components, an initial time series forecasting model for the power time series forecasting scenario is obtained. A phased training strategy is adopted to train and optimize the initial time series forecasting model, and the trained and optimized initial time series forecasting model is used as the target time series forecasting model for the power time series forecasting scenario.

[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0044] A model component library is constructed, containing different functional modules required for the entire power time series forecasting process. Based on the requirements and characteristics of the power time series forecasting scenario, model components corresponding to each functional module are selected from the model component library. By assembling all model components, an initial time series forecasting model for the power time series forecasting scenario is obtained. A phased training strategy is adopted to train and optimize the initial time series forecasting model, and the trained and optimized initial time series forecasting model is used as the target time series forecasting model for the power time series forecasting scenario.

[0045] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0046] A model component library is constructed, containing different functional modules required for the entire power time series forecasting process. Based on the requirements and characteristics of the power time series forecasting scenario, model components corresponding to each functional module are selected from the model component library. By assembling all model components, an initial time series forecasting model for the power time series forecasting scenario is obtained. A phased training strategy is adopted to train and optimize the initial time series forecasting model, and the trained and optimized initial time series forecasting model is used as the target time series forecasting model for the power time series forecasting scenario.

[0047] The aforementioned method, apparatus, computer equipment, and computer-readable storage medium for constructing a time-series forecasting model first construct a model component library containing different functional modules required for the entire power time-series forecasting process. Then, based on the requirements and characteristics of the power time-series forecasting scenario, model components corresponding to different functional modules are selected from the model components. Next, by assembling all model components, an initial time-series forecasting model for the power time-series forecasting scenario is obtained. Finally, a phased training strategy is adopted to train and optimize the initial time-series forecasting model, and the trained and optimized initial time-series forecasting model is used as the target time-series forecasting model for the power time-series forecasting scenario. Since the model component library contains model components for different functional modules required for the entire power time-series forecasting process, ... Based on the specific needs of different power time-series forecasting scenarios, an initial time-series forecasting model can be adaptively configured. Finally, a target time-series forecasting model for the power time-series forecasting scenario is obtained through phased training and optimization. This achieves the goal of dynamically constructing a matching time-series forecasting model based on the power time-series forecasting scenario, rather than constructing an independent and fixed time-series forecasting model. Therefore, it overcomes the technical shortcomings of the complex and ever-changing power forecasting scenarios, where the physical laws and operational experience of the power system are difficult to effectively integrate into the data-driven model, leading to difficulties in matching the dynamic changes under different forecasting scenarios and resulting in physical inconsistencies and poor scenario adaptability. Thus, the forecasting performance of the constructed time-series forecasting model is improved. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating a method for constructing a time series prediction model in one embodiment;

[0050] Figure 2 A flowchart illustrating the time series prediction model construction method in another embodiment;

[0051] Figure 3 This is a structural block diagram of a time series prediction model construction device in one embodiment;

[0052] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0053] 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.

[0054] First, accurate time-series data forecasting is crucial for the safe and stable operation of the power grid, economic dispatch, and market-based transactions. Currently, power time-series forecasting faces the following technical challenges: 1) Difficulty in model adaptation: Different power forecasting scenarios require different model structures, and traditional methods lack flexibility; 2) Difficulty in integrating professional domain knowledge: The physical laws and operational experience of the power system are difficult to effectively incorporate into the data-driven model. Obviously, forecasting time-series data through independent time-series forecasting models is difficult to match the dynamic changes under different forecasting scenarios due to the complexity and variability of power forecasting scenarios and the difficulty in effectively incorporating the physical laws and operational experience of the power system into the data-driven model. This leads to situations such as physical inconsistencies and poor scenario adaptability. Therefore, there is an urgent need for a time-series forecasting model construction method that can improve the forecasting effect of the constructed time-series forecasting model.

[0055] In one embodiment, such as Figure 1As shown, a method for constructing a time series forecasting model is provided. This embodiment uses the application of this method to a time series forecasting model construction device as an example. The time series forecasting model construction device is deployed on a terminal, which includes, but is not limited to, personal computers and laptops. The time series forecasting model construction system includes a construction module, a selection module, an assembly module, and a training and optimization module. The construction module is used to construct a model component library containing different functional modules required for the entire power time series forecasting process. The selection module is used to select the corresponding model components for different functional modules from the model component library according to the requirements and characteristics of the power time series forecasting scenario. The assembly module is used to obtain the initial time series forecasting model for the power time series forecasting scenario by assembling all model components. The training and optimization module is used to adopt phased training. The strategy involves training and optimizing an initial time-series prediction model, and then using this optimized model as the target model for power time-series prediction scenarios. Through information interaction between the construction, selection, assembly, and training / optimization modules, a matching time-series prediction model can be dynamically constructed for each scenario. Precise module matching and configuration transforms a general modular component library into a foundation for solving specific industrial problems, achieving flexibility, high efficiency, and business feasibility. Simultaneously, declarative configuration files allow for the rapid combination of prediction models with varying functions. Modifying individual modules or adjusting the pipeline structure becomes very simple; only the configuration file needs to be modified to resolve existing problems in the current time-series prediction model. It is understood that the time-series prediction model construction system can also be deployed on a server, or on a system including both terminals and servers, and implemented through interaction between the terminals and servers. In this embodiment, the method includes the following steps:

[0056] Step 102: Construct a model component library containing different functional modules required for the entire power time series prediction process.

[0057] It should be noted that all the functional modules required for the entire power time series forecasting process can specifically include five major functional modules: data preprocessing, feature engineering, basic forecasting, domain knowledge, and post-processing. It can be understood that in the process of building a time series forecasting model, the model components corresponding to each of the five major functional modules can be built first, and then combined into a model component library.

[0058] As an example, step 102 includes: building a modular component library that includes data preprocessing, feature engineering, basic forecasting, domain knowledge and post-processing functions throughout the entire power time series forecasting process.

[0059] Step 104: Based on the demand characteristics of the power time series prediction scenario, select the corresponding model components for different functional modules from the model component library.

[0060] It should be noted that different power time series forecasting scenarios have different demand characteristics, and therefore different functional modules can be selected from the model component library based on these different demand characteristics.

[0061] As an example, step 104 includes: using the demand characteristics of the power time series prediction scenario as an index, selecting the corresponding model components for different functional modules from the model component library.

[0062] Step 106: By assembling all model components, the initial time series prediction model for the power time series prediction scenario is obtained.

[0063] It should be noted that standardized data interfaces and parameter passing protocols can be used to assemble the model components corresponding to the selected different functional modules into a complete initial time series prediction model.

[0064] As an example, step 106 includes: assembling all model components into an initial time-series prediction model for the power time-series prediction scenario using standardized data interfaces and parameter passing protocols.

[0065] Step 108: A phased training strategy is adopted to train and optimize the initial time series prediction model, and the trained and optimized initial time series prediction model is used as the target time series prediction model for the power time series prediction scenario.

[0066] It should be noted that, in order to adapt the initial time series prediction model to the production environment, a phased training strategy can be adopted to train and optimize the initial time series prediction model, and then deploy the trained and optimized initial time series prediction model as the target time series prediction model to the production environment.

[0067] As an example, step 108 includes: using a phased training strategy to train and optimize the initial time series prediction model, and using the trained and optimized initial time series prediction model as the target time series prediction model for the power time series prediction scenario.

[0068] The aforementioned method for constructing a time-series forecasting model first builds a model component library containing different functional modules required for the entire power time-series forecasting process. Then, based on the requirements and characteristics of the power time-series forecasting scenario, it selects the corresponding model components for each functional module from the model component library. Next, by assembling all model components, it obtains the initial time-series forecasting model for the power time-series forecasting scenario. Finally, it employs a phased training strategy to train and optimize the initial time-series forecasting model, and uses the trained and optimized initial time-series forecasting model as the target time-series forecasting model for the power time-series forecasting scenario. Because the model component library contains model components for different functional modules required for the entire power time-series forecasting process, it can be tailored to the specific power time-series forecasting scenario. By adapting the initial time-series prediction model to meet the specific needs of the power time-series prediction scenario, and finally training and optimizing it through a phased training strategy, the target time-series prediction model for the power time-series prediction scenario is obtained. This achieves the goal of dynamically constructing a matching time-series prediction model based on the power time-series prediction scenario, rather than constructing an independent and fixed time-series prediction model. Therefore, it overcomes the technical defects caused by the complexity and variability of power prediction scenarios and the difficulty in effectively integrating the physical laws and operational experience of the power system into the data-driven model, which makes it difficult for the time-series prediction model to match the dynamic changes under different prediction scenarios, thus leading to physical inconsistencies and poor scenario adaptability. Therefore, it improves the prediction effect of the constructed time-series prediction model.

[0069] In one embodiment, such as Figure 2 As shown, a model component library is constructed that includes different functional modules required for the entire power time series forecasting process, including:

[0070] Step 202: Based on the equipment nameplate parameters and the preset data configuration rule library, preprocess the initial power time series data to obtain standard power time series data.

[0071] It should be noted that, firstly, the construction of the data preprocessing function module can be based on the power equipment nameplate parameters and operating procedures to configure a rule base (preset data configuration rule base), identify and process obvious invalid data, as well as identify abnormal data points caused by sensor failures, communication interruptions, etc., reasonably fill in the missing fields in the data, and scale the data to the numerical range that the model is sensitive to, so as to obtain standard power time series data.

[0072] As an example, step 202 includes: performing deletion, filling, and scaling operations on the initial power time series data in sequence according to the equipment nameplate parameters and the preset data configuration rule base to obtain standard power time series data.

[0073] Step 204: Extract standard power time series features from standard power time series data.

[0074] As an example, step 204 includes: extracting the hour, day of the week, whether it is a weekend, and whether it is a holiday from the timestamp, converting them into cyclic codes to generate classic time series features, and integrating fast Fourier transform to extract the main frequency components and amplitudes, extracting the periodic components of the data, and effectively incorporating standard power time series features such as external variables such as weather and economy into the model.

[0075] Step 206: Construct an initial model component that includes the different functional modules required for the entire power time series prediction process.

[0076] It should be noted that different initial model components are encapsulated using different prediction models. Specifically, the Convolutional Neural Network (CNN) is encapsulated as CNNBlock, the Long Short-Term Memory Network (LSTM) is encapsulated as LSTMBlock, the Transformer is encapsulated as TransformerBlock, and the Temporal Convolutional Network (TCN) is encapsulated as TCNBlock.

[0077] As an example, step 206 includes: constructing an initial model component that contains the different functional modules required for the entire power time series forecasting process.

[0078] Step 208: Using standard power time-series characteristics, test all initial model components to obtain at least one qualified model component.

[0079] It should be noted that constraints are added as regularization terms to the loss function, and the model output layer is modified to naturally satisfy the constraints; an integrated graph neural network is used to model the topology of the power grid; and a rule engine is established to transform the experience of operators into executable logic in order to test and obtain qualified model components.

[0080] As an example, step 208 includes: testing all initial model components sequentially based on standard power time-series characteristics to obtain at least one qualified model component.

[0081] Step 210: Integrate all qualified model components into a model component library.

[0082] It should be noted that the system integrates a simple calibration model to fine-tune the prediction results based on business rules or real-time information; it provides the probability distribution or confidence interval of the prediction results to assist in risk assessment; it encapsulates a visualization library, provides standardized report templates, and generates prediction result charts, accuracy indicators, and analysis reports; and after the feasibility analysis is deemed satisfactory, all qualified model components are integrated into a model component library.

[0083] As an example, step 210 includes: combining all eligible model components into a model component library.

[0084] In this embodiment, during the construction of the model component library, standard power time series data is first constructed based on the equipment nameplate parameters and the preset data configuration rule base. Then, standard power time series features are extracted from the standard power time series data to construct initial model components for different functional modules. After testing and obtaining qualified model components, all qualified model components are integrated into the model component library, thus achieving the goal of accurately constructing the model component library. Therefore, this lays the foundation for improving the construction efficiency of time series prediction model construction.

[0085] In one embodiment, based on the demand characteristics of the power time-series forecasting scenario, model components corresponding to different functional modules are selected from the model component library, including:

[0086] Based on the demand characteristics of power time series forecasting scenarios, identify the scenario types of power time series forecasting scenarios; based on the scenario types, match the component selection rules for different functional modules under the power time series forecasting scenarios; based on the component selection rules, select the corresponding model components for different functional modules from the model component library.

[0087] It should be noted that different power time-series forecasting scenarios correspond to different scenario types, and therefore different model components will be used to construct the initial time-series forecasting model. For example, in one feasible approach, the module selection for short-term load forecasting is as follows: Data preprocessing: spline interpolation imputation method; Feature engineering: extracting cyclic codes for hours, days of the week, and holidays, as well as 24-hour and 168-hour lag features and rolling statistical features; Basic forecasting: using an LSTM-Transformer hybrid model; Domain knowledge: adding power balance constraints and ramp rate constraints to the loss function; Post-processing: providing confidence intervals for load forecasting in a visualization report, generating daily / weekly reports that conform to scheduling procedures. The module selection for wind / solar power forecasting is as follows: Data preprocessing: using the isolated forest intelligent method to detect and using KNN to imput missing values; Feature engineering: numerical weather prediction is a decisive feature, and wind speed, wind direction, irradiance, temperature, and air pressure must be used as core inputs; Basic forecasting: using a CNN-Transformer hybrid model or TCN; Domain knowledge: adding wind turbine power characteristic curves or solar panel conversion efficiency models as strong constraints. Post-processing: Quantile regression is used to directly output predicted values ​​at different quantiles; Power equipment status prediction: Data preprocessing: Based on historical equipment data and procedures, obviously invalid sampling data is cleaned up, and sudden increases in gas content are detected; Feature engineering: Industry-standard features such as gas production rate and relative gas production rate are calculated as model input; Basic prediction: TCN or LSTM is used; Domain knowledge: The model's prediction results are verified and interpreted through the integration of the three-ratio method and the David triangle transformer fault diagnosis rules; Post-processing: A diagnostic report containing gas concentration prediction curves, gas production rate, three-ratio analysis results, and health status assessment is generated to provide decision support for operation and maintenance personnel.

[0088] As an example, based on the demand characteristics of power time-series forecasting scenarios, the scenario type of power time-series forecasting is identified; using the scenario type as an index, the component selection rules for different functional modules under the power time-series forecasting scenario are queried; based on the component selection rules, the corresponding model components for each functional module are selected sequentially from the model component library. In this way, the component selection rules can be adapted based on the scenario type of the power time-series forecasting scenario, thereby quickly completing the process of selecting the corresponding model components for each functional module from the model component library. Therefore, while laying the foundation for improving the prediction effect of the constructed time-series forecasting model, the construction efficiency of the time-series forecasting model is also improved.

[0089] In one embodiment, an initial time-series prediction model for a power time-series prediction scenario is obtained by assembling all model components, including:

[0090] Convert all model components into a unified standardized format; build a core module assembly engine and dynamically associate all model components based on the standardized format; connect all model components into a preset time series prediction model for the power time series prediction scenario; perform global configuration management and dependency injection on the preset time series prediction model to obtain the initial time series prediction model.

[0091] It should be noted that, to ensure the normal application of the initial time series prediction model, format unification and global configuration management can be performed during the assembly process. Specifically, this involves defining standardized interface protocols: unified data interface specifications and unified parameter interface specifications; implementing a module assembly engine: creating a core "assembly engine" or "pipeline builder" and dynamically connecting module instances; establishing data flow and loose coupling between modules: sequential execution and data transfer, achieving loose coupling and hot-plugging; and configuration management and dependency injection: global configuration management and dependency injection.

[0092] As an example, all model components are converted into a unified standardized format; a core module assembly engine is built, and all model components are dynamically associated based on the standardized format; all model components are connected into a preset time series prediction model for the power time series prediction scenario; global configuration management and dependency injection are performed on the preset time series prediction model to obtain the initial time series prediction model.

[0093] In one embodiment, a phased training strategy is employed to train and optimize the initial time-series prediction model, including:

[0094] The basic prediction module of the initial time series prediction model is pre-trained to obtain the first time series prediction model after pre-training; the first time series prediction model is fine-tuned by domain knowledge fusion to obtain the fine-tuned second time series prediction model; the second time series prediction model is adapted to end-to-end scenarios to obtain the initial time series prediction model after training and optimization.

[0095] As an example, the initial time-series prediction model is first pre-trained, enabling the basic prediction module to learn to capture basic patterns in power time-series data from massive historical data. The training data uses large-scale and cross-scenario historical power time-series data, and a purely data-driven loss function is adopted, resulting in a pre-trained first time-series prediction model. Next, the first time-series prediction model is fine-tuned by fusing domain knowledge, introducing the physical laws, operational constraints, and expert experience of the power system into the model through soft or hard constraints to correct the "physically unreasonable" prediction results generated by the purely data-driven approach in the first stage. A composite loss function is constructed to unify data fitting accuracy with physical consistency, resulting in a fine-tuned second time-series prediction model. Finally, the second time-series prediction model is adapted to end-to-end scenarios, thus adapting the general and robust model obtained in the first two stages to specific and up-to-date application scenarios to achieve accurate predictions. This ensures that accurate training yields an optimized initial time-series prediction model, thus laying the foundation for further improving the prediction performance of the constructed time-series prediction model.

[0096] In one embodiment, after using the trained and optimized initial time-series prediction model as the target time-series prediction model for the power time-series prediction scenario, the method further includes:

[0097] Standardize and package the target time series prediction model and manage its version; deploy and schedule the packaged model as a service; and perform model service and integration with upstream and downstream systems.

[0098] As an example, model standardization packaging and version management: The entire assembled pipeline is packaged into a standard container image; the pipeline includes all modules such as data preprocessing, feature engineering, model, and post-processing; each packaged model is assigned a unique version number, and all version models are stored in a central model repository, associated with their training data, code, parameters, and performance metrics; metadata recording: Rich metadata is embedded in the model package, including: model creation time and author, training data range and feature list, expected input / output patterns, and model performance benchmarks; service-oriented deployment and resource scheduling: The model is exposed to business systems as a highly available, high-performance API service; upstream and downstream system integration: The model service is integrated into the existing power IT ecosystem.

[0099] In one embodiment, after the execution model service is integrated with upstream and downstream systems, the method further includes:

[0100] The system detects the real-time prediction accuracy of the target time series prediction model deployed in the production environment. If the real-time prediction accuracy is found to be greater than the preset prediction accuracy threshold, the system iteratively trains the target time series prediction model until the real-time prediction accuracy of the iterated target time series prediction model is less than or equal to the preset prediction accuracy threshold.

[0101] It should be noted that during the application of the target time series prediction model, real-time monitoring of prediction performance is also conducted. This is specifically characterized by real-time prediction accuracy metrics, including MAE, RMSE, and MAPE. Specifically, real-time prediction performance monitoring includes: a dashboard to track core metrics: accuracy metrics (MAE, RMSE, MAPE); business metrics (scheduling cost deviation and pass rate caused by prediction errors); data quality and distribution offset monitoring to identify the root causes of model performance degradation; data drift detection to continuously compare the distribution of the model input data with the distribution of the training data; concept drift detection to monitor changes in the "feature-target" relationship; and abnormal input... Input Detection: Real-time detection of any previously unseen abnormal patterns in the input data; Model Running Status Monitoring: Service Health: Monitoring API request volume, response latency, and error rate; Resource Utilization: Monitoring CPU, memory, and GPU utilization of the service container; Automated Retraining Pipeline: Data Collection: Automatically collecting the latest business data; Pipeline Execution: Calling previous modular construction methods, retraining from the third stage using new data, or performing full training; Model Validation: Evaluating the performance of the new model on a reserved validation set and conducting A / B testing with the online older version; Automated Deployment: If the performance of the new model meets the preset threshold, it is automatically packaged, versioned, and canary released to the production environment to replace the old model.

[0102] As an example, the real-time prediction accuracy of the target time-series prediction model deployed in the production environment is monitored. If the real-time prediction accuracy exceeds a preset prediction accuracy threshold, the target time-series prediction model is iteratively trained until the real-time prediction accuracy of the iterated model is less than or equal to the preset prediction accuracy threshold. In this way, by monitoring the relationship between the real-time prediction progress indicator and the preset accuracy threshold, the prediction performance of the target time-series prediction model is monitored in real time. If the performance is insufficient, the target time-series prediction model is iteratively trained again until the real-time prediction accuracy of the iterated model is less than or equal to the preset prediction accuracy threshold. This ensures the reliability of the target time-series prediction model's prediction performance and lays the foundation for improving the prediction effect of the constructed time-series prediction model.

[0103] In one feasible approach, the initial power time-series data is first preprocessed based on equipment nameplate parameters and a preset data configuration rule base to obtain standard power time-series data. Standard power time-series features are extracted from the standard power time-series data. Initial model components containing different functional modules required for the entire power time-series prediction process are constructed. All initial model components are tested using the standard power time-series features to obtain at least one qualified model component. All qualified model components are integrated into a model component library. Then, based on the requirements of the power time-series prediction scenario, the scenario type is identified. According to the scenario type, component selection rules for different functional modules under the power time-series prediction scenario are matched. Based on the component selection rules, model components corresponding to different functional modules are selected from the model component library. All model components are then converted to a unified standardized format. A core module assembly engine is constructed, and all model components are dynamically associated based on the standardized format. All model components are connected to form a preset time-series prediction model for the power time-series prediction scenario. The preset time-series prediction model is then... The test model undergoes global configuration management and dependency injection to obtain an initial time series prediction model. Then, the basic prediction module of the initial time series prediction model is pre-trained to obtain a pre-trained first time series prediction model. The first time series prediction model is then fine-tuned through domain knowledge fusion to obtain a fine-tuned second time series prediction model. The second time series prediction model is then adapted to end-to-end scenarios to obtain a trained and optimized initial time series prediction model. Finally, the trained and optimized initial time series prediction model is used as the target time series prediction model for the power time series prediction scenario. Afterward, the target time series prediction model is standardized, packaged, and version-managed. The packaged model is then deployed as a service and resources are scheduled. The model service is integrated with upstream and downstream systems, and the real-time prediction accuracy of the target time series prediction model deployed to the production environment is detected. If the real-time prediction accuracy is found to be greater than a preset prediction accuracy threshold, the target time series prediction model is iteratively trained until the real-time prediction accuracy of the iterated target time series prediction model is less than or equal to the preset prediction accuracy threshold.

[0104] The above implementation method transforms a general modular component library into a powerful tool for solving specific industrial problems through precise module matching and configuration, thereby achieving flexibility, high efficiency, and business feasibility. Declarative configuration files allow for the rapid combination of predictive models with diverse functions. Modifying individual modules or adjusting pipeline structures becomes very simple, requiring only modification of the configuration file. Systematically injecting domain knowledge into the model fundamentally improves its generalization ability and reliability, thus enhancing the predictive performance of the constructed time-series predictive model.

[0105] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0106] Based on the same inventive concept, this application also provides a time series prediction model building apparatus for implementing the time series prediction model building method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more test time series prediction model building apparatus embodiments provided below can be found in the limitations of the time series prediction model building method described above, and will not be repeated here.

[0107] In one exemplary embodiment, such as Figure 3 As shown, a time series prediction model construction device is provided, including: a construction module 301, a selection module 302, an assembly module 303, and a training and optimization module 304, wherein:

[0108] Module 301 is used to build a model component library containing different functional modules required for the entire process of power time series prediction;

[0109] Module 302 is selected to select the corresponding model components of different functional modules from the model component library according to the demand characteristics of the power time series prediction scenario.

[0110] Assembly module 303 is used to obtain an initial time series prediction model for the power time series prediction scenario by assembling all model components;

[0111] The training optimization module 304 is used to train and optimize the initial time series prediction model using a phased training strategy, and to use the trained and optimized initial time series prediction model as the target time series prediction model for the power time series prediction scenario.

[0112] In one embodiment, the construction module 301 is further configured to:

[0113] Based on the equipment nameplate parameters and the preset data configuration rule library, the initial power time series data is preprocessed to obtain standard power time series data; standard power time series features are extracted from the standard power time series data; initial model components containing different functional modules required for the entire power time series prediction process are constructed; all initial model components are tested using standard power time series features to obtain at least one qualified model component; and all qualified model components are integrated into a model component library.

[0114] In one embodiment, the selection module 302 is further configured to:

[0115] Based on the demand characteristics of power time series forecasting scenarios, identify the scenario types of power time series forecasting scenarios; based on the scenario types, match the component selection rules for different functional modules under the power time series forecasting scenarios; based on the component selection rules, select the corresponding model components for different functional modules from the model component library.

[0116] In one embodiment, the assembly module 303 is further configured to:

[0117] Convert all model components into a unified standardized format; build a core module assembly engine and dynamically associate all model components based on the standardized format; connect all model components into a preset time series prediction model for the power time series prediction scenario; perform global configuration management and dependency injection on the preset time series prediction model to obtain the initial time series prediction model.

[0118] In one embodiment, the training optimization module 304 is further configured to:

[0119] The basic prediction module of the initial time series prediction model is pre-trained to obtain the first time series prediction model after pre-training; the first time series prediction model is fine-tuned by domain knowledge fusion to obtain the fine-tuned second time series prediction model; the second time series prediction model is adapted to end-to-end scenarios to obtain the initial time series prediction model after training and optimization.

[0120] In one embodiment, the time series prediction model building apparatus is further configured to:

[0121] Standardize and package the target time series prediction model and manage its version; deploy and schedule the packaged model as a service; and perform model service and integration with upstream and downstream systems.

[0122] In one embodiment, the time series prediction model building apparatus is further configured to:

[0123] The system detects the real-time prediction accuracy of the target time series prediction model deployed in the production environment. If the real-time prediction accuracy is found to be greater than the preset prediction accuracy threshold, the system iteratively trains the target time series prediction model until the real-time prediction accuracy of the iterated target time series prediction model is less than or equal to the preset prediction accuracy threshold.

[0124] Each module in the aforementioned time series prediction model construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0125] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for constructing a time-series prediction model. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0126] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0127] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0128] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0130] 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.

[0131] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for constructing a time series prediction model, characterized in that, The method includes: Construct a model component library that includes different functional modules required for the entire process of power time series forecasting; Based on the demand characteristics of the power time-series forecasting scenario, select the corresponding model components for each of the different functional modules from the model component library; By assembling all model components, the initial time series prediction model for the power time series prediction scenario is obtained; A phased training strategy is adopted to train and optimize the initial time series prediction model, and the trained and optimized initial time series prediction model is used as the target time series prediction model for the power time series prediction scenario.

2. The method according to claim 1, characterized in that, The model component library, which includes different functional modules required for the entire power time-series forecasting process, includes: Based on the equipment nameplate parameters and the preset data configuration rule library, the initial power time series data is preprocessed to obtain standard power time series data; Extract standard power time series features from standard power time series data; Construct an initial model component that includes the different functional modules required for the entire power time series forecasting process; Using the aforementioned standard power time series characteristics, all initial model components are tested to obtain at least one qualified model component; All qualified model components are integrated into the model component library.

3. The method according to claim 1, characterized in that, The step of selecting model components corresponding to different functional modules from the model component library based on the demand characteristics of the power time-series forecasting scenario includes: Based on the demand characteristics of the power time series forecasting scenario, identify the scenario type of the power time series forecasting scenario; Based on the scenario type, match the component selection rules for different functional modules under the power time series prediction scenario; According to the component selection rules, the model components corresponding to the different functional modules are selected from the model component library.

4. The method according to claim 1, characterized in that, The process of assembling all model components to obtain the initial time-series prediction model for the power time-series prediction scenario includes: Convert all the model components into a unified, standardized format; Construct a core module assembly engine and dynamically associate all model components based on the standardized format; Connect all the model components to form a preset time series prediction model for the power time series prediction scenario; The preset time series prediction model is configured and its dependencies are injected globally to obtain the initial time series prediction model.

5. The method according to claim 1, characterized in that, The step of employing a phased training strategy to train and optimize the initial time-series prediction model includes: The basic prediction module of the initial time series prediction model is pre-trained to obtain the pre-trained first time series prediction model. The first time series prediction model is fine-tuned by domain knowledge fusion to obtain the fine-tuned second time series prediction model; The second time series prediction model is adapted to the end-to-end scenario to obtain the trained and optimized initial time series prediction model.

6. The method according to claim 1, characterized in that, After using the trained and optimized initial time-series prediction model as the target time-series prediction model for the power time-series prediction scenario, the method further includes: The target time series prediction model is standardized, packaged, and version-managed. The packaged model is deployed as a service and resources are scheduled accordingly. Execution model services are integrated with upstream and downstream systems.

7. The method according to claim 6, characterized in that, After the execution model service is integrated with upstream and downstream systems, the method further includes: Detect the real-time prediction accuracy of the target time series prediction model deployed in the production environment; If the real-time prediction accuracy index is detected to be greater than the preset prediction accuracy index threshold, the target time series prediction model is iteratively trained until the real-time prediction accuracy index of the iterated target time series prediction model is less than or equal to the preset prediction accuracy index threshold.

8. A time series prediction model construction device, characterized in that, The device includes: The building module is used to build a model component library containing different functional modules required for the entire process of power time series forecasting; The selection module is used to select the corresponding model components from the model component library based on the demand characteristics of the power time series prediction scenario. An assembly module is used to obtain an initial time-series prediction model for the power time-series prediction scenario by assembling all model components; The training optimization module is used to train and optimize the initial time series prediction model using a phased training strategy, and to use the trained and optimized initial time series prediction model as the target time series prediction model for the power time series prediction scenario.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.