Comprehensive energy system load scene generation method and system based on diffusion network

Through the diffusion network-based method, the problems of insufficient accuracy and high computing cost in the generation of load scenarios of integrated energy systems are solved, high-quality data generation and model stability are achieved, and data acquisition efficiency and generalization capabilities are enhanced.

CN119249866APending Publication Date: 2025-01-03STATE GRID ELECTRIC POWER RES INST +3
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411243473.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient accuracy, high computational cost, difficulty in obtaining data, insufficient generalization capability of model and poor algorithm stability in the generation of load scenarios of integrated energy systems.

Method used

Using a diffusion network-based method, a diffusion network model is constructed by acquiring and preprocessing the load data of the integrated energy system, and high-quality data is generated by using forward denoising and reverse generation processes, and high-quality load scenarios are screened through cosine similarity. data.

Benefits of technology

It improves the accuracy of load scenario generation and model stability, reduces calculation costs, enhances the efficiency of data acquisition and the generalization ability of model, and achieves high-quality data generation and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249866A_ABST
    Figure CN119249866A_ABST
Patent Text Reader

Abstract

The invention discloses an integrated energy system load scene generation method and system based on a diffusion network, and relates to the technical field of integrated energy system operation and analysis, and the method comprises the steps: obtaining integrated energy system load data, building a multi-factor power load sample data set, and carrying out the preprocessing, and obtaining an original data set; constructing a diffusion network model, training the original data set by using the diffusion network model, recovering high-quality data through forward denoising and reverse generation processes, and generating simulated load data; performing similarity comparison on the generated simulation load data and an original data set, and screening out high-quality simulation load data as final load scene data; according to the diffusion model provided by the invention, a high-quality and high-resolution sample can be generated, and meanwhile, generated data is distinguished and screened by utilizing cosine similarity, so that high-quality data generation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated energy system operation and analysis, and in particular to a method and system for generating load scenarios of an integrated energy system based on a diffusion network. Background Art

[0002] With the rapid development of social economy, the demand for energy is increasing. In order to meet this demand and reduce dependence on traditional energy resources, people are conducting more and more in-depth research on integrated energy systems. An integrated energy system refers to a system that uses multiple energy sources and energy conversion technologies to integrate, utilize and manage various forms of energy such as heat, electricity and cold. At present, with the continuous development of information technology, integrated energy systems based on diffusion networks are widely used in the energy field. Diffusion networks are a mathematical tool that describes the interaction relationship between nodes and are suitable for modeling and analyzing complex systems. In integrated energy systems, diffusion networks can help achieve interconnection between different energy sources, effectively dispatch and allocate energy, and improve the energy utilization efficiency of the system.

[0003] Existing methods sometimes fail to achieve sufficient accuracy when predicting and generating load scenarios for integrated energy systems, which may affect the intelligent management and optimized scheduling of the system; some existing technologies require a lot of computing resources and time for model building and parameter adjustment, which limits the feasibility and efficiency of the methods in practical applications; although more training samples can improve the performance of the model, it is not easy to obtain and prepare these large-scale, high-quality training data, especially in such a complex field as the energy system; some methods lack generalization capabilities when facing different scenarios or future changes, which makes them perform poorly when dealing with complex and dynamic energy system environments; some methods based on machine learning and deep learning, such as GAN (generative adversarial network), may face problems such as training instability and mode collapse, which affects their reliability and long-term stability in practical applications. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: how to improve the accuracy of the load scenario generation method of the integrated energy system, reduce the computing cost, optimize data acquisition, enhance the model generalization ability, and solve the algorithm stability and reliability challenges.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a method for generating a load scenario of an integrated energy system based on a diffusion network, comprising:

[0008] Obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and pre-process it, and obtain the original data set;

[0009] Construct a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data;

[0010] The generated simulated load data is compared with the original data set for similarity, and high-quality simulated load data is screened out as the final load scenario data.

[0011] As a preferred solution for the load scenario generation method of the integrated energy system based on the diffusion network,

[0012] The acquisition of integrated energy system load data and the establishment of a multi-factor power load sample data set for merging and preprocessing include:

[0013] Obtain weather load data for each day of each month, and obtain load values ​​every one hour; preprocess the acquired load data to complete missing data or correct abnormal data; classify the data, set intervals, extract load data for different time periods, and divide the load data into power load sample data sets for different time periods.

[0014] As a preferred solution for the generation method of load scenarios of integrated energy systems based on diffusion networks,

[0015] The construction of the diffusion network model and training the original data set using the diffusion network model include:

[0016] The original data set is normalized and scaled to the interval [-1,1] to build a denoising diffusion probability model. Two Markov chains, one in front and one behind, are used to build a forward diffuser and a reverse denoiser to achieve the goal of gradually injecting noise into the data and generating new samples, thus building a complete diffusion network model.

[0017] As a preferred solution for the load scenario generation method of the integrated energy system based on the diffusion network,

[0018] The construction of the forward diffuser and the reverse denoiser comprises:

[0019] The initial Gaussian noise is generated as the starting point through the initial noise generator, the intensity of the noise is gradually reduced, and the data of the next time step is generated. According to the current noise and the generated data, samples are generated from the conditional distribution through Markov chain Monte Carlo sampling. After each diffusion process, the authenticity of the data is enhanced by increasing the intensity of the noise. The forward diffusion process is stopped based on the number of diffusion steps that have been reached or the quality of the generated data.

[0020] As a preferred solution for the generation method of load scenarios of integrated energy systems based on diffusion networks,

[0021] The real data is loaded through the real data loader as the starting point of the reverse denoising process. The data state of the previous time step is reconstructed according to the current data and the generated noise through the conditional generation model. After each denoising process, the intensity of the noise is gradually increased to simulate the process of the data gradually tending to the initial noise. The reverse denoising process is stopped based on the number of denoising steps that have been reached or the quality of the generated noise.

[0022] As a preferred solution for the generation method of load scenarios of integrated energy systems based on diffusion networks,

[0023] The construction of the diffusion network model and training the original data set using the diffusion network model further includes:

[0024] Use the Adam optimizer with an initial learning rate of 1*e -3 Train the model; during the training process, loop through each epoch, calculate the mean square error loss between the generated simulated data and the original data, and update the model parameters based on the loss value;

[0025] Adjust the parameters of the diffusion network model so that the model can better fit the training data, and use the trained model to generate new data as output.

[0026] As a preferred solution for the generation method of load scenarios of integrated energy systems based on diffusion networks,

[0027] The generated simulated load data is compared with the original data set for similarity, and high-quality simulated load data is screened out, including:

[0028] Define the cosine similarity discriminant network, represent the data as vectors, use cosine similarity to measure the similarity between them based on the cosine value of the angle between the vectors, set the similarity threshold to 0.95, and filter out the simulated load data above the threshold as output;

[0029] Among them, the cosine similarity function formula is:

[0030]

[0031] Among them, A and B are two comparison vector data, the value range is [-1, 1], -1 means completely dissimilar, 1 means completely similar;

[0032] The generated simulated load data and the original load data are put into the cosine similarity discrimination network for cosine similarity comparison, and the simulated load data with cosine similarity higher than 0.95 are screened out and saved as output data.

[0033] In a second aspect, an embodiment of the present invention provides a system for generating load scenarios of an integrated energy system based on a diffusion network, comprising:

[0034] The historical load data acquisition and preprocessing module is used to obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and preprocess it, and obtain the original data set;

[0035] The model training module is used to build a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data;

[0036] The data discrimination module is used to compare the generated simulated load data with the original data set for similarity and screen out high-quality simulated load data as the final load scenario data.

[0037] As a preferred solution for the load scenario generation system of the integrated energy system based on the diffusion network,

[0038] The historical load data acquisition and preprocessing module acquires weather load data for each day of each month and obtains load values ​​every hour; preprocesses the acquired load data to complete missing data or correct abnormal data; classifies the data, sets intervals, extracts load data for different time periods, and divides the load data into power load sample data sets for different time periods;

[0039] The model training module normalizes the original data set, scales the data to the interval [-1,1], builds a denoising diffusion probability model, and uses two Markov chains, one in front and one behind, to build a forward diffuser and a reverse denoiser, so as to achieve the goal of gradually injecting noise into the data and generating new samples, thus building a complete diffusion network model.

[0040] The construction of the forward diffuser and the reverse denoiser comprises:

[0041] Generate initial Gaussian noise as the starting point through the initial noise generator, gradually reduce the intensity of the noise, and generate data for the next time step. Generate samples from the conditional distribution through Markov chain Monte Carlo sampling based on the current noise and the generated data. After each diffusion process, enhance the authenticity of the data by increasing the intensity of the noise, and stop the forward diffusion process based on the number of diffusion steps that have been reached or the quality of the generated data.

[0042] Load the real data as the starting point of the reverse denoising process through the real data loader, reconstruct the data state of the previous time step according to the current data and the generated noise through the conditional generation model, and after each denoising process, gradually increase the intensity of the noise to simulate the process of data gradually tending to the initial noise, and stop the reverse denoising process based on the number of denoising steps that have been reached or the quality of the generated noise;

[0043] The model training module uses the Adam optimizer with an initial learning rate of 1*e -3 Train the model; during the training process, loop through each epoch, calculate the mean square error loss between the generated simulated data and the original data, and update the model parameters based on the loss value;

[0044] Adjust the parameters of the diffusion network model so that the model can better fit the training data, and use the trained model to generate new data as output;

[0045] The data discrimination module defines a cosine similarity discrimination network, represents the data as a vector, and uses cosine similarity to measure the similarity between them based on the cosine value of the angle between the vectors. The threshold of the similarity is set to 0.95, and the simulated load data above the threshold is selected as the output;

[0046] Among them, the cosine similarity function formula is:

[0047]

[0048] Among them, A and B are two comparison vector data, the value range is [-1, 1], -1 means completely dissimilar, 1 means completely similar;

[0049] The generated simulated load data and the original load data are put into the cosine similarity discrimination network for cosine similarity comparison, and the simulated load data with cosine similarity higher than 0.95 are screened out and saved as output data.

[0050] In a third aspect, an embodiment of the present invention provides a computing device, including:

[0051] Memory and processor;

[0052] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating load scenarios for an integrated energy system based on a diffusion network as described in any embodiment of the present invention.

[0053] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method for generating load scenarios for an integrated energy system based on a diffusion network.

[0054] Beneficial effects of the present invention: The diffusion model provided by the present invention can generate high-quality, high-resolution samples, and use cosine similarity to discriminate and screen the generated data to achieve high-quality data generation; the diffusion model usually has good controllability, and the style, content and diversity of the generated samples can be controlled by adjusting the model parameters; compared with traditional training models, the diffusion model is usually faster in generating new samples and can sample from the potential representation that has been learned; the diffusion model can easily adapt to data sets of different sizes and different model architectures, making them highly scalable in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0056] Figure 1 It is an overall flow chart of the method for generating load scenarios of an integrated energy system based on a diffusion network according to the first embodiment of the present invention;

[0057] Figure 2 It is a schematic diagram of historical load data division of the method for generating load scenarios of an integrated energy system based on a diffusion network according to the first embodiment of the present invention;

[0058] Figure 3 It is a diffusion model structure diagram of the method for generating load scenarios of an integrated energy system based on a diffusion network according to the first embodiment of the present invention;

[0059] Figure 4 It is a cosine similarity comparison flow chart of the method for generating load scenarios of an integrated energy system based on a diffusion network described in the first embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0062] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0063] Example 1

[0064] Reference Figure 1-Figure 4 , which is the first embodiment of the present invention, and provides a method for generating load scenarios of an integrated energy system based on a diffusion network, comprising:

[0065] S1: Obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and pre-process it, and obtain the original data set;

[0066] In an embodiment of the present invention, obtaining the integrated energy system load data and establishing a multi-factor power load sample data set for merging and preprocessing includes:

[0067] Obtain weather load data for each day of each month, and obtain load values ​​every one hour; preprocess the acquired load data to complete missing data or correct abnormal data; classify the data, set intervals, extract load data for different time periods, and divide the load data into power load sample data sets for different time periods.

[0068] Exemplarily, the data is classified and processed, and load data of four time periods of a day are extracted with six hours as the interval, and the load data of each day of each month is divided into four sets of power load sample data of different time periods.

[0069] The data used comes from household and industry instantaneous energy data sets. The temperature, pressure, wind speed, humidity and load power values ​​are measured every hour within 24 hours of each month for three years. The obtained load data are used to supplement missing data or correct abnormal data and save as a training data sample set.

[0070] The obtained training data sample set is processed by cooperative classification. The obtained 24-hour load power value is divided into four sections every 6 hours. The load value of each section is taken out separately and accumulated together to form a data set. The original training data sample set is divided into four groups of training data sample sets of different categories according to time, such as Figure 2 shown.

[0071] S2: Construct a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data;

[0072] In an embodiment of the present invention, constructing a diffusion network model, training the original data set using the diffusion network model includes:

[0073] The original data set is normalized and scaled to the interval [-1,1] to build a denoising diffusion probability model. Two Markov chains, one in front and one behind, are used to build a forward diffuser and a reverse denoiser to achieve the goal of gradually injecting noise into the data and generating new samples, thus building a complete diffusion network model.

[0074] Building a forward diffuser and a reverse denoiser involves:

[0075] The initial Gaussian noise is generated as the starting point through the initial noise generator, the intensity of the noise is gradually reduced, and the data of the next time step is generated. According to the current noise and the generated data, samples are generated from the conditional distribution through Markov chain Monte Carlo sampling. After each diffusion process, the authenticity of the data is enhanced by increasing the intensity of the noise. The forward diffusion process is stopped based on the number of diffusion steps that have been reached or the quality of the generated data.

[0076] The real data is loaded through the real data loader as the starting point of the reverse denoising process. The data state of the previous time step is reconstructed according to the current data and the generated noise through the conditional generation model. After each denoising process, the intensity of the noise is gradually increased to simulate the process of the data gradually tending to the initial noise. The reverse denoising process is stopped based on the number of denoising steps that have been reached or the quality of the generated noise.

[0077] Use the Adam optimizer with an initial learning rate of 1*e -3 Train the model; during the training process, loop through each epoch, calculate the mean square error loss between the generated simulated data and the original data, and update the model parameters based on the loss value;

[0078] Adjust the parameters of the diffusion network model so that the model can better fit the training data, and use the trained model to generate new data as output.

[0079] It should be noted that denoising probabilistic diffusion models (DDPMs) are a special form of diffusion models, which are mainly used to deal with noisy data generation tasks. It generates high-quality samples from random noise through a series of denoising steps. Specifically, the formula of DDPMs is usually in the form of partial differential equations, which contain diffusion equations and boundary conditions. The diffusion equation describes the propagation and attenuation process of noise, while the boundary conditions define the initial and termination conditions of the model. By solving the diffusion equation, the model can generate samples with high resolution and high quality, while also controlling the style, content, and diversity of the generated samples. Compared with traditional generative models, the advantage of DDPMs is that it can better handle noisy data and can generate samples with higher resolution and higher quality. At the same time, DDPMs are also efficient and scalable, and can be applied to large-scale datasets and different types of application scenarios.

[0080] Forward diffusion process: The forward diffusion process of the diffusion model is a process that gradually increases the complexity of the data.

[0081] It starts with a simple sample randomly drawn from a Gaussian distribution, and the model gradually becomes more complex by introducing a certain amount of structured and controllably added noise into the sample through a series of reversible, step-by-step modifications. After a series of diffusion changes, it evolves into a sample that is very similar to the desired complex data distribution.

[0082] Reverse generation process: The reverse diffusion process of the diffusion model, also known as the generation process, is the reverse operation of recovering the original high-quality data from the noisy data. The model first initializes this noisy sample, and then gradually performs the opposite operation of the forward process to remove the noise layer by layer. As the noise of the data gradually decreases, the clarity and details of the original data gradually emerge. Finally, after a series of carefully designed reverse steps, the model can successfully generate high-quality, realistic data from the noisy sample.

[0083] Specifically, the process of DDPMs is as follows:

[0084] Suppose there is a data distribution Φ, a forward Markov process generates a series of random variables x1, x2, ...,, whose transfer kernel is q(x t |x t-1 ). Given x0, the joint distribution of x1, x2, ..., is expressed as q(x t ,...,|x0), can be decomposed into:

[0085]

[0086] Typically, transfer cores are designed to:

[0087]

[0088] Among them, β t ∈(0,1) is a hyperparameter chosen before model training.

[0089] The reverse Markov chain consists of a prior distribution p()=N(;0,I) and a learnable transition kernel θ(x t-1 |x t ) parameterized, its form is:

[0090] p θ (x t-1 |x t )=Ν(x t-1 ;μ θ (x t ,t),∑ θ (x t ,t))

[0091] Here, θ represents the model parameters, and the mean μθ(x t ,t) and variance θ(x t ,t) is parameterized by a deep neural network. Using a reverse Markov chain, the authors can first sample from a noise vector ~p() and then from a learnable transfer kernel x t-1 ~θ(x t-1 |x t )Iterate sampling until t=1 and generate new data x0.

[0092] DDPMs is based on the probability diffusion theory, which treats noise as a random process and generates samples with higher resolution and higher quality by gradually denoising. In each denoising step, the model uses the diffusion equation to simulate the propagation and attenuation process of noise, and generates new samples by gradually reducing the noise and updating the latent variables. The structure of the diffusion model of the present invention is shown in the figure Figure 3 shown.

[0093] Normalize the data in each data set and scale the data to a suitable range so that the model can learn more easily. The formula for normalizing the data in the data set is:

[0094]

[0095] In this diffusion model, there are three main parts: encoder, diffusion layer and decoder. First, the input layer is a linear layer with 6 input features. The encoder consists of three linear layers, which are all weights (6, 64) from the input layer to the first hidden layer, the weights (64, 128) from the first hidden layer to the second hidden layer, and the weights (128, 64) from the second hidden layer to the third hidden layer. Each linear layer is followed by a ReLU activation function. The diffusion layer consists of two linear layers, which are the weights (64, 64) from the first hidden layer to the second hidden layer, and the weights (64, 64) from the second hidden layer to the third hidden layer. Each linear layer is followed by a ReLU activation function. The decoder consists of three linear layers, which are the weights (64, 128) from the first hidden layer to the second hidden layer, the weights (128, 64) from the second hidden layer to the third hidden layer, and the weights (64, 6) from the third hidden layer to the output layer. The output size of the last linear layer is 6, corresponding to the dimension of the input features. In addition, the model uses the Adam optimization algorithm, the initial learning rate is 0.001, and the mean square error loss function is used to calculate the error between the output and the target data. In each training iteration, the loss between the model output and the target data is calculated, and then the gradient is back-propagated according to the loss, and the optimizer is used to update the model parameters to minimize the loss function. Mean square error loss (MSELoss) is a common loss function for regression problems, which measures the mean square error between the model output and the target. By minimizing the mean square error loss, the model can learn how to better fit the target value, thereby improving the accuracy and generalization ability of the model.

[0096] Then select the appropriate diffusion model architecture, determine the number of layers of the model, the number of neurons in each layer, etc., and then use the prepared data set to train the model. This process can use optimization algorithms such as gradient descent to adjust the model parameters by minimizing the model's loss function.

[0097] The model parameter initialization is automatically completed during the model creation process. The appropriate initialization method is selected according to the different layer types. In this DDPM model, each linear layer has two types of parameters: weights and bias terms. For the linear layer, its weight represents the connection weight between neurons, and the bias term is the bias value of each neuron. When the model is initialized, the Xavier initialization method is used to initialize the weights of the linear layer. For a linear layer with an input dimension of n and an output dimension of m, Xavier initialization initializes the weight parameters to come from a uniform distribution:

[0098]

[0099] Or a Gaussian distribution:

[0100]

[0101] In this model, the weight parameters of each linear layer are initialized according to the weight values ​​sampled from the normal distribution. Using the Xavier initialization method helps the model converge faster during training and is easier to optimize. Then the bias parameters of each linear layer are initialized with constants and the bias items are initialized to 0.

[0102] Model training first initializes the model parameters, inputs the original data into the model, and gradually performs the reverse diffusion process to generate a series of observation data under noise levels. The likelihood function of the observation data is calculated and used as the loss function. The model parameters are then updated using the back propagation algorithm to maximize the likelihood of the data generated by the model and the original data. Finally, the model is saved and the trained model is saved for subsequent use. A diffusion model that can generate one-dimensional data that conforms to the distribution of the original data can be trained.

[0103] S3: Compare the generated simulated load data with the original data set for similarity, and select high-quality simulated load data as the final load scenario data.

[0104] In the embodiment of the present invention, the generated simulated load data is compared with the original data set for similarity, and the high-quality simulated load data is screened out, including:

[0105] Define the cosine similarity discriminant network, represent the data as vectors, use cosine similarity to measure the similarity between them based on the cosine value of the angle between the vectors, set the similarity threshold to 0.95, and filter out the simulated load data above the threshold as output;

[0106] Among them, the cosine similarity function formula is:

[0107]

[0108] Among them, A and B are two comparison vector data, the value range is [-1, 1], -1 means completely dissimilar, 1 means completely similar;

[0109] The generated simulated load data and the original load data are put into the cosine similarity discrimination network for cosine similarity comparison, and the simulated load data with cosine similarity higher than 0.95 are screened out and saved as output data.

[0110] It should be noted that cosine similarity is a commonly used similarity measurement method used to compare the similarity between two vectors. It measures the cosine value of the angle between two vectors, ranging from -1 to 1. The closer the cosine similarity is to 1, the more similar the two vectors are; the closer it is to -1, the less similar the two vectors are; and the closer it is to 0, the less similar the two vectors are.

[0111] In the cosine similarity comparison, the objects to be compared need to be represented in vector form. This can be a vector representation of a text document, an image, a user preference, etc. In order to eliminate the influence of the vector length, the vector usually needs to be normalized and converted into a unit vector before the cosine similarity comparison. The calculation of cosine similarity involves the inner product of two vectors. The inner product refers to the sum of the products of the corresponding elements of the two vectors. When calculating cosine similarity, in addition to calculating the inner product, it is also necessary to calculate the length of each vector, that is, the modulus of the vector. The formula for calculating cosine similarity is the inner product of the two vectors divided by the product of the moduli of the two vectors. This calculation process is the core part of the entire comparison function.

[0112] Through the above structure, the cosine similarity comparison function can effectively measure the angle between two vectors, thereby judging their similarity. Figure 4 shown.

[0113] The above is a schematic scheme of the method for generating load scenarios for an integrated energy system based on a diffusion network in this embodiment. It should be noted that the technical scheme of the system for generating load scenarios for an integrated energy system based on a diffusion network and the technical scheme of the method for generating load scenarios for an integrated energy system based on a diffusion network belong to the same concept. For details not described in detail in the technical scheme of the system for generating load scenarios for an integrated energy system based on a diffusion network in this embodiment, please refer to the description of the technical scheme of the method for generating load scenarios for an integrated energy system based on a diffusion network.

[0114] The integrated energy system load scenario generation system based on the diffusion network in this embodiment includes:

[0115] The historical load data acquisition and preprocessing module is used to obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and preprocess it, and obtain the original data set;

[0116] The model training module is used to build a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data;

[0117] The data discrimination module is used to compare the generated simulated load data with the original data set for similarity and screen out high-quality simulated load data as the final load scenario data.

[0118] This embodiment also provides a computing device, applicable to the method, including:

[0119] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the method proposed in the above embodiment.

[0120] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiment is implemented.

[0121] The storage medium proposed in this embodiment and the method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0122] Example 2

[0123] Referring to Tables 1 and 2, an embodiment of the present invention provides a method for generating load scenarios of an integrated energy system based on a diffusion network. In order to verify the beneficial effects of the present invention, a scientific demonstration is carried out through simulation experiments.

[0124] The present invention designs a load scenario generation method for an integrated energy system based on a diffusion network using a public integrated energy dataset. The dataset contains 4 different types of weather influencing factors and voltage measurement load values, totaling 104,345 sets of data.

[0125] Firstly, the acquired historical load data is preprocessed, and the training data set is divided into four types of training data sets according to the time nodes. The four types of training data sets are respectively put into the defined diffusion model. Table 1 describes the data of one type.

[0126] Table 1 Part of the training data set

[0127] Temperature(℃) Pressure(kPa) Wind speed (m / s) humidity(%) Load(kW) 4.3 774.5 3.9 27.3 1207.518 4.2 774.5 3.8 27.5 1228.288 4.1 774.4 3.8 27.8 1162.078 4.0 774.4 3.7 28.0 1251.621 3.9 774.4 3.6 28.3 1246.394 3.8 774.4 3.5 28.5 1378.294 3.6 774.4 3.4 28.8 1268.724 3.5 774.4 3.3 29.0 1389.661 3.4 774.3 3.3 29.3 1438.346 3.3 774.3 3.2 29.5 1559.231 3.2 774.3 3.1 29.8 1597.541 3.1 774.3 3.0 30.0 1697.501 2.9 774.3 2.9 30.8 1875.072 2.8 774.4 2.8 31.5 1965.936 2.6 774.4 2.8 32.3 1942.256 2.4 774.4 2.7 33.0 1950.088

[0128] The initial Gaussian noise is generated as the starting point by the initial noise generator, and the noise intensity is gradually reduced to generate the data for the next time step. Samples are generated from the conditional distribution by Markov chain Monte Carlo sampling based on the current noise and the generated data. After each diffusion process, the data authenticity is enhanced by increasing the noise intensity. The forward diffusion process is stopped based on the number of diffusion steps that have been reached or the quality of the generated data. The real data is loaded as the starting point of the reverse denoising process by the real data loader. The data state of the previous time step is reconstructed based on the current data and the generated noise by the conditional generation model. After each denoising process, the noise intensity is gradually increased to simulate the process that the data gradually tends to the initial noise. The reverse denoising process is stopped based on the number of denoising steps that have been reached or the quality of the generated noise. Finally, the generated simulated load data is obtained. The cosine similarity function is used to compare the simulated load data with the original data. Table 2 describes the simulated load data with high similarity as the output.

[0129] Table 2 Screening output simulation load data

[0130] Temperature(℃) Pressure(kPa) Wind speed (m / s) humidity(%) Load(kW) 4.3 774.6 4.0 27.5 1209.262 4.4 774.5 4.0 27.0 1237.874 4.3 774.5 3.9 27.3 1207.518 4.2 774.5 3.8 27.5 1228.288 4.1 774.5 3.8 27.8 1162.078 4.0 774.4 3.7 28.0 1251.621 3.9 774.4 3.6 28.3 1246.394 3.8 774.4 3.5 28.5 1378.294 3.6 774.4 3.4 28.8 1268.724 3.5 774.4 3.3 29.0 1389.661 3.4 774.4 3.3 29.3 1438.346 3.3 774.3 3.2 29.5 1559.231 3.2 774.3 3.1 29.8 1597.541 3.1 774.3 3.0 30.0 1697.501 2.9 774.3 2.9 30.8 1875.072 2.8 774.4 2.8 31.5 1965.936

[0131] It can be seen that the public comprehensive energy data set is used for training, covering a variety of weather factors and load values. Through effective noise management and Markov chain Monte Carlo sampling, time step data is gradually generated and reconstructed to ensure that the generated simulated load data is highly similar to the real data. Finally, the validity of the generated data is verified by the cosine similarity function to ensure the accuracy and practicality of the model in load scenario generation.

[0132] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for generating load scenarios of an integrated energy system based on a diffusion network, characterized in that: include: Obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and pre-process it, and obtain the original data set; Construct a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data; The generated simulated load data is compared with the original data set for similarity, and high-quality simulated load data is screened out as the final load scenario data.

2. The method for generating load scenarios of an integrated energy system based on a diffusion network according to claim 1, characterized in that: The acquisition of integrated energy system load data and the establishment of a multi-factor power load sample data set for merging and preprocessing include: Obtain weather load data for each day of each month, and obtain load values ​​every one hour; preprocess the acquired load data to complete missing data or correct abnormal data; classify the data, set intervals, extract load data for different time periods, and divide the load data into power load sample data sets for different time periods.

3. The method for generating load scenarios of an integrated energy system based on a diffusion network according to claim 2, characterized in that: The construction of the diffusion network model and training the original data set using the diffusion network model include: The original data set is normalized and scaled to the interval [-1,1] to build a denoising diffusion probability model. Two Markov chains, one in front and one behind, are used to build a forward diffuser and a reverse denoiser to achieve the goal of gradually injecting noise into the data and generating new samples, thus building a complete diffusion network model.

4. The method for generating load scenarios of an integrated energy system based on a diffusion network according to claim 3, characterized in that: The construction of the forward diffuser and the reverse denoiser comprises: Generate initial Gaussian noise as the starting point through the initial noise generator, gradually reduce the intensity of the noise, and generate data for the next time step. Generate samples from the conditional distribution through Markov chain Monte Carlo sampling based on the current noise and the generated data. After each diffusion process, enhance the authenticity of the data by increasing the intensity of the noise, and stop the forward diffusion process based on the number of diffusion steps that have been reached or the quality of the generated data. The real data is loaded through the real data loader as the starting point of the reverse denoising process. The data state of the previous time step is reconstructed according to the current data and the generated noise through the conditional generation model. After each denoising process, the intensity of the noise is gradually increased to simulate the process of the data gradually tending to the initial noise. The reverse denoising process is stopped based on the number of denoising steps that have been reached or the quality of the generated noise.

5. The method for generating load scenarios of an integrated energy system based on a diffusion network according to claim 4, characterized in that: The construction of the diffusion network model and training the original data set using the diffusion network model further includes: Use the Adam optimizer with an initial learning rate of 1*e -3 Train the model; during the training process, loop through each epoch, calculate the mean square error loss between the generated simulated data and the original data, and update the model parameters based on the loss value; Adjust the parameters of the diffusion network model so that the model can better fit the training data, and use the trained model to generate new data as output.

6. The method for generating load scenarios of an integrated energy system based on a diffusion network according to claim 5, characterized in that: The generated simulated load data is compared with the original data set for similarity, and high-quality simulated load data is screened out, including: Define the cosine similarity discriminant network, represent the data as vectors, use cosine similarity to measure the similarity between them based on the cosine value of the angle between the vectors, set the similarity threshold to 0.95, and filter out the simulated load data above the threshold as output; Among them, the cosine similarity function formula is: Among them, A and B are two comparison vector data, the value range is [-1, 1], -1 means completely dissimilar, 1 means completely similar; The generated simulated load data and the original load data are put into the cosine similarity discrimination network for cosine similarity comparison, and the simulated load data with cosine similarity higher than 0.95 are screened out and saved as output data.

7. A system using the method for generating load scenarios of an integrated energy system based on a diffusion network as claimed in any one of claims 1 to 6, characterized in that: include: The historical load data acquisition and preprocessing module is used to obtain the load data of the integrated energy system, establish a multi-factor power load sample data set, merge and preprocess it, and obtain the original data set; The model training module is used to build a diffusion network model, train the original data set using the diffusion network model, restore high-quality data through forward denoising and reverse generation processes, and generate simulated load data; The data discrimination module is used to compare the generated simulated load data with the original data set for similarity and screen out high-quality simulated load data as the final load scenario data.

8. The load scenario generation system for an integrated energy system based on a diffusion network according to claim 7, characterized in that: include: The historical load data acquisition and preprocessing module acquires the weather load data of each day of each month and obtains the load value every hour; Preprocess the acquired load data to complete the missing data or correct the abnormal data; classify the data, set intervals, extract the load data of different time periods, and divide the load data into power load sample data sets of different time periods; The model training module normalizes the original data set, scales the data to the interval [-1,1], builds a denoising diffusion probability model, and uses two Markov chains, one in front and one behind, to build a forward diffuser and a reverse denoiser, so as to achieve the goal of gradually injecting noise into the data and generating new samples, thus building a complete diffusion network model. The construction of the forward diffuser and the reverse denoiser comprises: Generate initial Gaussian noise as the starting point through the initial noise generator, gradually reduce the intensity of the noise, and generate data for the next time step. Generate samples from the conditional distribution through Markov chain Monte Carlo sampling based on the current noise and the generated data. After each diffusion process, enhance the authenticity of the data by increasing the intensity of the noise, and stop the forward diffusion process based on the number of diffusion steps that have been reached or the quality of the generated data. Load the real data as the starting point of the reverse denoising process through the real data loader, reconstruct the data state of the previous time step according to the current data and the generated noise through the conditional generation model, and after each denoising process, gradually increase the intensity of the noise to simulate the process of data gradually tending to the initial noise, and stop the reverse denoising process based on the number of denoising steps that have been reached or the quality of the generated noise; The model training module uses the Adam optimizer with an initial learning rate of 1*e -3 Train the model; during the training process, loop through each epoch, calculate the mean square error loss between the generated simulated data and the original data, and update the model parameters based on the loss value; Adjust the parameters of the diffusion network model so that the model can better fit the training data, and use the trained model to generate new data as output; The data discrimination module defines a cosine similarity discrimination network, represents the data as a vector, and uses cosine similarity to measure the similarity between them based on the cosine value of the angle between the vectors. The threshold of the similarity is set to 0.95, and the simulated load data above the threshold is selected as the output; Among them, the cosine similarity function formula is: Among them, A and B are two comparison vector data, the value range is [-1, 1], -1 means completely dissimilar, 1 means completely similar; The generated simulated load data and the original load data are put into the cosine similarity discrimination network for cosine similarity comparison, and the simulated load data with cosine similarity higher than 0.95 are screened out and saved as output data.

9. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for generating load scenarios for an integrated energy system based on a diffusion network as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for generating load scenarios for an integrated energy system based on a diffusion network as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Energy storage market risk hedging scheduling method, system and device based on multi-scene diffusion diagram prediction and storage medium

    CN121504136A