Multi-energy load scene construction method for rural energy system

By combining the Transformer model and regularized relativistic loss to generate an adversarial network and dynamically adjusting the learning rate and clustering method, the problems of time mismatch and coupling loss in the construction of multi-energy load scenarios in rural energy systems are solved, high-quality and representative multi-energy load scenarios are generated, and the modeling and optimization efficiency is improved.

CN120807223AActive Publication Date: 2025-10-17NORTH CHINA ELECTRIC POWER UNIV

Patent Information

Application Number
CN202511299859.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-10-17
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Existing technologies lack structured methods suitable for collaborative modeling of multiple types of sources and loads in the construction of multi-energy load scenarios in rural energy systems, resulting in time mismatch and lack of coupling in generated data, and insufficient representativeness and completeness of the scenarios after reduction, making it difficult to adapt to the modeling and optimization needs of complex rural energy systems.

Method used

A scenario generation model is constructed by a generative adversarial network based on the Transformer model and regularized relativistic loss, and the learning rate is dynamically adjusted in combination with the cosine annealing algorithm and hot restart mechanism. The scenario reduction is performed through the dynamic time warping distance and K-Medoids clustering method to generate multi-energy-load joint time series scenarios with temporal structure characteristics, energy diversity and synergistic coupling relationships.

Benefits of technology

It achieves high-quality restoration of the evolution laws of historical data and the coupling characteristics between sources and loads, generates multi-energy load scenarios with high realism and physical consistency, improves the efficiency and accuracy of rural energy system modeling and decision-making, and reduces the computational burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807223A_ABST
    Figure CN120807223A_ABST
Patent Text Reader

Abstract

The invention discloses a rural energy system multi-energy load scene construction method, and relates to the field of comprehensive energy, and the method comprises the steps: obtaining a historical multi-energy load time sequence of a rural energy system; according to the historical multi-energy load time sequence, a scene generation model is adopted to generate a multi-energy load scene set in a future time period; the scene generation model is constructed based on a Transform model and a regularization relative loss generative adversarial network, and a cosine annealing algorithm and a hot restart mechanism are adopted to dynamically adjust the learning rate when the scene generation model is trained; and reducing scenes in the multi-energy load scene set by adopting a dynamic time warping distance method and a K-Medoids clustering method to obtain a typical multi-energy load representative scene set. According to the method, on the basis that the generated scene keeps a certain diversity, the historical data evolution law and the coupling characteristic between the source and the load are restored to the maximum extent, and extraction and reduction of the representative scene are achieved.
Need to check novelty before this filing date? Find Prior Art

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 construct 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. There are mainly two key problems in the current technology 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: obtaining a historical multi-energy load time series of a rural energy system; generating a multi-energy load scene set of a future time period according to the historical multi-energy load time series by 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 by using a cosine annealing algorithm and a hot restart mechanism during training; reducing scenes in the multi-energy load scene set by using a dynamic time warping distance method and a K-Medoids clustering method to obtain a typical multi-energy load representative scene set.

[0006] 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 regularization relative loss generated 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, 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 has historical information perception ability and potential noise disturbance fusion mechanism, but also makes the generated scene restore the evolution law of historical data and the coupling characteristics between sources and loads to the greatest extent on the basis of maintaining a certain diversity. At the same time, scene reduction is realized based on dynamic time warping and 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

[0007] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. 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 on the basis of these drawings.

[0008] Figure 1 The application environment diagram of the rural energy system multi-energy load scene construction method in an embodiment of the application.

[0009] Figure 2 The flowchart of the rural energy system multi-energy load scene construction method provided in an embodiment of the application.

[0010] Figure 3 The overall framework diagram of the rural multi-energy load full scene construction in an embodiment of the application.

[0011] Figure 4 The framework diagram of the regularization relative loss generated adversarial network in an embodiment of the application.

[0012] Figure 5 The structure principle diagram of the Transformer model in an embodiment of the application.

[0013] Figure 6 The periodic and peak change schematic diagram of the cosine annealing method combined with the hot restart mechanism in an embodiment of the application.

[0014] Figure 7 Flow chart of K-Medoids algorithm clustering reduction in an embodiment of the present application.

[0015] Figure 8 Functional module schematic diagram of a rural energy system multi-energy load scene construction device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0016] 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 work fall within the scope of protection of the present application.

[0017] 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 of wind, light, biomass energy and other inputs and multiple types of terminal loads such as cold, heat, electricity and hydrogen. 3) how to overcome the problems of lack of time structure modeling, mode collapse and unstable discriminator gradient in traditional generation methods, and 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, avoid the computational burden caused by redundant and lengthy simulation data, and improve the efficiency and operability of subsequent scheduling optimization.

[0018] 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 screen highly consistent and mutually cooperative joint input data sets between renewable outputs such as wind, light, biomass energy, 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.

[0019] In order to make the above-mentioned 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.

[0020] The rural energy system multi-energy load scene construction method provided by 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.

[0021] 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.

[0022] 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 embodiments of the present application, the method is applied to the server 102 in Figure 1 The following steps 201 to 203 are described.

[0023] Step 201, obtaining the historical multi-energy load time sequence of the rural energy system.

[0024] 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.

[0025] 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.

[0026] In a specific application example, step 202 includes the following steps 21 to 23.

[0027] 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.

[0028] Step 22, the time series context feature vector is spliced and fused with a random latent noise vector to obtain a joint input vector.

[0029] Step 23, according to the joint input vector, a regularized relativistic loss generative adversarial network is generated to generate a multi-energy load scenario set of a future time period. The joint input vector is used as the input of the generator of the regularized relativistic loss generative adversarial network.

[0030] 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 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.

[0031] 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.

[0032] 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.

[0033] In Generative Adversarial Networks (GAN), a random noise vector z that satisfies the Gaussian distribution is input into the generator G, and then the generator G outputs the generated sample . The real sample x and the generated sample are then sent to the discriminator D, and then the discriminator D outputs a scalar, which represents the probability that the input sample comes from the original data and the generated data. When training GAN, the two networks of generator G and discriminator D are trained alternately, and the network parameters are optimized through the minimax game learning of the two networks. Theoretically, when the Nash equilibrium is reached, the samples generated by the generator can accurately restore the distribution of real samples, while the discriminator cannot identify whether the samples are generated samples or real samples. During the training process, the output of the discriminator D is a probability value of 0-1. When the input is a real sample, the output value of the discriminator approaches 1, and when the input is a sample generated by the generator, the output value of the discriminator approaches 0. The loss functions of the generator and discriminator during training can be written as formula (1) and formula (2).

[0034] (1) (2) in, is the loss value of the generator, is the loss value of the discriminator, is the expected value of the corresponding distribution, is a random noise vector z The distribution of is the discriminant function, The samples 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 ability to generate real samples. The discriminator consists of two parts, which are used to process real samples and generated samples respectively. express is a real sample obtained by sampling from the probability distribution of real data. In formula (2), the first term represents the discriminator's decision is the probability of a true sample. During training, the generator and discriminator continuously update their parameters to minimize their own losses. At this point, the generator and discriminator establish a game-adversarial relationship during alternating training. Combining the two equations yields the objective function for minimax game training, as shown in Equation (3).

[0035] (3) in, is the value of the joint objective function.

[0036] Finally, the model is trained according to the objective function of the above formula until the Nash equilibrium is reached.

[0037] R3GAN is based on DCGAN, and updates the loss function and introduces related penalty terms. 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).

[0038] (4) (5) Where σ(.) is the sigmoid function.

[0039] 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 GAN.

[0040] 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 to "relative authenticity", rather than to absolutely distinguish whether an input is true or false. The adversarial target can be written as formula (6).

[0041] (6) 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.

[0042] Furthermore, during GAN training, if the discriminator responds drastically to small changes in the input, this can lead to unstable training and vanishing or exploding gradients in the generator. Therefore, a "gradient penalty mechanism" is needed to regularize the discriminator's gradients. The goal of the gradient penalty is to constrain the discriminator to maintain a smooth mapping within its input domain, thereby allowing the generator to stably obtain valid gradient information.

[0043] According to 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, that is, the gradient norm is close to 1, and is often used in architectures such as WassersteinGAN. Under the 0-GP framework, two gradient penalty strategies for different input types are further distinguished, namely: and ; Indicates that a penalty is imposed on the discriminator input gradient on the real sample; It means that the discriminator input gradient is penalized on the generated sample. The specific forms are as follows: Formula (7) and Formula (8).

[0044] (7) (8) in, are the discriminator parameters, represents the input of the real sample, Represents the discriminator pair x The gradient, gamma is a hyperparameter that controls the intensity of the gradient penalty. Indicates the generated sample, Represents the discriminator pair gradient. Constraining the output smoothness of the discriminator near the 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 area prevents it from reacting too strongly to the generated samples, which is beneficial to improving the diversity and distribution closeness of the generated samples.

[0045] above and The gradient penalty term of the R3GAN does not act on the training process of the generator, but as an additional regularization term in the loss function of the discriminator to control the sensitivity of the discriminator's response to the input data. In the adversarial training, the goal of the generator is to make the generated samples as realistic as possible, while the goal of the discriminator is to correctly distinguish between real and generated samples. To prevent the discriminator from producing a too steep discrimination boundary (i.e., too large or oscillating gradient) around the real or generated samples, a penalty term needs to be added to its loss function for constraint. Unlike most GAN models that only use the gradient penalty, the R3GAN applies two gradient penalties simultaneously during the training process. Let the adversarial loss of the discriminator be , then the optimization objective of the complete discriminator is as formula (9).

[0046] (9) wherein is the optimization objective value of the discriminator, is the adversarial loss term of the discriminator, and the loss function of the discriminator is formula (10).

[0047] (10) The loss function of the generator is independent of the gradient penalty term, and its form is formula (11).

[0048] (11) The joint adversarial optimization objective function of the two is formula (12).

[0049] (12) wherein is the weight coefficient of , and is the weight coefficient of .

[0050] In summary, the RpGAN+ + loss function used in the present application constitutes the basic framework of the R3GAN, which can effectively alleviate the problems of gradient vanishing, unstable convergence, and discriminator overfitting in traditional GAN training, thereby improving the stability and realism of the generated effect. It is a general enhanced adversarial training structure suitable for various complex scenarios. The structural framework diagram of the R3GAN model is as shown in Figure 4 .

[0051] ​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.

[0052] 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 an encoder and a decoder.

[0053] 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, and 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.

[0054] The Transformer model's workflow for sequence-to-sequence tasks is generally as follows: The encoder's input data is first processed by a multi-head self-attention layer. In this layer, the query vector, key vector, and value vector are generated directly from the input data. After the self-attention calculation is completed, the encoder uses the output of the multi-head self-attention layer as the input to the feedforward neural network. The decoder's process is slightly different. Initially, it receives the key and value from the encoder and also uses a masked multi-head self-attention layer to obtain the query vector. These three key vectors are then fed together to the decoder's multi-head attention layer. This ensures that when generating the output at the current position, the decoder only references information from the previous sequence. After the attention calculation is completed, the decoder passes the output of the multi-head self-attention layer to the feedforward neural network for processing. Finally, after a fully connected layer and a softmax transform, the decoder outputs the model's final result. The following are the key technical points of the Transformer module: (1) Positional encoding: The Transformer adds positional encoding at the bottom of both the encoder and decoder. This is to take into account the position information of sequence elements when performing self-attention calculations. Without positional encoding, the Transformer input would only be a collection of elements, lacking the key information of order, and no longer a sequence with a causal relationship. The Transformer uses triangular positional encoding, as shown in Formulas (13) and (14).

[0055] (13) (14) in, express The encoding result at express The encoding result at Represents the position index, Represents the dimension index, is the dimension size of word embedding. By adding the position encoding to the word embedding vector element by element, a new vector representation that incorporates position information can be obtained. This approach ensures that the encodings of different positions have similar distance differences while the dimensions remain independent of each other. At the same time, this approach makes it easy for the model to learn and focus on relative position information because for any constant offset k , position encoding can be directly obtained by linear function Deduced.

[0056] (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. All query vectors Q, key vectors K, and value vectors V in the self-attention layer 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).

[0057] (15) 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.

[0058] Transformer uses scaled dot-product attention, which calculates the dot product between queries and keys and scales it to measure the strength of association between queries and keys. Through this mechanism, 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).

[0059] (16) (3) Multi-head attention mechanism: Multi-head attention consists of multiple attention mechanisms, through which the model can focus on 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. 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: (17) (18) 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 h th attention head, is the value weight matrix of the h th attention head.

[0060] The structural schematic diagram of the Transformer model is shown in Figure 5 The input is first linearized and encoded, then integrated with position encoding, processed using a multi-head attention mechanism, then added with a specification using a residual connection, processed using a feedforward network, then added with a specification using a residual connection, and finally output after linearization.

[0061] 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 proposes 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, thereby improving the modeling capability of the generation network for time structure and coupling relationship between multi-source loads.

[0062] The multi-energy load data in the application covers typical multiple energy forms in rural comprehensive energy systems, 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 tap the time evolution structure of 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.

[0063] 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).

[0064] (19) Wherein, represents the multi-energy load data at the 1st time step, T represents the number of time steps, d represents the multi-energy load types and their feature dimensions contained in each time step, including wind speed and wind power output, light intensity and photovoltaic power generation, biomass boiler output, hydraulic power station output, electric load, heat load, cold load, gas load and hydrogen load, etc. These multi-source loads have the characteristics of strong correlation, high volatility and significant diurnal periodicity. The traditional GAN model often has difficulty in modeling such time-dependent structure, so the application introduces a global dependency modeling mechanism through the Transformer module to overcome this problem.

[0065] The Transformer module first encodes the historical multi-energy load time series by position, introduces the time sequence, and then generates three groups of vector representations of queries, keys, and values through linear transformation. The specific calculation is shown in equation (20).

[0066] (20) 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: (21) wherein, is the dimension of the query and key vectors, denotes the normalized processing of the similarity calculation results between the query vector of each time step and all keys, to obtain the attention weight coefficient of each time step to other time steps. Here, the normalized attention weight obtained after the 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 equation (22).

[0067] (22) This mechanism can adaptively capture nonlinear dependencies such as “nighttime load changes and next morning wind power output” or “indirect regulation of hydrogen demand by winter heat load” and assign different degrees of weight to them.

[0068] 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 can be calculated as follows: (23) wherein, is the row of the t matrix, and its elements are , The weighted sum 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 local time sequence neighborhood in expression ability, and has global time perception ability and comprehensive modeling ability across energy types.

[0069] Finally, the context representation vectors of all time steps are combined, i.e., form the fused historical feature tensor, as shown in equation (24).

[0070] (24) The Transformer module outputs the fused historical feature tensor which contains the global dynamic characteristics of various energy loads in the time evolution process.

[0071] In order to reduce the input dimension of the generator and enhance the generalization ability, the fused historical feature tensor is further compressed into a time series context feature vector using mean pooling (or other strategies), as shown in equation (25).

[0072] (25) The time series context feature vector can be regarded as a compressed representation of the running state of multiple energy loads in the historical time period, carrying sufficient global time series context information for use as a 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 concatenated with to form the joint input vector of the generator, as shown in equation (26), where is the dimension of the random latent noise variable.

[0073] (26) The joint input vector is sent to the generator G to generate a set of multiple energy load scenarios for the future time period T'. Since the generation process is controlled by both random disturbance and historical evolution characteristics, the generated results have a certain diversity while maintaining high historical consistency and physical coupling rationality.

[0074] The biggest advantage of this 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 concatenation and fusion of latent noise also retain the generation diversity and flexibility of the model, ensuring that the typical scenario expansion will not be limited by "overfitting history".

[0075] Further, the discriminator D receives the set of multiple energy load scenarios output by the generator or the real historical subsequent sequence and the time series context feature vector ​, the authenticity and conditional consistency are jointly determined, and based on the basic framework of R3GAN, the objective function during training is formula (27).

[0076] (27) Through the above structure design and modeling process, the generator not only has the "historical understanding ability" lacking in traditional GAN, but also can reasonably restore and reconstruct complex coupled scenes such as "high wind low light", "high cold load high hydrogen consumption" and the like, greatly improving the precision, authenticity and time sequence consistency of the multi-source load full scene construction method of the rural energy system, and providing a high credibility data basis for regional microgrid operation simulation, multi-strategy scheduling optimization and energy planning decision and the like.

[0077] In one specific application example, the process of dynamically adjusting the learning rate by using the cosine annealing algorithm and the hot restart mechanism includes: dividing the training process of the scene 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.

[0078] For the complex multi-time and space nonlinear coupling characteristics between wind energy, photovoltaic, biomass, hydropower and other volatile renewable energy sources and electricity, heat, cold, hydrogen, gas and other loads, the scene generation model based on the R3GAN fusion adversarial generation network and the multi-head attention Transformer structure is constructed through the above steps. In view of the stability, generalization ability and convergence efficiency of the scene generation model in the actual training process, especially in the face of the real challenges of extreme imbalance, violent fluctuations and complex coupling relationships of rural regional multi-energy data structure, the traditional fixed learning rate or coarse-grained adjustment strategy significantly limits the fitting ability and optimization path of the model. Therefore, a dynamic learning rate adjustment strategy based on the combination of cosine annealing and hot restart mechanism is proposed to dynamically adjust the learning rate of the generator and the discriminator optimizer with high resolution, periodicity and self-adaptation during the training process, breaking through the typical problems of coarse adjustment granularity, localized convergence path and learning rate prone to oscillation or disappearance of existing optimizers, thereby improving the global optimal search ability and generalization data coverage ability of the generation model.

[0079] The core idea of ​​this method is to regard each complete training phase as a learning rate adjustment cycle, and use the cosine annealing algorithm within the learning rate adjustment cycle to control the learning rate to gradually decrease from the maximum value to the minimum value, so as to achieve a parameter search path that jumps from coarse-grained to fine-grained convergence; at the end of each learning rate adjustment cycle, the hot restart mechanism is triggered to raise the learning rate to the initial maximum value, so that the model has the ability to periodically jump out of the local minimum area and continue global search, avoiding the problem of falling into performance platform or gradient stagnation under complex loss function structure.

[0080] Traditional learning rate adjustment strategies such as constant, linear decay, and exponential decay are unable to effectively cope with the dynamic process of periodic divergence and convergence in generative adversarial networks, especially when processing multimodal and complex coupled data (such as rural heating, cooling, electricity, and hydrogen loads), which are more prone to falling into local extreme values. The cosine annealing algorithm uses the nonlinear convergence characteristics of the periodic cosine function to make the learning rate decay smoothly from an initial high value to a minimum value. It is 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. This allows the training process to maintain a certain perturbation when approaching convergence, avoiding falling into local minimum values ​​early. Its learning rate adjustment formula is shown in Formula (28).

[0081] (28) in, For the m The learning rate at the iteration, is the preset minimum learning rate, is the preset maximum learning rate, is the position of the current iteration number in the learning rate adjustment cycle, For the n The length of the learning rate adjustment cycle. This formula presents a descending curve: it decreases rapidly in the early stage and slowly approaches the minimum value in the later stage. This allows the model to quickly learn the global structure in the initial stage and stably optimize the detailed features in the later stage, which is conducive to simulating the multi-scale evolution trend of rural landscape cooling and heating loads.

[0082] Although cosine annealing can achieve a gentle learning rate decrease process, it may still cause the model to fall into a local optimum during 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 power load, lacks a slow-changing curve in autumn or an extreme high temperature cold load scenario). To improve the "disturbance jump" capability of training, a hot restart mechanism is introduced, which resets the learning rate to the maximum value after each learning rate adjustment cycle. and start a new round of periodic annealing, simulate an "optimization disturbance". This mechanism is equivalent to "re-random initialization search direction" in the function space, to prevent the model from converging to a non-optimal mode.

[0083] But if every time the hot restart starts from the same high value without restraint, it may cause too much shock, training does not converge, and finally it is difficult to stabilize into the global optimal interval. Therefore, in order to solve this problem, maintain the convergence of the disturbance, adopt the "round by round decrease" strategy: that is, as the cycle number n increases, the length of each learning rate adjustment cycle and the maximum learning rate are decreased round by round. Specifically, the length of the first learning rate adjustment cycle and the maximum learning rate are calculated by formula (29). n

[0084] (29) Where, is the initial cycle length, is the initial maximum learning rate, is the maximum learning rate of the first learning rate adjustment cycle, n is the cycle growth factor, , is the learning rate decay factor, . In this way, it can achieve: initial multiple rapid exploration, gradual stable convergence in later period, which is conducive to the model gradually approaching the global optimum. The cosine annealing method combined with the hot restart mechanism cycle, peak value change is shown in . Figure 6

[0085] In summary, the dynamic learning adjustment process of the cosine annealing algorithm combined with the hot restart mechanism is as follows.

[0086] ①Initialization setting , , , , and other hyperparameters.

[0087] ②At the beginning of each round of training, initialize the cycle count n =0, and the current iteration step m =0.

[0088] ③In each learning rate adjustment cycle , according to the current iteration number , dynamically calculate the current learning rate , which is used to optimize the update of the generator and discriminator.

[0089] ④Whenever , that is, a learning rate adjustment cycle ends, perform hot restart: ​​, , , .

[0090] ⑤ Repeat the above process until the generator loss stops decreasing or reaches the preset number of training rounds.

[0091] In summary, based on the adversarial generation framework built on R3GAN and Transformer, this application further introduces a "dynamic learning rate adjustment strategy combining cosine annealing algorithm with hot restart mechanism". This strategy periodically anneals the learning rate from a high value to a low value and restarts it to a high value after each cycle, while attenuating the peak value and lengthening the cycle in each round. This achieves a dynamic balance between "global exploration" and "local convergence" in the model, significantly improving the training stability and diversity generation capabilities, effectively preventing the generator from falling into local optimality or mode collapse, and ensuring the fitting quality and wide coverage of the generated multi-energy load time series scenarios at multiple spatiotemporal scales, thereby providing a more reliable and representative data foundation for rural energy system planning and optimization.

[0092] This application achieves high-quality generation of joint time series scenarios of multiple energy loads (wind, solar, biomass, hydropower, electricity, heat load, cooling load, gas load and hydrogen load, etc.) with temporal structure characteristics, energy diversity and synergistic coupling relationships by constructing an R3GAN fusion, introducing the Transformer module, and combining it with a dynamic training strategy of cosine annealing and hot restart mechanism. It not only has the ability to perceive historical information and the potential noise disturbance fusion mechanism, but also enables the generated samples to restore the evolution law of historical data and the coupling characteristics between sources and loads to the greatest extent while maintaining a certain diversity.

[0093] 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 charge scene set to obtain a typical multi-energy charge representative scene set.

[0094] The multi-energy load scenario set generated in step 202 has the following characteristics: first, it covers the joint multi-dimensional output of multiple types of energy loads (wind, solar, biomass, cooling, heating, electricity, hydrogen, etc.), rather than a single source load dimension; second, it is based on contextual modeling of historical data rather than independent sampling generation, and has high temporal consistency and coupling correlation.

[0095] However, in the actual planning and scheduling analysis of rural energy systems, relying only on large-scale generated full-scenario data will bring high computational resource overhead, information redundancy and decision-making difficulties. Especially in subsequent applications such as energy configuration optimization, multi-energy coupling scheduling, energy storage capacity design, typical day construction, etc., it is urgent to effectively reduce or represent the generated multi-energy load scenario set, that is, to realize the "reduction of multi-energy load full-scenario" process, to ensure that the scenarios are representative, retain diversity, and reduce redundancy. Therefore, on the basis of scenario generation, the present application further proposes a scenario reduction method.

[0096] The method closely combines the characteristics of the multi-energy load scenario set output by the scenario generation module, considers the periodicity, non-stationarity and dynamic coupling of multi-energy load time series data from the structure, and uses a method based on dynamic time warping (Dynamic Time Warping, DTW) distance measurement and cross-dimensional clustering fusion to extract typical structural patterns from large-scale generated scenario sets, thereby forming a typical multi-energy load representative scenario set with smaller data volume but covering the main dynamic patterns of the original scenarios.

[0097] In one specific application example, step 203 includes steps 31 and 32.

[0098] Step 31, using a dynamic time warping distance method to measure the structural similarity between scenarios in the multi-energy load scenario set, obtaining a multi-energy load scenario distance matrix.

[0099] Specifically, for any two scenarios in the multi-energy load scenario set, the dynamic time warping distance between the two scenarios is calculated to obtain a distance vector between the two scenarios. According to the multi-energy load scenario 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 scenarios is extended to a weighted multi-dimensional distance. According to the weighted multi-dimensional distance between each two scenarios in the multi-energy load scenario set, a multi-energy load scenario distance matrix is constructed.

[0100] Because of the different time distribution, inconsistent fluctuations, and incomplete evolution paths of various source load variables in rural energy systems, 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 present application proposes to introduce DTW distance as the basis for measuring the structural similarity between joint scenarios of multi-energy load, thereby supporting the subsequent typical scenario extraction and structure-preserving reduction process.

[0101] The core concept of DTW is to allow two time series scenarios to be flexibly aligned along the temporal dimension. Even if the peaks and valleys of the two time curves appear slightly different, they can still be identified as having structural similarities. This is particularly important for data in rural energy systems that have time series misalignment characteristics, such as wind power (which is affected by weather fluctuations, like photovoltaic power), biomass energy (which has adjustable operating conditions), and cooling load (which is affected by daytime temperature lags).

[0102] Specifically, there are two one-dimensional time series, as shown in formula (30).

[0103] (30) The goal of DTW is to find an optimal matching path on a two-dimensional index grid (p,q) , as shown in formula (31).

[0104] (31) Make , , the path must satisfy: boundary constraints: starting at (1,1) and ending at (T,T); monotonicity constraints: time index increases, that is, , Step size constraint: The movement can only go right, down, or diagonally at a time, i.e., (1,0), (0,1), (1,1). Based on this, the cumulative distance is obtained, as shown in formula (32).

[0105] (32) This formula means finding a path with the minimum cumulative cost among all possible time-aligned paths, so as to achieve an accurate match of the "time-out trend".

[0106] In this application, each scenario in the multi-energy load scenario set is expressed as formula (33).

[0107] (33) in, F The number of rural multi-energy load sources, such as wind power, photovoltaic power, biomass energy, hydropower, electricity load, heating load, cooling load, gas load, hydrogen load, etc. T is the number of time steps, the formula represents the c In the scene F Source load T The joint evolution process of time steps.

[0108] For each source load (i.e. scenario No. f The one-dimensional time series is extracted from the matrix (column), as shown in formula (34).

[0109] (34) For any two scenarios With , the first f class source load is matched with one-dimensional DTW, as formula (35).

[0110] (35) Each, is a scalar, representing the dynamic morphology difference of the first f class source load between scenarios and scenarios , for scenarios and scenarios , the DTW distance corresponding to all F class source loads is calculated, forming a distance vector with a length of F , as formula (36).

[0111] (36) Wherein, is the distance vector between scenarios and scenarios .

[0112] In order to combine F dynamic time warping distances into a single structural distance index, the similarity measure between scenarios and scenarios is extended to a weighted multi-dimensional distance, as formula (37).

[0113] (37) Wherein, is the weighted multi-dimensional distance between scenarios and scenarios , is the importance weight of the first f class source load, and its calculation formula is as formula (38).

[0114] (38) Wherein, is the scenario standard deviation of the first f class source load, is the scenario mean of the first f class source load, is the coefficient of variation of the first f class source load. Thus, higher attention is paid to variables with strong volatility and uncertainty, and low volatility variables such as cold load and electric load are avoided in distance calculation to dominate similarity evaluation.

[0115] After completing After the calculation, a symmetric multi-energy load scenario distance matrix can be constructed As formula (39).

[0116] (39) As the input of the clustering algorithm, the multi-energy load scenario distance matrix can achieve the following goals by performing the reduction operation in the distance space: extracting typical evolution trend scenarios, preserving the structural patterns of wind, light, gas, hydrogen, etc.; avoiding the deviation of the scenario set after reduction from the original distribution center or losing important structural features; reducing the computational complexity and simulation dimension of subsequent energy system scheduling modeling.

[0117] Step 32, according to the multi-energy load scenario distance matrix, using K-Medoids clustering method to reduce the scenarios in the multi-energy load scenario set, and get the typical multi-energy load representative scenario set.

[0118] To cope with the large-scale joint time sequence scenario set composed of wind power, photovoltaic, biomass energy, hydropower, electrical load, thermal load, cold load, gas load, hydrogen load and other multi-energy load variables, further maintain the time sequence structural characteristics and cross correlation of each energy load source, improve the modeling efficiency and reduce the redundant information, a K-Medoids clustering reduction strategy based on DTW distance matrix is proposed to realize the selection of representative typical samples.

[0119] The method takes the constructed multi-energy load scenario distance matrix as the basis, wherein, S is the number of scenarios in the multi-energy load scenario set, and the element in the multi-energy load scenario distance matrix represents the scenario and the scenario The weighted dynamic time structural similarity measure under multiple energy-carrying variables such as wind, light, water, biomass energy, electricity, heat, cold, gas and hydrogen. This multi-energy load scenario distance matrix comprehensively reflects the "morphological structural distance" between different scenarios in terms of peak-shifting evolution, structural deformation and variable coupling characteristics, providing a high-fidelity, structure-preserving space foundation for subsequent clustering.

[0120] 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.

[0121] K-Medoids is a partitioning clustering method that takes the sample points themselves as cluster centers. It is especially suitable for similarity measurement in non-Euclidean space, such as the nonlinear structural DTW distance used in this application. The core objective of K-Medoids is to minimize the sum of DTW distances from all sample points to their cluster centers, as shown in equation (40).

[0122] (40) where, is the set of scene indices of the u th cluster, is the representative scene of the cluster, i.e., the representative scene with the minimum total distance, is the weighted multi-dimensional distance between scene and scene .

[0123] The detailed steps of K-Medoids for scene reduction are as follows.

[0124] ① Initialization of the representative scene set: select U scenes from the multi-energy load scene set as the initial representative scene set . Let the iteration step be , and the initial representative scene indices be as shown in equation (41).

[0125] (41) ② Sample assignment stage: for each scene, find the nearest representative scene, as shown in equation (42).

[0126] (42) where, is the nearest representative scene to scene . Scene is assigned to the cluster in which the DTW distance to the center point is the smallest.

[0127] This step is equivalent to constructing a clustering label function, as shown in equation (43).

[0128] (43) ③ Representative scene update stage: for each cluster , find the scene with the minimum total DTW distance within the cluster as the new representative scene, as shown in equation (44).

[0129] (44) This means that the new representative scenario is the most "representative" scenario in the cluster, with the smallest 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 in the present application.

[0130] ④Iteration and convergence judgment: repeat steps ② and ③ until all representative scenarios no longer change: or the clustering cost function converges: or the preset maximum iteration step T is reached max ; wherein, is a preset clustering cost threshold, is the clustering cost at the j th iteration.

[0131] ⑤Output typical multi-energy load representative scenario set: finally obtain U representative scenario indexes: . Then the typical multi-energy load representative scenario set is: .

[0132] Each is an actual sample point, which maintains the physical structure of the true wind, light, biomass, water, electricity, heat, cold, gas, and hydrogen energy load coupling evolution path, and provides structure- faithful input support for subsequent multi-objective scheduling optimization. The K-Medoids algorithm clustering reduction process is shown in Figure 7 .

[0133] 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, the present application proposes a K-Medoids clustering typical scenario reduction method based on the DTW distance matrix. In the aspect of multi-source coupling scenario dimensionality reduction, it exhibits strong clustering expression ability, scenario structure preservation ability, and whole system modeling adaptability.

[0134] The beneficial effects of the present application include at least the following points.

[0135] 1) In view of the limitations of traditional adversarial network structure in complex multi-source load data modeling, an improved method based on the R3GAN optimization framework is proposed, which introduces a relative discrimination loss function RpGAN and a double gradient penalty term, while maintaining training stability, effectively improving the expression ability and sample quality of the generator in high-dimensional time series data.

[0136] 2) A method for generating multi-energy load joint scenarios based on the fusion mechanism of R3GAN and Transformer is proposed for rural multi-energy systems. Through the deep fusion of generative adversarial networks and time structure modeling, the joint fitting, coupled expression, and diversified generation of multiple renewable energy outputs and various terminal loads are realized. By embedding a multi-head Transformer encoding module in the generator structure, the historical multi-source load time series is globally modeled, and the context feature vector extracted is spliced and fused with random latent noise to form a composite input tensor with historical perception ability and diversity control ability, achieving time consistency and physical coupling rationality of the generated results.

[0137] 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 oscillation, and unstable convergence in the adversarial training process, and improving training efficiency and model generalization ability.

[0138] 4) To address the problem of redundancy and computational complexity in large-scale generated scenario sets, a typical scenario 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 scenarios using DTW distance, and extracts and reduces representative scenarios through K-Medoids, effectively preserving the structural diversity and energy synergy of generated scenarios, reducing the data dimension of subsequent modeling and optimization tasks.

[0139] In summary, the present application can model similarity based on time dynamic characteristics and multi-source load collaborative characteristics, and extract representative scenarios from large-scale data sets of wind, light, biomass energy outputs, and cold, heat, electricity, and hydrogen load to extract a typical scenario set with global structural representation, thereby improving modeling efficiency and ensuring the feasibility and convergence of subsequent system solutions.

[0140] Based on the same inventive concept, the embodiments of the present application also provide a rural energy system multi-energy load scenario construction device for implementing the methods described above. The implementation scheme provided by the device to solve the problem 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 scenario construction device embodiments provided below can refer to the limitations of the method in the foregoing, which will not be repeated here.

[0141] In one exemplary embodiment, as shown in Figure 8 a rural energy system multi-energy load scenario construction device is provided, which includes a data acquisition module 801, a scenario generation module 802, and a scenario reduction module 803.

[0142] The data acquisition module 801 is configured to acquire a historical multi-energy load time sequence of a rural energy system.

[0143] The scenario generation module 802 is configured to generate a multi-energy load scenario set of a future time period according to the historical multi-energy load time sequence and by using a pre-trained scenario generation model. The scenario generation model is constructed based on a Transformer model and a regularized relative loss generated adversarial network, and the scenario generation model dynamically adjusts a learning rate by using a cosine annealing algorithm and a hot restart mechanism during training.

[0144] The scenario reduction module 803 is configured to reduce scenarios in the multi-energy load scenario set by using a dynamic time warping distance method and a K-Medoids clustering method, to obtain a typical multi-energy load representative scenario set.

[0145] In an 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.

[0146] In an exemplary embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.

[0147] In an exemplary embodiment, a computer program product is provided, including a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.

[0148] 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 fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0149] In the present application, all actions of acquiring signals, information or data are performed under the premise of complying with the corresponding data protection regulations and policies of the place, and under the premise of obtaining authorization from the owner of the corresponding device.

[0150] 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 a memory, a database or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc.

[0151] 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.

[0152] 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, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.

[0153] The principles and implementation modes of the present application are described by using specific examples in the present application. The above embodiments are only used to help understand the method and its core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range can be changed. In conclusion, the content of the present application should not be understood as a limitation.

Claims

1. A method for constructing a multi-energy load scenario in a rural energy system, characterized in that: The method comprises: Obtain historical multi-energy load time series of rural energy systems; Based on the historical multi-energy load time series, a pre-trained scenario generation model is used to generate a set of multi-energy load scenarios for future time periods; the scenario generation model is constructed based on the Transformer model and the regularized relativistic loss generative adversarial network, and the scenario generation model uses the cosine annealing algorithm and hot restart mechanism to dynamically adjust the learning rate during training; The dynamic time warping distance method and K-Medoids clustering method are used to reduce the scenes in the multi-energy charge scene set to obtain a typical multi-energy charge representative scene set.

2. The method for constructing a multi-energy load scenario of a rural energy system according to claim 1 is characterized in that: Based on the historical multi-energy load time series, a pre-trained scenario generation model is used to generate a multi-energy load scenario set for a future time period, specifically including: A Transformer model is used to extract features from the historical multi-energy load time series to obtain a time series context feature vector; Concatenating and fusing the temporal context feature vector with the random potential noise vector to obtain a joint input vector; According to the joint input vector, a regularized relativistic loss generative adversarial network is used to generate a set of multiple energy and load scenarios for future time periods; wherein the joint input vector serves as an input to a generator of the regularized relativistic loss generative adversarial network.

3. The method for constructing a multi-energy load scenario of a rural energy system according to claim 1, characterized in that: The process of dynamically adjusting the learning rate using the cosine annealing algorithm and hot restart mechanism includes: Divide the training process of the scenario generation model into multiple learning rate adjustment cycles, and determine the minimum learning rate, cycle growth factor, learning rate decay factor, maximum learning rate of the first learning rate adjustment cycle, and length of the first learning rate adjustment cycle; In each learning rate adjustment cycle, based on the length of the current learning rate adjustment cycle, 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 cycle to the minimum learning rate; The hot restart mechanism is triggered at the end of each learning rate adjustment cycle, and the length of the next learning rate adjustment cycle is determined according to 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 according to the learning rate decay factor and the maximum learning rate of the current learning rate adjustment cycle.

4. The method for constructing a multi-energy load scenario of a rural energy system 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 and load in the rural energy system at each time step in the future time period.

5. The method for constructing a multi-energy load scenario of a rural energy system according to claim 1, characterized in that: The dynamic time warping distance method and K-Medoids clustering method are used to reduce the scenes in the multi-energy charge scene set to obtain a typical multi-energy charge representative scene set, which specifically includes: The dynamic time warping distance method is used to measure the structural similarity between the scenes in the multi-energy charge scene set to obtain a multi-energy charge scene distance matrix; According to the multi-energy charge scenario distance matrix, the K-Medoids clustering method is used to reduce the scenarios in the multi-energy charge scenario set to obtain a typical multi-energy charge representative scenario set.

6. The method for constructing a multi-energy load scenario of a rural energy system according to claim 5, characterized in that: The dynamic time warping distance method is used to measure the structural similarity between the scenes in the multi-energy charge scene set to obtain the multi-energy charge scene distance matrix, which specifically includes: For any two scenes in the multi-energy-load scene set, calculating the dynamic time warping distance between the two scenes to obtain a distance vector between the two scenes; Determining the importance weight of each type of source load based on the multi-source load scenario set; According to the importance weight of each type of source load, the distance vector between two scenes is expanded into a weighted multidimensional distance; A multi-energy charge scenario distance matrix is ​​constructed according to the weighted multi-dimensional distances between any two scenarios in the multi-energy charge scenario set.

Citation Information

Patent Citations

  • New energy scene generation method and system based on adversarial learning model

    CN111553587A

  • Scene generation method considering multi-energy load timing sequence and correlation

    CN111859283A

  • New energy capacity configuration method based on WGAN scene simulation and time sequence production simulation

    CN112994115A

  • Regional multi-energy integrated power supply scene generation method based on generative adversarial

    CN117272777A

  • Renewable energy output scene generation method and device

    CN118939996A

Cited By

  • Power grid operation scene generation method and system, electronic equipment and storage medium

    CN122000876A