Regional carbon emissions prediction method, device and terminal equipment
By calculating the energy-to-power ratio of historical electricity consumption to energy consumption, processing outliers and optimizing the long-term and short-term memory network model, the problem of low carbon emission prediction accuracy in the existing technology is solved, and more accurate carbon emission prediction is achieved.
Patent Information
- Application Number
- CN202210425476.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-04-21
AI Technical Summary
The existing regional carbon emission forecasting methods are mainly based on energy consumption, which is greatly disturbed by policy and social factors, resulting in low prediction accuracy.
By obtaining the historical electricity consumption and historical energy consumption of the target area, the energy-to-electricity ratio is calculated to determine the carbon electricity conversion coefficient, and the outliers are processed using the isolated forest method and the exponential smoothing method, a long and short-term memory network model is established for parameter optimization, and the predicted value of the carbon electricity conversion coefficient is predicted, and carbon emissions are finally predicted based on the predicted value.
It improves the prediction accuracy of carbon emissions, reduces the impact of social factors on the prediction results, and achieves a more accurate prediction of carbon emissions.
Smart Images

Figure CN114781720B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data measurement technology, and specifically to a method, apparatus and terminal device for predicting regional carbon emissions. Background Art
[0002] Excessive greenhouse gas emissions are a major cause of global warming and the frequent occurrence of extreme climate disasters. In recent years, controlling greenhouse gas emissions has become an international consensus.
[0003] The power industry accounts for a significant proportion of total carbon emissions. Accurate and effective carbon emission forecasting is a key prerequisite for achieving a low-carbon transformation in the power industry.
[0004] Existing prediction methods for regional carbon emissions are usually based only on regional energy consumption and are significantly affected by social factors such as policies and holidays, resulting in low carbon emission prediction accuracy. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide a method, apparatus, and terminal device for predicting regional carbon emissions to solve the technical problem of low prediction accuracy of existing carbon emissions prediction methods.
[0006] In a first aspect, an embodiment of the present application provides a method for predicting regional carbon emissions, comprising:
[0007] Obtain historical electricity consumption and energy consumption in the target area, and determine a carbon-to-electricity conversion coefficient based on the historical electricity consumption and energy consumption;
[0008] performing outlier processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient;
[0009] Establishing a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient;
[0010] The carbon emissions of the target area are predicted based on the predicted value of the carbon-to-electricity conversion coefficient.
[0011] In a possible implementation manner of the first aspect, the historical energy consumption includes at least one of the following: historical coal consumption, historical oil consumption, and historical gas consumption;
[0012] The obtaining of historical electricity consumption and historical energy consumption of the target area, and determining the carbon-to-electricity conversion coefficient based on the historical electricity consumption and historical energy consumption, includes:
[0013] Obtain historical electricity consumption and energy consumption in the target area;
[0014] Calculate the ratio of each historical energy consumption to the historical electricity consumption to obtain the energy-to-electricity ratio of each energy source;
[0015] The carbon-to-electricity conversion coefficient is determined based on the energy-to-electricity ratio of each energy source.
[0016] In a possible implementation of the first aspect, determining the carbon-to-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source includes:
[0017] Determine the carbon-to-electricity conversion coefficient corresponding to each energy source based on the energy-to-electricity ratio of each energy source and the preset carbon emission factor of each energy source;
[0018] The carbon-to-electricity conversion coefficients corresponding to the energy sources are summed to determine the carbon-to-electricity conversion coefficient.
[0019] In a possible implementation manner of the first aspect, performing outlier processing on the carbon-to-electricity conversion coefficient to obtain the processed carbon-to-electricity conversion coefficient includes:
[0020] determining outliers in the carbon-to-electricity conversion coefficient according to the isolation forest method;
[0021] According to the exponential smoothing method, the abnormal value is processed to obtain the processed carbon-to-electricity conversion coefficient.
[0022] In a possible implementation of the first aspect, establishing a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient includes:
[0023] Optimizing the parameters of the long short-term memory network model based on the bat algorithm and the processed carbon-to-electricity conversion coefficient;
[0024] The long short-term memory network model after parameter optimization is used as a carbon-to-electricity conversion coefficient prediction model, the processed carbon-to-electricity conversion coefficient is used as a model input, and a predicted value of the carbon-to-electricity conversion coefficient is predicted and output.
[0025] In a possible implementation manner of the first aspect, predicting the carbon emissions of the target area based on the predicted value of the carbon-to-electricity conversion coefficient includes:
[0026] Obtain electricity consumption in the target area;
[0027] The carbon emissions of the target area are predicted based on the predicted value of the carbon-to-electricity conversion coefficient and the electricity consumption.
[0028] In a possible implementation of the first aspect, the method further includes:
[0029] The predicted carbon emissions of the target area are displayed on the display screen.
[0030] In a second aspect, an embodiment of the present application provides a regional carbon emissions prediction device, comprising:
[0031] An acquisition module is used to obtain historical electricity consumption and historical energy consumption of a target area, and determine a carbon-to-electricity conversion coefficient based on the historical electricity consumption and historical energy consumption;
[0032] a processing module, configured to perform abnormal value processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient;
[0033] A first prediction module is used to establish a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient;
[0034] The second prediction module is used to predict the carbon emissions of the target area according to the predicted value of the carbon-to-electricity conversion coefficient.
[0035] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, it implements the regional carbon emissions prediction method as described in any one of the first aspects.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for predicting regional carbon emissions as described in any one of the first aspects is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the regional carbon emissions prediction method described in any one of the first aspects above.
[0038] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0039] The regional carbon emissions prediction method, device and terminal equipment provided in the embodiments of the present application obtain the historical electricity consumption and historical energy consumption of the target area, determine the carbon-electricity conversion coefficient based on the above historical electricity consumption and historical energy consumption, perform outlier processing on the carbon-electricity conversion coefficient, and establish a carbon-electricity conversion coefficient prediction model. The processed carbon-electricity conversion coefficient is used as the model input, and the predicted value of the carbon-electricity conversion coefficient is predicted and output. The carbon emissions of the target area are predicted based on the predicted value of the carbon-electricity conversion coefficient, which can accurately predict the carbon emissions of the target area.
[0040] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 This is a flow chart of a method for predicting regional carbon emissions provided in one embodiment of the present application;
[0043] Figure 2 This is a flow chart of a method for predicting regional carbon emissions provided in one embodiment of the present application;
[0044] Figure 3 This is a flow chart of a method for predicting regional carbon emissions provided in one embodiment of the present application;
[0045] Figure 4 This is a flow chart of a method for predicting regional carbon emissions provided in one embodiment of the present application;
[0046] Figure 5 This is a flow chart of a method for predicting regional carbon emissions provided in one embodiment of the present application;
[0047] Figure 6 This is a comparison chart of the carbon-to-electricity conversion factor prediction;
[0048] Figure 7 This is a comparison chart of carbon emission projections;
[0049] Figure 8 This is a schematic diagram of the structure of a regional carbon emissions prediction device provided in one embodiment of the present application;
[0050] Figure 9 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] The present application will be described more clearly below with reference to specific embodiments. The following embodiments will help those skilled in the art further understand the function of the present application, but are not intended to limit the present application in any form. It should be noted that those skilled in the art may make a number of modifications and improvements without departing from the concept of the present application. These all fall within the scope of protection of the present application.
[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0053] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0054] In the description of this application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0055] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0056] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more.
[0057] Excessive greenhouse gas emissions are a major cause of global warming and the frequent occurrence of extreme climate disasters. In recent years, controlling greenhouse gas emissions has become an international consensus. Society as a whole faces the need to transition to a low-carbon economy, requiring comprehensive adjustments to both the energy and industrial structures based on existing carbon emissions. Carbon emissions from the power sector account for a significant proportion of total carbon emissions. Accurate and effective carbon emission forecasting is a crucial prerequisite for building an environmentally friendly power system centered around low-carbon operation and achieving a low-carbon transition in the power sector.
[0058] Existing prediction methods for regional carbon emissions are usually based only on regional energy consumption and are significantly affected by social factors such as policies and holidays, resulting in low carbon emission prediction accuracy.
[0059] Based on the above problems, the inventors found through research that by determining the carbon-to-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source according to the historical data of the target area, and predicting the carbon-to-electricity conversion coefficient, and then predicting the carbon emissions based on the prediction results, the interference of social factors on the carbon emissions prediction can be reduced.
[0060] That is to say, the embodiment of the present application obtains the historical electricity consumption and historical energy consumption of the target area, determines the carbon-electricity conversion coefficient based on the above historical electricity consumption and historical energy consumption, processes the carbon-electricity conversion coefficient for abnormal values, and establishes a carbon-electricity conversion coefficient prediction model. The processed carbon-electricity conversion coefficient is used as the model input, and the predicted value of the carbon-electricity conversion coefficient is predicted and output. The carbon emissions of the target area are predicted based on the predicted value of the carbon-electricity conversion coefficient, and the carbon emissions of the target area can be accurately predicted.
[0061] Figure 1 This is a flow chart of a method for predicting regional carbon emissions provided by an embodiment of the present application. Figure 1 As shown, the method in the embodiment of the present application may include:
[0062] Step 101: Obtain historical electricity consumption and historical energy consumption of the target area, and determine the carbon-to-electricity conversion coefficient based on the historical electricity consumption and historical energy consumption.
[0063] In one possible implementation, see Figure 2 In step 101, the historical electricity consumption and energy consumption of the target area are obtained, and the carbon-to-electricity conversion coefficient is determined based on the historical electricity consumption and energy consumption. Specifically, the following steps may be performed:
[0064] Step 1011: Obtain historical electricity consumption and historical energy consumption of the target area.
[0065] The above-mentioned historical energy consumption includes at least one of the following: historical coal consumption, historical oil consumption, and historical gas consumption, which can be determined based on the specific energy usage of the target area. Historical coal consumption refers to the amount of coal consumed, historical oil consumption refers to the amount of petroleum consumed, and historical gas consumption refers to the amount of natural gas consumed.
[0066] Optionally, the historical electricity consumption and the historical energy consumption are the electricity consumption and energy consumption of the target area before the current time, and there is a temporal correspondence between the historical electricity consumption and the historical energy consumption. For example, the historical electricity consumption obtained may be the electricity consumption of the target area in March of the previous year, and accordingly, the historical energy consumption obtained is at least one of the coal consumption, oil consumption, and gas consumption of the target area in March of the previous year. Of course, the historical electricity consumption obtained may also be the electricity consumption of the target area on a certain day of the previous year, and accordingly, the historical energy consumption obtained is at least one of the coal consumption, oil consumption, and gas consumption of the target area on that day of the previous year.
[0067] For the convenience of description, the historical energy consumption acquired in the following embodiments includes historical coal consumption, historical oil consumption, and historical gas consumption.
[0068] The historical electricity consumption and historical energy consumption of the target area may be obtained by manual input by staff, and no specific limitation is made here.
[0069] Step 1012: Calculate the ratio of each historical energy consumption to the historical electricity consumption to obtain the energy-to-electricity ratio of each energy source.
[0070] In this embodiment, the energy-to-electricity ratio formula is:
[0071] (1)
[0072] Where, For the i The energy-to-electricity ratio of the energy source, is the historical energy consumption, This is the historical electricity consumption.
[0073] The ratio of historical coal consumption to historical electricity consumption, the ratio of historical oil consumption to historical electricity consumption, and the ratio of historical gas consumption to historical electricity consumption are calculated respectively to obtain the energy-to-electricity ratio corresponding to coal, the energy-to-electricity ratio corresponding to oil, and the energy-to-electricity ratio corresponding to natural gas.
[0074] Step 1013: Determine the carbon-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source.
[0075] Optionally, the step of determining the carbon-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source may specifically include: determining the carbon-electricity conversion coefficient corresponding to each energy source based on the energy-to-electricity ratio of each energy source and the preset carbon emission factor of each energy source; and summing the carbon-electricity conversion coefficients corresponding to the above-mentioned energy sources to determine the carbon-electricity conversion coefficient.
[0076] In this embodiment, the carbon-to-electricity conversion coefficient formula is:
[0077] (2)
[0078] Where, is the carbon electricity conversion coefficient, For the i Carbon emission factors of various energy sources.
[0079] It should be noted that in the above embodiment, multiple historical electricity consumption and energy consumption data for the target region within a preset time period are obtained. These historical electricity consumption and energy consumption data have a temporal correspondence. Accordingly, multiple carbon-to-electricity conversion coefficients are determined based on these multiple historical electricity consumption and energy consumption data.
[0080] For example, the historical energy consumption obtained can be the electricity consumption of the target area in March, June, September, and December of the previous year. Correspondingly, the historical energy consumption obtained is the coal consumption, oil consumption, and gas consumption of the target area in March, June, September, and December of the previous year. Based on the above formulas (1) and (2), the carbon-to-electricity conversion coefficient for March of the previous year can be determined based on the historical electricity consumption and historical energy consumption in March of the previous year, and the carbon-to-electricity conversion coefficient for June of the previous year can be determined based on the historical electricity consumption and historical energy consumption in June of the previous year.
[0081] That is, there is also a temporal correspondence between the above-mentioned historical electricity consumption, historical energy consumption and carbon-to-electricity conversion coefficient. Based on the multiple historical electricity consumption and multiple historical energy consumption of the target area within the preset time period, multiple carbon-to-electricity conversion coefficients can be determined.
[0082] The above-mentioned carbon-to-electricity conversion coefficient is calculated by the energy-to-electricity ratio of each energy source. By introducing the energy-to-electricity ratio of each energy source, when the carbon emissions of the target area are subsequently predicted based on the carbon-to-electricity conversion coefficient, the impact of social factors on the prediction results can be reduced, thereby improving the prediction accuracy of carbon emissions.
[0083] Step 102: Perform outlier processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient.
[0084] In one possible implementation, see Figure 3 In step 102, the carbon-to-electricity conversion coefficient is processed for abnormal values to obtain the processed carbon-to-electricity conversion coefficient, which may specifically include:
[0085] Step 1021: Determine outliers in the carbon-to-electricity conversion coefficient based on the isolation forest method.
[0086] In this embodiment, the isolation forest method is used to perform outlier detection on the multiple calculated carbon-to-electricity conversion coefficients to determine abnormal values in the carbon-to-electricity conversion coefficients.
[0087] The isolation forest method is an anomaly detection algorithm. Its core concept is to construct a binary tree to identify outliers based on the fact that outliers are relatively isolated from normal data. Within a sample space, a sample attribute is randomly selected as the basis for partitioning the sample space. This partitioning process produces two sub-sample spaces. Each sub-sample space is then partitioned based on the sample attribute until each sub-sample space contains only one type of data point. The depth of a data point in the binary tree reflects the degree of its anomaly.
[0088] Specifically, the calculated multiple carbon-to-electricity conversion coefficients are used as a data set, and a n samples, forming a sample space, in this nA value between the maximum and minimum values of the samples is randomly selected as the first value, and the n The samples are divided into a binary tree, for example, samples smaller than the first value are divided into the left half of the tree, and samples greater than or equal to the first value are divided into the right half of the tree.
[0089] Repeat the above steps of selecting values and dividing for the samples in the left half of the tree and the samples in the right half of the tree until the termination condition is met. The termination condition is that the sample itself cannot be divided any further, or the depth of the binary tree reaches a preset depth threshold.
[0090] Optionally, the data set is sampled multiple times, multiple binary trees are constructed, and the results of all binary trees are integrated to increase the credibility of the final determined outliers.
[0091] The isolated binary trees in the constructed multiple binary trees are combined to form an isolation forest, and the anomaly score of each data point is calculated.
[0092] The anomaly score formula is:
[0093] (3)
[0094] Where, is the abnormal score, Is the separation data point x The average number of steps required, is the average path length in a binary tree.
[0095] (4)
[0096] Where, is a harmonic function, where is Euler's constant.
[0097] Optionally, determine whether a data point is abnormal based on the abnormality score. Approaching 0, The corresponding data point that is close to 1 is abnormal data, that is, the carbon-to-electricity conversion coefficient corresponding to the data point is an abnormal value.
[0098] Step 1022: Perform outlier processing on the outliers according to the exponential smoothing method to obtain a processed carbon-to-electricity conversion coefficient.
[0099] In this embodiment, after determining the abnormal value in the carbon-to-electricity conversion coefficient, the exponential smoothing method is used to smooth the abnormal value to improve data quality for subsequent effective prediction of the predicted value of the carbon-to-electricity conversion coefficient.
[0100] Specifically, all calculated carbon-to-electricity conversion coefficients are taken as a time series, that is, the time series includes abnormal values and normal values in the carbon-to-electricity conversion coefficients, and abnormal value processing is performed on the abnormal values in the above carbon-to-electricity conversion coefficients.
[0101] In the above time series, if t The previous data of the abnormal value at the moment, that is The data at the moment is also an outlier, so the outlier processing formula is:
[0102] (5)
[0103] Where, for t The outliers at the moment, for t The smoothed value at time, for The outliers at the moment, for The smoothed value at time, is the smoothing coefficient.
[0104] like t The previous data of the abnormal value at the moment, that is The data at the moment is a normal value, then the outlier processing formula is:
[0105] (6)
[0106] at this time, for Normal value at the moment.
[0107] Optionally, the smoothed value and the normal value are combined to form a processed carbon-to-electricity conversion coefficient.
[0108] Among them, in the above formulas (5)-(6), The value of can be selected according to the fluctuation trend of the time series. When the fluctuation of the time series is small and the long-term trend is stable, The value range is 0.05~0.20.
[0109] When the time series fluctuates but the long-term trend is relatively stable, The value range is 0.1~0.4.
[0110] When the fluctuation of the time series is large, the long-term trend changes greatly, and the local time series shows an obvious and rapid upward or downward trend, The value range is 0.6~0.8.
[0111] When the time series shows an overall upward or downward trend, The value range is 0.6~1.
[0112] Step 103: Establish a carbon-to-electricity conversion coefficient prediction model, use the processed carbon-to-electricity conversion coefficient as the model input, and predict and output a predicted value of the carbon-to-electricity conversion coefficient.
[0113] In one possible implementation, see Figure 4 In step 103, a carbon-to-electricity conversion coefficient prediction model is established, and the processed carbon-to-electricity conversion coefficient is used as the model input to predict and output the predicted value of the carbon-to-electricity conversion coefficient. Specifically, the following steps may be performed:
[0114] Step 1031: Optimize the parameters of the long short-term memory network model based on the bat algorithm and the processed carbon-to-electricity conversion coefficient.
[0115] Step 1032: Use the parameter-optimized long short-term memory network model as a carbon-to-electricity conversion coefficient prediction model, use the processed carbon-to-electricity conversion coefficient as a model input, and predict and output a predicted value of the carbon-to-electricity conversion coefficient.
[0116] Among them, the Long Short-Term Memory (LSTM) model is a time-recurrent neural network model improved on the basis of the Recurrent Neural Network (RNN), which can effectively predict time series.
[0117] Optionally, in order to effectively predict the predicted value of the carbon-to-electricity conversion coefficient, it is necessary to select appropriate neural network parameters, that is, it is necessary to optimize the parameters of the long-short-term memory network model, where the parameters that need to be optimized in the long-short-term memory network model are the number of hidden layers in the network and the number of network training times.
[0118] Alternatively, the Bat Algorithm (BA) is a population-based stochastic optimization algorithm. The solution to a problem is abstracted into bat particles in a search space. Each bat has a corresponding fitness threshold determined by the optimization problem. Individual bats can adjust their frequency, pulse rate, and volume to follow the current optimal bat in the search space. In this embodiment, the Bat Algorithm is used to optimize the parameters of the LSTM network model. For details on the parameter optimization process for the LSTM network model using the Bat Algorithm and the processed carbon-to-electricity conversion coefficient, please refer to the subsequent related embodiments and will not be repeated here.
[0119] For example, the bat algorithm is used to determine the optimal number of hidden layers and the optimal number of network training times of the long short-term memory network model. The long short-term memory network model after parameter optimization is used as the carbon-to-electricity conversion coefficient prediction model, and the processed carbon-to-electricity conversion coefficient is used as the model input to predict the value of the carbon-to-electricity conversion coefficient.
[0120] Step 104: Predict the carbon emissions of the target area based on the predicted value of the carbon-to-electricity conversion coefficient.
[0121] Optionally, the step of predicting the carbon emissions of the target area based on the predicted value of the carbon-to-electricity conversion coefficient may include: obtaining the electricity consumption of the target area; and predicting the carbon emissions of the target area based on the predicted value of the carbon-to-electricity conversion coefficient and the above electricity consumption.
[0122] Optionally, the predicted values of the target region's electricity consumption and carbon-to-electricity conversion coefficient are temporally correlated with the target region's carbon emissions. For example, to predict the target region's carbon emissions for April of the current year, the target region's electricity consumption for April of the current year is obtained, and the predicted value of the carbon-to-electricity conversion coefficient for the target region for April of the current year is predicted using the carbon-to-electricity conversion coefficient prediction model.
[0123] The product of the target area's electricity consumption and the predicted value of the carbon-to-electricity conversion coefficient is the predicted carbon emissions of the target area.
[0124] Optionally, the predicted carbon emissions of the target area are displayed on a display screen so that staff can observe the carbon emissions of the target area in a timely manner.
[0125] The above-mentioned regional carbon emissions prediction method obtains the historical electricity consumption and historical energy consumption of the target area, determines the carbon-electricity conversion coefficient based on the above-mentioned historical electricity consumption and historical energy consumption, processes the carbon-electricity conversion coefficient for abnormal values, and establishes a carbon-electricity conversion coefficient prediction model. The processed carbon-electricity conversion coefficient is used as the model input, and the predicted value of the carbon-electricity conversion coefficient is predicted and output. The carbon emissions of the target area are predicted based on the predicted value of the carbon-electricity conversion coefficient, which can accurately predict the carbon emissions of the target area.
[0126] In one possible implementation, see Figure 5 In step 1031, the parameters of the long short-term memory network model are optimized according to the bat algorithm and the processed carbon-to-electricity conversion coefficient, which may specifically include:
[0127] Step 201: pre-process the processed carbon-to-electricity conversion coefficient to obtain a training sample.
[0128] Optionally, the processed carbon-to-electricity conversion coefficients are normalized to reduce the possibility of large prediction errors, and any portion of the processed carbon-to-electricity conversion coefficients are selected as training samples.
[0129] Step 202: Initialize the parameters of the bat algorithm according to the parameters of the long short-term memory network model.
[0130] Among them, the parameters of the bat algorithm include the position, speed, volume, frequency and pulse emission rate of individual bats.
[0131] Step 203: Update the parameters of the long short-term memory network model according to the position of the individual bat, use the training sample as the model input, calculate the root mean square error according to the model output, and use the root mean square error as the fitness value of the position of the individual bat.
[0132] In this embodiment, the root mean square error (RMS) is used to evaluate the predictive performance of the LSTM network model. The positions of individual bats represent the optimization parameters in the LSTM network model, including the number of hidden layers and the number of network training cycles.
[0133] Mapping the positions of individual bats yields the optimized parameters of the LSTM network model. The parameters of the LSTM network are then set based on these optimized parameters, and the training samples are used as model input to obtain the model output. The root mean square error (RMSE) is then calculated based on the model output.
[0134] The root mean square error formula is:
[0135] (7)
[0136] Where, RMSE is the root mean square error, N is the number of data in the training sample, The first k The actual value of the data, For the k The predicted value corresponding to the data.
[0137] According to the position of each individual bat, based on the long short-term memory network model and training samples, the fitness value of the position of each individual bat can be determined.
[0138] Step 204: Determine the position of the optimal bat individual according to the fitness value of each bat individual as the current optimal solution.
[0139] Among them, the fitness values of the bat individuals are sorted, and the position of the bat individual with the smallest fitness value is selected as the position of the optimal bat individual, that is, as the current optimal solution.
[0140] Step 205: Update the position, speed, and fitness value of the individual bat, and determine whether to accept the updated position of the individual bat based on the volume and pulse emission rate of the individual bat.
[0141] In this embodiment, the fitness value of the bat individual is updated according to the updated position of the bat individual and formula (7), based on the long short-term memory network model and the training samples.
[0142] The update formula for the position and velocity of individual bats is:
[0143] (8)
[0144] (9)
[0145] (10)
[0146] Where, For the m The frequency of bats, is the static frequency, is the variable range of frequency, is a random number, , and Respectively m A bat in p Speed and position at a moment, and Respectively m A bat in p- Speed and position at moment 1, is the current optimal solution.
[0147] Optionally, a random number is generated for each individual bat, and it is determined whether the random number is less than the volume of the individual bat, and whether the frequency of the updated individual bat is less than the frequency corresponding to the current optimal solution.
[0148] If the random number is less than the volume of the bat individual and the frequency of the updated bat individual is less than the frequency corresponding to the current optimal solution, the updated position of the bat individual is accepted; otherwise, the updated position of the bat individual is not accepted.
[0149] Step 206: If the updated position of the individual bat is accepted, the volume and pulse emission rate of the individual bat are attenuated; if the updated position of the individual bat is not accepted, the position, speed and fitness value of the individual bat are updated again.
[0150] In this embodiment, the attenuation processing formula is:
[0151] (11)
[0152] (12)
[0153] Where, and Respectively m A bat in p Moment and p- The volume of 1 moment, is the volume attenuation coefficient, For the m A bat in p The pulse emission rate at time For the m The initial pulse firing rate of the bats, is the pulse attenuation coefficient.
[0154] Step 207: Determine whether the convergence condition is met.
[0155] If the convergence condition is met, step 208 is executed; if the convergence condition is not met, the step of determining the position of the optimal bat individual according to the fitness value of each bat individual is re-executed until the convergence condition is met.
[0156] The convergence condition is that the fitness value of the individual bat is less than a preset threshold, or the number of iterations reaches a preset number.
[0157] Step 208: Output the current optimal solution, perform mapping processing on the current optimal solution, and obtain the optimization parameters of the long short-term memory network model.
[0158] Among them, the current optimal solution is output, that is, the position of the optimal bat individual is output, and the position is mapped to obtain the optimal number of network hidden layers and the optimal number of network training times of the long short-term memory network model.
[0159] In this embodiment, the bat algorithm is used to optimize the parameters of the long short-term memory network model, and the optimal number of network hidden layers and the optimal number of network training times of the long short-term memory network model can be determined, so that the long short-term memory network model after parameter optimization can be used as a carbon-to-electricity conversion coefficient prediction model for subsequent predictions.
[0160] For example, to verify the effectiveness of the embodiments of the present application, historical electricity consumption and energy consumption in a certain region from March 2008 to May 2018 were analyzed. The specific analysis is as follows:
[0161] Based on the above historical electricity consumption and historical energy consumption, multiple carbon-to-electricity conversion coefficients are obtained, and the above multiple carbon-to-electricity conversion coefficients are processed for outliers using the isolation forest method and exponential smoothing method to obtain the processed carbon-to-electricity conversion coefficients (see Table 1).
[0162] Table 1 shows the carbon-to-electricity conversion coefficient after processing provided in one embodiment of the present application.
[0163]
[0164] Taking the processed carbon-to-electricity conversion coefficient as the model input, based on the carbon-to-electricity conversion coefficient prediction model, the carbon-to-electricity conversion coefficient of the region for each month from January 2019 to December 2019 is predicted, and the predicted value of the carbon-to-electricity conversion coefficient for each month from January 2019 to December 2019 is output.
[0165] Figure 6 This is a comparison chart of the carbon electricity conversion coefficient forecast. Figure 6 The solid line is the actual value of the carbon-to-electricity conversion coefficient for each month from January 2019 to December 2019 in the region. The long dashed line is the first predicted value of the carbon-to-electricity conversion coefficient for each month from January 2019 to December 2019, which is predicted by using the processed carbon-to-electricity conversion coefficient as the model input. The short dashed line is the second predicted value of the carbon-to-electricity conversion coefficient for each month from January 2019 to December 2019, which is predicted by directly using the carbon-to-electricity conversion coefficient as the model input, that is, using the carbon-to-electricity conversion coefficient without outlier processing as the model input.
[0166] from Figure 6 It can be seen that the trend of the long dashed line is closer to the solid line, that is, the prediction based on the processed carbon-electricity conversion coefficient can make the predicted value of the carbon-electricity conversion coefficient closer to the actual value of the carbon-electricity conversion coefficient, indicating that outlier processing of the carbon-electricity conversion coefficient can effectively improve the quality of the data.
[0167] Figure 7 is a comparison chart of carbon emission forecasts. Figure 7 The solid line is the actual value of the carbon emissions in the region from January 2019 to December 2019. The long dashed line is the first carbon emissions for each month from January 2019 to December 2019 predicted according to the method of this application. The short dashed line is the second carbon emissions for each month from January 2019 to December 2019 predicted using the existing commonly used carbon emissions prediction method, that is, not based on the carbon-to-electricity conversion coefficient.
[0168] from Figure 7 It can be seen that the trend of the long dotted line is closer to the solid line, that is, the carbon emissions predicted according to the method of this application are closer to the actual value of carbon emissions, indicating that the method of this application can accurately predict the carbon emissions in the region, that is, the method of predicting the carbon emissions of the target area based on the carbon-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source can effectively improve the accuracy of the prediction of carbon emissions in the target area.
[0169] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0170] Figure 8This is a schematic diagram of the structure of a regional carbon emissions prediction device provided by an embodiment of the present application. Figure 8 As shown, the regional carbon emission prediction device provided by this embodiment may include: an acquisition module 801 , a processing module 802 , a first prediction module 803 and a second prediction module 804 .
[0171] The acquisition module 801 is used to obtain the historical electricity consumption and energy consumption of the target area, and determine the carbon-to-electricity conversion coefficient based on the historical electricity consumption and energy consumption;
[0172] The processing module 802 is used to perform abnormal value processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient;
[0173] The first prediction module 803 is used to establish a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient;
[0174] The second prediction module 804 is configured to predict the carbon emissions of the target area according to the predicted value of the carbon-to-electricity conversion coefficient.
[0175] Optionally, the historical energy consumption includes at least one of the following: historical coal consumption, historical oil consumption, and historical gas consumption. The acquisition module 801 is specifically configured to:
[0176] Obtain historical electricity consumption and energy consumption in the target area;
[0177] Calculate the ratio of each historical energy consumption to the historical electricity consumption to obtain the energy-to-electricity ratio of each energy source;
[0178] The carbon-to-electricity conversion coefficient is determined based on the energy-to-electricity ratio of each energy source.
[0179] Optionally, the acquisition module 801 is further specifically configured to:
[0180] Determine the carbon-to-electricity conversion coefficient corresponding to each energy source based on the energy-to-electricity ratio of each energy source and the preset carbon emission factor of each energy source;
[0181] The carbon-to-electricity conversion coefficients corresponding to the energy sources are summed to determine the carbon-to-electricity conversion coefficient.
[0182] Optionally, the processing module 802 is specifically configured to:
[0183] determining outliers in the carbon-to-electricity conversion coefficient according to the isolation forest method;
[0184] According to the exponential smoothing method, the abnormal value is processed to obtain the processed carbon-to-electricity conversion coefficient.
[0185] Optionally, the first prediction module 803 is specifically configured to:
[0186] Optimizing the parameters of the long short-term memory network model based on the bat algorithm and the processed carbon-to-electricity conversion coefficient;
[0187] The long short-term memory network model after parameter optimization is used as a carbon-to-electricity conversion coefficient prediction model, the processed carbon-to-electricity conversion coefficient is used as a model input, and a predicted value of the carbon-to-electricity conversion coefficient is predicted and output.
[0188] Optionally, the second prediction module 804 is specifically configured to:
[0189] Obtain electricity consumption in the target area;
[0190] The carbon emissions of the target area are predicted based on the predicted value of the carbon-to-electricity conversion coefficient and the electricity consumption.
[0191] Optionally, the second prediction module 804 is further specifically configured to:
[0192] The predicted carbon emissions of the target area are displayed on the display screen.
[0193] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0194] Figure 9 This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Figure 9 As shown, the terminal device 900 of this embodiment includes: a processor 910 and a memory 920, wherein the memory 920 stores a computer program 921 that can be run on the processor 910. When the processor 910 executes the computer program 921, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 1 Alternatively, when the processor 910 executes the computer program 921, the functions of the modules / units in the above-mentioned device embodiments are realized, for example Figure 8 Functions of modules 801 to 804 are shown.
[0195] Exemplarily, the computer program 921 may be divided into one or more modules / units, one or more of which are stored in the memory 920 and executed by the processor 910 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 921 in the terminal device 900.
[0196] Those skilled in the art will understand that Figure 9These are merely examples of terminal devices and do not constitute a limitation on the terminal devices. The terminal devices may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0197] The processor 910 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0198] The memory 920 can be an internal storage unit of the terminal device, such as the terminal device's hard drive or memory, or an external storage device, such as a plug-in hard drive, a SmartMedia Card (SMC), a Secure Digital (SD) card, or a flash memory card. The memory 920 can also include both the terminal device's internal storage unit and an external storage device. The memory 920 is used to store computer programs and other programs and data required by the terminal device. The memory 920 can also be used to temporarily store data that has been output or is about to be output.
[0199] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0200] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
Claims
1. A method for predicting regional carbon emissions, characterized in that: include: Obtain historical electricity consumption and energy consumption in the target area, and determine a carbon-to-electricity conversion coefficient based on the historical electricity consumption and energy consumption; performing outlier processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient; Establishing a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient; Predicting carbon emissions in the target area based on the predicted value of the carbon-to-electricity conversion coefficient; The historical energy consumption includes at least one of the following: historical coal consumption, historical oil consumption, and historical gas consumption; obtaining the historical electricity consumption and historical energy consumption of the target area, and determining the carbon-to-electricity conversion coefficient based on the historical electricity consumption and historical energy consumption include: Obtain historical electricity consumption and historical energy consumption in the target area; calculate the ratio of each historical energy consumption to the historical electricity consumption to obtain the energy-to-electricity ratio of each energy source; and determine the carbon-to-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source; The step of establishing a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient includes: Optimizing the parameters of the long short-term memory network model according to the bat algorithm and the processed carbon-to-electricity conversion coefficient; using the parameter-optimized long short-term memory network model as a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input, and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient; The predicting of carbon emissions in the target area based on the predicted value of the carbon-to-electricity conversion coefficient includes: Obtaining electricity consumption in a target area; predicting carbon emissions in the target area based on the predicted value of the carbon-to-electricity conversion coefficient and the electricity consumption; wherein the product of the electricity consumption and the predicted value of the carbon-to-electricity conversion coefficient is used as the predicted carbon emissions in the target area.
2. The regional carbon emissions prediction method according to claim 1, characterized in that: Determining the carbon-to-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source includes: Determine the carbon-to-electricity conversion coefficient corresponding to each energy source based on the energy-to-electricity ratio of each energy source and the preset carbon emission factor of each energy source; The carbon-to-electricity conversion coefficients corresponding to the energy sources are summed to determine the carbon-to-electricity conversion coefficient.
3. The regional carbon emissions prediction method according to claim 1, characterized in that: The performing outlier processing on the carbon-to-electricity conversion coefficient to obtain the processed carbon-to-electricity conversion coefficient includes: determining outliers in the carbon-to-electricity conversion coefficient according to the isolation forest method; According to the exponential smoothing method, the abnormal value is processed to obtain the processed carbon-to-electricity conversion coefficient.
4. The regional carbon emissions prediction method according to claim 1, characterized in that: Also includes: The predicted carbon emissions of the target area are displayed on the display screen.
5. A regional carbon emissions prediction device, characterized in that: include: An acquisition module is used to obtain historical electricity consumption and historical energy consumption of a target area, and determine a carbon-to-electricity conversion coefficient based on the historical electricity consumption and historical energy consumption; a processing module, configured to perform abnormal value processing on the carbon-to-electricity conversion coefficient to obtain a processed carbon-to-electricity conversion coefficient; A first prediction module is used to establish a carbon-to-electricity conversion coefficient prediction model, using the processed carbon-to-electricity conversion coefficient as a model input and predicting and outputting a predicted value of the carbon-to-electricity conversion coefficient; A second prediction module is used to predict the carbon emissions of the target area according to the predicted value of the carbon-to-electricity conversion coefficient; The historical energy consumption includes at least one of the following: historical coal consumption, historical oil consumption, and historical gas consumption; the acquisition module is further configured to acquire historical electricity consumption and historical energy consumption of the target area; calculate the ratio of each historical energy consumption to the historical electricity consumption to obtain the energy-to-electricity ratio of each energy source; and determine the carbon-to-electricity conversion coefficient based on the energy-to-electricity ratio of each energy source; The first prediction module is further configured to optimize the parameters of the long short-term memory network model based on the bat algorithm and the processed carbon-to-electricity conversion coefficient; use the parameter-optimized long short-term memory network model as a carbon-to-electricity conversion coefficient prediction model, use the processed carbon-to-electricity conversion coefficient as a model input, and predict and output a predicted value of the carbon-to-electricity conversion coefficient; The second prediction module is also used to obtain the electricity consumption of the target area; predict the carbon emissions of the target area based on the predicted value of the carbon-to-electricity conversion coefficient and the electricity consumption; wherein the product of the electricity consumption and the predicted value of the carbon-to-electricity conversion coefficient is used as the predicted carbon emissions of the target area.
6. A terminal device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method for predicting regional carbon emissions according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting regional carbon emissions according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Carbon emission monitoring method and device, storage medium and processor
CN114240086A