Electric power system time sequence prediction method and system based on migration incremental learning
Through a method based on transfer incremental learning, a multi-dimensional feature portrait of the power system is constructed. Similar historical data sets are selected and feature migration and fusion are performed. Combined with the lightweight TCN and iTransformer models, the problems of cold start and model update of the power system are solved, and high-precision and high-reliability time series prediction is achieved.
Patent Information
- Application Number
- CN202510643361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-10-17
AI Technical Summary
The existing power system time series forecasting model lacks accuracy during the cold start phase, and traditional forecasting algorithms cannot respond to equipment aging and environmental changes in a timely manner, resulting in insufficient forecast accuracy and reliability.
A method based on transfer incremental learning is adopted. By constructing a multi-dimensional feature portrait of the power system, a cross-domain transfer matching algorithm is used to select similar historical data sets, and the spatiotemporal attention transfer algorithm and lightweight TCN network are combined for initial prediction. Then, when the data volume reaches the threshold, the prediction is switched to the iTransformer structure, and the model is optimized through dual update trigger conditions and safe update protocols.
It significantly improves the prediction accuracy in the cold start phase, reduces computing resource consumption, enhances the adaptability and reliability of the model, and can respond to dynamic changes in the power system in a timely manner, ensuring the accuracy and stability of the prediction.
Smart Images

Figure CN120804552A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power system time series prediction, in particular to a power system time series prediction method and system based on transfer incremental learning. BACKGROUND
[0002] The power system is transforming towards a new type of power system dominated by new energy, and its uncertainty factors are increasing, such as the randomness and volatility of new energy generation, and the uncertainty of load demand, which brings great challenges to the safe and stable operation, system regulation and planning of the power system. Accurate modeling and prediction of uncertainty factors in the power system are the basis for ensuring the safe and stable operation of the new power system. Power time series prediction technology has important applications in the power system, such as power prediction of new energy power stations, substation equipment state prediction, regional power grid load prediction, and power market bidding prediction, etc. scenarios, all of which need to rely on accurate time series prediction to optimize operation strategies, improve resource utilization efficiency, reduce operating costs and risks.
[0003] However, the current power system time series prediction faces many technical bottlenecks. On the one hand, in the cold start stage, newly built power stations or newly installed equipment usually need to accumulate more than 12 months of historical data to build an effective prediction model, which leads to insufficient prediction model accuracy in the early stage of operation, and cannot meet the needs of safe and stable operation and optimal scheduling of the power system. On the other hand, traditional prediction algorithms use periodic full-volume retraining to update the model, which not only consumes huge computing resources, but also cannot respond to dynamic factors such as equipment aging, environmental changes, load characteristics changes, etc. in a timely manner, making it difficult to adapt to the rapidly changing operating state of the power system, further affecting the accuracy and reliability of the prediction. SUMMARY
[0004] The purpose of the present application is to provide a power system time series prediction method and system based on transfer incremental learning to solve at least one of the above technical problems.
[0005] In a first aspect, an embodiment of the present application provides a power system time series prediction method based on transfer incremental learning, comprising: constructing a feature portrait of a target power system based on multi-dimensional information of the target power system; calculating feature similarity of the feature portrait of the target power system and feature portraits of a plurality of power systems in a preset feature library based on a cross-domain transfer matching algorithm; obtaining a similar historical data set of the target power system in the preset feature library based on the feature similarity; performing feature transfer and fusion on the similar historical data set and an initial historical data set of the target power system based on a space-time attention transfer algorithm to obtain a fused data set; training a lightweight TCN network based on the fused data set to obtain an initial stage prediction model; performing time series prediction on an initial stage of the target power system based on the initial stage prediction model; the initial stage includes a cold start stage; after an incremental historical data amount of the target power system exceeds a preset switching threshold, switching the initial stage prediction model to a time series prediction model based on an iTransformer structure, and performing time series prediction on the target power system based on the time series prediction model based on the iTransformer structure.
[0006] Further, the multi-dimensional information includes: device model, installed capacity, geographic climate data, device operation life, and maintenance record; the geographic climate data includes illumination intensity, wind speed, and temperature.
[0007] Further, calculating the feature similarity of the feature portrait of the target power system and the feature portraits of the plurality of power systems in the preset feature library based on the cross-domain transfer matching algorithm comprises: calculating the feature similarity of the feature portrait of the target power system and the feature portraits of the plurality of power systems in the preset feature library based on a weighted Euclidean distance or cosine similarity method; obtaining the similar historical data set of the target power system in the preset feature library based on the feature similarity comprises: performing weighted sorting on the plurality of power systems in the preset feature library based on the feature similarity to obtain a similarity sorting result; selecting historical data corresponding to the first N power systems in the similarity sorting result as the similar historical data set of the target power system.
[0008] Further, based on the spatio-temporal attention transfer algorithm, the similar historical data set and the initial historical data set of the target power system are feature transferred and fused to obtain a fused data set, including: performing data distribution alignment processing on the similar historical data set based on an adversarial domain adaptation method to obtain an adversarial domain processed similar historical data set; performing spatio-temporal feature extraction on the adversarial domain processed similar historical data set based on a convolutional neural network and a recurrent neural network, and adjusting feature weights based on an attention mechanism to obtain spatio-temporal features of the similar historical data set; and migrating the spatio-temporal features to the target power system and fusing the spatio-temporal features with the initial historical data set based on a weighted summation or feature splicing method to obtain a fused data set.
[0009] Further, the light-weight TCN network is trained based on the fused data set, including: training the light-weight TCN network in batches based on the fused data set; after the end of each training batch, calculating the prediction error gradient of the light-weight TCN network by back propagation based on mean square error as a loss function; when the prediction error gradient exceeds a first preset error gradient threshold, adding neurons to the light-weight TCN network; and when the prediction error gradient is lower than a second preset error gradient threshold, reducing neurons of the light-weight TCN network.
[0010] Further, the method further includes: if the initial stage prediction model meets a double update triggering condition, updating the initial stage prediction model; wherein the double update triggering condition includes data distribution detection and model decay index detection; updating the initial stage prediction model includes: creating a shadow model of the initial stage prediction model; the shadow model has the same architecture and parameters as the initial stage prediction model; based on the incremental historical data set of the target power system, constructing a training set and a validation set; based on the training set, incrementally training the shadow model to obtain a trained shadow model; based on the validation set, evaluating the performance of the trained shadow model to obtain the prediction performance of the trained shadow model; and if the prediction performance of the trained shadow model is better than the prediction performance of the initial stage prediction model, updating the initial stage prediction model based on the trained shadow model.
[0011] In a second aspect, the embodiment of the present application also provides a power system time series prediction system based on migration incremental learning, comprising a construction module, a calculation module, an acquisition module, a fusion module, a training module, a prediction module and a switching module; wherein the construction module is configured to construct a feature portrait of a target power system based on multi-dimensional information of the target power system; the calculation module is configured to calculate feature similarity between the feature portrait of the target power system and feature portraits of a plurality of power systems in a preset feature library based on a cross-domain migration matching algorithm; the acquisition module is configured to acquire a similar historical data set of the target power system in the preset feature library based on the feature similarity; the fusion module is configured to perform feature migration and fusion between the similar historical data set and an initial historical data set of the target power system based on a space-time attention migration algorithm to obtain a data set after fusion; the training module is configured to train a light-weight TCN network based on the data set after fusion to obtain an initial stage prediction model; the prediction module is configured to perform time series prediction on an initial stage of the target power system based on the initial stage prediction model; the initial stage comprises a cold start stage; and the switching module is configured to switch the initial stage prediction model to a time series prediction model based on an iTransformer structure after an incremental historical data amount of the target power system exceeds a preset switching threshold, and perform time series prediction on the target power system based on the time series prediction model based on the iTransformer structure.
[0012] Further, the system further comprises an updating module configured to update the initial stage prediction model if the initial stage prediction model satisfies a double updating trigger condition; wherein the double updating trigger condition comprises data distribution detection and model decay index detection.
[0013] In a third aspect, the embodiment of the present application also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided by the embodiment of the present application when executing the computer program.
[0014] In a fourth aspect, the embodiment of the present application also provides a computer readable storage medium, which stores computer instructions, wherein the computer instructions are executed by a processor to implement the method provided by the embodiment of the present application.
[0015] The application provides a power system time sequence prediction method and system based on transfer incremental learning, effectively solves the cold start dilemma and model updating problem in the power system by fusing transfer learning and incremental learning, significantly improves the prediction accuracy, reduces the calculation resource consumption, enhances the adaptability and reliability of the model, and alleviates the technical problems of insufficient prediction model accuracy and large calculation resource consumption in the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 A flowchart of a power system time sequence prediction method based on transfer incremental learning provided by an embodiment of the present application is provided.
[0018] Figure 2 A schematic diagram of a power system time sequence prediction system based on transfer incremental learning provided by an embodiment of the present application is provided. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0020] Embodiment one
[0021] Figure 1 A flowchart of a power system time sequence prediction method based on transfer incremental learning provided by an embodiment of the present application is provided. As shown in the figure, Figure 1 The method specifically includes the following steps:
[0022] Step S102, based on the multi-dimensional information of the target power system, constructing the feature portrait of the target power system.
[0023] Step S104, based on the cross-domain transfer matching algorithm, calculating the feature similarity of the feature portrait of the target power system and the feature portraits of the plurality of power systems in the preset feature library.
[0024] Step S106, based on the feature similarity, obtaining the similar historical data set of the target power system in the preset feature library.
[0025] Step S108, based on the spatio-temporal attention transfer algorithm, the similar historical data set is fused with the initial historical data set of the target power system to obtain the fused data set.
[0026] Step S110, training the light-weight TCN network based on the fused data set to obtain the initial stage prediction model.
[0027] Step S112, based on the initial stage prediction module, the initial stage of the target power system is time series predicted; the initial stage includes the cold start stage.
[0028] Step S114, after the incremental historical data amount of the target power system exceeds the preset switching threshold, the initial stage prediction model is switched to the time series prediction model based on the iTransformer structure, and the target power system is time series predicted based on the time series prediction model based on the iTransformer structure.
[0029] Specifically, the multi-dimensional information includes: equipment model, installed capacity, geographical and climate data, equipment operation life and maintenance record; the geographical and climate data includes light intensity, wind speed and temperature.
[0030] The construction of the feature portrait of the power system is the basis for realizing multi-source heterogeneous transfer learning. The present application comprehensively considers the multi-dimensional information of the power system to construct a comprehensive and accurate feature portrait of the power system.
[0031] Specifically, the following key elements are covered:
[0032] Equipment model: different models of power generation equipment have significant differences in performance, efficiency and operating characteristics. By recording the equipment model in detail, the similarity reference at the equipment level can be provided for transfer learning. For example, different models of photovoltaic panels differ in photoelectric conversion efficiency, temperature coefficient, etc., which directly affects the prediction of power generation.
[0033] Installed capacity: installed capacity is an important indicator to measure the scale of power station, which has a direct impact on the prediction of power generation and equipment operation state. Larger installed capacity usually means more complex system structure and higher power generation potential, but also may face higher management difficulty and equipment coordination problem.
[0034] Geographical and climate data: including geographical location and climate conditions. Among them, the geographical location determines the light intensity, wind speed, temperature and other climate conditions of the power station, which directly affects the power generation efficiency of new energy. For example, the power generation of photovoltaic power station is closely related to the sunshine duration and light intensity; the power generation of wind power station is affected by wind speed and wind direction. By including geographical and climate data in the feature portrait, important environmental similarity basis can be provided for cross-regional transfer learning.
[0035] In constructing the feature portrait of the power system, the application adopts a multi-dimensional data collection and standardization processing method. First, through sensor network and geographic information system (GIS) technology, real-time collection of geographic climate data of the power system is performed, including temperature, wind speed, light intensity, etc. Second, standardization coding is performed on discrete data such as equipment model and installed capacity, to ensure comparability between different data types. Finally, data mining technology is used to analyze and integrate the collected multi-dimensional information to generate a representative feature vector. The feature portrait of the power system constructed by this comprehensive method can provide accurate and comprehensive basis for subsequent cross-domain migration matching, significantly improving the effect of migration learning.
[0036] Specifically, step S104 further includes: calculating the feature similarity of the feature portrait of the target power system and the feature portraits of the plurality of power systems in the preset feature library based on a weighted Euclidean distance or cosine similarity method.
[0037] Specifically, step S106 further includes the following steps:
[0038] Step S1061, based on the feature similarity, weightedly sorting the plurality of power systems in the preset feature library to obtain a similarity sorting result;
[0039] Step S1062, selecting the historical data corresponding to the first N power systems in the similarity sorting result as the similar historical data set of the target power system.
[0040] In the embodiment of the application, the cross-domain migration matching algorithm is the core link of the multi-source heterogeneous migration framework, and the purpose is to select the power system most similar to the target power system from the numerous candidate source domain power systems, so as to realize effective knowledge migration. The cross-domain migration matching algorithm proposed in the application selects the source domain based on feature similarity, and the specific implementation steps are as follows:
[0041] Feature similarity calculation: first, the similarity of the target power system and each candidate source domain power system on the feature portrait is calculated. Among them, the candidate source domain power system is the power system in the preset feature library. The similarity calculation adopts a weighted Euclidean distance or cosine similarity method. For example, for the dimension of geographic climate conditions, since its influence on power generation is larger, a higher weight can be given; while for the relatively stable attributes such as equipment model, a lower weight is given. In this way, the importance of different feature dimensions to migration learning can be more accurately reflected.
[0042] Weighted selection of source domain: According to the calculated feature similarity, the candidate source domain power system is weighted and sorted. The top N power systems with the highest similarity are selected as the source domain. In the present application, N is usually set to 10, that is, the historical data of the 10 most similar power systems from the cloud are obtained for transfer learning. By weighted selection of the source domain, it can be ensured that the selected source domain power system has high similarity in features with the target power system, thereby improving the effect of transfer learning.
[0043] In order to further optimize the performance of the cross-domain transfer matching algorithm, the present application also introduces a dynamic adjustment mechanism. During the transfer learning process, the weights of the feature similarity are dynamically adjusted according to the actual operation data and the prediction results of the target power system. For example, if it is found that a certain feature dimension does not meet the expected influence on the prediction accuracy, its weight can be adjusted in time, thereby improving the adaptability and accuracy of the matching algorithm. Through this dynamic adjustment mechanism, the cross-domain transfer matching algorithm can adaptively select the optimal source domain power system in different scenarios, significantly improving the performance and effect of transfer learning.
[0044] Specifically, step S108 includes the following steps:
[0045] Step S1081, based on the adversarial domain adaptation method, the similar historical data set is processed to align the data distribution, and the similar historical data set after the adversarial domain processing is obtained;
[0046] Step S1082, based on the convolutional neural network and the recurrent neural network, the similar historical data set after the adversarial domain processing is processed to extract the spatio-temporal features, and the feature weights are adjusted based on the attention mechanism, to obtain the spatio-temporal features of the similar historical data set;
[0047] Step S1083, based on the weighted summation or feature splicing method, the spatio-temporal features are transferred to the target power system and fused with the initial historical data set to obtain the fused data set.
[0048] In the embodiment of the present application, the spatio-temporal attention transfer is the core of realizing the key feature extraction and transfer in cross-site transfer learning. The purpose is to extract the periodic and trend features with transfer value from the historical data of the source domain power system and effectively transfer them to the target power system. Specifically, it includes:
[0049] Data preprocessing: The similar historical data set is normalized to eliminate the dimensional differences between different data sources, and at the same time, the outliers in the data are cleaned and repaired to ensure the quality of the data.
[0050] Then, the similar historical data set is aligned in data distribution through the adversarial domain adaptation method to improve the effect of transfer learning. Specifically, an adversarial domain adaptation network is constructed, which consists of a feature extractor, a classifier, and a domain discriminator. The feature extractor is used to extract general features of the data; the classifier is used to predict the target variable; and the domain discriminator is used to distinguish whether the data comes from the source domain or the target domain. Then, the adversarial training method is adopted to enable the feature extractor to generate feature representations that are indistinguishable in the domain. By minimizing the prediction error of the classifier and the domain classification error of the domain discriminator, the network parameters are optimized. For example, in new energy power generation prediction, the source domain data and the target domain data are closer in the feature space through the adversarial domain adaptation method, thereby improving the effect of transfer learning.
[0051] Effect evaluation: By comparing the prediction accuracy and data distribution difference before and after the adversarial domain adaptation, the effect of the adversarial domain adaptation method is evaluated. The experimental results show that after the adversarial domain adaptation processing, the prediction accuracy is improved by 15% compared with the unprocessed one, and the difference in data distribution is significantly reduced, effectively solving the problem of inconsistent data distribution in different power stations.
[0052] Spatio-temporal feature extraction: Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN) are used to extract spatio-temporal features from the similar historical data set. CNN can effectively extract spatial features in the data, such as data distribution patterns in different time periods; RNN can capture time series features in the data, such as periodicity and trend. By combining CNN and RNN, spatio-temporal features in the source domain data can be fully extracted.
[0053] Attention mechanism application: On the basis of the extracted spatio-temporal features, the attention mechanism is introduced. The attention mechanism can automatically identify and focus on the most valuable feature part for the target power system prediction. For example, in new energy power generation prediction, the features of certain time periods (such as sunny days or nights with high wind speed) may have a greater impact on the prediction results. Through the attention mechanism, the weights of the features can be dynamically adjusted to highlight these key features, thereby improving the effect of transfer learning.
[0054] Feature transfer and fusion: Finally, the extracted spatio-temporal features with transfer value are transferred to the target power system and fused with the local data (i.e. the initial historical data set) of the target power system. In the fusion process, methods such as weighted summation or feature splicing are used to ensure the organic combination of the transferred features and the local data. Through this spatio-temporal attention transfer design, not only can the key features be effectively extracted and transferred, but also the transferred features can be matched with the actual operation of the target power system, thereby significantly improving the prediction accuracy of the target power system.
[0055] In practical applications, the application can adaptively adjust the feature extraction and migration strategy through continuous learning and optimization. For example, in different seasons or different operating states, the most valuable features for migration are automatically identified, and the weights of the attention mechanism are dynamically adjusted. Through this adaptive design, the application can effectively cope with the complex dynamic changes in power system time series prediction, providing strong technical support for the intelligent transformation of power systems.
[0056] Specifically, step S110 includes the following steps:
[0057] Step S1101, based on the data set after fusion, training the lightweight TCN network in batches;
[0058] Step S1102, after the end of each training batch, based on the mean square error as the loss function, the prediction error gradient of the lightweight TCN network is calculated by back propagation;
[0059] Step S1103, when the prediction error gradient exceeds the first preset error gradient threshold, add neurons to the lightweight TCN network;
[0060] Step S1104, when the prediction error gradient is lower than the second preset error gradient threshold, reduce the neurons of the lightweight TCN network.
[0061] In the initial stage of power system time series prediction, especially in the case of limited data of newly built power stations, it is crucial to choose a suitable model architecture. The application adopts a lightweight temporal convolutional network (TCN network) as the prediction model in the initial stage, which has significant advantages.
[0062] The lightweight TCN network can effectively capture the long-term dependence relationship in time series data through the combination of causal convolution and dilated convolution, while maintaining high computational efficiency. In the initial stage, the data volume is usually small, and the lightweight characteristics of the lightweight TCN network enable it to quickly train and converge under limited computing resources. For example, in the power generation prediction of a newly built photovoltaic power station, the lightweight TCN network can quickly build an effective prediction model with only 3 months of data.
[0063] In addition, the structure of the lightweight TCN network is relatively simple, easy to implement and optimize. Its parameter amount is small, reducing the risk of model overfitting, especially suitable for the cold start stage with less data. This shows that the application of lightweight TCN network in the initial stage can effectively solve the problem of insufficient data of newly built power stations, laying a solid foundation for the growth and optimization of subsequent models.
[0064] In order to further improve the adaptability and prediction accuracy of the lightweight TCN network, a dynamic neuron expansion strategy is designed. The strategy dynamically adjusts the depth of the lightweight TCN network according to the prediction error gradient, that is, increases or reduces the number of neurons. During the training process of the lightweight TCN network, the prediction error gradient reflects the fitting degree of the lightweight TCN network to the current data. When the prediction error gradient is large, it indicates that the lightweight TCN network is insufficiently fitted to the data, and the number of neurons needs to be increased to improve the expression ability of the model. When the prediction error gradient is small, it indicates that the lightweight TCN network has good fitting ability, and the number of neurons can be appropriately reduced to reduce the computational complexity. By dynamically adjusting the number of neurons, the lightweight TCN network can adaptively cope with changes in data and always maintain the best prediction performance.
[0065] The specific implementation method is as follows:
[0066] Error gradient calculation: after each training batch, the prediction error gradient is calculated. Specifically, the mean square error (MSE) is used as the loss function, and the prediction error gradient is calculated by back propagation.
[0067] Dynamic expansion decision: when the prediction error gradient exceeds the first preset error gradient threshold, a layer of neurons is added; when the prediction error gradient is lower than the second preset error gradient threshold, a layer of neurons is reduced. For example, in the experiment, the first preset gradient threshold is set to 0.1, and when the prediction error gradient exceeds 0.1, 10% of the neurons are added; the second preset gradient threshold is set to 0.05, and when the prediction error gradient is lower than 0.05, 10% of the neurons are reduced.
[0068] Neuron expansion and contraction: when adding neurons, a random initialization method is used to assign weights to new neurons; when reducing neurons, the neurons that have the least impact on the prediction error are selected for pruning.
[0069] Through the dynamic neuron expansion strategy, the lightweight TCN network can adaptively adjust the structure under different data volume and running states, significantly improving the prediction accuracy and computational efficiency. This shows that the dynamic neuron expansion strategy can effectively cope with the complex dynamic changes in power system time series prediction, and provides strong technical support for the intelligent transformation of power systems.
[0070] The method provided by the embodiment of the application further includes: if the initial stage prediction model satisfies a double update triggering condition, updating the initial stage prediction model; wherein the double update triggering condition includes data distribution detection and model decay index detection. Specifically, updating the initial stage prediction model includes:
[0071] Creating a shadow model of the initial stage prediction model; the shadow model has the same architecture and parameters as the initial stage prediction model;
[0072] constructing a training set and a validation set based on an incremental historical data set of the target power system;
[0073] incrementally training the shadow model based on the training set to obtain a trained shadow model;
[0074] performing performance evaluation on the trained shadow model based on the validation set to obtain the prediction performance of the trained shadow model;
[0075] if the prediction performance of the trained shadow model is better than the prediction performance of the initial-stage prediction model, updating the initial-stage prediction model based on the trained shadow model.
[0076] Specifically, the dual updating strategy provided by the embodiments of the present application effectively solves the problems of untimely model updating and false triggering in the traditional model updating strategy. Specifically,
[0077] Data distribution detection (JS divergence monitoring concept drift): During the operation of the power system, the data distribution may change over time, i.e., the concept drift phenomenon occurs. The present application adopts JS divergence (Jensen-Shannon Divergence) as a monitoring index of data distribution change. JS divergence can quantify the distribution difference between new data batches and historical data. When the JS divergence exceeds a set threshold (such as 0.2), it indicates that the data distribution has changed significantly, triggering the model updating process. For example, in a wind farm, due to seasonal changes or changes in wind direction, the power generation data distribution may change, and through JS divergence monitoring, such changes can be discovered in time, thereby triggering model updating to adapt to the new data distribution.
[0078] Model decay index (prediction error growth rate under rolling window): In addition to data distribution changes, the performance decay of the model itself is also an important factor to be concerned about. The present application monitors the change of model performance by calculating the prediction error growth rate under the rolling window. Specifically, a fixed length rolling window (such as 30 days of data in the past) is set, and the growth rate of the model prediction error in the window is calculated. When the prediction error growth rate exceeds a set threshold (such as 15%), it indicates that the model performance has decreased significantly and needs to be updated. For example, in the power generation prediction of a photovoltaic power station, the prediction accuracy of the model may gradually decrease due to equipment aging or environmental changes. By monitoring the prediction error growth rate under the rolling window, the decay of the model performance can be discovered in time, thereby triggering the updating process to restore the prediction accuracy of the model.
[0079] The present application can comprehensively monitor the dynamic changes in the operation of the power system by combining data-driven and model-driven methods, discover the need for updating in time, and avoid the limitations of single trigger conditions in the traditional model updating strategy.
[0080] During the model updating process, it is crucial to ensure the safety and stability of the update. The present invention designs a complete safety update protocol process to prevent the performance decline of the updated model from causing adverse effects on the operation of the power system. The specific process is as follows:
[0081] Shadow model verification mechanism: Before updating the formal model, a shadow model is first created. The shadow model has the same architecture and parameters as the initial stage prediction model, but is incrementally trained using new data. Through the shadow model verification mechanism, the performance of the new model can be evaluated without affecting the normal operation of the initial stage prediction model. Specifically, the new data is divided into a training set and a validation set, the training set is used to incrementally train the shadow model, and then the performance of the shadow model is evaluated on the validation set. If the performance of the shadow model is better than the current production model (such as the prediction accuracy is improved by more than 3%), the new model is considered effective and can be updated; otherwise, the current production model is retained.
[0082] Rollback protection mechanism: To further ensure the safety of the update, the present invention introduces a rollback protection mechanism. After the model is updated, the performance of the new model is continuously monitored. If the performance of the new model decreases by more than a set threshold (such as 5%) within a certain time window (such as 7 days after the update), the rollback protection mechanism is automatically triggered to restore the model to its state before the update. For example, in power grid load forecasting, if the updated model has a large error in actual operation, causing difficulties in grid scheduling, the rollback protection mechanism can timely restore the model to a stable state, avoiding serious impact on the operation of the power grid.
[0083] Through the dual protection of the shadow model verification mechanism and the rollback protection mechanism, the present invention ensures the safety and stability of the model update. In practical applications, this safety update protocol process can effectively prevent the decline in prediction accuracy and system instability caused by model updates, providing a strong guarantee for the stable operation of the power system.
[0084] In the incremental learning process, to effectively prevent catastrophic forgetting, the present invention introduces an elastic weight consolidation algorithm (EWC). EWC applies regularization constraints to model parameters to limit the destruction of old task knowledge by new task learning. Specifically, EWC assigns an importance weight to each parameter, which reflects the importance of the parameter in the old task. When learning a new task, the update of the model parameters will be constrained by these importance weights, thereby protecting the key features of the old task.
[0085] To better utilize historical data and new data, the invention designs a double-queue memory bank, including core memory and rolling memory. The core memory stores key samples that have a significant impact on the performance of the model. By carefully selecting and retaining these key samples, the model can maintain long-term memory of old task knowledge during incremental learning. For example, in device state prediction, the core memory stores typical samples related to device failure, which can help the model better identify fault features in subsequent learning. The rolling memory stores recent samples to capture short-term trends in data. By combining rolling memory, the model can quickly adapt to changes in new data and improve its response to new tasks. For example, in power grid load forecasting, the rolling memory stores the load data of the past week, which can help the model capture short-term fluctuations in load in a timely manner.
[0086] Specifically, in step S114, during model switching, the knowledge and features learned in the lightweight TCN network are transferred to the iTransformer architecture through transfer learning techniques, avoiding the inefficiency of training from scratch and effectively improving the overall performance of power system time series prediction.
[0087] As the amount of data accumulates, the prediction model needs to have stronger expression ability and higher prediction accuracy to adapt to the complex and variable operating state of the power system. The invention designs a model architecture switching mechanism based on a data volume threshold. When the data volume reaches a certain threshold, it automatically switches from the TCN network to the iTransformer architecture.
[0088] Among them, iTransformer is an efficient time series prediction model based on Transformer, which can process large-scale time series data and capture long and short-term dependencies in data. By introducing a self-attention mechanism, iTransformer can dynamically adjust the importance of features, thereby improving prediction accuracy. After the data volume reaches the threshold, the iTransformer architecture can better utilize accumulated data to further improve the performance of the model.
[0089] For example, the data volume threshold set by the invention is 6 months. When the data volume reaches 6 months, the model automatically switches from the TCN network to the iTransformer architecture.
[0090] From the above description, the embodiment of the invention provides a power system time series prediction method based on transfer incremental learning. Compared with the prior art, it has the following technical effects:
[0091] (1) Collect comprehensive characteristics of target power equipment, such as equipment model, installed capacity, geographical climate, equipment operation time, maintenance records, etc., to form a detailed feature portrait, providing accurate matching basis for subsequent transfer learning.
[0092] (2) Based on the feature portrait, calculate the feature similarity, and select the top 10 power equipment most similar to the target power equipment from the cloud mass data as the source domain, and obtain its historical data, effectively solving the problem of lack of data for newly built power equipment or newly put into operation.
[0093] (3) Design a spatio-temporal attention transfer algorithm to accurately extract transferable periodic and trend features, and transfer valuable information from source domain data to target power equipment, effectively utilize cross-domain data, and improve the prediction accuracy of target power equipment time series data.
[0094] (4) In the cold start stage, the data volume is limited, and a lightweight TCN is used to build a benchmark prediction model, which consumes low computing resources and can quickly adapt to the initial prediction demand.
[0095] (5) As the data volume accumulates, when it reaches the preset threshold, the system automatically switches to the more powerful iTransformer architecture to cope with complex data patterns, further improves the prediction accuracy, and ensures that the model maintains optimal performance at different data stages.
[0096] (6) Dynamically adjust the network depth according to the prediction error gradient, optimize the model structure in real time, so that the model can better adapt to changes in data, improve the generalization ability and prediction accuracy of the model.
[0097] (7) Monitor data distribution changes through JS divergence, when significant data distribution drift is detected (δ>0.2), trigger model update to ensure the model can adapt to changes in data characteristics in time; calculate the prediction error growth rate under the rolling window, when the error growth rate exceeds 15%, indicating that the model performance has significantly decayed, triggering the update mechanism to restore the prediction accuracy of the model.
[0098] (8) Create a shadow model for verification before updating, only when the performance of the shadow model improves by more than 3%, replace the shadow model with the production model, to ensure that the updated model can bring actual performance improvement; if the performance of the updated model decreases by more than 5%, automatically roll back to the model before updating, to prevent performance degradation caused by updating from affecting system operation, and to ensure the stability and reliability of the system.
[0099] (9) In the cold start stage with a data volume less than 3 months, the historical data of 10 most similar power equipment are obtained from the cloud through feature matching, the data distribution is aligned by using the adversarial domain adaptation method, the benchmark prediction model based on TCN is constructed, the prediction service is quickly started, and the prediction accuracy in the initial stage of operation is significantly improved.
[0100] (10) In the incremental learning stage, the elastic weight solidification algorithm (EWC) is used to prevent catastrophic forgetting and retain the memory of the model for old knowledge; a double-queue memory bank is designed, including core memory (storing key samples) and rolling memory (storing recent samples), and incremental updating is triggered every 200 new data points, so that the model can continuously learn new data and dynamically optimize the prediction performance.
[0101] The present application fuses transfer learning and incremental learning technology, and constructs a complete power time series prediction solution, effectively solves the cold start dilemma and model updating problem in the power system, significantly improves the prediction accuracy, reduces the consumption of computing resources, enhances the adaptability and reliability of the model, and is suitable for various power system scenarios such as new energy power station power prediction, substation equipment state prediction, regional power grid load prediction, and power market bidding prediction. It provides strong technical support for the intelligent operation and management of the power system, and promotes the process of digital transformation of the power system.
[0102] Embodiment two
[0103] Figure 2 It is a schematic diagram of a power system time series prediction system based on transfer and incremental learning provided by an embodiment of the present application. As shown in the figure, Figure 2 The system includes a construction module 10, a calculation module 20, an acquisition module 30, a fusion module 40, a training module 50, a prediction module 60 and a switching module 70.
[0104] Specifically, the construction module 10 is configured to construct a feature portrait of a target power system based on multi-dimensional information of the target power system;
[0105] The calculation module 20 is configured to calculate the feature similarity between the feature portrait of the target power system and the feature portraits of a plurality of power systems in a preset feature library based on a cross-domain transfer matching algorithm;
[0106] The acquisition module 30 is configured to acquire a similar historical data set of the target power system in the preset feature library based on the feature similarity;
[0107] The fusion module 40 is configured to perform feature transfer and fusion on the similar historical data set and the initial historical data set of the target power system based on a spatio-temporal attention transfer algorithm to obtain a fused data set;
[0108] The training module 50 is configured to train the light-weight TCN network based on the fused data set, and obtain an initial-stage prediction model;
[0109] The prediction module 60 is configured to perform time series prediction on the initial stage of the target power system based on the initial-stage prediction model.
[0110] The switching module 70 is configured to switch the initial-stage prediction model to an iTransformer structure-based time series prediction model when the amount of incremental historical data of the target power system exceeds a preset switching threshold, and perform time series prediction on the target power system based on the iTransformer structure-based time series prediction model.
[0111] Specifically, as shown in Figure 2 The updating module 80 is further configured to update the initial-stage prediction model if the initial-stage prediction model meets a double updating trigger condition, wherein the double updating trigger condition comprises data distribution detection and model attenuation index detection.
[0112] The present application also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method provided by the embodiments of the present application when executing the computer program.
[0113] The present application also provides a computer readable storage medium, which stores computer instructions, and the computer instructions are executed by a processor to implement the method provided by the embodiments of the present application.
[0114] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended to include all changes falling within the meaning and scope of the equivalent elements of the claims. Any reference signs in the claims should not be regarded as limiting the claims to which they relate.
[0115] In addition, it should be understood that although the present specification is described in terms of embodiments, each embodiment does not contain only one independent technical solution, and the description manner of the specification is only for clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be properly combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A power system time series prediction method based on transfer incremental learning, characterized in that: include: Constructing a characteristic profile of the target power system based on multi-dimensional information of the target power system; Calculating the feature similarity between the feature profile of the target power system and the feature profiles of multiple power systems in a preset feature library based on a cross-domain migration matching algorithm; Based on the feature similarity, obtaining a similar historical data set of the target power system from the preset feature library; Based on the spatiotemporal attention migration algorithm, the similar historical data set and the initial historical data set of the target power system are subjected to feature migration and fusion to obtain a fused data set; Training a lightweight TCN network based on the fused data set to obtain an initial stage prediction model; Performing a time series prediction on the initial stage of the target power system based on the initial stage prediction module; The initial stage includes a cold start stage; After the incremental historical data amount of the target power system exceeds a preset switching threshold, the initial stage prediction model is switched to a timing prediction model based on an iTransformer structure, and timing prediction of the target power system is performed based on the timing prediction model based on the iTransformer structure.
2. The method according to claim 1, wherein: The multi-dimensional information includes: equipment model, installed capacity, geographic climate data, equipment operating years and maintenance records; the geographic climate data includes light intensity, wind speed and temperature.
3. The method according to claim 1, wherein: Based on the cross-domain migration matching algorithm, the feature similarity between the feature profile of the target power system and the feature profiles of multiple power systems in the preset feature library is calculated, including: Calculating the feature similarity between the feature portrait of the target power system and the feature portraits of multiple power systems in a preset feature library based on a weighted Euclidean distance or cosine similarity method; Based on the feature similarity, obtaining a similar historical data set of the target power system from the preset feature library includes: Based on the feature similarity, weighted sorting is performed on the plurality of power systems in the preset feature library to obtain a similarity sorting result; The historical data corresponding to the first N power systems in the similarity ranking result are selected as the similar historical data set of the target power system.
4. The method according to claim 1, wherein: Based on the spatiotemporal attention migration algorithm, the similar historical data set and the initial historical data set of the target power system are subjected to feature migration and fusion to obtain a fused data set, including: Performing data distribution alignment processing on the similar historical data set based on an adversarial domain adaptation method to obtain a similar historical data set after adversarial domain processing; Extracting spatiotemporal features of the similar historical dataset after the adversarial domain processing based on a convolutional neural network and a recurrent neural network, and adjusting feature weights based on an attention mechanism to obtain spatiotemporal features of the similar historical dataset; Based on a weighted summation or feature concatenation method, the spatiotemporal features are migrated to the target power system and feature fused with the initial historical data set to obtain a fused data set.
5. The method according to claim 1, wherein: Training a lightweight TCN network based on the fused dataset includes: Training a lightweight TCN network in batches based on the fused data set; After each training batch is completed, the prediction error gradient of the lightweight TCN network is calculated by back propagation based on the mean square error as the loss function; When the prediction error gradient exceeds a first preset error gradient threshold, adding neurons to the lightweight TCN network; When the prediction error gradient is lower than a second preset error gradient threshold, neurons are reduced in the lightweight TCN network.
6. The method according to claim 1, wherein: The method further includes: if the initial stage prediction model satisfies a dual update triggering condition, updating the initial stage prediction model; wherein the dual update triggering condition includes data distribution detection and model decay index detection; Updating the initial stage prediction model includes: Creating a shadow model of the initial stage prediction model; the shadow model has the same architecture and parameters as the initial stage prediction model; constructing a training set and a validation set based on an incremental historical data set of the target power system; Performing incremental training on the shadow model based on the training set to obtain a trained shadow model; Performing a performance evaluation on the trained shadow model based on the validation set to obtain a prediction performance of the trained shadow model; If the prediction performance of the trained shadow model is better than the prediction performance of the initial stage prediction model, the initial stage prediction model is updated based on the trained shadow model.
7. A power system time series prediction system based on transfer incremental learning, characterized in that: include: Construction module, calculation module, acquisition module, fusion module, training module, prediction module and switching module; among them, The construction module is used to construct a characteristic profile of the target power system based on the multi-dimensional information of the target power system; The calculation module is used to calculate the feature similarity between the feature portrait of the target power system and the feature portraits of multiple power systems in a preset feature library based on a cross-domain migration matching algorithm; The acquisition module is configured to acquire a similar historical data set of the target power system from the preset feature library based on the feature similarity; The fusion module is used to perform feature migration and fusion on the similar historical data set and the initial historical data set of the target power system based on a spatiotemporal attention migration algorithm to obtain a fused data set; The training module is used to train a lightweight TCN network based on the fused data set to obtain an initial stage prediction model; The prediction module is configured to perform a time series prediction on the initial stage of the target power system based on the initial stage prediction module; the initial stage includes a cold start stage; The switching module is used to switch the initial stage prediction model to a timing prediction model based on the iTransformer structure after the incremental historical data amount of the target power system exceeds a preset switching threshold, and perform timing prediction on the target power system based on the timing prediction model based on the iTransformer structure.
8. The system according to claim 7, characterized in that: It also includes an update module, which is used to: update the initial stage prediction model if the initial stage prediction model meets the dual update triggering conditions; wherein the dual update triggering conditions include data distribution detection and model attenuation index detection.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.