Short-term enterprise discharge capacity prediction method and system based on power consumption data
By comparing the learning algorithm and the short-term power load prediction model, the correlation mapping between electricity consumption data and environmental protection indicators is realized, the accuracy of enterprise short-term pollution emission prediction is solved, the misjudgment rate is reduced, and the reliability of pollution emission data fitting is improved. sex.
Patent Information
- Application Number
- CN202411211030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-24
AI Technical Summary
The prior art is difficult to accurately predict the short-term pollution discharge of enterprises, especially when the production electricity consumption data is disturbed greatly, the misjudgment rate is high, and the effective correlation mapping relationship between electricity consumption data and environmental protection data is not established.
By obtaining the historical electricity data and environmental protection data of the enterprise, it is divided into active electricity and reactive electricity, a short-term electricity load prediction model is constructed, and a comparative learning algorithm is used to realize the correlation mapping between electricity consumption data and environmental protection indicators, and similar enterprise data is generated for pollution discharge. Data fitting predicts the company's short-term pollution discharge.
Improve the accuracy and reliability of pollutant emission prediction, reduce the misjudgment rate, and ensure that when the missing pollutant emission data monitoring, similar enterprise data can be obtained based on the electricity-environmental correlation mapping, and fit the pollutant emission data to generate enterprise short-term pollution emission prediction data. .
Smart Images

Figure CN119180365A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of pollution emission monitoring, and in particular relates to a method and system for predicting short-term enterprise pollution emission based on electricity consumption data. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] At present, the data of environmental protection testing indicators of enterprises are characterized by many points, wide coverage, and long lines. A single monitoring method will inevitably lead to incidents such as falsification of monitoring data and destruction of monitoring equipment. Electricity is an indispensable energy source in the production activities of enterprises. The mirroring and high coverage of the electrification level of industrial production can timely, accurately, and comprehensively reflect the production status of enterprises and the use of environmental protection equipment. Accurate short-term pollution discharge forecasts can assist environmental protection departments in formulating effective environmental protection response strategies in advance to avoid the occurrence of severe events such as haze and acid rain.
[0004] At present, relevant institutions have begun to pay attention to the prediction of enterprise pollution emissions based on enterprise electricity consumption. However, the research content is relatively small. For example, based on the electricity consumption patterns of polluting enterprises, enterprises are judged for illegal production. This method can monitor the operation status of high-pollution suspended enterprises, but the misjudgment rate is high due to the interference of data such as production electricity consumption; regression analysis method is used to build an environmental impact prediction model based on industry electricity consumption to achieve monitoring and early warning of air pollution prevention and control for key enterprises. In addition, based on big data visualization technology, the research on air pollution prevention and control and audit methods analyzes the relationship between enterprise electricity consumption data and air pollution; analyzes the impact mechanism of air pollution prevention and control measures on regional short-term electricity demand, and analyzes the mutual influence of air quality and short-term load. The above literatures all show that there is a correlation between electricity consumption data and environmental protection data. However, none of the above preventions have established an effective correlation mapping relationship between electricity consumption data and environmental protection data. Summary of the invention
[0005] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a method and system for predicting short-term enterprise pollution emissions based on electricity consumption data, which is based on the enterprise's short-term active and reactive power prediction data, realizes the correlation mapping between electricity consumption data and environmental protection indicators through a comparative learning algorithm, obtains similar enterprise data based on the electricity consumption-environmental protection correlation mapping, and performs pollution emission data fitting by generating data and similar enterprise data to generate enterprise short-term pollution emission prediction data.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A first aspect of the present invention provides a method for predicting short-term enterprise pollution discharge based on electricity consumption data, comprising the following steps:
[0008] Obtain historical electricity data, environmental protection data and historical pollution monitoring data, and divide the historical electricity data into active electricity data and reactive electricity data;
[0009] A short-term power load forecasting model is constructed based on active power data and reactive power data to predict short-term active power and reactive power data;
[0010] Based on the short-term forecast data of active power and reactive power, the historical pollution monitoring data and the trained power consumption-environmental protection association similarity mapping model, the Encoder data of the pollution prediction data is obtained; wherein the construction process of the power consumption-environmental protection association similarity mapping model includes:
[0011] Construct positive sample data and negative sample data based on historical active power data, reactive power data and historical pollution monitoring data;
[0012] Construct a representation learning framework, project the sample data into the hyperplane representation space through the representation learning framework, and obtain the pollution monitoring representation vector and the electricity representation vector;
[0013] Based on the pollution monitoring representation vector and the electricity representation vector, the similarity between positive samples, the similarity between positive and negative pollution monitoring samples, and the similarity between positive and negative electricity data samples are calculated. The target loss function is trained based on the similarity calculation results. When the target loss function is minimized, the Encoder data of the pollution prediction data is generated.
[0014] Based on the Encoder data of the pollution emission forecast data, the actual historical pollution emission data of the enterprise to be predicted and the enterprise pollution emission forecast model, the short-term pollution emission forecast data of the enterprise is predicted.
[0015] Furthermore, when constructing a short-term electricity load forecasting model, the short-term electricity load forecasting model is constructed using RevIN combined with LSTM, specifically including: normalizing the historical actual active and reactive power data of the enterprise at N moments as input data of the short-term electricity load forecasting model, performing inverse normalization on the output data of the short-term electricity load forecasting model, performing cross entropy operation on the historical actual active and reactive power data of the enterprise at moment t and the short-term enterprise active and reactive power forecast data after inverse normalization, and performing reverse feedback as a loss function, thereby adjusting the various parameter values of the LSTM neurons. When the loss function is less than the set threshold, the parameter values are fixed to complete the construction of the short-term electricity load forecasting model.
[0016] Furthermore, constructing positive sample data and negative sample data based on historical active power data and reactive power data and historical pollution monitoring data includes:
[0017] The historical active power data, reactive power data and historical pollution monitoring data are used to form a training data set;
[0018] Randomly extract M enterprise sample data from the training data set to form a branch training set A, and generate two training sets acting on the upper and lower branches. Each training set includes historical pollution monitoring data set A1, historical active power data and historical reactive power data A2, and each branch contains sample data of M enterprises;
[0019] Randomly select a certain type of historical pollution monitoring data of an enterprise and input it into the upper branch, and input the active power and reactive power data of the corresponding time into the lower branch. Any data in the upper branch and the lower branch are positive examples of each other, and other data of the same enterprise or different enterprises in the upper branch and the lower branch are negative examples of the data corresponding to the positive examples.
[0020] Furthermore, the upper branch performs gradient update of the model parameter θ based on the back propagation of the loss function loss, and the negative example samples of the historical active power data and historical reactive power data A2 of the lower branch are continuously updated, that is, new negative example samples continuously enter A2, and the negative sample queue is updated according to the first-in-first-out order, and the parameters of the upper and lower branches are not shared.
[0021] Furthermore, the construction representation learning framework projects the training data into the hyperplane representation space through the representation learning framework to obtain the pollution monitoring representation vector and the electricity representation vector, including:
[0022] The historical pollution monitoring data set is input into the upper branch, and the pollution monitoring representation vector in the hyperplane representation space is obtained by passing through the first feature encoder Encoder in the upper branch; the historical active power data and reactive power data are input into the lower branch, and the power representation vector in the hyperplane representation space is obtained by passing through the second feature encoder Encoder;
[0023] The numbers of neurons in the intermediate layers of the first feature encoder Encoder and the second feature encoder Encoder are different, and the parameters are not shared.
[0024] Further, the target loss function includes an upper branch loss function and a lower branch loss function;
[0025] Among them, the upper branch loss function is:
[0026]
[0027] The lower branch loss function is:
[0028]
[0029] Among them, τ is the temperature hyperparameter, which represents the difficulty recognition penalty coefficient, Represents the similarity between positive samples, Represents the similarity between positive and negative samples in pollution monitoring, Indicates the similarity between positive and negative samples of electricity data, Respectively represent the i-th historical electricity consumption data x i , the jth historical electricity consumption data x j Input the mapping of the electricity consumption-environmental protection association similarity mapping model Output mapping encoding data, z pi , z pj Respectively represent the i-th historical pollution monitoring data p i , the jth historical pollution monitoring data p j Input the mapping of the electricity consumption-environmental protection association similarity mapping model and output the mapping encoding data, where n represents the number of daily monitoring samples of a certain enterprise.
[0030] Furthermore, when training the enterprise pollution discharge prediction model, the Wasserstein distance is combined with similar historical sample data to construct the generator's loss function and adjust the model's parameters, including:
[0031] Calculate the similarity between the Encoder data of the pollution emission prediction data and the actual historical pollution emission data of the enterprise to be predicted. If the similarity is within the set threshold, the influence of the similar sample weight will increase during the data fitting process, and the pollution emission monitoring data will be fitted based on the similar sample data to generate short-term pollution emission prediction data; if the similarity exceeds the threshold, the loss function tends to generate short-term pollution emission prediction data through the generator based on the Encoder output encoding of the electricity.
[0032] A second aspect of the present invention provides a short-term enterprise pollution emission prediction system based on electricity consumption data, comprising:
[0033] A data acquisition module is used to acquire historical electricity data, environmental protection data and historical pollution monitoring data, and divide the historical electricity data into active electricity data and reactive electricity data;
[0034] A short-term prediction module is used to construct a short-term power load prediction model based on active power data and reactive power data to predict short-term prediction data of active power and reactive power;
[0035] The associated similarity mapping module is used to obtain the Encoder data of the pollution discharge prediction data based on the short-term prediction data of active power and reactive power, the historical pollution discharge monitoring data and the trained electricity consumption-environmental protection associated similarity mapping model; wherein the construction process of the electricity consumption-environmental protection associated similarity mapping model includes:
[0036] Construct positive sample data and negative sample data based on historical active power data, reactive power data, and historical pollution monitoring data;
[0037] Construct a representation learning framework, project the sample data into the hyperplane representation space through the representation learning framework, and obtain the pollution monitoring representation vector and the electricity representation vector;
[0038] Based on the pollution monitoring representation vector and the electricity representation vector, the similarity between positive samples, the similarity between positive and negative pollution monitoring samples, and the similarity between positive and negative electricity data samples are calculated. The target loss function is trained based on the similarity calculation results. When the target loss function is minimized, the Encoder data of the pollution prediction data is generated.
[0039] The pollution discharge prediction module is used to predict the short-term pollution discharge prediction data of the enterprise based on the Encoder data of the pollution discharge prediction data, the actual historical pollution discharge data of the enterprise to be predicted and the enterprise pollution discharge prediction model. A third aspect of the present invention provides a computer-readable storage medium.
[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the above-mentioned method for predicting short-term enterprise pollution emissions based on electricity consumption data.
[0041] A fourth aspect of the present invention provides a computer device.
[0042] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for predicting short-term enterprise pollution discharge based on electricity consumption data as described above are implemented.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The invention is based on the improvement of the existing short-term power load forecasting model, and outputs the enterprise's short-term active power and reactive power forecasting data after reversible instance normalization and optimization of the double-layer long short-term memory neural network; realizes the association mapping of power consumption data and environmental protection indicators through the contrast learning algorithm, and the lower branch power data as the positive example enhancement sample of the upper branch environmental protection data is fitted with the corresponding positive example mapping data distribution, and realizes the positive example attraction and negative example repulsion. For power data samples without corresponding upper branch positive examples or with few upper branch pollution positive example samples, a relatively uniform distribution is carried out based on the similarity and distance between the environmental protection sampling data and the power data of the enterprises, so as to ensure that when the pollution discharge data monitoring training samples are missing, similar enterprise data can be obtained based on the power consumption-environmental protection association mapping, and the pollution discharge data is fitted by generating data and similar enterprise data to generate the enterprise's short-term pollution discharge forecasting data.
[0045] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0047] Figure 1 It is a flow chart of a method for predicting short-term pollution discharge based on electricity consumption data provided by an embodiment of the present invention;
[0048] Figure 2 This is the electricity consumption-environmental protection association similarity mapping training process provided by the embodiment of the present invention;
[0049] Figure 3 This is the pollution discharge prediction data generation training process provided by the embodiment of the present invention;
[0050] Figure 4 is a three-dimensional view of the encoded data provided by an embodiment of the present invention;
[0051] Figure 5 is a comparison chart of experimental results provided by an embodiment of the present invention; wherein, Figure 5 (a) is the curve of enterprise electricity consumption data input into the experiment. Figure 5 (b) is a graph of the predicted data of nitrogen oxides outputted from the experiment;
[0052] Figure 6 It is a partial enlarged diagram of nitrogen oxide prediction data provided by an embodiment of the present invention;
[0053] Figure 7 It is the comparative impact of the number of similar enterprises provided by the embodiment of the present invention on the generation of pollution discharge prediction data. DETAILED DESCRIPTION
[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0055] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0056] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0057] The overall idea of the present invention is:
[0058] Firstly, based on the existing short-term power load forecasting model, the power load forecasting data is improved and divided into active power and reactive power, so as to achieve comprehensive tracking of the operating status of the enterprise's power equipment through power consumption data;
[0059] Since most industrial electricity is used to support rotating high-power electrical appliances such as motors, production equipment will generate reactive power. Even if reactive compensation devices are used, reactive power will fluctuate due to overcompensation, undercompensation and equipment switching. Therefore, in order to accurately capture the operation status of the enterprise's production equipment and the enterprise's production volume, the enterprise's power load is divided into reactive power and active power as the power consumption data input of the model;
[0060] Next, the correlation mapping between electricity consumption data and the distribution law of environmental protection data is realized through comparative learning, so as to obtain the Encoder data for pollution emission prediction based on electricity consumption data;
[0061] In order to maximize the correlation analysis between the power load and environmental protection characteristics of enterprises, based on the data differences of different enterprises, the detailed difference information of enterprises with small sample size is extracted, and contrastive learning is used to realize the correlation mapping of power consumption and environmental protection characteristics. In the projection space, similar instances are brought closer and dissimilar instances are pushed away, and the differentiated pollution information of enterprises is retained by mapping the coding distance distribution, ensuring that even when the enterprise lacks sample data, reasonable predictions can be made based on similar samples and its own characteristics;
[0062] Subsequently, the generator generates short-term pollution emission forecast data of enterprises based on the encoded data, and combines the Wasserstein distance with the mean square error of similar samples to construct a loss function to improve the quality of generated pollution emission forecast data. Finally, a case analysis and comparison are carried out through simulation experiments to demonstrate the effectiveness and feasibility of the proposed method.
[0063] Since the focus of the mapped coded data is the differences, dynamics and generalization between data distributions rather than the data itself, the generation of predicted data is based on the reproduction of the company's historical pollution data, that is, the overall data benchmark remains unchanged. When the predicted electricity consumption data changes, its differentiated pollution data prediction is realized. In order to improve the global similarity and consistency between the predicted data and the actual data, when generating predicted data based on the mapped coded data, the Wassersein distance is combined with the mean square error of similar samples to construct the loss function of the generator, so that the data distribution of the generated curve is further brought closer to the real data, effectively avoiding the distortion of the predicted data.
[0064] Embodiment 1
[0065] like Figure 1 As shown, this embodiment provides a method for predicting short-term enterprise pollution discharge based on electricity consumption data, including the following steps:
[0066] Step 1: Obtain the company's historical electricity load data and related environmental protection data;
[0067] In this embodiment, electricity consumption data and environmental monitoring data are obtained through the electricity consumption information collection system and the environmental monitoring system, and data such as weather, holidays and emission reduction policies are obtained through web crawling. After the various types of collected data are classified based on the industry and the data preprocessing is completed, an available sample set is formed.
[0068] Step 2: Input the enterprise's historical active and reactive power data into the short-term power load forecasting model, and output the enterprise's active and reactive power short-term forecast data after RevIN (Reversible Instance Normalization) + two-layer long short-term memory neural network (LSTM);
[0069] In step 2, the process of constructing the short-term power load forecasting model includes:
[0070] In order to effectively track the operating status of enterprise equipment, the enterprise's historical power load data is divided into active power and reactive power data. Therefore, the model training data set contains the enterprise's historical active power data, reactive power data, temperature data, and holiday data. The output is the short-term active power and reactive power forecast values. and reactive power data Combine temperature data, holiday data, and emission reduction policy data (such as companies that exceed pollution standards are restricted from operating) as the data input x″ of the RevIN+LSTM model t , the input layer consists of 100 memory neurons.
[0071] Define N to represent the number of input data, Ty Represents the length of the sampling time interval for the predicted output. Given the LSTM model input data Indicates the predicted output values of active power and reactive power output by the LSTM model.
[0072] The specific steps include:
[0073] Step 201: Input data into x″ t Calculate the variance and mean and then normalize:
[0074] The formulas for calculating variance and mean are as follows:
[0075]
[0076] Based on the obtained variance and mean data, the input data is normalized to obtain:
[0077]
[0078] Among them, Υ is the learnable parameter for affine transformation; β is the parameter for normalization.
[0079] By converting the input data x″ t After instance normalization, the unsteady information will be removed and the N input data will have closer mean and variance.
[0080] Step 202: Inputting the normalized sequence into the LSTM prediction model will reduce the impact of distribution changes on the model and allow the LSTM model to pay more attention to the temporal correlation within the sequence.
[0081] The predicted output value of the active and reactive power of the previous neural unit is h t-1 , each neuron input has a corresponding weight, and after sigmoid activation, it gets a value of 0-1, that is, three gate values. The calculation formula is as follows:
[0082] q t =σ(W q x t ′+U q h t-1 )
[0083] r t =σ(W r x t ′+U r h t-1 )
[0084] o t =σ(W o x t ′+U o h t-1 )
[0085] In the formula, at time t, the output value of the input gate is q t , the output value of the forget gate is r t , the output gate output value is o t , W q , U q , W r , U r , W o , U o are the corresponding parameters of each gate respectively;
[0086] Input value x′ t and the output h of the previous unit t-1 , the two values have corresponding weights W c and U c , and using the tanh activation function, the output value is equivalent to the new memory value obtained based on the input value at time t The calculation formula is as follows:
[0087]
[0088] Calculate the final memory value of the neural unit:
[0089]
[0090] In the formula, r t is the output value of the forget gate at time t, q t is the output value of the input gate at time t, c t-1 is the final memory value of the previous neuron at time t-1;
[0091] The final output value h t for:
[0092]
[0093] The hidden layer uses the same single-layer structure as the input layer. The output layer is a two-dimensional output, and the output data is the predicted value of the short-term active power and reactive power of the enterprise. in Indicates that the final output value h t Assign to
[0094] Since the input data is normalized, the output prediction values of active and reactive power will be the data distribution after normalization, that is, there is a certain difference between the output prediction value and the original distribution, which does not conform to the data distribution of the actual active and reactive power. Therefore, RevIN is used to perform a denormalization operation to restore the non-stationary information removed from the input data to the output data of the LSTM prediction model, so that the output data regresses to approximate the data distribution of the actual active and reactive power. The specific operations are as follows:
[0095]
[0096] By inverting the normalization, we obtain predicted values that are identically distributed to the input data.
[0097] Then, based on the historical actual active and reactive power data of the enterprise at time t, and the short-term enterprise active and reactive power forecast values A cross entropy operation is performed and reverse feedback is performed as a loss function to adjust the parameter values of the neuron. When the loss function is less than the set threshold, the parameter values are fixed to complete the construction of the short-term electricity load forecasting model.
[0098] Step 3: Combine the short-term forecast data of active power and reactive power of enterprises and the power consumption-environmental protection association similarity mapping model, realize the association mapping of power load data and environmental protection index data through comparative learning algorithm, and realize the differentiated feature value extraction of different enterprises based on the data differences of different enterprises, so as to output the Encoder data of pollution discharge prediction data;
[0099] The construction process of the electricity consumption-environmental protection association similarity mapping model includes:
[0100] Based on the actual electricity consumption data and the actual environmental protection data, the electricity consumption-environmental protection association similarity mapping model is trained. The historical active power, reactive power data and historical pollution monitoring data of the enterprise constitute the training data set τ. M enterprise sample data are randomly extracted from the training data set to form a branch training set A. A total of two training sets acting on the upper and lower branches are generated, namely the historical pollution monitoring data set A1, the historical active power data and the historical reactive power data A2. Each branch contains sample data of M enterprises, among which the upper branch sample data is fixed and the lower branch data is dynamically updated.
[0101] Randomly select a certain type of historical pollution monitoring data of a certain enterprise Enter the upper branch, and enter the active power and reactive power data at the corresponding time into the lower branch:
[0102]
[0103] t represents the daily sampling time point, and is the same-dimensional column vector of the sampling time series, n represents the number of daily monitoring samples of a certain enterprise, and The two are positive examples of each other, i,j∈(1,2,…,n).
[0104] During training, any other sample data p of the same enterprise or different enterprises in the upper branch and the lower branch are input j With x j , both and Negative example.
[0105] Subsequently, the upper branch sample data and the lower branch data are used as input data to construct a representation learning architecture, through which the training data is projected into a hyperplane representation space.
[0106] In order to shorten the distance between positive examples and increase the distance between negative examples, the upper and lower branches adopt a double-tower asymmetric structure with different internal levels and numbers of neurons.
[0107] The historical pollution monitoring data set A1 enters the upper branch and passes through the feature encoder (using the Transform encoder structure). The encoder module has 4 layers, each of which contains a multi-attention mechanism + sum normalization processing + feedforward neural network (using two fully connected layers + layer normalization (LN, Layer Normalization) + ReLU activation function + linear activation function) + sum normalization processing, thereby mapping the input sample data to a vector z in the hyperplane representation space. p , the architecture of the first part of the lower branch is the same as that of the upper branch, but the number of neurons in the middle layers is different, and the parameters are not shared. The output is represented by h x =f θ′ (x), then input the nonlinear transformation structure Projector (using two layers of fully connected layers + LN + ReLU), the output is z x =g θ′ (h x ). Vector z x 、z p They respectively represent the mapping coding data matrix output after the historical electricity consumption data x and the historical pollution monitoring data p are input into the electricity consumption-environmental protection association similarity mapping model. The internal structure and quantity of the two matrices are consistent.
[0108] In the representation space, in order to realize the correlation analysis between electricity data and environmental protection indicators, it is necessary to make the representation vector z after mapping the positive electricity data and the pollution monitoring data coincide or be as close as possible, and far away from the negative sample. Therefore, the dot product of the representation vector L2 regularized is used as the distance metric to represent the similarity S(z) between the space vectors.i ,z j ):
[0109]
[0110] In order to make the distance between positive examples close in the representation space and the distance between any negative examples far, the following loss function is used:
[0111] Upper branch loss function:
[0112]
[0113] Lower branch loss function:
[0114]
[0115] Among them, τ is the temperature hyperparameter, which represents the difficulty recognition penalty coefficient, which is used to increase the distance between positive samples and negative samples with high similarity, and avoid model collapse caused by parameter adjustment based on high-difficulty negative samples. Respectively represent the i-th historical electricity consumption data x i , the jth historical electricity consumption data x j Input the mapping output encoding data of the electricity consumption-environmental protection association similarity mapping model, Respectively represent the i-th historical pollution monitoring data p i , the jth historical pollution monitoring data p j Input the mapping output encoding data of the electricity consumption-environmental protection association similarity mapping model, It represents the similarity between positive samples, that is, the similarity between the electricity data sample and the pollution monitoring data sample of a certain enterprise on the same day. Represents the similarity between positive and negative samples in pollution monitoring, It represents the similarity between positive and negative samples of electricity data, that is, the similarity between positive electricity data samples and other negative electricity data samples, or positive pollution monitoring data samples and other negative pollution monitoring data samples in the same time period of a certain enterprise. The smaller the target loss function, the better. Therefore, the larger the numerator, the greater the similarity between positive examples, and the electricity data of the same enterprise sample can better fit the distribution of pollution monitoring data. The larger the denominator, the smaller the similarity between negative examples, and the easier it is to distinguish the data distribution of samples from different enterprises.
[0116] The upper branch performs gradient update of model parameters θ based on the back propagation of the loss function. Since the sample data volume of enterprise power data is relatively large compared to the pollution monitoring data, the negative sample of the lower branch historical power data A2 is constantly updated, that is, new negative samples are constantly entering A2, and the negative sample queue is updated according to the first-in-first-out order. The parameters of the upper and lower branches are not shared. The lower branch adopts the momentum update mechanism, and the parameter update method is as follows:
[0117] θ′=mθ′+(1-m)θ,
[0118] Among them, θ′ is the model parameter of the lower branch, and m is the weight adjustment coefficient.
[0119] That is, at the beginning of model training, θ′ is randomly initialized. After a batch of training sets is calculated, the upper branch model parameters θ are updated by back-propagation gradients. At the same time, the above formula is used to update the parameters θ′ corresponding to the lower branch, and m takes a larger value (0.9-0.99).
[0120] Compared with the parameter update of the upper branch, the parameter change of the lower branch is slow and stable to maintain a larger negative sample queue, and iterates slowly from the random value to the optimal value in small steps. Therefore, the overall spatial distribution of the model will realize the mapping distribution of the upper branch according to the similarity and distance of the pollution monitoring data samples. The power data moves along the mapping space of the pollution monitoring data and is mapped and distributed based on the distance between the power data samples.
[0121] The model training is completed by reversely adjusting the model parameters through the loss function, and the output is the Encoder data representing the data distribution mapping. Contrastive learning enables similar power data distribution and pollution monitoring data distribution of similar enterprises to obtain similar data distribution space mapping after being encoded by the upper and lower branched generators, while sample data of different enterprises or different time periods are separated in the space mapping, thereby achieving association analysis while maintaining the individual differences of sample data.
[0122] Step 4: Based on the Encoder encoded data and the company's recent actual pollution monitoring data, it is input into the enterprise pollution prediction model. The model uses the Wasserstein distance combined with similar historical sample data to construct the generator's loss function, complete the model's parameter adjustment, and output the company's short-term pollution emission forecast data.
[0123] The process of constructing the enterprise pollution discharge prediction model includes:
[0124] Based on the electricity consumption-environmental protection association similarity mapping model, the encoder output encoding of the training data set is obtained, that is, the output encoding of the enterprise's historical electricity data and historical pollution monitoring data through the encoder / encoder+projector. Since the historical electricity data and historical pollution monitoring data of similar samples of similar enterprises are similar or even overlapped in the representation space during the comparative learning process, the encoder output encoding distance of the two is similar, aiming to realize pollution prediction data through electricity prediction data. The training process of this part is as follows Figure 3 As shown, including:
[0125] Based on the enterprise short-term electricity load forecast sample data, the power consumption-environmental protection association similarity mapping model is input to obtain the encoder output encoding of the enterprise short-term electricity load forecast sample data;
[0126] Among them, in the data distribution similarity Loss s During the calculation process, if the similarity between the Encoder data of the input sample and the Encoder data of the enterprise's historical real pollution discharge sample is within a certain threshold range, it means that the similarity between the two is high, that is, the similar sample data exists in the historical pollution discharge data sample. Therefore, in the data fitting process, the weight influence of similar samples increases, and the pollution discharge monitoring data will be fitted based on the similar sample data to generate pollution discharge prediction data; if the similarity exceeds the threshold, it means that the existing enterprise pollution discharge samples are quite different from the input samples, so the loss function is more inclined to generate pollution discharge prediction data through the generator based on the Encoder output encoding of the electricity.
[0127] The encoder outputs the sample data of the enterprise's short-term electricity load forecast, inputs it into the decoder of Transform for data generation, outputs the enterprise's short-term pollution discharge forecast data, calculates the loss function between it and the enterprise's short-term real pollution discharge data, and feeds it back to the decoder of Transform for parameter adjustment to improve the accuracy of the output enterprise's short-term pollution discharge forecast data;
[0128] At the same time, the generated data of the enterprise's short-term pollution discharge forecast and the enterprise's short-term real pollution discharge data are output and input into the GAN discriminator together. The GAN discriminator determines whether the data is real data or generated data, and continuously adjusts the discriminator parameters based on the loss function. The purpose is to improve the discriminator's performance in distinguishing between real data and generated data. If the generated data cannot deceive the discriminator, it will feedback and adjust the parameters of the Transform's Decoder, thereby further improving the fit of the generated data to the real data. The prediction model is constructed by referring to the GAN algorithm based on the autoencoder, and the algorithm adaptability is improved on this basis. The generator uses the Transform Decoder architecture, which is the same as the Encoder level, with 4 layers. Each layer is a multi-attention mechanism + sum normalization processing + encoder-generator attention mechanism + sum normalization processing + feedforward neural network (using two fully connected layers + layer normalization (LN, Layer Normalization) + ReLU activation function + linear activation function) + sum normalization processing. The output end of the 4-layer is a single-layer fully connected neural network + ReLU activation function, and the output generates sewage discharge data; the discriminator is a 3-layer neural network structure, which is a convolutional layer + sum normalization processing + convolutional layer + sum normalization processing + fully connected layer, and outputs a loss function.
[0129] In order to effectively measure the distance between the predicted data and the real data, this embodiment uses the Wasserstein distance as a component of the loss function, thereby effectively feeding back the parameter adjustment. The Wasserstein distance is used to measure the distance between two probability distributions, that is, the shortest distance for data distribution 1 to move from its position to data distribution 2. Compared with the KL divergence and JS divergence, the advantage is that even if the two data distributions do not overlap or the overlapping part is negligible, the distance between the two distributions can still be measured. At this time, the JS divergence appears as a constant, and the KL divergence is meaningless.
[0130] The Wasserstein distance is calculated between the generated pollution data and the real pollution monitoring data corresponding to the input data. The loss function loss generated by combining similar samples is as follows:
[0131]
[0132] Among them, P g is the set of generated data, P r is a collection of actual data, To generate data samples, p is the actual data sample, p1, p2, ..., p h The Encoder encoding similar samples of the actual data sample p represents the clustering set of samples with high similarity in historical pollution data, which is determined by setting a threshold. It represents the mean square error between the generated data and the historical pollution data of similar enterprises. By minimizing this value, the approximate data fitting generation of the pollution data of similar enterprises can be achieved. l is the weight data generated based on the data volume b of similar enterprises, l = a / e b , a is a custom parameter. When there are many similar enterprise data, the l value decreases. At this time, the generated data tends to rely more on the pollution data of similar enterprises. When there are few or no similar enterprise data, the l value increases, and the generated data depends on the data generated by the generator; is the weight gradient penalty, which is used to ensure that the generated data is close to the real sample data, but does not exceed the real sample data. is the gradient penalty coefficient, In order to represent the sampled data between the generated data and the real data, the gradient change is stabilized by adding a gradient penalty to the sampled data. λ is the weight; is the mean Wasserstein distance between all generated data in the set and their corresponding actual data samples, To generate the Wasserstein distance between the sample and the actual sample, the calculation formula is as follows:
[0133]
[0134] Among them, p irepresents the actual pollution monitoring data at time t, is to generate data, The real data at time t is mapped to the generated data σ ( t ) time, since the actual data and the generated data have the same number of elements and the same data measure, the Wasserstein distance is measured by quadratic difference, Σ N Represents the set of all sorted permutations of N elements.
[0135] The training process is as follows:
[0136] (1) Initialize the generator parameters θ g and the discriminator θ d ;
[0137] (2) During the iterative training process, the generator is trained once and the discriminator needs to be trained multiple times. The process is as follows:
[0138] Train the discriminator, fix the generator parameters, and update to maximize the discriminator loss function:
[0139]
[0140] Among them, in order to realize the curve fitting process based on similar sample data, the mean square error judgment condition of historical similar samples is added;
[0141] Train the generator, fix the discriminator parameters, and update to minimize the generator loss function:
[0142]
[0143] After the training is completed, the electricity consumption-environmental protection association similarity mapping model inputs the electricity data and some pollution sampling point data, outputs the Encoder code, and inputs the enterprise pollution prediction model to output the enterprise pollution volume prediction data. Since the Encoder code focuses on the difference, dynamics and generalization of the data, rather than the data itself, the prediction data is based on the historical pollution data of the enterprise for effective data reproduction, so that the short-term prediction of its pollution volume can be realized based on the short-term electricity prediction data of the enterprise. In the later stage, with the increase and update of the pollution monitoring data samples of each enterprise, the model parameters can be continuously optimized and adjusted to improve the prediction accuracy.
[0144] The power consumption information collection system, environmental monitoring system and web crawling data of a certain city are used as the experimental data sources. The Transformer encoder is used for model training. The experimental results are the average of 12 cumulative experimental data. The specific experimental process is shown below.
[0145] Sample data preprocessing:
[0146] The data collection frequency of enterprise electricity consumption data and environmental protection data is 24 hours / day. The power collection data is the historical active power data and reactive power data obtained based on the multi-function power meter. Reactive power is the power consumption generated by converting electrical energy into capacitance or inductance during the generation process of enterprise operation equipment, including positive reactive power and reverse reactive power. The environmental monitoring indicator is the concentration of nitrogen oxides in the air pollution indicator. The acquired collected data is preprocessed, including data cleaning, data completion, data conversion, data normalization, outlier deletion, etc., to obtain available sample data. The 2,385 key pollution monitoring enterprises in the province are classified and modeled based on the industry. The historical data from January 2023 to December 2023 are selected as the model training sample set, and the historical data from January 2024 to April 2024 are selected as the model verification sample set. In order to avoid imbalance in sample categories, only 2 / 5 of the historical samples of normal production of the enterprise are selected for training and verification, and the historical data in mid-May 2024 is used as the model test data sample set to achieve the evaluation of the prediction effect of enterprise pollution discharge within a short period of one week.
[0147] Visualization of data spatial distribution:
[0148] In the training phase, after the active power data, reactive power data and nitrogen oxide monitoring data are input into the electricity consumption-environmental protection association similarity mapping model, the Encoder code of the enterprise emission prediction model generator is obtained in the upper and lower branches. In order to visualize the spatial distribution law of nitrogen oxide monitoring data extracted by the contrastive learning algorithm, that is, on the premise of retaining the detailed information of enterprise emission, the sample data is clustered and classified, and the distribution is relatively uniform in the representation space. At the same time, the electricity consumption data is used as the enhanced sample data, and the distribution law of nitrogen oxide emission monitoring data in the same period is fitted through contrastive learning.
[0149] The 6-dimensional encoder data is reduced to three-dimensional space using a nonlinear dimensionality reduction algorithm, namely t-distributed random nearest neighbor embedding. Matlab is used to display the associated distribution of encoder codes generated by nitrogen oxide monitoring data and electricity consumption data in three-dimensional space, as shown in the following figure: Figure 4 As shown:
[0150] exist Figure 4 In the positioning view Figure 1 The azimuth angle is -37.5° and the elevation angle is 30°. Figure 2 The azimuth angle is 0° and the elevation angle is 90°. Figure 3 The azimuth angle is 90° and the elevation angle is 0°. Figure 4 The upper branch obtains the Encoder code of the enterprise pollution discharge prediction model generator located in the positioning view. Figure 2 The upper area and positioning view Figure 3The left area of the lower branch is based on the active power and reactive power data to obtain the Encoder encoding of the enterprise pollution prediction model generator. Figure 2 The lower area and positioning view Figure 3 The right area of Figure 4 The symmetry and correlation of the encoder code generated by the "double tower" structure are shown from different angles. Since only 829 key polluting enterprises can realize daily monitoring of nitrogen oxides, the upper branch nitrogen oxide monitoring data samples of the remaining 1556 key polluting monitoring enterprises are missing. Limited by the limited amount of nitrogen oxide monitoring data, the encoding of the lower branch based on electricity consumption data to fit the emission data is biased, such as Figure 4 In the yellow and red data areas, the average nitrogen oxide index per unit of electricity emitted by enterprises in this area is lower than 5.89, and most of them are manufacturing enterprises. Therefore, the daily monitoring data collection sample data of nitrogen oxide emissions is insufficient, resulting in no mapping of electricity consumption data with corresponding pollution data. The electricity consumption-environmental protection association similarity mapping model can ignore the shallow factors of data distribution and obtain the internal consistent information of data distribution law through comparative learning. Figure 4 It shows that through contrastive learning, the Encoder data distribution of the pollution index data can be extracted based on the enterprise's electricity consumption data, thereby providing the recurrence encoding of the pollution data for the enterprise's pollution prediction model generator.
[0151] Comparative analysis of results:
[0152] Through the ablation experiment, the above content is generated and displayed by curves, such as Figure 5 and Figure 6 As shown:
[0153] like Figure 5 , Figure 6 As shown in the figure, after the training of the electricity consumption-environmental protection association similarity mapping model and the enterprise pollution emission prediction model is completed, the electricity consumption data is input into the electricity consumption-environmental protection association similarity mapping model, and the Encoder data is output. Then the Encoder data is input into the enterprise pollution emission prediction model, and the enterprise nitrogen oxide emission prediction data is output. The example enterprise is a steel product processing enterprise, so it is less affected by external meteorological and holiday factors. The enterprise is based on the production plan, so the short-term electricity consumption forecast data is basically consistent with the actual electricity consumption data results, so the small deviation between the actual electricity consumption data and the predicted electricity consumption data is not shown in the experimental stage.
[0154] The comparative experimental method is as follows:
[0155] Method 1: Without using contrastive learning, when there is sufficient NOx monitoring training data, active and reactive power data are used as model inputs. The experimental model uses the VAE-GAN method to output NOx prediction data.
[0156] Method 2: Without using contrastive learning, in the case of insufficient training data for nitrogen oxide monitoring, active and reactive power data are used as model input. The experimental model uses the VAE-GAN method to output nitrogen oxide prediction data.
[0157] Method 3: When there is sufficient training data for nitrogen oxide monitoring, use electricity load data as the data input of the model;
[0158] Method 4: When there is sufficient training data for nitrogen oxide monitoring, the method of the present invention is used;
[0159] Method 5: When there is insufficient training data for nitrogen oxide monitoring, the method of the present invention is used;
[0160] Method 6: When there is sufficient training data for nitrogen oxide monitoring, the loss function of the enterprise emission prediction model uses KL divergence calculation to generate the difference between the emission data and the actual emission monitoring data.
[0161] like Figure 5 and Figure 6 As shown, method 4 and method 5 using the method of the present invention have a high similarity with the curve fitting of the actual monitoring data, especially method 4 has the best fitting effect when the nitrogen oxide monitoring training data is sufficient; method 1 does not use comparative learning, but adopts the VAE-GAN method, uses active and reactive electricity data as model input, and uses nitrogen oxide monitoring data as learning reproduction data for training. When the training samples are sufficient, the effect is relatively ideal, but when the nitrogen oxide monitoring training sample data is insufficient, as shown in method 2, the pollution discharge data of enterprises with similar electricity consumption scale will be fitted and predicted, rather than the comparative learning of electricity consumption-environmental protection indicators of the present invention to obtain similarity coding, resulting in a large deviation in the prediction result based only on the electricity consumption similarity, and failing to capture the enterprise's own pollution discharge information; method 3 uses electricity load instead of the active and reactive electricity data in the text as the input of the model, as shown in Figure 5 As shown in the figure, at 8:00 on June 13, 2021, the company entered the production operation state, and the simulation demonstration pollution removal equipment was not turned on, resulting in the actual nitrogen oxide index exceeding the standard. The reactive power data can better reflect this imagination, while the overall power load data cannot achieve effective prediction based on the equipment operation status; Method 6 uses the KL divergence method for the loss function. Although the KL divergence can well reflect the distribution of the data, it is difficult to track the lag characteristics of its pollution data, and the model training process is long and the parameters are difficult to adjust. It is easy to produce a gradient of zero, such as Figure 6 As shown in Table 1, the fitting effect of the model of Method 6 after training has a certain deviation, and because the KL divergence distance is difficult to measure the lag of the data, the KL divergence data is not included in Table 1.
[0162] 295 key polluting enterprises were selected to predict the 7-day nitrogen oxide emission concentration. The root mean square error (normalized mean) RMSE (Root Mean Squared Error) was used to evaluate the emission concentration prediction effect of 12 experimental results, and the KL divergence was used to measure the information loss of a predicted data distribution compared with the actual data distribution. The smaller the data, the higher the curve fitting degree. The fitting curve was integrated to obtain the predicted value of the enterprise's cumulative emission. The mean absolute percentage error (MAPE) was used to evaluate the prediction accuracy of the predicted value and the actual emission, as shown in Table 1:
[0163] Table 1 Curve similarity evaluation table
[0164]
[0165] From the RMSE and KL divergence, it can be seen that the curve fitting degree of the predicted value obtained by using the method 4 and the method 5 of the present invention is the best. A MAPE of 0% indicates a perfect model, and a MAPE greater than 100% indicates an inferior model. Table 1 shows that the method 4 and the method 5 can make a relatively accurate prediction of the enterprise's pollution discharge. In summary, the method of the present invention can effectively realize the prediction of pollution monitoring data based on electricity consumption data.
[0166] To further verify the influence of the weights of similar enterprise samples in contrastive learning and loss function on the prediction model, the present invention tests the influence of the number of similar enterprises on the generation of prediction data, assuming that a certain enterprise lacks nitrogen oxide monitoring samples, and demonstrates it through the L1 distance and mean error with the real data. Figure 7 As shown:
[0167] Depend on Figure 7 It can be seen that in the absence of nitrogen oxide monitoring samples of a certain enterprise and no similar enterprises, that is, based only on electricity consumption data input and GAN to generate pollution monitoring data, the L1 distance and mean error are both very poor. However, when the number of similar enterprises is 2, the L1 distance and mean error both decrease rapidly, and as the number of similar enterprises increases, the mapping between sample data in the comparative learning link becomes more intensive, so that coded data can be generated based on the nearest similar samples, and the similar enterprise sample weights of the loss function can be used to generate data based on similar enterprise data, further ensuring the stability of GAN-generated data.
[0168] Embodiment 2
[0169] This embodiment provides a system for predicting short-term enterprise pollution discharge based on electricity consumption data, including:
[0170] A data acquisition module is used to acquire historical electricity data and historical pollution monitoring data, and divide the historical electricity data into active electricity data and reactive electricity data;
[0171] A short-term prediction module is used to construct a short-term power load prediction model based on active power data and reactive power data to predict short-term prediction data of active power and reactive power;
[0172] The associated similarity mapping module is used to obtain the Encoder data of the pollution discharge prediction data based on the short-term prediction data of active power and reactive power, the historical pollution discharge monitoring data and the trained electricity consumption-environmental protection associated similarity mapping model; wherein the construction process of the electricity consumption-environmental protection associated similarity mapping model includes:
[0173] Construct positive sample data and negative sample data based on historical active power data, reactive power data, and historical pollution monitoring data;
[0174] Construct a representation learning framework, project the sample data into the hyperplane representation space through the representation learning framework, and obtain the pollution monitoring representation vector and the electricity representation vector;
[0175] Based on the pollution monitoring representation vector and the electricity representation vector, the similarity between positive samples, the similarity between positive and negative pollution monitoring samples, and the similarity between positive and negative electricity data samples are calculated. The target loss function is trained based on the similarity calculation results. When the target loss function is minimized, the Encoder data of the pollution prediction data is generated.
[0176] The pollution emission prediction module is used to predict the short-term pollution emission prediction data of the enterprise based on the Encoder data of the pollution emission prediction data, the actual historical pollution emission data of the enterprise to be predicted and the enterprise pollution emission prediction model.
[0177] Embodiment 3
[0178] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps in the method for predicting short-term enterprise pollution emissions based on electricity consumption data as described above are implemented.
[0179] Embodiment 4
[0180] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for predicting short-term enterprise pollution emissions based on electricity consumption data as described above are implemented.
[0181] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0182] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0183] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0185] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0186] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for predicting short-term enterprise pollution discharge based on electricity consumption data, characterized in that: The steps include: Obtain historical electricity data and historical pollution monitoring data, and divide the historical electricity data into active electricity data and reactive electricity data; A short-term power load forecasting model is constructed based on active power data and reactive power data to predict short-term active power and reactive power data; Based on the short-term forecast data of active power and reactive power, the historical pollution monitoring data and the trained power consumption-environmental protection association similarity mapping model, the Encoder data of the pollution prediction data is obtained; wherein the construction process of the power consumption-environmental protection association similarity mapping model includes: Construct positive sample data and negative sample data based on historical active power data, reactive power data, and historical pollution monitoring data; Construct a representation learning framework, project the sample data into the hyperplane representation space through the representation learning framework, and obtain the pollution monitoring representation vector and the electricity representation vector; Based on the pollution monitoring representation vector and the electricity representation vector, the similarity between positive samples, the similarity between positive and negative pollution monitoring samples, and the similarity between positive and negative electricity data samples are calculated. The target loss function is trained based on the similarity calculation results. When the target loss function is minimized, the Encoder data of the pollution prediction data is generated. Based on the Encoder data of the pollution emission forecast data, the actual historical pollution emission data of the enterprise to be predicted and the enterprise pollution emission forecast model, the short-term pollution emission forecast data of the enterprise is predicted.
2. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 1, characterized in that: When constructing a short-term electricity load forecasting model, the short-term electricity load forecasting model is constructed using RevIN combined with LSTM, specifically including: normalizing the historical actual active and reactive power data of the enterprise at N moments as input data of the short-term electricity load forecasting model, performing inverse real normalization on the output data of the short-term electricity load forecasting model, performing cross entropy operation on the historical actual active and reactive power data of the enterprise at moment t and the short-term enterprise active and reactive power forecast data after inverse real normalization, and performing reverse feedback as a loss function, thereby adjusting the various parameter values of the LSTM neurons. When the loss function is less than the set threshold, the parameter values are fixed to complete the construction of the short-term electricity load forecasting model.
3. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 1, characterized in that: The constructing of positive sample data and negative sample data based on historical active power data and reactive power data and historical pollution monitoring data includes: The historical active power data, reactive power data and historical pollution monitoring data are used to form a training data set; Randomly extract M enterprise sample data from the training data set to form a branch training set A, and generate two training sets acting on the upper and lower branches. Each training set includes historical pollution monitoring data set A1, historical active power data and historical reactive power data A2, and each branch contains sample data of M enterprises; Randomly select a certain type of historical pollution monitoring data of an enterprise and input it into the upper branch, and input the active power and reactive power data of the corresponding time into the lower branch. Any data in the upper branch and the lower branch are positive examples of each other, and other data of the same enterprise or different enterprises in the upper branch and the lower branch are negative examples of the data corresponding to the positive examples.
4. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 3, characterized in that: The upper branch performs gradient update of the model parameter θ based on the back propagation of the loss function loss. The negative example samples of the historical active power data and historical reactive power data A2 of the lower branch are continuously updated, that is, new negative example samples continuously enter A2, and the negative sample queue is updated according to the first-in-first-out order. The parameters of the upper and lower branches are not shared.
5. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 1, characterized in that: The constructed representation learning framework projects the training data into the hyperplane representation space through the representation learning framework to obtain the pollution monitoring representation vector and the electricity representation vector, including: The historical pollution monitoring data set is input into the upper branch, and the pollution monitoring representation vector in the hyperplane representation space is obtained by passing through the first feature encoder Encoder in the upper branch; the historical active power data and reactive power data are input into the lower branch, and the power representation vector in the hyperplane representation space is obtained by passing through the second feature encoder Encoder; The numbers of neurons in the intermediate layers of the first feature encoder Encoder and the second feature encoder Encoder are different, and the parameters are not shared.
6. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 1, characterized in that: The target loss function includes an upper branch loss function and a lower branch loss function; Among them, the upper branch loss function is: The lower branch loss function is: Among them, τ is the temperature hyperparameter, which represents the difficulty recognition penalty coefficient, Represents the similarity between positive samples, Represents the similarity between positive and negative samples in pollution monitoring, Indicates the similarity between positive and negative samples of electricity data, Respectively represent the i-th historical electricity consumption data x i , the jth historical electricity consumption data x j Input the mapping output encoding data of the electricity consumption-environmental protection association similarity mapping model, Respectively represent the i-th historical pollution monitoring data p i , the jth historical pollution monitoring data p j Input the mapping of the electricity consumption-environmental protection association similarity mapping model and output the mapping encoding data, where n represents the number of daily monitoring samples of a certain enterprise.
7. A method for predicting short-term enterprise pollution discharge based on electricity consumption data as claimed in claim 1, characterized in that: When training the enterprise pollution discharge prediction model, the Wasserstein distance is combined with similar historical sample data to construct the generator's loss function and adjust the model's parameters, including: Calculate the similarity between the Encoder data of the pollution emission prediction data and the actual historical pollution emission data of the enterprise to be predicted. If the similarity is within the set threshold, the influence of the similar sample weight will increase during the data fitting process, and the pollution emission monitoring data will be fitted based on the similar sample data to generate short-term pollution emission prediction data; if the similarity exceeds the threshold, the loss function tends to generate short-term pollution emission prediction data through the generator based on the Encoder output encoding of the electricity.
8. A short-term enterprise pollution emission prediction system based on electricity consumption data, characterized in that: include: A data acquisition module is used to acquire historical electricity data and historical pollution monitoring data, and divide the historical electricity data into active electricity data and reactive electricity data; A short-term prediction module is used to construct a short-term power load prediction model based on active power data and reactive power data to predict short-term prediction data of active power and reactive power; The associated similarity mapping module is used to obtain the Encoder data of the pollution discharge prediction data based on the short-term prediction data of active power and reactive power, the historical pollution discharge monitoring data and the trained electricity consumption-environmental protection associated similarity mapping model; wherein the construction process of the electricity consumption-environmental protection associated similarity mapping model includes: Construct positive sample data and negative sample data based on historical active power data, reactive power data, and historical pollution monitoring data; Construct a representation learning framework, project the sample data into the hyperplane representation space through the representation learning framework, and obtain the pollution monitoring representation vector and the electricity representation vector; Based on the pollution monitoring representation vector and the electricity representation vector, the similarity between positive samples, the similarity between positive and negative pollution monitoring samples, and the similarity between positive and negative electricity data samples are calculated. The target loss function is trained based on the similarity calculation results. When the target loss function is minimized, the Encoder data of the pollution prediction data is generated. The pollution emission prediction module is used to predict the short-term pollution emission prediction data of the enterprise based on the Encoder data of the pollution emission prediction data, the actual pollution emission data of the enterprise to be predicted, and the enterprise pollution emission prediction model.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a method for predicting short-term enterprise pollution emissions based on electricity consumption data as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the method for predicting short-term enterprise pollution emissions based on electricity consumption data as described in any one of claims 1-7 are implemented.
