A rural energy system multi-energy load scene construction method
By combining the Transformer model and a generative adversarial network with regularized relative loss, dynamically adjusting the learning rate, and using cosine annealing and a warm restart mechanism, the problem of time mismatch and coupling loss in the construction of multi-energy load scenarios in rural energy systems is solved, generating a high-quality, diverse, and representative set of scenarios, and improving the efficiency of modeling and optimization.
Patent Information
- Application Number
- CN202511299859.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing technologies lack structured methods suitable for collaborative modeling of multiple types of source loads in the construction of multi-energy load scenarios in rural energy systems. This leads to time mismatch and coupling loss in the generated data, and the reduced scenarios lack representativeness and completeness, making it difficult to meet the modeling and optimization needs of complex rural energy systems.
A scene generation model based on the Transformer model and regularized relative loss generative adversarial network is adopted. The learning rate is dynamically adjusted by combining the cosine annealing algorithm and the hot restart mechanism. Through dynamic time regularization distance and K-Medoids clustering method, multi-energy load scene sets are generated and reduced to construct a typical multi-energy load representative scene set.
It achieves high-quality generation of multi-energy load joint time-series scenarios, maintains a certain degree of diversity, and restores the evolution law of historical data and the coupling characteristics between sources and loads to the greatest extent, thereby improving the efficiency and accuracy of rural energy system modeling and optimization.
Smart Images

Figure CN120807223B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of comprehensive energy, in particular to a rural energy system multi-energy load scene construction method. BACKGROUND
[0002] Rural areas rely on abundant renewable resources and widely deploy various distributed energy such as wind power, photovoltaic, biomass energy, small hydropower, etc. At the same time, at the terminal energy level, the demand types of electric load, thermal load, cold load, gas load and emerging hydrogen energy load required by residents and agricultural production are constantly enriched. The "source-load" structure formed thereby not only has many dimensions, but also presents significant volatility, correlation and structural coupling in time evolution. In order to realize the collaborative optimization and operation management of rural comprehensive energy system, it has become a prerequisite to support modeling, simulation and optimization to build a complete, reliable and representative multi-energy load input scene dataset covering wind, light, biomass energy, hydropower and other source-side output data and cold, heat, electricity, gas and hydrogen load types.
[0003] The full scene construction of rural energy system multi-energy load includes scene generation and scene reduction. The current technology mainly has two key problems in the construction of multi-energy load scene: first, in the scene generation link, there is a lack of structured method suitable for multi-type source-load collaborative modeling, resulting in significant time mismatch and coupling loss between generated data; second, in the scene reduction link, the existing methods fail to reflect the time sequence similarity between source and load, and the representative and completeness of the reduced scene are insufficient, which is difficult to meet the modeling and optimization needs of complex rural energy systems. SUMMARY
[0004] The purpose of the present application is to provide a rural energy system multi-energy load scene construction method, which can maximize the restoration of historical data evolution rules and coupling characteristics between source and load on the basis of maintaining a certain diversity, and realize the extraction and reduction of representative scenes.
[0005] To achieve the above purpose, the present application provides a rural energy system multi-energy load scene construction method, comprising:
[0006] obtaining a historical multi-energy load time series of a rural energy system;
[0007] generating a multi-energy load scene set of a future time period according to the historical multi-energy load time series, using a pre-trained scene generation model; the scene generation model is constructed based on a Transformer model and a regularization relative loss generative adversarial network, and the scene generation model dynamically adjusts the learning rate using a cosine annealing algorithm and a hot restart mechanism during training;
[0008] The dynamic time warping distance method and the K-Medoids clustering method are used to reduce the scenes in the multi-energy load scene set, to obtain a typical multi-energy load representative scene set.
[0009] According to the specific embodiments provided in the application, the application has the following technical effects: the application provides a rural energy system multi-energy load scene construction method, a scene generation mechanism combining a regularized relative loss generative adversarial network and a Transformer model is constructed, and a cosine annealing algorithm and a hot restart mechanism are used to dynamically adjust the learning rate to construct a scene generation model, so that high-quality generation of a multi-energy load joint time sequence scene with time structure characteristics, energy diversity and collaborative coupling relationship is realized, not only the historical information perception ability and the potential noise disturbance fusion mechanism are provided, but also the generated scene restores the historical data evolution law and the coupling characteristics between the sources and loads to the greatest extent on the basis of maintaining a certain diversity. Meanwhile, the scene reduction is realized based on the dynamic time warping and the K-Medoids clustering method. The method faces typical renewable energy resources such as wind energy, photovoltaic energy and biomass energy in rural areas, and various load forms such as cold, heat, electricity and hydrogen, realizes a complete construction path from original historical data to a typical full scene set, and has high multi-energy load joint modeling capability and typical scene reduction efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description only constitute some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0011] Figure 1 The application environment diagram of the rural energy system multi-energy load scene construction method in an embodiment of the application.
[0012] Figure 2 The flowchart of the rural energy system multi-energy load scene construction method provided in an embodiment of the application.
[0013] Figure 3 The overall framework diagram of the rural multi-energy load full scene construction in an embodiment of the application.
[0014] Figure 4 The framework diagram of the regularized relative loss generative adversarial network in an embodiment of the application.
[0015] Figure 5 The structure principle diagram of the Transformer model in an embodiment of the application.
[0016] Figure 6The figure shows the cosine annealing method cycle and peak change schematic diagram combined with the hot restart mechanism in an embodiment of the present application.
[0017] Figure 7 The flow chart of K-Medoids algorithm clustering reduction provided in an embodiment of the present application.
[0018] Figure 8 The functional module schematic diagram of a rural energy system multi-energy load scene construction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0020] The technical problems to be solved by the present application include: 1) how to efficiently construct a rural integrated energy system multi-energy load time sequence scene with time sequence consistency, multi-energy load coupling characteristics and generation diversity. 2) how to effectively integrate historical evolution information and potential disturbance factors to realize joint generation for multiple sources such as wind, light and biomass energy and multiple types of terminal loads such as cold, heat, electricity and hydrogen. 3) how to overcome problems such as lack of time structure modeling, mode collapse and unstable discriminator gradient in traditional generation methods to ensure that the generated scenes have high realism and high physical consistency. 4) how to reduce and represent the large-scale generated full scene data to avoid the computational burden caused by redundant and lengthy simulation data and improve the efficiency and operability of subsequent scheduling optimization.
[0021] Based on the above technical problems, the present application provides a unified modeling, structure coupling, reducible and representative multi-energy load full scene construction method to generate and filter highly consistent and mutually collaborative joint input data sets between renewable outputs such as wind, light, biomass energy and hydropower and loads such as cold, heat, electricity and hydrogen in a systematic way, thereby improving the efficiency and accuracy of rural integrated energy system modeling and decision-making.
[0022] In order to make the above purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0023] The rural energy system multi-energy load scene construction method provided in the embodiments of the present application can be applied to, for example Figure 1The application environment shown. Among them, the terminal 101 communicates with the server 102 through the network. The data storage system can store the data required by the server 102 to process. The data storage system can be set up separately, or integrated on the server 102, or placed on the cloud or other servers. The terminal 101 can send the historical multi-energy load time sequence of the rural energy system to the server 102. After the server 102 receives the historical multi-energy load time sequence, it generates and reduces the scene to obtain a typical multi-energy load representative scene set. The server 102 feeds back the typical multi-energy load representative scene set obtained to the terminal 101. In addition, in some embodiments, the rural energy system multi-energy load scene construction method can also be implemented by the server 102 or the terminal 101 alone.
[0024] Among them, the terminal 101 can be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 102 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0025] In an exemplary embodiment, as shown in Figure 2 and Figure 3 , a rural energy system multi-energy load scene construction method is provided, which is executed by a computer device, specifically by a terminal or a server, etc. Computer device alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to the server 102 in Figure 1 , including the following steps 201 to 203.
[0026] Step 201, obtaining the historical multi-energy load time sequence of the rural energy system.
[0027] Step 202, according to the historical multi-energy load time sequence, using a pre-trained scene generation model to generate a multi-energy load scene set in a future time period. Each scene in the multi-energy load scene set includes the joint evolution process of each type of source load in the rural energy system at each time step in the future time period.
[0028] The scene generation model is constructed based on the Transformer model and the regularization relative loss generated adversarial network, and the cosine annealing algorithm and the hot restart mechanism are used to dynamically adjust the learning rate during training of the scene generation model.
[0029] In a specific application example, step 202 includes the following steps 21 to 23.
[0030] Step 21, a Transformer model is used to extract features from the historical multi-energy load time series to obtain a time series context feature vector.
[0031] Step 22, the time series context feature vector is spliced and fused with a random latent noise vector to obtain a joint input vector.
[0032] Step 23, according to the joint input vector, a regularized relativistic loss generative adversarial network is used to generate a set of multi-energy load scenarios in the future time period. The joint input vector is used as the input of the generator of the regularized relativistic loss generative adversarial network.
[0033] In a rural integrated energy system, the output of renewable energy such as wind, light and biomass energy has strong nonlinearity and multi-scale time-varying characteristics, and the multi-type loads such as cold, heat, electricity and hydrogen have significant coupling relationship. Therefore, in order to realize the joint generation of multi-energy load data, the present application proposes an adversarial generation method based on the Regularized Relativistic Generative Adversarial Networks (R3GAN) backbone structure, which is used for adversarial game learning in high-dimensional coupled time series scenario generation, and has the characteristics of strong discrimination ability, stable gradient and flexible structure. The core is to introduce the regularization loss function and discriminator gradient constraint mechanism proposed by R3GAN, so that the whole generative adversarial process is more suitable for multi-energy load data scenarios containing daily periodicity, multivariate collaborative change and significant structural fluctuations, especially the typical source-load curve generation in rural energy systems.
[0034] R3GAN is evolved from the classic Deep Convolutional Generative Adversarial Networks (DCGAN). DCGAN is based on Convolutional Neural Network (CNN), and its characteristics are gradually up-sampling low-channel features and gradually reducing the number of channels until generating a target size three-channel image.
[0035] First, the DCGAN will be described. The basic components of DCGAN include two neural network modules, namely the generator G and the discriminator D. The generator G is used to learn the mapping relationship between the noise distribution and the actual renewable energy output data distribution. The discriminator D is similar to a binary classifier structure, which is used to judge whether the sample generated by the generator G is from the real data or the generated data.
[0036] In the generative adversarial networks (GAN), a random noise vector z satisfying a Gaussian distribution is input into a generator G, and then the generator G outputs a generated sample . The real sample x and the generated sample are input into a discriminator D, and then the discriminator D outputs a scalar representing the probability that the input sample comes from the original data and the generated data. When training the GAN, the generator G and the discriminator D are alternately trained, and the network parameters are optimized through the maximum-minimum game learning of the two networks. In theory, when a Nash equilibrium is reached, the generator can accurately restore the distribution of the real sample, and the discriminator cannot identify whether the sample is from the generated sample or the real sample. During the training process, the output of the discriminator D is a probability value between 0 and 1. When the input is a real sample, the output value of the discriminator tends to 1, and when the input is a sample generated by the generator, the output value of the discriminator tends to 0. The loss functions of the generator and the discriminator during the training process can be written as formula (1) and formula (2).
[0037] (1)
[0038] (2)
[0039] wherein, is the loss value of the generator, is the loss value of the discriminator, is the expected value of the corresponding distribution, is the distribution of the random noise vector z , is the discriminant function, is the sample generated by the generator, is the probability that the discriminator considers the generated sample to be real. The training goal of the generator is to maximize the generation ability of the real sample. The discriminator is composed of two parts to process the real sample and the generated sample, respectively. is a real sample sampled from the real data probability distribution. In formula (2), the first term represents the probability that the discriminator determines is a real sample. During the training process, the generator and the discriminator continuously update their own parameters in order to minimize their own loss. At this time, the generator and the discriminator establish a game and confrontation relationship in the alternating training process, and the objective function of the maximum-minimum game training is obtained by combining the two formulas, as shown in formula (3).
[0040] (3)
[0041] wherein, is the joint objective function value.
[0042] Finally, the model is trained according to the objective function of the above formula until the Nash equilibrium is reached.
[0043] R3GAN is based on DCGAN, updates the loss function, and introduces a related penalty term. In the GAN adversarial game process described above, R3GAN replaces the standard DCGAN loss with a relative pairing GAN (RpGAN). In contrast, the loss of RpGAN is sent into the loss function by the difference between the discriminator outputs of a pair of real and fake samples, rather than the discriminator inputs of real and fake samples respectively. For the discriminator D, the difference is processed using a sigmoid function, and the loss function is as formula (4). For the generator G, the goal is to maximize the output of the generated sample relative to the output of the real sample, and the loss function is as formula (5).
[0044] (4)
[0045] (5)
[0046] Where σ(.) is the sigmoid function.
[0047] The training process of the generator G and the discriminator D is modeled as a maximum-minimum adversarial game problem. RpGAN no longer considers the independent outputs of the discriminator to real samples and generated samples , but measures the discriminant ability of the discriminator by constructing the relative output difference between real and fake samples. This relative prediction structure is more in line with the nature of the adversarial game, effectively avoiding the common problems of gradient disappearance and discriminator over-strength in traditional GANs.
[0048] Specifically, RpGAN takes the output difference of the discriminator to real and generated samples as input, maps it to the probability space through the sigmoid function, and thus defines a new loss function. The core advantage of this structure is to emphasize the modeling ability of the discriminator for "relative authenticity", rather than to absolutely distinguish an input as true or false. The adversarial target can be written as formula (6).
[0049] (6)
[0050] This difference-based training strategy essentially enhances the antagonism between the discriminator and the generator, which is conducive to improving the stability of the training and the quality of the generated samples, and is especially suitable for complex distribution fitting and generation tasks.
[0051] Furthermore, during GAN training, if the discriminator responds drastically to small changes in the input, it may lead to training instability, vanishing or exploding gradients in the generator. Therefore, a "gradient penalty mechanism" is needed to regularize the gradient of the discriminator. The goal of gradient penalty is to constrain the discriminator to maintain a smooth mapping within its input domain, thereby enabling the generator to stably acquire effective gradient information.
[0052] Based on the form of gradient penalty, it can be divided into zero-centered gradient penalty (0-GP) and one-centered gradient penalty (1-GP): 0-GP: requires the gradient norm of the model at any input point to be as close to 0 as possible, indicating that the model is insensitive to input perturbations and the output is stable. 1-GP: requires the model output to have consistent sensitivity to input changes, i.e., the gradient norm is close to 1, often used in architectures such as Wasserstein GAN. Within the 0-GP framework, two further distinctions are made between gradient penalty strategies for different input types: and ; This indicates that a penalty is imposed on the gradient of the discriminator input on real samples; This indicates that a penalty is applied to the gradient of the discriminator input on the generated samples. The specific forms are shown in Equations (7) and (8).
[0053] (7)
[0054] (8)
[0055] in, For discriminator parameters, The input represents the real sample. Indicates the discriminator pair x gradient, gamma These are hyperparameters that control the strength of the gradient penalty. Indicates the generation of samples, Indicates the discriminator pair The gradient. Constraining the discriminator's output smoothness near real samples helps the discriminator avoid overfitting and ensures accurate modeling of the real distribution. Constraining the gradient of the discriminator in the pseudo-sample region prevents it from reacting too strongly to generated samples, which helps to improve the diversity and distribution similarity of generated samples.
[0056] The above and The gradient penalty term is not applied to the generator's training process, but rather serves as an additional regularization term in the discriminator's loss function to control the discriminator's sensitivity to input data. In adversarial training, the generator aims to make the generated samples as indistinguishable from real samples as possible, while the discriminator aims to correctly distinguish between real and fake samples. To prevent the discriminator from generating overly steep discrimination boundaries (i.e., excessively large gradients or oscillations) around real or generated samples, a penalty term is added to its loss function for constraint. Unlike most GAN models that only use... Unlike other methods, R3GAN applies penalties simultaneously during training. and Two gradient penalties, let the discriminator adversarial loss be... The optimization objective of the complete discriminator is as shown in formula (9).
[0057] (9)
[0058] in, To optimize the target value for the discriminator, The discriminant is the adversarial loss term, and the discriminant's loss function is given by formula (10).
[0059] (10)
[0060] The loss function of the generator is independent of the gradient penalty term, and its form is Equation (11).
[0061] (11)
[0062] The objective function for the joint antagonistic optimization of the two is shown in formula (12).
[0063] (12)
[0064] in, for The weighting coefficients, for The weighting coefficients.
[0065] In summary, the RpGAN+ used in this application + The loss function form constitutes the basic framework of R3GAN, effectively alleviating problems such as gradient vanishing, unstable convergence, and discriminator overfitting in traditional GAN training, thereby improving the stability and realism of the generated results. It is a general-purpose augmented adversarial training structure suitable for various complex scenarios. The structural framework diagram of the R3GAN model is shown below. Figure 4 As shown.
[0066] To improve the structural consistency and time series coupling fidelity of the rural multi-energy load (including cold, heat, electricity, hydrogen, wind, light, etc.) time series scene data generation, the application further proposes a reinforcement generation mechanism fused with historical data, and embeds it into the generator design in the generative adversarial network. Specifically, under the R3GAN framework, only the generator structure is enhanced, a global modeling module of historical time series characteristics-Transformer is introduced, and the time series context features extracted by it are spliced and fused with the random latent variables used by traditional GAN to form a composite generation structure with historical perception ability and diversity expression ability. The module is used to capture the cross-variable long dependence structure between global time steps, realize more interpretable, periodic and trend data fitting ability, effectively make up for the structural defects of the generator relying on local convolution structure and being difficult to model global mode changes, and is suitable for simulating complex energy time series curves.
[0067] The Transformer model breaks through the limitations of traditional CNN, recurrent neural network and other architectures, and builds the overall model with attention mechanism as the core, which is used to extract the correlation features between multiple variables. Among them, the multi-head attention method can more efficiently mine the correlation information before and after the sequence. Similar to other sequence models, the Transformer model uses attention mechanism as a feature processing unit, and its structure includes encoder and decoder parts.
[0068] In the encoder part of the Transformer, it is stacked by N identical layers. Each layer has two sub-layers: multi-head self-attention and feed-forward neural network, and residual connection and normalization processing are also used around the sub-layers. The decoder is also stacked by N identical layers, each layer has two sub-layers in the encoder, and a masked multi-head self-attention sub-layer is inserted to use only previous data as a reference when predicting sequences. Similarly, residual connections are used around the three sub-layers, and then layer normalization is performed.
[0069] The workflow of a Transformer model when performing a sequence-to-sequence task is roughly as follows: the input data to the encoder is first processed by a multi-head self-attention layer. In this layer, the query vectors, key vectors, and value vectors are all generated directly from the input data. After the self-attention computation is complete, the encoder passes the output of the multi-head self-attention layer to a feed-forward neural network as input. The decoder has a slightly different processing flow. At the beginning, it receives the keys and values from the encoder, and it also uses a masked multi-head self-attention layer to obtain the query vectors. Then, the three key vectors are passed together to the multi-head attention layer of the decoder. This is done to ensure that the decoder can only refer to the previous sequence information when generating the output of the current position. After the attention computation is complete, the decoder passes the output of the multi-head self-attention layer to a feed-forward neural network for processing. Finally, after a fully connected layer and a Softmax transformation, the decoder outputs the final result of the model. The following are the important technical points in the Transformer module:
[0070] (1) Position encoding: The Transformer adds position encoding at the bottom of the encoder and decoder, which is used to consider the position information of sequence elements when performing self-attention calculation. Without position encoding, the input of the Transformer will only be a collection of elements, lacking the key information of order, and no longer a sequence with cause and effect. The Transformer uses triangular position encoding, and the specific formula is shown in equations (13) and (14).
[0071] (13)
[0072] (14)
[0073] where, represents the encoding result at , represents the encoding result at , represents the position index, represents the dimension index, is the dimension size of the word embedding. By element-wise adding the position encoding to the word embedding vector, a new vector representation that integrates position information is obtained. This approach ensures that the encoding of different positions has similar distance differences, while maintaining independence between dimensions. At the same time, this approach allows the model to easily learn and focus on relative position information, because for any constant offset k , the position encoding can be directly derived from using a linear function.
[0074] (2) Self-attention mechanism: The self-attention mechanism gives the model the ability to flexibly allocate attention according to different parts of the input sequence, enabling it to more effectively capture long-range dependencies between sequences, thus improving the model's understanding and processing capabilities. It is optimized and innovated on the basis of traditional attention mechanisms, and compared to the latter, it improves the model's attention and processing capabilities for key information in the input data, thus improving the model's performance and performance. In the self-attention layer, all query vectors Q, key vectors K, and value vectors V are generated directly from the input data itself without relying on external information. Assuming the input matrix is X, Q, K, and V can be represented as formula (15).
[0075] (15)
[0076] where, is the weight matrix of the query vector, is the weight matrix of the key vector, is the weight matrix of the value vector.
[0077] In the Transformer, scaled dot-product attention is used, which measures the strength of the association between queries and keys by calculating the dot product of queries and keys and scaling them. Through this mechanism, the Transformer can calculate a set of weights and then get a weighted value vector based on these weights. The specific calculation formula is formula (16).
[0078] (16)
[0079] (3) Multi-head attention mechanism: Multi-head attention is composed of multiple attention mechanisms, through which the model can focus on the information in multiple location subspaces of the input data in parallel, thus enhancing its ability to express multiple information and more effectively processing local and global context relationships. The Transformer divides Q, K, and V into H attention heads , each of which is calculated independently and then combined, with the calculation formula as follows:
[0080] (17)
[0081] (18)
[0082] where, is the multi-head attention weighted value vector, is the weight matrix of the multi-head attention, is the query weight matrix of the h th attention head, is the key weight matrix of the hkey weight matrix of the attention head, value weight matrix of the first h attention head.
[0083] The structural schematic diagram of the Transformer model is shown in Figure 5 The input is linearized and encoded first, then integrated with the position encoding, and then processed by the multi-head attention mechanism, then added with the specification by the residual connection, then processed by the feedforward network, then added with the specification by the residual connection, and finally output after linearization.
[0084] To solve the problem that the traditional generative adversarial network ignores the historical evolution rule in the multi-source load scene modeling and the generated results lack time consistency and energy coupling characteristics, the application provides a historical sequence modeling mechanism based on Transformer, and fuses the historical feature vector coded by the mechanism and random latent noise as the input of the generator, so as to improve the modeling ability of the generation network to the time structure and the coupling relationship between the multi-source loads.
[0085] The multi-energy load data in the application covers typical multiple energy forms in a rural comprehensive energy system, including but not limited to wind energy, photovoltaic energy, biomass energy, hydraulic energy, electric energy, cold and heat load, natural gas load and hydrogen load, etc. The time series data resolution can be 5 minutes or 15 minutes, which embodies the complex characteristics of strong coupling, multiple cycles and strong seasonality. In order to fully mine the time evolution structure of the historical data and provide time context information guidance in the generation process, it is proposed to first send the historical multi-energy load time series into the Transformer encoder based on the self-attention mechanism for deep feature extraction.
[0086] Specifically, the Transformer encoder can capture the long-distance dependency relationship between the multi-energy loads on the historical time axis through the multi-head self-attention mechanism. Let the input historical multi-energy load time series be formula (19).
[0087] (19)
[0088] wherein, denotes the multi-energy load data at the 1st time step, T denotes the number of time steps, dThe multi-energy load category and its characteristic dimension contained in each time step are represented, specifically including wind speed and wind power output, light intensity and photovoltaic power generation, biomass boiler output, hydropower station output, electrical load, thermal load, cold load, gas load and hydrogen load, etc. These multi-source loads have strong correlation, high volatility, and significant diurnal periodicity. The traditional GAN model often has difficulty modeling such time-dependent structures, so the global dependence modeling mechanism is introduced through the Transformer module to overcome this problem.
[0089] The Transformer module first performs position encoding on the historical multi-energy load time series, introduces the time sequence, and then generates three groups of vector representations of queries, keys and values through linear transformation. The specific calculation is as shown in formula (20).
[0090] (20)
[0091] Next, the scaled dot-product attention mechanism is used to calculate the attention weight of each time step to other time steps , the specific calculation is as follows:
[0092] (21)
[0093] wherein, is the dimension of the query and key vectors, denotes the similarity calculation result between the query vector of each time step and all keys, and the normalized attention weight coefficient of each time step to other time steps is obtained. Here, the normalized attention weight obtained after softmax is defined as , which represents the attention degree of the query vector of the time step to the key of the time step. The attention weight is a probability distribution about the row, satisfying formula (22).
[0094] (22)
[0095] This mechanism can adaptively capture nonlinear dependencies such as “nighttime electrical load changes and next morning wind power output” or “indirect regulation of hydrogen demand caused by winter thermal load” and assign different degrees of weight to them.
[0096] After obtaining the normalized attention weight , the weights are further used to weight and sum the value vectors of all time steps. Specifically, for the t time step in the historical multi-energy load time series, the context representation vector It can be calculated by the following formula:
[0097] (23)
[0098] wherein, is the vector composed of the first t row of the matrix, and its elements are , The weighted summation operation reconstructs each time step in the historical multi-energy load time series into a new representation in the global range, which has significantly exceeded the expression capacity of the local time sequence neighborhood, and has global time perception ability and comprehensive modeling ability across energy categories.
[0099] Finally, the context representation vectors of all time steps are combined together, i.e., to constitute the fusion historical feature tensor, as formula (24).
[0100] (24)
[0101] The Transformer module outputs the fusion historical feature tensor which contains the global dynamic characteristics of various energy loads in the time evolution process.
[0102] In order to reduce the input dimension of the generator and enhance the generalization ability, the is further compressed into a time sequence context feature vector by mean pooling (or other strategies), as formula (25).
[0103] (25)
[0104] The time sequence context feature vector can be regarded as a compressed representation of the running state of multi-energy load in the historical time period, which carries sufficient global time sequence context information and is used as the conditional input of the generator. In order to maintain the ability of the generator to generate diversity, a random latent noise variable is further introduced and spliced with to form the joint input vector of the generator, as formula (26), wherein, is the dimension of the random latent noise variable.
[0105] (26)
[0106] The joint input vector is sent into the generator G to generate a set of multi-energy load scenarios corresponding to the future time period T'. Since its generation process is controlled by random disturbance and historical evolution characteristics, the generated results have certain diversity while having high historical consistency and physical coupling rationality.
[0107] The biggest advantage of the structure is to integrate the key context information of "historical multi-energy load time series" into the latent space of the generator. By introducing the Transformer model to model the global features of historical multi-source load data, the nonlinear relationship and collaborative evolution law between various energy loads over time can be deeply understood and mined, thereby improving the structural consistency and system controllability of the generated scenario sequence. In addition, the splicing and fusion of latent noise also retains the generation diversity and flexibility of the model, ensuring that the "overfitting history" limitation is not encountered when performing typical scenario expansion.
[0108] Further, the discriminator D receives the multi-energy load scenario set generated by the generator or the real historical subsequent sequence , and the time sequence context feature vector , jointly judges the authenticity and conditional consistency, and based on the basic framework of R3GAN, the objective function during training is formula (27).
[0109] (27)
[0110] Through the above structure design and modeling process, the generator not only has the "historical understanding ability" that traditional GAN lacks, but also can reasonably restore and variate reconstruction when constructing complex coupled scenarios such as "high wind and low light", "high cold load and high hydrogen consumption", etc., greatly improving the accuracy, authenticity and time sequence consistency of the multi-source load full-scenario construction method of rural energy systems, and providing a high-credibility data foundation for regional microgrid operation simulation, multi-strategy dispatching optimization and energy planning decision-making and other practical applications.
[0111] In one specific application example, the process of dynamically adjusting the learning rate using the cosine annealing algorithm and the hot restart mechanism includes: dividing the training process of the scenario generation model into multiple learning rate adjustment periods, and determining a minimum learning rate, a period growth factor, a learning rate decay factor, a maximum learning rate of a first learning rate adjustment period, and a length of the first learning rate adjustment period. In each learning rate adjustment period, based on the length of the current learning rate adjustment period, the cosine annealing algorithm is used to control the learning rate to gradually decrease from the maximum learning rate of the current learning rate adjustment period to the minimum learning rate. At the end of each learning rate adjustment period, the hot restart mechanism is triggered, the length of the next learning rate adjustment period is determined according to the period growth factor and the length of the current learning rate adjustment period, and the maximum learning rate of the next learning rate adjustment period is determined according to the learning rate decay factor and the maximum learning rate of the current learning rate adjustment period.
[0112] To address the complex spatiotemporal nonlinear coupling characteristics between highly volatile renewable energy sources such as wind, solar, biomass, and hydropower, and loads such as electricity, heat, cooling, hydrogen, and gas, this application constructs a scene generation model based on an R3GAN-fused adversarial generative network and a multi-head attention Transformer structure. To address the stability, generalization ability, and convergence efficiency issues of the scene generation model during actual training, especially in the face of the extreme imbalance, drastic fluctuations, and complex coupling relationships of multi-energy data structures in rural areas, traditional fixed learning rate or coarse-grained adjustment strategies significantly limit the model's fitting ability and optimization path. Therefore, this application proposes a dynamic learning rate adjustment strategy based on a combination of cosine annealing and a warm restart mechanism. This strategy allows for high-resolution, periodic, and adaptive dynamic adjustment of the learning rates of the generator and discriminator optimizers during training, overcoming typical problems such as coarse-grained optimization, localized convergence paths, and the tendency for learning rates to oscillate or vanish, thereby improving the global optimal search ability and generalized data coverage of the generation model.
[0113] The core idea of this method is to treat each complete training phase as a learning rate adjustment cycle. Within the learning rate adjustment cycle, the cosine annealing algorithm is used to control the learning rate to gradually decrease from the maximum value to the minimum value, so as to realize the parameter search path from coarse-grained to fine-grained convergence. At the end of each learning rate adjustment cycle, a hot restart mechanism is triggered to readjust the learning rate to the initial maximum value, so that the model has the ability to periodically jump out of the local minimum region and continue to perform global search, avoiding the problem of performance plateau or gradient stagnation under complex loss function structure.
[0114] Traditional learning rate adjustment strategies, such as constant, linear decay, and exponential decay, are ineffective in handling the dynamic process of periodic divergence and convergence in generative adversarial networks (GANs), especially when dealing with multimodal and complex coupled data (such as rural heating, cooling, electricity, and hydrogen loads), which are more prone to getting trapped in local minima. The cosine annealing algorithm, leveraging the nonlinear convergence characteristics of the periodic cosine function, allows the learning rate to gradually decay from an initial high value to a minimum, making it suitable for generator training processes that require exploration before convergence. The core idea of the cosine annealing algorithm is to design the learning rate change trend as part of a complete cosine function, so that in each learning rate adjustment cycle, it first decreases rapidly and then slowly approaches a lower value, maintaining a certain perturbation during the training process as it approaches convergence, thus avoiding early trapping in local minima. Its learning rate adjustment formula is shown in formula (28).
[0115] (28)
[0116] in, For the first m Learning rate at the next iteration The preset minimum learning rate, is a preset maximum learning rate, is the current iteration number in the learning rate adjustment period, is the length of the first n learning rate adjustment period. The formula presents a descending curve: fast at the beginning and slow at the end, so that the model can quickly learn the global structure at the initial stage and then stably optimize the detailed features, which is beneficial for simulating the multi-scale evolution trend of rural landscape cold and heat loads.
[0117] Although the cosine annealing can achieve a soft learning rate descending process, it may still cause the model to fall into a local optimum in multiple rounds of training, making it difficult to jump out of a specific modal region (for example, the generator always generates a high-frequency fluctuation pattern of summer electricity load, lacking an autumn slow curve or an extreme high-temperature cold load scenario). To improve the "perturbation jump" ability of training, a warm restart mechanism is introduced, that is, after the end of each learning rate adjustment period , the learning rate is reset to the maximum value , and a new round of periodic annealing is started to simulate an "optimization perturbation". This mechanism is equivalent to "reinitializing the search direction randomly" in the function space, preventing the model from converging to a non-optimal modal.
[0118] n However, if each warm restart starts from the same high value without restraint, it may cause excessive oscillation, training divergence, and finally difficulty in stable falling into the global optimal interval. Therefore, to solve this problem and maintain the convergence of the perturbation, a "round-by-round decreasing" strategy is adopted: as the cycle number n increases, the length of each learning rate adjustment period and the maximum learning rate are decreased round by round. Specifically, the length of the first learning rate adjustment period and the maximum learning rate are calculated using formula (29).
[0119] (29)
[0120] wherein, is the initial cycle length, is the initial maximum learning rate, is the maximum learning rate of the first n learning rate adjustment period, is the cycle growth factor, , is the learning rate decay factor, . In this way, multiple rapid explorations can be achieved at the initial stage, and gradual stable convergence can be achieved at the later stage, which is beneficial for the model to gradually approach the global optimum. The cycle and peak value changes of the cosine annealing method combined with the warm restart mechanism are shown in Figure 6 .
[0121] In summary, the dynamic learning adjustment process of the cosine annealing algorithm combined with the warm restart mechanism is as follows.
[0122] ①Initialization setting 、 、 、 、 and other hyperparameters.
[0123] ②At the beginning of each training round, initialize the cycle count n = 0, and the current iteration step m = 0.
[0124] ③In each learning rate adjustment cycle , dynamically calculate the current learning rate according to the current iteration number , which is used to optimize the update of the generator and the discriminator.
[0125] ④Whenever , that is, a learning rate adjustment cycle ends, perform a warm restart: , , , .
[0126] ⑤Repeat the above process until the generator loss no longer decreases or the preset training rounds are reached.
[0127] In summary, based on the adversarial generation framework constructed based on R3GAN and Transformer, the application further introduces a dynamic learning rate adjustment strategy combining cosine annealing algorithm and warm restart mechanism. This strategy achieves a dynamic balance between "global exploration" and "local convergence" by periodically annealing the learning rate from a high value to a low value and restarting it to a high value at the end of each cycle, while gradually decaying the peak value and lengthening the cycle. This significantly improves the stability and diversity generation capability of the training, effectively avoids the generator from falling into local optimum or mode collapse problem, and ensures the fitting quality and wide coverage of the generated multi-energy load time series scenario under multiple spatio-temporal scales, thereby providing a more reliable and representative data basis for rural energy system planning and optimization.
[0128] By constructing a dynamic training strategy that combines R3GAN, introduces a Transformer module, and combines cosine annealing and warm restart mechanism, the application realizes high-quality generation of multi-energy load (wind, light, biomass energy, water and electricity, electricity, heat load, cold load, gas load, and hydrogen energy load) joint time series scenario with time structure characteristics, energy diversity, and collaborative coupling relationship. Not only does it have historical information perception ability and potential noise disturbance fusion mechanism, but also maximizes the restoration of historical data evolution rules and source load coupling characteristics while maintaining a certain degree of diversity in the generated samples.
[0129] In step 203, a dynamic time warping distance method and a K-Medoids clustering method are used to reduce the scenes in the multi-energy load scene set, to obtain a typical multi-energy load representative scene set.
[0130] The multi-energy load scene set generated in step 202 has the following characteristics: first, it covers the joint multi-dimensional output of multiple types of energy loads (wind, light, biomass energy, cold, heat, electricity, hydrogen, etc.), rather than a single source load dimension; second, it is based on context modeling of historical data rather than independent sampling generation, and has high time consistency and coupling correlation.
[0131] However, in the actual planning and scheduling analysis of rural energy systems, relying only on large-scale generated full scene data will bring high computational resource overhead, information redundancy and decision difficulty. Especially in subsequent applications such as energy configuration optimization, multi-energy coupling scheduling, energy storage capacity design, and typical day construction, it is necessary to effectively reduce or represent the generated multi-energy load scene set, that is, to realize the "reduction of multi-energy load full scene" process, to ensure that the scene is representative, retains diversity, and reduces redundancy. Therefore, on the basis of scene generation, the application further proposes a scene reduction method.
[0132] The method closely combines the characteristics of the multi-energy load scene set output by the scene generation module, considers the periodicity, non-stationarity and dynamic coupling of multi-energy load time series data from the structure, uses a method based on dynamic time warping (Dynamic Time Warping, DTW) distance measurement and cross-dimensional clustering fusion, and realizes the extraction of typical structural patterns in the large-scale generated scene set, thereby forming a typical multi-energy load representative scene set with smaller data volume but covering the main dynamic patterns of the original scene.
[0133] In one specific application example, step 203 includes the following steps 31 and 32.
[0134] In step 31, the structural similarity between scenes in the multi-energy load scene set is measured using a dynamic time warping distance method, to obtain a multi-energy load scene distance matrix.
[0135] Specifically, for any two scenes in the multi-energy load scene set, the dynamic time warping distance between the two scenes is calculated to obtain a distance vector between the two scenes. According to the multi-energy load scene set, the importance weight of each type of source load is determined. According to the importance weight of each type of source load, the distance vector between the two scenes is extended to a weighted multi-dimensional distance. According to the weighted multi-dimensional distance between each two scenes in the multi-energy load scene set, a multi-energy load scene distance matrix is constructed.
[0136] Due to the different time distribution of various source and load variables in rural energy systems, the traditional Euclidean distance and other fixed time alignment measurement methods cannot accurately capture the deep similarity in time structure between different scenarios. To solve the above problems, the application introduces DTW distance as the structural similarity measurement basis between multi-energy load joint scenarios, thereby supporting the subsequent typical scenario extraction and structure reduction process.
[0137] The core idea of DTW is to allow two time series to be flexibly aligned in the time dimension, even if the two time curves have slightly different peak and valley times, they can still be identified as having structural similarity. This is particularly important for data with time dislocation characteristics in rural energy systems such as wind power (affected by weather changes photovoltaic), biomass energy (adjustable working conditions), and cooling load (affected by daytime temperature lag).
[0138] Specifically, there are two one-dimensional time series, as shown in equation (30).
[0139] (30)
[0140] The goal of DTW is to find an optimal matching path on a two-dimensional index grid (p, q) , as shown in equation (31).
[0141] (31)
[0142] So that , The path must satisfy the following constraints: boundary constraint: start at (1, 1) and end at (T, T); monotonicity constraint: time index increases, i.e. , ; step constraint: only right, down or diagonal forward, i.e. (1, 0), (0, 1), (1, 1). On this basis, the cumulative distance is obtained, as shown in equation (32).
[0143] (32)
[0144] This formula represents finding a minimum cumulative cost path among all possible time alignment paths, thereby achieving accurate matching of "misaligned trends".
[0145] In this application, each scenario in the multi-energy load scenario set is represented by equation (33).
[0146] (33)
[0147] Wherein, FThe quantity of multiple energy sources in rural areas, such as wind power, photovoltaic power, biomass energy, hydropower, electrical load, heat load, cooling load, gas load, hydrogen load, etc. T Let be the number of time steps; this formula represents the number of steps in time. c In each scenario F Source load in T The joint evolutionary process at each time step.
[0148] For each source load (i.e., scene) The f Extract its one-dimensional time series from the column, as shown in formula (34).
[0149] (34)
[0150] For any two scenarios and , for the f The source load is matched in one-dimensional DTW, as shown in formula (35).
[0151] (35)
[0152] Each, It is a scalar, representing the first... f Source load in scene With scene The dynamic morphological differences between them, for the scene With scene Calculate all F The DTW distances corresponding to the source and class loads form a length of F The distance vector is given by formula (36).
[0153] (36)
[0154] in, For the scene With scene The distance vector between them.
[0155] In order to F Multiple dynamic time-warped distances are merged into a single structural distance metric, thus merging the scene... With scene The similarity measure is extended to a weighted multidimensional distance, as shown in formula (37).
[0156] (37)
[0157] in, For the scene With scene The weighted multidimensional distance between them For the firstf The importance weight of the source load class, the calculation formula of which is formula (38).
[0158] (38)
[0159] wherein, is the scene standard deviation of the first f class source load, is the scene mean of the first f class source load, is the coefficient of variation of the first f class source load. Thus, higher attention is given to variables with volatility and uncertainty, and low- volatility variables such as cold load and electric load are avoided in distance calculation.
[0160] After the calculation is completed, a symmetric multi-energy load scene distance matrix can be constructed, as shown in formula (39).
[0161] (39)
[0162] As the input of the clustering algorithm, the multi-energy load scene distance matrix can achieve the following goals by performing reduction in the distance space: extracting typical evolutionary trend scenes and retaining structural patterns of wind, light, gas, and hydrogen; avoiding deviation of the scene set after reduction from the original distribution center or loss of important structural features; and reducing the computational complexity and simulation dimension of subsequent energy system scheduling modeling.
[0163] Step 32, according to the multi-energy load scene distance matrix, a K-Medoids clustering method is used to reduce the scenes in the multi-energy load scene set, and a typical multi-energy load representative scene set is obtained.
[0164] To cope with a large-scale joint time sequence scene set composed of wind power, photovoltaic, biomass energy, hydropower, electric load, thermal load, cold load, gas load, and hydrogen load, and further improve modeling efficiency and reduce redundant information while maintaining the time sequence structural features and cross-correlation of each energy load source, a K-Medoids clustering reduction strategy based on the DTW distance matrix is proposed to achieve representative typical sample selection.
[0165] This method is based on the constructed multi-energy load scene distance matrix , wherein, S is the number of scenes in the multi-energy load scene set, and the element in the multi-energy load scene distance matrix represents the distance between scene and scene Weighted dynamic time warping similarity measure of multiple energy load scenarios under wind, light, water, biomass, electricity, heat, cold, gas, hydrogen, etc. The multi-energy load scenario distance matrix comprehensively reflects the "morphological structure distance" between different scenarios in peak-shifting evolution, structural deformation and variable coupling characteristics, providing a high-fidelity, structure-preserving spatial basis for subsequent clustering.
[0166] The multi-energy load scenario distance matrix is symmetric, reflecting the weighted structural similarity of the source load time sequence form between any two scenarios. The goal is to divide the original S scenarios into U clusters, and select a representative scenario from each cluster as the typical representative of the class.
[0167] K-Medoids is a divisive clustering method that uses sample points themselves as cluster centers, especially suitable for similarity measurement in non-Euclidean space, such as the nonlinear structural DTW distance used in this application. The core goal of K-Medoids is to minimize the sum of DTW distances from all sample points to their cluster centers, as shown in equation (40).
[0168] (40)
[0169] wherein, is the index set of the u th cluster, is the representative scenario of the cluster, i.e. the representative scenario with the smallest total distance, is the weighted multi-dimensional distance between scenario and scenario .
[0170] The detailed steps of K-Medoids scenario reduction are as follows.
[0171] ① Initialize the representative scenario set: select U scenarios from the multi-energy load scenario set as the initial representative scenario set . Let the iteration step be , and the initial representative scenario index be as shown in equation (41).
[0172] (41)
[0173] ② Sample assignment stage: for each scenario, find the nearest representative scenario, as shown in equation (42).
[0174] (42)
[0175] wherein, is the nearest representative scenario to scenario . Assign scenario to the cluster where the DTW distance is the smallest .
[0176] This step is equivalent to constructing a cluster label function, as shown in equation (43).
[0177] (43)
[0178] ③ Representative scenario update phase: for each cluster , find the scenario with the minimum sum of DTW distances within the cluster as the new representative scenario, as shown in equation (44).
[0179] (44)
[0180] This means that the new representative scenario is the most "representative" scenario within the cluster, with the minimum sum of DTW distances from all members. This update avoids the problem of the mean center deviating from the true sample point, and is particularly suitable for the demand for maintaining true interpretability of multi-energy load scenarios.
[0181] ④ Iteration and convergence judgment: repeat steps ② and ③ until all representative scenarios no longer change: or the clustering cost function converges: or the maximum number of preset iterations T is reached max ; wherein, is a preset clustering cost threshold, is the clustering cost at the j th iteration.
[0182] ⑤ Output typical multi-energy load representative scenario set: finally obtain U representative scenario indexes: . Then the typical multi-energy load representative scenario set is: .
[0183] Each is an actual sample point, maintaining the physical structure of the true wind, light, biomass, water, electricity, heat, cold, gas, and hydrogen energy load coupling evolution path, providing structure- faithful input support for subsequent multi-objective scheduling optimization. The K-Medoids algorithm clustering reduction process is shown in Figure 7 .
[0184] In summary, for the high-dimensional, multi-variable, long-time series complex scenario data structure composed of multiple types of energy loads such as wind, light, biomass, water, electricity, heat, cold, gas, and hydrogen, this application proposes a K-Medoids clustering typical scenario reduction method based on DTW distance matrix. It has strong clustering expression ability, scenario structure preservation ability, and whole system modeling adaptability in multi-source coupling scenario dimension reduction.
[0185] The beneficial effects of the application include at least the following points.
[0186] 1) In view of the limitations of traditional GAN structure in modeling complex multi-source load data, an improved method based on R3GAN optimization framework is proposed. The relative discrimination loss function RpGAN and double gradient penalty term are introduced to effectively improve the expression ability of the generator in high-dimensional time series data and the sample quality while maintaining the stability of the training.
[0187] 2) A multi-energy load joint scene generation method based on R3GAN and Transformer fusion mechanism for rural multi-energy systems is proposed. This method combines the deep fusion of generative adversarial networks and time structure modeling, achieving joint fitting, coupled expression, and diversified generation of multiple renewable energy outputs and various terminal loads. By embedding a multi-head Transformer encoding module in the generator structure, the historical multi-source load time series segment is globally modeled, and the extracted context feature vector and random latent noise are spliced and fused to form a composite input tensor with historical perception ability and diversity control ability, ensuring the time consistency and physical coupling rationality of the generated results.
[0188] 3) A dynamic learning rate adjustment strategy based on the combination of cosine annealing function and hot restart mechanism is further designed and introduced to periodically disturb and adaptively anneal the learning rate to regulate the training rhythm of the generator and discriminator, effectively alleviating problems such as mode collapse, gradient shock, and unstable convergence during adversarial training, and improving training efficiency and model generalization ability.
[0189] 4) To address the redundancy and computational complexity of large-scale generated scene sets, a typical scene reduction method based on the combination of DTW distance measurement and K-Medoids clustering is proposed. This method constructs a similarity matrix between multi-energy load time series scenes using DTW distance, and extracts and reduces representative scenes through K-Medoids, effectively preserving the structural diversity and energy synergy of generated scenes, and reducing the data dimension of subsequent modeling and optimization tasks.
[0190] In summary, the present application can model similarity based on time dynamic characteristics and multi-source load collaborative features, and extract representative scenes from large-scale data sets of wind, light, biomass energy output, and cold, heat, electricity, gas, and hydrogen load, to extract a typical scene set with global structural representation, thereby improving modeling efficiency and ensuring the feasibility and convergence of subsequent system solutions.
[0191] Based on the same inventive concept, the embodiments of the present application also provide a rural energy system multi-energy load scene construction device for implementing the above-mentioned method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more rural energy system multi-energy load scene construction device embodiments provided below can be referred to the limitations of the method in the foregoing, which will not be described here.
[0192] In one exemplary embodiment, as shown in Figure 8 a rural energy system multi-energy load scene construction device is provided, which includes a data acquisition module 801, a scene generation module 802, and a scene reduction module 803.
[0193] The data acquisition module 801 is configured to acquire a historical multi-energy load time series of a rural energy system.
[0194] The scene generation module 802 is configured to generate a multi-energy load scene set of a future time period according to the historical multi-energy load time series, using a pre-trained scene generation model. The scene generation model is constructed based on a Transformer model and a regularization relative loss generated adversarial network, and the scene generation model dynamically adjusts the learning rate using a cosine annealing algorithm and a hot restart mechanism during training.
[0195] The scene reduction module 803 is configured to reduce the scenes in the multi-energy load scene set using a dynamic time warping distance method and a K-Medoids clustering method, to obtain a typical multi-energy load representative scene set.
[0196] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0197] In one exemplary embodiment, a computer readable storage medium is provided, storing a computer program, which is executed by a processor to implement the steps in the above method embodiments.
[0198] In one exemplary embodiment, a computer program product is provided, including a computer program, which is executed by a processor to implement the steps in the above method embodiments.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0200] In the present application, all actions of obtaining signals, information or data are carried out in compliance with the corresponding data protection regulations and policies of the place of residence and with the authorization given by the owner of the corresponding device.
[0201] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, databases or other media used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0202] The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0203] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0204] The principles and implementation manners of the present application are described herein by using specific examples, and the above examples are only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will have changes. In conclusion, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for constructing multi-energy load scenarios in rural energy systems, characterized in that, The method includes: Obtain historical multi-energy load time series of rural energy systems; Based on the historical multi-energy load time series, a pre-trained scene generation model is used to generate a set of multi-energy load scenes for future time periods. The scene generation model is constructed based on the Transformer model and a regularized relative loss generative adversarial network, and the learning rate of the scene generation model is dynamically adjusted during training using a cosine annealing algorithm and a hot restart mechanism. Specifically, based on the historical multi-energy load time series, a pre-trained scene generation model is used to generate a set of multi-energy load scenes for future time periods. This includes: extracting features from the historical multi-energy load time series using a Transformer model to obtain a temporal context feature vector; concatenating and fusing the temporal context feature vector with a random latent noise vector to obtain a joint input vector; and using a regularized relative loss generative adversarial network (GAN) based on the joint input vector to generate a set of multi-energy load scenes for future time periods. The joint input vector serves as the input to the generator of the regularized relative loss GAN. The scene set of the multi-energy load scene set is reduced by using the dynamic time warping distance method and the K-Medoids clustering method to obtain a typical multi-energy load representative scene set.
2. The method for constructing multi-energy load scenarios in rural energy systems according to claim 1, characterized in that, The process of dynamically adjusting the learning rate using the cosine annealing algorithm and warm restart mechanism includes: The training process of the scene generation model is divided into multiple learning rate adjustment periods, and the minimum learning rate, period growth factor, learning rate decay factor, maximum learning rate of the first learning rate adjustment period and length of the first learning rate adjustment period are determined. Within each learning rate adjustment period, based on the length of the current learning rate adjustment period, the cosine annealing algorithm is used to control the learning rate to gradually decrease from the maximum learning rate of the current learning rate adjustment period to the minimum learning rate. A warm restart mechanism is triggered at the end of each learning rate adjustment cycle. The length of the next learning rate adjustment cycle is determined based on the cycle growth factor and the length of the current learning rate adjustment cycle. The maximum learning rate of the next learning rate adjustment cycle is determined based on the learning rate decay factor and the maximum learning rate of the current learning rate adjustment cycle.
3. The method for constructing multi-energy load scenarios in rural energy systems according to claim 1, characterized in that, Each scenario in the multi-energy load scenario set includes the joint evolution process of each type of source load in the rural energy system at each time step within a future time period.
4. The method for constructing multi-energy load scenarios in rural energy systems according to claim 1, characterized in that, The scene set of the multi-energy load scene set is reduced by using the dynamic time warp distance method and the K-Medoids clustering method to obtain a typical multi-energy load representative scene set, which specifically includes: The structural similarity between the multi-energy load scene clusters is measured using the dynamic time warping distance method, and the multi-energy load scene distance matrix is obtained. Based on the distance matrix of the multi-energy load scene, the K-Medoids clustering method is used to reduce the number of scenes in the multi-energy load scene set to obtain a typical multi-energy load representative scene set.
5. The method for constructing multi-energy load scenarios in rural energy systems according to claim 4, characterized in that, The structural similarity between the multi-energy load scene clusters is measured using the dynamic time warping distance method, resulting in a multi-energy load scene distance matrix, which specifically includes: For any two scenarios in the multi-energy load scenario set, calculate the dynamic time-warped distance between the two scenarios to obtain the distance vector between the two scenarios; Based on the multi-energy load scenario set, determine the importance weight of each type of source load; Based on the importance weight of each type of source payload, the distance vector between two scenes is expanded into a weighted multidimensional distance; Based on the weighted multidimensional distance between each pair of scenarios in the multi-energy load scenario set, a multi-energy load scenario distance matrix is constructed.
Citation Information
Patent Citations
New energy capacity configuration method based on WGAN scene simulation and time sequence production simulation
CN112994115A
Renewable energy output scene generation method and device
CN118939996A
Virtual edge scene automatic generation system and method based on reinforcement learning
CN120431255A