Space-time fusion photovoltaic power generation prediction method, system, equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-05-12
AI Technical Summary
Existing photovoltaic power generation and load forecasting methods mainly rely on single time series modeling, resulting in insufficient accuracy of photovoltaic power generation forecasts, which affects the quality of power system dispatch and stable operation.
A spatiotemporal fusion prediction method is adopted. By performing spatiotemporal and temporal transformation on photovoltaic power generation data, a fused embedded representation is generated. Feature extraction is performed using a spatiotemporal attention layer. Combined with cluster representation and expert gating network, the prediction results are dynamically allocated and fused to generate the optimal power generation plan.
It significantly improves the accuracy and robustness of photovoltaic power generation forecasting, ensuring the safe operation and efficient dispatch of the power grid.
Smart Images

Figure CN122026338A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a spatiotemporally integrated photovoltaic power generation prediction method, system, equipment and medium. Background Technology
[0002] With the increasing proportion of distributed photovoltaic power generation, accurately predicting photovoltaic power generation and grid load, and thus enabling precise scheduling of the power system, is crucial to ensuring the safe and stable operation of the power system.
[0003] However, existing methods for power system dispatching based on photovoltaic power generation and load forecasting often focus only on single time-series dependency modeling, which limits the accuracy of photovoltaic power generation and load forecasting, leading to a decline in dispatching quality and thus affecting the stable operation of the power system.
[0004] Therefore, how to effectively predict photovoltaic power generation and ensure the quality of power system dispatch has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This invention provides a spatiotemporal integrated photovoltaic power generation prediction method, system, equipment, and medium, which addresses how to guide prediction experts through cluster representation to improve the accuracy of prediction results.
[0006] To address the aforementioned technical problems, embodiments of the present invention provide a spatiotemporally integrated photovoltaic power generation prediction method, comprising: The acquired target photovoltaic power generation data is transformed in time and space to generate a fused embedded representation and then processed into blocks to obtain a block embedded representation. The block embedding representation of the input is transformed to obtain the target representation vector corresponding to each node, so as to output the initial power generation prediction result; Calculate the Euclidean distance between each target node in the spatiotemporal embedding representation of the fused embedding representation and each cluster center in the preconstructed cluster representation, and perform dynamic optimization to determine the cluster center corresponding to each target node; Aggregate all nodes in each cluster center to obtain the cluster temporal representation corresponding to each cluster center; By coordinating the cluster time-series representation and the target representation vector, weights are assigned to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results; Based on the target power generation forecast results, the optimal power generation plan for the target power system is determined.
[0007] Furthermore, the process of performing spatiotemporal and temporal transformations on the acquired target photovoltaic power generation data, generating a fused embedded representation, and performing block processing to obtain a block embedded representation includes: The target photovoltaic power generation data is transformed from the perspective of spatiotemporal features to generate the spatiotemporal embedding representation corresponding to each node; The target photovoltaic power generation data is transformed from the perspective of time characteristics to generate a corresponding time-embedded representation; The spatiotemporal embedding representation and the temporal embedding representation are integrated to obtain the fused embedding representation; The fused embedding representation is divided into blocks along the time dimension to obtain the block embedding representation.
[0008] Furthermore, the step of transforming the block-embedded representation of the input into a preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, and outputting the initial power generation prediction result, includes: The block-embedded representation input is subjected to a first transformation on the preset time-series attention layer to obtain the time-series representation vector corresponding to each node. The time-series representation vector is then subjected to a first linear transformation to output the corresponding time-series power generation prediction result. The time-series representation vector is input into a preset spatial attention layer for a second transformation to obtain the spatiotemporal representation vector corresponding to each node. The spatiotemporal representation vector is then subjected to a second linear transformation to output the corresponding spatiotemporal power generation prediction result. The initial power generation prediction result is obtained by integrating the time-series power generation prediction result and the spatiotemporal power generation prediction result.
[0009] Furthermore, the dynamic optimization process includes: The target nodes are clustered according to the Euclidean distance, and a first loss function is designed based on the Euclidean distance. The cluster allocation process is dynamically optimized using the first loss function to obtain the cluster center corresponding to each target node.
[0010] Furthermore, the coordination of the cluster time-series representation and the corresponding target representation vector, assigning weights to each prediction expert constructed from the initial power generation prediction results, to output the target power generation prediction results, includes: A time-series prediction expert is designed based on the time-series power generation prediction results, and a spatiotemporal prediction expert is designed based on the spatiotemporal power generation prediction results. The cluster time series representation and the time series characterization vector are used as comprehensive decision indicators and input into the expert gating network for training. Corresponding expert weights are assigned to the time series prediction expert and the spatiotemporal prediction expert and weighted fusion is performed to output the target power generation prediction result.
[0011] Furthermore, the method of coordinating the cluster time-series representation and the corresponding target representation vector to assign weights to each prediction expert constructed from the initial power generation prediction results, in order to output the target power generation prediction results, further includes: During training, a pre-designed second loss function is introduced to adjust and update the parameters of the expert gating network.
[0012] Furthermore, determining the optimal power generation plan for the target power system based on the target power generation forecast results includes: With the goal of minimizing total power generation loss, and using the output of the target photovoltaic power generation equipment as the decision variable, a power flow calculation model is constructed. Using the target power generation prediction result as boundary conditions, the power flow calculation model is solved to output the optimal power generation plan corresponding to the target photovoltaic power generation equipment.
[0013] Another embodiment of the present invention provides a spatiotemporally integrated photovoltaic power generation prediction system, comprising: The embedding generation module is used to perform spatiotemporal and temporal transformation on the acquired target photovoltaic power generation data, generate a fused embedding representation, and perform block processing to obtain a block embedding representation. The initial prediction module is used to transform the block-embedded representation of the input into a preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, so as to output the initial power generation prediction result. The cluster allocation module is used to extract the spatiotemporal embedding representation from the fused embedding representation, calculate the Euclidean distance between each target node corresponding to the spatiotemporal embedding representation and each cluster center in the pre-constructed cluster representation, and perform dynamic optimization to determine the cluster center corresponding to each target node. The aggregation module is used to aggregate all nodes in each of the cluster centers to obtain the cluster temporal representation corresponding to each of the cluster centers; The prediction output module is used to coordinate the cluster time series representation and the corresponding target representation vector to assign weights to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results; The power generation plan generation module is used to determine the optimal power generation plan for the target power system based on the target power generation forecast results.
[0014] Another embodiment of the present invention provides a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the spatiotemporal fusion photovoltaic power generation prediction method as described above.
[0015] In another embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, the spatiotemporal fusion photovoltaic power generation prediction method described above is implemented.
[0016] Compared with the prior art, the beneficial effects of the embodiments of the present invention are at least one of the following: This invention transforms the input data in both spatiotemporal and temporal dimensions, then extracts features from the embedded data using a spatiotemporal dual attention layer. This effectively captures the spatiotemporal dependencies of photovoltaic power generation and significantly improves feature representation capabilities. A node clustering process considering cluster representation is designed to generate clustered temporal representations, enhancing the accurate perception of different power generation modes. The temporal and spatiotemporal prediction results are respectively constructed as experts. A gated network is used to coordinate the temporal features of nodes with the clustered temporal representations, dynamically allocating expert weights and performing weighted fusion. This improves the accuracy and robustness of predictions. Power generation plans are formulated and scheduling is executed based on the generated prediction results, ensuring the safe operation of the power grid. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the spatiotemporal fusion photovoltaic power generation prediction method in one embodiment of the present invention; Figure 2 This is a schematic diagram of the overall prediction process in one embodiment of the present invention; Figure 3 This is a schematic diagram of the spatiotemporal fusion photovoltaic power generation prediction system in one embodiment of the present invention; Figure 4 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0020] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. The terms "vertical," "horizontal," "left," "right," "upper," "lower," and similar expressions used herein are for illustrative purposes only and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0021] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0022] One embodiment of the present invention provides a spatiotemporal integrated photovoltaic power generation prediction method. For details, please refer to [link to specific documentation]. Figure 1 , Figure 1 The diagram shown is a schematic flowchart of a spatiotemporal fusion photovoltaic power generation prediction method according to one embodiment of the present invention, including the following steps: S1. Perform spatiotemporal and temporal transformation on the acquired target photovoltaic power generation data, generate a fused embedded representation, and perform block processing to obtain a block embedded representation.
[0023] This embodiment aims to extract data reflecting photovoltaic power generation and load (target photovoltaic power generation data) from the target power system. This data can be collected from the target power system's SCADA system and smart meters / sensor devices at the photovoltaic power station. Feature extraction is performed on this data from both spatiotemporal and temporal perspectives to achieve dual-path prediction of both photovoltaic power generation and load indicators. For details, please refer to [reference needed]. Figure 2 As shown.
[0024] For example, let the collected input data be X, with T (input window) as the first dimension and N as the second dimension. When applied to photovoltaic power generation forecasting, X represents the power generation of each photovoltaic generator over the past T time steps, and N represents the number of photovoltaic generators. When applied to nodal load forecasting, N represents the number of load nodes. In this embodiment, photovoltaic generators and load nodes are collectively referred to as nodes. When performing photovoltaic forecasting or load forecasting, future... Power generation / load at each time step This is the output window.
[0025] Specifically, the target photovoltaic power generation data is transformed from a spatiotemporal perspective to generate a spatiotemporal embedding representation for each node, and then transformed from a temporal perspective to generate a corresponding temporal embedding representation. Finally, by integrating the spatiotemporal and temporal embedding representations, a fused embedding representation combining spatiotemporal and temporal characteristics is obtained.
[0026] For example, in this embodiment, learnable embeddings of the input data time of day and day of week are obtained respectively, and time embedding representations are formed based on these two embeddings.
[0027] Let the time-of-day information of input data X be TOD, with T as its first dimension and N as its second dimension. The meaning of Time of Day is that, assuming the sampling interval of the input data is f seconds, the input data is collected from the nth f-second of the day. For example, if the sampling frequency of input data X is 600 seconds, and the data for the first time step of X is collected from 00:10:00am, which is the beginning of the second 600 seconds of the day, then TOD[0,0]=1, and correspondingly TOD[1,0]=2, and so on. Let the learnable embedding of Time of Day be: It is based on TOD and a learnable Time of Day embedded dictionary. get. The first dimension is 86400 / f (i.e., how many f seconds there can be in a day), and the second dimension is D.
[0028] Using TOD as the subscript to obtain For example, for time step j of node i, The final result The first dimension is T, the second dimension is N, and the third dimension is D.
[0029] Accordingly, we can define the day of week information of input data X as DOW, with its first dimension being T, its second dimension being N, and its third dimension being 1. Day of week indicates the day of the week from which the input data is collected (Monday is 0). For example, if the collection frequency of input data X is 600 seconds, and the data for the first time step of X is collected at 23:50:00pm on Monday, then DOW[0,0]=0, and correspondingly DOW[1,0]=1.
[0030] Let the learnable embedding of Day of Week be: It is based on DOW and a learnable day of week embedded dictionary. get. The first dimension is 7, and the second dimension is D.
[0031] Using DOW as the index to obtain For example, for time step j of node i, The final result The first dimension is T, the second dimension is N, and the third dimension is D.
[0032] Regarding spatiotemporal embedding representation, taking photovoltaic power generation as an example, even if two generators have the same climate characteristics, they may have different power generation volumes due to differences in their installed capacity, panel type, etc. The panel type and installed capacity then represent the spatiotemporal characteristics of the nodes. Similarly, in load forecasting, different nodes connect to different electricity users with varying electricity demands; these demands represent the spatiotemporal characteristics of the load nodes. In this embodiment, a learnable spatiotemporal embedding representation is used. To represent these features, it assigns a different embedding to each node to improve the model's ability to model node-specific information.
[0033] Since subsequent operations rely on a self-attention mechanism, for node i, let its corresponding... The first dimension is T, and the second dimension is D. Essentially, different embeddings are added to the input data of this node at different time steps to improve the attention mechanism's perception of temporal order.
[0034] The above three embeddings are integrated to obtain the fused embedding representation M, which is specifically represented by the following formula: Here, Linear represents a linear mapping.
[0035] To reduce the impact of noise in the data on subsequent attention mechanisms and to reduce the computational cost of subsequent temporal attention mechanisms, this embodiment further divides the fused embedding representation along the time dimension to obtain a block-based embedding representation.
[0036] For example, for embedding M, using a time series block mechanism, several consecutive time step representations of a node are concatenated into a 'block', and two blocks can intersect (i.e., the representation of a time step belongs to two blocks). The fused embedding representation after block division becomes P, with its first dimension being PC, its second dimension being N, and its third dimension being D*PS; where PC is the number of blocks, and PS is the size of the time steps spanned by a block, and their relationship is as follows: stride is the distance between the right boundaries of the two blocks, T is... The first dimension is the input time window.
[0037] Based on this, a linear transformation is performed on the representation of each node of P at each time step to obtain the required block embedding representation: The [t,i,:] operation here indicates that the block result with the first dimension index t (the t-th block) and the second dimension index i (the i-th node) is subjected to subsequent linear transformation. The first dimension is PC, the second dimension is N, and the third dimension is D.
[0038] S2. Transform the block-embedded representation of the preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, and output the initial power generation prediction result.
[0039] In some embodiments of the present invention, a spatiotemporal transformation architecture based on a self-attention mechanism is preferred, which divides the feature capture into two layers: a temporal attention layer and a spatial attention layer. In this embodiment, the target representation vector refers to the vector representation output by the temporal attention layer and the spatial attention layer, respectively.
[0040] Specifically, the block-embedded representation of the input temporal attention layer is transformed to obtain the temporal representation vector corresponding to each node.
[0041] For example, for chunked embedding representation node i, its first The self-attention transformation process of a layer can be written as: In the formula, That is, the first The result of the self-attention transformation of the layer, yes The result after MLP (Multilayer Perceptron) transformation.
[0042] in, .go through After the layer-time self-attention transformation, the temporal representation vector of each node is obtained. Its first dimension is PC, the second dimension is N, and the third dimension is D.
[0043] Then, the time-series representation vector of each node is subjected to the first linear transformation, and the corresponding time-series power generation prediction result is output. , means as follows: Using the time-series loss function Model training is performed, where, Let be the truth value of node i at time step tj, and N be the number of nodes. This is the output window.
[0044] Correspondingly, the temporal representation vector is input into the preset spatial attention layer for a second transformation to obtain the spatiotemporal representation vector corresponding to each node.
[0045] For example, time series representation vector After time step t After the layer transformation, the depth-space-time representation of each node can be written as: In the formula, Finally, the spatiotemporal representation vectors of each node are obtained. Its first dimension is PC, the second dimension is N, and the third dimension is D.
[0046] Then, a second linear transformation is performed on the spatiotemporal representation vector to output the corresponding spatiotemporal power generation prediction result. , means as follows: The first dimension is T, the second dimension is N, and the third dimension is C (C=1). The spatiotemporal loss function is obtained through training using MAE loss. for: N is the number of nodes. This is the output window.
[0047] By integrating the above time-series power generation prediction results and spatiotemporal power generation prediction results, the initial power generation prediction results were obtained.
[0048] S3. Extract the spatiotemporal embedding representation from the fused embedding representation, calculate the Euclidean distance between each target node corresponding to the spatiotemporal embedding representation and each cluster center in the pre-constructed cluster representation, and perform dynamic optimization to determine the cluster center corresponding to each target node.
[0049] To improve the prediction accuracy of the model in complex scenarios, this embodiment of the invention uses cluster representation to guide the expert model, embedding the positions of all nodes for clustering.
[0050] First, the deep spatiotemporal embedding representation can be swapped via the permute operation. The first and second dimensions are then flattened to obtain the embedded positions of each node. .
[0051] Assume that the cluster is represented as Its first dimension is K, and its second dimension is T*D. There are K clusters in total. Based on this, the position embedding of each target node is calculated. The Euclidean distance between each target node and the cluster center of each cluster is used to assign clusters to each target node in order to determine the cluster center corresponding to each target node.
[0052] It should be understood that this process can group nodes with the same photovoltaic power generation / load variation patterns into the same cluster. For example, photovoltaic power generation nodes grouped into the same cluster are geographically close and have similar installed capacity; if it is a group of load nodes grouped into the same cluster, it means that these load nodes have similar load variation patterns, for example, they may have similar urban functions (such as being in the same industrial area / commercial area, etc.).
[0053] To optimize the entire cluster representation CL during this cluster assignment process, this embodiment further designs a first loss function using Euclidean distance. , means as follows: In the formula, [] represents the cluster ID, with N as the first dimension and 1 as the second dimension; That is, the Euclidean distance, where N is the number of nodes and T is the input window.
[0054] This first loss function is used to dynamically optimize the cluster allocation process, improving the Euclidean distance between the node's position embedding and its corresponding cluster representation. The goal is to ensure that each target node is sufficiently close to the center of its own cluster. Ultimately, the cluster center for each target node is obtained.
[0055] S4. Aggregate all nodes in each type of cluster center to obtain the cluster-series representation corresponding to each type of cluster center.
[0056] After assigning each target node to a cluster, it is necessary to aggregate all nodes in each cluster center. For example, for cluster i, its cluster time sequence representation at time step t is... It can be expressed by the following formula: In the formula, The dimension is D; Let be the matrix used for linear transformation, with its first dimension being D and its second dimension also being D; Let i be the number of nodes in cluster i; This indicates that node n comes from cluster i.
[0057] Correspondingly, the cluster time sequence representation generated by all nodes The first dimension is T, the second dimension is K, and the third dimension is D.
[0058] S5, the time-series representation of the collaborative cluster and the corresponding target representation vector, assign weights to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results.
[0059] In this embodiment, the prediction experts include both time-series prediction experts focused on the time-series prediction dimension and spatiotemporal prediction experts focused on the spatiotemporal prediction dimension. Time-series prediction experts are designed based on time-series power generation prediction results, and spatiotemporal prediction experts are designed based on spatiotemporal power generation prediction results. Different prediction experts output prediction results corresponding to their respective dimensions.
[0060] In one implementation of this invention, a temporal representation vector is selected from the target representation vector for gating network training. Specifically, this temporal representation vector and the cluster temporal representation are used as comprehensive decision indicators and input into the expert gating network for training. This drives the expert gating network to assign corresponding expert weights to the temporal prediction experts and the spatiotemporal prediction experts, and performs weighted fusion to output the target power generation prediction result. This operation can automatically select the optimal expert combination based on scene characteristics, adaptively fuse the prediction results of the temporal prediction experts and the spatiotemporal prediction experts, and obtain the optimal prediction result for the current scene.
[0061] For example, for node i, its weight Represented as: In the formula, `flatten` is a flattening operation used to flatten the input... (Time series representation vector) )and (cluster temporal representation) Convert it to a T*D dimensional vector; For splicing operations; It is a gated weight matrix with a first dimension of 2*T*D and a second dimension of 2; That is, the cluster to which node i belongs.
[0062] The output target power generation prediction result It can be represented as: The following example provides a more detailed description of the above prediction process: For node 100 at time t, the prediction results from the time series prediction expert and the spatiotemporal prediction expert are as follows: , Then, based on the time sequence representation of node i... [:,100,:] (flattened to a T*D vector) and the cluster temporal representation of its class. Concatenating these elements yields a depth representation of a 2*T*D dimensional vector. Using softmax, we transform it into a 2D vector representing the weights of the time series prediction expert and the spatiotemporal prediction expert. For example, (0.8, 0.2) indicates that the experts are assigned weights of 0.8 and 0.2 respectively. and The weights are then used to generate the final target prediction result for node 100 at time t.
[0063] To optimize the expert gating network's control over the prediction result fusion process during training, this embodiment further designs a second loss function. The parameters of the expert gating network are adjusted and updated, as shown below (N is the number of nodes). (for the output window) It enables expert gating networks to add more accurate expert weights in time series prediction and spatiotemporal prediction, thereby improving the effect of weighted fusion.
[0064] For example, if time series experts are more accurate in predicting certain types of scenarios, then... As losses decrease, the expert gating network learns to assign higher weights to the time series prediction expert in this type of scenario. Conversely, if the spatiotemporal prediction expert performs better in another type of scenario, the expert gating network will adaptively increase the weight of the spatiotemporal prediction expert.
[0065] Therefore, the overall loss function in this embodiment is... Represented as: In the formula, This is a hyperparameter that controls the weight of the first loss function. The prediction model is trained using this total loss function.
[0066] S6. Based on the target power generation forecast results, determine the optimal power generation plan for the target power system.
[0067] It should be understood that this target power generation forecast reflects the forecast results of node load and photovoltaic power generation. This step uses this forecast result to provide a solution for the efficient scheduling of distributed photovoltaic high-penetration power grids in complex scenarios.
[0068] Specifically, this embodiment aims to minimize total power generation loss, using the output of the target photovoltaic power generation equipment as a decision variable to construct a power flow calculation model, which can be expressed as follows: In the formula, G represents the total power generation loss; G represents the number of generators. This represents the loss coefficient of the i-th generator; Represents a node The active power.
[0069] Among them, nodes active power Specifically, it is expressed as follows: In the formula, and Represents the real and imaginary parts of the nodal admittance matrix; and These are the voltage magnitude and phase angle at node i, respectively. and These are the voltage magnitude and phase angle at node j, respectively.
[0070] Using the target power generation forecast as boundary conditions, the power flow calculation model is solved to output the optimal power generation plan corresponding to the target photovoltaic power generation equipment, which satisfies the load demand and available photovoltaic capacity. In this embodiment, the Newton-Raphson method can be used to calculate the above nodes. active power The formula is used to solve for the required amplitude and phase angle. Then, under the constraints of the boundary conditions, the objective function is optimized using methods such as linear programming or nonlinear programming.
[0071] According to this plan, dispatch instructions will be issued to each node to achieve stable operation of the power grid system while reducing power generation losses. For example, the dispatch instructions could be: Node 1 photovoltaic power plant: operate at full capacity of 80MW; Node 2 thermal power plant: adjust output to 45MW; monitoring node: ensure voltage is within a safe range.
[0072] In summary, this invention transforms the acquired photovoltaic power generation and load data in both spatiotemporal and temporal dimensions to obtain a corresponding fused embedding representation. It also utilizes a block-based technique to process the embedding representation in blocks. Temporal and spatial attention layers are used to extract features from the input embedding representation, thereby outputting temporal and spatiotemporal power generation prediction results. Cluster representation guides an expert network to assign appropriate weights to the temporal and spatiotemporal prediction experts, and after weighted fusion, the final prediction result is output. This enables the development of reasonable and reliable power generation plans for efficient power system scheduling.
[0073] One embodiment of the present invention provides a spatiotemporal integrated photovoltaic power generation prediction system. For details, please refer to [link to specific documentation]. Figure 3 , Figure 3 The diagram shown illustrates the structure of a spatiotemporally integrated photovoltaic power generation prediction system according to one embodiment of the present invention, comprising: The embedding generation module M1 is used to perform spatiotemporal and temporal transformation on the acquired target photovoltaic power generation data, generate a fused embedding representation, and perform block processing to obtain a block embedding representation. The initial prediction module M2 is used to transform the block-embedded representation of the preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, so as to output the initial power generation prediction result. The cluster allocation module M3 is used to extract the spatiotemporal embedding representation from the fused embedding representation, calculate the Euclidean distance between each target node corresponding to the spatiotemporal embedding representation and each cluster center in the pre-constructed cluster representation and perform dynamic optimization, so as to determine the cluster center corresponding to each target node. The aggregation module M4 is used to aggregate all nodes in each of the cluster centers to obtain the cluster temporal representation corresponding to each of the cluster centers; The prediction output module M5 is used to coordinate the cluster time series representation and the corresponding target representation vector to assign weights to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results; The power generation plan generation module M6 is used to determine the optimal power generation plan for the target power system based on the target power generation forecast results.
[0074] like Figure 4 As shown, this embodiment of the invention also provides a computer device. Figure 4 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. The computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method described above.
[0075] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0076] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor. The processor is the control center of the terminal device, connecting various parts of the terminal device through various interfaces and lines.
[0077] The memory mainly includes a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc., while the data storage area can store related data, etc. Furthermore, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard drive, a SmartMedia Card (SMC), a Secure Digital (SD) card, and a Flash Card, or other volatile solid-state storage devices.
[0078] It should be noted that the aforementioned terminal devices may include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 4 The structural block diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or use different components. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0079] Accordingly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the steps in the method of the above embodiments, for example... Figure 1 Steps S1 to S6 as described above.
[0080] The technical features and effects of the spatiotemporal fusion photovoltaic power generation prediction system proposed in this embodiment of the invention are the same as those of the spatiotemporal fusion photovoltaic power generation prediction method proposed in this embodiment of the invention, and will not be repeated here.
[0081] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A spatiotemporal integrated photovoltaic power generation prediction method, characterized in that, include: The acquired target photovoltaic power generation data is transformed in time and space to generate a fused embedded representation and then processed into blocks to obtain a block embedded representation. The block embedding representation of the input is transformed to obtain the target representation vector corresponding to each node, so as to output the initial power generation prediction result; Extract the spatiotemporal embedding representation from the fused embedding representation, calculate the Euclidean distance between each target node corresponding to the spatiotemporal embedding representation and each cluster center in the pre-constructed cluster representation, and perform dynamic optimization to determine the cluster center corresponding to each target node; Aggregate all nodes in each cluster center to obtain the cluster temporal representation corresponding to each cluster center; By coordinating the cluster time-series representation and the corresponding target representation vector, weights are assigned to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results; Based on the target power generation forecast results, the optimal power generation plan for the target power system is determined.
2. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 1, characterized in that, The process of converting the acquired target photovoltaic power generation data into spatiotemporal and temporal representations, generating a fused embedded representation, and performing block-based processing to obtain a block-based embedded representation includes: The target photovoltaic power generation data is transformed from the perspective of spatiotemporal features to generate the spatiotemporal embedding representation corresponding to each node; The target photovoltaic power generation data is transformed from the perspective of time characteristics to generate a corresponding time-embedded representation; The spatiotemporal embedding representation and the temporal embedding representation are integrated to obtain the fused embedding representation; The fused embedding representation is divided into blocks along the time dimension to obtain the block embedding representation.
3. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 1, characterized in that, The step of transforming the block-embedded representation of the input into a preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, and outputting the initial power generation prediction result, includes: The block-embedded representation input is subjected to a first transformation on the preset time-series attention layer to obtain the time-series representation vector corresponding to each node. The time-series representation vector is then subjected to a first linear transformation to output the corresponding time-series power generation prediction result. The time-series representation vector is input into a preset spatial attention layer for a second transformation to obtain the spatiotemporal representation vector corresponding to each node. The spatiotemporal representation vector is then subjected to a second linear transformation to output the corresponding spatiotemporal power generation prediction result. The initial power generation prediction result is obtained by integrating the time-series power generation prediction result and the spatiotemporal power generation prediction result.
4. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 1, characterized in that, The dynamic optimization process includes: The target nodes are clustered according to the Euclidean distance, and a first loss function is designed based on the Euclidean distance. The cluster allocation process is dynamically optimized using the first loss function to obtain the cluster center corresponding to each target node.
5. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 3, characterized in that, The method of coordinating the cluster time-series representation and the corresponding target representation vector, assigning weights to each prediction expert constructed from the initial power generation prediction results, and outputting the target power generation prediction results includes: A time-series prediction expert is designed based on the time-series power generation prediction results, and a spatiotemporal prediction expert is designed based on the spatiotemporal power generation prediction results. The cluster time series representation and the time series characterization vector are used as comprehensive decision indicators and input into the expert gating network for training. Corresponding expert weights are assigned to the time series prediction expert and the spatiotemporal prediction expert and weighted fusion is performed to output the target power generation prediction result.
6. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 5, characterized in that, The method of coordinating the cluster time-series representation and the corresponding target representation vector to assign weights to each prediction expert constructed from the initial power generation prediction results, in order to output the target power generation prediction results, further includes: During training, a pre-designed second loss function is introduced to adjust and update the parameters of the expert gating network.
7. The spatiotemporal fusion photovoltaic power generation prediction method as described in claim 1, characterized in that, Determining the optimal power generation plan for the target power system based on the target power generation forecast results includes: With the goal of minimizing total power generation loss, a power flow calculation model is constructed using the output of the target photovoltaic power generation equipment as the decision variable. Using the target power generation prediction result as boundary conditions, the power flow calculation model is solved to output the optimal power generation plan corresponding to the target photovoltaic power generation equipment.
8. A spatiotemporally integrated photovoltaic power generation prediction system, characterized in that, include: The embedding generation module is used to perform spatiotemporal and temporal transformation on the acquired target photovoltaic power generation data, generate a fused embedding representation, and perform block processing to obtain a block embedding representation. The initial prediction module is used to transform the block-embedded representation of the input into a preset spatiotemporal attention layer to obtain the target representation vector corresponding to each node, so as to output the initial power generation prediction result. The cluster allocation module is used to extract the spatiotemporal embedding representation from the fused embedding representation, calculate the Euclidean distance between each target node corresponding to the spatiotemporal embedding representation and each cluster center in the pre-constructed cluster representation, and perform dynamic optimization to determine the cluster center corresponding to each target node. The aggregation module is used to aggregate all nodes in each of the cluster centers to obtain the cluster temporal representation corresponding to each of the cluster centers; The prediction output module is used to coordinate the cluster time series representation and the corresponding target representation vector to assign weights to each prediction expert constructed from the initial power generation prediction results, so as to output the target power generation prediction results; The power generation plan generation module is used to determine the optimal power generation plan for the target power system based on the target power generation forecast results.
9. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the spatiotemporal fusion photovoltaic power generation prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the spatiotemporal fusion photovoltaic power generation prediction method as described in any one of claims 1 to 7.