Tidal power load prediction method fusing transfer learning and federated learning
By integrating transfer learning and federated learning, this method addresses the issues of regional disparities and privacy protection in power load forecasting, achieving accurate cross-regional forecasting and resource optimization, and is applicable to the collaborative sensing and optimized operation of smart grids.
Patent Information
- Application Number
- CN202511233193.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2026-01-06
AI Technical Summary
Existing power load forecasting methods are ill-suited to regional differences, neglect the structural separation of cycles and disturbances, fail to achieve multi-regional collaborative modeling, and lack privacy protection, resulting in decreased forecast accuracy and increased deployment costs.
We adopt a method that integrates transfer learning and federated learning. By decomposing the power load into a global periodic function and a regional private perturbation function through a load decomposition model, we construct a dual encoder model. We use federated learning to ensure privacy and security while achieving cross-regional collaborative training. We also reduce the computational burden by using a lightweight CNN-GRU structure and a modular training strategy.
It enables precise cross-regional migration, improves the robustness and generalization ability of the prediction system, reduces computing resource requirements, ensures data privacy and security, and is suitable for diverse power grid environments.
Smart Images

Figure CN121282869A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid and power system automation technology, specifically to a tidal power load forecasting method that integrates transfer learning and federated learning. Background Technology
[0002] With the development of new power systems and the increasing complexity of energy consumption structures, electricity load exhibits a typical "tidal" dynamic characteristic, encompassing significant periodicity (such as daily, weekly, and seasonal variations) while also being superimposed with disturbances such as holidays, dramatic weather changes, and equipment connection disruptions. This superimposed pattern of "period + disturbance" necessitates that load forecasting tasks simultaneously identify universal patterns and localized characteristics. Currently, most mainstream load forecasting methods rely on local data, using it to train or build models.
[0003] However, this approach has the following core flaws:
[0004] 1. Poor model transferability and adaptability: Models relying on local data lack specific modeling for tidal characteristics, making them difficult to adapt to differentiated application areas. In cases where there are load differences between regions (such as industrial areas and residential areas) or inconsistent data distribution (such as the winter-summer load reversal in northern regions), directly transferring the model will lead to a decrease in accuracy due to feature shift and statistical mismatch, requiring repeated large-scale training and increasing deployment and maintenance costs;
[0005] 2. Coupling of periodicity and disturbance modeling: Existing methods usually use a unified time series model (such as GRU, LSTM, Transformer) to learn the overall load end-to-end, ignoring the structural separation of periodicity and disturbance, which leads to inaccurate model response to disturbance-sensitive events (such as holidays and extreme weather).
[0006] 3. Limitations on multi-regional collaborative modeling: Data privacy and network restrictions hinder the sharing of raw data, making centralized modeling unsuitable, and existing solutions cannot achieve multi-regional collaborative training while ensuring privacy.
[0007] 4. Insufficient representation of regional characteristics: Existing joint forecasting schemes ignore regional perturbation differences, and the use of a unified model will eliminate individual characteristics, resulting in forecasting results that cannot accurately reflect regional characteristics;
[0008] 5. Imperfect data construction mechanism: There is a lack of a data processing mechanism based on period alignment. Data from different regions within the same period have time offsets, which interfere with the extraction of common periodic patterns. At the same time, the lack of unified normalization processing makes it difficult for the model to converge and affects training efficiency. To address this, we propose a tidal power load prediction method that integrates transfer learning and federated learning. Summary of the Invention
[0009] The technical problem to be solved by this invention is to overcome the existing defects and provide a tidal power load forecasting method that integrates transfer learning and federated learning. This method can achieve accurate cross-regional transfer, strengthen the separation modeling of period and disturbance, and ensure privacy and security in federated collaboration, ultimately forming a closed-loop technical process, which can effectively solve the problems in the background technology.
[0010] To achieve the above objectives, the present invention provides the following technical solution: a tidal power load forecasting method integrating transfer learning and federated learning, comprising the following steps:
[0011] S1 Tidal Load Modeling: First, establish a load decomposition model to decompose the load of region i at time t. Decomposed into a global periodic function f cyc (·) and the region's private perturbation function Superposition: Where θ s For globally shared parameters, These are region-private parameters;
[0012] S2 Dual Training Set Construction: Based on the load decomposition characteristics of S1, two types of datasets are constructed respectively; private dataset Construction: Raw load data for region i Hourly resampling is performed, and samples are generated using a 24-hour sliding window. Where t = 25, 26, ..., T, outlier removal and missing value imputation are performed;
[0013] Public dataset D shared Construction: Standardization of data in each region Where μ (i) and σ (i) The mean and standard deviation of region i are given, respectively. After removing cross-day samples, the samples are aligned according to the natural day cycle (0:00-23:00), and cross-regional random recombination generates unlabeled sequences.
[0014] S3 model architecture design: Based on the dataset built from S2, it deploys a shared encoder Encshared and a private encoder Encprivate (both with CNN+GRU architecture) with identical structures; the client uses the private dataset. Build, local training parameters φ (i) Upload only shared encoder parameters To the server; aggregate globally shared parameters using a federated averaging algorithm. Release the updated version To each client;
[0015] S4 Dual Encoder Federated Training: To enhance the cyclic modeling capabilities of S3, a two-stage training process is implemented; Pre-training stage: using the public dataset D constructed by S2. shared Training cycle model M shared (CNN+GRU structure); Fine-tuning stage: M shared When migrating to the target region, freeze the CNN parameters θ. c Using only private datasets Fine-tuning GRU parameters
[0016] S5 transfer learning mechanism: Combining the training results of S3 and S4, inputting 24-hour continuous load data Xt of the target region, and outputting predicted values through dual encoders and fusion modules:
[0017] This method ensures structural flexibility and pluggability through module decoupling, thereby improving the model's adaptability to regional heterogeneity and correlation.
[0018] Furthermore, in step S1, the global periodic function f cyc The parameter θ of (·) s To share parameters, the regional perturbation function parameters With private parameters, the model effectively distinguishes between regional common periodic patterns and local unique characteristics, solving problems such as regional heterogeneity, data imbalance, and sample scarcity.
[0019] Furthermore, in step S2, the construction of the private dataset requires outlier removal and missing value imputation. The construction of the private dataset retains cross-day information and maintains the correlation between consecutive natural days to support personalized modeling.
[0020] Furthermore, in step S2, the construction of the public dataset must meet the natural day cycle alignment (0:00–23:00). This operation effectively removes regional characteristics and time correlation between natural days, retaining only the tidal variation characteristics within a natural day.
[0021] Furthermore, in step S3, the CNN+GRU structure includes three one-dimensional convolutional layers (kernel size 3, channels 64 / 128 / 128) and a single-layer GRU network (hidden state dimension 128). This lightweight combination avoids overfitting, has a short gradient propagation path, and is more suitable for realizing model transfer and reducing the amount of fine-tuning computation.
[0022] Furthermore, in step S5, the fusion module MLP contains two hidden layers of 64 neurons each. The MLP fusion mechanism supports automatic learning of weight combination methods, eliminating the need for manual weight setting and enhancing nonlinear expression capabilities.
[0023] Furthermore, the fine-tuning phase in step S4 uses a private dataset with continuous temporal sequence. Freezing CNN parameters can reduce uncertainty in the fine-tuning process, improve model stability, and significantly reduce computation and data requirements.
[0024] Furthermore, the federated training process in step S3 must satisfy the private encoder parameters. With fusion module parameter φ (i) This mechanism ensures privacy and security by not participating in parameter uploading and aggregation: the data is kept entirely local, and only the public encoder parameters are shared, without exposing the model's individual structure.
[0025] Furthermore, the collaborative mechanism described in steps S4 and S3 is implemented through a pre-trained model M. shared Initialize shared encoder parameters; the migration mechanism and federation mechanism can complement and adapt to each other; flexibly select the scheme according to the data distribution; and improve the model's generalization ability in small sample scenarios.
[0026] Compared with existing technologies, the beneficial effects of this invention are as follows: This tidal power load forecasting method, which integrates transfer learning and federated learning, has the following advantages:
[0027] 1. By decoupling the periodic commonality of tidal loads from the individual characteristics of regional disturbances, the dual-encoder federated architecture constructed in this method enables the model to dynamically adapt to diverse scenarios across multiple regions. The shared encoder focuses on extracting universal periodic patterns across regions, while the private encoder meticulously characterizes localized disturbance factors. This collaborative mechanism effectively solves the performance degradation problem of traditional methods when faced with regional heterogeneity and data distribution shifts. When dealing with complex scenarios such as load differences between industrial and residential areas or seasonal load reversals, the model can achieve stable transfer without repeated training, significantly improving the robustness and generalization potential of the prediction system in diverse power grid environments.
[0028] 2. The innovative federated learning framework achieves multi-regional knowledge sharing while ensuring data security. Each participant only uploads shared encoder parameters to the aggregation server, while the original load data and private model parameters remain locally. This meets the requirements for power data sensitivity and avoids network bottlenecks in cross-regional data transmission. This mechanism breaks through the limitations of traditional centralized modeling, enabling distributed power supply units to collaboratively optimize the global cycle model without exposing local privacy, providing key technical support for building a secure and efficient distributed smart grid prediction system.
[0029] 3. Employing a lightweight CNN-GRU combined structure and a modular training strategy significantly reduces the computational burden and deployment cost of the model. The design of freezing convolutional layer parameters and fine-tuning temporal layers during the transfer learning phase drastically reduces the number of training samples and computational resources required for adapting to new regions; while the symmetrical dual-encoder structure in the federated architecture ensures deployment compatibility of edge nodes. This resource optimization characteristic makes this method particularly suitable for data-scarce regions and hardware-constrained scenarios, providing a sustainable technical solution for the real-time forecasting needs of large-scale power grid systems. Attached Figure Description
[0030] Figure 1 This is a curve showing the fitting of the prediction results and the actual values in different regions according to the present invention;
[0031] Figure 2 This is a comparison chart of the prediction results of different schemes of the present invention;
[0032] Figure 3 This is a diagram showing the relationship between the five steps of this invention.
[0033] In the picture: Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Please see Figure 1-3 This embodiment provides a technical solution: a tidal power load forecasting method integrating transfer learning and federated learning, comprising the following steps:
[0036] S1 Tidal Load Modeling: First, establish a load decomposition model to decompose the load of region i at time t. Decomposed into a global periodic function f cyc (·) and the region's private perturbation function Superposition: Where θ s For globally shared parameters, For region-private parameters; global periodic function f cyc The parameter θ of (·) s To share parameters, the regional perturbation function parameters With private parameters, the model effectively distinguishes between regional common periodic patterns and local individual characteristics, solving problems such as regional heterogeneity, data imbalance, and sample scarcity.
[0037] S2 Dual Training Set Construction: Based on the load decomposition characteristics of S1, two types of datasets are constructed respectively; private dataset Construction: Raw load data for region i Hourly resampling is performed, and samples are generated using a 24-hour sliding window. Where t = 25, 26, ..., T, outlier removal and missing value imputation are performed; the construction of private datasets requires outlier removal and missing value imputation, and the construction of private datasets retains cross-day information and maintains the correlation between consecutive natural days to support personalized modeling;
[0038] Public dataset D shared Construction: Standardization of data in each region Where μ (i) and σ (i) The mean and standard deviation of region i are given, respectively. After removing cross-day samples, the samples are aligned according to the natural day cycle (0:00-23:00), and cross-regional random recombination generates unlabeled sequences. The construction of public datasets must meet the alignment of natural day cycles (0:00–23:00). This operation effectively removes regional characteristics and temporal correlations between natural days, retaining only the tidal variation characteristics within a natural day.
[0039] S3 model architecture design: Based on the dataset built from S2, it deploys a shared encoder Encshared and a private encoder Encprivate (both with CNN+GRU architecture) with identical structures; the client uses the private dataset. Build, local training parameters φ (i) Upload only shared encoder parameters To the server; aggregate globally shared parameters using a federated averaging algorithm. Release the updated version To each client; the CNN+GRU structure consists of three one-dimensional convolutional layers (kernel size 3, channels 64 / 128 / 128) and a single-layer GRU network (hidden state dimension 128). This lightweight combination avoids overfitting, has a short gradient propagation path, and is more suitable for model transfer and reducing fine-tuning computation; the federated training process must meet the private encoder parameters. With fusion module parameter φ (i) This mechanism ensures privacy and security by not participating in parameter uploading and aggregation: the data is completely kept locally, and only the public encoder parameters are shared, without exposing the model's individual structure;
[0040] S4 Dual Encoder Federated Training: To enhance the cyclic modeling capabilities of S3, a two-stage training process is implemented; Pre-training stage: using the public dataset D constructed by S2. shared Training cycle model M shared(CNN+GRU structure); Fine-tuning stage: M shared When migrating to the target region, freeze the CNN parameters θ. c Using only private datasets Fine-tuning GRU parameters The fine-tuning phase uses a private dataset with continuous time series. Freezing CNN parameters can reduce uncertainty in the fine-tuning process, improve model stability, and significantly reduce computation and data requirements.
[0041] S5 transfer learning mechanism: Combining the training results of S3 and S4, inputting 24-hour continuous load data Xt of the target region, and outputting predicted values through dual encoders and fusion modules: The fusion module MLP contains two hidden layers with 64 neurons each. The MLP fusion mechanism supports automatic learning of weight combination methods, eliminating the need for manual weight setting and enhancing nonlinear expressive power.
[0042] This method ensures structural flexibility and pluggability through module decoupling, thereby improving the model's adaptability to regional heterogeneity and correlation.
[0043] The collaborative mechanism described in steps S4 and S3 is implemented through a pre-trained model M. shared Initialize shared encoder parameters; the migration mechanism and federation mechanism can complement and adapt to each other; flexibly select the scheme according to the data distribution; and improve the model's generalization ability in small sample scenarios.
[0044] To verify the performance of this method in real-world scenarios, supplementary experimental details and results are as follows:
[0045] 1. Experimental setup
[0046] Data configuration: Each sample contains 600 consecutive hours of historical load data, and the model outputs a load forecast for the next hour. The training and test sets are divided in an 8:2 ratio.
[0047] Model parameters: Encoding network: Three-layer 1D-CNN (kernel size 3, channels 64 / 128 / 128)
[0048] Temporal modeling: Single-layer GRU (128 hidden state dimensions)
[0049] Fusion module: Two-layer 64-neuron MLP
[0050] Training optimization: loss function is MAE, optimizer is Adam, learning rate is 0.001, batch size is 64, training is 100 rounds.
[0051] 2. Performance Verification
[0052] (1) Prediction accuracy of a single region
[0053] This scheme can accurately fit the flow rate change trend with a relative error of less than 10%. Figure 1 As shown, the predicted curve (black) closely matches the actual value (red);
[0054] (2) Algorithm Comparison Analysis
[0055] like Figure 2 As shown, this solution addresses RMSE, MAE, and R... 2 In terms of metrics, it outperforms traditional schemes (such as LSTM and MLP) and similar structural schemes (such as CNN2D and ConvLSTM), proving the effectiveness of tidal modeling;
[0056] (3) Cross-regional generalization ability
[0057] As shown in Table 1, the federated learning and transfer learning schemes significantly improve prediction accuracy (e.g., the RMSE in region 4 decreased from 903 to 808), demonstrating the synergistic effect of common feature transfer and individual feature preservation.
[0058] Table 1 Performance Comparison of Three Algorithms
[0059]
[0060]
[0061] (4) Method flow relationship
[0062] like Figure 3 As shown, the five steps (S1-S5) form a closed loop: tidal modeling → data construction → model design → federated training → transfer learning, demonstrating the flexibility of module decoupling;
[0063] Advantages of this invention:
[0064] 1. Improved accuracy: By decoupling the modeling of periodic commonalities and perturbation individualities, the average prediction error is reduced by 15%-20%.
[0065] 2. Privacy protection: The federated learning mechanism ensures that the original data does not leave the domain and only the encoder parameters are shared.
[0066] 3. Highly efficient migration: The strategy of freezing CNN and fine-tuning GRU reduces the adaptation time of new regions by 50%.
[0067] 4. Resource optimization: The lightweight CNN-GRU combination reduces training energy consumption by 35% compared to traditional methods.
[0068] This invention has demonstrated its superiority in real-world tidal power load scenarios, providing core technical support for the collaborative sensing and optimized operation of smart grids.
[0069] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A tidal power load forecasting method fusing transfer learning and federated learning, characterized in that: The steps include: S1 Tidal Load Modeling: First, establish a load decomposition model to decompose the load of region i at time t. Decomposed into a global periodic function f cyc (·) and the region's private perturbation function Superposition: Where θ s For globally shared parameters, These are region-private parameters; S2 double training set construction: based on the load decomposition characteristics of S1, two types of data sets are constructed respectively; private data set Construction: the original load data of region i Hourly resampling is carried out, and samples are generated through 24-hour sliding window Where t=25, 26, …, T, and outlier rejection and missing value filling are carried out; Public dataset D shared Construction: Standardization of regional data where μ (i) and σ (i) are the mean and standard deviation of region i, respectively, aligned by natural day cycle (0:00-23:00) after cutting off cross-day samples, and randomly recombined across regions to generate an anonymous sequence S3 model structure design: based on the dataset constructed in S2, deploy the same structure of shared encoder Encshared and private encoder Encprivate (both are CNN+GRU structure): the client uses the private dataset Construction, local training parameters φ (i) ; only upload the shared encoder parameters to the server; aggregate the global shared parameters by federated averaging algorithm Distribute the updated to each client; S4 Dual-encoder federation training: To strengthen the periodic modeling capability of S3, two-stage training is implemented; pre-training stage: use the public dataset D built by S2 shared Train the periodic model M shared (CNN+GRU structure); fine-tuning stage: transfer M shared to the target area, freeze the CNN parameter θ c , and only use the private dataset Fine-tune the GRU parameter S5 Transfer learning mechanism: The training results of S3 and S4 are integrated, and the target area continuous 24-hour load data Xt is input to output the predicted value through the double encoder and the fusion module:
2. The method of claim 1, wherein the method is characterized in that: Parameter θ of the global periodic function f in step S1 cyc (·) is a shared parameter s is a shared parameter, the zone perturbation function Parameter of the global periodic function f is a private parameter.
3. The method of claim 1, wherein the method is characterized in that: The private dataset construction in step S2 needs to be performed with outlier rejection and missing value filling.
4. The method of claim 1, wherein the method is characterized in that: The public dataset construction in step S2 needs to satisfy the natural day cycle alignment (0:00-23:00).
5. The method of claim 1, wherein the method is characterized in that: The CNN+GRU structure in step S3 includes three one-dimensional convolution layers (convolution kernel size 3, channel 64 / 128 / 128) and a single GRU network (hidden state dimension 128).
6. The method of claim 1, wherein the method is characterized in that: The fusion module MLP in step S5 includes two 64-neuron hidden layers.
7. The method of claim 1, wherein the method is characterized in that: The fine-tuning phase in step S4 uses a private dataset of continuous time series 8. The method of claim 1, wherein the method is characterized in that: The federated training procedure in step S3 needs to satisfy the private encoder parameters with the fusion module parameters φ (i) does not participate in the parameter upload and aggregation.
9. The method of claim 1, wherein the method is characterized in that: Step S4 the synergy mechanism described in S3 through pre-training model M shared Initialize shared encoder parameters.