Carbon emission prediction method and device, equipment, storage medium and program product
By introducing industry identifiers into the carbon emission prediction model and combining large language models and hybrid expert models, the problem of insufficient prediction accuracy caused by industry heterogeneity in existing technologies is solved, and high-precision and interpretable carbon emission prediction is achieved.
Patent Information
- Application Number
- CN202511493500.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-23
AI Technical Summary
Existing carbon emission prediction methods have failed to effectively address the issue of industry heterogeneity, resulting in a significant gap between prediction accuracy and actual application requirements. They cannot meet the high-precision, interpretable, and industry-adaptable prediction needs of energy-intensive enterprises.
By introducing industry identifiers, the carbon emission prediction model can make targeted predictions. It combines large language models and hybrid expert models, and uses XGBoost and neural network architectures to predict carbon emissions. Data fusion processing through selection and output layers improves the accuracy and reliability of predictions.
This improves the accuracy and reliability of carbon emission forecasting, allowing users to intuitively understand the impact of various types of energy data on carbon emissions, thus enhancing the forecasting effectiveness and relevance.
Smart Images

Figure CN121389059A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a carbon emission prediction method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the continuous enhancement of environmental awareness, environmental protection has gradually become the consensus of various industries. At present, various industries can pay attention to environmental protection by controlling and counting carbon emissions, and enterprises can also plan current production plans by predicting carbon emissions.
[0003] In the prior art, a fixed prediction algorithm is usually used to predict carbon emissions, and the prediction effect of carbon emissions is not good. SUMMARY
[0004] Therefore, it is necessary to provide a carbon emission prediction method and device, computer equipment, computer readable storage medium and computer program product capable of improving the prediction effect of carbon emissions.
[0005] In a first aspect, the present application provides a carbon emission prediction method, comprising: obtaining input data, the input data comprising industry identifier, energy consumption data of an institution and historical carbon emissions of the institution; inputting the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; wherein the prediction result comprises predicted carbon emissions of the institution in a target time period and a carbon emission index, and the carbon emission index is used to represent the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
[0006] In one embodiment, inputting the input data into the carbon emission prediction model to obtain the prediction result output by the carbon emission prediction model comprises: inputting the input data into the carbon emission prediction model, determining a carbon emission sub-prediction model matched with the industry identifier through a selection layer in the carbon emission prediction model; and performing carbon emission prediction according to the energy consumption data and the historical carbon emissions through the carbon emission sub-prediction model to obtain the prediction result.
[0007] In one embodiment, determining the carbon emission sub-prediction model matched with the industry identifier through the selection layer in the carbon emission prediction model comprises: determining a plurality of carbon emission sub-prediction models matched with the industry identifier through the selection layer; and the industry corresponding to each carbon emission sub-prediction model is associated with the industry corresponding to the industry identifier.
[0008] In one of the embodiments, the carbon emission prediction is performed by the carbon emission sub-prediction model according to the energy consumption data and the historical carbon emission, and the prediction result is obtained, including: performing the carbon emission prediction by each carbon emission sub-prediction model according to the energy consumption data and the historical carbon emission, and obtaining multiple prediction data; performing data fusion processing according to each prediction data by the output layer of the carbon emission prediction model, and obtaining the prediction result.
[0009] In one of the embodiments, the method further includes: obtaining a training data set, the training data set including multiple sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data including sample energy consumption data and sample historical carbon emission, and the label data including label carbon emission; for each industry, determining a model complexity based on the sample energy consumption data, selecting an initial carbon emission prediction sub-model matched with the model complexity, training the initial carbon emission prediction sub-model according to the sample energy consumption data, the sample historical carbon emission and the label carbon emission, and obtaining a carbon emission prediction sub-model; and obtaining the carbon emission prediction model according to each carbon emission prediction sub-model, the selection layer and the output layer.
[0010] In one of the embodiments, the method further includes: obtaining an initial sample historical carbon emission corresponding to a historical time period, and calculating a data correction index corresponding to the initial sample historical carbon emission; performing data correction on the initial sample historical carbon emission based on the data correction index, and obtaining a sample historical carbon emission.
[0011] In one of the embodiments, the data correction index includes a first threshold, a second threshold and a carbon emission change rate, and the calculation of the data correction index corresponding to the initial sample historical carbon emission includes: calculating a mean value and a standard deviation of the initial sample historical carbon emission, calculating the first threshold and the second threshold based on the mean value and the standard deviation; screening multiple target sample historical carbon emissions with carbon emission greater than the first threshold or less than the second threshold from the initial sample historical carbon emission; calculating multiple carbon emission change rates according to a first sample historical carbon emission and a second sample historical carbon emission in each target sample historical carbon emission, the sampling time of the first sample historical carbon emission and the sampling time of the second sample historical carbon emission having a time interval.
[0012] In a second aspect, the application further provides a carbon emission prediction device, including: an input data acquisition module, configured to acquire input data, the input data including an industry identifier, energy consumption data of an institution and historical carbon emission of the institution; a carbon emission prediction module, configured to input the input data into a carbon emission prediction model, and obtain a prediction result output by the carbon emission prediction model; wherein the prediction result includes a predicted carbon emission of the institution in a target time period and a carbon emission index, and the carbon emission index is used to represent a proportion of each type of energy data in the energy consumption data relative to the predicted carbon emission.
[0013] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first aspect.
[0014] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0015] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.
[0016] The aforementioned carbon emission prediction methods, apparatus, computer equipment, computer-readable storage media, and computer program products acquire input data including industry identifiers, institutional energy consumption data, and historical carbon emissions of the institution. This input data is then fed into a carbon emission prediction model to obtain the prediction results output by the model. By using industry identifiers for targeted carbon emission prediction, the accuracy and reliability of carbon emission prediction are improved. Furthermore, the prediction results include the institution's predicted carbon emissions and carbon emission indicators for the target time period. The carbon emission indicators characterize the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions. By demonstrating the proportion of each type of energy data in the predicted carbon emissions, users can intuitively see the impact of each type of energy data on carbon emissions, thus improving the targeting of carbon emission prediction and ultimately enhancing the prediction effect. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a diagram illustrating the application environment of a carbon emission prediction method in one embodiment.
[0019] Figure 2 This is a flowchart illustrating a carbon emission prediction method in one embodiment;
[0020] Figure 3 This is a flowchart illustrating step 202 in one embodiment;
[0021] Figure 4This is a flowchart illustrating step 301 in one embodiment;
[0022] Figure 5 This is a flowchart illustrating step 302 in one embodiment;
[0023] Figure 6 This is a schematic diagram of the training process of a carbon emission prediction model in one embodiment;
[0024] Figure 7 This is a schematic diagram of the training data correction process in one embodiment;
[0025] Figure 8 This is a flowchart illustrating step 701 in one embodiment;
[0026] Figure 9 This is a flowchart illustrating a carbon emission prediction method in another embodiment;
[0027] Figure 10 This is a structural block diagram of a carbon emission prediction device in one embodiment;
[0028] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0030] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0031] The carbon emission prediction method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown includes at least terminal 101 and carbon emission prediction model 101-1.
[0032] The terminal 101 is configured to obtain input data, input the input data into the carbon emission prediction model, obtain a prediction result output by the carbon emission prediction model, and further display the prediction result on a screen. Optionally, the input data is obtained in response to a user input instruction. The terminal 101 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, unmanned aerial vehicles, low-altitude flying vehicles, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, and the like. It should be noted that the carbon emission prediction model 101-1 can be deployed in the terminal 101. In addition, the terminal 101 can send the input data to a backend server to perform carbon emission prediction in cooperation with the carbon emission prediction model 101-1. The server can be a physical server, a server cluster or a distributed system formed by multiple physical servers, or a cloud server providing cloud computing services.
[0033] The carbon emission prediction model 101-1 can be used to predict carbon emissions according to input data to obtain a prediction result, wherein the prediction result includes predicted carbon emissions of an organization in a target time period and a carbon emission index. The carbon emission index is used to represent the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions. The carbon emission prediction model 101-1 can be deployed in the terminal 101 or in the backend server according to actual needs. The terminal 101 can communicate with the server through a communication network.
[0034] In actual scenarios, in the core stage of promoting the "double carbon" goal and green transformation of high-energy-consuming industries, the accuracy of carbon emission prediction directly determines the scientificity and landing efficiency of emission reduction strategies. High-energy-consuming enterprises, as the core subject of carbon emissions, are affected by the coupling of "energy consumption structure-production cycle law-industry attribute difference". The carbon emission driving logic of different industries shows significant heterogeneity. For example, the steel industry is highly dependent on coal consumption and blast furnace operation rate, the cement industry is dominated by natural gas usage and clinker output, and the chemical industry presents different emission timing characteristics due to device operation load fluctuations and equipment maintenance cycles. The current traditional carbon emission prediction method cannot solve the core contradiction of "industry heterogeneity", resulting in a significant gap between prediction accuracy and actual application needs.
[0035] From the perspective of data processing, the traditional method adopts the "global unified preprocessing" mode, without considering the data distribution differences of different industries: the global 3σ principle is generally used for the treatment of outliers, but if the "raw coal usage abnormal threshold" of the steel industry is equated with that of the electronics industry, it is easy to mistakenly delete the reasonable high consumption data of the steel industry; the missing value filling relies on the global mean, ignoring the correlation of the same period data of the same industry and the same scale enterprises, resulting in a large deviation of the filled data from the actual industry; the data normalization does not distinguish the dimension characteristics of different industries, and the cross-industry data mixing further weakens the effectiveness of the features.
[0036] At the feature construction and modeling level, the traditional method has three limitations: first, the multi-source feature fusion is insufficient, only using energy consumption or time series data, without digging the deep correlation of "industry attribute-energy consumption-time trend", for example, the coupling relationship of "cement industry-central heating-seasonal peak season" is not converted into effective features; second, the time series modeling is rough, and the fixed order lag feature is used (such as using the emission data of the previous year by default), without combining with the industry production cycle to design time series rules, which cannot capture the exclusive rules of the chemical industry 2-year maintenance cycle, the cement industry peak season, etc.; third, the model adaptability is poor, using the "global unified modeling" idea to mix the carbon emission data of steel, cement, chemical and other industries for training, treating different industries equally, which leads to the model unable to adapt to the industry-specific driving mechanism, resulting in large prediction deviation. In addition, existing models are mostly "black box" structures, only outputting prediction values, and cannot explicitly identify the core carbon emission influencing factors of each industry, for example, it is difficult to quantify the contribution difference of raw coal usage in the steel industry and natural gas consumption in the cement industry, making it difficult to guide the industry to carry out targeted emission reduction.
[0037] In summary, the existing carbon emission prediction method lacks the ability to analyze the "industry heterogeneity", and has systematic defects in data preprocessing, feature construction, model adaptation and result interpretation, which cannot meet the prediction needs of high-precision, explainable and industry-adapted carbon emission of high-energy-consuming enterprises.
[0038] In view of this, the present application introduces an industry identifier, so that the carbon emission prediction model can make targeted prediction according to the industry identifier, improving the accuracy of prediction. At the same time, the prediction result output by the carbon emission prediction model includes a carbon emission index, which represents the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emission, so that users can intuitively perceive the influence of each type of energy on carbon emission, improving the user perception.
[0039] In an exemplary embodiment, as shown in Figure 2 , a carbon emission prediction method is provided, which is applied to a terminal in Figure 1 for example, including the following steps 201 to 202.
[0040] Step 201, obtaining input data.
[0041] In this application, the input data refers to the data input to the carbon emission prediction model, and the input data can include industry identification, energy consumption data of the institution and historical carbon emissions of the institution, wherein the industry identification is used to represent the industry to which the input data corresponds, such as: steel industry, coal industry, manufacturing industry, handicraft industry, agriculture, etc., the energy consumption data is used to represent the energy consumption of the institution, and the energy data can be divided into multiple types according to the type, such as: water, electricity, raw coal, gasoline, diesel, natural gas, etc., and the historical carbon emissions are used to represent the carbon emissions of the institution in the historical period.
[0042] The energy consumption data of the institution can be a feature sequence, which can be sorted according to the type of energy to construct the energy consumption data. The energy consumption data of the institution can be obtained based on the preprocessing of the initial energy consumption data. The initial energy consumption data can be normalized according to the preset reference data. The reference data can include the energy consumption mean and energy consumption standard deviation corresponding to the industry identification. For example, the initial energy consumption data can be preprocessed according to formula (1):
[0043] Formula (1);
[0044] Wherein, F energy,raw is the original value of the energy feature, μ k,energy , σ k,energy are the mean and standard deviation of the industry corresponding energy feature respectively.
[0045] In the implementation process, the terminal obtains the input data input from the outside. In the execution process, the terminal can obtain the input data in response to the instruction input by the user, or the terminal can receive the input data sent by the external device. Further, after obtaining the input data, the terminal can also transmit the input data to the backend server to execute step 202 through the backend server.
[0046] Further, the input data can also include the lag feature of the carbon emissions of the institution, which is used to represent the time sequence dependence of the historical carbon emissions of the institution on the current emissions. The lag feature of the carbon emissions can be calculated based on the historical carbon emissions, which can be calculated according to formula (2):
[0047] Formula (2);
[0048] Wherein, X clip,t is the corrected carbon emissions of the enterprise in the t year, and p is the lag order; the feature is based on the autocorrelation characteristics of the stationary time series, which can effectively capture the time sequence dependence of the historical emissions of the enterprise on the current emissions.
[0049] Alternatively, the input data can further include an annual carbon emission change rate of the institution, reflecting a dynamic change of the emission trend; the annual carbon emission change rate can be calculated based on the historical carbon emission, which can be calculated according to formula (3):
[0050] Formula (3);
[0051] Wherein, X clip,t is the corrected carbon emission of the enterprise in the tth year, F lag,1 is the lag feature of the carbon emission of the enterprise in the previous year, 10 -6 is a minimum value, used to avoid the problem that the denominator of the carbon emission of the previous year is zero.
[0052] In addition, the input data can further include an interaction feature, which can be constructed by cross-industry identification and carbon emission change, for quantifying the adjustment effect of the industry attribute on the time trend; the interaction feature can be determined based on the industry identification and the carbon emission change rate, which can be calculated according to formula (4):
[0053] Formula (4);
[0054] Wherein, C k is the industry identification, F rate is the carbon emission change rate; the regression coefficient β ind-time of the feature can reflect the adjustment strength of the industry on the time trend.
[0055] Step 202, input the input data into the carbon emission prediction model to obtain the prediction result output by the carbon emission prediction model.
[0056] In the implementation process, the terminal inputs the input data into the carbon emission prediction model, and performs prediction processing based on the industry identification, the energy consumption data of the institution and the historical carbon emission of the institution through the carbon emission prediction model, to obtain the prediction result output by the carbon emission prediction model. Among them, the prediction result can include the predicted carbon emission of the institution in the target time period and the carbon emission index, which can be used to represent the proportion of each type of energy data in the predicted carbon emission, such as: the power consumption accounts for x1% of the predicted carbon emission, the raw coal consumption accounts for x2% of the predicted carbon emission, and the sum of the carbon emission indexes corresponding to each type of energy data is 1.
[0057] In the execution process, the carbon emission prediction model can first calculate the original gain of the energy consumption data and the historical carbon emission, and calculate the carbon emission index according to the preset industry correction coefficient and the original gain.
[0058] Among these methods, carbon emission prediction models can be large language models. During the carbon emission prediction process, industry identifiers can be used as prompts, allowing the model to predict carbon emissions based on these prompts, the institution's energy consumption data, and its historical carbon emissions. This targeted prediction improves accuracy. Alternatively, carbon emission prediction models can be hybrid expert models. In this process, the carbon emission prediction model can first identify an expert model that matches the industry identifier. This expert model then predicts carbon emissions based on the institution's energy consumption data and historical carbon emissions, improving both accuracy and computational efficiency.
[0059] It should be noted that the carbon emission prediction model mentioned above can be based on the XGBoost (eXtreme GradientBoosting) architecture or a neural network architecture; no limitation is made here.
[0060] The aforementioned carbon emission prediction method acquires input data including industry identifiers, institutional energy consumption data, and historical carbon emissions of the institutions. This input data is then fed into the carbon emission prediction model to obtain the prediction results output by the model. Targeted carbon emission prediction through industry identifiers improves the accuracy and reliability of carbon emission prediction. Furthermore, the prediction results include the predicted carbon emissions and carbon emission indicators for the institution within the target time period. The carbon emission indicators characterize the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions. By demonstrating the proportion of each type of energy data in the predicted carbon emissions, users can intuitively see the impact of each type of energy data on carbon emissions, thus improving the targeting of carbon emission prediction and ultimately enhancing the prediction effectiveness.
[0061] Based on the above exemplary embodiment, the following provides a method for predicting carbon emissions in one or more exemplary embodiments, which is applied to... Figure 1 Taking the terminal in the example, the explanation includes the following content.
[0062] In the process of predicting carbon emissions using a carbon emission prediction model, the carbon emission prediction model can be a hybrid expert model. The carbon emission prediction model can determine a quantum prediction model for carbon emissions that matches the industry identifier. The carbon emission prediction is then performed using the quantum prediction model to obtain the prediction result. One optional implementation method provided in this application is as follows: Figure 3 As shown, step 202 includes steps 301 to 302:
[0063] Step 301, input the input data into the carbon emission prediction model, and determine the carbon emission sub-prediction model matched with the industry identifier through the selection layer in the carbon emission prediction model.
[0064] In the implementation process, the carbon emission prediction model can include a plurality of carbon emission sub-prediction models, each carbon emission sub-prediction model can have an association relationship with an industry identifier, and the terminal can input the input data into the carbon emission prediction model. The carbon emission prediction model determines the carbon emission sub-prediction model matched with the industry identifier through the selection layer.
[0065] In the execution process, the correspondence between the industry identifier and the identifier of the carbon emission sub-prediction model can be preset in advance, and the terminal can determine the carbon emission sub-prediction model matched with the industry identifier according to the correspondence.
[0066] Step 302, carbon emission prediction is performed according to the energy consumption data and the historical carbon emission by the carbon emission sub-prediction model, and a prediction result is obtained.
[0067] In the implementation process, the carbon emission sub-prediction model performs carbon emission prediction according to the energy consumption data and the historical carbon emission, and obtains a prediction result; in the execution process, the carbon emission sub-prediction model can first calculate the original gain of the energy consumption data and the historical carbon emission, and calculate the carbon emission index according to the preset industry correction coefficient and the original gain.
[0068] For example, first, the original gain (XGBoost feature importance core index) of each feature in the industry is calculated, referring to formula (5):
[0069] Formula (5);
[0070] Where, G Lm / G Rm is the gradient sum of the left and right child trees of the mth tree, H Lm / H Rm is the Hessian sum of the left and right child trees of the mth tree, and λ k is the regularization coefficient of the industry;
[0071] Further, the industry correction coefficient is introduced to highlight the feature importance of the high variation industry, referring to formula (6):
[0072] Formula (6);
[0073] Where, Var(y k ) is the variance of the industry carbon emission sequence, and the larger the variance, the more critical the industry emission rule, and the higher the weight α k ;
[0074] Further, the carbon emission index is calculated based on the original gain and the industry correction coefficient, which can be referred to formula (7):
[0075] Formula (7);
[0076] Wherein, Contrib kf is the carbon emission index, which can be a data sequence.
[0077] In addition, for the high error industry with improved MAPE (historical error factor) > 8%, a double factor correction prediction value is introduced, which can be referred to formula (8):
[0078] Formula (8);
[0079] In the formula, is the original prediction value, E k is the average improved MAPE of the industry in the past n years, (F kif is the feature f value of sample i, μ kf / σ kf is the mean / standard deviation of the feature f of the industry k), and 0.01 and 0.005 are correction coefficients for balancing the influence of the double factors.
[0080] An optional embodiment provided by the present application is to perform carbon emission prediction by the carbon emission amount sub-prediction model matched with the industry identifier, to perform targeted carbon emission prediction, and to improve the accuracy of the predicted carbon emission amount and carbon emission index.
[0081] In the process of determining the carbon emission amount sub-prediction model, the industry identifier can correspond to multiple carbon emission amount sub-prediction models, and the terminal can determine multiple carbon emission amount sub-prediction models matched with the industry identifier; in an optional embodiment provided by the present application, as shown in Figure 4 step 301 includes step 401:
[0082] Step 401: determining multiple carbon emission amount sub-prediction models matched with the industry identifier by the selection layer.
[0083] In actual scenarios, the industry identifier can represent the industry to which the institution belongs, each carbon emission amount sub-prediction model can correspond to an industry, and different industries can be associated, for example: the oil industry and the coal industry belong to the energy industry, and the carbon emission amount sub-prediction models corresponding to the two can be universal; wherein, the industry corresponding to each carbon emission amount sub-prediction model and the industry corresponding to the industry identifier have an association relationship.
[0084] In the implementation process, the correspondence between the industry identifier and each carbon emission quantity prediction model can be preset, a plurality of carbon emission quantity prediction models can be associated with one industry identifier, and the selection layer included in the carbon emission prediction model can determine a plurality of carbon emission quantity prediction models matched with the industry identifier.
[0085] For example, to solve the problem of insufficient small sample industry data, the industry knowledge of data-rich industries is enriched by cosine similarity migration data, the similarity between industries k1 and k2 is calculated, see formula (9):
[0086] Formula (9);
[0087] Wherein, μ k,fi is the mean value of the feature f i in the industry k. The data-rich industry kl (ks is the small sample industry) is selected Sim k1,k2 > 0.7, the small sample industry feature weight is updated according to the migration weight, see formula (10)-(11):
[0088] Formula (10);
[0089] Formula (11);
[0090] Wherein, n is the industry sample size, is the initial feature weight of the small sample industry, is the corresponding feature weight of the data-rich industry.
[0091] An optional embodiment provided by the application selects a plurality of carbon emission quantity prediction models, and then performs carbon emission prediction by using the plurality of carbon emission quantity prediction models, thereby improving the accuracy of carbon emission prediction.
[0092] In the process of carbon emission prediction, the prediction results of a plurality of carbon emission quantity prediction models can be fused to obtain a prediction result, thereby improving the accuracy of carbon emission prediction. As shown in Figure 5 , the step 302 includes steps 501-502:
[0093] Step 501: performing carbon emission prediction according to energy consumption data and historical carbon emission quantity by using each carbon emission quantity prediction model to obtain a plurality of prediction data.
[0094] In the implementation process, each carbon emission quantity prediction model can perform carbon emission prediction in parallel based on energy consumption data and historical carbon emission quantity to obtain a plurality of prediction data.
[0095] In the execution process, each carbon emission sub-prediction model can perform carbon emission prediction based on the energy consumption data and historical carbon emissions in parallel to obtain prediction data, and transmit the prediction data to the output layer of the carbon emission prediction model.
[0096] At step 502, the output layer of the carbon emission prediction model performs data fusion processing on the prediction data to obtain a prediction result.
[0097] In the implementation process, the output layer of the carbon emission prediction model receives the prediction data transmitted by each carbon emission sub-prediction model, performs data fusion on the prediction data, and obtains a prediction result.
[0098] In the execution process, the output layer can determine a data fusion weight according to the similarity between the industry corresponding to each carbon emission sub-prediction model and the industry corresponding to the industry identifier, and perform data fusion on the prediction data based on the data fusion weight to obtain a prediction result.
[0099] For example, the proportion of the industry in the total carbon emissions is calculated by referring to formula (12):
[0100] Formula (12);
[0101] Further, in combination with the industry prediction confidence, the multi-industry comprehensive prediction value is calculated by referring to formulas (13) and (14):
[0102] Formula (13);
[0103] Formula (14);
[0104] Wherein, is the determination coefficient, and Confk is the industry prediction confidence.
[0105] An optional embodiment provided by the present application obtains a prediction result by fusing the prediction data of multiple carbon emission sub-prediction models, thereby improving the reliability and accuracy of the prediction result. Meanwhile, the running of each carbon emission sub-prediction model is performed in parallel, thereby improving the utilization rate of computing power.
[0106] In actual application, the carbon emission prediction model also needs to be trained and processed. Each carbon emission prediction sub-model can be trained specifically based on the industry. In an optional embodiment provided by the present application, as shown in Figure 6 The training process of the carbon emission prediction model includes steps 601 to 603.
[0107] At step 601, a training data set is obtained.
[0108] In actual scenarios, the multiple sample input data can also be determined through screening. The screening threshold can be calculated according to the average gain of the industry, and the initial sample input data is screened based on the screening threshold to obtain the sample input data. The data greater than or equal to the screening threshold can be screened from the initial sample input data as the sample input data.
[0109] For example, for the industry feature redundancy problem, the key features are dynamically screened based on the feature gain, the average gain of the industry features is calculated, and the formula (15) is referred to:
[0110] Formula (15);
[0111] Wherein, M is the number of iterations, ain kfm is the gain of the feature f to the industry k model in the mth iteration, and the mean value Gaink and the standard deviation σ Gain,k of the industry feature gain are calculated again. The screening threshold is set, and the formula (16) is referred to:
[0112] Formula (16);
[0113] Further, the redundant features of Gain kf <τk are removed, the key features of Gain kf ≥τk are retained, the input dimension is reduced by about 20%, and the model accuracy and training efficiency are balanced.
[0114] In addition, the label data can also be preprocessed. The carbon emission data can be grouped according to the industry to obtain X k ={x k1 ,x k2 ,…,x kn} (n is the sample size of the industry k), and the linear interpolation method is used to calculate the α=0.02 and α=0.98 quantile Q k,α , see formula (17):
[0115] Formula (17);
[0116] In the formula: 、 are the i, jth sample values of the industry k sorted in ascending order according to the “total carbon emission”, respectively, is the floor function, is the ceiling function; only the extreme abnormal values exceeding the range are truncated to obtain the corrected carbon emission data , avoid reasonable data deletion; further, for the long tail distribution characteristics of carbon emission data, log1p logarithmic transformation is used to convert the asymmetric distribution into approximate normal distribution, see formula (18):
[0117] Formula (18);
[0118] In the formula: is the carbon emissions of industry k after outlier truncation; the variance of the transformed data satisfies is the mean of the truncated data), through variance compression, reduce the interference of extreme value on model training, and improve the convergence efficiency of subsequent modeling.
[0119] In addition, the preprocessed data can also be sorted, and the training set and test set can also be further divided; in the execution process, the "time series division + industry differentiated hyperparameter" strategy can be used to realize the precise adaptation of the model to the characteristics of the industry data, which is based on the XGBoost regularization objective function and the TimeSeriesSplit theory. The unique year set Y={y1,y2,…,ym} can be extracted in ascending order of "year", and the division year y split is determined according to the test set ratio r=0.2, see formula (19):
[0120] Formula (19);
[0121] Where, is the number of unique years, is the floor function; the training set contains samples with year≤ , and the test set contains samples with year> , to avoid future information leakage.
[0122] In the implementation process, the training data set after data preprocessing is obtained. The training data set includes a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data. The sample input data includes sample energy consumption data and sample historical carbon emissions, and the label data includes label carbon emissions.
[0123] In addition, the preprocessed label data can be further changed and screened to obtain label data; in the execution process, the carbon emission sequence of each industry can be subjected to stationarity test (ADF test), and if the sequence is non-stationary (has trend or periodicity), it is converted into a stationary sequence by first-order difference, see formula (20):
[0124] Formula (20);
[0125] Where, This represents the stabilized carbon emission sequence. Let t be the emission value of the t-th sample in industry k; then calculate the p-th order autocorrelation coefficient of the stationary series (p∈[1,5]) to quantify the time-series dependence strength, see formula (21):
[0126] Formula (21);
[0127] in, Let the mean of the emission series for industry k be denoted as k. Then, set the autocorrelation coefficient threshold τ = 0.3 (covering more than 90% of the effective time series information), and select the maximum p satisfying ACF(p) > τ as the optimal lag order for industry k. See formula (22):
[0128] Formula (22);
[0129] For any p, ACF(p) > τ is not satisfied; by default... It also generates early warning information. Finally, it outputs warnings to various industries. This is used to set the order of subsequent hysteresis features.
[0130] In addition, the industry weighting coefficient ωk can be calculated to balance the sample contributions of different industries, see formula (23):
[0131] Formula (23);
[0132] In the formula: Let k be the sample size for the industry. For industry volatility coefficient, 2- This is used to reduce the weight of high-volatility industries and avoid outlier interference. Next, a volatility penalty term and an industry-specific regularization coefficient are introduced to construct the industry-weighted loss function, see formula (24):
[0133] ;
[0134] Formula (24);
[0135] In the formula: θ is the set of model parameters. Let γ be the true value / predicted value of the i-th sample in industry k, γ be the tree complexity regularization coefficient, and T be the number of decision trees. The leaf node weights are denoted by δ = 0.05, which is the fluctuation penalty coefficient. This function... Balancing industry contributions, through The addition of a volatility penalty term enhances the noise resistance of highly volatile industries and provides a customized optimization objective for subsequent model training.
[0136] Step 602: For each industry, determine the model complexity based on sample energy consumption data, select an initial carbon emission prediction sub-model that matches the model complexity, and train the initial carbon emission prediction sub-model based on sample energy consumption data, sample historical carbon emissions, and labeled carbon emissions to obtain the carbon emission prediction sub-model.
[0137] During implementation, for the training process of the initial carbon emission prediction sub-model corresponding to each industry, the model training equipment first determines the model complexity based on the sample energy consumption data, and selects the initial carbon emission prediction sub-model that matches the model complexity. Then, based on the sample energy consumption data, the sample historical carbon emissions, and the labeled carbon emissions, the initial carbon emission prediction sub-model is trained to obtain the carbon emission prediction sub-model.
[0138] In the process of determining complexity, the variance and mean can be determined based on the industry's preset reference energy consumption data, the industry coefficient can be calculated based on the variance and mean, and the complexity of the initial carbon emission prediction sub-model corresponding to the industry can be determined based on the industry coefficient.
[0139] For example, first define the industry volatility coefficient Vk to quantify data stability, see formula (25):
[0140] Formula (25);
[0141] In the formula: , These represent the variance and mean of the industry's k-standardized energy characteristics, respectively.
[0142] Furthermore, it can also be based on Dynamically adjust XGBoost hyperparameters to ensure model complexity adapts to industry characteristics, initialize basic XGBoost parameters, and use 3-fold TimeSeriesSplit cross-validation to evaluate the logarithmic predictions of the model output. Perform the inverse transformation to obtain the model's prediction results, see formula (26):
[0143] Formula (26).
[0144] During the training of the sub-model, the sample energy consumption data and the sample historical carbon emissions can be output as the initial carbon emission prediction sub-model. Carbon emission prediction is performed based on the initial carbon emission prediction sub-model to obtain the prediction data. The loss is calculated based on the prediction data and the labeled carbon emissions. The model parameters are adjusted based on the loss until the loss converges.
[0145] For example, the rate of change of the validation set RMSE of the industry can be calculated at the end of each training round, referring to formula (27):
[0146] Equation (27);
[0147] wherein: , RMSE of the t-th round and the t-1-th round of the industry k, according to k The learning rate is dynamically adjusted, and Equation (28) is referred to:
[0148] Equation (28);
[0149] The upper and lower limits of the learning rate are set as 0.001 ≤ 0.1 to avoid convergence stagnation or parameter oscillation. In combination with 3-fold TimeSeriesSplit cross-validation, it is ensured that the parameter adjustment conforms to the time sequence logic and does not leak future information.
[0150] Further, the selection layer and the output layer can be trained, and in addition, since the algorithms of the selection layer and the output layer are relatively mature, suitable algorithms can be directly selected and packaged into the carbon emission prediction model.
[0151] In step 603, the carbon emission prediction model is obtained according to the carbon emission prediction sub-models, the selection layer, and the output layer.
[0152] In the implementation process, the terminal constructs the carbon emission prediction model according to the carbon emission prediction sub-models, the selection layer, and the output layer. In the execution process, the selection layer can be used as the next layer of the output layer, and the carbon emission prediction sub-models can be arranged side by side as the next layer, and then the output layer is connected at the same time.
[0153] An optional embodiment provided in the present application improves the model training efficiency by training the carbon emission prediction sub-models respectively, and improves the training pertinence by determining the complexity of the model in advance according to the industry situation, saves the calculation power consumption in the training process, and improves the calculation power utilization rate.
[0154] In the actual scene, some data in the training sample may have a large gap from the mean, which affects the model training effect. In response to this, the abnormal training data can be corrected to obtain the sample historical carbon emission. As shown in Figure 7 an optional embodiment provided in the present application, the correction of the training data includes steps 701 to 702:
[0155] In step 701, the initial sample historical carbon emission corresponding to the historical time period is obtained, and a data correction index corresponding to the initial sample historical carbon emission is calculated.
[0156] In the implementation process, the model training device obtains initial sample historical carbon emission amount corresponding to a historical time period, and calculates a mean value corresponding to the initial sample historical carbon emission amount, calculates an upper threshold value (first threshold value) and a lower threshold value (second threshold value) according to the mean value, and determines the carbon emission change rate according to the mean value, the upper threshold value and the lower threshold value. Optionally, the data correction index includes the first threshold value, the second threshold value and the carbon emission change rate.
[0157] In step 702, the initial sample historical carbon emission amount is data-corrected based on the data correction index to obtain sample historical carbon emission amount.
[0158] In the implementation process, the model training device data-corrects the initial sample historical carbon emission amount based on the data correction index to obtain corrected sample data, replaces the initial sample historical carbon emission amount based on the corrected sample data, and obtains sample historical carbon emission amount.
[0159] An optional embodiment provided in the present application corrects abnormal data in the initial sample historical carbon emission amount, ensures the number of training data, corrects abnormal data in the training data, improves the usability of the training data, and further improves the reliability of the model obtained by training.
[0160] In the calculation process of the data correction index, data can be selected according to the first threshold value and the second threshold value, and sample data can be selected according to a fixed time interval to calculate the carbon emission change rate; in an optional embodiment provided in the present application, as shown in Figure 8 Step 701 includes steps 801 to 803.
[0161] In step 801, the mean value and the standard deviation of the initial sample historical carbon emission amount are calculated, and the first threshold value and the second threshold value are calculated based on the mean value and the standard deviation.
[0162] In the implementation process, the model training device calculates the mean value and the standard deviation of the initial sample historical carbon emission amount, and calculates the first threshold value (upper threshold value) and the second threshold value (lower threshold value) based on the mean value and the standard deviation.
[0163] For example, the first threshold value can be calculated according to formula (29), and the second threshold value can be calculated based on formula (30):
[0164] Formula (29);
[0165] Formula (30);
[0166] Wherein, the mean value is and the standard deviation is , the first threshold value (upper threshold value) is Upper k , and the second threshold value (lower threshold value) is Lowerk .
[0167] Step 802, screening a plurality of target sample historical carbon emissions from the initial sample historical carbon emissions, which are greater than a first threshold value or less than a second threshold value.
[0168] In the implementation process, the model training device screens first data with carbon emissions greater than a first threshold value (upper threshold value) and second data with carbon emissions less than a second threshold value (lower threshold value) from the initial sample historical carbon emissions, and determines the first data and the second data as the plurality of target sample historical carbon emissions.
[0169] Step 803, calculating a plurality of carbon emission change rates according to first sample historical carbon emissions and second sample historical carbon emissions in each target sample historical carbon emission.
[0170] In the implementation process, the model training device selects a plurality of sample historical carbon emission groups, each sample historical carbon emission group including a first sample historical carbon emission and a second sample historical carbon emission, calculates a carbon emission change rate for each sample historical carbon emission group, and obtains a plurality of carbon emission change rates. The sampling time of the first sample historical carbon emission and the sampling time of the second sample historical carbon emission have a time interval.
[0171] For example, the carbon emission change rate can be calculated according to formula (31):
[0172] Formula (31);
[0173] Wherein, , are respectively the industry carbon emission values at the current time and the previous two times.
[0174] Further, the abnormal sample value can be corrected according to the change rate and the mean value. For example, refer to formula (32):
[0175] Formula (32).
[0176] An optional embodiment provided by the present application corrects the training sample by correcting the initial sample historical carbon emissions after screening, corrects by the carbon emission change rate, improves the reliability of the data, and further improves the reliability of the model obtained by training.
[0177] In one embodiment, referring to Figure 9 , a flowchart of a carbon emission prediction method provided by an embodiment of the present application is shown, which can be applied to a terminal as shown in Figure 1 . As shown in Figure 9 , the carbon emission prediction method can include the following steps:
[0178] At step 901, input data is acquired.
[0179] At step 902, the input data is input into the carbon emission prediction model, and a plurality of carbon emission sub-prediction models matching the industry identifier are determined through a selection layer in the carbon emission prediction model.
[0180] At step 903, carbon emission prediction is performed through each carbon emission sub-prediction model according to the energy consumption data and the historical carbon emission, and a plurality of prediction data are obtained.
[0181] At step 904, data fusion processing is performed according to each prediction data through an output layer of the carbon emission prediction model, and a prediction result is obtained.
[0182] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps. It can be understood that each step in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.
[0183] Based on the same inventive concept, the present embodiment also provides a carbon emission prediction device for implementing the above-mentioned carbon emission prediction method. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more carbon emission prediction device embodiments provided below can refer to the limitations of the carbon emission prediction method in the above text, and will not be repeated here.
[0184] In one exemplary embodiment, as Figure 10As shown, a carbon emission prediction device is provided, comprising: an input data acquisition module 1001 and a carbon emission prediction module 1002, wherein: the input data acquisition module 1001 is configured to acquire input data, the input data comprising an industry identifier, energy consumption data of an institution, and historical carbon emissions of the institution; the carbon emission prediction module 1002 is configured to input the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; wherein the prediction result comprises predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
[0185] In one embodiment, the carbon emission prediction module 1001 comprises a carbon emission sub-prediction model determination unit and a prediction unit, wherein: the carbon emission sub-prediction model determination unit is configured to input the input data into the carbon emission prediction model, and determine a carbon emission sub-prediction model matching the industry identifier through a selection layer in the carbon emission prediction model; the prediction unit is configured to perform carbon emission prediction according to the energy consumption data and the historical carbon emissions through the carbon emission sub-prediction model to obtain the prediction result.
[0186] In one embodiment, the carbon emission sub-prediction model determination unit comprises a matching unit, the matching unit being configured to determine a plurality of carbon emission sub-prediction models matching the industry identifier through the selection layer; the industry corresponding to each carbon emission sub-prediction model is associated with the industry corresponding to the industry identifier.
[0187] In one embodiment, the prediction unit comprises a first prediction unit and a fusion unit, wherein: the first prediction unit is configured to perform carbon emission prediction according to the energy consumption data and the historical carbon emissions through each carbon emission sub-prediction model to obtain a plurality of prediction data; the fusion unit is configured to perform data fusion processing according to each prediction data through an output layer of the carbon emission prediction model to obtain the prediction result.
[0188] In one embodiment, the device further comprises a training data set acquisition module, a model training module, and a model construction module, wherein: the training data set acquisition module is configured to acquire a training data set, the training data set comprising a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data comprising sample energy consumption data and sample historical carbon emissions, and the label data comprising a label carbon emission; the model training module is configured to determine a model complexity based on the sample energy consumption data for each industry, select an initial carbon emission prediction sub-model matching the model complexity, and train the initial carbon emission prediction sub-model according to the sample energy consumption data, the sample historical carbon emissions, and the label carbon emission to obtain a carbon emission prediction sub-model; and the model construction module is configured to acquire the carbon emission prediction model according to each carbon emission prediction sub-model, the selection layer, and the output layer.
[0189] In one of the embodiments, the device further comprises a correction index calculation module and a correction module, wherein: the correction index calculation module is configured to obtain initial sample historical carbon emissions corresponding to a historical time period, and calculate a data correction index corresponding to the initial sample historical carbon emissions; and the correction module is configured to correct the initial sample historical carbon emissions based on the data correction index to obtain sample historical carbon emissions.
[0190] In one of the embodiments, the correction index calculation module comprises a threshold calculation unit, a data screening unit and a carbon emission change amount calculation unit, wherein: the threshold calculation unit is configured to calculate a mean value and a standard deviation of the initial sample historical carbon emissions, and calculate a first threshold value and a second threshold value based on the mean value and the standard deviation; the data screening unit is configured to screen a plurality of target sample historical carbon emissions with carbon emissions greater than the first threshold value or less than the second threshold value from the initial sample historical carbon emissions; and the carbon emission change amount calculation unit is configured to calculate a plurality of carbon emission change rates according to a first sample historical carbon emission and a second sample historical carbon emission in each target sample historical carbon emission, the sampling time of the first sample historical carbon emission and the sampling time of the second target sample historical carbon emission having a time interval.
[0191] Each module in the above-mentioned carbon emission prediction device can be realized by software, hardware and combinations thereof in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0192] In one exemplary embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 11The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured 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 and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, Near Field Communication (NFC) or other technologies. The computer program is executed by the processor to implement a carbon emission prediction method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0193] Those skilled in the art can understand that, Figure 11 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0194] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps: obtaining input data, the input data including industry identification, energy consumption data of an institution and historical carbon emissions of the institution; inputting the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; wherein the prediction result includes predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent the proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
[0195] In an embodiment, the processor, when executing the computer program, further implements the following steps: inputting the input data into the carbon emission prediction model, determining, by the selection layer in the carbon emission prediction model, a carbon emission sub-prediction model matched with the industry identifier; and performing carbon emission prediction according to the energy consumption data and the historical carbon emission by the carbon emission sub-prediction model to obtain the prediction result.
[0196] In an embodiment, the processor, when executing the computer program, further implements the following steps: determining, by the selection layer, a plurality of carbon emission sub-prediction models matched with the industry identifier; and the industry corresponding to each carbon emission sub-prediction model having a correlation relationship with the industry corresponding to the industry identifier.
[0197] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing carbon emission prediction according to the energy consumption data and the historical carbon emission by each carbon emission sub-prediction model to obtain a plurality of prediction data; and performing data fusion processing according to each prediction data by the output layer of the carbon emission prediction model to obtain the prediction result.
[0198] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining a training data set, the training data set including a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data including sample energy consumption data and sample historical carbon emission, and the label data including label carbon emission; for each industry, determining a model complexity based on the sample energy consumption data, selecting an initial carbon emission prediction sub-model matched with the model complexity, and training the initial carbon emission prediction sub-model according to the sample energy consumption data, the sample historical carbon emission and the label carbon emission to obtain a carbon emission prediction sub-model; and obtaining the carbon emission prediction model according to each carbon emission prediction sub-model, the selection layer and the output layer.
[0199] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining an initial sample historical carbon emission corresponding to a historical time period, and calculating a data correction index corresponding to the initial sample historical carbon emission; and performing data correction on the initial sample historical carbon emission based on the data correction index to obtain the sample historical carbon emission.
[0200] In an embodiment, the processor, when executing the computer program, further implements the following steps: calculating a mean value and a standard deviation of the initial sample historical carbon emissions, calculating a first threshold value and a second threshold value based on the mean value and the standard deviation; screening a plurality of target sample historical carbon emissions greater than the first threshold value or less than the second threshold value from the initial sample historical carbon emissions; calculating a plurality of carbon emission change rates according to a first sample historical carbon emission and a second sample historical carbon emission in each target sample historical carbon emission, the first sample historical carbon emission and the second sample historical carbon emission having a time interval between sampling times.
[0201] In an embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program, when executed by a processor, implements the following steps: obtaining input data, the input data including an industry identifier, energy consumption data of an institution, and historical carbon emissions of the institution; inputting the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; and wherein the prediction result includes predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent a proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
[0202] In an embodiment, the processor, when executing the computer program, further implements the following steps: inputting the input data into the carbon emission prediction model, determining a carbon emission sub-prediction model matched with the industry identifier through a selection layer in the carbon emission prediction model; and performing carbon emission prediction according to the energy consumption data and the historical carbon emissions through the carbon emission sub-prediction model to obtain the prediction result.
[0203] In an embodiment, the processor, when executing the computer program, further implements the following steps: determining a plurality of carbon emission sub-prediction models matched with the industry identifier through the selection layer; and the industry corresponding to each carbon emission sub-prediction model having a correlation relationship with the industry corresponding to the industry identifier.
[0204] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing carbon emission prediction according to the energy consumption data and the historical carbon emissions through each carbon emission sub-prediction model to obtain a plurality of prediction data; and performing data fusion processing according to each prediction data through an output layer of the carbon emission prediction model to obtain the prediction result.
[0205] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining a training data set, the training data set comprising a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data comprising sample energy consumption data and sample historical carbon emissions, and the label data comprising label carbon emissions; for each industry, determining a model complexity based on the sample energy consumption data, selecting an initial carbon emissions prediction sub-model matching the model complexity, and training the initial carbon emissions prediction sub-model based on the sample energy consumption data, the sample historical carbon emissions, and the label carbon emissions to obtain a carbon emissions prediction sub-model; and obtaining the carbon emissions prediction model based on the carbon emissions prediction sub-models, a selection layer, and an output layer.
[0206] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining an initial sample historical carbon emission corresponding to a historical time period, and calculating a data correction index corresponding to the initial sample historical carbon emission; and performing data correction on the initial sample historical carbon emission based on the data correction index to obtain a sample historical carbon emission.
[0207] In an embodiment, the processor, when executing the computer program, further implements the following steps: calculating a mean value and a standard deviation of the initial sample historical carbon emission, and calculating a first threshold value and a second threshold value based on the mean value and the standard deviation; selecting a plurality of target sample historical carbon emissions with carbon emissions greater than the first threshold value or less than the second threshold value from the initial sample historical carbon emissions; and calculating a plurality of carbon emission change rates based on a first sample historical carbon emission and a second sample historical carbon emission in each target sample historical carbon emission, the first sample historical carbon emission and the second sample historical carbon emission having a time interval between sampling times.
[0208] In an embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: obtaining input data, the input data comprising an industry identifier, energy consumption data of an institution, and historical carbon emissions of the institution; and inputting the input data into a carbon emissions prediction model to obtain a prediction result output by the carbon emissions prediction model; wherein the prediction result comprises predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent a proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
[0209] In an embodiment, the processor, when executing the computer program, further implements the following steps: inputting the input data into the carbon emissions prediction model, determining a carbon emissions sub-prediction model matching the industry identifier through a selection layer in the carbon emissions prediction model; and performing carbon emission prediction based on the energy consumption data and the historical carbon emissions through the carbon emissions sub-prediction model to obtain the prediction result.
[0210] In an embodiment, the processor, when executing the computer program, further implements the following steps: determining, by the selection layer, a plurality of carbon emission sub-prediction models matching the industry identifier; and the industry corresponding to each carbon emission sub-prediction model has a correlation with the industry corresponding to the industry identifier.
[0211] In an embodiment, the processor, when executing the computer program, further implements the following steps: performing, by each carbon emission sub-prediction model, carbon emission prediction according to the energy consumption data and the historical carbon emission, to obtain a plurality of prediction data; and performing, by the output layer of the carbon emission prediction model, data fusion processing according to each prediction data, to obtain a prediction result.
[0212] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining a training data set, the training data set including a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data including sample energy consumption data and sample historical carbon emission, and the label data including label carbon emission; for each industry, determining a model complexity based on the sample energy consumption data, selecting an initial carbon emission sub-prediction model matching the model complexity, and training the initial carbon emission sub-prediction model according to the sample energy consumption data, the sample historical carbon emission, and the label carbon emission, to obtain a carbon emission sub-prediction model; and obtaining the carbon emission prediction model according to each carbon emission sub-prediction model, the selection layer, and the output layer.
[0213] In an embodiment, the processor, when executing the computer program, further implements the following steps: obtaining an initial sample historical carbon emission corresponding to a historical time period, and calculating a data correction index corresponding to the initial sample historical carbon emission; and performing data correction on the initial sample historical carbon emission based on the data correction index, to obtain a sample historical carbon emission.
[0214] In an embodiment, the processor, when executing the computer program, further implements the following steps: calculating a mean value and a standard deviation of the initial sample historical carbon emission, calculating a first threshold value and a second threshold value based on the mean value and the standard deviation; screening a plurality of target sample historical carbon emissions with carbon emission greater than the first threshold value or less than the second threshold value from the initial sample historical carbon emission; calculating a plurality of carbon emission change rates according to a first sample historical carbon emission and a second sample historical carbon emission in each target sample historical carbon emission, the sampling time of the first sample historical carbon emission and the sampling time of the second sample historical carbon emission having a time interval.
[0215] It should be noted that the data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with relevant regulations.
[0216] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to 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. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0217] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0218] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method of predicting carbon emissions, characterized by, The method comprises: obtaining input data, the input data comprising an industry identifier, energy consumption data of an institution, and historical carbon emissions of the institution; inputting the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; wherein the prediction result comprises predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent a proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions.
2. The method of claim 1, wherein, The inputting of the input data into the carbon emission prediction model to obtain the prediction result output by the carbon emission prediction model comprises: inputting the input data into the carbon emission prediction model to determine, through a selection layer in the carbon emission prediction model, a carbon emission sub-prediction model matched with the industry identifier; performing carbon emission prediction through the carbon emission sub-prediction model according to the energy consumption data and the historical carbon emissions to obtain the prediction result.
3. The method of claim 2, wherein, The determination of the carbon emission sub-prediction model matched with the industry identifier through the selection layer in the carbon emission prediction model comprises: determining, through the selection layer, a plurality of carbon emission sub-prediction models matched with the industry identifier; each carbon emission sub-prediction model corresponds to an industry that has a correlation with an industry corresponding to the industry identifier.
4. The method of claim 3, wherein, The carbon emission prediction through the carbon emission sub-prediction model according to the energy consumption data and the historical carbon emissions to obtain the prediction result comprises: performing carbon emission prediction through each carbon emission sub-prediction model according to the energy consumption data and the historical carbon emissions to obtain a plurality of prediction data; performing data fusion processing according to each prediction data through an output layer of the carbon emission prediction model to obtain the prediction result.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: obtaining a training data set comprising a plurality of sample input data corresponding to each industry and label data corresponding to each sample input data, the sample input data comprising sample energy consumption data and sample historical carbon emissions, and the label data comprising a label carbon emission; for each industry, determining a model complexity based on the sample energy consumption data, selecting an initial carbon emission prediction sub-model matched with the model complexity, training the initial carbon emission prediction sub-model according to the sample energy consumption data, the sample historical carbon emissions, and the label carbon emission to obtain a carbon emission prediction sub-model; obtaining the carbon emission prediction model according to each carbon emission prediction sub-model, a selection layer, and an output layer.
6. The method of claim 5, wherein, The method further comprises: obtaining an initial sample historical carbon emission corresponding to a historical time period and calculating a data correction index corresponding to the initial sample historical carbon emission; performing data correction on the initial sample historical carbon emission based on the data correction index to obtain the sample historical carbon emission.
7. The method of claim 6, wherein, The data correction index comprises a first threshold, a second threshold, and a carbon emission change rate, and the calculation of the data correction index corresponding to the initial sample historical carbon emission comprises: calculate a mean value and a standard deviation of the initial sample historical carbon emissions, calculate the first threshold value and the second threshold value based on the mean value and the standard deviation; screen a plurality of target sample historical carbon emissions greater than the first threshold value or less than the second threshold value from the initial sample historical carbon emissions; calculate a plurality of carbon emission change rates according to a first sample historical carbon emission and a second sample historical carbon emission in each of the target sample historical carbon emissions, the first sample historical carbon emission and the second sample historical carbon emission having a time interval between sampling times.
8. A carbon emission amount prediction device characterized by comprising: The device comprises: an input data acquisition module configured to acquire input data, the input data comprising an industry identifier, energy consumption data of an institution, and historical carbon emissions of the institution; a carbon emission prediction module configured to input the input data into a carbon emission prediction model to obtain a prediction result output by the carbon emission prediction model; wherein the prediction result comprises predicted carbon emissions of the institution in a target time period and a carbon emission index, the carbon emission index being used to represent a proportion of each type of energy data in the energy consumption data relative to the predicted carbon emissions. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.