Spatial-temporal data prediction method and system for heterogeneous photovoltaic diagram structure data fusion

By using global models based on TCN, GCN and GRU in photovoltaic power generation prediction, combined with federated learning methods, the problem of graphical structured data integration processing is solved, and unified and high-accuracy prediction of photovoltaic power generation is achieved.

CN119482409APending Publication Date: 2025-02-18INFORMATION COMM COMPANY STATE GRID SHANDONG ELECTRIC POWER
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411609987.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing federal learning strategies are unable to effectively integrate and process graphical structured data, resulting in the inability to achieve unified prediction of photovoltaic power generation.

Method used

Using a global model based on TCN, GCN and GRU, pre-trained models are distributed through a central server, allowing each client to train locally and generate local updates. The central server collects and aggregates these updates to update the global model.

Benefits of technology

On the premise of ensuring data privacy, more accurate and comprehensive prediction of photovoltaic power generation is achieved, improving the comprehensiveness and accuracy of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119482409A_ABST
    Figure CN119482409A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing. The invention provides a spatio-temporal data prediction method and system for heterogeneous photovoltaic diagram structure data fusion, and the method comprises the steps: a current client obtains a photovoltaic power generation prediction result of the current client at each moment in the future after a current moment based on the historical photovoltaic power generation data of the current client and a trained global model; the global model training process comprises the steps that the central server distributes a global model pre-trained according to a photovoltaic generating capacity data set to all clients, and each client trains the global model through independent local graph data to perform local updating; each client uploads a local update result to a central server for aggregation, and the central server trains a GCN part of a global model according to an aggregation result and distributes the trained global model to each client for use; on the premise of ensuring data privacy of each client, updating and training of a global model are realized, and prediction comprehensiveness is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a spatiotemporal data prediction method and system for heterogeneous photovoltaic image structure data fusion. Background Art

[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.

[0003] In the collaborative decision-making process, different stakeholders may have their own data resources and expertise, but due to concerns about data privacy and security, it is often difficult to achieve effective data sharing and integration. The federated learning model provides a new approach to collaborative decision-making by sharing and integrating knowledge without exposing a single data source; it allows all parties to process data locally and only share encrypted model parameters or gradients, thereby avoiding the direct transmission of sensitive data, which not only protects data privacy, but also promotes information sharing and collaborative optimization in the decision-making process.

[0004] Trust is the basis of collaboration, but in the process of data sharing and integration, the existence of risks such as data leakage and abuse often leads to a lack of trust between the parties. The federated learning model distributes data processing and model training tasks to various participants through a decentralized learning method, reducing the risk of centralized data storage and management. At the same time, since the sharing of model parameters or gradients is carried out in an encrypted state, the security of the data is further enhanced, which helps to establish and maintain a trust relationship between the parties.

[0005] Data silos refer to the phenomenon that different organizations or departments have difficulty in sharing and communicating data due to differences in data format, storage method, access rights, etc. The federated learning model breaks the limitations of data silos through cross-organizational and cross-device data collaboration. It allows different participants to realize data value mining and knowledge sharing through joint training models without changing the original data storage and management methods. This not only improves the utilization rate of data, but also promotes knowledge transfer and collaborative innovation between different organizations.

[0006] However, in the field of data processing, graph structured data often contains rich information and complex associations, which is of great significance for in-depth understanding of the collaborative relationship between enterprises and predicting market trends. Although significant progress has been made in the processing of structured data (such as GPS sensors, EMS system data, etc.), the existing federated learning strategies cannot effectively integrate and process graph structured data (such as some graph data in the photovoltaic field), and thus cannot effectively enable various enterprises to adopt unified standards for predicting photovoltaic power generation. Summary of the invention

[0007] In order to address the shortcomings of the prior art, the present invention provides a spatiotemporal data prediction method and system for heterogeneous photovoltaic graph structure data fusion. Each client uses its local photovoltaic graph data to train the received global model. After several rounds of local training, each client generates a local update of the model. Once the local update is generated, the client sends these updates back to the central server. The central server collects the local updates of all clients and uses an aggregation algorithm to integrate these updates and update the global model. The global model is updated and trained while ensuring the privacy of each client's data, which greatly improves the comprehensiveness of the prediction.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion.

[0010] A spatiotemporal data prediction method for heterogeneous photovoltaic graph structure data fusion is applied to a central server and multiple clients respectively connected to the central server for communication, including the following processes:

[0011] For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained;

[0012] Among them, the training process of the global model based on TCN, GCN and GRU includes:

[0013] The central server distributes the global model pre-trained according to the photovoltaic power generation data set to all clients, and each client trains the global model through separate local graph data to perform local updates;

[0014] Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

[0015] As a further limitation of the first aspect of the present invention, the global model based on TCN, GCN and GRU includes: using TCN to extract features from time series data to obtain time features, using GCN to extract features from graph structure data to obtain spatial features, fusing the time features and spatial features to obtain fused features, and using GRU to further process the fused features to capture cyclic dependencies in the time series.

[0016] As a further limitation of the first aspect of the present invention, the central server selects business entities with similar goals as clients, and trains the global model using local data sets of the selected clients.

[0017] As a further limitation of the first aspect of the present invention, each client trains the global model through separate local graph data to perform local updates, including:

[0018] Each client uses its local graph data to train the received global model. Each client generates a local update of the global model. The local update is the adjustment of the global model parameters by the client based on the local data. The local update is expressed as: Where: Δθ ci is the local update generated by the ith client, is the training result of the i-th client at time t+1, is the local update at time t generated by the i-th client.

[0019] As a further limitation of the first aspect of the present invention, each client uploads the local update result to the central server for aggregation, including:

[0020] The central server collects local updates from all clients and uses an aggregation algorithm to integrate these updates and update the global model. The aggregation process includes: in: is the global model parameter of the current round, n is the total number of participating clients, are the global model parameters after aggregating local updates.

[0021] As a further limitation of the first aspect of the present invention, after each client receives the global GCN model, it uses its local data to calculate the local feature representation The client calculates the local feature representation Upload back to the central server.

[0022] As a further limitation of the first aspect of the present invention, the central server receives all the uploaded After that, feature aggregation is performed: in: is the feature representation after aggregation, ω i is the weight of the i-th client, n is the total number of participating clients, and the server uses the aggregated feature representation and adjacency matrix A to continue training or fine-tuning the GCN model.

[0023] As a further limitation of the first aspect of the present invention, the central server uses the aggregated feature representation And the adjacency matrix A to calculate h through GCN: Where: h is the output of GCN, representing the embedding or feature of the node, θ GCN is the parameter of the GCN layer. The central server sends the calculated h to all clients so that each client can use h for further local training or calculation.

[0024] In a second aspect, the present invention provides a spatiotemporal data prediction system for heterogeneous photovoltaic image structure data fusion.

[0025] A spatiotemporal data prediction system for heterogeneous photovoltaic graph structure data fusion, comprising a central server and a plurality of clients respectively connected to the central server in communication;

[0026] For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained;

[0027] Among them, the training process of the global model based on TCN, GCN and GRU includes:

[0028] The central server distributes the global model pre-trained according to the photovoltaic power generation data set to all clients, and each client trains the global model through separate local graph data to perform local updates;

[0029] Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

[0030] As a further limitation of the second aspect of the present invention, each client uses its local graph data to train the received global model, and each client generates a local update of the global model, where the local update is an adjustment of the global model parameters by the client based on the local data, and the local update is expressed as: Where: Δθ ci is the local update generated by the ith client, is the training result of the i-th client at time t+1, is the local update at time t generated by the i-th client.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] The present invention innovatively uses a spatiotemporal data prediction method for heterogeneous photovoltaic graph structure data fusion. Each client uses its local photovoltaic graph data to train the received global model. After several rounds of local training, each client generates a local update of the model. Once the local updates are generated, the clients send these updates back to the central server. The central server collects the local updates of all clients and uses an aggregation algorithm to integrate these updates and update the global model. This achieves the update and training of the global model while ensuring the privacy of each client's data, greatly improving the comprehensiveness of the prediction.

[0033] The present invention uses TCN to extract features from time series data to obtain time features, uses GCN to extract features from graph structure data to obtain spatial features, fuses the time features and spatial features to obtain fused features, and uses GRU to further process the fused features to capture the cyclic dependencies in the time series. The global model can simultaneously consider spatial and temporal characteristics, providing a more accurate solution for the prediction of power generation.

[0034] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0036] Figure 1 A schematic diagram of a spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion provided in Example 1 of the present invention;

[0037] Figure 2 A schematic diagram of a spatiotemporal data prediction system for heterogeneous photovoltaic image structure data fusion provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0039] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0040] Embodiment 1:

[0041] This implementation proposes a spatiotemporal data prediction method for heterogeneous photovoltaic graph structure data fusion, which is applied to a central server and multiple clients respectively connected to the central server for communication, including the following processes:

[0042] For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained.

[0043] In this implementation, the global model based on TCN (Temporal Convolutional Network), GCN (Graph Convolutional Network) and GRU (Gated Recurrent Unit) is an advanced model that combines time series analysis, graph structure data processing and recurrent neural network characteristics.

[0044] TCN: used to capture local and global patterns in time series. Through convolution operations, TCN can slide in the time dimension and capture local patterns of different lengths. In addition, TCN also enhances model performance through residual connections, dilated convolutions and other techniques, especially in capturing long-term dependencies. GCN is used to process graph structure data and updates the representation of central nodes through the features of neighboring nodes. GCN can capture the relationship between nodes and global graph structure information, thereby improving the representation ability of node features. It is suitable for various types of graph data, such as social networks, recommendation systems, bioinformatics and other fields. GRU, as a variant of recurrent neural network, can effectively capture semantic associations between long sequences and alleviate the phenomenon of gradient disappearance or explosion. The core structure of GRU includes update gate and reset gate. Through these two gated units, GRU can selectively retain or forget past information. Compared with LSTM, GRU has a simpler structure and fewer parameters, so it is relatively easy to train and has less overfitting problems.

[0045] In this implementation, the training process of the global model based on TCN, GCN and GRU includes:

[0046] The central server sends the global model pre-trained according to the photovoltaic power generation data set (i.e., the initialized model) to all clients, and each client trains the global model through separate local graph data for local update;

[0047] Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

[0048] In this implementation, the central server uses federated learning to initialize the global model by using the photovoltaic power generation prediction dataset, and the central server distributes the initialized global model to all existing clients (i.e., the selected clients);

[0049] Each client first prepares its photovoltaic time series data X = {X 1 ,X 2 ,X 3 ,...X t}, these data can be photovoltaic power generation and meteorological data related to the photovoltaic field (mainly historical data, which can be used for subsequent photovoltaic power generation prediction). The photovoltaic time series data X is input into TCN. TCN is designed to process variable-length inputs and can therefore adapt to time series of different lengths.

[0050] In this implementation, TCN uses causal convolution to ensure that the output at time t is only affected by the data at the previous time point, satisfying the causal relationship in time series analysis. TCN uses dilated convolution to increase the receptive field while avoiding building an extremely deep network structure, which helps capture long-term dependencies. By stacking multiple dilated convolution layers or adjusting the filter size, TCN can extract features at different time scales. The TCN module contains multiple time convolution blocks, each of which consists of a 2D convolutional network, which is used to process historical photovoltaic power generation and meteorological data and generate intermediate results. The TCN module outputs the converted features. Among them, θ TCN are the parameters of the TCN module.

[0051] GCN is used to process the spatial features of graph structured data. The core idea of ​​GCN is to transmit information between nodes through the graph structure, so that each node can not only learn its own features, but also learn the features of its neighboring nodes. GCN performs hierarchical transmission through the adjacency matrix and the node feature matrix, and provides spatial context information for time series analysis by learning the global structure of the graph. The output of GCN and the output of TCN are used as the input of GRU together to achieve more comprehensive spatiotemporal data analysis.

[0052] In each client, GRU receives the output features from the TCN module and the GCN module. These features already contain the temporal dependencies of the time series data. The GRU unit contains the update gate z t and reset gate rt , controlling the hidden state h t Updated by: z t =σ(Z t ), r t =σ(R t ), where Z t and R t is the gated input from the current input and the previous hidden state, σ is the activation function; update the hidden state, combining the update gate and the reset gate:

[0053] h t =(1-z t )⊙h t-1 +z t ⊙h t , where W h and b h

[0054] is the model parameter, ⊙ represents element multiplication; GRU can process sequence data and gradually learn the dynamic features in the sequence through its cyclic structure.

[0055] After being processed by the GRU unit, the generated hidden state output is used as the intermediate feature representation h t , use the hidden state generated by GRU to calculate the loss function value, such as mean squared error (MSE): where y i is the true value, is the predicted value, which will be used for back propagation and parameter update of the model. The client uploads the calculated loss value to the central server so that the central server can update the global model.

[0056] In this implementation, business entities with similar power generation prediction goals join the platform as clients and use their local datasets to train the received initialized global model.

[0057] Specifically, the central server selects each client by introducing a Markov decision process, and formalizes the client selection problem into a state space, an action space, and a reward function.

[0058] State space: In each training round t, the state vector is introduced to represent: in The state of client K at training round t, including model weight, data volume, number of processor cores, CPU frequency and bandwidth. The PCA technology is used to reduce the dimension of the weight vector to improve efficiency.

[0059] Action space: The server defines an action vector a t, whose length is the number of clients N, and each element Indicates whether to select client K. The server selects a client subset of size U in each training round, and the action selection will be based on the current state and the learned Q value.

[0060] Rewards: To evaluate the client's contribution, the server calculates a reward for each selected client The reward setting takes into account the client's training effect and its impact on the global model, and is mainly evaluated comprehensively through the client's accuracy and latency.

[0061] In this implementation, the central server uses the dual deep Q learning (DDQL) algorithm for training, which includes a main network and a target network. The main network is responsible for the current action selection, while the target network is used to evaluate the Q value of the future state. The central server stores the past state transition information through the experience replay mechanism and regularly updates the target network to reduce the correlation between consecutive experiences. After each training round, the central server updates the target network based on the current state s t The U clients with the highest reward are selected based on the learned Q-values ​​to participate in the next training cycle. The central server balances exploration and exploitation, thereby ensuring that the client selection strategy is continuously optimized during the training process.

[0062] In this implementation, the DDQL agent is trained and evaluated through the main network and the target network, and the experience replay mechanism is used to break the correlation between experiences to minimize the mean square error loss between the target value and the approximate value. Finally, qualified clients are selected to participate in the training.

[0063] In this implementation, after the central server initializes or updates the global model, it distributes the model to all participating clients. This global model contains common knowledge of all clients that can be improved; each client uses its local graph data to train the received global model. This process involves multiple training rounds. In each round, the model is iterated on the local data to minimize the loss function.

[0064] After several rounds of local training, each client generates local updates of the model. These updates are adjustments to the global model parameters based on the client’s local data. Local updates can be expressed as follows: Where: Δθ ci is the local model update generated by the i-th client. Once the local updates are generated, the client sends these updates back to the central server; the central server collects the local updates of all clients and uses an aggregation algorithm (such as federated average FedAvg) to integrate these updates and update the global model.

[0065] The polymerization process can be expressed by the following formula: in: is the global model parameter of the current round, n is the total number of participating clients, are the global model parameters after aggregating local updates;

[0066] Each client uploads local updates to the central server for the aggregation step. The specific steps are as follows: Each client uploads local updates to the central server for the aggregation step. The central server aggregates all local updates using a weighted aggregation algorithm for all local model parameters to generate an updated global model. At the same time, the central server calculates the Shapley value of each client as an individual contribution assessment, which can also determine the individual rewards for participating in the collaboration. The Shapley value of each client can be obtained by calculating the average of all marginal contributions of all possible combinations of participant entities. Therefore, in order to quantify the contribution of each enterprise entity, we use the following equation to evaluate individual contributions: Where C is the merger of different clients, vC is the current merged profit, and C\Ei is the profit without client E i The merger of v(C\E i ) is C\E i The corresponding income.

[0067] In this implementation, the central server trains the GCN part of the global model and distributes this global model to each client. The specific steps are as follows: After the central server receives the local updates uploaded by all clients, it merges these updates into the global model.

[0068] For the GCN part, the central server may perform additional training steps to ensure that the global model can capture the graph structure characteristics of all client data. This process can be described by the following formula: Among them: h is the feature representation after processing by the GCN layer, A is the adjacency matrix of the graph, is the feature matrix that integrates all client information, θ g are the parameters of the global model. The updated global GCN model is distributed to each client. This step is to enable the client to use the latest global model for further local training or calculation. After each client receives the global GCN model, it uses its local data to calculate the local feature representation The client calculates the local feature representation Upload back to the central server to participate in the next step of global model training or aggregation.

[0069] The server receives all the uploaded After that, these feature representations are further aggregated to update the global model. This process can be described by the following formula: in: is the feature representation after aggregation, ω i is the weight of the i-th client, n is the total number of participating clients, and the central server uses the aggregated feature representation and adjacency matrix A to continue training or fine-tuning the GCN model to capture more accurate graph structure features.

[0070] In this implementation, preferably, the client calculates the loss function value and sends the loss value back to the central server for updating the GCN part of the global model, using the output h of the GCN layer and the local true label y i , the client calculates the loss function value. The loss function can be the mean square error (MSE) or other suitable loss function, and the client sends the calculated loss value back to the central server. This step is necessary because the central server needs these loss values ​​to update the GCN part of the global model. The central server collects the loss values ​​of all clients and uses some aggregation method (e.g., average or weighted average) to update the GCN part of the global model.

[0071] Embodiment 2:

[0072] like Figure 2 As shown, this implementation provides a spatiotemporal data prediction system for heterogeneous photovoltaic graph structure data fusion, including a central server and a plurality of clients respectively connected to the central server for communication;

[0073] For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained;

[0074] Among them, the training process of the global model based on TCN, GCN and GRU includes:

[0075] The central server distributes the global model pre-trained according to the photovoltaic power generation data set to all clients, and each client trains the global model through separate local graph data to perform local updates;

[0076] Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

[0077] In this implementation, the global model based on TCN (Temporal Convolutional Network), GCN (Graph Convolutional Network) and GRU (Gated Recurrent Unit) is an advanced model that combines time series analysis, graph structure data processing and recurrent neural network characteristics.

[0078] TCN: used to capture local and global patterns in time series. Through convolution operations, TCN can slide in the time dimension and capture local patterns of different lengths. In addition, TCN also enhances model performance through residual connections, dilated convolutions and other techniques, especially in capturing long-term dependencies. GCN is used to process graph structure data and updates the representation of central nodes through the features of neighboring nodes. GCN can capture the relationship between nodes and global graph structure information, thereby improving the representation ability of node features. It is suitable for various types of graph data, such as social networks, recommendation systems, bioinformatics and other fields. GRU, as a variant of recurrent neural network, can effectively capture semantic associations between long sequences and alleviate the phenomenon of gradient disappearance or explosion. The core structure of GRU includes update gate and reset gate. Through these two gated units, GRU can selectively retain or forget past information. Compared with LSTM, GRU has a simpler structure and fewer parameters, so it is relatively easy to train and has less overfitting problems.

[0079] In this implementation, the training process of the global model based on TCN, GCN and GRU includes:

[0080] The central server sends the global model pre-trained according to the photovoltaic power generation data set (i.e., the initialized model) to all clients, and each client trains the global model through separate local graph data for local update;

[0081] Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

[0082] In this implementation, the central server uses federated learning to initialize the global model by using the photovoltaic power generation prediction dataset, and the central server distributes the initialized global model to all existing clients (i.e., the selected clients);

[0083] Each client first prepares its photovoltaic time series data X = {X 1 ,X 2 ,X 3 ,...Xt}, these data can be photovoltaic power generation and meteorological data related to the photovoltaic field (mainly historical data, which can be used for subsequent photovoltaic power generation prediction). The photovoltaic time series data X is input into TCN. TCN is designed to process variable-length inputs and can therefore adapt to time series of different lengths.

[0084] In this implementation, TCN uses causal convolution to ensure that the output at time t is only affected by the data at the previous time point, satisfying the causal relationship in time series analysis. TCN uses dilated convolution to increase the receptive field while avoiding building an extremely deep network structure, which helps capture long-term dependencies. By stacking multiple dilated convolution layers or adjusting the filter size, TCN can extract features at different time scales. The TCN module contains multiple time convolution blocks, each of which consists of a 2D convolutional network, which is used to process historical photovoltaic power generation and meteorological data and generate intermediate results. The TCN module outputs the converted features. Among them, θ TCN are the parameters of the TCN module.

[0085] GCN is used to process the spatial features of graph structured data. The core idea of ​​GCN is to transmit information between nodes through the graph structure, so that each node can not only learn its own features, but also learn the features of its neighboring nodes. GCN performs hierarchical transmission through the adjacency matrix and the node feature matrix, and provides spatial context information for time series analysis by learning the global structure of the graph. The output of GCN and the output of TCN are used as the input of GRU together to achieve more comprehensive spatiotemporal data analysis.

[0086] In each client, GRU receives the output features from the TCN module and the GCN module. These features already contain the temporal dependencies of the time series data. The GRU unit contains the update gate z t and reset gate r t , controlling the hidden state h t Updated by: z t =σ(Z t ), r t =σ(R t ), where Z t and R t is the gated input from the current input and the previous hidden state, σ is the activation function; update the hidden state, combining the update gate and the reset gate: h t =(1-z t )⊙h t-1 +z t ⊙h t , where Wh and b h is the model parameter, ⊙ represents element multiplication; GRU can process sequence data and gradually learn the dynamic features in the sequence through its cyclic structure.

[0087] After being processed by the GRU unit, the generated hidden state output is used as the intermediate feature representation h t , use the hidden states generated by GRU to calculate the loss function value, such as the mean squared error (MSE): where y i is the true value, is the predicted value, which will be used for back propagation and parameter update of the model. The client uploads the calculated loss value to the central server so that the central server can update the global model.

[0088] In this implementation, business entities with similar power generation prediction goals join the platform as clients and use their local datasets to train the received initialized global model.

[0089] Specifically, the central server selects each client by introducing a Markov decision process, and formalizes the client selection problem into a state space, an action space, and a reward function.

[0090] State space: In each training round t, the state vector is introduced to represent: in The state of client K at training round t, including model weight, data volume, number of processor cores, CPU frequency and bandwidth. The PCA technology is used to reduce the dimension of the weight vector to improve efficiency.

[0091] Action space: The server defines an action vector a t , whose length is the number of clients N, and each element Indicates whether to select client K. The server selects a client subset of size U in each training round, and the action selection will be based on the current state and the learned Q value.

[0092] Rewards: To evaluate the client's contribution, the server calculates a reward for each selected client The reward setting takes into account the client's training effect and its impact on the global model, and is mainly evaluated comprehensively through the client's accuracy and latency.

[0093] In this implementation, the central server uses the dual deep Q learning (DDQL) algorithm for training, which includes a main network and a target network. The main network is responsible for the current action selection, while the target network is used to evaluate the Q value of the future state. The central server stores the past state transition information through the experience replay mechanism and regularly updates the target network to reduce the correlation between consecutive experiences. After each training round, the central server updates the target network based on the current state s t The U clients with the highest reward are selected based on the learned Q-values ​​to participate in the next training cycle. The central server balances exploration and exploitation, thereby ensuring that the client selection strategy is continuously optimized during the training process.

[0094] In this implementation, the DDQL agent is trained and evaluated through the main network and the target network, and the experience replay mechanism is used to break the correlation between experiences to minimize the mean square error loss between the target value and the approximate value. Finally, qualified clients are selected to participate in the training.

[0095] In this implementation, after the central server initializes or updates the global model, it distributes the model to all participating clients. This global model contains common knowledge of all clients that can be improved; each client uses its local graph data to train the received global model. This process involves multiple training rounds. In each round, the model is iterated on the local data to minimize the loss function.

[0096] After several rounds of local training, each client generates local updates of the model. These updates are adjustments to the global model parameters based on the client’s local data. Local updates can be expressed as follows: Where: Δθ ci is the local model update generated by the i-th client. Once the local updates are generated, the client sends these updates back to the central server; the central server collects the local updates of all clients and uses an aggregation algorithm (such as federated average FedAvg) to integrate these updates and update the global model.

[0097] The polymerization process can be expressed by the following formula: in: is the global model parameter of the current round, n is the total number of participating clients, are the global model parameters after aggregating local updates;

[0098] Each client uploads local updates to the central server for the aggregation step. The specific steps are as follows: Each client uploads local updates to the central server for the aggregation step. The central server aggregates all local updates using a weighted aggregation algorithm for all local model parameters to generate an updated global model. At the same time, the central server calculates the Shapley value of each client as an individual contribution assessment, which can also determine the individual rewards for participating in the collaboration. The Shapley value of each client can be obtained by calculating the average of all marginal contributions of all possible combinations of participant entities. Therefore, in order to quantify the contribution of each enterprise entity, we use the following equation to evaluate individual contributions: Where C is the merger of different clients, vC is the current merged profit, and C\Ei is the profit without client E i The merger of v(C\E i ) is C\E i The corresponding income.

[0099] In this implementation, the central server trains the GCN part of the global model and distributes this global model to each client. The specific steps are as follows: After the central server receives the local updates uploaded by all clients, it merges these updates into the global model.

[0100] For the GCN part, the central server may perform additional training steps to ensure that the global model can capture the graph structure characteristics of all client data. This process can be described by the following formula: Among them: h is the feature representation after processing by the GCN layer, A is the adjacency matrix of the graph, is the feature matrix that integrates all client information, θ g are the parameters of the global model. The updated global GCN model is distributed to each client. This step is to enable the client to use the latest global model for further local training or calculation. After each client receives the global GCN model, it uses its local data to calculate the local feature representation The client calculates the local feature representation Upload back to the central server to participate in the next step of global model training or aggregation.

[0101] The server receives all the uploaded After that, these feature representations are further aggregated to update the global model. This process can be described by the following formula: in: is the feature representation after aggregation, ω i is the weight of the i-th client, n is the total number of participating clients, and the central server uses the aggregated feature representation and adjacency matrix A to continue training or fine-tuning the GCN model to capture more accurate graph structure features.

[0102] In this implementation, preferably, the client calculates the loss function value and sends the loss value back to the central server for updating the GCN part of the global model, using the output h of the GCN layer and the local true label y i , the client calculates the loss function value. The loss function can be the mean square error (MSE) or other suitable loss function, and the client sends the calculated loss value back to the central server. This step is necessary because the central server needs these loss values ​​to update the GCN part of the global model. The central server collects the loss values ​​of all clients and uses some aggregation method (e.g., average or weighted average) to update the GCN part of the global model.

[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion, characterized in that: Applicable to a central server and multiple clients that communicate with the central server respectively. The process includes: For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained; Among them, the training process of the global model based on TCN, GCN and GRU includes: The central server distributes the global model pre-trained according to the photovoltaic power generation data set to all clients, and each client trains the global model through separate local graph data to perform local updates; Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

2. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 1, characterized in that: The global model based on TCN, GCN and GRU includes: using TCN to extract features from time series data to obtain time features, using GCN to extract features from graph structure data to obtain spatial features, fusing time features and spatial features to obtain fused features, and using GRU to further process the fused features to capture the cyclic dependencies in the time series.

3. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 1, characterized in that: The central server selects business entities with similar goals as clients and trains the global model using the local datasets of the selected clients.

4. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 1, characterized in that: Each client trains the global model through separate local graph data to perform local updates, including: Each client uses its local graph data to train the received global model. Each client generates a local update of the global model. The local update is the adjustment of the global model parameters by the client based on the local data. The local update is expressed as: Where: Δθ ci is the local update generated by the ith client, is the training result of the i-th client at time t+1, is the local update at time t generated by the i-th client.

5. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 1, characterized in that: Each client uploads the local update results to the central server for aggregation, including: The central server collects local updates from all clients and uses an aggregation algorithm to integrate these updates and update the global model. The aggregation process includes: in: is the global model parameter of the current round, n is the total number of participating clients, are the global model parameters after aggregating local updates.

6. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 5, characterized in that: After each client receives the global GCN model, it uses its local data to calculate the local feature representation The client calculates the local feature representation Upload back to the central server.

7. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 6, characterized in that: The central server receives all the uploaded After that, feature aggregation is performed: in: is the feature representation after aggregation, ω i is the weight of the i-th client, n is the total number of participating clients, and the server uses the aggregated feature representation and adjacency matrix A to continue training or fine-tuning the GCN model.

8. The spatiotemporal data prediction method for heterogeneous photovoltaic image structure data fusion according to claim 7, characterized in that: The central server uses the aggregated feature representation And the adjacency matrix A to calculate h through GCN: Where: h is the output of GCN, representing the embedding or feature of the node, θ GCN is the parameter of the GCN layer. The central server sends the calculated h to all clients so that each client can use h for further local training or calculation.

9. A spatiotemporal data prediction system for heterogeneous photovoltaic image structure data fusion, characterized in that: It includes a central server and a plurality of clients respectively connected to the central server for communication; For any current client, based on the historical data of the current client's own photovoltaic power generation before the current moment and the trained global model based on TCN, GCN and GRU, the photovoltaic power generation prediction result of the current client at each future moment after the current moment is obtained; Among them, the training process of the global model based on TCN, GCN and GRU includes: The central server distributes the global model pre-trained according to the photovoltaic power generation data set to all clients, and each client trains the global model through separate local graph data to perform local updates; Each client uploads the local update results to the central server for aggregation. The central server trains the GCN part of the global model based on the aggregation results and distributes the trained global model to each client for use.

10. The spatiotemporal data prediction system for heterogeneous photovoltaic image structure data fusion according to claim 9, characterized in that: Each client uses its local graph data to train the received global model. Each client generates a local update of the global model. The local update is the adjustment of the global model parameters by the client based on the local data. The local update is expressed as: Where: Δθ ci is the local update generated by the ith client, is the training result of the i-th client at time t+1, is the local update at time t generated by the i-th client.

Citation Information

Cited By

  • Distributed photovoltaic station short-term power generation prediction method based on federated learning

    CN121417182A