Carbon emission flow generation method, model training method, device and computer equipment

By using a carbon emission stream generation method and iterative training of a preprocessing model and a generative adversarial model, new carbon emission stream data is generated, which solves the problem of fragmented electro-carbon coupling data, improves data quality and applicability, and promotes the development of electro-carbon coupling technology.

CN116737793BActive Publication Date: 2024-11-08南方电网能源发展研究院有限责任公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310623197.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2024-11-08
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

Traditional carbon emission studies focus on a single aspect, resulting in fragmented data quality for electro-carbon coupling and limiting the development of electro-carbon coupling technology.

Method used

A carbon emission stream generation method is adopted, which acquires electro-carbon coupling data and inputs it into a preprocessing model and a generative adversarial model. The generative adversarial model includes a generator and a discriminator. New carbon emission stream data is generated through iterative training, and the convergence curve and learning efficiency of the generative adversarial model are optimized.

Benefits of technology

This achievement has enabled the amplification of electro-carbon coupling data, improved data quality and applicability, and promoted the development of electro-carbon coupling technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737793B_ABST
    Figure CN116737793B_ABST
Patent Text Reader

Abstract

The present application relates to a carbon emission flow generation method, a model training method, an apparatus and a computer device. The carbon emission flow generation method includes: obtaining electric-carbon coupling data; inputting the electric-carbon coupling data into a trained carbon emission flow generation model to obtain carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model, the preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters. This method can be used to amplify existing electric-carbon coupling data and improve data quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a carbon emission flow generation method, model training method, device and computer equipment. Background Art

[0002] The assessment method of carbon emission flow of the power system is an effective method to characterize the carbon emission distribution in the power supply area based on power flow and carbon emission intensity. It is an important foundation for supporting high-quality, high-precision and high-efficiency electricity-carbon coupling technology, and is crucial to promoting the coordinated development of multiple market systems such as electricity, carbon, green certificates and green electricity.

[0003] Traditional research on carbon emissions is mostly focused on one aspect, such as modeling electricity data or optimizing carbon emission monitoring models.

[0004] However, unilateral research has led to fragmented quality of electro-carbon coupling data and a lack of electro-carbon coupling data, which has limited the development of electro-carbon coupling technology. Summary of the invention

[0005] Based on this, it is necessary to provide a carbon emission flow generation method, model training method, device and computer equipment that can generate new electric-carbon coupling data based on existing electric-carbon coupling data to address the above-mentioned technical problems.

[0006] In a first aspect, the present application provides a method for generating a carbon emission flow. The method comprises:

[0007] Obtaining electric-carbon coupling data;

[0008] The electric-carbon coupling data is input into the trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model. The preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters.

[0009] In one embodiment, obtaining electric-carbon coupling data includes:

[0010] Obtaining the time-series power flow section information and carbon emission intensity of power generation units;

[0011] The time-series power flow section information and carbon emission intensity are coupled to obtain electricity-carbon coupling data.

[0012] In one embodiment, the trained carbon emission flow generation model is trained according to the following method:

[0013] Acquire an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set;

[0014] Inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters;

[0015] The second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0016] In one embodiment, the generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including:

[0017] Generate expansion samples based on random noise through the generator;

[0018] Through the discriminator, the second sample set and the generated expanded samples are iteratively trained based on the intermediate training parameters until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

[0019] In a second aspect, the present application also provides a method for training a carbon emission flow generation model. The carbon emission flow generation model includes a preprocessing model and a generative adversarial model; the method includes:

[0020] Acquire an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set;

[0021] Inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters;

[0022] The second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0023] In one embodiment, the generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including:

[0024] Generate expansion samples based on random noise through the generator;

[0025] Through the discriminator, the second sample set and the generated expanded samples are iteratively trained based on the intermediate training parameters until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

[0026] In a third aspect, the present application also provides a carbon emission flow generating device. The device comprises:

[0027] A coupling data acquisition module, used to acquire electric-carbon coupling data;

[0028] The carbon emission flow acquisition module is used to input the electric-carbon coupling data into the trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model. The preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters.

[0029] In a fourth aspect, the present application also provides a training device for a carbon emission flow generation model. The carbon emission flow generation model includes a preprocessing model and a generative adversarial model; the device includes:

[0030] A sample set acquisition module, used to acquire an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set;

[0031] A preprocessing model training module, used for inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters;

[0032] The generative adversarial model training module is used to input the second sample set and the intermediate training parameters into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0033] In a fifth aspect, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the carbon emission flow generation method, or the steps of the carbon emission flow generation model training method.

[0034] In a sixth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the carbon emission flow generation method or the steps of the carbon emission flow generation model training method are implemented.

[0035] In a seventh aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of a method for generating a carbon emission flow, or the steps of a method for training a carbon emission flow generation model.

[0036] The above-mentioned carbon emission flow generation method, model training method, device and computer equipment, the carbon emission flow generation model includes a preprocessing model and a generative adversarial model. After obtaining the electric-carbon coupling data, the electric-carbon coupling data is simultaneously input into the preprocessing model and the generative adversarial model. The preprocessing model first preprocesses the electric-carbon coupling data to obtain intermediate parameters, and then the generative adversarial model generates new carbon emission flow data based on the electric-carbon coupling data based on the intermediate parameters, thereby realizing the amplification of the electric-carbon coupling data. By adding a preprocessing model to the generative adversarial model, the parameters in the generative adversarial model are preprocessed, the convergence curve of the generative adversarial model is optimized, and the applicability is improved. At the same time, it can be amplified based on the existing electric-carbon coupling data to improve the data quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A diagram of an application environment of a carbon emission flow generation method and a carbon emission flow generation model training method in one embodiment;

[0038] Figure 2 A schematic diagram of a process for generating a carbon emission flow in one embodiment;

[0039] Figure 3 A block diagram of a carbon emission flow generation model in one embodiment;

[0040] Figure 4 A schematic flow chart of a method for generating a carbon emission flow in another embodiment;

[0041] Figure 5 A schematic diagram of a process flow of a method for training a carbon emission flow generation model in one embodiment;

[0042] Figure 6 is a structural block diagram of a carbon emission flow generating device in one embodiment;

[0043] Figure 7 A structural block diagram of a training device for a carbon emission flow generation model in one embodiment;

[0044] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] The carbon emission flow generation method and the carbon emission flow generation model training method provided in the embodiments of the present application can be applied to the following examples: Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. After receiving the request to generate the carbon emission flow, the server 104 generates carbon emission flow data. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0047] In one embodiment, Figure 2 As shown, a method for generating a carbon emission flow is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps S202 to S204:

[0048] S202, obtaining electric-carbon coupling data.

[0049] Electricity-carbon coupling data is obtained by coupling power flow with time series information and carbon emission intensity, and is also called electricity-carbon flow coupling data.

[0050] Electricity-carbon coupling data is a type of data used to describe the relationship between the power system and carbon emissions. It reflects the impact of electricity generation, transmission and use in the power system on carbon emissions. Schematically, electricity-carbon coupling data can include power system generation capacity and operating conditions, power system load demand and use, and carbon emission intensity and emissions.

[0051] S204, input the electric-carbon coupling data into the trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model, the preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters.

[0052] The carbon emission flow generation model includes a preprocessing model and a generative adversarial model, which are used to output carbon emission flow data according to the electricity-carbon coupling data. The electricity-carbon coupling data can be input into the preprocessing model and the generative adversarial model at the same time. The preprocessing model preprocesses the electricity-carbon coupling data, outputs intermediate parameters, and inputs the intermediate parameters into the generative adversarial model. The generative adversarial model modifies itself according to the intermediate parameters and outputs carbon emission flow data according to the electricity-carbon coupling data. The carbon emission flow data can be of the same type as the electricity-carbon coupling data, both of which are electricity-carbon flow coupling data.

[0053] Generally, a single generative adversarial model is prone to model collapse and gradient disappearance during the calculation process, which affects the output results. After adding the preprocessing model, some parameters in the generative adversarial model are preprocessed in advance, and then the trained parameters are input into the generative adversarial model to optimize the convergence curve and learning efficiency of the generative adversarial model.

[0054] Schematically, the preprocessing model can be a TL (Transfer Learning) module, and the generative adversarial model can be a GAN (Generative Adversarial Networks) module. In this case, the carbon emission flow generation model can be expressed as a GAN-TL model.

[0055] In the above-mentioned carbon emission flow generation method, the carbon emission flow generation model includes a preprocessing model and a generative adversarial model. After obtaining the electric-carbon coupling data, the electric-carbon coupling data are simultaneously input into the preprocessing model and the generative adversarial model. The electric-carbon coupling data is first preprocessed by the preprocessing model to obtain intermediate parameters, and then the generative adversarial model generates new carbon emission flow data according to the electric-carbon coupling data based on the intermediate parameters, thereby realizing the amplification of the electric-carbon coupling data. By adding a preprocessing model to the generative adversarial model, the parameters in the generative adversarial model are preprocessed, and the convergence curve of the generative adversarial model is optimized to improve applicability. At the same time, the method provided in this embodiment can be amplified based on the existing electric-carbon coupling data to improve data quality.

[0056] In one embodiment, obtaining electricity-carbon coupling data includes: obtaining time-series power flow section information of electricity and carbon emission intensity of power generation units; coupling the time-series power flow section information and carbon emission intensity to obtain electricity-carbon coupling data.

[0057] The power flow section information refers to the snapshot flow calculation of the electrical parameters of a power transmission line or a power equipment (such as a transformer, generator, etc.) in the power system to obtain the distribution of parameters such as voltage, current, active power, reactive power, etc. of each node of the power equipment or the power transmission line, so as to obtain the branch flow distribution of the power system, the active power injected by the unit, the load distribution and the node active flux, etc. The time series flow section of power refers to the information that includes both time series information and flow section information.

[0058] The carbon emission intensity of a generator set refers to the weight of carbon dioxide emitted per unit of electricity generated during the power generation process. Generator sets need to burn a certain amount of fuel during operation, such as coal, oil, natural gas, etc. These fuels contain carbon elements and will produce a large amount of carbon dioxide during the combustion process. After obtaining the carbon emission intensity, the carbon emission intensity vector, node carbon potential vector and branch carbon flow rate of the generator set in the power system can be further determined.

[0059] After obtaining the time-series power flow section information and the carbon emission intensity of the generator set, the two can be coupled to obtain the power-carbon coupling data. Schematically, the coupling method can be to establish the branch power flow distribution matrix, the unit injected active power matrix, the load distribution matrix and the node active flux matrix based on the time-series power flow section information, and to establish the generator set carbon emission intensity vector, the node carbon potential vector and the branch carbon flow rate matrix based on the carbon emission intensity, and couple through matrix operations.

[0060] In this embodiment, the time-series power flow section information and the carbon emission intensity of the power generation unit are first obtained, and the two are coupled and calculated to obtain the electricity-carbon coupling data. In this way, the real electricity-carbon coupling data can be obtained and input into the carbon emission flow generation model to generate a new carbon emission flow.

[0061] In one embodiment, a trained carbon emission flow generation model is trained according to the following method: obtaining an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set; inputting the first sample set into a preprocessing model for training to obtain intermediate training parameters; inputting the second sample set and the intermediate training parameters into a generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0062] The carbon emission flow generation model needs to be trained using sample data. During the training process, firstly, a training sample is obtained, that is, an existing electric-carbon coupling sample set X. Optionally, the electric-carbon coupling sample set is obtained by coupling the obtained power time series flow section information and the carbon emission intensity of the generator set.

[0063] In a feasible coupling calculation method, the power time-series flow section data is first collected and analyzed, including the branch active power flow distribution, system bus node information, generator unit information, and load distribution information. The data set is recorded as PF. Then, the carbon emission intensity data of each unit is collected according to the power system unit information, and the time-series electric-carbon coupling data is calculated by the matrix calculation method of the power system carbon emission flow, and the electric-carbon coupling sample set X for training is obtained after preprocessing. The calculation model of the time-series power-carbon flow characteristics is shown in formula (1):

[0064] D=[C S,t ,C B,t ,C L,t ,C G,t ]=M(E G,t ,PF S,G,L,B,t ) (1)

[0065] Among them, S is the system node parameter set, B is the system branch parameter set, L is the system load parameter set, G is the system unit parameter set, T represents the timing parameter set, t∈T, and C represents the carbon flow related feature vector. For example, C S,t represents the node carbon potential at time t in the time series table. Therefore, C B,t , C L,t and C G,t They represent the branch carbon flow, load carbon flow and unit injection carbon flow at time t respectively. G,t is the carbon emission intensity of the unit at time t. The right side of the equation PF is the power flow section data set, M(·) is the time series power carbon flow calculation framework; for the generated training sample X, data normalization processing methods such as min-max scaling and mean-variance method can be selected to realize data preprocessing.

[0066] The electric-carbon coupling sample set includes the first sample set X min and the second sample set X max , where X = X min ∪X max , indicating that the total sample set is the first sample set X min and the second sample set X max The first sample set X min For training the preprocessing model, the second sample set X max For training the generative adversarial model, schematically, the first sample set X min The number of samples can be smaller than the second sample set X max The subscripts min and max only indicate the number of samples in the sample set.

[0067] The electric-carbon coupling sample set is input into the carbon emission flow generation model to be trained, where the first sample set X min Input into the preprocessing model, the second sample set X max Input into the generative adversarial model.

[0068] Set the learning step size, training epochs, and training batches of the preprocessing model, and import the intermediate training parameters after training into the generative adversarial model. Set the learning step size, training epochs, and training batches of the generative adversarial model. After training, you can obtain a carbon emission flow generation model that can generate carbon emission flow data.

[0069] In this embodiment, an electric-carbon coupling sample set is first obtained, and the electric-carbon coupling sample set is divided into a first sample set and a second sample set. The first sample set is used to train the preprocessing model, and the second sample set is used to train the adversarial generation model. After the preprocessing model outputs intermediate training parameters according to the first sample set, the adversarial generation model is trained according to the intermediate training parameters and the second sample set to obtain a complete trained carbon emission flow generation model.

[0070] In one embodiment, the generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including: generating an expanded sample according to random noise through the generator; through the discriminator, iteratively training the second sample set and the generated expanded sample based on the intermediate training parameters until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

[0071] The generative adversarial model includes a generator (G) and a discriminator (D). The generator is used to generate "virtual" data, that is, to expand the capacity of the sample, and the discriminator continuously improves its discrimination ability by discriminating and learning between the input training data and the "virtual" data. The generator and the discriminator compete in the form of a zero-sum game, and the loss of one is the gain of the other, and finally the balance of loss and gain is achieved through training iterations. At this point, the discriminator will not be able to distinguish between the "virtual" data and the input training data, and the training of the generative adversarial model can be considered to be completed. Schematically, both the generator and the discriminator can be neural networks, such as DNN (Deep Neural Networks).

[0072] like Figure 3 As shown, the electric-carbon coupling sample set is input into the carbon emission flow generation model to be trained, wherein the first sample set X min Input into the preprocessing model, the second sample set X max The intermediate training parameters obtained by preprocessing model training are also input into the generative adversarial model.

[0073] In one feasible training method, the training steps of the preprocessing model are as follows:

[0074] (1)Select Define training epochs min ;

[0075] (2) For epochs min For each e in , the following steps (3) to (4) are performed in a loop;

[0076] (3) Through the formula Get gθ T The value of

[0077] (4) Set θ T -αgθ T The result is assigned to the new θ T ;

[0078] (5) End the cycle of steps (3) to (4).

[0079] Among them, m c represents the training batch, α is the learning step size, which is used to control the degree of each gradient update. T Represents the intermediate training parameter θ T The computational process of performing an update. A training epoch, also known as the number of iterations or rounds, refers to a complete training cycle completed after an update of the model parameters for a given training data set during the training process of a machine learning model.

[0080] The above steps (3)-(4) are the classic machine learning framework, which uses the SGD (Stochastic Gradient Descent) method to implement the parameter θ in each training. T After the training is completed, the trained intermediate training parameters Parameter model passed to the discriminator (D) of the generative adversarial model In the process, the discriminator and generator are continuously optimized. Specifically, the training steps of the generative adversarial model are as follows:

[0081] (1) Trained intermediate training parameters Parameter model passed to the discriminator (D) of the generative adversarial model middle;

[0082] (2)Select Define training epochs max ;

[0083] (3) For epochs max For each e in , the operations of step (4) to step (5) are performed in a loop in sequence;

[0084] (4) Through z i =random(R n ) Generate random noise z i ;

[0085] (5) Through the formula

[0086]

[0087] Get and The value of

[0088] (6) End the cycle of step (4) to step (5);

[0089] (7) Return the finalized generator parameter G* to the generator.

[0090] Among them, the parameter model of the discriminator of the generated adversarial model Receive intermediate training parameters output by preprocessing model m n represents the batch size of a training; the noise sequence z i Generated by random noise generator random(·); and They represent the discriminator parameters θ through SGD respectively. D and the generator parameters θ G The calculation process of updating, x i max represents the i-th sample in the second sample set.

[0091] When the model training is complete, Generative adversarial models have an optimal solution. θ G is the parameter of the training sample in the generator, is the parameter obtained by training iterations of the “virtual” samples in the generator, θ D is the parameter of the training sample in the discriminator, is the parameter obtained by training iteratively for the "virtual" sample in the discriminator. A generative model capable of generating carbon emission flows can be obtained.

[0092] The essence of solving the generative adversarial model game problem is to solve the value function of the generator and the discriminator, as shown in formula (2):

[0093]

[0094] The solution to the minimax problem in the above formula is equivalent to the parameters θ of the discriminator and the generator D and θ G Conduct training. minmax (G, D) is the value function, E represents the expected value of the sample distribution; y is the sample for training, p f is a training sample set. The training sample y satisfies the distribution y~p f , p f It consists of a training sample set of real electric-carbon coupling data; the generator G(z; θ G ) is the parameter θ G As a general function approximation method, MLP can map the noise z to the new distribution P. G Similarly, the discriminator D(G(z;θ G );θ D ) is parameterized by θ G The discriminator can convert the output x of the generator into fakeMapped to the [0,1] interval, forming a probability output, thus characterizing x fake is to satisfy p f Distribution or P G distributed.

[0095] By solving the loss functions of the generator and the discriminator, it is determined whether the carbon emission flow generation model has converged. If not, the learning rate, training batch and other parameters are adjusted. If the loss function converges, the training is considered complete, that is, the generator is output. At this time, the carbon emission flow generation model can generate carbon emission flow data that meets the conditions.

[0096] In this embodiment, the generative adversarial model includes a generator and a discriminator, and the intermediate training parameters output by the preprocessing model are used as the input of the generative adversarial model. After the expanded sample is generated by the generator, the expanded sample and the second sample set are iteratively trained based on the intermediate training parameters by the discriminator until the generative adversarial model converges. The trained generator can generate carbon emission flow data consistent with the second sample set, thereby obtaining a trained generative adversarial model. The generative adversarial model is trained in this way so that it can output carbon emission flow data that meets the conditions.

[0097] like Figure 4 As shown, the present application provides a method for generating a carbon emission flow, comprising the following steps:

[0098] S402, obtaining the time-series power flow section information and the carbon emission intensity of the power generation unit.

[0099] S404, coupling the time series power flow section information and the carbon emission intensity to obtain electricity-carbon coupling data.

[0100] S406, input the electric-carbon coupling data into the trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model, the preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters.

[0101] In this embodiment, the time-series power flow section information and the carbon emission intensity of the generator set are first obtained, and the two are coupled to obtain the electric-carbon coupling data. The electric-carbon coupling data is input into the carbon emission flow generation model, and the carbon emission flow data can be generated based on the electric-carbon coupling data. The carbon emission flow generation model includes a preprocessing model and a generative adversarial model. The preprocessing model first trains some parameters in the generative adversarial model, and after the training is completed, it is input into the generative adversarial model for training, which optimizes the learning efficiency of the generative adversarial model.

[0102] like Figure 5As shown, the present application also provides a training method for a carbon emission flow generation model. The carbon emission flow generation model includes a preprocessing model and a generative adversarial model, and the training method includes the following steps:

[0103] S502, obtaining an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set.

[0104] In a feasible coupling calculation method, the power time-series flow section data is first collected and analyzed, including the branch active power flow distribution, system bus node information, generator unit information, and load distribution information. The data set is recorded as PF. Then, the carbon emission intensity data of each unit is collected according to the power system unit information, and the time-series electric-carbon coupling data is calculated through the matrix calculation method of the power system carbon emission flow, and the electric-carbon coupling sample set X for training is obtained after preprocessing.

[0105] The electric-carbon coupling sample set includes the first sample set X min and the second sample set X max , where X = X min ∪X max , indicating that the total sample set is the first sample set X min and the second sample set X max The first sample set X min For training the preprocessing model, the second sample set X max For training the generative adversarial model, schematically, the first sample set X min The number of samples can be smaller than the second sample set X max The subscripts min and max only indicate the number of samples in the sample set.

[0106] S504: Input the first sample set into a preprocessing model for training to obtain intermediate training parameters.

[0107] The electric-carbon coupling sample set is input into the carbon emission flow generation model to be trained, where the first sample set X min Input into the preprocessing model, the second sample set X max Input into the generative adversarial model.

[0108] Set the learning step size, training epochs, and training batches of the preprocessing model, and import the intermediate training parameters after training into the generative adversarial model.

[0109] S506: Input the second sample set and the intermediate training parameters into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0110] Set the learning step, training generation, and training batch of the generative adversarial model. After training, you can obtain a carbon emission flow generation model that can generate carbon emission flow data.

[0111] In this embodiment, an electric-carbon coupling sample set is first obtained, and the electric-carbon coupling sample set is divided into a first sample set and a second sample set. The first sample set is used to train the preprocessing model, and the second sample set is used to train the adversarial generation model. After the preprocessing model outputs intermediate training parameters according to the first sample set, the adversarial generation model is trained according to the intermediate training parameters and the second sample set to obtain a complete trained carbon emission flow generation model.

[0112] In one embodiment, the generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including: generating an expanded sample according to random noise through the generator; through the discriminator, iteratively training the second sample set and the generated expanded sample based on the intermediate training parameters until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

[0113] Similar to the generative adversarial model described above, the generative adversarial model includes a generator (G) and a discriminator (D). The generator is used to generate "virtual" data, that is, expansion samples, and the discriminator continuously improves its discrimination ability by discriminating and learning between the input training data and the "virtual" data. The generator and the discriminator compete in the form of a zero-sum game, and the loss of one is the gain of the other, and finally the balance of loss and gain is achieved through training iterations. At this point, the discriminator will not be able to distinguish between the "virtual" data and the input training data, and the training of the generative adversarial model can be considered completed.

[0114] By solving the loss functions of the generator and the discriminator, it is determined whether the carbon emission flow generation model has converged. If not, the learning rate, training batch and other parameters are adjusted. If the loss function converges, the training is considered complete, that is, the generator is output. At this time, the carbon emission flow generation model can generate carbon emission flow data that meets the conditions.

[0115] In this embodiment, the generative adversarial model includes a generator and a discriminator, and the intermediate training parameters output by the preprocessing model are used as the input of the generative adversarial model. After the expanded sample is generated by the generator, the expanded sample and the second sample set are iteratively trained based on the intermediate training parameters by the discriminator until the generative adversarial model converges. The trained generator can generate carbon emission flow data consistent with the second sample set, thereby obtaining a trained generative adversarial model. The generative adversarial model is trained in this way so that it can output carbon emission flow data that meets the conditions.

[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0117] Based on the same inventive concept, the embodiment of the present application also provides a carbon emission flow generation device for implementing the carbon emission flow generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more carbon emission flow generation device embodiments provided below can refer to the limitations of the carbon emission flow generation method above, and will not be repeated here.

[0118] In one embodiment, Figure 6 As shown, a carbon emission flow generation device 600 is provided, comprising: a coupled data acquisition module 602 and a carbon emission flow acquisition module 604, wherein:

[0119] The coupling data acquisition module 602 is used to acquire the electric-carbon coupling data.

[0120] The carbon emission flow acquisition module 604 is used to input the electric-carbon coupling data into the trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model. The preprocessing model is used to preprocess the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data based on the electric-carbon coupling data and the intermediate parameters.

[0121] In one embodiment, the coupling data acquisition module 602 is specifically used to: obtain the time-series section information of the power flow and the carbon emission intensity of the power generation unit; couple the time-series section information and the carbon emission intensity to obtain the electricity-carbon coupling data.

[0122] Each module in the above-mentioned carbon emission flow generation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0123] Based on the same inventive concept, the embodiment of the present application also provides a training device for a carbon emission flow generation model for implementing the training method for the carbon emission flow generation model involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the training device for one or more carbon emission flow generation models provided below can refer to the limitations of the training method for the carbon emission flow generation model above, and will not be repeated here.

[0124] In one embodiment, Figure 7 As shown, a training device 700 for a carbon emission flow generation model is provided. The carbon emission flow generation model includes a preprocessing model and a generative adversarial model. The training device includes: a sample set acquisition module 702, a preprocessing model training module 704 and a generative adversarial model training module 706, wherein:

[0125] The sample set acquisition module 702 is used to acquire an electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set;

[0126] A preprocessing model training module 704 is used to input the first sample set into the preprocessing model for training to obtain intermediate training parameters;

[0127] The generative adversarial model training module 706 is used to input the second sample set and the intermediate training parameters into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

[0128] Each module in the training device for the carbon emission flow generation model can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0129] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store electric-carbon coupling data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a carbon emission flow generation method or a carbon emission flow generation model training method is implemented.

[0130] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0131] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, steps of a carbon emission flow generation method or steps of a carbon emission flow generation model training method are implemented.

[0132] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the carbon emission flow generation method or the steps of the carbon emission flow generation model training method are implemented.

[0133] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of a method for generating a carbon emission flow, or the steps of a method for training a carbon emission flow generation model.

[0134] 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, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0135] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0136] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating a carbon emission flow, It is characterized in that The method comprises: Obtaining electricity-carbon coupling data; including: obtaining the time-series power flow section information of electricity and the carbon emission intensity of the power generation unit; coupling the time-series power flow section information and the carbon emission intensity to obtain the electricity-carbon coupling data; the time-series power flow section information includes time-series information and power flow section information; The electric-carbon coupling data is input into a trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model, the preprocessing model is used to perform preprocessing on the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used to output the carbon emission flow data according to the electric-carbon coupling data and the intermediate parameters; The carbon emission flow generation model is obtained by training the electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set; the first sample set is input into the preprocessing model for training to obtain intermediate training parameters; wherein the training method steps of the preprocessing model are as follows: (1)Select Define training epochs min ; (2) For epochs min , and repeat the following steps (3) to (4) in sequence; (3) Through the formula Get gθ T The value of (4) Set θ T -αgθ T The result is assigned to the new θ T ; (5) End the cycle of step (3) to step (4); Among them, X min is the first sample set, m c represents the training batch, α is the learning step size, which is used to control the degree of each gradient update, gθ T Represents the intermediate training parameter θ T Perform the update calculation process, and the training generation is the number of iterations.

2. The method according to claim 1, It is characterized in that The time-series power flow section data includes branch active power flow distribution, system bus node information, generator set information, and load distribution information.

3. The method according to claim 1, It is characterized in that The trained carbon emission flow generation model is trained according to the following method: Acquire an electric-carbon coupling sample set; the process of acquiring the electric-carbon coupling sample set includes: collecting and analyzing the power time-series flow section data, including branch active power flow distribution, system bus node information, generator set information, and load distribution information; then collect the carbon emission intensity data of each unit according to the power system unit information, and calculate the time-series electric-carbon coupling data through the matrix calculation method of the power system carbon emission flow, and perform preprocessing to obtain the electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set; Inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters; The second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model.

4. The method according to claim 3, It is characterized in that The generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including: Generate an expansion sample according to random noise by the generator; The second sample set and the generated expanded sample are iteratively trained based on the intermediate training parameters through the discriminator until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

5. A training method for a carbon emission flow generation model, It is characterized in that The carbon emission flow generation model includes a preprocessing model and a generative adversarial model; the method includes: Acquire an electric-carbon coupling sample set; the process of acquiring the electric-carbon coupling sample set includes: collecting and analyzing the power time-series flow section data, including branch active power flow distribution, system bus node information, generator set information, and load distribution information; then collect the carbon emission intensity data of each unit according to the power system unit information, and calculate the time-series electric-carbon coupling data through the matrix calculation method of the power system carbon emission flow, and perform preprocessing to obtain the electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set; Inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters; Inputting the second sample set and the intermediate training parameters into the generative adversarial model for training to obtain a trained carbon emission flow generation model; The training steps of the preprocessing model are as follows: (1)Select Define training epochs min ; (2) For epochs min For each e in , the following steps (3) to (4) are performed in a loop; (3) Through the formula Get gθ T The value of (4) Set θ T -αgθ T The result is assigned to the new θ T ; (5) End the cycle of step (3) to step (4); Among them, X min is the first sample set, m c represents the training batch, α is the learning step size, which is used to control the degree of each gradient update, gθ T Represents the intermediate training parameter θ T Perform the update calculation process, and the training generation is the number of iterations.

6. The method according to claim 5, It is characterized in that The generative adversarial model includes a generator and a discriminator; the second sample set and the intermediate training parameters are input into the generative adversarial model for training to obtain a trained carbon emission flow generation model, including: Generate an expansion sample according to random noise by the generator; The second sample set and the generated expanded sample are iteratively trained based on the intermediate training parameters through the discriminator until the generative adversarial model converges to obtain a trained carbon emission flow generation model.

7. A carbon emission flow generating device, It is characterized in that The device comprises: A coupling data acquisition module is used to acquire electricity-carbon coupling data; it is used to: acquire the time-series power flow section information of electricity and the carbon emission intensity of the generator set; couple the time-series power flow section information and the carbon emission intensity to obtain the electricity-carbon coupling data; the time-series power flow section information includes time-series information and power flow section information; A carbon emission flow acquisition module, used for inputting the electric-carbon coupling data into a trained carbon emission flow generation model to obtain the carbon emission flow data; the carbon emission flow generation model includes a preprocessing model and a generative adversarial model, the preprocessing model is used for preprocessing the electric-carbon coupling data to obtain intermediate parameters, and the generative adversarial model is used for outputting the carbon emission flow data according to the electric-carbon coupling data and the intermediate parameters; The carbon emission flow generation model is obtained by training the electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set; the first sample set is input into the preprocessing model for training to obtain intermediate training parameters; wherein the training method steps of the preprocessing model are as follows: (1)Select Define training epochs min ; (2) For epochs min For each e in , the following steps (3) to (4) are performed in a loop; (3) Through the formula Get gθ T The value of (4) Set θ T -αgθ T The result is assigned to the new θ T ; (5) End the cycle of step (3) to step (4); Among them, X min is the first sample set, m c represents the training batch, α is the learning step size, which is used to control the degree of each gradient update, gθ T Represents the intermediate training parameter θ T Perform the update calculation process, and the training generation is the number of iterations.

8. A training device for a carbon emission flow generation model, It is characterized in that The carbon emission flow generation model includes a preprocessing model and a generative adversarial model; the device includes: A sample set acquisition module is used to acquire an electric-carbon coupling sample set; the acquisition process of the electric-carbon coupling sample set includes: collecting and analyzing the power time-series flow section data, including branch active power flow distribution, system bus node information, generator set information, and load distribution information; then collecting the carbon emission intensity data of each unit according to the power system unit information, and calculating the time-series electric-carbon coupling data through the matrix calculation method of the power system carbon emission flow, and performing preprocessing to obtain the electric-carbon coupling sample set; the electric-carbon coupling sample set includes a first sample set and a second sample set; A preprocessing model training module, used for inputting the first sample set into the preprocessing model for training to obtain intermediate training parameters; A generative adversarial model training module, used for inputting the second sample set and the intermediate training parameters into the generative adversarial model for training to obtain a trained carbon emission flow generation model; Among them, the preprocessing model training module is used for the training method steps of the preprocessing model as follows: (1)Select Define training epochs min ; (2) For epochs min For each e in , the following steps (3) to (4) are performed in a loop; (3) Through the formula Get gθ T The value of (4) Set θ T -αgθ T The result is assigned to the new θ T ; (5) End the cycle of step (3) to step (4); Among them, X min is the first sample set, m c represents the training batch, α is the learning step size, which is used to control the degree of each gradient update, gθ T Represents the intermediate training parameter θ T Perform the update calculation process, and the training generation is the number of iterations.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.