Comprehensive energy metering simulation data generation method, device and storage medium
Feature extraction and adversarial training of comprehensive energy metering data are carried out through variational autoencoders and generative adversarial networks, which solves the problem of insufficient user data in large-scale comprehensive energy metering simulations, achieves efficient generation of simulation data, and improves simulation efficiency. and effect.
Patent Information
- Application Number
- CN202111405692.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The lack of user data during large-scale integrated energy metering online simulation results in low simulation efficiency and poor results.
Variational autoencoders and generative adversarial networks are used to perform feature extraction and adversarial training on the data in the pre-constructed comprehensive energy metering sample database to generate simulation data that satisfies authenticity and similarity constraints.
Effectively generates simulation data in comprehensive energy measurement scenarios, solves the problem of insufficient user data, provides complete and sufficient data for large-scale comprehensive energy measurement simulation, and improves the efficiency and effect of simulation.
Smart Images

Figure CN114880915B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data generation, and more specifically, to a method, device and storage medium for generating comprehensive energy metering simulation data. Background Art
[0002] With the development of integrated energy systems, the penetration rate of various types of distributed power sources has continued to increase. Some rural households and industrial parks have installed a large number of distributed photovoltaic power sources and energy storage equipment, which has led to a qualitative change in the nature of user loads. Therefore, in the power grid facing integrated energy metering, the metering business of different energy sources needs to fully consider the dynamic characteristics of different user loads.
[0003] However, there is a lack of user data in the current large-scale integrated energy metering online simulation process, and it is impossible to provide complete and sufficient data for the large-scale integrated energy metering simulation in real time, resulting in low efficiency and poor effect of integrated energy simulation. Summary of the invention
[0004] In view of the technical problem in the prior art that there is a lack of user data for large-scale integrated energy metering simulation, which leads to low efficiency and poor effect of integrated energy simulation, the present invention provides a method, device and storage medium for generating integrated energy metering simulation data. Taking the construction of an integrated energy metering simulation system as the starting point, combined with the key link requirements of energy metering simulation such as various business applications and artificial intelligence technology under the background of energy Internet, a method for generating integrated energy metering simulation data for multiple application scenarios is proposed, so as to provide complete and sufficient data for integrated energy metering simulation in real time.
[0005] According to one aspect of the present invention, a method for generating comprehensive energy metering simulation data is provided, comprising:
[0006] The feature extraction of the comprehensive energy metering data in the pre-built comprehensive energy metering sample database is performed through a variational autoencoder to obtain the encoded data features;
[0007] Inputting the data features into a generative adversarial network, and performing adversarial training on a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints;
[0008] When the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, the data generated by the generative adversarial network is determined as comprehensive energy metering simulation data, and a generated comprehensive energy metering simulation database is obtained according to the comprehensive energy metering simulation data.
[0009] Optionally, a data generation model for comprehensive energy metering simulation data is formed by a variational autoencoder, a generator of a generative adversarial network, and a discriminator.
[0010] Optionally, the output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is:
[0011]
[0012] Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution;
[0013] Maximize Expected E q(z|x) [logp(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [logp(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is:
[0014] max[γ1·E q(z|x) [logp(Dis l (x)|z)]-D KL (q(z|x)|p(z))]
[0015] In the formula, γ1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution;
[0016] The objective function of the generator of the generative adversarial network in the data generation model is:
[0017]
[0018] In the formula, γ2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true;
[0019] The objective function of the discriminator of the generated adversarial network in the data generation model is:
[0020]
[0021] In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
[0022] Optionally, train the generator and discriminator of the generative adversarial network by the following steps:
[0023] Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample.
[0024] Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using a mixed sample constructed from the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples;
[0025] Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and obtain the generated comprehensive energy metering simulation data.
[0026] Optionally, the constraint conditions for determining whether the data generated by the generative adversarial network satisfies the authenticity constraint and the similarity constraint are:
[0027] Authenticity loss L r Defined as:
[0028] L r =W(G(z;θ (G) );θ (D) )
[0029] In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample;
[0030] The similarity loss Ls is defined as:
[0031] Ls=||G(z;θ (G) )-I||2
[0032] In the formula, I represents the real sample, ||·||2 represents the 2-norm of the matrix, G(z; θ (G) ) represents the generated samples of the generator.
[0033] According to another aspect of the present invention, there is provided a device for generating comprehensive energy metering simulation data, comprising:
[0034] A feature extraction module is used to extract features of comprehensive energy metering data in a pre-built comprehensive energy metering sample database through a variational autoencoder to obtain encoded data features;
[0035] An adversarial training module, used for inputting data features into a generative adversarial network, and performing adversarial training on a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints;
[0036] The simulation data generation module is used to determine the data generated by the generative adversarial network as comprehensive energy metering simulation data when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, and obtain the generated comprehensive energy metering simulation database based on the comprehensive energy metering simulation data.
[0037] Optionally, a data generation model for comprehensive energy metering simulation data is formed by a variational autoencoder, a generator of a generative adversarial network, and a discriminator.
[0038] Optionally, the output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is:
[0039]
[0040] Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution;
[0041] Maximize Expected E q(z|x) [logp(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [logp(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is:
[0042] max[γ1·E q(z|x) [logp(Dis l (x)|z)]-D KL (q(z|x)|p(z))]
[0043] In the formula, γ1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution;
[0044] The objective function of the generator of the generative adversarial network in the data generation model is:
[0045]
[0046] In the formula, γ2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true;
[0047] The objective function of the discriminator of the generated adversarial network in the data generation model is:
[0048]
[0049] In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
[0050] Optionally, the adversarial training module is specifically used for:
[0051] Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample.
[0052] Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using a mixed sample constructed from the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples;
[0053] Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and obtain the generated comprehensive energy metering simulation data.
[0054] Optionally, the simulation data generation module is specifically used to determine whether the data generated by the generative adversarial network satisfies the constraints of the authenticity constraint and the similarity constraint:
[0055] Authenticity loss L r Defined as:
[0056] L r =W(G(z;θ (G) );θ (D) )
[0057] In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample;
[0058] The similarity loss Ls is defined as:
[0059] Ls=||G(z;θ (G) )-I||2
[0060] In the formula, I represents the real sample, ||·||2 represents the 2-norm of the matrix, G(z; θ (G) ) represents the generated samples of the generator.
[0061] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0062] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0063] Thus, the present invention first extracts features from the comprehensive energy metering data in the pre-constructed comprehensive energy metering sample database through a variational autoencoder to obtain the encoded data features. Then the data features are input into a generative adversarial network to perform adversarial training on the generator and discriminator of the generative adversarial network until the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint. Finally, when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, the data generated by the generative adversarial network is determined as comprehensive energy metering simulation data, and the generated comprehensive energy metering simulation database is obtained according to the comprehensive energy metering simulation data. Therefore, the present invention can effectively generate simulation data in the comprehensive energy metering scenario, solve the user data problem in the process of large-scale comprehensive energy metering online simulation, and provide complete and sufficient data for large-scale comprehensive energy metering simulation in real time. By implementing the comprehensive energy metering simulation data generation method provided by the present invention, the reasonable generation of basic data in large-scale comprehensive energy metering simulation can be achieved, the rationality of data generation in the simulation process can be improved, and the efficiency and effect of comprehensive energy simulation can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0065] Figure 1 is a flow chart of a method for generating comprehensive energy metering simulation data provided by an exemplary embodiment of the present invention;
[0066] Figure 2is a flow chart of comprehensive energy metering simulation data generation provided by an exemplary embodiment of the present invention;
[0067] Figure 3 is a framework diagram of a data generation model provided by an exemplary embodiment of the present invention;
[0068] Figure 4 It is a rendering of generated data and real data provided by an exemplary embodiment of the present invention;
[0069] Figure 5 It is a structural schematic diagram of a device for generating comprehensive energy metering simulation data provided by an exemplary embodiment of the present invention;
[0070] Figure 6 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0071] Below, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0072] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0073] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0074] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0075] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0076] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0077] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0078] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0079] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0080] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0081] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0082] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0083] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0084] Exemplary Methods
[0085] Figure 1FIG. 1 is a flow chart of a method for generating comprehensive energy metering simulation data provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the comprehensive energy metering simulation data generation method 100 includes the following steps:
[0086] Step 101: extract features of comprehensive energy metering data in a pre-constructed comprehensive energy metering sample database through a variational autoencoder to obtain encoded data features.
[0087] In the embodiment of the present invention, the generation process of comprehensive energy metering simulation data is as follows: Figure 2 See Figure 2 As shown, before feature extraction, it is necessary to build a comprehensive energy metering sample database (corresponding to Figure 2 The variational autoencoder mentioned in the present invention corresponds to Figure 2 In the VAE, the generated adversarial network corresponds to Figure 2 WGAN in .
[0088] Optionally, the architecture of the data generation model based on comprehensive energy metering simulation data is as follows: Figure 3 See Figure 3 As shown in the figure, the data generation model consists of a variational autoencoder, a generator and a discriminator of a generative adversarial network.
[0089] Optionally, the output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is:
[0090]
[0091] Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution;
[0092] Maximize Expected E q(z|x) [logp(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [logp(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is:
[0093] max[γ1·E q(z|x) [logp(Dis l (x)|z)]-D KL(q(z|x)|p(z))]
[0094] In the formula, γ1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution;
[0095] Step 102, inputting the data features into a generative adversarial network, and performing adversarial training of a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints;
[0096] Optionally, the objective function of the generator of the generative adversarial network in the data generation model is:
[0097]
[0098] In the formula, γ2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true;
[0099] The objective function of the discriminator of the generated adversarial network in the data generation model is:
[0100]
[0101] In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
[0102] Step 103, when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, the data generated by the generative adversarial network is determined as comprehensive energy metering simulation data, and a generated comprehensive energy metering simulation database is obtained according to the comprehensive energy metering simulation data.
[0103] Optionally, the objective function of the generator of the generative adversarial network in the data generation model is:
[0104]
[0105] In the formula, γ2 represents, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true;
[0106] The objective function of the discriminator of the generated adversarial network in the data generation model is:
[0107]
[0108] In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
[0109] Optionally, train the generator and discriminator of the generative adversarial network by the following steps:
[0110] Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample.
[0111] Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using a mixed sample constructed from the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples;
[0112] Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and obtain the generated comprehensive energy metering simulation data.
[0113] Optionally, the constraint conditions for determining whether the data generated by the generative adversarial network satisfies the authenticity constraint and the similarity constraint are:
[0114] Authenticity loss L r Defined as:
[0115] L r =W(G(z;θ (G) );θ (D) )
[0116] In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample;
[0117] The similarity loss Ls is defined as:
[0118] Ls=||G(z;θ (G) )-I||2
[0119] In the formula, I represents the real sample, ||·||2 represents the 2-norm of the matrix, G(z; θ (G) ) represents the generated samples of the generator.
[0120] In the embodiment of the present invention, taking the user power data in the integrated energy metering scenario as an example, the above-mentioned integrated energy metering simulation data generation process is used to generate simulation data, and the effect diagram of the generated data and the real data is as follows: Figure 4 shown.
[0121] Thus, the present invention first constructs a comprehensive energy metering sample database based on the existing comprehensive energy metering data, then extracts the features of the comprehensive energy metering data in the comprehensive energy metering sample database through a variational autoencoder, obtains the encoded data features, and then inputs the data features into a generative adversarial network to perform adversarial training of the generator and discriminator of the generative adversarial network, and then judges whether the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, and finally, when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, the data generated by the generative adversarial network is determined as comprehensive energy metering simulation data, and the generated comprehensive energy metering simulation database is obtained according to the comprehensive energy metering simulation data. Therefore, the present invention can effectively generate simulation data under the comprehensive energy metering scenario, solve the user data problem in the process of large-scale comprehensive energy metering online simulation, and provide complete and sufficient data for large-scale comprehensive energy metering simulation in real time. By implementing the comprehensive energy metering simulation data generation method provided by the present invention, the reasonable generation of basic data in large-scale comprehensive energy metering simulation can be achieved, the rationality of data generation in the simulation process can be improved, and the efficiency and effect of comprehensive energy simulation can be improved.
[0122] Exemplary Systems
[0123] Figure 5 FIG. 1 is a schematic diagram of the structure of a device for generating comprehensive energy metering simulation data provided by an exemplary embodiment of the present invention. Figure 5 As shown, the device 500 includes:
[0124] The feature extraction module 510 is used to extract features of the comprehensive energy metering data in the pre-built comprehensive energy metering sample database through a variational autoencoder to obtain encoded data features;
[0125] An adversarial training module 520 is used to input data features into a generative adversarial network and perform adversarial training on a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints;
[0126] The simulation data generation module 530 is used to determine the data generated by the generative adversarial network as comprehensive energy metering simulation data when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, and obtain the generated comprehensive energy metering simulation database based on the comprehensive energy metering simulation data.
[0127] Optionally, a data generation model for comprehensive energy metering simulation data is formed by a variational autoencoder, a generator of a generative adversarial network, and a discriminator.
[0128] Optionally, the output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is:
[0129]
[0130] Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution;
[0131] Maximize Expected E q(z|x) [logp(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [logp(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is:
[0132] max[γ1·E q(z|x) [logp(Dis l (x)|z)]-D KL (q(z|x)|p(z))]
[0133] In the formula, γ1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution;
[0134] The objective function of the generator of the generative adversarial network in the data generation model is:
[0135]
[0136] In the formula, γ2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true;
[0137] The objective function of the discriminator of the generated adversarial network in the data generation model is:
[0138]
[0139] In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
[0140] Optionally, the adversarial training module 520 is specifically used for:
[0141] Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample.
[0142] Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using a mixed sample constructed from the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples;
[0143] Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and obtain the generated comprehensive energy metering simulation data.
[0144] Optionally, the simulation data generation module 530 is specifically used to determine whether the data generated by the generative adversarial network satisfies the constraints of the authenticity constraint and the similarity constraint:
[0145] Authenticity loss L r Defined as:
[0146] L r =W(G(z;θ (G) );θ (D) )
[0147] In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample;
[0148] The similarity loss Ls is defined as:
[0149] Ls=||G(z;θ (G) )-I||2
[0150] In the formula, I represents the real sample, ||·||2 represents the 2-norm of the matrix, G(z; θ (G) ) represents the generated samples of the generator.
[0151] The integrated energy metering simulation data generating device 500 of the embodiment of the present invention corresponds to the integrated energy metering simulation data generating method 100 of another embodiment of the present invention, and will not be described in detail herein.
[0152] Exemplary Electronic Devices
[0153] Figure 6 The electronic device provided by an exemplary embodiment of the present invention may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them. Figure 6 FIG. 2 is a block diagram of an electronic device according to an embodiment of the present invention. Figure 6 As shown, the electronic device 60 includes one or more processors 61 and a memory 62 .
[0154] The processor 61 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0155] The memory 62 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 61 may run the program instructions to implement the method for information mining of historical change records and / or other desired functions of the software program of each embodiment of the present invention described above. In one example, the electronic device may also include: an input system 63 and an output system 64, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0156] In addition, the input system 63 may also include, for example, a keyboard, a mouse, and the like.
[0157] The output system 64 can output various information to the outside. The output device 64 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0158] Of course, to simplify, Figure 6 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application conditions, the electronic device may also include any other appropriate components.
[0159] Exemplary computer program products and computer-readable storage media
[0160] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method for information mining of historical change records according to various embodiments of the present invention described in the above "Exemplary Method" section of this specification.
[0161] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0162] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the method for information mining of historical change records according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0163] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0164] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0165] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0166] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0167] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0168] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.
[0169] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for generating comprehensive energy metering simulation data, It is characterized in that include: The feature extraction of the comprehensive energy metering data in the pre-built comprehensive energy metering sample database is performed through a variational autoencoder to obtain the encoded data features; Inputting the data features into a generative adversarial network, and performing adversarial training on a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints; When the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, the data generated by the generative adversarial network is determined as comprehensive energy metering simulation data, and a generated comprehensive energy metering simulation database is obtained according to the comprehensive energy metering simulation data; The data generation model of comprehensive energy metering simulation data is composed of a variational autoencoder, a generator of a generative adversarial network, and a discriminator; The output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is: Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution; Maximize Expected E q(z|x) [log p(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [log p(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is: max[γ 1 ·E q(z|x) [logp(Dis l (x)|z)]-D KL (q(z|x)|p(z))] In the formula, γ 1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution; The objective function of the generator of the generative adversarial network in the data generation model is: In the formula, γ 2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true; The objective function of the discriminator of the generated adversarial network in the data generation model is: In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
2. The method according to claim 1, It is characterized in that The generator and discriminator of the generative adversarial network are trained by the following steps: Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample. Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using mixed samples constructed with the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples; Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and the generated comprehensive energy metering simulation data is obtained.
3. The method according to claim 1, It is characterized in that The constraints used to determine whether the data generated by the generative adversarial network meets the authenticity constraints and similarity constraints are: Authenticity loss L r Defined as: L r =W(G(z;θ (G) );i (D) ) In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample; The similarity loss Ls is defined as: Ls=||G(z;θ (G) )-I|| 2 In the formula, I represents the real sample, ||·|| 2 represents the 2-norm of the matrix, G(z;θ (G) ) represents the generated samples of the generator.
4. A comprehensive energy metering simulation data generation device, It is characterized in that include: A feature extraction module is used to extract features of comprehensive energy metering data in a pre-built comprehensive energy metering sample database through an encoder of a variational autoencoder to obtain encoded data features; An adversarial training module, used for inputting data features into a generative adversarial network, and performing adversarial training on a generator and a discriminator of the generative adversarial network until the data generated by the generative adversarial network satisfies authenticity constraints and similarity constraints; A simulation data generation module, used for determining the data generated by the generative adversarial network as comprehensive energy metering simulation data when the data generated by the generative adversarial network meets the authenticity constraint and the similarity constraint, and obtaining a generated comprehensive energy metering simulation database according to the comprehensive energy metering simulation data; The data generation model of comprehensive energy metering simulation data is composed of a variational autoencoder, a generator of a generative adversarial network, and a discriminator; The output of the network hidden layer in the data generation model is different in a Gaussian manner, and the output formula of the network hidden layer is: Where, Dis l (x) is the lth hidden layer of the network, E is the unit matrix, is the output data of the generator, p(Dis l (x)|z) is the output probability of the lth hidden layer under the condition of hidden variable z, and N(·,·) represents binomial distribution; Maximize Expected E q(z|x) [log p(x|z)] is equivalent to the maximum likelihood estimate, using E q(z|x) [log p(Dis l (x)|z)], so the objective function of the variational autoencoder in the data generation model is: max[γ 1 ·E q(z|x) [logp(Dis l (x)|z)]-D KL (q(z|x)|p(z))] In the formula, γ 1 is the weight parameter, D KL (q(z|x)|p(z)) represents the KL divergence between the approximate posterior probability distribution and the prior distribution; The objective function of the generator of the generative adversarial network in the data generation model is: In the formula, γ 2 is the weight parameter, is the data reconstructed by the encoder; is the output data of the generator; D(·) is the probability that the discriminator judges it to be true; The objective function of the discriminator of the generated adversarial network in the data generation model is: In the formula, is the data reconstructed by the encoder, is the output data of the generator, D(·) is the probability that the discriminator is true, and E is the unit matrix.
5. The device according to claim 4, It is characterized in that The adversarial training module is specifically used for: Generate a sample set through the generator. The sample is a false label and is used as the training set of the discriminator A together with the real input sample. Transfer the trained parameters of discriminator A to the opposing discriminator B, train discriminator B using mixed samples constructed with the generated sample set and the real samples in the training set, and update the network parameters so that discriminator A cannot distinguish between real samples and generated samples; Repeat the above two processes until both discriminator A and discriminator B are unable to distinguish whether the sample is true or false, and the generated comprehensive energy metering simulation data is obtained.
6. The device according to claim 4, It is characterized in that The simulation data generation module is specifically used to determine whether the data generated by the generative adversarial network meets the constraints of authenticity constraint and similarity constraint: Authenticity loss L r Defined as: L r =W(G(z;θ (G) );i (D) ) In the formula, θ (G) represents the generation parameters, θ (D) represents the discriminant parameter, G(z;θ (G) ) represents the generated sample of the generator, W(~;θ (D) ) represents the Wasserstein distance between the generated sample and the discriminant sample; The similarity loss Ls is defined as: Ls=||G(z;θ (G) )-I|| 2 In the formula, I represents the real sample, ||·|| 2 represents the 2-norm of the matrix, G(z;θ (G) ) represents the generated samples of the generator.
7. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 3.
8. An electronic device, It is characterized in that The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 3.
