Training method, data generation method, device, electronic device and storage medium
1. A method of training a data generation model, comprising:
generating a self-made heating dataset with a generator that generates a countering network model, wherein the generating a countering network model comprises the generator and an arbiter;
alternately training the generator and the discriminator by utilizing a training heat supply data set and the self-made heat supply data set to obtain a generator and a discriminator which are trained; and
determining the trained generator as the data generation model.
2. The method of claim 1, wherein the self-manufactured data sets comprise a first self-manufactured heating data set and a second self-manufactured heating data set;
the alternately training the generator and the discriminator by using the training heat supply data set and the self-made heat supply data set to obtain the generator and the discriminator which are trained, comprising:
training the discriminator by using the training heat supply data set and the first self-made heat supply data set;
training the generator with the second self-made heating dataset;
alternately executing the operation of training the discriminator and the operation of training the generator until the convergence condition of the generation confrontation network model is met; and
and determining the generator and the discriminator obtained under the condition of meeting the convergence condition of the generated confrontation network model as the generator and the discriminator which are trained.
3. The method of claim 2, wherein the training heating data set comprises a plurality of training heating data, the first self-generated heating data set comprises a plurality of first self-generated heating data;
the training the discriminator using the training heat supply dataset and the first self-made heat supply dataset includes:
inputting each training heat supply data in the training heat supply data set into the discriminator to obtain a discrimination result corresponding to the training heat supply data;
inputting each first self-made heat supply data in the first self-made heat supply data set into the discriminator to obtain a discrimination result corresponding to the first self-made heat supply data; and
training the discriminator based on a discrimination result corresponding to the training heat supply data and a discrimination result corresponding to the first self-made heat supply data.
4. The method of claim 3, wherein the training the discriminators based on the discrimination corresponding to the training heating data and the discrimination corresponding to the first self-made heating data comprises:
under the condition that the model parameters of the generator are kept unchanged, based on a first loss function, a first output value is obtained by using a judgment result corresponding to the training heat supply data and a judgment result corresponding to the first self-made heat supply data; and
adjusting the model parameters of the discriminator according to the first output value to obtain the adjusted model parameters of the discriminator;
training the generator with the second self-made heating dataset, comprising:
obtaining a second output value by using the second self-made heat supply data set based on a second loss function under the condition of keeping the model parameter of the adjusted discriminator unchanged; and
and adjusting the model parameters of the generator according to the second output value.
5. The method of any of claims 1-4, further comprising:
testing the model performance of the trained generator and the trained discriminator by using a test heat supply data set to obtain a performance test result;
under the condition that the performance test result is determined not to meet the preset condition, adjusting model hyper-parameters corresponding to the generator and the discriminator which are trained;
based on the adjusted model hyper-parameters, alternately training the generator and the discriminator again by utilizing the training heat supply data set and the self-made heat supply data set to obtain a new generator and discriminator after training; and
determining the new trained generator as the data generation model.
6. A method according to any of claims 1-5, wherein the dimensional data of training heating data comprised by the training heating data set and/or the dimensional data of test heating data comprised by the test heating data set comprises at least one of: weather data related to weather, equipment parameter data related to a primary heat supply object, equipment parameter data related to a secondary heat supply object, and equipment parameter data related to a heat extraction object.
7. The method of claim 6, wherein the weather-related weather data comprises at least one of: air temperature data, outdoor humidity data, precipitation data, and data related to wind power;
wherein the equipment parameter data relating to the primary heating target comprises at least one of: the system comprises a first network water supply pressure data, a first network backwater pressure data, a first network heat supply flow data, a first network water supply temperature data, a first network backwater temperature data, a first-level heat supply object accumulated electric quantity data, a first-level heat supply object circulating pump water consumption data and a first-level heat supply object heat data;
wherein the equipment parameter data related to the secondary heating object comprises at least one of: the system comprises two-network water supply pressure data, two-network backwater pressure data, two-network heat supply flow data, two-network water supply temperature data, two-network backwater temperature data, second-level heat supply object accumulated electric quantity data, second-level heat supply object circulating pump water consumption data and second-level heat supply object heat data;
wherein the device parameter data related to the heat-extracting object includes at least one of: indoor temperature data and indoor humidity data.
8. The method of any of claims 1-7, further comprising:
using data pre-processing to obtain the training heat supply data set and/or the test heat supply data set,
wherein the data pre-processing comprises at least one of: data abnormal value elimination, data missing value supplement, data aggregation and data discretization.
9. The method of any of claims 1-8, wherein the generating a countering network model comprises generating a countering network model based on bulldozer distance.
10. A method of data generation, comprising:
acquiring preset random noise data;
inputting the preset random noise data into a data generation model to obtain a target heat supply data set,
wherein the data generating model is trained using a method according to any one of claims 1 to 9.
11. A training apparatus for a data generation model, comprising:
a generation module to generate a self-generated heating dataset with a generator that generates a countering network model, wherein the generating a countering network model includes the generator and a discriminator;
the first training module is used for alternately training the generator and the discriminator by utilizing a training heat supply data set and the self-made heat supply data set to obtain the generator and the discriminator which are trained; and
a first determination module to determine the trained generator as the data generation model.
12. The apparatus of claim 11, wherein the self-manufactured data sets comprise a first self-manufactured heating data set and a second self-manufactured heating data set;
the first training module comprising:
a first training submodule for training the discriminator using the training heat supply dataset and the first self-made heat supply dataset;
a second training submodule for training the generator using the second self-made heating dataset;
the alternative execution sub-module is used for alternatively executing the operation of training the discriminator and the operation of training the generator until the convergence condition of the generated confrontation network model is met; and
and the determining submodule is used for determining the generator and the discriminator obtained under the condition that the convergence condition of the generation confrontation network model is met as the generator and the discriminator which are trained.
13. The apparatus of claim 12, wherein the training heating data set comprises a plurality of training heating data, the first self-generated heating data set comprises a plurality of first self-generated heating data;
the first training submodule, comprising:
a first obtaining unit, configured to input each training heat supply data in the training heat supply data set to the discriminator to obtain a discrimination result corresponding to the training heat supply data;
a second obtaining unit, configured to input each of the first self-made heat supply data in the first self-made heat supply data set into the discriminator to obtain a discrimination result corresponding to the first self-made heat supply data; and
a training unit configured to train the discriminator based on a discrimination result corresponding to the training heat supply data and a discrimination result corresponding to the first self-made heat supply data.
14. The apparatus of claim 13, wherein the training unit comprises:
an obtaining subunit, configured to obtain, based on a first loss function, a first output value by using a determination result corresponding to the training heat supply data and a determination result corresponding to the first self-made heat supply data while keeping a model parameter of the generator unchanged; and
the adjusting subunit is used for adjusting the model parameters of the discriminator according to the first output value to obtain the adjusted model parameters of the discriminator;
the second training submodule comprising:
a third obtaining unit, configured to obtain a second output value by using the second self-made heat supply data set based on a second loss function while keeping the model parameter of the adjusted discriminator unchanged; and
and the adjusting unit is used for adjusting the model parameters of the generator according to the second output value.
15. The apparatus of any of claims 11-14, further comprising:
the testing module is used for testing the model performance of the trained generator and the trained discriminator by using a testing heat supply data set to obtain a performance testing result;
the adjusting module is used for adjusting the model hyper-parameters corresponding to the trained generators and discriminators under the condition that the performance test result is determined not to meet the preset condition;
the second training module is used for carrying out alternate training on the generator and the discriminator again by utilizing the training heat supply data set and the self-made heat supply data set based on the adjusted model hyper-parameter to obtain a new generator and a new discriminator which are trained; and
a second determination module to determine the new trained generator as the data generation model.
16. An apparatus according to any one of claims 11-15, wherein the dimensional data of training heating data comprised by the training heating data set and/or the dimensional data of test heating data comprised by the test heating data set comprises at least one of: weather data related to weather, equipment parameter data related to a primary heat supply object, equipment parameter data related to a secondary heat supply object, and equipment parameter data related to a heat extraction object.
17. A data generation apparatus, comprising:
the acquisition module is used for acquiring preset random noise data;
an obtaining module, configured to input the preset random noise data into a data generation model to obtain a target heat supply data set,
wherein the data generating model is trained using an apparatus according to any one of claims 11 to 16.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 or claim 10.
19. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9 or 10.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 9 or claim 10.
Background
The central heating system mainly includes a primary heating object (i.e., a heat source), a secondary heating object (i.e., a heat exchange station), and a heat-taking object (i.e., a user). The first-stage heat supply object transmits heat energy to the second-stage heat supply object through the primary pipe network, and the second-stage heat supply object transmits the heat energy to the heat taking object through the secondary pipe network.
The supply and demand of heat is a dynamic balancing process. Insufficient heat supply can cause the reduction of the heat supply quality of the system, the complaint rate of users is increased, overhigh heat supply can cause the increase of heat supply cost, and the comfortable sensation of the users is reduced.
With the development of cloud computing, big data, machine learning and the like, the heat supply can be effectively predicted by constructing a load prediction model based on a machine learning model so as to realize supply on demand.
Disclosure of Invention
The disclosure provides a training method, a data generation device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a training method of a data generation model, including: generating a self-made heating data set by using a generator for generating a countermeasure network model, wherein the generated countermeasure network model comprises the generator and a discriminator; alternately training the generator and the discriminator by utilizing a training heat supply data set and the self-made heat supply data set to obtain a generator and a discriminator which are trained; and determining the generator after training as the data generation model.
According to another aspect of the present disclosure, there is provided a data generating method including: acquiring preset random noise data; inputting the preset random noise data into a data generation model to obtain a target heat supply data set, wherein the data generation model is trained by using the method.
According to another aspect of the present disclosure, there is provided a training apparatus for a data generation model, including: a generation module for generating a self-made heating data set by using a generator for generating a countermeasure network model, wherein the generated countermeasure network model comprises the generator and a discriminator; the first training module is used for alternately training the generator and the discriminator by utilizing a training heat supply data set and the self-made heat supply data set to obtain the generator and the discriminator which are trained; and a first determining module, configured to determine the trained generator as the data generation model.
According to another aspect of the present disclosure, there is provided a data generating apparatus including: the acquisition module is used for acquiring preset random noise data; and the obtaining module is used for inputting the preset random noise data into a data generation model to obtain a target heat supply data set, wherein the data generation model is trained by using the device.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method as described above.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture to which a training method, data generation method, and apparatus of a data generation model may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a training method of a data generation model according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram for training a discriminator using a training heating dataset and a first self-created heating dataset according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a schematic diagram of a training process of a data generation model according to an embodiment of the present disclosure;
FIG. 5 schematically shows a schematic diagram of a variation process of a self-created heating dataset generated with a generator during a training process according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart for testing the performance of trained models of generators and discriminators using a test heating dataset to obtain performance test results, and retraining the generated network model according to the performance test, according to an embodiment of the disclosure;
FIG. 7 schematically shows a schematic diagram of a data generation method according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of a training apparatus for a data generation model according to an embodiment of the present disclosure;
FIG. 9 schematically shows a block diagram of a data generation apparatus according to an embodiment of the present disclosure; and
FIG. 10 illustrates a block diagram of an electronic device suitable for use in a training method or a data generation method of a data generation model according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The data volume of the heating data is small, which is limited by the duration of the heating season on the one hand, and is caused by the low acquisition frequency of the heating data on the other hand. For example, the acquisition frequency is on the order of hours. If the collection frequency of the heating data is made high, the collection cost, for example, communication cost, power consumption cost, and equipment cost, will be increased. With respect to equipment costs, if the heating data is collected at high frequency, the service life of the equipment (e.g., sensors) will be more severely consumed, thereby increasing the equipment costs.
In the process of implementing the disclosed concept, it is found that a load prediction model for predicting the heat supply amount can be constructed by using a machine learning model with low requirement on the data amount, such as linear regression, and the linear regression model is difficult to capture the nonlinear relation between different dimensional data of the data and to truly reflect the internal rules between the different dimensional data. In addition, the load prediction model constructed based on the above method mainly utilizes single-dimensional data, that is, outdoor temperature, and factors affecting the heat supply amount may further include actual working conditions, equipment loss, weather and the like, so that the prediction effect of the load prediction model is poor. If the influence of other factors on the heat supply needs to be considered, relevant experts are required to firstly carry out data acquisition in the heat supply city, then a mechanism model is utilized to determine a correction coefficient, and finally a load prediction model is constructed after the outdoor temperature is corrected by the correction coefficient. The mode is time-consuming and labor-consuming and has higher cost.
Although other machine learning models such as deep learning and reinforcement learning have good expression capability on nonlinear relations, effective features can be extracted without manual feature engineering, and generalization capability is stronger, in order to enable the load prediction model constructed based on the method to have better generalization performance, the load prediction model needs to depend on larger amount of data and higher data quality. However, the amount of data of the heating data is small, so that other machine learning models such as deep learning and reinforcement learning are difficult to apply to the heating industry.
In order to enable other machine learning models such as deep learning and reinforcement learning to be applied to the heat supply industry, a large amount of data is required. To this end, the embodiment of the present disclosure proposes a scheme for generating heat supply data in accordance with a training heat supply data distribution by using a generation countermeasure network model. This is because the generation of the antagonistic network model has the ability to learn the data distribution and generate the entirely new data, and therefore, it is possible to perform the generation task of the heating data using the generation of the antagonistic network model. According to the scheme, the heat supply data acquisition cost and period can be reduced on the basis of generating more data volume. Meanwhile, the threshold of applying other machine learning models such as deep learning or reinforcement learning to the heat supply industry is reduced, and transformation and digital development of the heat supply industry are facilitated.
The disclosed embodiments provide a training method of a data generation model, a data generation method, a device, an electronic device, a non-transitory computer readable storage medium storing computer instructions, and a computer program product. The training method of the data generation model comprises the following steps: and utilizing a generator for generating the countermeasure network model to generate a self-made heat supply data set, wherein the generated countermeasure network model comprises the generator and a discriminator, utilizing the training heat supply data set and the self-made heat supply data set to alternately train the generator and the discriminator to obtain the generator and the discriminator which are trained, and determining the generator which is trained as the data generation model.
Fig. 1 schematically illustrates an exemplary system architecture 100 to which the training methods, data generation methods, and apparatus of data generation models may be applied, according to embodiments of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios. For example, in another embodiment, an exemplary system architecture to which the training method, the data generation method, and the apparatus for the data generation model may be applied may include a terminal device, but the terminal device may implement the training method, the data generation method, and the apparatus for the data generation model provided in the embodiments of the present disclosure without interacting with a server.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a knowledge reading application, a web browser application, a search application, an instant messaging tool, a mailbox client, and/or social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for content browsed by the user using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
The Server 105 may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a conventional physical host and a VPS (Virtual Private Server). Server 105 may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that the training method of the data generation model and the data generation method provided by the embodiments of the present disclosure may be generally executed by the terminal device 101, 102, or 103. Accordingly, the training apparatus and the data generation apparatus of the data generation model provided by the embodiment of the present disclosure may also be disposed in the terminal device 101, 102, or 103.
Alternatively, the training method of the data generation model and the data generation method provided by the embodiments of the present disclosure may also be generally executed by the server 105. Accordingly, the training device and the data generation device of the data generation model provided by the embodiment of the present disclosure may be generally disposed in the server 105. The training method of the data generation model and the data generation method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the apparatus for generating a data model and the apparatus for generating data provided by the embodiments of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
For example, the server 105 generates a self-made heating data set using a generator that generates a countermeasure network model, generates the countermeasure network model including the generator and the discriminator, alternately trains the generator and the discriminator using the training heating data set and the self-made heating data set, obtains a trained generator and the discriminator, and determines the trained generator as the data generation model. Alternatively, the generator and the arbiter are trained alternately by a server or a cluster of servers capable of communicating with the terminal devices 101, 102, 103 and/or the server 105 using the training heat supply dataset and the self-created heat supply dataset and a data generation model is obtained, i.e. a trained generator.
The server 105 obtains preset random noise data, inputs the preset random noise data into a data generation model, and obtains a target heat supply data set. Or a server or server cluster capable of communicating with the terminal devices 101, 102, 103 and/or the server 105 inputs preset random noise data into the data generation model, resulting in a target heating data set.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 2 schematically illustrates a flow diagram of a method 200 of training a data generation model according to an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S210 to S230.
In operation S210, a self-made heating dataset is generated with a generator that generates a countering network model, wherein generating the countering network model includes the generator and a discriminator.
In operation S220, the generator and the discriminator are alternately trained using the training heat supply data set and the self-made heat supply data set, resulting in a trained generator and discriminator.
In operation S230, the trained generator is determined as a data generation model.
According to an embodiment of the present disclosure, generating the antagonistic network model may include deep convolution generating the antagonistic network model, generating the antagonistic network model based on the dozer distance, or conditionally generating the antagonistic network model, or the like. Generating the antagonistic network model can include a generator and an arbiter. The generator and the arbiter may comprise a neural network model. The generator may be configured to generate a self-generated heating dataset and learn the data distribution of the training heating dataset by continuously training the generator, thereby generating samples that are consistent with the data distribution of the training heating dataset from scratch and defrobbing the discriminator as much as possible. The discriminator may be used to distinguish between a training heating dataset and a self-created heating dataset.
According to the embodiment of the disclosure, the generator and the discriminator are subjected to iterative alternate training by utilizing the training heat supply data set and the self-made heat supply data set, so that the generator and the discriminator realize respective optimization through games between the generator and the discriminator, and finally the discriminator cannot accurately distinguish the training heat supply data set from the self-made heat supply data set, namely, Nash balance is achieved. In this case, it may be considered that the generator learns the data distribution of the training heating data set, and the trained generator is determined as the data generation model.
According to an embodiment of the disclosure, iteratively training the generator and the arbiter using the training heat supply dataset and the self-made heat supply dataset may include: in each iteration process, under the condition of keeping the model parameters of the generator unchanged, the training heat supply data set and the self-made heat supply data set are used for training the discriminator so as to finish the training times set by the discriminator in the iteration. And after the number of times of training set for the discriminator by the iteration is finished, training the generator by utilizing the self-made heat supply data set under the condition of keeping the model parameters of the discriminator unchanged so as to finish the number of times of training set for the generator by the iteration. It should be noted that in performing each training process, a self-made heating data set corresponding to the training process may be generated by the generator. The training method of the generator and the arbiter is only an exemplary embodiment, but is not limited thereto, and may include a training method known in the art as long as the training of the generator and the arbiter can be achieved.
According to the embodiment of the present disclosure, an appropriate training strategy may be selected according to actual business requirements, which is not limited herein. For example, the training strategy may include one of: in each iteration, the training times of the generator and the discriminator are one, the training times of the generator and the discriminator are training times, and the training times of the discriminator are training times.
According to the embodiment of the disclosure, the generator for generating the countermeasure network model is used for generating the self-made heat supply data set, the generator and the discriminator for generating the countermeasure network model are alternately trained by using the training heat supply data set and the self-made heat supply data set to obtain the generator and the discriminator which are trained, and the generator which is trained is determined as the data generation model, so that the generator can generate a large amount of heat supply data which accord with the actual situation, and the acquisition cost and the period of the heat supply data are further reduced. Meanwhile, the threshold of applying other machine learning models such as deep learning or reinforcement learning to the heat supply industry is reduced, and transformation and digital development of the heat supply industry are facilitated.
According to an embodiment of the present disclosure, the self-manufactured data sets comprise a first self-manufactured heating data set and a second self-manufactured heating data set. The training of the generator and the discriminator alternately using the training heat supply data set and the self-made heat supply data set to obtain the trained generator and discriminator may include the following operations.
Training the discriminator using the training heat supply dataset and the first self-made heat supply dataset. The generator is trained using a second self-made heating dataset. And alternately executing the operation of training the discriminator and the operation of training the generator until the convergence condition of generating the confrontation network model is met. And determining the generator and the discriminator obtained under the condition of meeting the convergence condition of generating the confrontation network model as the generator and the discriminator which are trained.
According to an embodiment of the present disclosure, generating the convergence condition of the antagonistic network model may include that the generator converges, both the generator and the discriminator converge, or that the iteration reaches the termination condition, which may include that the number of iterations is equal to a preset number of iterations.
According to an embodiment of the present disclosure, generating a self-made heating data set with a generator may include: the first random noise data may be input to a generator resulting in a first self-created heating dataset. And inputting the second random noise data into the generator to obtain a second self-made heating data set. The form of the first random noise data and the second random noise data may include gaussian noise.
According to an embodiment of the present disclosure, alternately performing the operation of training the arbiter and the operation of training the generator may be understood as: in the t-th iteration process, under the condition that the model parameters of the generator are kept unchanged, the discriminant is trained by using the training heat supply data set and the first self-made heat supply data set, and the process is repeated to finish the training times set for the generator by the iteration. During each training, a first self-created heating dataset corresponding to the time may be generated with the generator.
According to the embodiment of the disclosure, after the number of times of training set for the arbiter by the iteration is completed, the generator is trained by using the second self-made heating data set under the condition that the model parameters of the arbiter are kept unchanged, and the above process is repeated to complete the number of times of training set for the generator by the iteration. During each training, a second self-created heating dataset corresponding to the time may be generated with the generator. T is more than or equal to 1 and less than or equal to T, T represents the preset iteration times, and T and T are positive integers.
According to an embodiment of the present disclosure, for the t-th iteration, the model parameters of the generator in the case of keeping the model parameters of the generator unchanged refer to the model parameters of the generator obtained after the last training for the generator in the t-1 th iteration is completed. The model parameters of the discriminator in the case of keeping the model parameters of the discriminator unchanged refer to the model parameters of the discriminator obtained after the last training for the discriminator in the t-th iteration is completed.
According to an embodiment of the disclosure, the dimensional data of the training heating data comprised by the training heating data set and/or the dimensional data of the testing heating data comprised by the testing heating data set comprises at least one of: weather data related to weather, equipment parameter data related to a primary heat supply object, equipment parameter data related to a secondary heat supply object, and equipment parameter data related to a heat extraction object.
According to embodiments of the present disclosure, the dimensions of the training heating data may include one or more. The dimensions of the test heating data may include one or more. Each dimension of heating data may be referred to as dimension data.
According to the embodiment of the disclosure, the weather data interface can be utilized to collect weather data related to weather at a first preset collection frequency. Weather data relating to weather may be stored to a target Database, which may include, for example, a Time Series Database (TSDB).
According to an embodiment of the present disclosure, the first data collecting device may be utilized to collect the equipment parameter data related to the primary heat supply object at the second preset collecting frequency, that is, to obtain the equipment parameter data related to the primary heat supply object collected by the first data collecting device at the second preset collecting frequency. The second data acquisition device may be utilized to acquire device parameter data related to the secondary heat supply object at a third preset acquisition frequency, i.e., to acquire device parameter data related to the secondary heat supply object acquired by the second data acquisition device at the third preset acquisition frequency. The device parameter data relating to the thermal target may be acquired with the third data acquisition device at a fourth preset acquisition frequency, i.e. the device parameter data relating to the thermal target acquired by the third data acquisition device at the fourth preset acquisition frequency is acquired. Further, the above-described device parameter data may be stored to a target database.
According to the embodiment of the disclosure, the device parameter data can be stored in the target database in such a way that the data acquisition device can send the acquired device parameter data to the intelligent gateway based on a Programmable Logic Controller (PLC) protocol, send the device parameter data to the internet of things core suite through the intelligent gateway, and store the device parameter data in the target database by using the rule engine.
According to an embodiment of the present disclosure, weather data relating to weather includes at least one of: air temperature data, outdoor humidity data, precipitation data, and wind-related data.
The equipment parameter data relating to the primary heating target comprises at least one of: the system comprises a first-network water supply pressure data, a first-network backwater pressure data, a first-network heat supply flow data, a first-network water supply temperature data, a first-network backwater temperature data, a first-level heat supply object accumulated electric quantity data, a first-level heat supply object circulating pump water consumption data and a first-level heat supply object heat data.
The plant parameter data relating to the secondary heating target comprises at least one of: the system comprises two-network water supply pressure data, two-network backwater pressure data, two-network heat supply flow data, two-network water supply temperature data, two-network backwater temperature data, second-level heat supply object accumulated electric quantity data, second-level heat supply object circulating pump water consumption data and second-level heat supply object heat data.
The equipment parameter data associated with the heat extraction object includes at least one of: indoor temperature data and indoor humidity data.
According to an embodiment of the present disclosure, the first data collection device may include at least one of a first pressure sensor, a first temperature sensor, a first flow meter, a first water meter, a first electricity meter, and a first heat meter. A first pressure sensor may be utilized to collect a network supply water pressure data and a network return water pressure data. The first temperature sensor can be used for collecting water supply temperature data of a network and return water temperature data of the network. A first flow meter may be utilized to collect a grid heat supply flow data. The first water meter can be utilized to collect water consumption data of the first-level heat supply object circulating pump. The first electricity meter can be used for collecting accumulated electricity quantity data of the primary heat supply object. The primary heat supply object heat data may be collected using a first heat meter.
According to an embodiment of the present disclosure, the second data acquisition device may include at least one of a second pressure sensor, a second temperature sensor, a second flow meter, a second water meter, a second electricity meter, and a second heat meter. The second pressure sensor can be used for acquiring the water supply pressure data of the second network and the water return pressure data of the second network. The second temperature sensor can be used for acquiring the water supply temperature data of the second network and the water return temperature data of the second network. The second flow meter may be utilized to collect two-network heat supply flow data. The second water meter can be utilized to collect water consumption data of the second-stage heat supply object circulating pump. The second electricity meter may be utilized to collect data on the cumulative electricity amount of the secondary heat supply object. The secondary heat meter can be used for collecting the heat data of the secondary heat supply object.
According to an embodiment of the present disclosure, the third data acquisition device may include a third temperature sensor and/or a humidity sensor. Indoor temperature data may be collected using a third temperature sensor. Indoor humidity data may be collected using a humidity sensor.
According to an embodiment of the present disclosure, the training method of the data generation model may further include the following operations.
Obtaining a training heating dataset and/or a testing heating dataset by using data preprocessing, wherein the data preprocessing comprises at least one of the following items: data abnormal value elimination, data missing value supplement, data aggregation and data discretization.
According to an embodiment of the present disclosure, in order to improve data quality, an initial heat supply dataset may be processed using data preprocessing, resulting in a training heat supply dataset and/or a testing heat supply dataset.
According to embodiments of the present disclosure, data outlier cullingMay include an isolated forest algorithm, a clustering algorithm, a raydeda criterion, or a grassbs criterion, etc. For example, obtaining the training heating dataset and/or the testing heating dataset using the data outlier culling process may include: for each dimension of a heating dataset, a first quartile (i.e., Q) of the dimension is determined1) And the third quartile (i.e., Q)3) Determining a difference value (namely IQR) between the third quartile and the first quartile, determining an interval range according to the difference value, determining target dimensional data according to the interval range, determining heat supply data corresponding to the target dimensional data as abnormal data, and deleting the abnormal data. That is, IQR ═ Q3-Q1The range of the interval may be [ Q ]1-1.5IQR,Q3+1.5IQR]。
According to the embodiment of the disclosure, the difference of the data acquisition devices and the influence of external disturbance make the acquired dimension (i.e. field) possibly have missing values, and for the dimension with the missing values, the missing value supplement can be performed by using the data missing value supplement. The data missing value supplementation may include linear interpolation.
According to the embodiment of the disclosure, as the collection frequencies of collecting weather data related to weather, collecting equipment parameter data related to a primary heat supply object, collecting equipment parameter data related to a secondary heat supply object and collecting equipment parameter data related to a heat taking object may be different, data aggregation may be implemented according to a uniform collection frequency to achieve the purpose of data alignment. The data aggregation may include mean aggregation, most significant aggregation, or median aggregation, etc.
For example, the collection frequency of weather data related to weather is 5 minutes, and the collection frequency of equipment parameter data related to a primary heat supply object, equipment parameter data related to a secondary heat supply object, and equipment parameter data related to a heat extraction object is 30 seconds. In view of the above, the data acquisition device may be caused to acquire the device parameter data at an acquisition frequency of 30 seconds, determine an average value of the device parameter data for 10 acquisition cycles, and determine the average value as the device parameter data, so as to achieve data alignment of weather data related to weather. The plant parameter data may include plant parameter data associated with a primary heating target, plant parameter data associated with a secondary heating target, or plant parameter data associated with a heat extraction target.
According to embodiments of the present disclosure, continuous type dimensional data, e.g. most device parameter data, in a training heating dataset and/or a testing heating dataset is aimed at. Because the search space dimension of the continuous variable is higher, the data distribution of different dimension data is possibly different, and the data scale is also possibly different, the continuous variable in the training heat supply data set and/or the test heat supply data set can be subjected to discretization processing, the robustness of the characteristic on abnormal data is enhanced, and the different dimension data is converted to the similar data scale. The discretization of the data for continuous variables may include an equal frequency binning method.
For the type dimension data in the training heat supply data set and/or the testing heat supply data set, data discretization processing can be performed by utilizing the one-hot coding. For example, dimensional data (rain, snow, sunny, or haze, etc.) that characterize weather conditions can be discretized using one-hot encoding.
The method shown in fig. 2 is further described with reference to fig. 3-6 in conjunction with specific embodiments.
Fig. 3 schematically illustrates a flow diagram for training 300 a discriminator using a training heating dataset and a first self-created heating dataset according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the training heating data set may comprise a plurality of training heating data and the first self-created heating data set may comprise a plurality of first self-created heating data.
As shown in fig. 3, the method includes operations S310 to S330.
In operation S310, each training heat supply data in the training heat supply data set is input to a discriminator to obtain a discrimination result corresponding to the training heat supply data.
In operation S320, each of the first self-made heating data in the first self-made heating data set is input to a discriminator to obtain a discrimination result corresponding to the first self-made heating data.
In operation S330, a discriminator is trained based on a discrimination result corresponding to the training heat supply data and a discrimination result corresponding to the first self-made heat supply data.
According to an embodiment of the present disclosure, the discriminator actually belongs to a classifier, and after the training heat supply data and the first self-made heat supply data are input to the discriminator, the discriminator is trained based on the discrimination result corresponding to the training heat supply data and the discrimination result corresponding to the first self-made heat supply data, so that the discriminator cannot accurately determine whether the training heat supply data or the first self-made heat supply data is input thereto, that is, the discrimination result corresponding to the training heat supply data and the discrimination result corresponding to the first self-made heat supply data are made as identical as possible.
According to an embodiment of the present disclosure, training the discriminator based on the discrimination result corresponding to the training heat supply data and the discrimination result corresponding to the first self-made heat supply data may include the following operations.
And under the condition that the model parameters of the generator are kept unchanged, based on the first loss function, obtaining a first output value by using the judgment result corresponding to the training heat supply data and the judgment result corresponding to the first self-made heat supply data. And adjusting the model parameters of the discriminator according to the first output value to obtain the adjusted model parameters of the discriminator.
Training the generator with the second self-created heating dataset may include the following operations.
And under the condition of keeping the model parameters of the adjusted discriminator unchanged, obtaining a second output value by utilizing a second self-made heat supply data set based on a second loss function. And adjusting the model parameters of the generator according to the second output value.
According to the embodiment of the disclosure, in the t-th iteration process, under the condition that the model parameters of the generator are kept unchanged, the judgment result corresponding to the training heat supply data and the judgment result corresponding to the first self-made heat supply data are input into the first loss function, and the first output value is obtained. And adjusting the model parameters of the discriminator according to the first output value, and repeating the process to finish the training times set for the generator by the iteration.
According to the embodiment of the disclosure, after the number of times of training set for the arbiter by the iteration is completed, under the condition that the model parameter of the arbiter is kept unchanged, each second self-made heating data included in the second self-made heating data set is input into the second loss function, so as to obtain the second output value. And adjusting the model parameters of the generator according to the second output value, and repeating the process to finish the training times set by the iteration for the discriminator.
According to an embodiment of the present disclosure, generating the antagonistic network model includes generating the antagonistic network model based on the dozer distance.
According to the embodiment of the disclosure, the generation of the confrontation network model based on the bulldozer distance can solve the problems of asynchronous training, non-convergence of training and mode collapse of the generator and the discriminator, and the model quality of the data generation model is improved.
According to the embodiment of the disclosure, the training process of generating the confrontation network model based on the bulldozer distance is as follows: the learning rate, the batch processing number (namely the number of training heat supply data included in the training heat supply data set), the model parameter range of the neural network model, the maximum iteration number and the training number of each iteration are preset.
According to the embodiment of the disclosure, model parameters of a generator and an arbiter are initialized, and the initialized generator and arbiter are obtained.
According to the embodiment of the disclosure, in each iteration process, under the condition that the model parameters of the generator are kept unchanged, the set training times of the discriminant are trained firstly. In each training process, training heat supply data comprising batch processing amount is obtained, and first random noise data is input into a generator to generate first self-made heat supply data of batch processing amount. And respectively inputting the first self-made heat supply data as a negative sample and the training heat supply data as a positive sample into a first loss function to obtain a first output value. Based on the first output value, the model parameters of the discriminator are adjusted by using a RMSProp (root Mean Square propagation) method, and the size of the model parameters of the discriminator is limited.
According to the embodiment of the disclosure, after the training of the preset training test is completed, the generator is trained under the condition that the model parameters of the discriminator are kept unchanged, in each training process, second random noise data is input into the generator to generate second self-made heat supply data of batch processing quantity, and the second self-made heat supply data is input into a second loss function to obtain a second output value. And adjusting the model parameters of the generator by utilizing a RMSProp method based on the second output value, and limiting the size of the model parameters of the generator.
According to the embodiment of the disclosure, under the condition that the generator converges or the iteration reaches the termination condition, the training is completed, and the generator and the discriminator which are trained are obtained.
FIG. 4 schematically shows a schematic diagram of a training process 400 for a data generation model according to an embodiment of the present disclosure.
As shown in fig. 4, during each iteration, first random noise data 401 is input to the generator 402, with the model parameters of the generator 402 being guaranteed to be unchanged, resulting in a first self-created heating data set 403.
Each training heating data in the training heating data set 404 is input to the discriminator 405 to obtain a discrimination result 406 corresponding to the training heating data. Each of the first self-created heating data in the first self-created heating data set 403 is input to the discriminator 405, resulting in a discrimination result 407 corresponding to the first self-created heating data.
The determination result 406 corresponding to the training heat supply data and the determination result 407 corresponding to the first self-made heat supply data are input to the first loss function 408, and a first output value 409 is obtained. The model parameters of the discriminator 405 are adjusted according to the first output value 409. The above process is repeated until the number of training for the arbiter 405 for this iteration is completed.
After the number of training times for the arbiter 405 for this iteration is completed, the second random noise data 410 is input to the generator 402, with the model parameters of the arbiter 405 kept unchanged, resulting in a second self-created heating data set 411. Each second self-heating data in the second self-heating data set 411 is input to the second loss function 412, resulting in a second output value 413. The model parameters of the generator 402 are adjusted according to the second output value. The above process is repeated until the number of training for generator 402 for this iteration is completed.
The training process of the discriminator 405 and the generator 402 is alternately executed until the convergence condition of the generated network model is satisfied, and the training is completed.
Fig. 5 schematically shows a schematic diagram of a variation process 500 of a self-created heating dataset generated with a generator during a training process according to an embodiment of the present disclosure.
The self-created heating data set in fig. 5 is obtained from the training of the data generation model shown in fig. 4. As shown in fig. 5, the thick dotted curve represents the data distribution of the training heat supply data set, the solid curve represents the data distribution of the self-made heat supply data set, and the thin dotted curve represents the discrimination result of the discriminator.
The leftmost part in fig. 5 represents the initial stage of training, and although the data distribution of the self-made heating data set and the data distribution of the training heating data set are in the same feature space, the data distribution of the self-made heating data set and the training heating data set is different greatly, and the self-made heating data set is not enough to cheat the discriminator.
The middle left part in fig. 5 represents the middle stage 1 of training, and the discrimination capability of the discriminator on the input is improved.
The middle right part in fig. 5 represents the middle period 2 of training, and as the training continues, the data distribution of the self-made heating data set gradually starts to be fitted to the data distribution of the training heating data, and the discriminator is difficult to distinguish for input.
The rightmost part in fig. 5 represents that the training is finished, the generator learns the data distribution of the training heat supply data set, the discriminator cannot distinguish the input, and the generated confrontation network model reaches Nash balance.
Fig. 6 schematically shows a flow chart of testing the model performance of the trained generators and discriminators using a test heating dataset to obtain a performance test result, and retraining the generated network model according to the performance test 600 according to an embodiment of the present disclosure.
As shown in fig. 6, the method includes operations S640 to S670.
In operation S640, the trained generators and discriminators are tested for model performance using the test heating data set, and a performance test result is obtained.
In operation S650, in case that it is determined that the performance test result does not satisfy the preset condition, the model hyper-parameter corresponding to the trained generator and the discriminant is adjusted.
In operation S660, the generator and the discriminator are re-alternately trained using the training heat supply data set and the self-created heat supply data set based on the adjusted model hyper-parameter, to obtain a new trained generator and discriminator.
In operation S670, a new trained generator is determined as a data generation model.
According to embodiments of the present disclosure, model performance may be characterized in terms of generalization capability. The performance test results can be characterized by a generalization error. The preset condition may mean that the generalization error is greater than or equal to the generalization error threshold. The model hyper-parameters may include a learning rate and/or the number of layers of the network model of the generator and the arbiter, etc.
According to the embodiment of the disclosure, the performance test of the generator and the discriminator after training is performed by using the test heat supply data set, and obtaining the performance test result may include: and processing the test heat supply data set by using the generator and the discriminator which are trained to obtain a first processing result. And processing the training heat supply data set by using the generator and the discriminator after training to obtain a second processing result. And obtaining a performance test result according to the first processing result and the second processing result.
According to an embodiment of the present disclosure, processing the test heating data set by using the trained generator and the trained arbiter, and obtaining the first processing result may include: the third random noise data may be input to the trained generator to obtain a third self-made heat supply data set, each of the test heat supply data in the test heat supply data set may be input to the trained discriminator to obtain a discrimination result corresponding to the test heat supply data, each of the third self-made heat supply data in the third self-made heat supply data set may be input to the trained discriminator to obtain a discrimination result corresponding to the third self-made heat supply data, and the discrimination result corresponding to the test heat supply data and the discrimination result corresponding to the third self-made heat supply data may be input to the first loss function to obtain a third output value. And inputting each third self-made heating data in the third self-made heating data set into the second loss function to obtain a fourth output value. And determining the third output value and the fourth output value as a first processing result.
According to an embodiment of the present disclosure, processing the training heat supply dataset by using the generator and the discriminator after training, and obtaining the second processing result may include: the fourth random noise data may be input to a trained generator to obtain a fourth self-created heat supply data set, each training heat supply data in the training heat supply data set may be input to a trained discriminator to obtain a discrimination result corresponding to the training heat supply data, each fourth self-created heat supply data in the fourth self-created heat supply data set may be input to the trained discriminator to obtain a discrimination result corresponding to the fourth self-created heat supply data, and the discrimination result corresponding to the training heat supply data and the discrimination result corresponding to the fourth self-created heat supply data may be input to the first loss function to obtain a fifth output value. And inputting each fourth self-made heating data in the fourth self-made heating data set into the second loss function to obtain a sixth output value. The fifth output value and the sixth output value are determined as a second processing result.
According to an embodiment of the present disclosure, obtaining the performance evaluation result according to the first processing result and the second processing result may include: and determining a generalization error according to the third output value, the fifth output value, the fourth output value and the sixth output value, and determining the generalization error as a performance test result.
According to the embodiment of the disclosure, whether the performance test result meets the preset condition is determined, if the performance test result does not meet the preset condition, it can be shown that the generated confrontation network model after training has an overfitting phenomenon, therefore, the model hyper-parameter of the confrontation generation network model after training can be adjusted, so that the generator and the discriminator can be trained alternately again by utilizing the training heat supply data set and the self-made heat supply data set based on the adjusted model hyper-parameter.
Fig. 7 schematically shows a schematic diagram of a data generation method 700 according to an embodiment of the disclosure.
As shown in fig. 7, the method includes operations S710 to S720.
In operation S710, preset random noise data is acquired.
In operation S720, preset random noise data is input into a data generation model, and a target heat supply data set is obtained, wherein the data generation model is trained by using a training method of the data generation model according to the embodiment of the present disclosure.
According to the embodiment of the disclosure, preset random noise data is input into a data generation model to obtain a target heat supply data set, the data generation model is used for generating a self-made heat supply data set by using a generator for generating a countermeasure network model, the generator and a discriminator for generating the countermeasure network model are alternately trained by using a training heat supply data set and the self-made heat supply data set to obtain the generator and the discriminator which are trained, and the generator which is trained is determined as the data generation model, so that the generator can generate a large amount of heat supply data which accord with actual conditions, and the acquisition cost and period of the heat supply data are reduced.
FIG. 8 schematically illustrates a block diagram of a training apparatus 800 for a data generation model according to an embodiment of the present disclosure.
As shown in fig. 8, the training apparatus 800 of the data generation model may include a generation module 810, a first training module 820, and a first generation module 830.
A generating module 810 for generating a self-made heating dataset with a generator that generates a countering network model, wherein generating the countering network model includes the generator and a discriminator.
And a first training module 820, configured to perform alternate training on the generator and the discriminator by using the training heat supply data set and the self-made heat supply data set, so as to obtain a trained generator and discriminator.
A first determining module 830, configured to determine the trained generator as a data generation model.
According to an embodiment of the present disclosure, the self-manufactured data sets comprise a first self-manufactured heating data set and a second self-manufactured heating data set;
the first training module 820 may include a first training submodule, a second training submodule, an alternate execution submodule, and a determination submodule.
And the first training submodule is used for training the discriminator by utilizing the training heat supply data set and the first self-made heat supply data set.
A second training submodule for training the generator with a second self-made heating dataset.
And the alternative execution sub-module is used for alternatively executing the operation of training the discriminator and the operation of training the generator until the convergence condition of generating the confrontation network model is met.
And the determining submodule is used for determining the generator and the discriminator obtained under the condition that the convergence condition for generating the confrontation network model is met as the generator and the discriminator which are trained.
According to an embodiment of the disclosure, the training heating data set comprises a plurality of training heating data and the first self-created heating data set comprises a plurality of first self-created heating data.
The first training submodule may include a first obtaining unit, a second obtaining unit, and a training unit.
And the first obtaining unit is used for inputting each training heat supply data in the training heat supply data set into the discriminator to obtain a discrimination result corresponding to the training heat supply data.
And a second obtaining unit, configured to input each first self-made heating data in the first self-made heating data set into the discriminator to obtain a discrimination result corresponding to the first self-made heating data.
And the training unit is used for training the discriminator based on the discrimination result corresponding to the training heat supply data and the discrimination result corresponding to the first self-made heat supply data.
According to embodiments of the present disclosure, a training unit may include an obtaining subunit and an adjusting subunit.
And the obtaining subunit is used for obtaining a first output value by using the judgment result corresponding to the training heat supply data and the judgment result corresponding to the first self-made heat supply data on the basis of the first loss function under the condition of keeping the model parameters of the generator unchanged.
And the adjusting subunit is used for adjusting the model parameters of the discriminator according to the first output value to obtain the adjusted model parameters of the discriminator.
The second training submodule may include a third obtaining unit and an adjusting unit.
And the third obtaining unit is used for obtaining a second output value by utilizing the second self-made heat supply data set on the basis of the second loss function under the condition of keeping the model parameter of the adjusted discriminator unchanged.
And the adjusting unit is used for adjusting the model parameters of the generator according to the second output value.
According to an embodiment of the present disclosure, the training apparatus 800 for generating a model from data may further include a testing module, an adjusting module, a second training module, and a second determining module.
And the test module is used for testing the model performance of the trained generator and the trained discriminator by using the test heat supply data set to obtain a performance test result.
And the adjusting module is used for adjusting the model hyper-parameters corresponding to the trained generator and the trained discriminator under the condition that the performance test result is determined not to meet the preset condition.
And the second training module is used for carrying out alternate training on the generator and the discriminator again by utilizing the training heat supply data set and the self-made heat supply data set based on the adjusted model hyper-parameter to obtain a new generator and discriminator after the training is finished.
A second determination module to determine a new trained generator as the data generation model.
According to an embodiment of the disclosure, the dimensional data of the training heating data comprised by the training heating data set and/or the dimensional data of the testing heating data comprised by the testing heating data set comprises at least one of: weather data related to weather, equipment parameter data related to a primary heat supply object, equipment parameter data related to a secondary heat supply object, and equipment parameter data related to a heat extraction object.
According to an embodiment of the present disclosure, weather data relating to weather includes at least one of: air temperature data, outdoor humidity data, precipitation data, and wind-related data. Wherein the equipment parameter data relating to the primary heating object comprises at least one of: the system comprises a first-network water supply pressure data, a first-network backwater pressure data, a first-network heat supply flow data, a first-network water supply temperature data, a first-network backwater temperature data, a first-level heat supply object accumulated electric quantity data, a first-level heat supply object circulating pump water consumption data and a first-level heat supply object heat data. Wherein the equipment parameter data related to the secondary heating object comprises at least one of: the system comprises two-network water supply pressure data, two-network backwater pressure data, two-network heat supply flow data, two-network water supply temperature data, two-network backwater temperature data, second-level heat supply object accumulated electric quantity data, second-level heat supply object circulating pump water consumption data and second-level heat supply object heat data. Wherein the device parameter data relating to the heat extraction object includes at least one of: indoor temperature data and indoor humidity data.
According to an embodiment of the present disclosure, the training apparatus 800 for generating a model from data may further include a processing module.
A processing module for obtaining a training heat supply dataset and/or a testing heat supply dataset by using data preprocessing, wherein the data preprocessing comprises at least one of: data abnormal value elimination, data missing value supplement, data aggregation and data discretization.
According to an embodiment of the present disclosure, generating the antagonistic network model includes generating the antagonistic network model based on the dozer distance.
Fig. 9 schematically shows a block diagram of a data generation apparatus 900 according to an embodiment of the present disclosure.
As shown in fig. 9, the data generating apparatus 900 may include an obtaining module 910 and an obtaining module 920.
An obtaining module 910, configured to obtain preset random noise data.
An obtaining module 920, configured to input preset random noise data into a data generation model to obtain a target heat supply data set, where the data generation model is trained by using a training apparatus of the data generation model according to an embodiment of the present disclosure.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to an embodiment of the present disclosure, a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method as described above.
According to an embodiment of the disclosure, a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.
Fig. 10 illustrates a block diagram of an electronic device 1000 suitable for use in a training method or a data generation method of a data generation model according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data necessary for the operation of the electronic apparatus 1000 can also be stored. The calculation unit 1001, the ROM 1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in the electronic device 1000 are connected to the I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the electronic device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 1001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1001 executes the respective methods and processes described above, such as a training method of a data generation model or a data generation method. For example, in some embodiments, the training method of the data generation model or the data generation method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto electronic device 1000 via ROM 1002 and/or communications unit 1009. When the computer program is loaded into the RAM1003 and executed by the computing unit 1001, one or more steps of the training method of the data generation model or the data generation method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured in any other suitable way (e.g., by means of firmware) to perform a training method or a data generation method of a data generation model.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.