Training method, device, equipment and storage medium for carbon emission prediction model
By LMDI decomposing the power carbon emission data, obtaining model parameters, and adjusting the parameters, the problem of low accuracy of carbon emission prediction models in the prior art is solved, and higher prediction accuracy and data driving are achieved.
Patent Information
- Application Number
- CN202410787645.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-06-18
AI Technical Summary
When determining the factors affecting power carbon emissions in the prior art, the weight analysis is inaccurate, resulting in a large error and low accuracy between the predicted value and the actual value of the carbon emission prediction model.
By obtaining carbon emission data from sample industrial users, first-order and second-order decomposition of LMDI is performed, the first and second model parameters are obtained, and these parameters are input into the carbon emission prediction model for training, and the parameters are adjusted to improve prediction accuracy.
It improves the accuracy of the carbon emission prediction model, enhances the data driving and prediction capabilities of the model, and reduces the useless cost of model training.
Smart Images

Figure CN118822295B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of environmental science and energy science and technology, and in particular to a training method, apparatus, computer equipment, computer-readable storage medium and computer program product for a carbon emission prediction model. Background Art
[0002] With the rapid development of the industrial field, carbon discharged as waste has gradually occupied most of the carbon content in the atmosphere. The power industry is one of the important sources of carbon emissions. Understanding the factors affecting power carbon emissions can guide the formulation of energy sustainability strategies. The current means of determining the factors affecting power carbon emissions is to first use statistical methods to collect a large amount of data, and then use correlation analysis to screen out factors related to power carbon emissions.
[0003] However, the current weight analysis corresponding to each factor is not accurate, which leads to a large error between the predicted value of carbon emissions obtained by inputting the corresponding data into the prediction model and the actual value, and the result is low in accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a training method, device, computer equipment, computer-readable storage medium and computer program product for a carbon emission prediction model that can improve the accuracy of carbon emission prediction in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for training a carbon emission prediction model, comprising:
[0006] Obtaining sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users;
[0007] Obtaining a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI;
[0008] Inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain predicted carbon emissions, and obtaining a parameter adjustment coefficient preset in the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions meet preset conditions;
[0009] The first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0010] In one embodiment, obtaining a first model parameter and a second model parameter associated with sample carbon emission data includes:
[0011] Based on the first-order decomposition of sample carbon emission data, the number of users, average output value, average energy consumption intensity and electricity carbon factor of sample industries are obtained;
[0012] According to the number of users, average output value, average energy consumption intensity and carbon factor of the sample industry, LMDI analysis was carried out to obtain the first model parameters corresponding to each industry.
[0013] The second model parameters were obtained by conducting LMDI analysis based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industries.
[0014] In one embodiment, LMDI analysis is performed based on the number of users, average output value, average energy consumption intensity, and electric carbon factor of the sample industry to obtain the first model parameters corresponding to each of them, including:
[0015] Based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industries, the total output value, energy consumption intensity and carbon emission intensity of the sample industries are obtained;
[0016] The LMDI analysis is conducted based on the number of users, total output value, energy consumption intensity, and carbon emission intensity of the sample industries to obtain the corresponding first model parameters.
[0017] In an exemplary embodiment, LMDI analysis is performed based on the average output value, average energy consumption intensity, and electric carbon factor of the sample industry to obtain the second model parameters, including:
[0018] Based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industry, a second-order decomposition is performed to obtain the average output value, average energy consumption intensity and electricity carbon factor of the sample industry after decomposition;
[0019] According to the average output value, average energy consumption intensity and electricity carbon factor of the decomposed sample industries, LMDI analysis is carried out to obtain the corresponding second model parameters.
[0020] In one embodiment, after obtaining the predicted carbon emissions, the method further includes:
[0021] Get the difference between predicted carbon emissions and actual carbon emissions;
[0022] When the difference is less than or equal to the preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions meet the preset conditions;
[0023] When the difference is greater than a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions do not meet the preset conditions.
[0024] In one of the embodiments, when the predicted carbon emissions and the actual carbon emissions do not satisfy a preset condition, a loss function pre-set for the carbon emission prediction model to be trained is obtained;
[0025] Based on the difference and loss function, the model loss value of the carbon emission prediction model to be trained is obtained;
[0026] The model loss value is used to update the first model parameter and the second model parameter of the carbon emission prediction model to be trained until the loss function converges to obtain a trained carbon emission prediction model.
[0027] In an exemplary embodiment, the parameter adjustment coefficients include a first parameter adjustment coefficient, a second parameter adjustment coefficient, and a third parameter adjustment coefficient corresponding to the total output value, energy consumption intensity, and carbon emission intensity of the sample industry, respectively;
[0028] The first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model, including:
[0029] The second model parameters corresponding to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industries are respectively obtained, and the corresponding first cumulative value, second cumulative value and third cumulative value are obtained by summing them up;
[0030] Based on the first accumulated value, the first parameter adjustment coefficient, and the first model parameter corresponding to the total output value of the sample industry, respectively adjusting the first model parameter corresponding to the total output value of the sample industry and the second model parameter corresponding to the average output value of the decomposed sample industry;
[0031] Based on the second accumulated value, the second parameter adjustment coefficient, and the first model parameter corresponding to the energy consumption intensity of the sample industry, respectively adjusting the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the decomposed sample industry;
[0032] Based on the third accumulated value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the decomposed electric carbon factor of the sample industry are adjusted respectively.
[0033] In one embodiment, before obtaining sample data associated with carbon emissions, the method includes:
[0034] Obtaining raw carbon emission data associated with sample industrial users;
[0035] Remove blank data and duplicate data from the original carbon emission data to obtain cleaned original carbon emission data;
[0036] The cleaned raw carbon emission data is split and merged, and converted into a unified data format to obtain the converted raw carbon emission data;
[0037] The converted original carbon emission data is substituted into the preset Kaya identity for data verification, and the converted original carbon emission data that passes the verification is used as the sample carbon emission data.
[0038] In a second aspect, the present application also provides a training device for a carbon emission prediction model, comprising:
[0039] A data acquisition module is used to acquire sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of sample industrial users;
[0040] A parameter acquisition module, used to acquire a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI;
[0041] An input module, used to input the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained, to obtain the predicted carbon emission amount, and when the predicted carbon emission amount and the actual carbon emission amount meet the preset conditions, to obtain the parameter adjustment coefficient preset in the carbon emission prediction model to be trained;
[0042] The model training module is used to adjust the first model parameter and the second model parameter based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0043] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0044] Obtaining sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users;
[0045] Obtaining a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI;
[0046] Inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain predicted carbon emissions, and obtaining a parameter adjustment coefficient preset in the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions meet preset conditions;
[0047] The first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0048] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0049] Obtaining sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users;
[0050] Obtaining a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI;
[0051] Inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain predicted carbon emissions, and obtaining a parameter adjustment coefficient preset in the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions meet preset conditions;
[0052] The first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0053] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0054] Obtaining sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users;
[0055] Obtaining a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI;
[0056] Inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain predicted carbon emissions, and obtaining a parameter adjustment coefficient preset in the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions meet preset conditions;
[0057] The first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0058] The training method, device, computer equipment, computer-readable storage medium and computer program product of the carbon emission prediction model are obtained by obtaining sample carbon emission data associated with sample industrial users, the sample carbon emission data includes the actual carbon emission of the sample industrial users, and performing a first-order decomposition based on LMDI based on the sample carbon emission data to obtain a first model parameter, and performing a second-order decomposition based on LMDI based on the sample carbon emission data to obtain a second model parameter, inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emission, and obtaining the parameter adjustment coefficient preset in the carbon emission prediction model to be trained when the predicted carbon emission and the actual carbon emission meet the preset conditions, and finally adjusting the first model parameter and the second model parameter according to the parameter adjustment coefficient to obtain a trained carbon emission prediction model. By determining the model parameters for prediction according to the decomposition of the sample carbon emission data through LMDI, the trained model has better data-driven and predictive capabilities, and further adjusts the model parameters according to the preset parameter adjustment coefficient, thereby improving the prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0060] FIG1 is a diagram of an application environment of a method for training a carbon emission prediction model in one embodiment;
[0061] FIG2 is a schematic diagram of a process of training a carbon emission prediction model in one embodiment;
[0062] FIG3 is a schematic diagram of a process for obtaining first model parameters in one embodiment;
[0063] FIG4 is a schematic diagram of a process for obtaining second model parameters in another embodiment;
[0064] FIG5 is a schematic diagram of a process flow of parameter adjustment in one embodiment;
[0065] FIG6 is a schematic flow chart of a method for training a carbon emission prediction model in another embodiment;
[0066] FIG7 is a structural block diagram of a training device for a carbon emission prediction model in one embodiment;
[0067] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0069] The training method of the carbon emission prediction model provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the sample carbon emission data associated with the sample industrial user from the terminal 102, and the sample carbon emission data includes the actual carbon emissions of the sample industrial user. The server 104 performs the first-order decomposition and the second-order decomposition based on LMDI respectively according to the sample carbon emission data to obtain the corresponding first model parameter and the second model parameter. The server 104 inputs the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emissions, and when the predicted carbon emissions and the actual carbon emissions meet the preset conditions, the preset parameter adjustment coefficient in the carbon emission prediction model to be trained is obtained from the data storage system, and finally the first model parameter and the second model parameter are adjusted according to the parameter adjustment coefficient to obtain the trained carbon emission prediction model. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0070] In an exemplary embodiment, as shown in FIG2 , a method for training a carbon emission prediction model is provided, and the method is applied to the server 104 in FIG1 as an example for explanation, including the following steps S201 to S204. Among them:
[0071] Step S201, obtaining sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users.
[0072] Step S202, obtaining a first model parameter and a second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI.
[0073] Among them, the sample industrial users can be understood as users in the power industry. Since the power industry is one of the important sources of carbon emissions, the power industry is selected as the sample industry in this application, but there is no restriction, that is, the sample industry can also select other industries; the sample carbon emission data can be data related to the user itself, such as the number of users, and data related to the industry itself, such as the total output value of the industry.
[0074] Among them, LMDI is the abbreviation of Logarithmic Mean Divisia Index, which means logarithmic mean Divisia index. The first-order decomposition can be understood as dividing the actual carbon emissions into the product of multiple factors, and the first model parameter is the contribution of each factor after the first-order decomposition; the second-order decomposition can be understood as further decomposing the multiple factors obtained by the first-order decomposition into more subordinate factors, and the second model parameter can be understood as the contribution of the subordinate factors.
[0075] Specifically, the server 104 obtains sample carbon emission data associated with the sample user from the terminal 102, and the sample carbon emission data includes the actual carbon emissions of the sample industrial users. The server 104 then performs first-order decomposition and second-order decomposition based on LMDI on the sample carbon emission data to obtain the corresponding first model parameters and second model parameters, and links the sample carbon emission data and model parameters through LMDI, laying a data foundation for subsequent model training and speeding up the completion of model training.
[0076] Step S203, input the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emissions, and when the predicted carbon emissions and the actual carbon emissions meet the preset conditions, obtain the parameter adjustment coefficient preset in the carbon emission prediction model to be trained.
[0077] Among them, the carbon emission prediction model can be understood as a neural network, which usually includes an input layer, a hidden layer, and an output layer. The input layer receives the original data or features, the hidden layer processes the input data through a series of weighted and activated calculations, and finally the output layer generates the model's prediction or classification results for the data; the preset condition can be understood as the difference between the predicted carbon emissions output by the carbon emission prediction model and the actual carbon emissions needs to be less than a certain threshold; the parameter adjustment coefficient can be understood as the data that the model will use when generating the predicted carbon emissions, which is the pre-set and determined data in the model.
[0078] For example, the server 104 inputs the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emission amount. When the predicted carbon emission amount and the actual carbon emission amount meet the preset conditions, that is, when the error value between the predicted carbon emission amount and the actual carbon emission amount meets the application requirements, the server 104 obtains the parameter adjustment coefficient from the data storage system. A preliminary judgment is made based on the predicted amount output by the model to determine whether it is necessary to consume excess bandwidth to obtain the parameter adjustment coefficient for further parameter adjustment, which greatly reduces the useless cost generated by model training.
[0079] Step S204: adjusting the first model parameter and the second model parameter based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0080] Among them, parameter adjustment can be understood as constructing an equation based on the parameter adjustment coefficient, the first model parameter and the second model parameter. Both sides of the equation contain variables, and the values on both sides can be regarded as equal within a certain range of values. The process of adjusting the variables to the corresponding range of values is parameter adjustment.
[0081] Optionally, the server 104 adjusts the first model parameter and the second model parameter according to the parameter adjustment coefficient and the adjustment method of the preset composition equation to obtain a trained carbon emission prediction model. The model parameters of the carbon emission prediction model are further adjusted by the above means to achieve a better prediction effect, thereby improving the accuracy of the output results of the model, which is conducive to formulating strategies in advance for response.
[0082] In the training method of the above-mentioned carbon emission prediction model, by obtaining sample carbon emission data associated with sample industrial users, the sample carbon emission data includes the actual carbon emissions of the sample industrial users, and performing a first-order decomposition based on LMDI based on the sample carbon emission data to obtain a first model parameter, and performing a second-order decomposition based on LMDI based on the sample carbon emission data to obtain a second model parameter, the sample carbon emission data, the first model parameter, and the second model parameter are input into the carbon emission prediction model to be trained to obtain the predicted carbon emissions, and when the predicted carbon emissions and the actual carbon emissions meet the preset conditions, the parameter adjustment coefficient preset in the carbon emission prediction model to be trained is obtained, and finally the first model parameter and the second model parameter are adjusted according to the parameter adjustment coefficient to obtain the trained carbon emission prediction model. By determining the model parameters for prediction based on the decomposition of the sample carbon emission data through LMDI, the trained model has better data-driven and predictive capabilities, and the model parameters are further adjusted according to the preset parameter adjustment coefficient, thereby improving the prediction accuracy of the model.
[0083] In one embodiment, obtaining the first model parameter and the second model parameter associated with the sample carbon emission data includes: performing a first-order decomposition based on the sample carbon emission data to obtain the number of users, average output value, average energy consumption intensity and electricity carbon factor of the sample industry; performing LMDI analysis based on the number of users, average output value, average energy consumption intensity and electricity carbon factor of the sample industry to obtain the corresponding first model parameters; performing LMDI analysis based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industry to obtain the second model parameters.
[0084] Among them, LMDI analysis can be understood as first expressing the total consumption or emissions as a function, then converting it into an additive form through logarithmic transformation. Then, the total consumption or emissions are decomposed into the impact of each factor using LMDI technology.
[0085] Specifically, according to the Kaya identity theoretical framework, the Kaya identity is a mathematical model used to decompose carbon emissions, which can help understand and explain the reasons for changes in carbon emissions. The Kaya identity was proposed by energy economist Kaya Yasunori and can be expressed in the following form:
[0086] F=P×G / P×E / G×F / E
[0087] in:
[0088] F stands for Carbon Emissions
[0089] P represents the population
[0090] G stands for Gross Domestic Product (GDP)
[0091] E stands for all energy consumption
[0092] The alternative variable F is the carbon emissions of electricity, and E is the electricity consumption, which realizes the macro analysis of the factors affecting carbon emissions of electricity. According to the data information in the above formula and the sample carbon emission data, the first-order decomposition is performed, and P is used to represent the number of users of the sample industry, highlighting the analysis from a pure user perspective; G is replaced by the average output value of the sample industry, which reflects the market performance and user productivity from an indirect perspective.
[0093] The formula for the first-order decomposition is as follows:
[0094] In the formula, F is the carbon emissions from electricity; P is the number of emission-controlled enterprises (such as heavy industry, petrochemical and other high-energy-consuming industries, excluding residents and the tertiary industry); G is the output value; and E is the electricity consumption.
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101] Then, the number of users, average output value, average energy intensity and carbon factor of the sample industry were used to perform LDMI analysis to obtain the corresponding first model parameters, and the average output value, average energy intensity and carbon factor of the sample industry were used to perform LMDI analysis to obtain the corresponding second model parameters. This decomposition and analysis method established a more comprehensive perspective and improved the credibility of the model parameters finally analyzed.
[0102] In an exemplary embodiment, as shown in FIG3 , LMDI analysis is performed based on the number of users, average output value, average energy consumption intensity, and carbon factor of the sample industry to obtain the first model parameters corresponding to each of the steps S301 and S302. Among them:
[0103] Step S301, based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industry, obtain the total output value, energy consumption intensity and carbon emission intensity of the sample industry.
[0104] Step S302, performing LMDI analysis according to the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry to obtain the first model parameters corresponding to each.
[0105] Among them, the total output value of the sample industry can be understood as the sum of the average output value. Similarly, the energy consumption intensity can be understood as the sum of the average energy consumption intensity, and the carbon emission intensity can be understood as the sum of the electricity-carbon factors.
[0106] Specifically, the server 104 performs summation calculation based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry obtained after the first-order decomposition to obtain the total output value, energy consumption intensity and carbon emission intensity of the corresponding sample industry, and performs LMDI analysis based on the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry as factors:
[0107]
[0108]
[0109]
[0110]
[0111]
[0112] In one embodiment, as shown in FIG4 , performing LMDI analysis based on the average output value, average energy consumption intensity and carbon factor of the sample industry to obtain the second model parameters includes steps S401 and S402.
[0113] Step S401, performing a second-order decomposition based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the decomposed average output value, average energy consumption intensity and electric carbon factor of the sample industry;
[0114] Step S402, performing LMDI analysis based on the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industries to obtain the corresponding second model parameters.
[0115] Specifically, after the server 104 performs the first-stage decomposition, in order to further understand the lower-level factors affecting carbon emissions, it further decomposes the product of the first-order decomposition, namely, the second-order decomposition:
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122] In the formula, CSR is the input asset in the user's social responsibility field; GI is the green input asset within the user; DiF is the change in carbon emissions of emission-controlled users in the industry; ρ is the number of emission-controlled users; EP is the electricity price (SMP, etc.); CP is the coal price; C is the coal consumption for power generation; FE is the power generation of j types of fossil fuels; EG is the total power generation; ES is the total power supply.
[0123]
[0124]
[0125]
[0126] The low-carbon direction subscript () means "the decrease in the value when comparing two time periods generally contributes to carbon emission reduction". GC_1 is the ratio of output value to social responsibility input assets (low-carbon direction:); GC_2 is the ratio of social responsibility input assets to green input assets (low-carbon direction:); GC_3 is the contribution rate of green input assets to carbon emission reduction (low-carbon direction:); GC_4 is the average carbon emission reduction of controlled users (low-carbon direction:); GC_5 is the concentration of high carbon emission users (low-carbon direction:) EI_1 is the electricity consumption price ratio (low-carbon direction: none); EI_2 is the electricity and coal price ratio (low-carbon direction: none); EI_3 is the coal consumption price ratio (low-carbon direction: none); EI_4 is the coal consumption intensity (low-carbon direction:); CI_1: carbon emission intensity of j types of fossil fuel power generation (low-carbon direction: none); CI_2: j types of fossil fuel power generation ratio (low-carbon direction:); CI_3: electricity self-sufficiency rate (low-carbon direction: none); CI_4: electricity supply consumption ratio (low-carbon direction: none). In the absence of a specific mark, the lack of a low-carbon direction sign means that there is no specific direction or tendency. In terms of carbon emissions, the lack of a low-carbon direction sign means that the change in the values between the two time periods is not towards reducing or increasing emissions, and also means that there is no special focus or guidelines on carbon emissions.
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141] In the formula, A is equal to W A , B is equal to W B , C is equivalent to W C , D is equivalent to W D , E is equivalent to W E , F is equivalent to W F , G is equivalent to W G , H is equivalent to W H , I is equivalent to W I , J is equivalent to W J , K is equal to W K , L is equal to W L , M is equivalent to W M , N is equal to W N .
[0142] Through the above means, we can further obtain the contribution of more subordinate factors to carbon emissions, generate the corresponding second model parameters, and lay a data foundation for subsequent model training.
[0143] In one of the embodiments, after obtaining the predicted carbon emissions, the method also includes: obtaining the difference between the predicted carbon emissions and the actual carbon emissions; when the difference is less than or equal to a preset difference threshold, determining that the predicted carbon emissions and the actual carbon emissions meet the preset conditions; when the difference is greater than the preset difference threshold, determining that the predicted carbon emissions and the actual carbon emissions do not meet the preset conditions.
[0144] Among them, the difference can be understood as the absolute value of the difference between the predicted carbon emissions and the actual carbon emissions. The smaller the absolute value of the difference, the better the prediction effect of the model. The difference threshold can be understood as the maximum gap between the predicted carbon emissions and the actual carbon emissions. If it is greater than this value, it proves that the prediction effect of the model is not good and the model needs to be adjusted.
[0145] For example, after the server 104 inputs the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model, it obtains the predicted carbon emission amount:
[0146] Model formula:
[0147]
[0148]
[0149]
[0150]
[0151] Each wx value corresponds to the contribution value of the X influencing factor
[0152] w1, w2, w3, w4 correspond to the contribution values of GC, EI, CI and P influencing factors
[0153] Except for wx and β values, all the values in the formula are actual values obtained through observation or collection. By applying the network method, we use the first 70% of the actual values to train, predict the last 30% of the values, and then compare them with the actual values of the last 30% to verify whether the prediction can be correct. The verification method is as follows:
[0154] Subtract the predicted carbon emissions from the actual carbon emissions to get a difference, obtain the absolute value of the difference, and compare it with the preset difference threshold. When the absolute value is greater than the difference threshold, it proves that the actual carbon emissions are very different from the predicted carbon emissions, that is, the preset conditions are not met; if the absolute value is less than the difference threshold, it proves that the actual carbon emissions are not much different from the predicted carbon emissions, that is, the preset conditions are met. By simply judging the numerical difference between the predicted carbon emissions and the actual carbon emissions, it is determined which method to choose to continue to optimize the model, which speeds up the progress of model training.
[0155] In an exemplary embodiment, the method also includes: when the predicted carbon emissions and the actual carbon emissions do not meet preset conditions, obtaining a loss function pre-set for the carbon emission prediction model to be trained; based on the difference and the loss function, obtaining a model loss value of the carbon emission prediction model to be trained; using the model loss value, updating the first model parameters and the second model parameters of the carbon emission prediction model to be trained, until the loss function converges, thereby obtaining a trained carbon emission prediction model.
[0156] Among them, the loss function can be understood as a function used to measure the difference or error between the model's prediction results and the actual observed values. In the process of training the model, the model parameters can be adjusted by minimizing the loss function so that it can more accurately predict the actual situation; the model loss can be understood as the model loss value refers to the difference or error between the model's predicted output and the actual label during the training process. The loss value is usually calculated based on the selected loss function, which measures the gap between the model's predicted results and the actual results.
[0157] Optionally, when the server 104 determines that the predicted carbon emissions and the actual carbon emissions do not meet the prediction conditions, the training scheme 1 is started to train and adjust the model, firstly obtaining the loss function set for the carbon emission prediction model to be trained, and based on the difference and the loss function, obtaining the model loss of the carbon emission prediction model to be trained, using the model loss value, updating the first model parameter and the second model parameter of the carbon emission prediction model to be trained, until the loss function converges, that is, the model loss value output by the loss function reaches the minimum, at which time the carbon emission prediction model to be trained is used as the trained carbon emission prediction model. By training the carbon emission prediction model to be trained in the above manner, the prediction accuracy of the model is improved to a certain extent, which is conducive to users formulating strategies based on the prediction information to reduce carbon emissions.
[0158] In one embodiment, the parameter adjustment coefficients include a first parameter adjustment coefficient, a second parameter adjustment coefficient, and a third parameter adjustment coefficient corresponding to the total output value, energy consumption intensity, and carbon emission intensity of the sample industry, respectively. As shown in FIG5 , the first model parameter and the second model parameter are adjusted based on the parameter adjustment coefficients to obtain a trained carbon emission prediction model, including steps S501 to S504. Among them:
[0159] Step S501, respectively obtain the second model parameters corresponding to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry, and perform addition processing to obtain the corresponding first cumulative value, second cumulative value and third cumulative value.
[0160] Among them, the first cumulative value can be understood as the cumulative sum of the second model parameters corresponding to the average output value of the sample industry after decomposition. Similarly, the second cumulative value can be understood as the cumulative sum of the second model parameters corresponding to the average energy consumption intensity of the sample industry after decomposition. The third cumulative value can be understood as the cumulative sum of the second model parameters corresponding to the electric carbon factor of the sample industry after decomposition.
[0161] For example, after determining that the predicted carbon emissions and the actual carbon emissions meet the preset conditions, the server 104 first adds up the second model parameters, and the calculation formula is as follows:
[0162] is the sum of the second model parameters corresponding to the decomposed average output value;
[0163] is the sum of the second model parameters corresponding to the decomposed average energy consumption intensity;
[0164] It is the sum of the second model parameters corresponding to the decomposed electric carbon factor.
[0165] The above-mentioned sum calculation lays a data foundation for the subsequent parameter adjustment of the first model parameters and the second model parameters.
[0166] Step S502, based on the first accumulated value, the first parameter adjustment coefficient and the first model parameter corresponding to the total output value of the sample industry, respectively adjust the first model parameter corresponding to the total output value of the sample industry and the second model parameter corresponding to the average output value of the decomposed sample industry.
[0167] Step S503, based on the second accumulated value, the second parameter adjustment coefficient and the first model parameter corresponding to the energy consumption intensity of the sample industry, respectively adjust the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the decomposed sample industry.
[0168] Step S504, based on the third accumulated value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, adjust the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the decomposed electric carbon factor of the sample industry respectively.
[0169] Specifically, the server 104 obtains the product of the first accumulated value and the first parameter adjustment coefficient, and constructs an equation with the first model parameter corresponding to the total output value of the sample industry; obtains the product of the second accumulated value and the second parameter adjustment coefficient, and constructs an equation with the first model parameter corresponding to the energy consumption intensity of the sample industry; obtains the product of the third accumulated value and the third parameter adjustment coefficient, and constructs an equation with the first model parameter corresponding to the carbon emission intensity of the sample industry. The equation construction is as follows:
[0170]
[0171]
[0172]
[0173] Let the left value = α, the right value = γ, if , then the equation holds true. The adjustment of the first model parameter and the second model parameter is to adjust the final values of the equations on both sides to within the preset range. At this time, it is considered that the equality of the equations on both sides holds true. The first model parameter and the second model parameter under the condition that the equation holds true are the final model parameters.
[0174] By further adjusting the first model parameters and the second model parameters in the above manner and making variable adjustments within a preset value range, the adjustment speed of the parameters is accelerated and the prediction accuracy of the carbon emission prediction model is also improved.
[0175] In an exemplary embodiment, before obtaining sample data associated with carbon emissions, it includes: obtaining original carbon emission data associated with sample industrial users; removing blank data and duplicate data in the original carbon emission data to obtain cleaned original carbon emission data; splitting and merging the cleaned original carbon emission data, and converting them into a unified data format to obtain converted original carbon emission data; substituting the converted original carbon emission data into a preset kaya identity for data verification, and using the verified converted original carbon emission data as sample carbon emission data.
[0176] Among them, blank data can be understood as blank data without actual meaning, and duplicate data can be understood as data that has previously had the same meaning, and the reappearance of this data will only increase the processing cost; the Kaya identity is proposed by energy economist Kaya Yasunori, and it can be expressed in the following form:
[0177] F=P×G / P×E / G×F / E
[0178] in:
[0179] F stands for Carbon Emissions
[0180] P represents the population
[0181] G stands for Gross Domestic Product (GDP)
[0182] E stands for all energy consumption
[0183] The preset kaya identity has been adaptively adjusted on this basis, as follows - the replacement variable F is the carbon emissions of electricity, E is the electricity consumption, P is used to represent the number of users of the sample industry, and G is replaced by the average output value of the sample industry.
[0184] Optionally, the server 104 first directly obtains the original carbon emission data associated with the sample industrial users from the terminal 102, and removes blank data and duplicate data therein to obtain the cleaned original carbon emission data, further splits and merges the useful data therein, and converts it into a unified data format (such as csv, excel, etc.), inputs a preset kaya identity to determine whether the data satisfies this equation, and uses the converted original carbon emission data that satisfies the equation as the sample carbon emission data. The above-mentioned data processing means ensures the validity of the data, reduces the unnecessary costs that may be incurred in subsequent data processing, avoids the influence of useless data on the model training results, and thereby speeds up the completion of model training.
[0185] In one embodiment, as shown in FIG6 , a detailed flow chart of a method for training a carbon emission prediction model is provided, including steps S601 to S615. Among them:
[0186] Step S601, obtain the original carbon emission data associated with the sample industrial users, filter and split the data, merge the useful data, convert it into a commonly used data format, and verify whether the data conforms to the mathematical formula. The original carbon emission data that conforms to the formula is used as the sample carbon emission data.
[0187] Step S602, performing first-order decomposition based on the sample carbon emission data to obtain the number of users, average output value, average energy consumption intensity and electricity carbon factor of the sample industry.
[0188] Step S603, based on the average output value, average energy consumption intensity and electricity carbon factor of the sample industry, the total output value, energy consumption intensity and carbon emission intensity of the sample industry are obtained.
[0189] Step S604, performing LMDI analysis according to the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry to obtain the first model parameters corresponding to each.
[0190] Step S605, performing a second-order decomposition based on the average output value, average energy consumption intensity and electricity-carbon factor of the sample industry to obtain the decomposed average output value, average energy consumption intensity and electricity-carbon factor of the sample industry.
[0191] Step S606, performing LMDI analysis based on the average output value, average energy consumption intensity and electricity carbon factor of the decomposed sample industries to obtain the corresponding second model parameters.
[0192] Step S607, inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained, obtaining the predicted carbon emission, and acquiring the difference between the predicted carbon emission and the actual carbon emission.
[0193] Step S608: when the difference is greater than a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions do not meet a preset condition, and a preset loss function is obtained.
[0194] Step S609: obtaining the model loss value of the carbon emission prediction model to be trained based on the difference and loss function.
[0195] Step S610, using the model loss value, updates the first model parameter and the second model parameter of the carbon emission prediction model to be trained until the loss function converges, thereby obtaining a trained carbon emission prediction model.
[0196] Step S611: when the difference is less than or equal to a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions meet a preset condition, and a preset parameter adjustment coefficient is obtained.
[0197] Step S612, respectively obtain the second model parameters corresponding to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry, and perform addition processing to obtain the corresponding first cumulative value, second cumulative value and third cumulative value.
[0198] Step S613, based on the first accumulated value, the first parameter adjustment coefficient and the first model parameter corresponding to the total output value of the sample industry, respectively adjust the first model parameter corresponding to the total output value of the sample industry and the second model parameter corresponding to the average output value of the decomposed sample industry.
[0199] Step S614, based on the second accumulated value, the second parameter adjustment coefficient and the first model parameter corresponding to the energy consumption intensity of the sample industry, respectively adjust the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the decomposed sample industry.
[0200] Step S615, based on the third accumulated value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, adjust the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the decomposed electric carbon factor of the sample industry respectively.
[0201] Compared with the existing technical solutions, this solution has the following advantages:
[0202] 1. The model parameters used for prediction in the model training process in this application are not pre-set according to empirical values, but the corresponding model parameters are obtained by performing LMDI-based decomposition on the sample data to be input into the model, which increases the connection between the data and the model. The model trained by this method has better data-driven and predictive capabilities.
[0203] 2. During the model training process, different model training methods are used when the output results meet the preset conditions and when they do not meet the preset conditions, which speeds up the completion of model training. At the same time, even when the preset conditions are met, the model parameters are further adjusted, thereby further improving the prediction accuracy of the model.
[0204] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0205] Based on the same inventive concept, the embodiment of the present application also provides a training device for a carbon emission prediction model for implementing the training method of the carbon emission prediction model involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the training device for one or more carbon emission prediction models provided below can refer to the limitations of the training method for the carbon emission prediction model above, and will not be repeated here.
[0206] In an exemplary embodiment, as shown in FIG. 7 , a training device for a carbon emission prediction model is provided, comprising: a data acquisition module 701 , a parameter acquisition module 702 , an input module 703 and a model training module 701 , wherein:
[0207] The data acquisition module 701 is used to acquire sample carbon emission data associated with sample industrial users; the sample carbon emission data includes the actual carbon emission of the sample industrial users.
[0208] The parameter acquisition module 702 is used to obtain the first model parameter and the second model parameter associated with the sample carbon emission data; the first model parameter is obtained based on the sample carbon emission data through the first-order decomposition of LMDI, and the second model parameter is obtained based on the sample carbon emission data through the second-order decomposition of LMDI.
[0209] The input module 703 is used to input the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emissions, and when the predicted carbon emissions and the actual carbon emissions meet the preset conditions, obtain the parameter adjustment coefficient preset in the carbon emission prediction model to be trained.
[0210] The model training module 704 is used to adjust the first model parameter and the second model parameter based on the parameter adjustment coefficient to obtain a trained carbon emission prediction model.
[0211] In one embodiment, the parameter acquisition module 702 further includes a first-order decomposition submodule, a first model parameter acquisition submodule and a second model parameter acquisition submodule, wherein:
[0212] The first-order decomposition submodule is used to perform first-order decomposition based on the sample carbon emission data to obtain the number of users, average output value, average energy consumption intensity and electricity carbon factor of the sample industry.
[0213] The first model parameter acquisition submodule is used to perform LMDI analysis based on the number of users, average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the corresponding first model parameters. The second model parameter acquisition submodule is used to perform LMDI analysis based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the second model parameters.
[0214] In one embodiment, the first model parameter acquisition submodule is further used to obtain the total output value, energy consumption intensity and carbon emission intensity of the sample industry based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry; perform LMDI analysis according to the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry to obtain the corresponding first model parameters.
[0215] In an exemplary embodiment, the second model parameter acquisition submodule is further used to perform a second-order decomposition based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the decomposed average output value, average energy consumption intensity and electric carbon factor of the sample industry; perform LMDI analysis based on the decomposed average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the corresponding second model parameters.
[0216] In one embodiment, the input module 703 is also used to obtain the difference between the predicted carbon emissions and the actual carbon emissions; when the difference is less than or equal to a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions meet the preset conditions; when the difference is greater than the preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions do not meet the preset conditions.
[0217] In one of the embodiments, the training device of the carbon emission prediction model can also be used to obtain a loss function pre-set for the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions do not meet a preset condition; based on the difference and the loss function, obtain the model loss value of the carbon emission prediction model to be trained; use the model loss value to update the first model parameter and the second model parameter of the carbon emission prediction model to be trained, until the loss function converges, to obtain a trained carbon emission prediction model.
[0218] In an exemplary embodiment, the parameter adjustment coefficient includes a first parameter adjustment coefficient, a second parameter adjustment coefficient and a third parameter adjustment coefficient corresponding to the total output value, energy consumption intensity and carbon emission intensity of the sample industry, respectively. The model training module 704 is further used to obtain the second model parameters corresponding to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry, and perform addition processing to obtain the corresponding first cumulative value, second cumulative value and third cumulative value; based on the first cumulative value, the first parameter adjustment coefficient and the first model parameter corresponding to the total output value of the sample industry, the total output value of the sample industry is adjusted to the value of the second cumulative value. Based on the second accumulated value, the second parameter adjustment coefficient and the first model parameter corresponding to the energy consumption intensity of the sample industry, the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the sample industry after decomposition are adjusted respectively; based on the third accumulated value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the electric carbon factor of the sample industry after decomposition are adjusted respectively.
[0219] In one embodiment, the training device of the carbon emission prediction model is also used to obtain original carbon emission data associated with sample industrial users; remove blank data and duplicate data in the original carbon emission data to obtain cleaned original carbon emission data; split and merge the cleaned original carbon emission data, and convert them into a unified data format to obtain converted original carbon emission data; substitute the converted original carbon emission data into a preset kaya identity for data verification, and use the verified converted original carbon emission data as sample carbon emission data.
[0220] Each module in the training device of the carbon emission prediction model can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0221] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store sample carbon emission data, a first model parameter, a second model parameter and parameter adjustment coefficient data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a carbon emission prediction model is implemented.
[0222] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0223] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the training method of the carbon emission prediction model of the above embodiment is implemented.
[0224] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the training method of the carbon emission prediction model of the above embodiment is implemented.
[0225] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the training method of the carbon emission prediction model of the above embodiment.
[0226] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0227] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0228] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0229] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for training a carbon emission prediction model, characterized in that: The method comprises: Acquire sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users; Based on the sample carbon emission data, a first-order decomposition is performed to obtain the number of users, average output value, average energy consumption intensity and electricity carbon factor of the sample industry; Based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry, the total output value, energy consumption intensity and carbon emission intensity of the sample industry are obtained; Perform LMDI analysis according to the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry to obtain the first model parameters corresponding to each of them; Perform a second-order decomposition based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the decomposed average output value, average energy consumption intensity and electric carbon factor of the sample industry; According to the decomposed average output value, average energy consumption intensity and electric carbon factor of the sample industries, LMDI analysis is performed to obtain the corresponding second model parameters; The sample carbon emission data, the first model parameter and the second model parameter are input into the carbon emission prediction model to be trained to obtain the predicted carbon emission amount, and when the predicted carbon emission amount and the actual carbon emission amount meet the preset conditions, the parameter adjustment coefficient preset in the carbon emission prediction model to be trained is obtained; the parameter adjustment coefficient includes a first parameter adjustment coefficient, a second parameter adjustment coefficient and a third parameter adjustment coefficient corresponding to the total output value, energy consumption intensity and carbon emission intensity of the sample industry, respectively; Respectively obtain the second model parameters corresponding to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry, and perform addition processing to obtain the corresponding first cumulative value, second cumulative value and third cumulative value; Based on the first accumulated value, the first parameter adjustment coefficient, and the first model parameter corresponding to the total output value of the sample industry, respectively adjusting the first model parameter corresponding to the total output value of the sample industry and the second model parameter corresponding to the average output value of the decomposed sample industry; Based on the second accumulated value, the second parameter adjustment coefficient, and the first model parameter corresponding to the energy consumption intensity of the sample industry, respectively adjusting the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the decomposed sample industry; Based on the third accumulated value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the decomposed electric carbon factor of the sample industry are adjusted respectively to obtain a trained carbon emission prediction model.
2. The method according to claim 1, characterized in that After obtaining the predicted carbon emissions, the method further includes: Obtaining a difference between the predicted carbon emissions and the actual carbon emissions; When the difference is less than or equal to a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions meet a preset condition; When the difference is greater than a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions do not satisfy a preset condition.
3. The method according to claim 2, characterized in that The method further comprises: When the predicted carbon emissions and the actual carbon emissions do not satisfy a preset condition, obtaining a loss function pre-set for the carbon emissions prediction model to be trained; Based on the difference and the loss function, obtaining a model loss value of the carbon emission prediction model to be trained; The model loss value is used to update the first model parameter and the second model parameter of the carbon emission prediction model to be trained until the loss function converges, thereby obtaining a trained carbon emission prediction model.
4. The method according to claim 1, characterized in that: Before obtaining the sample data associated with carbon emissions, the method includes: Obtaining raw carbon emission data associated with sample industrial users; Removing blank data and duplicate data from the original carbon emission data to obtain cleaned original carbon emission data; Splitting and merging the cleaned original carbon emission data, and converting them into a unified data format to obtain converted original carbon emission data; The converted original carbon emission data is substituted into a preset kaya identity for data verification, and the converted original carbon emission data that passes the verification is used as sample carbon emission data.
5. A training device for a carbon emission prediction model, characterized in that: The device comprises: A data acquisition module, used to acquire sample carbon emission data associated with sample industrial users; the sample carbon emission data includes actual carbon emissions of the sample industrial users; A parameter acquisition module, for performing a first-order decomposition based on the sample carbon emission data to obtain the number of users, average output value, average energy consumption intensity and electric carbon factor of the sample industry; based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry, obtaining the total output value, energy consumption intensity and carbon emission intensity of the sample industry; performing LMDI analysis according to the number of users, total output value, energy consumption intensity and carbon emission intensity of the sample industry to obtain the first model parameters corresponding to each; performing a second-order decomposition based on the average output value, average energy consumption intensity and electric carbon factor of the sample industry to obtain the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry; performing LMDI analysis according to the average output value, average energy consumption intensity and electric carbon factor of the decomposed sample industry to obtain the second model parameters corresponding to each; An input module, used for inputting the sample carbon emission data, the first model parameter and the second model parameter into the carbon emission prediction model to be trained to obtain the predicted carbon emission amount, and when the predicted carbon emission amount and the actual carbon emission amount meet the preset conditions, obtaining the parameter adjustment coefficient preset in the carbon emission prediction model to be trained; the parameter adjustment coefficient includes a first parameter adjustment coefficient, a second parameter adjustment coefficient and a third parameter adjustment coefficient respectively corresponding to the total output value, energy consumption intensity and carbon emission intensity of the sample industry; A model training module is used to respectively obtain the average output value, average energy consumption intensity and second model parameters corresponding to the electric carbon factor of the decomposed sample industry, and perform addition processing to obtain the corresponding first cumulative value, second cumulative value and third cumulative value; based on the first cumulative value, the first parameter adjustment coefficient and the first model parameter corresponding to the total output value of the sample industry, respectively adjust the first model parameter corresponding to the total output value of the sample industry and the second model parameter corresponding to the average output value of the decomposed sample industry; based on the second cumulative value, the second parameter adjustment coefficient and the first model parameter corresponding to the energy consumption intensity of the sample industry, respectively adjust the first model parameter corresponding to the energy consumption intensity of the sample industry and the second model parameter corresponding to the average energy consumption intensity of the decomposed sample industry; based on the third cumulative value, the third parameter adjustment coefficient and the first model parameter corresponding to the carbon emission intensity of the sample industry, respectively adjust the first model parameter corresponding to the carbon emission intensity of the sample industry and the second model parameter corresponding to the electric carbon factor of the decomposed sample industry to obtain a trained carbon emission prediction model.
6. The device according to claim 5, characterized in that The device also includes: The input module is also used to obtain the difference between the predicted carbon emissions and the actual carbon emissions; when the difference is less than or equal to a preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions meet the preset conditions; when the difference is greater than the preset difference threshold, it is determined that the predicted carbon emissions and the actual carbon emissions do not meet the preset conditions.
7. The device according to claim 6, characterized in that The device also includes: The training device of the carbon emission prediction model is also used to obtain a loss function pre-set for the carbon emission prediction model to be trained when the predicted carbon emissions and the actual carbon emissions do not meet a preset condition; obtain a model loss value of the carbon emission prediction model to be trained based on the difference and the loss function; and use the model loss value to update the first model parameter and the second model parameter of the carbon emission prediction model to be trained, until the loss function converges, thereby obtaining a trained carbon emission prediction model.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Regional carbon emission prediction method and system based on LMDI model and GRU model, and medium
CN115293418A
Carbon emission prediction method and device and electronic equipment
CN117829345A