Distributed photovoltaic power prediction model training method, data processing method, device, equipment, medium and product

By freezing the backbone network parameters and performing incremental adapter training at distributed photovoltaic sites, combined with graph convolutional networks and encrypted feature embedding, the data silo problem in distributed photovoltaic power generation prediction is solved, improving the collaborative prediction accuracy and adaptability of photovoltaic clusters.

CN121503565BActive Publication Date: 2026-04-07HUANENG JIANGSU COMPREHENSIVE ENERGY SERVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Data silos and non-independent identically distributed data exist in distributed photovoltaic power generation prediction, which leads to severe performance degradation of traditional federated learning models at local sites.

Method used

A central model training method is adopted, which utilizes a pre-trained self-attention backbone network and a spatiotemporal graph neural network. By freezing the backbone network parameters and incrementally training the adapters at distributed photovoltaic sites, and combining encrypted feature embedding and graph convolutional networks for feature aggregation, an implicit dynamic adjacency matrix is ​​constructed to correlate power fluctuations between sites.

Benefits of technology

While reducing communication and computing overhead, it significantly improves the collaborative prediction accuracy of photovoltaic clusters, solves the data silo problem, and realizes the cross-site adaptability of the model and the improvement of prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503565B_ABST
    Figure CN121503565B_ABST
Patent Text Reader

Abstract

This invention discloses a training method, data processing method, apparatus, equipment, medium, and product for a distributed photovoltaic (PV) power generation prediction model. The method includes: training a central model for meteorological and power generation prediction using sample data; the central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter; distributing the central model parameters of the trained central model to at least one distributed PV site, enabling the site to incrementally train its own model based on these parameters; the central model parameters include self-attention backbone network parameters and adapter parameters, with the self-attention backbone network parameters in a frozen state and the adapter parameters in an updatable state. This invention solves the problem of data silos in distributed PV power generation prediction. By using a backbone parameter freezing and adapter incremental training strategy, it significantly improves the collaborative prediction accuracy of PV clusters while reducing communication and computational overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of photovoltaic power generation prediction technology, and in particular to a method for training a distributed photovoltaic power generation prediction model, a data processing method, an apparatus, equipment, a medium and a product. Background Technology

[0002] Currently, distributed photovoltaic (PV) power generation prediction faces serious problems of "data silos" and non-independent and identically distributed (Non-IID) data. Due to the significant differences in microclimates among PV sites in different regions, the performance of traditional federated learning models degrades severely at local sites. Summary of the Invention

[0003] This invention provides a training method, data processing method, apparatus, equipment, medium, and product for a distributed photovoltaic power generation prediction model, which solves the problem of isolated data in distributed photovoltaic power generation prediction. While reducing communication and computing overhead, it significantly improves the collaborative prediction accuracy of photovoltaic clusters.

[0004] In a first aspect, embodiments of the present invention provide a method for training a distributed photovoltaic power generation prediction model, applied to a central server, the method comprising:

[0005] Acquire sample data, which includes historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations.

[0006] The central model is trained using sample data. The central model is used to predict the second meteorological data of the second time period after the first time period based on the first meteorological data of the first time period. Then, it predicts the power generation data of the second time period based on the second meteorological data and the site environment data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter.

[0007] The central model parameters of the trained central model are distributed to at least one distributed photovoltaic site so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During the incremental training process, the self-attention backbone network parameters are in a frozen state, while the adapter parameters are in an updatable state.

[0008] Secondly, embodiments of the present invention provide a method for training a distributed photovoltaic power generation prediction model, applied to distributed photovoltaic sites, the method comprising:

[0009] Obtain the central model parameters of the central model from the central server, where the central model is used for weather forecasting and power generation forecasting;

[0010] Construct a site model with the same structure as the central model. The self-attention backbone network of the site model is in a frozen state, and the adapter layer of the site model is in a trainable state.

[0011] The station model is initialized based on the central model parameters, and the station meteorological data sequence and station environmental data are obtained and input into the station model to obtain the station meteorological forecast data and the station power generation forecast data.

[0012] The prediction regression loss is calculated based on the meteorological forecast data and power generation forecast data of the stations, the actual meteorological data corresponding to the meteorological forecast data of the stations, and the actual power generation data corresponding to the power generation forecast data of the stations.

[0013] Construct raw and enhanced views of station meteorological data sequences and station environmental data. Calculate the contrastive learning loss based on the raw and enhanced views. The contrastive learning loss is used to align the feature space of the stations.

[0014] The weighted sum of the predicted regression loss and the contrastive learning loss is used as the total loss function value. The self-attention backbone network parameters of the site model are kept unchanged, and only the parameters of the adapter layer are updated and trained until the total loss function value is less than the preset threshold. The site adapter parameters are obtained and uploaded to the central server.

[0015] Thirdly, embodiments of the present invention provide a data processing method applied to distributed photovoltaic sites, the method comprising:

[0016] Obtain the meteorological data sequence of the station and input the meteorological data sequence of the station into the station model trained by the distributed photovoltaic power generation prediction model training method provided in any embodiment of the distributed photovoltaic power generation prediction model training method applied to distributed photovoltaic stations, as provided in this invention, to obtain station meteorological prediction data and station power generation prediction data.

[0017] Fourthly, embodiments of the present invention also provide a distributed photovoltaic power generation prediction model training device, applied to a central server, the device comprising:

[0018] The data acquisition module is used to acquire sample data, which includes historical meteorological data sequences, historical environmental data, and historical power generation data sequences from historical stations.

[0019] The model training module is used to train the central model using sample data. The central model is used to predict the second meteorological data of the second time period after the first time period based on the first meteorological data of the first time period. Then, it predicts the power generation data of the second time period based on the second meteorological data and the site environment data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter.

[0020] The parameter distribution module is used to distribute the central model parameters of the trained central model to at least one distributed photovoltaic site, so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During the incremental training process, the self-attention backbone network parameters are in a frozen state, while the adapter parameters are in an updatable state.

[0021] Fifthly, embodiments of the present invention also provide a training device for a distributed photovoltaic power generation prediction model, applied to a distributed photovoltaic site, the device comprising:

[0022] The central model parameter acquisition module is used to acquire the central model parameters of the central model on the central server. The central model is used for weather forecasting and power generation forecasting.

[0023] The prediction data determination module is used to build the site model. It initializes the site model according to the parameters of the central model and obtains the site meteorological data sequence and the site environmental data and inputs them into the site model to obtain the site meteorological prediction data and the site power generation prediction data. The site model has the same structure as the central model. The self-attention backbone network of the site model is in a frozen state, and the adapter layer of the site model is in a trainable state.

[0024] The regression loss calculation module is used to calculate the predicted regression loss based on the station meteorological forecast data, the station power generation forecast data, the actual meteorological data corresponding to the station meteorological forecast data, and the actual power generation data corresponding to the station power generation forecast data.

[0025] The contrastive loss calculation module is used to construct the original view and the enhanced view of the station meteorological data sequence and the station environmental data. It calculates the contrastive learning loss based on the original view and the enhanced view. The contrastive learning loss is used to align the feature space of the station.

[0026] The site adapter parameter determination module is used to take the weighted sum of the predicted regression loss and the contrastive learning loss as the total loss function value, keep the self-attention backbone network parameters of the site model unchanged, and only perform gradient update training on the parameters of the adapter layer until the total loss function value is less than a preset threshold to obtain the site adapter parameters, and then upload the site adapter parameters to the central server.

[0027] Sixthly, embodiments of the present invention also provide a data processing apparatus applied to a distributed photovoltaic site, the apparatus comprising:

[0028] The data processing module is used to acquire the meteorological data sequence of the station and input the meteorological data sequence of the station into the station model trained by the distributed photovoltaic power generation prediction model training method provided in any embodiment of the distributed photovoltaic power generation prediction model training method applied to distributed photovoltaic stations, so as to obtain the station meteorological prediction data and the station power generation prediction data.

[0029] In a seventh aspect, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0030] At least one processor; and

[0031] A memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the distributed photovoltaic power generation prediction model training method or data processing method according to any embodiment of the present invention.

[0033] Eighthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the distributed photovoltaic power generation prediction model training method or data processing method described in any embodiment of the present invention.

[0034] In a ninth aspect, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the distributed photovoltaic power generation prediction model training method or data processing method as described in any of the embodiments of the present invention.

[0035] In this embodiment of the invention, sample data is acquired, including historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations. A central model is trained using this sample data. This central model is used to predict the second meteorological data for a second time period based on the first meteorological data for a first time period, and then predict the power generation data for the second time period based on the second meteorological data and the station environmental data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The central model parameters of the trained central model are distributed to at least one distributed photovoltaic (PV) station, enabling the distributed PV stations to incrementally train their station models based on these central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable. This invention solves the problem of isolated data in distributed PV power generation prediction. By freezing the backbone parameters and using incremental adapter training strategies, the collaborative prediction accuracy of PV clusters is significantly improved while reducing communication and computational overhead. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A flowchart illustrating a method for training a distributed photovoltaic power generation prediction model, as provided in an embodiment of the present invention;

[0038] Figure 2 A flowchart illustrating a method for training a distributed photovoltaic power generation prediction model, as provided in an embodiment of the present invention;

[0039] Figure 3 A flowchart illustrating a method for training a distributed photovoltaic power generation prediction model, as provided in an embodiment of the present invention;

[0040] Figure 4 A flowchart illustrating a method for training a distributed photovoltaic power generation prediction model, as provided in an embodiment of the present invention;

[0041] Figure 5 A flowchart of a data processing method provided in an embodiment of the present invention;

[0042] Figure 6 This is a schematic diagram of the structure of a distributed photovoltaic power generation prediction model training device provided in an embodiment of the present invention;

[0043] Figure 7 This is a schematic diagram of the structure of a distributed photovoltaic power generation prediction model training device provided in an embodiment of the present invention;

[0044] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention;

[0045] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0046] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0047] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.

[0048] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the relevant content of the solution.

[0049] Figure 1 This is a flowchart illustrating a method for training a distributed photovoltaic power generation prediction model, provided by an embodiment of the present invention. This embodiment is applicable to model training scenarios. The method can be executed by a distributed photovoltaic power generation prediction model training device, which can be implemented in software and / or hardware, integrated into an electronic device, and applied to a central server.

[0050] like Figure 1 As shown, the training method for the distributed photovoltaic power generation prediction model includes the following steps:

[0051] S110. Obtain sample data.

[0052] This embodiment is used to train a model capable of weather forecasting and power generation prediction. Sample data includes historical meteorological data sequences, historical environmental data sequences, and historical power generation data sequences from various photovoltaic (PV) stations. This data can be obtained from a pre-set database that stores meteorological, environmental, and power generation data sequences from multiple distributed PV stations. Distributed PV stations refer to geographically dispersed PV power generation units. Each station independently collects and processes data, and can upload it to the pre-set database after the data becomes outdated, thus serving as samples for training the central model.

[0053] Meteorological data from the station includes temperature, humidity, wind speed, and solar radiation. The station's power generation data series can be a power generation sequence. Environmental data from the station includes static factors such as topography and vegetation cover.

[0054] S120, Train the central model using sample data.

[0055] The central model is used to predict the second meteorological data for the second time period based on the first meteorological data for the first time period, and then to predict the power generation data for the second time period based on the second meteorological data and the site environmental data.

[0056] The central model is trained using multi-dimensional sample data. The sample data is preprocessed, including data cleaning, normalization, spatiotemporal alignment, and feature engineering, and then used to train the central model.

[0057] The central model comprises a pre-trained self-attention backbone network, a spatio-temporal graph neural network, and an adapter. Specifically, the central model adopts a composite architecture of "pre-trained Transformer backbone + low-rank adapter (LoRA) + spatio-temporal graph neural network (ST-GNN)".

[0058] Backbone: A Transformer model (such as PatchTST) pre-trained on massive public meteorological data is selected to extract general time-series features. The parameters of this part are always frozen during federated training.

[0059] Adapter layer (LoRA): It bypasses the Attention layer of the backbone network and connects two low-rank matrices A and B in parallel. The weight update is represented as Delta W = B * A. The site only needs to train A and B, and the number of parameters is only 1%-5% of the backbone network.

[0060] Spatiotemporal Graph Neural Network: Used to aggregate adapter parameters from various sites on the server side. This network receives a graph structure defined by an implicit dynamic adjacency matrix and uses graph convolutional layers (GCN) to perform spatial manifold aggregation on the adapter parameters uploaded by each site, thereby capturing spatiotemporal dependency features across sites.

[0061] After the central model is trained, it learns and models the temporal patterns based on the first meteorological data collected continuously within the first time period, predicting the second meteorological data for the second time period after the first time period, providing a preliminary input for subsequent power generation prediction. Building on this, the model further integrates the second meteorological data with environmental data specific to each site, fully considering the adaptability of meteorological conditions to the actual scenarios of each site. Through multi-feature cross-modeling, it finally outputs the predicted power generation data for each distributed photovoltaic site within the second time period.

[0062] S130. Distribute the central model parameters of the trained central model to at least one distributed photovoltaic site, so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters.

[0063] The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable.

[0064] The frozen self-attention backbone network parameters and the initialized adapter parameters will be distributed as global adapter parameters so that distributed photovoltaic sites can perform parameter-efficient fine-tuning (PEFT) only on the adapter parameters during incremental training.

[0065] Incremental learning mechanisms allow the model to gradually update its parameters as it receives new data, without needing to retrain the entire model. A sub-model refers to a portion of the model trained locally at each site, focusing on local data features.

[0066] During training, each site only uses locally added meteorological data, power generation data, and unique environmental data, without sharing raw data with the central server or other sites, thus mitigating privacy risks from the outset. Through incremental learning, the site model can continuously learn unique local data features, such as irradiance differences caused by local terrain and power attenuation patterns due to equipment aging, on top of the general capabilities of the central model. This allows for gradual optimization of model adaptability, enabling site power generation prediction through incrementally trained models.

[0067] The technical solution of this embodiment acquires sample data, including historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations. A central model is trained using this sample data. This central model predicts the second meteorological data for a second time period based on the first meteorological data for a first time period, and then predicts the power generation data for the second time period based on the second meteorological data and the station environmental data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The central model parameters are then distributed to at least one distributed photovoltaic (PV) station, enabling the distributed PV stations to incrementally train their own models based on these parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable. This technical solution solves the problem of isolated data in distributed PV power generation prediction. By freezing backbone parameters and using incremental adapter training strategies, it significantly improves the collaborative prediction accuracy of PV clusters while reducing communication and computational overhead.

[0068] Figure 2 This is a flowchart illustrating a distributed photovoltaic (PV) power prediction model training method provided in this embodiment of the invention. This embodiment belongs to the same inventive concept as the distributed PV power prediction model training methods described above, and further describes the process of graph convolution aggregation of site adapter parameters. This method can be executed by a distributed PV power prediction model training device, which can be implemented in software and / or hardware, integrated into an electronic device with application development capabilities, and applied to a central server.

[0069] like Figure 2 As shown, the training method for the distributed photovoltaic power generation prediction model in this embodiment includes the following steps:

[0070] S210. Obtain sample data.

[0071] The sample data includes historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations.

[0072] S220, Train the central model using sample data.

[0073] The central model is used to predict the second meteorological data for the second time period based on the first meteorological data for the first time period, and then to predict the power generation data for the second time period based on the second meteorological data and the site environmental data.

[0074] S230. Distribute the central model parameters of the trained central model to at least one distributed photovoltaic site, so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters.

[0075] The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable.

[0076] S240. Obtain the site adapter parameters of at least one distributed photovoltaic site.

[0077] The site adapter parameters are obtained by training the site model using site sample data based on the incremental learning mechanism of the distributed photovoltaic site.

[0078] The site adapter parameters are in the form of encrypted feature embedding vectors, such as the feature embedding vector form of Lightweight Mask Security Aggregation Protocol encryption.

[0079] S250. Without obtaining the geographical coordinates of the distributed photovoltaic sites, calculate the feature similarity of the site adapter parameters and construct an implicit dynamic adjacency matrix based on the feature similarity.

[0080] An implicit dynamic adjacency matrix is ​​used to characterize the correlation of power fluctuations between sites. The server maintains an implicit dynamic adjacency matrix, which is constructed by calculating the similarity of feature vectors of the site model parameters uploaded by each site. This matrix reflects the order of cloud movement between sites and is used for subsequent graph convolution aggregation.

[0081] Existing prediction models, due to the contradiction between spatial correlation and location privacy, show that photovoltaic power is significantly spatially correlated with cloud movement, but constructing graph networks usually requires exposing the latitude and longitude of sites, which poses privacy risks.

[0082] To address the aforementioned privacy risks, this embodiment first flattens the adapter parameters of each site into a one-dimensional feature vector and normalizes it without obtaining the geographical coordinates of the distributed photovoltaic sites. Then, it calculates the similarity between vectors using cosine similarity or Pearson correlation coefficient to construct an initial similarity matrix. Subsequently, Softmax normalization is applied to each row of the matrix to generate an implicit dynamic adjacency matrix. The element values ​​of this matrix are mapped to the [0,1] interval, which can accurately represent the correlation of power fluctuations between sites. The matrix is ​​updated in real time as the adapter parameters are incremented, which can both avoid the risk of geographical coordinate privacy leakage and dynamically capture the temporal changes of site power correlation.

[0083] S260. Using a graph convolutional network, spatial manifold aggregation is performed on the site adapter parameters based on the implicit dynamic adjacency matrix to obtain global adapter parameters containing spatiotemporal coordination information. The global adapter parameters are then transferred to the distributed photovoltaic sites so that the distributed photovoltaic sites can perform incremental training based on the global adapter parameters.

[0084] Through the graph convolutional network of the spatiotemporal graph neural network in the central model, spatial manifold aggregation of site adapter parameters is performed based on the implicit dynamic adjacency matrix to obtain global adapter parameters containing spatiotemporal collaborative information. Specifically, the central server uses the constructed implicit dynamic adjacency matrix to perform graph convolution operations on the adapter parameters uploaded by each site. The parameter update of a site depends not only on itself, but also on the experience of other sites with similar meteorological patterns, such as those on the same cloud cluster movement path, according to the association weights, thereby achieving spatial collaborative prediction. The global adapter parameters are transferred to each distributed photovoltaic site to provide optimized initial parameters for incremental training of the site models.

[0085] After receiving the global adapter parameters, each site does not need to start training from scratch. Instead, it initializes its local model based on these parameters and then uses newly added real-time meteorological data, power generation data, and specific environmental data to conduct incremental training. This ensures that all sites share the globally optimal knowledge and allows each site's model to accurately adapt to its local scenario. Ultimately, this achieves a balance between the universality of the global model and the personalization of the site model, continuously improving the overall accuracy and stability of distributed photovoltaic power prediction.

[0086] The technical solution of this embodiment involves acquiring sample data, including historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations. A central model is trained using this sample data. This central model is used to predict the second meteorological data for a second time period based on the first meteorological data for a first time period, and then predicts the power generation data for the second time period based on the second meteorological data and the station environmental data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The trained central model parameters are then distributed to at least one distributed photovoltaic (PV) station, enabling the distributed PV station to incrementally train its own model based on these central model parameters. These central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters... The system is in a frozen state, while the adapter parameters are in an updatable state. At least one distributed photovoltaic (PV) site's adapter parameters are obtained. These parameters are trained on the site model using site sample data through an incremental learning mechanism, and are in the form of encrypted feature embedding vectors. Without obtaining the site's geographical coordinates, the feature similarity of the adapter parameters is calculated. An implicit dynamic adjacency matrix is ​​constructed based on this similarity, representing the correlation of power fluctuations between sites. A graph convolutional network is used to perform spatial manifold aggregation on the adapter parameters based on the implicit dynamic adjacency matrix, resulting in global adapter parameters containing spatiotemporal coordination information. These global adapter parameters are then transferred to the distributed PV sites, enabling incremental training based on them. This invention solves the problem of isolated distributed PV power prediction data. It eliminates the need for site geographical coordinates, constructs an implicit dynamic adjacency matrix based on adapter parameter similarity to represent power correlations, and obtains and distributes global adapter parameters through spatial manifold aggregation using a graph convolutional network, improving the model's cross-site adaptability and prediction accuracy.

[0087] Figure 3 This is a flowchart illustrating a method for training a distributed photovoltaic (PV) power generation prediction model, provided by an embodiment of the present invention. This embodiment is applicable to model training scenarios. The method can be executed by a distributed PV power generation prediction model training device, which can be implemented in software and / or hardware, integrated into an electronic device, and applied to distributed PV sites.

[0088] like Figure 3 As shown, the training method for the distributed photovoltaic power generation prediction model includes the following steps:

[0089] S310. Obtain the central model parameters of the central model from the central server.

[0090] The central model is used for weather forecasting and power generation forecasting.

[0091] S320. Construct a site model. Initialize the site model according to the parameters of the central model, and input the site meteorological data sequence and site environmental data into the site model to obtain the site meteorological forecast data and the site power generation forecast data.

[0092] Construct a site model with the same structure as the central model. The self-attention backbone network of the site model is in a frozen state, while the adapter layer of the site model is in a trainable state.

[0093] The adapter parameters from the central model parameters are used as the initial adapter parameters for the site model, and these initial adapter parameters are updated during subsequent training. The self-attention backbone network parameters from the central model parameters are used as the initial self-attention backbone network parameters for the site model, and these initial self-attention backbone network parameters are kept frozen during subsequent training.

[0094] In this embodiment, the parameters of the well-trained central model are directly used as the initial model parameters. By leveraging the knowledge transfer advantages of transfer learning, the model can have basic weather and power generation prediction capabilities without starting from scratch.

[0095] Local continuous meteorological data sequences are collected and integrated with station-specific environmental data. After data cleaning, normalization, and time series alignment, these data are input into a station model initialized with central model parameters. Station meteorological data sequences can be acquired through sensors, satellites, etc.

[0096] The site model reuses the global time series patterns and feature associations learned from the central model, combines them with the personalized features of local data, and quickly completes inference calculations. Finally, it synchronously outputs the site's meteorological forecast data for a specific time period in the future, as well as the power generation forecast data for that time period.

[0097] S330. Calculate the prediction regression loss based on the station's meteorological forecast data, the station's power generation forecast data, the actual meteorological data corresponding to the station's meteorological forecast data, and the actual power generation data corresponding to the station's power generation forecast data.

[0098] Align the meteorological forecast data of the sites with the corresponding actual meteorological data, and the power generation forecast data with the corresponding actual power generation data, and complete the time series calibration and numerical standardization preprocessing.

[0099] The mean square error or mean absolute error function is used to calculate the meteorological forecast bias loss and the power forecast bias loss respectively; finally, the two types of losses are fused by weighting coefficients to obtain the forecast regression loss.

[0100] S340. Construct original and enhanced views of station meteorological data sequences and station environmental data. Calculate contrastive learning loss based on the original and enhanced views. The contrastive learning loss is used to align the feature space of the stations.

[0101] This application first constructs original views of station meteorological data sequences and environmental data, preserving the original time series and feature distribution of the data; then, it generates enhanced views through physically compliant enhancement operations such as time-domain shifting, amplitude scaling, and Gaussian noise addition. Based on the encoder, normalized feature vectors of the two types of views are extracted, and the InfoNCE loss function is used to calculate the contrastive learning loss. By narrowing the feature distance between different views of the same station and widening the feature distance between views of different stations, alignment of the feature spaces of each station is achieved.

[0102] S350. The weighted sum of the predicted regression loss and the contrastive learning loss is used as the total loss function value. The self-attention backbone network parameters of the site model remain unchanged. Gradient update training is performed only on the parameters of the adapter layer until the total loss function value is less than the preset threshold. The site adapter parameters are obtained and uploaded to the central server.

[0103] Calculate the weighted sum of the predictive regression loss and the contrastive learning loss; based on the weighted sum, keep the backbone layer parameters unchanged, and only update the gradient of the adapter layer parameters until the total loss function value is less than a preset threshold, and obtain the site adapter parameters.

[0104] In one optional implementation, uploading the site adapter parameters to the central server can be achieved by performing mask encryption and differential privacy noise addition on the data using a lightweight mask security aggregation protocol to generate a random mask, which is then superimposed on the site adapter parameters to obtain mask-encrypted site adapter parameters. The mask-encrypted site adapter parameters are then uploaded to the central server, and the privacy loss from this upload is calculated. The cumulative privacy loss is calculated based on the privacy loss from at least one parameter upload process co-trained with the central server. The mask encryption process ensures that when the central server performs spatial manifold aggregation on all site adapter parameters, the random mask automatically cancels out, thus completing the spatial manifold aggregation without being able to parse the parameters of a single site.

[0105] The Lightweight Mask Security Aggregation Protocol (LightSecAgg) is used to generate a random mask and overlay it onto the updated adapter parameters. The masked and encrypted parameters are then uploaded to the central server, so that the server can only obtain the aggregation result and cannot parse individual site parameters.

[0106] The technical solution of this embodiment involves obtaining the central model parameters of the central model on the central server, where the central model is used for weather forecasting and power generation forecasting; constructing a site model, initializing the site model according to the central model parameters, and inputting the site meteorological data sequence and site environmental data into the site model to obtain site meteorological forecast data and site power generation forecast data. The site model has the same structure as the central model, with the self-attention backbone network of the site model in a frozen state and the adapter layer of the site model in a trainable state; calculating the prediction regression loss based on the site meteorological forecast data, site power generation forecast data, and the corresponding real meteorological data; constructing the original view and the enhanced view of the site meteorological data sequence and site environmental data, and calculating the contrastive learning loss based on the original view and the enhanced view, which is used to align the feature space of the site; using the weighted sum of the prediction regression loss and the contrastive learning loss as the total loss function value, keeping the self-attention backbone network parameters of the site model unchanged, and only performing gradient update training on the parameters of the adapter layer until the total loss function value is less than a preset threshold to obtain the site adapter parameters, which are then uploaded to the central server. The technical solution of this invention solves the problem of isolated data in distributed photovoltaic power generation prediction. It initializes the site model using central model parameters, freezes the backbone network, trains only the adapter layer, and optimizes the model by combining predictive regression loss and contrastive learning loss. This retains the global feature extraction capability of the central model while adapting to the personalized needs of each site, improving power prediction accuracy, reducing communication and computation costs, and effectively solving the problem of non-independent and identically distributed systems.

[0107] Figure 4 This is a flowchart illustrating a distributed photovoltaic (PV) power prediction model training method provided in this embodiment of the invention. This embodiment belongs to the same inventive concept as the distributed PV power prediction model training methods described above, and further describes the process of incremental training based on global adapter parameters. This method can be executed by a distributed PV power prediction model training device, which can be implemented in software and / or hardware, integrated into an electronic device with application development capabilities, and applied to distributed PV sites.

[0108] like Figure 4 As shown, the training method for the distributed photovoltaic power generation prediction model in this embodiment includes the following steps:

[0109] S410. Obtain the central model parameters of the central model from the central server.

[0110] The central model is used for weather forecasting and power generation forecasting.

[0111] S420. Construct a site model. Initialize the site model according to the parameters of the central model, and input the site meteorological data sequence and site environmental data into the site model to obtain the site meteorological forecast data and the site power generation forecast data.

[0112] The site model has the same structure as the central model. The self-attention backbone network of the site model is in a frozen state, while the adapter layer of the site model is in a trainable state.

[0113] S430. Calculate the prediction regression loss based on the station's meteorological forecast data, the station's power generation forecast data, the actual meteorological data corresponding to the station's meteorological forecast data, and the actual power generation data corresponding to the station's power generation forecast data.

[0114] S440. Construct original and enhanced views of station meteorological data sequences and station environmental data. Calculate contrastive learning loss based on the original and enhanced views. The contrastive learning loss is used to align the feature space of the stations.

[0115] S450. The weighted sum of the predicted regression loss and the contrastive learning loss is used as the total loss function value. The self-attention backbone network parameters of the site model remain unchanged. Gradient update training is performed only on the parameters of the adapter layer until the total loss function value is less than the preset threshold. The site adapter parameters are obtained and uploaded to the central server.

[0116] S460 receives global adapter parameters from the central server.

[0117] The global adapter parameters are obtained by the central server through spatial manifold aggregation based on graph convolutional networks, using the site adapter parameters of at least one distributed photovoltaic site.

[0118] S470. Replace the site adapter parameters of the site model with global adapter parameters. Perform incremental training on the site model after parameter replacement based on the site meteorological forecast data and the site power generation forecast data to update the site adapter parameters in the site model, and obtain the site model after incremental update. The number of adapter layer parameters of the site model is less than the number of parameters of the self-attention backbone network.

[0119] The system receives global adapter parameters to incrementally train the local site model based on these global parameters, resulting in a global model. The received global adapter parameters then completely replace the corresponding parameters in the original site model, achieving synchronization and alignment between the site model and the global training results. Subsequently, incremental training is conducted based on real-time meteorological forecast data, power generation forecast data, and site environmental data collected at the site.

[0120] The core objective of incremental training is to update the incremental update parameters in the site model. These parameters are the low-rank decomposition matrix parameters of the low-rank adapter, excluding the original weight parameters of the self-attention layer and fully connected layer of the backbone network. Through incremental training, the resulting incrementally updated site model retains the generality advantages of the global model while possessing personalized adaptability to local scenarios, providing reliable model support for subsequent accurate power generation prediction and optimized equipment scheduling.

[0121] After obtaining the incrementally updated site model, real-time meteorological data and site environmental data are input into the model, and short-term photovoltaic power generation prediction values ​​are output. The root mean square error between the predicted value and the actual power generation output is calculated as the prediction deviation index. If the prediction deviation exceeds the optimization threshold, the learning rate of the transfer learning is adjusted or the number of local incremental training rounds is increased, and the parameters are re-fused to improve the robustness of the model.

[0122] The technical solution of this embodiment involves obtaining the central model parameters of the central model on a central server; wherein the central model is used for weather forecasting and power generation forecasting; constructing a site model, initializing the site model according to the central model parameters, and inputting the site meteorological data sequence and site environmental data into the site model to obtain site meteorological forecast data and site power generation forecast data; the site model has the same structure as the central model, the self-attention backbone network of the site model is in a frozen state, and the adapter layer of the site model is in a trainable state; calculating the prediction regression loss based on the site meteorological forecast data, the site power generation forecast data, the actual meteorological data corresponding to the site meteorological forecast data, and the actual power generation data corresponding to the site power generation forecast data; constructing the original view and the enhanced view of the site meteorological data sequence and the site environmental data, calculating the contrastive learning loss based on the original view and the enhanced view, the contrastive learning loss being used to align the feature space of the site; using the weighted sum of the prediction regression loss and the contrastive learning loss as the total loss function value, keeping the self-attention backbone network parameters of the site model unchanged, and only performing gradient update training on the parameters of the adapter layer until the total loss function value is less than a preset threshold to obtain the site adapter parameters, and uploading the site adapter parameters to the central server. The system receives global adapter parameters from a central server. These global adapter parameters are obtained by the central server through spatial manifold aggregation based on graph convolutional networks, using the site adapter parameters from at least one distributed photovoltaic (PV) site. The site adapter parameters of the site models are replaced with these global adapter parameters. Incremental training is then performed on the site models based on site meteorological forecast data and site power generation forecast data to update the site adapter parameters, resulting in an incrementally updated site model. The number of adapter layer parameters in the site model is less than the number of parameters in the self-attention backbone network. This invention solves the problem of isolated distributed PV power generation forecast data. It can receive global adapter parameters from a central server and replace the site adapter parameters, and incrementally train and update the adapter parameters based on site forecast data. Utilizing the characteristic that the number of adapter parameters is much smaller than that of the backbone network, it efficiently adapts to the personalized needs of each site while preserving global features, reducing computational and communication costs, and improving the accuracy and generalization ability of PV power forecasting.

[0123] Figure 5 This is a flowchart illustrating a data processing method provided in an embodiment of the present invention. This embodiment is applicable to various data processing scenarios. The method can be executed by a data processing device, which can be implemented in software and / or hardware, integrated into an electronic device, and applied to distributed photovoltaic sites.

[0124] like Figure 5 As shown, the data processing method includes the following steps:

[0125] S510. Obtain the meteorological data sequence of the station and input the meteorological data sequence of the station into the station model trained by the distributed photovoltaic power generation prediction model training method provided in any embodiment of the distributed photovoltaic power generation prediction model training method for distributed photovoltaic stations provided by the present invention, so as to obtain the station meteorological prediction data and the station power generation prediction data.

[0126] First, a complete meteorological data sequence for the site needs to be continuously collected and processed by sensors and other equipment deployed at the site. This sequence covers multi-dimensional time-series data such as irradiance, ambient temperature, wind speed, and cloud cover. The data also needs to undergo data cleaning, outlier removal, and standardization to ensure the continuity and validity of the data.

[0127] Subsequently, the preprocessed meteorological data sequence of the stations is input into the station model trained by the distributed photovoltaic power generation prediction model training method embodiment of any distributed photovoltaic station of the present invention. This model is an adaptive model based on multi-station data fusion and incremental learning optimization, which has the ability to accurately capture local meteorological characteristics.

[0128] Through feature mapping and computation of the model, two key results are output simultaneously: meteorological forecast data for the site that fits the short-term change trend of the site, and power generation forecast data for the site that is strongly correlated with meteorological conditions. This provides real-time and reliable decision-making basis for the power scheduling and equipment operation and maintenance of the photovoltaic power plant.

[0129] The technical solution of this embodiment obtains meteorological data sequences from power stations and inputs these sequences into a station model trained using a distributed photovoltaic power generation prediction model training method provided in any embodiment of this invention, thereby obtaining station meteorological prediction data and station power generation prediction data. This technical solution solves the problem of insufficient accuracy in current power generation prediction, improves prediction accuracy, and provides data support for grid dispatch.

[0130] Figure 6 This is a schematic diagram of the structure of a distributed photovoltaic power generation prediction model training device provided in an embodiment of the present invention. This embodiment is applicable to model training scenarios. The device can be implemented by software and / or hardware, integrated into an electronic device, and applied to a central server.

[0131] like Figure 6 As shown, the distributed photovoltaic power generation prediction model training device includes: a data acquisition module 610, a model training module 620, and a parameter distribution module 630.

[0132] The system includes a data acquisition module 610 for acquiring sample data, which includes historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations. A model training module 620 is used to train a central model using the sample data. The central model predicts the second meteorological data for the second time period based on the first meteorological data for the first time period, and then predicts the power generation data for the second time period based on the second meteorological data and the station environmental data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. A parameter distribution module 630 distributes the central model parameters of the trained central model to at least one distributed photovoltaic (PV) station, enabling the distributed PV station to incrementally train its station model based on the central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable.

[0133] The technical solution of this embodiment acquires sample data, including historical meteorological data sequences, historical environmental data, and historical power generation data sequences from various stations. A central model is trained using this sample data. This central model predicts the second meteorological data for a second time period based on the first meteorological data for a first time period, and then predicts the power generation data for the second time period based on the second meteorological data and the station environmental data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The central model parameters are then distributed to at least one distributed photovoltaic (PV) station, enabling the distributed PV stations to incrementally train their own models based on these parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During incremental training, the self-attention backbone network parameters are frozen, while the adapter parameters are updatable. This technical solution solves the problem of isolated data in distributed PV power generation prediction. By freezing backbone parameters and using incremental adapter training strategies, it significantly improves the collaborative prediction accuracy of PV clusters while reducing communication and computational overhead.

[0134] In one alternative embodiment, the apparatus further includes:

[0135] The global adapter parameter determination module is used to obtain the site adapter parameters of at least one distributed photovoltaic (PV) site. These site adapter parameters are obtained by training the site model using site sample data through an incremental learning mechanism. The site adapter parameters are in the form of encrypted feature embedding vectors. Without obtaining the geographical coordinates of the distributed PV sites, the module calculates the feature similarity of the site adapter parameters and constructs an implicit dynamic adjacency matrix based on the feature similarity. This implicit dynamic adjacency matrix is ​​used to characterize the correlation of power fluctuations between sites. A graph convolutional network is then used to perform spatial manifold aggregation on the site adapter parameters based on the implicit dynamic adjacency matrix to obtain global adapter parameters containing spatiotemporal coordination information. These global adapter parameters are then transferred to the distributed PV sites so that the distributed PV sites can perform incremental training based on the global adapter parameters.

[0136] The distributed photovoltaic power generation prediction model training device provided in this embodiment of the invention can execute the distributed photovoltaic power generation prediction model training method applied to a central server provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0137] Figure 7 This is a schematic diagram of the structure of a distributed photovoltaic power generation prediction model training device provided in an embodiment of the present invention. This embodiment is applicable to model training scenarios. The device can be implemented by software and / or hardware, integrated into an electronic device, and applied to distributed photovoltaic sites.

[0138] like Figure 7 As shown, the distributed photovoltaic power generation prediction model training device includes: a central model parameter acquisition module 710, a prediction data determination module 720, a regression loss calculation module 730, a comparison loss calculation module 740, and a site adapter parameter determination module 750.

[0139] The central model parameter acquisition module 710 is used to acquire the central model parameters of the central model on the central server. The central model is used for meteorological forecasting and power generation forecasting. The prediction data determination module 720 is used to construct the site model. It initializes the site model based on the central model parameters and inputs the site meteorological data sequence and site environmental data into the site model to obtain the site meteorological forecast data and site power generation forecast data. The site model has the same structure as the central model, with its self-attention backbone network in a frozen state and its adapter layer in a trainable state. The regression loss calculation module 730 is used to calculate the regression loss based on the site meteorological forecast data and site power generation forecast data, and the corresponding... The prediction regression loss is calculated based on the actual meteorological data and the actual power generation data corresponding to the predicted power generation data of the station. The contrast loss calculation module 740 is used to construct the original view and the enhanced view of the station meteorological data sequence and the station environmental data. The contrast learning loss is calculated based on the original view and the enhanced view. The contrast learning loss is used to align the feature space of the station. The station adapter parameter determination module 750 is used to take the weighted sum of the prediction regression loss and the contrast learning loss as the total loss function value. Keeping the self-attention backbone network parameters of the station model unchanged, only the parameters of the adapter layer are updated and trained with gradients until the total loss function value is less than the preset threshold. The station adapter parameters are obtained and uploaded to the central server.

[0140] The technical solution of this embodiment involves obtaining the central model parameters of the central model on the central server, where the central model is used for weather forecasting and power generation forecasting; constructing a site model, initializing the site model according to the central model parameters, and inputting the site meteorological data sequence and site environmental data into the site model to obtain site meteorological forecast data and site power generation forecast data. The site model has the same structure as the central model, with the self-attention backbone network of the site model in a frozen state and the adapter layer of the site model in a trainable state; calculating the prediction regression loss based on the site meteorological forecast data, site power generation forecast data, and the corresponding real meteorological data; constructing the original view and the enhanced view of the site meteorological data sequence and site environmental data, and calculating the contrastive learning loss based on the original view and the enhanced view, which is used to align the feature space of the site; using the weighted sum of the prediction regression loss and the contrastive learning loss as the total loss function value, keeping the self-attention backbone network parameters of the site model unchanged, and only performing gradient update training on the parameters of the adapter layer until the total loss function value is less than a preset threshold to obtain the site adapter parameters, which are then uploaded to the central server. The technical solution of this invention solves the problem of isolated data in distributed photovoltaic power generation prediction. It initializes the site model using central model parameters, freezes the backbone network, trains only the adapter layer, and optimizes the model by combining predictive regression loss and contrastive learning loss. This retains the global feature extraction capability of the central model while adapting to the personalized needs of each site, improving power prediction accuracy, reducing communication and computation costs, and effectively solving the problem of non-independent and identically distributed systems.

[0141] In an optional implementation, the site adapter parameter determination module 750 is further configured to:

[0142] A lightweight mask-secure aggregation protocol is used to perform mask encryption and differential privacy noise addition on the data to generate a random mask, which is then superimposed on the site adapter parameters to obtain mask-encrypted site adapter parameters. The mask-encrypted site adapter parameters are then uploaded to a central server, and the privacy loss of this upload is calculated. The cumulative privacy loss is calculated based on the privacy loss of at least one parameter upload process co-trained with the central server. The mask encryption process is used to ensure that the random mask can be automatically canceled when the central server performs spatial manifold aggregation on all site adapter parameters, thereby completing the spatial manifold aggregation without being able to parse the parameters of individual sites.

[0143] In one alternative embodiment, the apparatus further includes:

[0144] The incremental training module receives global adapter parameters from the central server. These global adapter parameters are obtained by the central server through spatial manifold aggregation based on graph convolutional networks, using the site adapter parameters of at least one distributed photovoltaic site. The module replaces the site adapter parameters of the site model with the global adapter parameters and performs incremental training on the site model with the replaced parameters based on the site's meteorological forecast data and power generation forecast data. This updates the site adapter parameters in the site model, resulting in an incrementally updated site model. The number of adapter layer parameters in the site model is less than the number of parameters in the self-attention backbone network.

[0145] The distributed photovoltaic power generation prediction model training device provided in this embodiment of the invention can execute the distributed photovoltaic power generation prediction model training method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0146] Figure 8 This is a schematic diagram of the data processing device provided in an embodiment of the present invention. This embodiment is applicable to data processing scenarios. The device can be implemented by software and / or hardware, integrated into an electronic device, and applied to distributed photovoltaic sites.

[0147] like Figure 8 As shown, the data processing device includes: a data processing module 810.

[0148] The data processing module 810 is used to acquire the meteorological data sequence of the station and input the meteorological data sequence of the station into the station model trained by the distributed photovoltaic power generation prediction model training method provided in any embodiment of the distributed photovoltaic power generation prediction model training method applied to distributed photovoltaic stations, so as to obtain the station meteorological prediction data and the station power generation prediction data.

[0149] The technical solution of this embodiment obtains meteorological data sequences from power stations and inputs these sequences into a station model trained using a distributed photovoltaic power generation prediction model training method provided in any embodiment of this invention, thereby obtaining station meteorological prediction data and station power generation prediction data. This technical solution solves the problem of insufficient accuracy in current power generation prediction, improves prediction accuracy, and provides data support for grid dispatch.

[0150] The data processing apparatus provided in the embodiments of the present invention can execute the data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0151] Figure 9A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0152] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0153] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0154] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as distributed photovoltaic power generation prediction model training methods or data processing methods.

[0155] In some embodiments, the distributed photovoltaic power generation prediction model training method or data processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the distributed photovoltaic power generation prediction model training method or data processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the distributed photovoltaic power generation prediction model training method or data processing method by any other suitable means (e.g., by means of firmware).

[0156] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0157] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0158] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0159] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0160] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0161] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0162] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0163] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the distributed photovoltaic power generation prediction model training method or data processing method provided in any embodiment of this application.

[0164] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0165] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0166] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A training method for a distributed photovoltaic power generation prediction model, characterized in that, Applications to central servers include: Acquire sample data, which includes historical meteorological data sequences, historical environmental data, and historical power generation data sequences from historical stations; The central model is trained using the sample data. The central model is used to predict the second meteorological data of the second time period after the first time period based on the first meteorological data of the first time period, and then to predict the power generation data of the second time period based on the second meteorological data and the site environment data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The central model parameters of the trained central model are distributed to at least one distributed photovoltaic site so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During the incremental training process, the self-attention backbone network parameters are in a frozen state, and the adapter parameters are in an updatable state. Obtain site adapter parameters for at least one distributed photovoltaic (PV) site. The site adapter parameters are obtained by training the site model on the site model using site sample data based on the distributed PV site through an incremental learning mechanism. The site adapter parameters are in the form of encrypted feature embedding vectors. Without obtaining the geographical coordinates of the distributed photovoltaic sites, the feature similarity of the site adapter parameters is calculated, and an implicit dynamic adjacency matrix is ​​constructed based on the feature similarity. The implicit dynamic adjacency matrix is ​​used to characterize the correlation of power fluctuations between sites. The site adapter parameters are spatially aggregated using a graph convolutional network based on the implicit dynamic adjacency matrix to obtain global adapter parameters containing spatiotemporal coordination information. These global adapter parameters are then transferred to the distributed photovoltaic site so that the distributed photovoltaic site can perform incremental training based on the global adapter parameters.

2. A training method for a distributed photovoltaic power generation prediction model, characterized in that, Applications include distributed photovoltaic (PV) sites, including: Obtain the central model parameters of the central model from the central server, wherein the central model is used for weather forecasting and power generation forecasting; A site model is constructed, the site model is initialized according to the parameters of the central model, and the site meteorological data sequence and site environmental data are obtained and input into the site model to obtain site meteorological forecast data and site power generation forecast data. The site model has the same structure as the central model. The self-attention backbone network of the site model is in a frozen state, and the adapter layer of the site model is in a trainable state. The prediction regression loss is calculated based on the meteorological forecast data of the stations, the power generation forecast data of the stations, the actual meteorological data corresponding to the meteorological forecast data of the stations, and the actual power generation data corresponding to the power generation forecast data of the stations. Construct a raw view and an enhanced view of the station meteorological data sequence and the station environmental data, and calculate a contrastive learning loss based on the raw view and the enhanced view. The contrastive learning loss is used to align the feature space of the station. The weighted sum of the predicted regression loss and the contrastive learning loss is used as the total loss function value. The self-attention backbone network parameters of the site model are kept unchanged. Gradient update training is performed only on the parameters of the adapter layer until the total loss function value is less than a preset threshold to obtain the site adapter parameters. The site adapter parameters are then uploaded to the central server.

3. The method according to claim 2, characterized in that, Uploading the site adapter parameters to the central server includes: The data is masked and encrypted using a lightweight mask security aggregation protocol, and differential privacy noise is added to generate a random mask, which is then superimposed on the site adapter parameters to obtain mask-encrypted site adapter parameters. The masked encrypted site adapter parameters are uploaded to the central server, and the privacy loss of this upload is calculated. The cumulative privacy loss is calculated based on the privacy loss of at least one parameter upload process co-trained with the central server. The mask encryption process is used to enable the central server to automatically cancel out the random mask when performing spatial manifold aggregation on all the site adapter parameters, thereby completing the spatial manifold aggregation without being able to parse the parameters of a single site.

4. The method according to claim 2, characterized in that, The method further includes: The central server receives global adapter parameters, which are obtained by the central server through spatial manifold aggregation based on graph convolutional networks, based on the site adapter parameters of at least one distributed photovoltaic site. The site adapter parameters of the site model are replaced with the global adapter parameters. The site model with replaced parameters is incrementally trained based on the site meteorological forecast data and the site power generation forecast data to update the site adapter parameters in the site model, resulting in an incrementally updated site model. The number of adapter layer parameters of the site model is less than the number of parameters of the self-attention backbone network.

5. A data processing method, characterized in that, Applications include distributed photovoltaic (PV) sites, including: Obtain the meteorological data sequence of the station, and input the meteorological data sequence of the station into the station model trained by the distributed photovoltaic power generation prediction model training method as described in any one of claims 2-4, to obtain the station meteorological prediction data and the station power generation prediction data.

6. A training device for a distributed photovoltaic power generation prediction model, characterized in that, Applications to central servers include: The data acquisition module is used to acquire sample data, which includes historical station meteorological data sequences, historical station environmental data, and historical station power generation data sequences. The model training module is used to train a central model using the sample data. The central model is used to predict the second meteorological data of the second time period after the first time period based on the first meteorological data of the first time period, and then predict the power generation data of the second time period based on the second meteorological data and the site environment data. The central model includes a pre-trained self-attention backbone network, a spatiotemporal graph neural network, and an adapter. The parameter distribution module is used to distribute the central model parameters of the trained central model to at least one distributed photovoltaic site, so that the distributed photovoltaic site can incrementally train the site model based on the central model parameters. The central model parameters include self-attention backbone network parameters and adapter parameters. During the incremental training process, the self-attention backbone network parameters are in a frozen state, and the adapter parameters are in an updatable state. The global adapter parameter determination module is used to obtain the site adapter parameters of at least one distributed photovoltaic site. The site adapter parameters are obtained by training the site model on the site model based on the site sample data through the incremental learning mechanism of the distributed photovoltaic site. The site adapter parameters are in the form of encrypted feature embedding vectors. Without obtaining the geographical coordinates of the distributed photovoltaic sites, the feature similarity of the site adapter parameters is calculated, and an implicit dynamic adjacency matrix is ​​constructed based on the feature similarity. The implicit dynamic adjacency matrix is ​​used to characterize the correlation of power fluctuations between sites. The site adapter parameters are spatially aggregated using a graph convolutional network based on the implicit dynamic adjacency matrix to obtain global adapter parameters containing spatiotemporal coordination information. These global adapter parameters are then transferred to the distributed photovoltaic site so that the distributed photovoltaic site can perform incremental training based on the global adapter parameters.

7. An electronic device, characterized in that, The device includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the distributed photovoltaic power generation prediction model training method of any one of claims 1-4, or to implement the data processing method of claim 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the distributed photovoltaic power generation prediction model training method according to any one of claims 1-4, or the data processing method according to claim 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the distributed photovoltaic power generation prediction model training method as described in any one of claims 1-4, or the data processing method as described in claim 5.

Citation Information

Patent Citations

  • Distributed photovoltaic short-term power prediction method, system, medium and equipment

    CN121076758A