Carbon emission prediction method and device based on double models

Through the dual-model method, the strongest model is screened using the data quality and prediction performance of the target parameters, and the problem of low prediction accuracy in traditional methods is solved, and high-precision carbon emission prediction in different business scenarios is achieved.

CN118982138APending Publication Date: 2024-11-19XINAO SHUNENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410989391.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The traditional carbon emission forecasting method is based on a single model and cannot effectively consider the data quality differences in different business scenarios, resulting in low prediction accuracy and the impact of other factors on carbon emission data cannot be fully considered.

Method used

Using the dual model method, the first model and the second model use the target parameters to predict the influence of future carbon emissions and the carbon emission changes laws, and the strongest model in the prediction cycle is selected as the online Prediction model, providing accurate carbon emission forecast results.

Benefits of technology

It improves the accuracy and adaptability of carbon emission forecasting, and can adaptively select the strongest model in different business scenarios to provide higher-precision carbon emission forecasting results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982138A_ABST
    Figure CN118982138A_ABST
Patent Text Reader

Abstract

The invention discloses a carbon emission prediction method and device based on double models, and the method comprises the steps: determining the prediction performances of a first model and a second model in a first prediction period according to the data quality of a target parameter in the first prediction period; in the nth prediction period, based on the carbon emission prediction results of the first model and the second model in the (n-1) th prediction period, determining the prediction performance of the first model and the second model in the nth prediction period; and for each prediction period, screening the model with the strongest prediction performance in the prediction period from the first model and the second model, and determining the model as an online prediction model. According to the method, for each prediction period, the model with the strongest prediction performance in the prediction period is screened from the first model and the second model, carbon emission prediction tasks under different business scenes can be adapted, and it is ensured that a client obtains a carbon emission prediction result with higher precision by screening the online prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of carbon emissions, and in particular to a carbon emissions prediction method and device based on a dual model. Background Art

[0002] Carbon emission forecasting can help organizations such as park management committees formulate relevant policies and plans to reduce carbon emissions and achieve the goal of mitigating climate change. For enterprises, understanding their own carbon emission trends can help them formulate more effective environmental protection strategies, reduce energy costs, improve resource utilization efficiency, and adapt to environmental regulations that may emerge in the future. Carbon emission forecasting helps to raise environmental awareness, promote sustainable development, and bring long-term economic, environmental and social benefits to governments, enterprises and society.

[0003] Traditional carbon emission prediction methods are mostly based on time series statistical models or other single models, without considering different business scenarios (such as industry, construction, parks, etc.). Due to the huge differences in data quality, single model prediction data either makes a fuss and has high latency, or has a single parameter and cannot fully consider the impact of other factors on carbon emission data, resulting in low prediction accuracy. Summary of the invention

[0004] The present application provides a carbon emission prediction method and device based on a dual model, the purpose of which is to accurately predict carbon emissions in different business scenarios.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A carbon emission prediction method based on a dual model, comprising:

[0007] When in the first prediction cycle, the prediction performance of the first model and the second model in the first prediction cycle is determined according to the data quality of the target parameter; the first model is used to predict future carbon emission data by using the influence of the target parameter on future carbon emissions; the second model is used to predict future carbon emission data by using the carbon emission variation law related to the target parameter;

[0008] When in the nth prediction period, based on the carbon emission prediction results of the first model and the second model in the n-1th prediction period, the prediction performance of the first model and the second model in the nth prediction period is determined; n is an integer greater than 1;

[0009] For each prediction cycle, the model with the strongest prediction performance within the prediction cycle is selected from the first model and the second model and determined as the online prediction model; the online prediction model is used to provide the client with the carbon emission prediction result of the prediction cycle.

[0010] Optionally, determining the prediction performance of the first model and the second model in the first prediction cycle according to the data quality of the target parameter includes:

[0011] Determine the data quality of target parameters based on historical carbon emissions data and reference data related to carbon emissions;

[0012] If the data quality meets the preset standard, determining that the prediction performance of the first model in the first prediction period is better than the prediction performance of the second model in the first prediction period;

[0013] If the data quality does not meet the preset standard, it is determined that the prediction performance of the first model in the first prediction period is weaker than the prediction performance of the second model in the first prediction period.

[0014] Optionally, determine the data quality of the target parameters based on historical carbon emissions data and reference data related to carbon emissions, including:

[0015] Obtain data preprocessing results of historical carbon emission data and reference data related to carbon emission; the data preprocessing results include the effective data volume of target parameters; the target parameters include at least daily carbon emission, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day;

[0016] When the effective data amount of the target parameter meets the first condition, determining that the data quality of the target parameter meets the preset standard;

[0017] The first situation includes one of the following:

[0018] The effective data volume of the daily carbon emissions, the actual daily product output, and the future daily planned product output all meet the preset requirements;

[0019] The effective data volume of the daily carbon emissions meets the preset requirements, and the effective data volume of either the operation ratio or the scheduling day meets the preset requirements.

[0020] Optionally, the method further includes:

[0021] When the effective data amount of the target parameter meets the second condition, determining that the data quality of the target parameter does not meet the preset standard;

[0022] The second situation includes one of the following:

[0023] The amount of valid data of the daily carbon emissions does not meet the preset requirements;

[0024] The valid data volume of the daily carbon emissions meets the preset requirements, and the valid data volume of the operation ratio and the scheduling day do not meet the preset requirements, and the valid data volume of either the actual daily product output or the future daily planned product output does not meet the preset requirements.

[0025] Optionally, determining the prediction performance of each of the first model and the second model in the n-1th prediction period based on the carbon emission prediction results of each of the first model and the second model in the n-1th prediction period includes:

[0026] Obtain the actual carbon emission data for the n-1th forecast period;

[0027] Determine a first score based on the carbon emission prediction result of the first model in the (n-1)th prediction period and the actual carbon emission data;

[0028] Determine a second score based on the carbon emission prediction result of the second model in the (n-1)th prediction period and the actual carbon emission data;

[0029] Based on the first score and the second score, a prediction performance of each of the first model and the second model in the nth prediction period is determined.

[0030] Optionally, determining the prediction performance of each of the first model and the second model in the nth prediction period based on the first score and the second score includes:

[0031] If the first score is higher than the second score, determining that the prediction performance of the first model in the nth prediction period is better than the prediction performance of the second model in the nth prediction period;

[0032] If the first score is lower than the second score, it is determined that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

[0033] Optionally, the first score and the second score each contain the same scoring indicators. If the number of scoring indicators that meet preset conditions in the first score meets a specified threshold, it is determined that the first score is higher than the second score; if the number of scoring indicators that meet the preset conditions in the first score does not meet the specified threshold, it is determined that the first score is lower than the second score; wherein the preset condition is: the indicator value is higher than the indicator value of the same scoring indicator in the second score.

[0034] A carbon emission prediction device based on a dual model, comprising:

[0035] A first performance evaluation unit is used to determine the prediction performance of the first model and the second model in the first prediction period according to the data quality of the target parameter when in the first prediction period; the first model is used to predict future carbon emission data by using the influence of the target parameter on future carbon emission; the second model is used to predict future carbon emission data by using the carbon emission variation law related to the target parameter;

[0036] a second performance evaluation unit, for determining, when in an nth prediction period, the prediction performance of each of the first model and the second model in the nth prediction period based on the carbon emission prediction results of each of the first model and the second model in the n-1th prediction period; n is an integer greater than 1;

[0037] A prediction model screening unit is used to screen, for each prediction period, the model with the strongest prediction performance within the prediction period from the first model and the second model, and determine it as the online prediction model; the online prediction model is used to provide the client with the carbon emission prediction results of the prediction period.

[0038] Optionally, the first performance evaluation unit is specifically used to:

[0039] Determine the data quality of target parameters based on historical carbon emissions data and reference data related to carbon emissions;

[0040] If the data quality meets the preset standard, determining that the prediction performance of the first model in the first prediction period is better than the prediction performance of the second model in the first prediction period;

[0041] If the data quality does not meet the preset standard, it is determined that the prediction performance of the first model in the first prediction period is weaker than the prediction performance of the second model in the first prediction period.

[0042] Optionally, the first performance evaluation unit is specifically used to:

[0043] Obtain data preprocessing results of historical carbon emission data and reference data related to carbon emission; the data preprocessing results include the effective data volume of target parameters; the target parameters include at least daily carbon emission, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day;

[0044] When the effective data amount of the target parameter meets the first condition, determining that the data quality of the target parameter meets the preset standard;

[0045] The first situation includes one of the following:

[0046] The effective data volume of the daily carbon emissions, the actual daily product output, and the future daily planned product output all meet the preset requirements;

[0047] The effective data volume of the daily carbon emissions meets the preset requirements, and the effective data volume of either the operation ratio or the scheduling day meets the preset requirements.

[0048] Optionally, the first performance evaluation unit is further used for:

[0049] When the effective data amount of the target parameter meets the second condition, determining that the data quality of the target parameter does not meet the preset standard;

[0050] The second situation includes one of the following:

[0051] The amount of valid data of the daily carbon emissions does not meet the preset requirements;

[0052] The valid data volume of the daily carbon emissions meets the preset requirements, and the valid data volume of the operation ratio and the scheduling day do not meet the preset requirements, and the valid data volume of either the actual daily product output or the future daily planned product output does not meet the preset requirements.

[0053] Optionally, the second performance evaluation unit is specifically used to:

[0054] Obtain the actual carbon emission data for the n-1th forecast period;

[0055] Determine a first score based on the carbon emission prediction result of the first model in the (n-1)th prediction period and the actual carbon emission data;

[0056] Determine a second score based on the carbon emission prediction result of the second model in the (n-1)th prediction period and the actual carbon emission data;

[0057] Based on the first score and the second score, a prediction performance of each of the first model and the second model in the nth prediction period is determined.

[0058] Optionally, the second performance evaluation unit is specifically used to:

[0059] If the first score is higher than the second score, determining that the prediction performance of the first model in the nth prediction period is better than the prediction performance of the second model in the nth prediction period;

[0060] If the first score is lower than the second score, it is determined that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

[0061] Optionally, the second performance evaluation unit is specifically used to:

[0062] The first score and the second score each contain the same scoring indicators. If the number of scoring indicators that meet the preset conditions in the first score meets a specified threshold, it is determined that the first score is higher than the second score. If the number of scoring indicators that meet the preset conditions in the first score does not meet the specified threshold, it is determined that the first score is lower than the second score. The preset condition is that the indicator value is higher than the indicator value of the same scoring indicator in the second score.

[0063] A storage medium includes a stored program, wherein the program executes the carbon emission prediction method based on a dual model when executed by a processor.

[0064] An electronic device, comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0065] The memory is used to store programs, and the processor is used to run programs, wherein the program executes the carbon emission prediction method based on the dual model when the processor runs it.

[0066] The technical solution provided by the present application, when in the first prediction cycle, determines the prediction performance of the first model and the second model respectively in the first prediction cycle according to the data quality of the target parameter. When in the nth prediction cycle, the prediction performance of the first model and the second model respectively in the nth prediction cycle is determined based on the carbon emission prediction results of the first model and the second model respectively in the n-1th prediction cycle. For each prediction cycle, the model with the strongest prediction performance in the prediction cycle is screened from the first model and the second model, and determined as the online prediction model. For each prediction cycle, the present application screens the model with the strongest prediction performance in the prediction cycle from the first model and the second model, and can adapt to carbon emission prediction tasks in different business scenarios. By screening the online prediction model, it is ensured that the client obtains a more accurate carbon emission prediction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 drawings can be obtained based on these drawings without paying creative work.

[0068] Figure 1A schematic diagram of a process flow of a carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0069] Figure 2 A schematic flow chart of another carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0070] Figure 3 A schematic flow chart of another carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0071] Figure 4 A schematic flow chart of another carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0072] Figure 5 A schematic flow chart of another carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0073] Figure 6 A schematic flow chart of another carbon emission prediction method based on a dual model provided in an embodiment of the present application;

[0074] Figure 7 A schematic diagram of the architecture of a carbon emission prediction device based on a dual model provided in an embodiment of the present application;

[0075] Figure 8 A data diagram of a target parameter provided in an embodiment of the present application. DETAILED DESCRIPTION

[0076] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0077] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0078] like Figure 1 As shown, it is a schematic diagram of a process of a carbon emission prediction method based on a dual model provided in an embodiment of the present application, including the following steps.

[0079] S101: When in the first prediction cycle, determine the prediction performance of the first model and the second model in the first prediction cycle according to the data quality of the target parameter.

[0080] The first model is used to predict future carbon emission data by using the influence of target parameters on future carbon emission. The second model is used to predict future carbon emission data by using the variation law of carbon emission related to target parameters.

[0081] In some examples, the first model includes but is not limited to a neural network model. For the neural network model, because the factors affecting carbon emissions in different parks and different enterprises are not fixed (for example, some factories do not rest on fixed weekends, and their daily carbon emissions are not affected by whether it is a weekend), the neural network model analyzes the relationship between data (i.e., the parameter value of the target parameter) to determine whether the target parameter has an influence on future carbon emissions. The influential target parameter can reflect the correlation trend of future carbon emissions in combination with historical carbon emissions, helping the model to predict the internal laws of the data and accurately predict carbon emission data.

[0082] In some examples, the second model includes but is not limited to a gray prediction model. Gray prediction is to predict a system that contains both known and uncertain information, that is, to predict a gray process that changes within a certain range and is related to time. Gray prediction generates and processes data to find the law of carbon emission changes and generates a characteristic sequence with strong regularity, and then establishes a corresponding differential equation model to predict future carbon emission data.

[0083] It should be noted that the target parameters are derived from historical carbon emission data under specified business scenarios and reference data related to carbon emissions. The target parameters can be regarded as the parameters required for feature engineering to construct the first model and the second model.

[0084] Optionally, according to the data quality of the target parameter, the prediction performance of the first model and the second model in the first prediction cycle can be determined. Figure 2 Steps shown and explanations of the steps.

[0085] S102: When in the nth prediction cycle, based on the carbon emission prediction results of the first model and the second model in the nth prediction cycle, respectively, determine the prediction performance of the first model and the second model in the nth prediction cycle.

[0086] Here, n is an integer greater than 1.

[0087] It should be noted that by performing feature engineering on the target parameters, the generated features are constructed and passed into the corresponding algorithm model, the prediction algorithm is executed, the data is predicted, and the prediction results (including the carbon emission prediction results of the first model and the second model) are output. For the first model, because the factors affecting the carbon emissions of different parks and different enterprises are not fixed (for example, some factories do not rest on fixed weekends, and their daily carbon emissions are not affected by whether it is a weekend), the first model analyzes whether each parameter has influence through the relationship between data. The influential parameters can reflect the correlation trend of future carbon emissions in combination with historical carbon emissions, help the model predict the inherent laws of the data, and accurately predict carbon emission data. For the second model, when there is only a small amount of historical carbon emission data and no other valid related parameters, differential equations can be used for rapid prediction. For this reason, there are differences in the carbon emission prediction results of the first model and the second model in the n-1th prediction period.

[0088] In some examples, the difference between the carbon emission prediction results of the first model and the second model in the n-1th prediction period can be determined based on the difference between the carbon emission prediction results of the first model in the n-1th prediction period and the actual carbon emission data of the n-1th prediction period, and the difference between the carbon emission prediction results of the second model in the n-1th prediction period and the actual carbon emission data of the n-1th prediction period.

[0089] Optionally, based on the carbon emission prediction results of the first model and the second model in the n-1th prediction period, the prediction performance of the first model and the second model in the nth prediction period can be determined. Figure 4 Steps shown and explanations of the steps.

[0090] S103: For each prediction cycle, select a model with the strongest prediction performance within the prediction cycle from the first model and the second model, and determine it as the online prediction model.

[0091] Among them, the online prediction model is used to provide the client with the carbon emission prediction results of the prediction period.

[0092] Optionally, for each prediction cycle, the model with the weakest prediction performance in the prediction cycle is selected from the first model and the second model to be determined as the offline prediction model. Generally speaking, the offline prediction model does not provide the client with the carbon emission prediction results of the prediction cycle. The carbon emission prediction results output by the offline prediction model are only used for retention and as a reference for the next prediction cycle.

[0093] It should be noted that for each prediction cycle, the model with the strongest prediction performance within the prediction cycle is screened from the first model and the second model and determined as the online prediction model. In different business scenarios, according to the data quality of the target parameters and the carbon emission prediction results of the previous prediction cycle, the online prediction model with the strongest prediction performance can be adaptively selected to provide carbon emission prediction services to the client, thereby reducing the prediction time and improving the prediction accuracy.

[0094] In some examples, combined Figure 2 , Figure 3 as well as Figure 4 The method shown in the figure can be summarized as follows: Figure 5 The method shown includes the following steps.

[0095] Step 1: Data collection and preprocessing: Collect historical carbon emission data and reference data related to carbon emissions, determine business scenarios and time granularity in advance, unify the time span and coverage of all data, and perform preprocessing operations such as cleaning, missing value processing, and format conversion on all data to determine the data quality of the target parameters.

[0096] Step 2, model selection: When there is no feedback optimization (i.e., using the carbon emission prediction results of the model in the n-1 prediction period as a reference for screening the online prediction model in the nth prediction period), the data quality of the target parameters is evaluated according to the rules, and the data quality is calculated to see whether it meets the standards. The appropriate model algorithm is selected as the online prediction model based on the data quality. The gray prediction model can be selected in low-quality (non-standard) scenarios, and the neural network model can be selected in high-quality (standard) scenarios. Another model is used as the offline prediction model. In addition, when there is feedback optimization, the corresponding model is selected as the online prediction model according to the results of the feedback optimization, and the other is selected as the offline prediction model.

[0097] Step 3: Construct feature engineering: Use historical carbon emission data and reference parameters to construct feature engineering, assemble the feature engineering data as input parameters to the neural network model, and use historical carbon emission data to construct feature engineering, and assemble the feature engineering data as input parameters to the gray prediction model.

[0098] Step 4: Pass the feature matrix generated by feature engineering into the corresponding algorithm model, run the online algorithm and offline algorithm, predict the carbon emission data, and output the online prediction results and offline prediction results.

[0099] Step 5, feedback optimization: After the first prediction is completed, the prediction results (online results, offline results) are obtained. After waiting for a certain period (one week, one month, etc.), the actual carbon emission data of the previous prediction time period will be generated. Three evaluation indicators are used to evaluate the prediction performance of the model between the carbon emission prediction results and the actual carbon emission data. The prediction model corresponding to the prediction results with better values ​​of more than two indicators should be used as the online prediction model for the next prediction, and the other model as the offline prediction model. In addition, the collected data is updated to perform subsequent prediction work, and this process is used to cycle the carbon emission prediction work for multiple subsequent prediction cycles.

[0100] In a possible implementation, Figure 5 The method shown in the specific implementation process can be simply summarized as follows: Figure 6 As shown. Figure 6 As shown in the figure, the implementation principles of data collection and preprocessing, model selection, and feedback optimization are Figure 5 The same as shown, the methods used by online prediction models and offline prediction models when constructing feature engineering and performing model prediction can also be referred to Figure 5 The steps shown are described here and will not be repeated here.

[0101] The process shown in S101-S103 above selects the model with the strongest prediction performance within the prediction period from the first model and the second model for each prediction period, and can adapt to carbon emission prediction tasks in different business scenarios. By selecting the online prediction model, it ensures that the client obtains a more accurate carbon emission prediction result.

[0102] like Figure 2 As shown, it is a flow chart of another carbon emission prediction method based on dual models provided in an embodiment of the present application, including the following steps.

[0103] S201: Determine the data quality of the target parameter based on historical carbon emission data and reference data related to carbon emissions.

[0104] Among them, historical carbon emission data includes carbon emissions that occurred in historical time, such as carbon emissions that occurred every day in December last year. In addition, reference data related to carbon emissions may include economic data (such as historical product output, future production plans, etc.), operational data (such as operation ratio, shift / operation days, whether it is a weekend, whether it is a holiday, etc.), and environmental data (such as high temperature, low temperature, etc.).

[0105] It is understandable that in order to determine the data quality of the target parameters, it is necessary to determine the business scenario and time granularity in advance and unify the time span and coverage of all data (i.e. historical carbon emission data and reference data).

[0106] In some examples, corresponding historical carbon emission data and reference data may be collected for a specified business scenario. The data collection source may be input by the user through the client, or obtained directly from the system background.

[0107] In a possible implementation method, for the daily granularity factory scenario, it is necessary to collect historical daily carbon emission data, and the reference data includes but is not limited to the actual daily product output, the planned product output for future days, the daily high temperature, the daily low temperature, the operation ratio, whether it is a scheduled day, whether it is a weekend, and whether it is a statutory holiday.

[0108] In a possible implementation method, for daily-granularity public construction scenarios, historical daily carbon emission data needs to be collected. Reference data includes but is not limited to daily high temperature, daily low temperature, operation ratio, whether it is an operating day, whether it is a weekend, and whether it is a statutory holiday.

[0109] In a possible implementation method, for the daily granularity park scenario, historical daily carbon emission data needs to be collected. Reference data includes but is not limited to the daily carbon emission historical data of enterprises in the park, the daily carbon emission forecast data of enterprises in the park, the daily high temperature, the daily low temperature, whether it is the weekend, and whether it is a statutory holiday.

[0110] In a possible implementation method, for the monthly granularity factory scenario, it is necessary to collect historical monthly carbon emission data. The reference data includes but is not limited to the actual monthly product output, the planned product output for future months, the monthly average high temperature, the monthly average low temperature, the operation ratio, the monthly shift days, the monthly weekend days, and the monthly statutory holidays.

[0111] In a possible implementation method, for public construction scenarios with monthly granularity, historical monthly carbon emission data needs to be collected. Reference data include but are not limited to the monthly average high temperature, the monthly average low temperature, the operation ratio, the monthly operating days, the monthly weekend days, and the monthly statutory holidays.

[0112] In a possible implementation method, for the monthly granularity park scenario, historical monthly carbon emission data needs to be collected. Reference data include but are not limited to the monthly carbon emission historical data of enterprises in the park, the monthly carbon emission forecast data of enterprises in the park, the monthly average high temperature, the monthly average low temperature, the number of weekends in the month, and the number of statutory holidays in the month.

[0113] It should be noted that the temperature data and holiday data involved in the reference data can use existing public data or be based on predicted data (such as weather forecast, etc.).

[0114] In some examples, the target parameters may include daily carbon emissions, actual daily product output, future daily planned product output, operation ratio, whether it is a shift day, daily high temperature, daily low temperature, whether it is a weekend, and whether it is a statutory holiday.

[0115] In a possible implementation, taking the daily granularity scenario of the factory scenario as an example, the historical carbon emission data and reference data from 2024 / 1 / 1 to 2024 / 1 / 12 are used to predict the daily carbon emissions from 2024 / 1 / 13 to 2024 / 1 / 16. The specific contents of the historical carbon emission data and reference data can be found in Figure 8 shown.

[0116] It should be noted that the original data (i.e. historical carbon emission data and reference data) can be subjected to data preprocessing operations such as cleaning, missing value processing, and format conversion to determine the effective data volume of the target parameters. Secondly, based on the effective data volume of the target parameters, the data quality of the target parameters can be determined.

[0117] In some examples, the amount of valid data can be understood as the total number of parameter values ​​that can be incorporated into the model, e.g. Figure 8 As shown, from 2024 / 1 / 1 to 2024 / 1 / 12, there are a total of 12 parameter values ​​for daily carbon emissions that can be included in the use of the first model or the second model, so it can be considered that the amount of valid data for daily carbon emissions is 12.

[0118] Optionally, the implementation process of determining the data quality of the target parameters based on historical carbon emission data and reference data related to carbon emissions can be found in Figure 3 Steps shown and explanations of the steps.

[0119] S202: Determine whether the data quality of the target parameter meets the preset standard.

[0120] If the data quality of the target parameter meets the preset standard, S203 is executed; if the data quality of the target parameter does not meet the preset standard, S204 is executed.

[0121] S203: Determine that the prediction performance of the first model in the first prediction period is stronger than the prediction performance of the second model in the first prediction period.

[0122] Among them, the data quality of the target parameter meets the preset standard, which means that when the target parameter is used as the required feature of the model, the data amount provided by the target parameter is sufficient. For the first model, the sufficient amount of training data enables the first model to accurately learn and analyze whether the target parameter has an impact on future carbon emissions, thereby effectively improving the prediction accuracy of future carbon emissions. When the amount of training data is sufficient, the model accuracy of the first model is higher than the model accuracy of the second model. For this reason, it can be determined that the prediction performance of the first model in the first prediction cycle is stronger than the prediction performance of the second model in the first prediction cycle.

[0123] It should be noted that using the target parameters as the features required by the model usually requires feature engineering of the target parameters. Feature engineering creates a corresponding feature matrix based on the target parameters, and standardizes and assembles the feature matrix into the input data format of the model algorithm.

[0124] In some examples, if the first model is a neural network model, the feature engineering standardizes and assembles the feature matrix into a data format recognizable by the neural network model.

[0125] In some examples, if the second model is a grey prediction model, the feature engineering standardizes and assembles the feature matrix into a data format recognizable by the grey prediction model.

[0126] S204: Determine that the prediction performance of the first model in the first prediction period is weaker than the prediction performance of the second model in the first prediction period.

[0127] Among them, the data quality of the target parameter does not meet the preset standard, which means that when the target parameter is used as the required feature of the model, the target parameter provides less data. For the first model, it is difficult to accurately learn and analyze whether the target parameter has an impact on future carbon emissions when the amount of training data is small. For the second model, the small amount of training data does not affect the second model's learning of the law of carbon emission changes. In other words, when the amount of training data is small, the model accuracy of the second model is higher than the model accuracy of the first model. For this reason, it can be determined that the prediction performance of the first model in the first prediction cycle is weaker than the prediction performance of the second model in the first prediction cycle.

[0128] The process shown in S201-S204 above can compare the prediction performance between the first model and the second model through the data quality of the target parameters, thereby determining the model with the strongest prediction performance between the first model and the second model, and providing an effective reference basis for the client to screen the online prediction model with the strongest prediction performance in the first prediction cycle.

[0129] like Figure 3 As shown, it is a flow chart of another carbon emission prediction method based on dual models provided in an embodiment of the present application, including the following steps.

[0130] S301: Obtain data preprocessing results of historical carbon emission data and reference data related to carbon emissions.

[0131] Among them, the data preprocessing results include the effective data volume of the target parameters, and the target parameters at least include daily carbon emissions, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day.

[0132] In some examples, after filtering missing values ​​and outliers on historical carbon emission data and reference data, the effective data volume of multiple target parameters such as daily carbon emissions, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day can be obtained.

[0133] S302: When the effective data amount of the target parameter meets the first condition, determining whether the data quality of the target parameter meets the preset standard.

[0134] Among them, the first situation includes the following: the valid data volume of daily carbon emissions, actual daily product output, and future daily planned product output all meet the preset requirements; the valid data volume of daily carbon emissions meets the preset requirements, and the valid data volume of either the operation ratio or whether it is a scheduled day meets the preset requirements.

[0135] In some examples, the preset requirement may be that the amount of valid data is not less than a calibration value, and the calibration value may be set by a technician according to actual conditions, for example, the calibration value may be set to 12.

[0136] In a possible implementation, assuming that the calibration value is 12, the effective data volume of daily carbon emissions is 13, the effective data volume of actual daily product output is 13, and the effective data volume of future daily planned product output is 13, it can be determined that the data quality of the target parameter meets the preset standard.

[0137] In a possible implementation, assuming that the calibration value is 12, the effective data volume of daily carbon emissions is 13, the effective data volume of the operation ratio is 8, and the effective data volume of the scheduling day is 13, it can be determined that the data quality of the target parameter meets the preset standard.

[0138] S303: When the effective data amount of the target parameter meets the second condition, determining that the data quality of the target parameter does not meet the preset standard.

[0139] Among them, the second situation includes the following: the effective data volume of daily carbon emissions does not meet the preset requirements; the effective data volume of daily carbon emissions meets the preset requirements, and the effective data volume of the operation ratio and whether it is a scheduled day do not meet the preset requirements, and the effective data volume of either the actual daily product output or the future daily planned product output does not meet the preset requirements.

[0140] In a possible implementation, assuming that the calibration value is 12, the amount of valid data on daily carbon emissions is 11, and the amount of valid data on actual daily product output is 13, it can be determined that the data quality of the target parameter does not meet the preset standard.

[0141] In a possible implementation, assuming that the calibration value is 12, the effective data volume of daily carbon emissions is 13, the effective data volume of the operation ratio is 10, the effective data volume of whether the shift day is 9, the effective data volume of the actual daily product output is 10, and the effective data volume of the planned product output for future days is 13, it can be determined that the data quality of the target parameter does not meet the preset standard.

[0142] In some examples, daily carbon emissions can be set to X0, actual daily product output can be set to X1, planned product output for future days can be set to X2, the operation ratio can be set to X3, and whether it is a scheduled day can be set to X4. Accordingly, the data quality of the target parameter is determined based on the evaluation score P, where P = X0×(X1×X2+X3+X4).

[0143] In a possible implementation, when the effective data volume of carbon emissions on the day meets the preset requirements, X0=1, and when the effective data volume of carbon emissions on the day does not meet the preset requirements, X0=0. When the effective data volume of the actual daily product output meets the preset requirements, X1=1, and when the effective data volume of the actual daily product output does not meet the preset requirements, X1=0. When the effective data volume of the planned product output for future days meets the preset requirements, X2=1, and when the effective data volume of the planned product output for future days does not meet the preset requirements, X2=0. When the effective data volume of the operation ratio meets the preset requirements, X3=1, and when the effective data volume of the operation ratio does not meet the preset requirements, X3=0. When the effective data volume of the scheduling day meets the preset requirements, X4=1, and when the effective data volume of the scheduling day does not meet the preset requirements, X4=0.

[0144] In a possible implementation manner, when P>0, it can be determined that the data quality of the target parameter meets the preset standard, and when P≤0, it can be determined that the data quality of the target parameter does not meet the preset standard.

[0145] The process shown in S301-S303 above uses the effective data volume of the target parameter to determine the data quality of the target parameter, thereby providing an effective reference for selecting the model with the strongest prediction performance from the first model and the second model.

[0146] like Figure 4 As shown, it is a flow chart of another carbon emission prediction method based on dual models provided in an embodiment of the present application, including the following steps.

[0147] S401: Obtain actual carbon emission data for the n-1th prediction period.

[0148] Among them, at the beginning of the nth forecast period, the actual carbon emission data of the n-1th forecast period will also be generated.

[0149] In some examples, actual carbon emission data for the n-1th forecast period may be obtained by accessing a backend system.

[0150] S402: Determine a first score based on the carbon emission prediction result of the first model in the (n-1)th prediction period and in combination with actual carbon emission data.

[0151] The first score may be used to evaluate the difference between the carbon emission prediction result of the first model in the n-1th prediction period and the actual carbon emission data.

[0152] In some examples, the first score may be determined based on multiple scoring indicators. In a possible implementation, the scoring indicators used for the first score include, but are not limited to, variance, mean square error, and mean absolute percentage error.

[0153] It is understandable that variance, mean square error, and mean absolute percentage error are all commonly used technical means in the existing model scoring field, and the specific calculation principles will not be elaborated here.

[0154] S403: Determine a second score based on the carbon emission prediction result of the second model in the (n-1)th prediction period and in combination with actual carbon emission data.

[0155] The second score can be used to evaluate the difference between the carbon emission prediction result of the second model in the n-1th prediction period and the actual carbon emission data.

[0156] In some examples, the second score may be determined based on multiple scoring indicators. In a possible implementation, the scoring indicators used for the second score include, but are not limited to, variance, mean square error, and mean absolute percentage error.

[0157] S404: Based on the first score and the second score, determine the prediction performance of the first model and the second model in the nth prediction cycle.

[0158] The prediction performance of each of the first model and the second model in the nth prediction cycle may be determined based on the comparison result of the first score and the second score.

[0159] Optionally, the implementation process of determining the prediction performance of the first model and the second model in the nth prediction period based on the first score and the second score can be: if the first score is higher than the second score, it is determined that the prediction performance of the first model in the nth prediction period is stronger than the prediction performance of the second model in the nth prediction period; if the first score is lower than the second score, it is determined that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

[0160] It can be understood that the first score is higher than the second score, which can be regarded as the difference between the carbon emission prediction results of the first model in the n-1 prediction period and the actual carbon emission data is smaller than the difference between the carbon emission prediction results of the second model in the n-1 prediction period and the actual carbon emission data. The first score is lower than the second score, which can be regarded as the difference between the carbon emission prediction results of the first model in the n-1 prediction period and the actual carbon emission data is greater than the difference between the carbon emission prediction results of the second model in the n-1 prediction period and the actual carbon emission data.

[0161] In some examples, the difference between the carbon emission prediction results of the first model in the n-1th prediction period and the actual carbon emission data is smaller than the difference between the carbon emission prediction results of the second model in the n-1th prediction period and the actual carbon emission data. It can be determined that the model accuracy of the first model after training with the data of the n-1th prediction period is higher than the model accuracy of the second model after training with the data of the n-1th prediction period. Therefore, it can be determined that the prediction performance of the first model in the nth prediction period is stronger than the prediction performance of the second model in the nth prediction period.

[0162] In some examples, the difference between the carbon emission prediction results of the first model in the n-1th prediction period and the actual carbon emission data is greater than the difference between the carbon emission prediction results of the second model in the n-1th prediction period and the actual carbon emission data. It can be determined that the model accuracy of the first model after training with the data of the n-1th prediction period is lower than the model accuracy of the second model after training with the data of the n-1th prediction period. Therefore, it can be determined that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

[0163] Optionally, the first score and the second score each contain the same scoring index. If the number of scoring indexes that meet the preset condition in the first score meets a specified threshold, the first score is determined to be higher than the second score. If the number of scoring indexes that meet the preset condition in the first score does not meet the specified threshold, the first score is determined to be lower than the second score. The preset condition is that the index value is higher than the index value of the same scoring index in the second score.

[0164] In some examples, the first score and the second score both use variance, mean square error, and mean absolute percentage error as scoring indicators, and by comparing the variance between the first score and the second score, comparing the mean square error between the first score and the second score, and comparing the mean absolute percentage error between the first score and the second score. Based on the comparison results of the three scoring indicators, it can be determined whether the number of scoring indicators that meet the preset conditions in the first score meets the specified threshold.

[0165] In a possible implementation, assuming that the scoring indicators are variance, mean square error, and mean absolute percentage error, the specified threshold can be set to 2. If the number of scoring indicators that meet the preset conditions in the first score is greater than or equal to 2, it can be determined that the first score is higher than the second score. If the number of scoring indicators that meet the preset conditions in the first score is less than 2, it can be determined that the first score is lower than the second score.

[0166] The process shown in S401-S404 above uses the carbon emission prediction results of the first model and the second model in the n-1th prediction period to determine the prediction performance of the first model and the second model in the nth prediction period, thereby selecting the online prediction model with the strongest prediction performance in the nth prediction period to provide an effective reference basis.

[0167] like Figure 7 As shown, it is a schematic diagram of the architecture of a carbon emission prediction device based on a dual model provided in an embodiment of the present application, including the units shown below.

[0168] The first performance evaluation unit 100 is used to determine the prediction performance of the first model and the second model respectively in the first prediction cycle according to the data quality of the target parameter when in the first prediction cycle; the first model is used to predict future carbon emission data by utilizing the influence of the target parameter on future carbon emissions; the second model is used to predict future carbon emission data by utilizing the carbon emission variation law related to the target parameter.

[0169] Optionally, the first performance evaluation unit 100 is specifically used to: determine the data quality of the target parameter based on historical carbon emission data and reference data related to carbon emissions; if the data quality meets the preset standard, determine that the prediction performance of the first model in the first prediction period is stronger than the prediction performance of the second model in the first prediction period; if the data quality does not meet the preset standard, determine that the prediction performance of the first model in the first prediction period is weaker than the prediction performance of the second model in the first prediction period.

[0170] Optionally, the first performance evaluation unit 100 is specifically used to: obtain data preprocessing results of historical carbon emission data and reference data related to carbon emissions; the data preprocessing results include the effective data volume of the target parameters; the target parameters include at least daily carbon emissions, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day; when the effective data volume of the target parameter meets the first situation, determine that the data quality of the target parameter meets the preset standard; wherein the first situation includes one of the following: the effective data volume of daily carbon emissions, actual daily product output, and future daily planned product output each meets the preset requirements; the effective data volume of daily carbon emissions meets the preset requirements, and the effective data volume of either the operation ratio or whether it is a scheduled day meets the preset requirements.

[0171] Optionally, the first performance evaluation unit 100 is also used to: when the effective data volume of the target parameter meets the second situation, determine that the data quality of the target parameter does not meet the preset standard; wherein the second situation includes one of the following: the effective data volume of daily carbon emissions does not meet the preset requirements; the effective data volume of daily carbon emissions meets the preset requirements, and the effective data volume of the operation ratio and whether it is a scheduled day do not meet the preset requirements, and the effective data volume of either the actual daily product output or the planned product output for future days does not meet the preset requirements.

[0172] The second performance evaluation unit 200 is used to determine the prediction performance of the first model and the second model in the nth prediction period based on the carbon emission prediction results of the first model and the second model in the n-1th prediction period respectively when in the nth prediction period; n is an integer greater than 1.

[0173] Optionally, the second performance evaluation unit 200 is specifically used to: obtain actual carbon emission data for the n-1th prediction period; determine a first score based on the carbon emission prediction results of the first model in the n-1th prediction period in combination with the actual carbon emission data; determine a second score based on the carbon emission prediction results of the second model in the n-1th prediction period in combination with the actual carbon emission data; determine the prediction performance of the first model and the second model respectively in the nth prediction period based on the first score and the second score.

[0174] Optionally, the second performance evaluation unit 200 is specifically used to: if the first score is higher than the second score, determine that the prediction performance of the first model in the nth prediction period is stronger than the prediction performance of the second model in the nth prediction period; if the first score is lower than the second score, determine that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

[0175] Optionally, the second performance evaluation unit 200 is specifically used to: if the first score and the second score each contain the same scoring indicators, if the number of scoring indicators that meet the preset conditions in the first score meets a specified threshold, determine that the first score is higher than the second score; if the number of scoring indicators that meet the preset conditions in the first score does not meet the specified threshold, determine that the first score is lower than the second score; wherein the preset condition is: the indicator value is higher than the indicator value of the same scoring indicator in the second score.

[0176] The prediction model screening unit 300 is used to screen the model with the strongest prediction performance in each prediction period from the first model and the second model, and determine it as the online prediction model; the online prediction model is used to provide the client with the carbon emission prediction result of the prediction period.

[0177] The carbon emission prediction device shown above, for each prediction cycle, selects the model with the strongest prediction performance within the prediction cycle from the first model and the second model, can adapt to the carbon emission prediction tasks under different business scenarios, and ensures that the client obtains more accurate carbon emission prediction results by selecting online prediction models.

[0178] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the carbon emission prediction method based on the dual model provided by the present application.

[0179] The present application also provides an electronic device, including: a processor, a memory and a bus. The processor and the memory are connected via the bus, the memory is used to store programs, and the processor is used to run the programs, wherein the carbon emission prediction method based on the dual model provided by the present application is executed when the programs are run.

[0180] In addition, the functions described above in the embodiments of the present application may be at least partially performed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0181] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

[0182] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0183] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A carbon emission prediction method based on a dual model, characterized in that: include: When in the first prediction cycle, determining the prediction performance of the first model and the second model in the first prediction cycle according to the data quality of the target parameter; The first model is used to predict future carbon emission data by using the influence of the target parameter on future carbon emission; The second model is used to predict future carbon emission data by using the carbon emission variation law related to the target parameter; When in the nth prediction period, based on the carbon emission prediction results of the first model and the second model in the n-1th prediction period, the prediction performance of the first model and the second model in the nth prediction period is determined; n is an integer greater than 1; For each prediction cycle, the model with the strongest prediction performance within the prediction cycle is selected from the first model and the second model and determined as the online prediction model; the online prediction model is used to provide the client with the carbon emission prediction result of the prediction cycle.

2. The method according to claim 1, characterized in that Determining the prediction performance of the first model and the second model in the first prediction cycle according to the data quality of the target parameter, including: Determine the data quality of target parameters based on historical carbon emissions data and reference data related to carbon emissions; If the data quality meets the preset standard, determining that the prediction performance of the first model in the first prediction period is better than the prediction performance of the second model in the first prediction period; If the data quality does not meet the preset standard, it is determined that the prediction performance of the first model in the first prediction period is weaker than the prediction performance of the second model in the first prediction period.

3. The method according to claim 2, characterized in that Determine the data quality of target parameters based on historical carbon emissions data and reference data related to carbon emissions, including: Obtain data preprocessing results of historical carbon emission data and reference data related to carbon emission; the data preprocessing results include the effective data volume of target parameters; the target parameters include at least daily carbon emission, actual daily product output, future daily planned product output, operation ratio, and whether it is a scheduled day; When the effective data amount of the target parameter meets the first condition, determining that the data quality of the target parameter meets the preset standard; The first situation includes one of the following: The effective data volume of the daily carbon emissions, the actual daily product output, and the future daily planned product output all meet the preset requirements; The effective data volume of the daily carbon emissions meets the preset requirements, and the effective data volume of either the operation ratio or the scheduling day meets the preset requirements.

4. The method according to claim 3, characterized in that The method further comprises: When the effective data amount of the target parameter meets the second condition, determining that the data quality of the target parameter does not meet the preset standard; The second situation includes one of the following: The amount of valid data of the daily carbon emissions does not meet the preset requirements; The valid data volume of the daily carbon emissions meets the preset requirements, and the valid data volume of the operation ratio and the scheduling day do not meet the preset requirements, and the valid data volume of either the actual daily product output or the future daily planned product output does not meet the preset requirements.

5. The method according to claim 1, characterized in that Determining the prediction performance of each of the first model and the second model in the n-1th prediction period based on the carbon emission prediction results of each of the first model and the second model, including: Obtain the actual carbon emission data for the n-1th forecast period; Determine a first score based on the carbon emission prediction result of the first model in the (n-1)th prediction period and the actual carbon emission data; Determine a second score based on the carbon emission prediction result of the second model in the (n-1)th prediction period and the actual carbon emission data; Based on the first score and the second score, a prediction performance of each of the first model and the second model in the nth prediction period is determined.

6. The method according to claim 5, characterized in that Determining prediction performance of each of the first model and the second model in the nth prediction period based on the first score and the second score includes: If the first score is higher than the second score, determining that the prediction performance of the first model in the nth prediction period is better than the prediction performance of the second model in the nth prediction period; If the first score is lower than the second score, it is determined that the prediction performance of the first model in the nth prediction period is weaker than the prediction performance of the second model in the nth prediction period.

7. The method according to claim 6, characterized in that The first score and the second score each contain the same scoring indicators. If the number of scoring indicators that meet the preset conditions in the first score meets a specified threshold, it is determined that the first score is higher than the second score. If the number of scoring indicators that meet the preset conditions in the first score does not meet the specified threshold, it is determined that the first score is lower than the second score. The preset condition is that the indicator value is higher than the indicator value of the same scoring indicator in the second score.

8. A carbon emission prediction device based on a dual model, characterized in that: include: A first performance evaluation unit is used to determine the prediction performance of the first model and the second model in the first prediction period according to the data quality of the target parameter when in the first prediction period; the first model is used to predict future carbon emission data by using the influence of the target parameter on future carbon emissions; The second model is used to predict future carbon emission data by using the carbon emission variation law related to the target parameter; a second performance evaluation unit, for determining, when in an nth prediction period, the prediction performance of each of the first model and the second model in the nth prediction period based on the carbon emission prediction results of each of the first model and the second model in the n-1th prediction period; n is an integer greater than 1; A prediction model screening unit is used to screen, for each prediction period, the model with the strongest prediction performance within the prediction period from the first model and the second model, and determine it as the online prediction model; the online prediction model is used to provide the client with the carbon emission prediction results of the prediction period.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program, when executed by a processor, executes the carbon emission prediction method based on a dual model as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program, when run by the processor, executes the carbon emission prediction method based on the dual model according to any one of claims 1 to 7.