CN117910657A - Prediction method, model training method, computing device, storage medium, and program product for carbon shift factor - Google Patents

Prediction method, model training method, computing device, storage medium, and program product for carbon shift factor Download PDF

Info

Publication number
CN117910657A
CN117910657A CN202410295614.0A CN202410295614A CN117910657A CN 117910657 A CN117910657 A CN 117910657A CN 202410295614 A CN202410295614 A CN 202410295614A CN 117910657 A CN117910657 A CN 117910657A
Authority
CN
China
Prior art keywords
data
prediction
energy consumption
sample
time period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410295614.0A
Other languages
Chinese (zh)
Other versions
CN117910657B (en
Inventor
闫月君
王朝阳
姚睿洋
王毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou AliCloud Feitian Information Technology Co Ltd
Original Assignee
Hangzhou AliCloud Feitian Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou AliCloud Feitian Information Technology Co Ltd filed Critical Hangzhou AliCloud Feitian Information Technology Co Ltd
Priority to CN202410295614.0A priority Critical patent/CN117910657B/en
Publication of CN117910657A publication Critical patent/CN117910657A/en
Application granted granted Critical
Publication of CN117910657B publication Critical patent/CN117910657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2123/00Data types
    • G06F2123/02Data types in the time domain, e.g. time-series data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a prediction method, a model training method, computing equipment, a storage medium and a program product of carbon rank factors. The prediction method of the carbon removal factor comprises the following steps: acquiring first energy consumption data generated by at least one energy source in a target area in a historical time period; predicting second energy consumption data of the at least one energy source within a predicted time period of the target area based on the first energy consumption data of the at least one energy source; acquiring a first carbon number factor released by the target area in the historical time period; and predicting a second carbon deposit factor corresponding to the target area in the prediction time period based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon deposit factor. The technical scheme provided by the embodiment of the invention realizes the prediction of the carbon rejection factor and ensures the accuracy of the carbon rejection factor.

Description

碳排因子的预测方法、模型训练方法、计算设备、存储介质及 程序产品Carbon emission factor prediction method, model training method, computing equipment, storage medium and program product

技术领域Technical Field

本发明实施例涉及人工智能技术领域,尤其涉及一种碳排因子的预测方法、模型训练方法、计算设备、存储介质以及程序产品。Embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a carbon emission factor prediction method, a model training method, a computing device, a storage medium, and a program product.

背景技术Background technique

碳排因子是指在生产、运输、使用或处理过程中,每单位能源释放的碳排放数量。在用电领域中,也即是指每单位电能所产生的碳排放数量。Carbon emission factor refers to the amount of carbon emissions released per unit of energy during production, transportation, use or processing. In the field of electricity consumption, it also refers to the amount of carbon emissions generated per unit of electrical energy.

碳排因子通常可以作为一项影响因子,来计算能源的绿色程度,用于指导节能减排措施。在用电领域中,由于电能可能涉及多种电力来源,如风能、热能、太阳能等能源,碳排因子通常是由权威机构综合多种能源的消耗而测算获得,用电方只能获得权威机构当下所发布的碳排因子,并基于该碳排因子进行数据计算以实现未来用电规划等节能减排措施。The carbon emission factor can usually be used as an influencing factor to calculate the greenness of energy and to guide energy conservation and emission reduction measures. In the field of electricity consumption, since electricity may involve multiple sources of electricity, such as wind energy, thermal energy, solar energy and other energy sources, the carbon emission factor is usually calculated by an authoritative agency based on the consumption of multiple energy sources. Electricity users can only obtain the carbon emission factor currently released by the authoritative agency and perform data calculations based on the carbon emission factor to achieve energy conservation and emission reduction measures such as future electricity consumption planning.

然而,基于权威机构所发布的碳排因子并不能精确表示未来碳排因子,因此,据此制定的未来节能减排措施并不准确。However, the carbon emission factors published by authoritative organizations cannot accurately represent future carbon emission factors. Therefore, future energy-saving and emission reduction measures formulated based on them are not accurate.

发明内容Summary of the invention

本发明实施例提供一种碳排因子的预测方法、模型训练方法、计算设备、存储介质以及程序产品,用以解决现有技术中碳排因子精确度的技术问题。The embodiments of the present invention provide a carbon emission factor prediction method, a model training method, a computing device, a storage medium and a program product, which are used to solve the technical problem of the accuracy of carbon emission factors in the prior art.

第一方面,本发明实施例提供了一种碳排因子预测方法,包括:In a first aspect, an embodiment of the present invention provides a carbon emission factor prediction method, comprising:

获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;Acquire first energy consumption data generated by at least one energy source in a target area during a historical time period;

基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;Based on the first energy consumption data of the at least one energy source, predicting second energy consumption data of the at least one energy source within a predicted time period of the target area;

获取所述目标区域在所述历史时间段内发布的第一碳排因子;Obtaining the first carbon emission factor released by the target area during the historical time period;

基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。Based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor, a second carbon emission factor corresponding to the target area within the prediction time period is predicted.

第二方面,本发明实施例提供了一种模型训练方法,包括:In a second aspect, an embodiment of the present invention provides a model training method, comprising:

确定至少一个样本特征参数以及所述至少一个样本特征参数对应的训练标签;所述至少一个样本特征参数包括第一能耗样本数据、时间样本数据及至少一种天气样本数据中的至少一个,所述训练标签包括能耗预测样本数据;或者所述至少一个样本特征参数包括预测能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个,所述训练标签包括碳排因子预测样本数据;Determine at least one sample characteristic parameter and a training label corresponding to the at least one sample characteristic parameter; the at least one sample characteristic parameter includes at least one of first energy consumption sample data, time sample data, and at least one weather sample data, and the training label includes energy consumption prediction sample data; or the at least one sample characteristic parameter includes at least one of predicted energy consumption sample data, time sample data, carbon emission factor historical sample data, and at least one weather sample data, and the training label includes carbon emission factor prediction sample data;

由所述至少一个样本特征参数构成目标特征集;The at least one sample feature parameter forms a target feature set;

利用所述目标特征集以及所述训练标签,训练预测模型;Using the target feature set and the training labels, training a prediction model;

从所述目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set;

将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters;

计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;Calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并返回利用所述目标特征集以及所述训练标签,训练所述预测模型的步骤继续执行,直至所述预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the step of training the prediction model using the target feature set and the training labels is returned to continue until the prediction model meets the training conditions.

第三方面,本发明实施例提供了一种碳排因子预测装置,包括:In a third aspect, an embodiment of the present invention provides a carbon emission factor prediction device, comprising:

第一获取模块,用于获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;A first acquisition module is used to acquire first energy consumption data generated by at least one energy source in a target area during a historical time period;

第一预测模块,用于基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;A first prediction module, configured to predict second energy consumption data of the at least one energy source within a prediction time period of the target area based on the first energy consumption data of the at least one energy source;

第二获取模块,用于获取所述目标区域在所述历史时间段内发布的第一碳排因子;A second acquisition module is used to acquire a first carbon emission factor released by the target area within the historical time period;

第二预测模块,用于基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。The second prediction module is used to predict the second carbon emission factor corresponding to the target area within the prediction time period based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor.

第四方面,本发明实施例提供了一种模型训练装置,包括:In a fourth aspect, an embodiment of the present invention provides a model training device, comprising:

第一确定模块,用于确定至少一个样本特征参数以及所述至少一个样本特征参数对应的训练标签;所述至少一个样本特征参数包括第一能耗样本数据、时间样本数据及至少一种天气样本数据中的至少一个,所述训练标签包括能耗预测样本数据;或者所述至少一个样本特征参数包括预测能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个,所述训练标签包括碳排因子预测样本数据;A first determination module is used to determine at least one sample characteristic parameter and a training label corresponding to the at least one sample characteristic parameter; the at least one sample characteristic parameter includes at least one of first energy consumption sample data, time sample data and at least one weather sample data, and the training label includes energy consumption prediction sample data; or the at least one sample characteristic parameter includes at least one of predicted energy consumption sample data, time sample data, carbon emission factor historical sample data and at least one weather sample data, and the training label includes carbon emission factor prediction sample data;

第一特征集构建模块,用于由所述至少一个样本特征参数构成目标特征集;A first feature set construction module, configured to construct a target feature set from the at least one sample feature parameter;

第一训练模块,用于利用所述目标特征集以及所述训练标签,训练预测模型;A first training module, used to train a prediction model using the target feature set and the training labels;

第一筛选模块,用于从所述目标特征集中筛选至少一个关键特征参数;A first screening module, used to screen at least one key feature parameter from the target feature set;

第一参数生成模块,用于将任意两个关键特征参数执行运算操作,生成候选特征参数;A first parameter generation module is used to perform an operation on any two key feature parameters to generate candidate feature parameters;

第一计算模块,用于计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;A first calculation module, used to calculate the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

第二训练模块,用于将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并触发所述第一训练模块继续执行,直至所述预测模型达到训练条件。The second training module is used to add candidate feature parameters whose correlations do not meet the correlation requirements into the target feature set, and trigger the first training module to continue executing until the prediction model meets the training conditions.

第五方面,本发明实施例提供了一种计算设备,包括处理组件以及存储组件;In a fifth aspect, an embodiment of the present invention provides a computing device, including a processing component and a storage component;

所述存储组件存储一个或多个计算机指令;所述一个或多个计算机指令用以被所述处理组件调用执行,实现本发明实施例提供的碳排因子的预测方法,或者实现本发明实施例提供的模型训练方法。The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the carbon emission factor prediction method provided in the embodiment of the present invention, or to implement the model training method provided in the embodiment of the present invention.

第六方面,本发明实施例提供了一种计算机存储介质,存储有计算机程序,所述计算机程序被计算机执行时,实现本发明实施例提供的碳排因子的预测方法,或者实现本发明实施例提供的模型训练方法。In a sixth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program. When the computer program is executed by a computer, the method for predicting the carbon emission factor provided by the embodiment of the present invention is implemented, or the model training method provided by the embodiment of the present invention is implemented.

第七方面,本发明实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机程序代码,在所述计算机程序代码被计算机设备执行时,所述计算机设备执行本发明实施例提供的碳排因子的预测方法,或者执行本发明实施例提供的模型训练方法。In the seventh aspect, an embodiment of the present invention provides a computer program product, which includes a computer program code. When the computer program code is executed by a computer device, the computer device executes the carbon emission factor prediction method provided by the embodiment of the present invention, or executes the model training method provided by the embodiment of the present invention.

本发明实施例获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;获取所述目标区域在所述历史时间段内发布的第一碳排因子;基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子,由于能源消耗具有一定的规律性,本申请实施例通过对能源消耗以及历史发布的碳排因子进行大数据分析,采用一种双层的预测架构,基于目标区域的历史时间段内能源的消耗量,对目标区域的预测时间段内的碳排因子进行预测,使得预测得到的第二碳排因子可以精确反映目标区域在预测时间段的碳排放水平,从而可以更精确的指导目标区域的节能减排措施。An embodiment of the present invention obtains first energy consumption data generated by at least one energy source in a target area within a historical time period; based on the first energy consumption data of the at least one energy source, predicts second energy consumption data of the at least one energy source within a predicted time period of the target area; obtains a first carbon emission factor published by the target area within the historical time period; based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor, predicts a corresponding second carbon emission factor of the target area within the predicted time period. Since energy consumption has a certain regularity, an embodiment of the present application performs big data analysis on energy consumption and historically published carbon emission factors, adopts a two-layer prediction architecture, and predicts the carbon emission factor of the target area within the predicted time period based on the energy consumption of the target area within the historical time period, so that the predicted second carbon emission factor can accurately reflect the carbon emission level of the target area in the predicted time period, thereby more accurately guiding energy-saving and emission reduction measures in the target area.

本发明的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present invention will become more apparent from the following description of the embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1示意性示出了本发明一个实施例提供的一种碳排因子的预测方法的流程图;FIG1 schematically shows a flow chart of a method for predicting a carbon emission factor provided by an embodiment of the present invention;

图2示意性示出了本发明实施例提供的碳排因子预测方法的示意图;FIG2 schematically shows a schematic diagram of a carbon emission factor prediction method provided by an embodiment of the present invention;

图3示意性示出了本发明实施例提供的第一预测模型的训练过程的示意图;FIG3 schematically shows a schematic diagram of a training process of a first prediction model provided by an embodiment of the present invention;

图4示意性示出了本发明一个实施例提供的一种模型训练方法的流程图;FIG4 schematically shows a flow chart of a model training method provided by an embodiment of the present invention;

图5示意性示出了本发明一个实施例提供的一种碳排因子的预测方法的应用场景示意图;FIG5 schematically shows an application scenario of a method for predicting a carbon emission factor provided by an embodiment of the present invention;

图6示意性示出了本发明一个实施例提供的一种碳排因子的预测装置的框图;FIG6 schematically shows a block diagram of a device for predicting a carbon emission factor provided by an embodiment of the present invention;

图7示意性示出了本发明实施例提供的碳排因子预测装置的框图;FIG7 schematically shows a block diagram of a carbon emission factor prediction device provided by an embodiment of the present invention;

图8示意性示出了本发明实施例提供的计算设备的框图。FIG8 schematically shows a block diagram of a computing device provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

在本发明的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

需要说明的是,本发明所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

由于背景技术的描述可知,碳排因子通常是由权威机构综合多种能源的消耗而测算获得,用电方只能获得权威机构当下所发布的碳排因子,并基于该碳排因子进行数据计算以实现未来用电规划等节能减排措施。As can be seen from the description of the background technology, the carbon emission factor is usually calculated by an authoritative organization based on the consumption of multiple energy sources. Electricity users can only obtain the carbon emission factor currently released by the authoritative organization and perform data calculations based on the carbon emission factor to implement energy-saving and emission reduction measures such as future electricity consumption planning.

然而,在实现本发明构思的过程中发现,权威机构发布的碳排因子并不能准确表示未来的碳排因子,导致基于当前碳排因子进行的数据计算并不可靠。从而导致基于权威机构所发布的碳排因子制定的未来节能减排措施并不准确。However, in the process of implementing the concept of the present invention, it was found that the carbon emission factors published by the authority cannot accurately represent the future carbon emission factors, resulting in unreliable data calculations based on the current carbon emission factors. As a result, the future energy conservation and emission reduction measures formulated based on the carbon emission factors published by the authority are inaccurate.

为了提高碳排因子的精确度,经过一系列研究提出了本申请实施例的技术方案,在本申请实施例中,获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;获取所述目标区域在所述历史时间段内发布的第一碳排因子;基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子,由于能源消耗具有一定的规律性,本申请实施例通过对能源消耗以及历史发布的碳排因子进行大数据分析,采用一种双层的预测架构,基于目标区域的历史时间段内能源的消耗量,对目标区域的预测时间段内的碳排因子进行预测,使得预测得到的第二碳排因子可以精确反映目标区域在预测时间段的碳排放水平,从而可以更精确的指导目标区域的节能减排措施。In order to improve the accuracy of the carbon emission factor, a technical solution of an embodiment of the present application was proposed after a series of studies. In the embodiment of the present application, first energy consumption data of at least one energy source in a target area during a historical time period is obtained; based on the first energy consumption data of the at least one energy source, second energy consumption data of the at least one energy source during a predicted time period of the target area is predicted; a first carbon emission factor published by the target area during the historical time period is obtained; based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor, a corresponding second carbon emission factor of the target area during the predicted time period is predicted. Since energy consumption has a certain regularity, the embodiment of the present application performs big data analysis on energy consumption and historically published carbon emission factors, adopts a two-layer prediction architecture, and predicts the carbon emission factor of the target area during the predicted time period based on the energy consumption of the target area during the historical time period, so that the predicted second carbon emission factor can accurately reflect the carbon emission level of the target area during the predicted time period, thereby more accurately guiding energy-saving and emission reduction measures in the target area.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

图1示意性示出了本发明一个实施例提供的一种碳排因子的预测方法的流程图,本实施例的技术方案可以由服务端执行,实际应用中,该服务端可以实现成多个服务器组成的分布式服务器集群,也可以实现为单个服务器。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。服务器也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(ContentDeliveryNetwork,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器,或者是带人工智能技术的智能云计算服务器或智能云主机等,本申请对此不进行限定。FIG1 schematically shows a flow chart of a method for predicting a carbon emission factor provided by an embodiment of the present invention. The technical solution of this embodiment can be executed by a server. In practical applications, the server can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology, etc. This application does not limit this.

该方法可以包括以下步骤:The method may include the following steps:

101,获取历史时间段内至少一种能源在目标区域产生的第一能耗数据。101. Obtain first energy consumption data of at least one energy source in a target area during a historical time period.

其中,历史时间段可以是指在当前时间之前的时间段。历史时间段例如可以是距离当前时间一定时长的历史时间和当前时间所构成的历史时间段。The historical time period may refer to a time period before the current time. For example, the historical time period may be a historical time period consisting of a certain period of time from the current time and the current time.

在本发明的实施例中,历史时间段的长度可以根据实际的应用需求进行灵活选取,例如可以选取一天、一周、一个月、一年等,在此不对历史时间段的长度进行限定。In the embodiment of the present invention, the length of the historical time period can be flexibly selected according to actual application requirements, for example, one day, one week, one month, one year, etc., and the length of the historical time period is not limited here.

其中,在用电领域中,能源可以是指能够产生电能的能源,包括传统能源以及新型能源,传统能源可以指在使用或者生产过程中会产生二氧化碳等温室气体的能源,例如煤、石油、天然气等,新型能源例如可以是指太阳能、风能等。Among them, in the field of electricity consumption, energy can refer to energy that can generate electricity, including traditional energy and new energy. Traditional energy can refer to energy that will produce greenhouse gases such as carbon dioxide during use or production, such as coal, oil, natural gas, etc. New energy can refer to solar energy, wind energy, etc.

目标区域可以指一个相对独立的地理范围,例如国家、省、市、学校、工业园区等。The target area can refer to a relatively independent geographical scope, such as a country, province, city, school, industrial park, etc.

每一种能源的第一能耗数据可以指在历史时间段内,每一种能源为目标区域范围内所使用的电能的能源消耗量。The first energy consumption data of each energy source may refer to the energy consumption of the electric energy used by each energy source within the target area during the historical time period.

该第一能耗数据可以根据权威机构的发布数据获得,当然,一些情况下,某种能源的第一能耗数据可能无法获得,则对应的历史能源数据即为空。The first energy consumption data may be obtained based on data released by an authoritative organization. Of course, in some cases, the first energy consumption data of a certain energy source may not be available, and the corresponding historical energy data will be empty.

102,基于至少一种能源的第一能耗数据,预测至少一种能源在目标区域的预测时间段内的第二能耗数据。102 . Predict second energy consumption data of at least one energy source within a prediction time period in a target area based on first energy consumption data of at least one energy source.

其中,预测时间段可以是指在当前时间之后的时间段。预测时间段例如可以是距离当前时间一定市场的预测时间和当前时间所构成的预测时间段。The prediction time period may refer to a time period after the current time. For example, the prediction time period may be a prediction time period consisting of a prediction time of a certain market from the current time and the current time.

在本发明的实施例中,预测时间段的长度可以根据实际的应用需求进行灵活选取,例如可以选取一天、一周、一个月、一年等,在此不对预测时间段的长度进行限定。该预测时间段的长度可以与历史时间段的长度相同或不同,本发明对此不进行限定。In the embodiment of the present invention, the length of the prediction time period can be flexibly selected according to actual application requirements, for example, one day, one week, one month, one year, etc., and the length of the prediction time period is not limited here. The length of the prediction time period can be the same as or different from the length of the historical time period, and the present invention does not limit this.

103,获取目标区域在历史时间段内发布的第一碳排因子。103. Obtain the first carbon emission factor released by the target area in the historical time period.

其中,第一碳排因子可以是指权威机构发布的目标区域在历史时间段内碳排因子的取值。The first carbon emission factor may refer to the value of the carbon emission factor of the target area in a historical period of time published by an authoritative organization.

104,基于至少一种能源的第二能耗数据以及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子。104. Predict a second carbon emission factor corresponding to the target area within a prediction time period based on second energy consumption data of at least one energy source and at least one characteristic parameter in the first carbon emission factor.

实际应用中,预测能源数据或者第一碳排因子可能为空,因此,在任一个特征参数为空情况下,也可以利用其余特征参数进行预测。因此,在本发明一种可能的实现方式中,可以利用第二能耗数据或第一碳排因子,预测得到第二碳排因子。In practical applications, the predicted energy data or the first carbon emission factor may be empty. Therefore, when any characteristic parameter is empty, the remaining characteristic parameters may be used for prediction. Therefore, in a possible implementation of the present invention, the second energy consumption data or the first carbon emission factor may be used to predict the second carbon emission factor.

在本发明的另一种可能的实现方式中,可以将第二能耗数据以及第一碳排因子,预测得到第二碳排因子。In another possible implementation of the present invention, the second energy consumption data and the first carbon emission factor may be used to predict the second carbon emission factor.

在本发明的实施例中,第二碳排因子可以用于指示在预测时间段内对目标区域进行节能减排处理。In an embodiment of the present invention, the second carbon emission factor may be used to indicate that energy conservation and emission reduction processing should be performed on the target area within the predicted time period.

本实施例,利用能源消耗的规律性,通过对能源消及历史发布的碳排因子进行大数据分析,采用一种双层预测架构,实现了碳排因子预测,使得预测得到的第二碳排因子可以精确反映目标区域在预测时间段的碳排放水平,从而可以更精确的指导目标区域的节能减排处理。This embodiment utilizes the regularity of energy consumption, conducts big data analysis on energy consumption and historically published carbon emission factors, and adopts a two-layer prediction architecture to achieve carbon emission factor prediction, so that the predicted second carbon emission factor can accurately reflect the carbon emission level of the target area during the prediction time period, thereby more accurately guiding the energy conservation and emission reduction processing of the target area.

一些实施例中,该方法还可以包括:In some embodiments, the method may further include:

获取目标区域在预测时间段内对应的至少一种天气数据:Get at least one type of weather data corresponding to the target area within the forecast period:

基于至少一种能源的第一能耗数据,预测至少一种能源在目标区域的预测时间段内的第二能耗数据包括:Predicting second energy consumption data of at least one energy source within a prediction time period of a target area based on first energy consumption data of at least one energy source includes:

基于至少一种能源的第一能耗数据以及至少一种天气数据中的至少一个特征参数,预测至少一种能源在目标区域的预测时间段内的第二能耗数据。Based on the first energy consumption data of the at least one energy source and at least one characteristic parameter in the at least one weather data, second energy consumption data of the at least one energy source within a prediction time period of the target area is predicted.

在实现本发明的构思中发现,目标区域的能耗通常受目标区域内的天气状况的影响,因而,在进行目标区域的能耗预测时,可以对目标区域的天气状况进行量化,得到天气数据,并利用天气数据作为辅助数据进行能耗预测。In the process of implementing the concept of the present invention, it is found that the energy consumption of the target area is usually affected by the weather conditions in the target area. Therefore, when predicting the energy consumption of the target area, the weather conditions of the target area can be quantified to obtain weather data, and the weather data can be used as auxiliary data for energy consumption prediction.

天气数据可以指用于描述大气状况和气象要素的信息,例如可以包括温度、湿度、气压、降水量、风速、风向、能见度、云量、紫外线指数中的一种或多种。Weather data may refer to information used to describe atmospheric conditions and meteorological elements, and may include, for example, one or more of temperature, humidity, air pressure, precipitation, wind speed, wind direction, visibility, cloud cover, and UV index.

天气数据通常由气象观测站、卫星、雷达等气象设备收集和记录,并通过气象机构进行整理和发布。因此,天气数据可以从气象机构获取。Weather data is usually collected and recorded by meteorological equipment such as meteorological observation stations, satellites, and radars, and collated and released by meteorological agencies. Therefore, weather data can be obtained from meteorological agencies.

以下以目标区域为计算中心,能源为电能为例,示意性的说明天气状况对计算中心的耗电量产生的影响。The following takes the target area as a computing center and the energy source as electricity as an example to schematically illustrate the impact of weather conditions on the power consumption of the computing center.

首先,温度可能会对计算中心的能耗产生影响。计算中心设备的运行会产生大量的热量,因此需要进行散热来保持设备的正常运行温度。当室外温度较高时,计算中心需要增加空调的使用来降低室内温度,以确保设备的稳定性和性能。First, temperature may have an impact on the energy consumption of the computing center. The operation of the computing center equipment will generate a lot of heat, so heat dissipation is needed to maintain the normal operating temperature of the equipment. When the outdoor temperature is high, the computing center needs to increase the use of air conditioning to lower the indoor temperature to ensure the stability and performance of the equipment.

其次,湿度可能会对计算中心的能耗产生影响。湿度对计算设备的可靠性和耐久性会产生影响。过高的湿度可能导致设备的损坏和腐蚀,而过低的湿度可能导致静电放电和设备故障。因此,计算中心通常需要进行湿度控制,以确保设备在适宜的湿度范围内运行。Secondly, humidity may affect the energy consumption of computing centers. Humidity affects the reliability and durability of computing equipment. Too high humidity may cause damage and corrosion to equipment, while too low humidity may cause electrostatic discharge and equipment failure. Therefore, computing centers usually need humidity control to ensure that equipment operates within an appropriate humidity range.

此外,降水可能会对计算中心的能耗产生影响。计算中心通常需要采取防水措施,以防止雨水侵入设备和机房。这些措施可能包括防水层、排水系统等。In addition, precipitation may have an impact on the energy consumption of the computing center. Computing centers usually need to take waterproof measures to prevent rainwater from invading equipment and computer rooms. These measures may include waterproof layers, drainage systems, etc.

以及,风速可能会对计算中心的能耗产生影响。计算中心可能采用风冷系统来替代传统的空调系统,以降低能耗。这些系统利用自然的风力来散热并保持设备温度。因此,当风速较高时,风冷系统的效果更好,能耗也会相应降低。Also, wind speed may have an impact on the energy consumption of a computing center. Computing centers may use air cooling systems instead of traditional air conditioning systems to reduce energy consumption. These systems use the natural force of wind to dissipate heat and maintain the temperature of equipment. Therefore, when the wind speed is higher, the air cooling system is more effective and energy consumption is reduced accordingly.

一些实施例中,由于在不同时间用电消耗会有一定规律性,比如白天用电较多,而晚上用电较少等,因此,上述基于至少一种能源的第一能耗数据以及至少一种天气数据中的至少一个特征参数,预测至少一种能源在目标区域的预测时间段内的第二能耗数据可以包括:In some embodiments, since electricity consumption at different times may have certain regularity, such as more electricity consumption during the day and less electricity consumption at night, the above-mentioned prediction of the second energy consumption data of at least one energy in the predicted time period of the target area based on the first energy consumption data of at least one energy and at least one characteristic parameter in at least one weather data may include:

基于至少一种能源的第一能耗数据、至少一种天气数据、以及预测时间段对应的时间数据中的至少一个特征参数,预测至少一种能源在目标区域的预测时间段内的第二能耗数据。Based on first energy consumption data of at least one energy source, at least one weather data, and at least one characteristic parameter in time data corresponding to a prediction time period, second energy consumption data of at least one energy source within a prediction time period of a target area is predicted.

当然,作为又一个实施例,也可以是利用基于至少一种能源的第一能耗数据以及预测时间段对应的时间数据中的至少一个特征参数,预测至少一种能源在目标区域的预测时间段内的第二能耗数据。Of course, as another embodiment, second energy consumption data of at least one energy source within the predicted time period of the target area may be predicted by using first energy consumption data of at least one energy source and at least one characteristic parameter in time data corresponding to the predicted time period.

实际应用中,由于任一种能源的第一能耗数据、任一种天气数据等可能为空,无法获得,采用本发明实施例的技术方案,也可以在任一个特征参数缺失情况下,预测至少一种能源在目标区域的预测时间段内的第二能耗数据。因此,在本发明一种可能的实现方式中,可以是利用任一种能源的第一能耗数据、任一种天气数据或时间数作为特征参数,预测得到第二能耗数据。In practical applications, since the first energy consumption data of any energy source, any weather data, etc. may be empty and cannot be obtained, the technical solution of the embodiment of the present invention can also be used to predict the second energy consumption data of at least one energy source within the predicted time period of the target area when any characteristic parameter is missing. Therefore, in a possible implementation of the present invention, the first energy consumption data of any energy source, any weather data, or time number can be used as characteristic parameters to predict the second energy consumption data.

在本发明的另一种可能的实现方式中,可以利用至少一种第一能耗数据、至少一种天气数据以及时间数据中的多个特征参数,得到第二能耗数据。In another possible implementation of the present invention, the second energy consumption data may be obtained by using at least one first energy consumption data, at least one weather data, and multiple characteristic parameters in the time data.

由前文描述可知,天气数据会影响能源消耗量,因此也会影响碳排因子,一些实施例中,基于至少一种能源的第二能耗数据以及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子具体可以实现为:As can be seen from the foregoing description, weather data will affect energy consumption, and therefore will also affect the carbon emission factor. In some embodiments, based on the second energy consumption data of at least one energy source and at least one characteristic parameter in the first carbon emission factor, the second carbon emission factor corresponding to the predicted target area within the predicted time period can be specifically implemented as follows:

基于至少一种能源的第二能耗数据、至少一种天气数据及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子。Based on the second energy consumption data of at least one energy source, at least one weather data and at least one characteristic parameter of the first carbon emission factor, a second carbon emission factor corresponding to the target area within the prediction time period is predicted.

此外,也可以加入时间数据进行预测,因此,一些实施例中,上述基于至少一种能源的第二能耗数据、至少一种天气数据及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子可以包括:In addition, time data may also be added for prediction. Therefore, in some embodiments, the second energy consumption data based on at least one energy source, at least one weather data and at least one characteristic parameter in the first carbon emission factor may be used to predict the second carbon emission factor corresponding to the target area within the prediction time period. The prediction may include:

基于至少一种能源的第二能耗数据、至少一种天气数据、时间数据及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子。Based on the second energy consumption data of at least one energy source, at least one weather data, time data and at least one characteristic parameter of the first carbon emission factor, a second carbon emission factor corresponding to the target area within the prediction time period is predicted.

当然,也可以是基于至少一种能源的第二能耗数据、时间数据及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子。Of course, the second carbon emission factor corresponding to the target area within the predicted time period may also be predicted based on the second energy consumption data of at least one energy source, the time data and at least one characteristic parameter of the first carbon emission factor.

其中,为了进一步提高预测准确度,除了采用数据分析方式,此外,还可以利用机器学习模型实现,因此,一些实施例中,基于第一能耗数据、至少一种天气数据、以及预测时间段对应的时间数据中的至少一个特征参数,预测至少一种能源在目标区域的预测时间段内的第二能耗数据具体可以实现为:Among them, in order to further improve the prediction accuracy, in addition to using the data analysis method, a machine learning model can also be used. Therefore, in some embodiments, based on the first energy consumption data, at least one weather data, and at least one characteristic parameter in the time data corresponding to the prediction time period, predicting the second energy consumption data of at least one energy source in the prediction time period of the target area can be specifically implemented as follows:

针对任一种能源,基于能源的第一能耗数据、至少一种天气数据、及预测时间段对应的时间数据中的至少一个特征参数,利用第一预测模型,预测能源在预测时间段内的第二能耗数据。For any type of energy, based on the first energy consumption data of the energy, at least one weather data, and at least one characteristic parameter in the time data corresponding to the prediction time period, the first prediction model is used to predict the second energy consumption data of the energy within the prediction time period.

其中,第一预测模型可以实现为线性回归模型、决策树模型、随机森林模型、支持向量机模型、神经网络模型中的一种。在一种可能的实现方式中,第一预测模型可以为ANN(Artificial Neutral Network,人工神经网络)、LSTM长短期记忆(Long short-termmemory, 长短期记忆)中的一种。The first prediction model may be implemented as one of a linear regression model, a decision tree model, a random forest model, a support vector machine model, and a neural network model. In a possible implementation, the first prediction model may be one of an ANN (Artificial Neutral Network) and an LSTM (Long short-term memory).

具体而言,利用第一预测模型预测第二能耗数据可以实现为:Specifically, using the first prediction model to predict the second energy consumption data can be achieved as follows:

将至少一个特征参数输入至第一预测模型,使得第一预测模型输出第二能耗数据。At least one characteristic parameter is input into the first prediction model so that the first prediction model outputs second energy consumption data.

在实际应用中,为了实现精细化预测,上述的第一能耗数据、天气数据、时间数据可以是时间序列数据,由多个时间步数据元素构成,其中,每个时间步结合实际需求可以进行设定,例如可以为小时级,每个时间步代表1个小时。In practical applications, in order to achieve refined prediction, the above-mentioned first energy consumption data, weather data, and time data can be time series data, which is composed of multiple time step data elements, wherein each time step can be set according to actual needs, for example, it can be hourly level, and each time step represents 1 hour.

上述第一能耗数据为由包括当前时间步以及当前时间步之前的多个时间步分别对应的能耗数据构成;上述天气数据天气数据由多个时间步分别对应的天气数据构成;The first energy consumption data is composed of energy consumption data corresponding to the current time step and multiple time steps before the current time step; the weather data is composed of weather data corresponding to multiple time steps;

上述时间数据由多个时间步分别对应的时间信息构成,可以是指未来L小时对应的日历变量,可选地,时间数据可以包括至少一种时间序列,例如月份、日期以及小时分别对应的时间序列,假设当前时间为14时,预测时间段为后4个小时,则小时对应的时间序列即为(10、11、12、13),由于每个时间步对应的月份和日期相同,则月份对应的时间序列可以是一个数值如5,日期对应的时间序列可以是一个数值如26,则时间数据即为:5,26,(10、11、12、13)。The above-mentioned time data is composed of time information corresponding to multiple time steps, which may refer to calendar variables corresponding to the next L hours. Optionally, the time data may include at least one time series, such as time series corresponding to months, dates and hours. Assuming that the current time is 14:00 and the predicted time period is the next 4 hours, the time series corresponding to the hours is (10, 11, 12, 13). Since the month and date corresponding to each time step are the same, the time series corresponding to the month can be a value such as 5, and the time series corresponding to the date can be a value such as 26. Then the time data is: 5, 26, (10, 11, 12, 13).

第二能耗数据由当前时间步之后的多个时间步分别对应的预测数据构成。The second energy consumption data is composed of prediction data corresponding to a plurality of time steps after the current time step.

在一个实际应用中,利用第一预测模型预测第二能耗数据例如可以采用以下公式(1)体现。In a practical application, the first prediction model is used to predict the second energy consumption data, for example, as shown in the following formula (1).

;(1) ;(1)

其中,,e可以表示第一能耗数据,/>可以表示小时数据,/>可以表示月份数据,/>可以表示日期数据,/>可以表示温度数据,/>可以表示湿度数据,/>可以表示风速数据,/>可以表示露点数据,/>可以表示第一预测模型的网络参数;/>表示第二能耗数据。in, , e can represent the first energy consumption data, /> Can represent hourly data, /> Can represent month data, /> Can represent date data, /> Can represent temperature data, /> Can represent humidity data,/> Can represent wind speed data, /> Can represent dew point data, /> The network parameters of the first prediction model may be represented; /> Indicates the second energy consumption data.

根据本发明的实施例,基于至少一种能源的第二能耗数据、至少一种天气数据、时间数据及第一碳排因子中的至少一个特征参数,预测目标区域在预测时间段内对应的第二碳排因子可以实现为:According to an embodiment of the present invention, based on the second energy consumption data of at least one energy source, at least one weather data, time data and at least one characteristic parameter of the first carbon emission factor, the second carbon emission factor corresponding to the target area in the prediction time period can be predicted as follows:

基于至少一种能源的第二能耗数据、至少一种天气数据、时间数据及第一碳排因子中的至少一个特征参数,利用第二预测模型,预测目标区域在预测时间段内的第二碳排因子。Based on the second energy consumption data of at least one energy source, at least one weather data, time data and at least one characteristic parameter of the first carbon emission factor, a second prediction model is used to predict the second carbon emission factor of the target area within the prediction time period.

其中,第二预测模型可以实现为线性回归模型、决策树模型、随机森林模型、支持向量机模型、神经网络模型中的一种。在本发明的一种可能的实现方式中,第二预测模型可以实现为XGBoost(Extreme Gradient Boosting,极端梯度提升)。The second prediction model can be implemented as one of a linear regression model, a decision tree model, a random forest model, a support vector machine model, and a neural network model. In a possible implementation of the present invention, the second prediction model can be implemented as XGBoost (Extreme Gradient Boosting).

具体而言,利用第二预测模型预测第二能耗数据可以实现为:Specifically, predicting the second energy consumption data using the second prediction model can be implemented as follows:

将至少一个特征参数输入至第二预测模型,使得第二预测模型输出第二碳排因子。At least one characteristic parameter is input into the second prediction model so that the second prediction model outputs a second carbon emission factor.

利用第二预测模型预测第二碳排因子可以采用以下公式(2)体现。The second carbon emission factor predicted by the second prediction model can be expressed by the following formula (2).

其中,可以表示第二能耗数据,/>可以表示小时数据,/>可以表示月份数据,/>可以表示日期数据,/>可以表示温度数据,/>可以表示湿度数据,可以表示风速数据,/>可以表示露点数据。in, The second energy consumption data may be represented by Can represent hourly data, /> Can represent month data, /> Can represent date data, /> Can represent temperature data, /> Can represent humidity data, Can represent wind speed data, /> Dew point data can be displayed.

第二预测模型可以利用损失函数进行训练生成。在本发明的实施例中,以第二预测模型为XGBoost为例,损失函数可以为多个弱学习器的联合损失,具体可以为以下公式(3)。The second prediction model can be generated by training using a loss function. In an embodiment of the present invention, taking XGBoost as the second prediction model, the loss function can be a joint loss of multiple weak learners, specifically, the following formula (3).

其中,可以指损失值,/>可以指第二预测模型的输出值,/>可以指第二预测模型的标签值,/>可以指弱学习器决策树的模型复杂度。in, Can refer to the loss value, /> It can refer to the output value of the second prediction model, /> Can refer to the label value of the second prediction model, /> Can refer to the model complexity of the weak learner decision tree.

为了方便理解,图2示意性示出了本发明实施例提供的碳排因子预测方法的示意图。For ease of understanding, FIG2 schematically shows a schematic diagram of a carbon emission factor prediction method provided in an embodiment of the present invention.

如图2所示,本发明实施例提出的碳排因子预测方法采用双层架构。在利用第一能耗数据对预测时间段内的碳排因子值进行预测时,首先将第一能耗数据、天气数据和时间数据输入第一预测模型中,预测得到预测时间段内的第二能耗数据。然后,再将第二能耗数据、天气数据和时间数据输入至第二预测模型中,预测得到预测时间段内的第二碳排因子。As shown in FIG2 , the carbon emission factor prediction method proposed in the embodiment of the present invention adopts a two-layer architecture. When the first energy consumption data is used to predict the carbon emission factor value within the prediction time period, the first energy consumption data, weather data and time data are first input into the first prediction model to predict the second energy consumption data within the prediction time period. Then, the second energy consumption data, weather data and time data are input into the second prediction model to predict the second carbon emission factor within the prediction time period.

需要说明的是,在利用第一预测模型生成第二能耗数据时,针对不同种类的能源的第一能耗数据,可以采用同一个或者不同的多个第一预测模型进行预测。其中,多个第一预测模型可以均为相同种类的第一预测模型,也可以为不同种类的第一预测模型。It should be noted that when the first prediction model is used to generate the second energy consumption data, the same or different first prediction models may be used to predict the first energy consumption data of different types of energy. The multiple first prediction models may all be first prediction models of the same type or first prediction models of different types.

根据本发明的实施例,第一预测模型可以基于第一能耗样本数据、时间样本数据、以及至少一种天气样本数据中的至少一个样本特征参数,及至少一个样本特征参数对应的能耗预测样本数据进行预先训练获得。According to an embodiment of the present invention, the first prediction model can be pre-trained based on the first energy consumption sample data, time sample data, at least one sample characteristic parameter in at least one weather sample data, and energy consumption prediction sample data corresponding to at least one sample characteristic parameter.

其中,第一能耗样本数据、时间样本数据、天气样本数据和上述第一能耗数据、时间数据以及天气数据所指的数据内容类似,在此不再赘述。Among them, the first energy consumption sample data, time sample data, weather sample data and the data content referred to by the above-mentioned first energy consumption data, time data and weather data are similar and will not be repeated here.

实际应用中,由于任一种能源的第一能耗样本数据、时间样本数据、天气样本数据等可能为空,无法获得,从而,在任一个特征参数为空情况下,也可以利用其余特征参数进行预测。可以利用第一能耗样本数据、时间样本数据、天气样本数据中任意一种或多种数据,得到样本特征参数,并将样本特征参数作为第一预测模型的训练数据集,用于训练第一预测模型。In practical applications, since the first energy consumption sample data, time sample data, weather sample data, etc. of any energy source may be empty and cannot be obtained, when any characteristic parameter is empty, the remaining characteristic parameters can also be used for prediction. The sample characteristic parameters can be obtained by using any one or more of the first energy consumption sample data, time sample data, and weather sample data, and the sample characteristic parameters are used as the training data set of the first prediction model to train the first prediction model.

具体而言,可以将训练数据集输入至待训练的第一预测模型,第一预测模型可以根据输入的训练数据集,对能耗进行预测,输出能耗预测值。Specifically, the training data set may be input into the first prediction model to be trained, and the first prediction model may predict the energy consumption according to the input training data set, and output the predicted energy consumption value.

能耗预测样本可以为在本轮训练过程中,第一预测模型的预期输出,即期望第一预测模型根据训练数据集预测到的值。The energy consumption prediction sample may be the expected output of the first prediction model during the current round of training, that is, the value expected to be predicted by the first prediction model based on the training data set.

在得到第一预测模型输出的能耗预测值后,可以基于能耗预测值和能耗预测样本数据的偏差,调整第一预测模型的网络参数,实现对第一预测模型的训练。After obtaining the energy consumption prediction value output by the first prediction model, the network parameters of the first prediction model can be adjusted based on the deviation between the energy consumption prediction value and the energy consumption prediction sample data to implement the training of the first prediction model.

在本发明的一种可能的实现方式中,可以利用以下公式(4)计算能耗预测值和能耗预测样本数据的偏差。In a possible implementation of the present invention, the deviation between the energy consumption prediction value and the energy consumption prediction sample data may be calculated using the following formula (4).

由前文描述可知,一些样本特征参数可能为空,无法获得,为了保证在特征参数缺失情况下,第一预测模型仍然实现精准预测,一些实施例中,第一预测模型具体按照如下方式训练获得:As can be seen from the foregoing description, some sample feature parameters may be empty and cannot be obtained. In order to ensure that the first prediction model still achieves accurate prediction when the feature parameters are missing, in some embodiments, the first prediction model is specifically trained in the following manner:

确定第一能耗样本数据、时间样本数据、及至少一种天气样本数据中的至少一个样本特征参数;Determine at least one sample characteristic parameter of the first energy consumption sample data, the time sample data, and at least one weather sample data;

由至少一个样本特征参数构成目标特征集;A target feature set is formed by at least one sample feature parameter;

将目标特征集作为模型输入,能耗预测样本数据作为训练标签,训练第一预测模型;The target feature set is used as the model input, and the energy consumption prediction sample data is used as the training label to train the first prediction model;

从目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set;

将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters;

计算候选特征参数与目标特征集合中的任一个特征样本参数的相关性;Calculate the correlation between the candidate feature parameters and any feature sample parameters in the target feature set;

将相关性未满足相关性要求的候选特征参数加入目标特征集,并返回将目标特征集作为模型输入,能耗预测样本数据作为训练标签,训练第一预测模型的步骤继续执行,直至第一预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the target feature set is returned as the model input, and the energy consumption prediction sample data is used as the training label. The step of training the first prediction model continues until the first prediction model meets the training conditions.

在实际应用中,为了实现精细化预测,上述的第一能耗样本数据、时间样本数据、及至少一种天气样本数据可以是时间序列数据,由多个时间步数据元素构成,其中,每个时间步结合实际需求可以进行设定,例如可以为小时级,每个时间步代表1个小时。In practical applications, in order to achieve refined prediction, the above-mentioned first energy consumption sample data, time sample data, and at least one weather sample data can be time series data, composed of multiple time step data elements, wherein each time step can be set according to actual needs, for example, it can be at the hourly level, and each time step represents 1 hour.

上述第一能耗样本数据可以是由多个时间步和每个时间步所对应的能耗值构成;上述天气样本数据可以是由多个时间步和每个时间步所对应的天气数据值构成。The first energy consumption sample data may be composed of a plurality of time steps and an energy consumption value corresponding to each time step; the weather sample data may be composed of a plurality of time steps and a weather data value corresponding to each time step.

对于目标特征集,可以对目标特征集所包含的样本特征参数进行分析,确定每个样本特征参数对模型预测的重要性程度,并将重要性程度较高的样本特征参数确定为关键特征参数。For the target feature set, the sample feature parameters contained in the target feature set can be analyzed to determine the importance of each sample feature parameter to the model prediction, and the sample feature parameters with higher importance can be determined as key feature parameters.

在本发明的一种可能的实现方式中,可以利用残差决策树、沙普利加和解释(Shapley Additive exPlanations,SHAP)等分析方法,对目标特征集所包含的样本特征参数进行分析,来衡量每个样本特征参数对模型预测的贡献程度。In a possible implementation of the present invention, analysis methods such as residual decision tree and Shapley Additive exPlanations (SHAP) can be used to analyze the sample feature parameters included in the target feature set to measure the contribution of each sample feature parameter to the model prediction.

在筛选得到关键特征参数后,可以基于筛选得到的至少一个关键特征参数,生成更多的特征参数。After the key characteristic parameters are obtained through screening, more characteristic parameters may be generated based on at least one key characteristic parameter obtained through screening.

在本发明的另一种实现方式中,在从目标特征集中筛选得到多个关键特征参数的情况下,可以从多个关键特征参数中任选两个关键特征参数生成数据对,对该数据对执行运算操作,生成候选特征参数。In another implementation of the present invention, when multiple key feature parameters are screened from the target feature set, two key feature parameters can be randomly selected from the multiple key feature parameters to generate a data pair, and calculation operations are performed on the data pair to generate candidate feature parameters.

运算操作例如可以包括加、减、乘、除等运算。对每对数据对所执行的具体的运算方式可以随机确定。The operation may include, for example, addition, subtraction, multiplication, division, etc. The specific operation method performed on each pair of data may be randomly determined.

为了提高模型预测的准确性,在训练数据集中,往往需要保证各个参数之间的相关性较低,从而可以减少多重共线性对模型的影响,避免参数之间存在过高的线性依赖关系。In order to improve the accuracy of model prediction, it is often necessary to ensure that the correlation between various parameters in the training data set is low, so as to reduce the impact of multicollinearity on the model and avoid excessive linear dependence between parameters.

因此,在得到候选特征参数后,可以首先判断候选特征参数与目标特征集合中的任一个特征样本参数的相关性,得到与每个候选特征参数对应的相关性结果。在本发明的实施例中,可以利用皮尔逊相关系数(Pearson correlation coefficient)和斯皮尔曼相关系数(Spearman's rank correlation coefficient)得到候选特征参数与目标特征集合中的任一个特征样本参数的相关性。Therefore, after obtaining the candidate feature parameters, the correlation between the candidate feature parameters and any feature sample parameters in the target feature set can be determined first, and the correlation result corresponding to each candidate feature parameter can be obtained. In an embodiment of the present invention, the correlation between the candidate feature parameters and any feature sample parameters in the target feature set can be obtained using the Pearson correlation coefficient and the Spearman's rank correlation coefficient.

相关性要求例如可以包括相关性大于预设阈值。也就是说,只有相关性结果小于预设阈值,即与目标特征集合中的任一个特征样本参数的相关性均较低的候选特征参数才能加入目标特征集合。The correlation requirement may include, for example, that the correlation is greater than a preset threshold. That is, only candidate feature parameters whose correlation results are less than the preset threshold, that is, those with a low correlation with any feature sample parameter in the target feature set, can be added to the target feature set.

新加入了候选特征参数的目标特征集合可以用于进行下一轮次的模型训练。The target feature set with the newly added candidate feature parameters can be used for the next round of model training.

进一步的,在下一轮次的模型训练完成后,可以继续从目标特征集合中筛选关键特征参数以及基于关键特征参数的候选特征参数的生成操作,直至第一预测模型训练完成。Furthermore, after the next round of model training is completed, the key feature parameters can be screened from the target feature set and the candidate feature parameters can be generated based on the key feature parameters until the first prediction model training is completed.

其中,训练条件例如可以包括训练次数达到预测次数,或者第一预测模型输出的能耗预测值和能耗预测样本数据的偏差值小于预设偏差阈值。The training conditions may include, for example, that the number of training times reaches the number of prediction times, or that the deviation between the energy consumption prediction value output by the first prediction model and the energy consumption prediction sample data is less than a preset deviation threshold.

根据本发明的实施例,从目标特征集中筛选至少一个关键特征参数可以实现为:According to an embodiment of the present invention, screening at least one key feature parameter from the target feature set may be implemented as follows:

确定第一预测模型基于目标特征集生成的第一预测结果;Determine a first prediction result generated by a first prediction model based on a target feature set;

基于第一预测结果,从目标特征集中筛选至少一个关键特征参数。Based on the first prediction result, at least one key feature parameter is selected from the target feature set.

其中,可以将目标特征集中与第一预测结果的关联度较高的特征参数筛选为关键特征参数。Among them, feature parameters with a high correlation with the first prediction result in the target feature set can be screened as key feature parameters.

特征参数与第一预测结果的关联度可以通过例如基于决策树的特征重要性、LASSO(The Least Absolute Shrinkage and Selection Operator,最少绝对收缩和选择算子)回归的系数大小等计算方法计算特征重要性指标,或使用特征选择算法来实现。The correlation between the feature parameter and the first prediction result can be achieved by calculating the feature importance index based on, for example, the feature importance of a decision tree, the coefficient size of LASSO (The Least Absolute Shrinkage and Selection Operator) regression, or by using a feature selection algorithm.

根据本发明的实施例,碳排因子预测方法还包括:According to an embodiment of the present invention, the carbon emission factor prediction method further includes:

从目标区域的历史生产数据中,获取目标历史时间之前的第一时间段产生的第一能耗数据作为第一能耗样本数据、目标历史时间之后的第二时间段产生的第一能耗数据作为能耗预测样本数据;From the historical production data of the target area, first energy consumption data generated in a first time period before the target historical time is obtained as first energy consumption sample data, and first energy consumption data generated in a second time period after the target historical time is obtained as energy consumption prediction sample data;

将第二时间段发生的天气数据作为天气样本数据,以及第二时间段对应的时间数据作为时间样本数据。The weather data occurring in the second time period is used as weather sample data, and the time data corresponding to the second time period is used as time sample data.

在本发明的一些实施例中,碳排因子预测方法还包括:In some embodiments of the present invention, the carbon emission factor prediction method further includes:

基于第一能耗样本数据、时间样本数据、以及至少一种天气样本数据中的至少一个样本特征参数,及至少一个样本特征参数对应的能耗预测样本数据,训练多个第一候选模型;Training a plurality of first candidate models based on the first energy consumption sample data, the time sample data, at least one sample characteristic parameter in at least one weather sample data, and energy consumption prediction sample data corresponding to the at least one sample characteristic parameter;

对多个第一候选模型进行模型评估;performing model evaluation on a plurality of first candidate models;

选择模型评估结果满足性能要求的第一候选模型作为第一预测模型。The first candidate model whose model evaluation result meets the performance requirements is selected as the first prediction model.

在实现本发明构思的过程中发现,不同的模型对数据集中的特征参数有不同的依赖性和敏感性,因此不同的模型在进行能耗预测时的准确性可能不同。基于此,本申请实施例可以选择多个第一候选模型,并对多个第一候选模型进行统一的训练,在训练完成后,通过对多个第一候选模型的评估,来从多个候选模型中确定满足性能新要求的第一预测模型。In the process of implementing the concept of the present invention, it is found that different models have different dependencies and sensitivities on the characteristic parameters in the data set, so different models may have different accuracies when predicting energy consumption. Based on this, the embodiment of the present application can select multiple first candidate models and uniformly train the multiple first candidate models. After the training is completed, the first prediction model that meets the new performance requirements is determined from the multiple candidate models by evaluating the multiple first candidate models.

其中,性能要求例如可以包括预测准确率高于预设阈值。The performance requirement may include, for example, that the prediction accuracy is higher than a preset threshold.

其中,多个第一候选模型可以为利用不同思想和方法构建的模型,例如基于线性回归思想构建的模型、基于神经网络构建的模型、基于支持向量机构建的模型等。Among them, the multiple first candidate models can be models constructed using different ideas and methods, such as a model constructed based on the idea of linear regression, a model constructed based on a neural network, a model constructed based on a support vector machine, etc.

根据本发明的实施例,第二预测模型基于预测能耗样本数据、第二时间样本数据、碳排因子样本数据以及至少一种第一天气样本数据中的至少一个样本特征参数,及至少一个样本特征参数对应的碳排因子预测样本数据训练获得。According to an embodiment of the present invention, the second prediction model is obtained by training the carbon emission factor prediction sample data based on the predicted energy consumption sample data, the second time sample data, the carbon emission factor sample data, and at least one sample characteristic parameter in at least one first weather sample data, and at least one sample characteristic parameter corresponding to the carbon emission factor prediction sample data.

根据本发明的实施例,第二预测模型具体按照如下方式训练获得:According to an embodiment of the present invention, the second prediction model is trained and obtained in the following manner:

确定预测能耗样本数据、时间样本数据、碳排因子样本数据以及至少一种第一天气样本数据中的至少一个样本特征参数;Determine at least one sample characteristic parameter among the predicted energy consumption sample data, the time sample data, the carbon emission factor sample data, and at least one first weather sample data;

由至少一个样本特征参数构成目标特征集;A target feature set is formed by at least one sample feature parameter;

将目标特征集作为模型输入,碳排因子预测样本数据作为训练标签,训练第二预测模型;The target feature set is used as the model input, and the carbon emission factor prediction sample data is used as the training label to train the second prediction model;

从目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set;

将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters;

计算候选特征参数与目标特征集合中的任一个特征样本参数的相关性;Calculate the correlation between the candidate feature parameters and any feature sample parameters in the target feature set;

将相关性未满足相关性要求的候选特征参数加入目标特征集,并返回将目标特征集作为模型输入,碳排因子预测样本数据作为训练标签,训练第二预测模型的步骤继续执行,直至第二预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the target feature set is returned as the model input, and the carbon emission factor prediction sample data is used as the training label. The step of training the second prediction model continues until the second prediction model meets the training conditions.

在实际应用中,为了实现精细化预测,上述的预测能耗样本数据、时间样本数据、碳排因子样本数据可以是时间序列数据,由多个时间步数据元素构成,其中,每个时间步结合实际需求可以进行设定,例如可以为小时级,每个时间步代表1个小时。In practical applications, in order to achieve refined prediction, the above-mentioned predicted energy consumption sample data, time sample data, and carbon emission factor sample data can be time series data, consisting of multiple time step data elements, where each time step can be set according to actual needs, for example, it can be at the hourly level, and each time step represents 1 hour.

上述预测能耗样本数据可以是由多个时间步和每个时间步所对应的能耗值构成;上述天气样本数据可以是由多个时间步和每个时间步所对应的天气数据值构成。The above-mentioned predicted energy consumption sample data may be composed of multiple time steps and the energy consumption value corresponding to each time step; the above-mentioned weather sample data may be composed of multiple time steps and the weather data value corresponding to each time step.

对于目标特征集,可以对目标特征集所包含的样本特征参数进行分析,确定每个样本特征参数对模型预测的重要性程度,并将重要性程度较高的样本特征参数确定为关键特征参数。For the target feature set, the sample feature parameters contained in the target feature set can be analyzed to determine the importance of each sample feature parameter to the model prediction, and the sample feature parameters with higher importance can be determined as key feature parameters.

在本发明的一种可能的实现方式中,可以利用残差决策树、沙普利加和解释等分析方法,对目标特征集所包含的样本特征参数进行分析,来衡量每个样本特征参数对模型预测的贡献程度。较大的指标值可以表示该特征对预测结果的影响较大。In a possible implementation of the present invention, the sample feature parameters contained in the target feature set can be analyzed using analysis methods such as residual decision tree, Shapley and interpretation to measure the contribution of each sample feature parameter to the model prediction. A larger index value can indicate that the feature has a greater impact on the prediction result.

在筛选得到关键特征参数后,可以基于筛选得到的至少一个关键特征参数,生成更多的特征参数。After the key characteristic parameters are obtained through screening, more characteristic parameters may be generated based on at least one key characteristic parameter obtained through screening.

在本发明的一种实现方式中,在从目标特征集中筛选得到一个关键特征参数的情况下,可以对关键特征参数进行预处理,生成第一关键特征参数,然后将关键特征参数和第一关键特征参数组成数据对,对该数据对执行运算操作,生成候选特征参数。In one implementation of the present invention, when a key feature parameter is screened from a target feature set, the key feature parameter can be preprocessed to generate a first key feature parameter, and then the key feature parameter and the first key feature parameter are combined into a data pair, and an operation is performed on the data pair to generate a candidate feature parameter.

对关键特征参数的预处理例如可以包括获取一个权重因子,将权重因子和关键特征参数进行运算,得到第一关键参数。The preprocessing of the key characteristic parameter may include, for example, obtaining a weight factor, and performing an operation on the weight factor and the key characteristic parameter to obtain a first key parameter.

在本发明的另一种实现方式中,在从目标特征集中筛选得到多个关键特征参数的情况下,可以从多个关键特征参数中任选两个关键特征参数生成数据对,对该数据对执行运算操作,生成候选特征参数。In another implementation of the present invention, when multiple key feature parameters are screened from the target feature set, two key feature parameters can be randomly selected from the multiple key feature parameters to generate a data pair, and calculation operations are performed on the data pair to generate candidate feature parameters.

运算操作例如可以包括加、减、乘、除等运算。对每对数据对所执行的具体的运算方式可以随机确定。The calculation operation may include, for example, addition, subtraction, multiplication, division, etc. The specific calculation method performed on each pair of data may be randomly determined.

由于关键特征参数是对模型预测的贡献度较高的参数,那么利用关键特征参数生成的候选特征参数可以会对模型的预测具有较高的贡献度。Since the key feature parameters are parameters that contribute more to the model prediction, the candidate feature parameters generated using the key feature parameters may have a higher contribution to the model prediction.

为了提高模型预测的准确性,在训练数据集中,往往需要保证各个参数之间的相关性较低,从而可以减少多重共线性对模型的影响,避免参数之间存在过高的线性依赖关系。In order to improve the accuracy of model prediction, it is often necessary to ensure that the correlation between various parameters in the training data set is low, so as to reduce the impact of multicollinearity on the model and avoid excessive linear dependence between parameters.

因此,在得到候选特征参数后,可以首先判断候选特征参数与目标特征集合中的任一个特征样本参数的相关性,得到与每个候选特征参数对应的相关性结果。Therefore, after obtaining the candidate feature parameters, the correlation between the candidate feature parameters and any feature sample parameter in the target feature set can be determined first, and the correlation result corresponding to each candidate feature parameter can be obtained.

相关性要求例如可以包括相关性大于预设阈值。也就是说,只有相关性结果小于预设阈值,即与目标特征集合中的任一个特征样本参数的相关性均较低的候选特征参数才能加入目标特征集合。The correlation requirement may include, for example, that the correlation is greater than a preset threshold. That is, only candidate feature parameters whose correlation results are less than the preset threshold, that is, those with a low correlation with any feature sample parameter in the target feature set, can be added to the target feature set.

新加入了候选特征参数的目标特征集合可以用于进行下一轮次的模型训练。The target feature set with the newly added candidate feature parameters can be used for the next round of model training.

进一步的,在下一轮次的模型训练完成后,可以继续从目标特征集合中筛选关键特征参数以及基于关键特征参数的候选特征参数的生成操作,直至第一预测模型训练完成。Furthermore, after the next round of model training is completed, the key feature parameters can be screened from the target feature set and the candidate feature parameters can be generated based on the key feature parameters until the first prediction model training is completed.

其中,训练条件例如可以包括训练次数达到预测次数,或者第一预测模型输出的能耗预测值和能耗预测样本数据的偏差值小于预设偏差阈值。The training conditions may include, for example, that the number of training times reaches the number of prediction times, or that the deviation between the energy consumption prediction value output by the first prediction model and the energy consumption prediction sample data is less than a preset deviation threshold.

为了便于理解,下面以第一预测模型为例,结合图3所示的模型训练示意图,对第一预测模型的训练过程进行介绍。For ease of understanding, the training process of the first prediction model is introduced below by taking the first prediction model as an example in conjunction with the model training schematic diagram shown in FIG3 .

如图3所示,可以将至少一种能源的在历史时间段的第一能耗数据、在预测时间段的天气数据、时间数据等输入数据x输入第一预测模型,得到第一预测结果。As shown in FIG3 , input data x such as first energy consumption data of at least one energy source in a historical time period, weather data in a predicted time period, time data, etc. may be input into a first prediction model to obtain a first prediction result.

在第一预测模型一个轮次的训练结束后,得到了第一预测结果,然后可以基于第一预测结果,进行关键特征提取301,得到至少一个关键特征参数。After a round of training of the first prediction model is completed, a first prediction result is obtained, and then key feature extraction 301 can be performed based on the first prediction result to obtain at least one key feature parameter.

在得到关键特征参数后,可以执行特征生成操作302。例如可以对由任意两个关键特征参数组成的数据对做运算处理生成候选特征参数。After the key feature parameters are obtained, a feature generation operation 302 may be performed. For example, a data pair consisting of any two key feature parameters may be processed to generate candidate feature parameters.

进一步的,可以针对候选特征参数执行特征选择处理303。例如可以确定候选特征参数与目标特征集中的特征参数的相关性,并将相关性较低的候选特征参数加入输入数据x中,用于下一轮次的第一预测模型的训练过程直至第一预测模型符合训练条件。Furthermore, feature selection processing 303 may be performed on the candidate feature parameters. For example, the correlation between the candidate feature parameters and the feature parameters in the target feature set may be determined, and the candidate feature parameters with lower correlation may be added to the input data x for the next round of training of the first prediction model until the first prediction model meets the training conditions.

根据本发明的实施例,第一能耗数据、天气数据、时间数据以及第二能耗数据分别为时间序列数据;According to an embodiment of the present invention, the first energy consumption data, the weather data, the time data and the second energy consumption data are respectively time series data;

根据本发明的实施例,该方法还可以包括:According to an embodiment of the present invention, the method may further include:

根据目标区域对应的第二碳排因子,计算在预测时间段内的任意时间范围内对应的碳排放数量。According to the second carbon emission factor corresponding to the target area, the corresponding carbon emission amount within any time range within the forecast time period is calculated.

其中,碳排放数量可以通过将碳排放因子预测值乘以目标区域在选定的时间范围内的能源消耗量的方式计算得到。The carbon emission amount can be calculated by multiplying the predicted value of the carbon emission factor by the energy consumption of the target area within the selected time range.

根据本发明的实施例,目标区域部署有用以提供计算服务的数据中心,碳排因子预测方法还包括:According to an embodiment of the present invention, a data center for providing computing services is deployed in the target area, and the carbon emission factor prediction method further includes:

基于碳排放数量,生成数据中心的推荐提示信息;Generate recommended information for data centers based on carbon emissions;

向目标用户发送推荐提示信息。Send recommendation prompt information to target users.

其中,推荐提示信息中可以包括目标区域的多个时间范围中,碳排放数量最少的时间范围。该提示信息用于提示用户可以将数据中心的计算任务调度至该时间范围中进行。The recommended prompt information may include a time range with the least carbon emissions among multiple time ranges in the target area. The prompt information is used to prompt the user to schedule the computing task of the data center to be performed within the time range.

根据本发明的实施例,目标区域部署有数据中心,碳排因子预测方法还包括:According to an embodiment of the present invention, a data center is deployed in the target area, and the carbon emission factor prediction method further includes:

根据目标区域对应的第二碳排因子,计算在预测时间段内的任意时间范围内对应的碳排放数量;According to the second carbon emission factor corresponding to the target area, the corresponding carbon emission amount within any time range within the forecast time period is calculated;

结合目标区域对应的第二碳排因子,计算数据中心在预测时间段内的任意时间范围内对应的计算成本;Combined with the second carbon emission factor corresponding to the target area, calculate the corresponding computing cost of the data center within any time range within the forecast time period;

根据不同目标区域的数据中心在不同时间范围分别对应的计算成本,分配计算任务。Computing tasks are allocated based on the computing costs corresponding to data centers in different target areas in different time ranges.

通过碳排因子的预测值计算不同时间范围的计算成本,可以将计算任务分配至计算成本较低的时间范围内运行,从而可以降低数据中心的运行成本。By calculating the computing costs of different time ranges through the predicted value of the carbon emission factor, the computing tasks can be allocated to the time range with lower computing costs, thereby reducing the operating costs of the data center.

根据本发明的实施例,基于第一能耗数据、至少一种天气数据、以及表示预测时间段的时间数据中的至少一个特征参数,预测目标区域在预测时间段内至少一种能源对应的第二能耗数据具体可以实现为:According to an embodiment of the present invention, based on the first energy consumption data, at least one weather data, and at least one characteristic parameter in the time data representing the prediction time period, predicting the second energy consumption data corresponding to at least one energy source in the target area within the prediction time period can be specifically implemented as follows:

确定所述第一能耗数据、所述至少一种天气数据、以及表示所述预测时间段的时间数据构成的至少一个初始特征参数;determining at least one initial characteristic parameter consisting of the first energy consumption data, the at least one weather data, and time data representing the predicted time period;

由所述至少一个初始特征参数构成第一特征集;forming a first feature set by the at least one initial feature parameter;

将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数;Performing an operation on any two feature parameters in the first feature set to generate a target feature parameter;

计算所述目标特征参数与初始特征集中的任一个特征参数的相关性;Calculating the correlation between the target feature parameter and any feature parameter in the initial feature set;

将相关性未满足相关性要求的目标特征参数加入所述第一特征集,并返回将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数的步骤继续执行,直至所述第一特征集满足特征要求,获得第二特征集;Adding target feature parameters whose correlations do not meet the correlation requirements to the first feature set, and returning to perform an operation on any two feature parameters in the first feature set to generate target feature parameters, the step continues until the first feature set meets the feature requirements, thereby obtaining a second feature set;

利用所述第二特征集,预测所述目标区域在预测时间段内所述至少一种能源对应的第二能耗数据。The second feature set is used to predict second energy consumption data corresponding to the at least one energy source in the target area within a prediction time period.

在碳排因子预测的实际应用过程中,可以会出现第一能耗数据、至少一种天气数据或者表示预测时间段的时间数据存在数据缺失的情况。数据缺失可能会影响碳排因子预测的准确性。In the actual application process of carbon emission factor prediction, the first energy consumption data, at least one weather data, or time data representing the prediction time period may be missing. Missing data may affect the accuracy of carbon emission factor prediction.

由此,在执行碳排因子的预测之前,可以首先执行特征生成操作。Therefore, before performing the prediction of the carbon emission factor, a feature generation operation can be performed first.

对于第一特征集,可以对第一特征集所包含的初始特征参数进行分析,确定每个初始特征参数对模型预测的重要性程度,并将重要性程度较高的样本特征参数确定为关键特征参数。For the first feature set, the initial feature parameters contained in the first feature set can be analyzed to determine the importance of each initial feature parameter to the model prediction, and the sample feature parameters with higher importance can be determined as key feature parameters.

在本发明的一种可能的实现方式中,可以利用残差决策树、沙普利加和解释等分析方法,对第一特征集所包含的初始特征参数进行分析,来衡量每个初始特征参数对模型预测的贡献程度。较大的指标值可以表示该特征对预测结果的影响较大。In a possible implementation of the present invention, the initial feature parameters contained in the first feature set can be analyzed using analysis methods such as residual decision tree, Shapley and interpretation to measure the contribution of each initial feature parameter to the model prediction. A larger index value can indicate that the feature has a greater impact on the prediction result.

在筛选得到初始关键特征参数后,可以基于筛选得到的至少一个初始关键特征参数,生成更多的特征参数。After the initial key characteristic parameters are obtained through screening, more characteristic parameters may be generated based on at least one initial key characteristic parameter obtained through screening.

在本发明的一种实现方式中,在从第一特征集中筛选得到多个初始关键特征参数的情况下,可以从多个初始关键特征参数中任选两个初始关键特征参数生成数据对,对该数据对执行运算操作,生成目标特征参数。In one implementation of the present invention, when multiple initial key feature parameters are screened from the first feature set, two initial key feature parameters can be randomly selected from the multiple initial key feature parameters to generate a data pair, and an operation is performed on the data pair to generate a target feature parameter.

运算操作例如可以包括加、减、乘、除等运算。对每对数据对所执行的具体的运算方式可以随机确定。The operation may include, for example, addition, subtraction, multiplication, division, etc. The specific operation method performed on each pair of data may be randomly determined.

由于初始关键特征参数是对模型预测的贡献度较高的参数,那么利用初始关键特征参数生成的目标特征参数可以会对模型的预测具有较高的贡献度。Since the initial key feature parameters are parameters that contribute more to the model prediction, the target feature parameters generated using the initial key feature parameters may have a higher contribution to the model prediction.

为了提高模型预测的准确性,在训练数据集中,往往需要保证各个参数之间的相关性较低,从而可以减少多重共线性对模型的影响,避免参数之间存在过高的线性依赖关系。In order to improve the accuracy of model prediction, it is often necessary to ensure that the correlation between various parameters in the training data set is low, so as to reduce the impact of multicollinearity on the model and avoid excessive linear dependence between parameters.

因此,在得到目标特征参数后,可以首先判断目标特征参数与初始特征集合中的任一个初始特征样本参数的相关性,得到与每个目标特征参数对应的相关性结果。在本发明的实施例中,可以利用皮尔逊相关系数(Pearson correlation coefficient)和斯皮尔曼相关系数(Spearman's rank correlation coefficient)得到候选特征参数与目标特征集合中的任一个特征样本参数的相关性。Therefore, after obtaining the target feature parameter, the correlation between the target feature parameter and any initial feature sample parameter in the initial feature set can be determined first, and the correlation result corresponding to each target feature parameter can be obtained. In an embodiment of the present invention, the correlation between the candidate feature parameter and any feature sample parameter in the target feature set can be obtained using the Pearson correlation coefficient and the Spearman's rank correlation coefficient.

相关性要求例如可以包括相关性大于预设阈值。也就是说,只有相关性结果小于预设阈值,即与初始特征集合中的任一个初始特征样本参数的相关性均较低的目标特征参数才能加入初始特征集合。The correlation requirement may include, for example, that the correlation is greater than a preset threshold. That is, only target feature parameters with a correlation result less than the preset threshold, that is, with a low correlation with any initial feature sample parameter in the initial feature set, can be added to the initial feature set.

图4示意性示出了本发明一个实施例提供的一种模型训练方法的流程图,如图4所示,该模型训练方法具体可以包括以下步骤:FIG4 schematically shows a flow chart of a model training method provided by an embodiment of the present invention. As shown in FIG4 , the model training method may specifically include the following steps:

401,确定至少一个样本特征参数以及至少一个样本特征参数对应的训练标签;401, determining at least one sample feature parameter and a training label corresponding to the at least one sample feature parameter;

402,由至少一个样本特征参数构成目标特征集;402, forming a target feature set from at least one sample feature parameter;

403,利用目标特征集以及训练标签,训练预测模型;403, training a prediction model using the target feature set and the training labels;

作为一种可选方式,至少一个样本特征参数包括第一能耗样本数据、时间样本数据及至少一种天气样本数据中的至少一个,训练标签包括能耗预测样本数据;该预测模型也即为上述第一预测模型。As an optional method, at least one sample characteristic parameter includes at least one of first energy consumption sample data, time sample data and at least one weather sample data, and the training label includes energy consumption prediction sample data; the prediction model is also the above-mentioned first prediction model.

作为另一种可选方式,至少一个样本特征参数包括预测能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个,训练标签包括碳排因子预测样本数据;该预测模型也即为上述第二预测模型。As another optional method, at least one sample characteristic parameter includes at least one of predicted energy consumption sample data, time sample data, carbon emission factor historical sample data and at least one weather sample data, and the training label includes carbon emission factor predicted sample data; the prediction model is also the second prediction model mentioned above.

404,从目标特征集中筛选至少一个关键特征参数;404, selecting at least one key feature parameter from the target feature set;

405,将任意两个关键特征参数执行运算操作,生成候选特征参数;405, performing an operation on any two key feature parameters to generate candidate feature parameters;

406,计算候选特征参数与目标特征集合中的任一个特征样本参数的相关性;406, calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

407,将相关性未满足相关性要求的候选特征参数加入目标特征集,并返回利用目标特征集以及训练标签,训练预测模型的步骤继续执行,直至预测模型达到训练条件。407, adding the candidate feature parameters whose correlations do not meet the correlation requirements to the target feature set, and returning to the step of training the prediction model using the target feature set and the training labels until the prediction model meets the training conditions.

在实际应用中,为了实现精细化预测,上述的第一能耗样本数据、天气样本数据、时间样本数据可以是时间序列数据,由多个时间步数据元素构成,其中,每个时间步结合实际需求可以进行设定,例如可以为小时级,每个时间步代表1个小时。In practical applications, in order to achieve refined prediction, the above-mentioned first energy consumption sample data, weather sample data, and time sample data can be time series data, composed of multiple time step data elements, wherein each time step can be set according to actual needs, for example, it can be at the hourly level, and each time step represents 1 hour.

上述历史样本能耗数据可以是由多个时间步和每个时间步所对应的能耗值构成;上述天气样本数据可以是由多个时间步和每个时间步所对应的天气数据值构成。The above historical sample energy consumption data may be composed of multiple time steps and the energy consumption value corresponding to each time step; the above weather sample data may be composed of multiple time steps and the weather data value corresponding to each time step.

第一能耗样本数据可以包括从目标区域的历史生产数据中,获取的目标历史时间之前的第一时间段产生的第一能耗数据。目标历史时间之后的第二时间段产生的第一能耗数据可以作为能耗样本数据。The first energy consumption sample data may include first energy consumption data generated in a first time period before a target historical time obtained from historical production data of the target area. The first energy consumption data generated in a second time period after the target historical time may be used as the energy consumption sample data.

天气样本数据可以为第二时间段发生的天气数据;时间样本数据可以为第二时间段对应的时间数据。The weather sample data may be weather data occurring in the second time period; and the time sample data may be time data corresponding to the second time period.

其中,目标历史时间可以是指在当前时间点之前的时间目标历史时间例如可以是当前时间点之前的历史时间点和当前时间点所构成的历史时间段,也可以是当前时间点之前的第一历史时间点和当前时间点之前的第二历史时间点构成的历史时间段。Among them, the target historical time can refer to the time before the current time point. For example, the target historical time can be the historical time period composed of the historical time point before the current time point and the current time point, or it can be the historical time period composed of the first historical time point before the current time point and the second historical time point before the current time point.

在本发明的实施例中,历史时间段的长度可以根据实际的应用需求进行灵活选取,例如可以选取一天、一周、一个月、一年等,在此不对历史时间段的长度进行限定。In the embodiment of the present invention, the length of the historical time period can be flexibly selected according to actual application requirements, for example, one day, one week, one month, one year, etc., and the length of the historical time period is not limited here.

其中,在用电领域中,能源可以是指能够产生电能的能源,包括传统能源以及新型能源,传统能源可以指在使用或者生产过程中会产生二氧化碳等温室气体的能源,例如煤、石油、天然气等,新型能源例如可以是指太阳能、风能等。Among them, in the field of electricity consumption, energy can refer to energy that can generate electricity, including traditional energy and new energy. Traditional energy can refer to energy that will produce greenhouse gases such as carbon dioxide during use or production, such as coal, oil, natural gas, etc. New energy can refer to solar energy, wind energy, etc.

目标区域可以指一个相对独立的地理范围,例如国家、省、市、学校、工业园区等。The target area can refer to a relatively independent geographical scope, such as a country, province, city, school, industrial park, etc.

对于目标特征集,可以对目标特征集所包含的样本特征参数进行分析,确定每个样本特征参数对模型预测的重要性程度,并将重要性程度较高的样本特征参数确定为关键特征参数。For the target feature set, the sample feature parameters contained in the target feature set can be analyzed to determine the importance of each sample feature parameter to the model prediction, and the sample feature parameters with higher importance can be determined as key feature parameters.

在本发明的一种可能的实现方式中,可以利用残差决策树、沙普利加和解释等分析方法,对目标特征集所包含的样本特征参数进行分析,来衡量每个样本特征参数对模型预测的贡献程度。较大的指标值可以表示该特征对预测结果的影响较大。In a possible implementation of the present invention, the sample feature parameters contained in the target feature set can be analyzed using analysis methods such as residual decision tree, Shapley and interpretation to measure the contribution of each sample feature parameter to the model prediction. A larger index value can indicate that the feature has a greater impact on the prediction result.

在筛选得到关键特征参数后,可以基于筛选得到的至少一个关键特征参数,生成更多的特征参数。After the key characteristic parameters are obtained through screening, more characteristic parameters may be generated based on at least one key characteristic parameter obtained through screening.

在本发明的一种实现方式中,在从目标特征集中筛选得到一个关键特征参数的情况下,可以对关键特征参数进行预处理,生成第一关键特征参数,然后将关键特征参数和第一关键特征参数组成数据对,对该数据对执行运算操作,生成候选特征参数。In one implementation of the present invention, when a key feature parameter is screened from a target feature set, the key feature parameter can be preprocessed to generate a first key feature parameter, and then the key feature parameter and the first key feature parameter are combined into a data pair, and an operation is performed on the data pair to generate a candidate feature parameter.

对关键特征参数的预处理例如可以包括获取一个权重因子,将权重因子和关键特征参数进行运算,得到第一关键参数。The preprocessing of the key characteristic parameter may include, for example, obtaining a weight factor, and performing an operation on the weight factor and the key characteristic parameter to obtain a first key parameter.

在本发明的另一种实现方式中,在从目标特征集中筛选得到多个关键特征参数的情况下,可以从多个关键特征参数中任选两个关键特征参数生成数据对,对该数据对执行运算操作,生成候选特征参数。In another implementation of the present invention, when multiple key feature parameters are screened from the target feature set, two key feature parameters can be randomly selected from the multiple key feature parameters to generate a data pair, and calculation operations are performed on the data pair to generate candidate feature parameters.

运算操作例如可以包括加、减、乘、除等运算。对每对数据对所执行的具体的运算方式可以随机确定。The calculation operation may include, for example, addition, subtraction, multiplication, division, etc. The specific calculation method performed on each pair of data may be randomly determined.

由于关键特征参数是对模型预测的贡献度较高的参数,那么利用关键特征参数生成的候选特征参数可以会对模型的预测具有较高的贡献度。Since the key feature parameters are parameters that contribute more to the model prediction, the candidate feature parameters generated using the key feature parameters may have a higher contribution to the model prediction.

为了提高模型预测的准确性,在训练数据集中,往往需要保证各个参数之间的相关性较低,从而可以减少多重共线性对模型的影响,避免参数之间存在过高的线性依赖关系。In order to improve the accuracy of model prediction, it is often necessary to ensure that the correlation between various parameters in the training data set is low, so as to reduce the impact of multicollinearity on the model and avoid excessive linear dependence between parameters.

因此,在得到候选特征参数后,可以首先判断候选特征参数与目标特征集合中的任一个特征样本参数的相关性,得到与每个候选特征参数对应的相关性结果。Therefore, after obtaining the candidate feature parameters, the correlation between the candidate feature parameters and any feature sample parameter in the target feature set can be determined first, and the correlation result corresponding to each candidate feature parameter can be obtained.

相关性要求例如可以包括相关性大于预设阈值。也就是说,只有相关性结果小于预设阈值,即与目标特征集合中的任一个特征样本参数的相关性均较低的候选特征参数才能加入目标特征集合。The correlation requirement may include, for example, that the correlation is greater than a preset threshold. That is, only candidate feature parameters whose correlation results are less than the preset threshold, that is, those with a low correlation with any feature sample parameter in the target feature set, can be added to the target feature set.

新加入了候选特征参数的目标特征集合可以用于进行下一轮次的模型训练。The target feature set with the newly added candidate feature parameters can be used for the next round of model training.

进一步的,在下一轮次的模型训练完成后,可以继续从目标特征集合中筛选关键特征参数以及基于关键特征参数的候选特征参数的生成操作,直至预测模型训练完成。Furthermore, after the next round of model training is completed, the key feature parameters can be screened from the target feature set and the generation operation of candidate feature parameters based on the key feature parameters can be continued until the prediction model training is completed.

其中,训练条件例如可以包括训练次数达到预测次数,或者预测模型输出的能耗预测值和能耗预测样本数据的偏差值小于预设偏差阈值。The training conditions may include, for example, that the number of training times reaches the number of prediction times, or that the deviation between the energy consumption prediction value output by the prediction model and the energy consumption prediction sample data is less than a preset deviation threshold.

下面以数据中心的计算任务分配场景为例,结合图5所示的场景示意图,对本申请实施例的技术方案进行介绍。The following takes the computing task allocation scenario of a data center as an example, combined with the scenario diagram shown in Figure 5, to introduce the technical solution of the embodiment of the present application.

假设在多个区域分别部署有数据中心500,服务端501可以针对任一个区域(目标区域),获取目标区域在T~T-L的历史时间段的第一能耗数据,利用第一预测模型,基于第一能耗数据,预测得到目标区域在预测时间段的第二能耗数据。然后,可以利用第二预测模型,基于第二能耗数据,以及权威机构所发布的目标区域在历史时间段的第一碳排因子,预测得到目标区域在预测时间段的第二碳排因子。Assuming that data centers 500 are deployed in multiple regions, the server 501 can obtain the first energy consumption data of the target region in the historical time period T~T-L for any region (target region), and use the first prediction model to predict the second energy consumption data of the target region in the prediction time period based on the first energy consumption data. Then, the second prediction model can be used to predict the second carbon emission factor of the target region in the prediction time period based on the second energy consumption data and the first carbon emission factor of the target region in the historical time period published by the authoritative organization.

其中,T表示当前时间步,L可以为任意自然数,T-L可以表示当前时间步之前L个时间步。Among them, T represents the current time step, L can be any natural number, and T-L can represent L time steps before the current time step.

服务端501根据T+1~T+L时间段的碳排因子预测序列,假设想要对T+1~T+M的M个小时进行任务安排,其中,M小于L,可以结合T+1~T+M时间段的功率,计算获得T+1~T+M的M个小时中,每个小时的碳排放数量。其中,T+L可以表示当前时间步之后L个时间步,T+M可以表示当前时间步之后M个时间步。Based on the carbon emission factor prediction sequence of the time period T+1~T+L, the server 501 assumes that it wants to schedule tasks for M hours from T+1~T+M, where M is less than L. The power of the time period T+1~T+M can be combined to calculate the carbon emission amount for each hour in the M hours from T+1~T+M. T+L can represent L time steps after the current time step, and T+M can represent M time steps after the current time step.

服务端501根据多个区域在T+1~T+M时间段分别对应的碳排放数量,比如可以将碳排数量较多的第一数据中心的计算任务迁移至碳排数量较少的第二数据中心。The server 501 can migrate the computing tasks of a first data center with a larger carbon emission amount to a second data center with a smaller carbon emission amount, for example, according to the carbon emission amounts corresponding to the multiple regions in the time period T+1 to T+M.

或者,将待处理的计算任务分配至第一数据中心的碳排放数量较少的T+N小时进行计算处理。Alternatively, the computing tasks to be processed are allocated to the first data center for computing and processing during the T+N hours when the carbon emissions are relatively small.

图6为本申请实施例提供的一种碳排因子的预测装置一个实施例的结构示意图,碳排因子的预测装置600可以包括:FIG6 is a schematic diagram of the structure of an embodiment of a device for predicting a carbon emission factor provided in an embodiment of the present application. The device for predicting a carbon emission factor 600 may include:

第一获取模块601,用于获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;A first acquisition module 601 is used to acquire first energy consumption data generated by at least one energy source in a target area during a historical period;

第一预测模块602,用于基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;A first prediction module 602, configured to predict second energy consumption data of the at least one energy source within a prediction time period of the target area based on the first energy consumption data of the at least one energy source;

第二获取模块603,用于获取所述目标区域在所述历史时间段内发布的第一碳排因子;The second acquisition module 603 is used to acquire the first carbon emission factor released by the target area within the historical time period;

第二预测模块604,用于基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。The second prediction module 604 is used to predict the second carbon emission factor corresponding to the target area within the prediction time period based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第三获取模块,用于获取所述目标区域在所述预测时间段内对应的至少一种天气数据:The third acquisition module is used to acquire at least one weather data corresponding to the target area within the predicted time period:

根据本发明的实施例,第一预测模块602包括:According to an embodiment of the present invention, the first prediction module 602 includes:

第一预测子模块,用于基于所述至少一种能源的第一能耗数据、所述至少一种天气数据、以及所述预测时间段对应的时间数据中的至少一个特征参数,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据。The first prediction submodule is used to predict the second energy consumption data of the at least one energy within the prediction time period of the target area based on the first energy consumption data of the at least one energy, the at least one weather data, and at least one characteristic parameter in the time data corresponding to the prediction time period.

根据本发明的实施例,第二预测模块604包括:According to an embodiment of the present invention, the second prediction module 604 includes:

第二预测子模块,用于基于所述至少一种能源的第二能耗数据、所述至少一种天气数据、所述时间数据及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。The second prediction submodule is used to predict the second carbon emission factor corresponding to the target area within the prediction time period based on the second energy consumption data of the at least one energy source, the at least one weather data, the time data and at least one characteristic parameter of the first carbon emission factor.

根据本发明的实施例,第一预测子模块包括:According to an embodiment of the present invention, the first prediction submodule includes:

第一预测单元,用于针对任一种能源,基于所述能源的第一能耗数据、所述至少一种天气数据、以及所述预测时间段对应的时间数据中的至少一个特征参数,利用第一预测模型,预测所述能源在预测时间段内的第二能耗数据;A first prediction unit is used for predicting, for any energy source, second energy consumption data of the energy source within the prediction time period using a first prediction model based on the first energy consumption data of the energy source, the at least one weather data, and at least one characteristic parameter in the time data corresponding to the prediction time period;

根据本发明的实施例,第二预测子模块包括:According to an embodiment of the present invention, the second prediction submodule includes:

第二预测单元,用于基于所述至少一种能源的第二能耗数据、所述至少一种天气数据、所述时间数据及所述第一碳排因子中的至少一个特征参数,利用第二预测模型,预测所述目标区域在所述预测时间段内的第二碳排因子。The second prediction unit is used to predict the second carbon emission factor of the target area within the prediction time period using a second prediction model based on the second energy consumption data of the at least one energy source, the at least one weather data, the time data and at least one characteristic parameter of the first carbon emission factor.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第二确定模块,用于确定第一能耗样本数据、时间样本数据、及至少一种天气样本数据中的至少一个样本特征参数;A second determination module, used to determine at least one sample characteristic parameter among the first energy consumption sample data, the time sample data, and at least one weather sample data;

第二特征集构建模块,用于由所述至少一个样本特征参数构成目标特征集;A second feature set construction module, configured to construct a target feature set from the at least one sample feature parameter;

第三训练模块,用于将所述目标特征集作为模型输入,能耗预测样本数据作为训练标签,训练所述第一预测模型;A third training module is used to train the first prediction model by using the target feature set as a model input and the energy consumption prediction sample data as a training label;

第二筛选模块,用于从所述目标特征集中筛选至少一个关键特征参数;A second screening module, used to screen at least one key feature parameter from the target feature set;

第二参数生成模块,用于将任意两个关键特征参数执行运算操作,生成候选特征参数;The second parameter generation module is used to perform an operation on any two key feature parameters to generate candidate feature parameters;

第二计算模块,用于计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;A second calculation module, used for calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

第四训练模块,用于将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并触发所述第三训练模块继续执行,直至所述第一预测模型达到训练条件。The fourth training module is used to add candidate feature parameters whose correlations do not meet the correlation requirements into the target feature set, and trigger the third training module to continue executing until the first prediction model meets the training conditions.

根据本发明的实施例,第二筛选模块包括:According to an embodiment of the present invention, the second screening module includes:

第一结果确定单元,用于确定所述第一预测模型基于所述目标特征集生成的第一预测结果;A first result determination unit, configured to determine a first prediction result generated by the first prediction model based on the target feature set;

筛选单元,用于基于所述第一预测结果,从所述目标特征集中筛选至少一个关键特征参数。A screening unit is used to screen at least one key feature parameter from the target feature set based on the first prediction result.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第一数据确定模块,用于从所述目标区域的历史生产数据中,获取目标历史时间之前的第一时间段产生的第一能耗数据作为第一能耗样本数据、所述目标历史时间之后的第二时间段产生的第一能耗数据作为能耗预测样本数据;A first data determination module is used to obtain, from the historical production data of the target area, first energy consumption data generated in a first time period before the target historical time as first energy consumption sample data, and first energy consumption data generated in a second time period after the target historical time as energy consumption prediction sample data;

第二数据确定模块,用于将所述第二时间段发生的天气数据作为天气样本数据,以及所述第二时间段对应的时间数据作为时间样本数据。The second data determination module is used to use the weather data occurring in the second time period as weather sample data, and the time data corresponding to the second time period as time sample data.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

模型训练模块,用于基于第一能耗样本数据、时间样本数据、以及至少一种天气样本数据中的至少一个样本特征参数,及所述至少一个样本特征参数对应的能耗预测样本数据,训练多个第一候选模型;A model training module, used for training a plurality of first candidate models based on the first energy consumption sample data, the time sample data, at least one sample characteristic parameter in at least one weather sample data, and energy consumption prediction sample data corresponding to the at least one sample characteristic parameter;

模型评估模块,用于对所述多个第一候选模型进行模型评估;A model evaluation module, used for performing model evaluation on the plurality of first candidate models;

模型确定模块,用于选择模型评估结果满足性能要求的第一候选模型作为所述第一预测模型。The model determination module is used to select a first candidate model whose model evaluation result meets the performance requirements as the first prediction model.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第三确定模块,用于确定第二能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个样本特征参数;A third determination module is used to determine at least one sample characteristic parameter among the second energy consumption sample data, the time sample data, the carbon emission factor historical sample data and at least one weather sample data;

第三特征集构建模块,用于由所述至少一个样本特征参数构成目标特征集;A third feature set construction module, configured to construct a target feature set from the at least one sample feature parameter;

第五训练模块,用于将所述目标特征集作为模型输入,碳排因子预测样本数据作为训练标签,训练所述第二预测模型;A fifth training module, used to train the second prediction model by taking the target feature set as a model input and the carbon emission factor prediction sample data as a training label;

第三筛选模块,用于从所述目标特征集中筛选至少一个关键特征参数;A third screening module, used to screen at least one key feature parameter from the target feature set;

第三参数生成模块,用于将任意两个关键特征参数执行运算操作,生成候选特征参数;The third parameter generation module is used to perform an operation on any two key feature parameters to generate candidate feature parameters;

第三计算模块,用于计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;A third calculation module, used to calculate the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

第六训练模块,用于将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并触发所述第五训练模块继续执行,直至所述第二预测模型达到训练条件。The sixth training module is used to add candidate feature parameters whose correlations do not meet the correlation requirements into the target feature set, and trigger the fifth training module to continue executing until the second prediction model meets the training conditions.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第一碳排计算模块,用于根据所述目标区域对应的第二碳排因子,计算在所述预测时间段内的任意时间范围内对应的碳排放数量。The first carbon emission calculation module is used to calculate the corresponding carbon emission quantity within any time range within the predicted time period according to the second carbon emission factor corresponding to the target area.

根据本发明的实施例,所述目标区域部署有用以提供计算服务的数据中心。According to an embodiment of the present invention, a data center for providing computing services is deployed in the target area.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

提示信息生成模块,用于基于所述碳排放数量,生成所述数据中心的推荐提示信息;A prompt information generating module, used for generating recommended prompt information of the data center based on the carbon emission amount;

提示信息发送模块,用于向目标用户发送所述推荐提示信息。The prompt information sending module is used to send the recommendation prompt information to the target user.

根据本发明的实施例,所述目标区域部署有数据中心。According to an embodiment of the present invention, a data center is deployed in the target area.

根据本发明的实施例,碳排因子的预测装置还包括:According to an embodiment of the present invention, the device for predicting the carbon emission factor further includes:

第二碳排计算模块,用于根据所述目标区域对应的第二碳排因子,计算在所述预测时间段内的任意时间范围内对应的碳排放数量;A second carbon emission calculation module, used to calculate the corresponding carbon emission amount within any time range within the predicted time period according to the second carbon emission factor corresponding to the target area;

成本计算模块,用于结合所述目标区域对应的第二碳排因子,计算所述数据中心在所述预测时间段内的任意时间范围内对应的计算成本;A cost calculation module, used to calculate the corresponding computing cost of the data center within any time range within the forecast time period in combination with the second carbon emission factor corresponding to the target area;

任务分配模块,用于根据不同目标区域的数据中心在不同时间范围分别对应的计算成本,分配计算任务。The task allocation module is used to allocate computing tasks according to the computing costs corresponding to data centers in different target areas in different time ranges.

根据本发明的实施例,第一预测子模块包括:According to an embodiment of the present invention, the first prediction submodule includes:

第四确定模块,用于确定所述第一能耗数据、所述至少一种天气数据、以及表示所述预测时间段的时间数据构成的至少一个初始特征参数;a fourth determination module, configured to determine at least one initial characteristic parameter consisting of the first energy consumption data, the at least one weather data, and time data representing the predicted time period;

第五特征集构建模块,用于由所述至少一个初始特征参数构成第一特征集;a fifth feature set construction module, configured to construct a first feature set from the at least one initial feature parameter;

第四参数生成模块,用于将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数;A fourth parameter generating module, used for performing an operation on any two feature parameters in the first feature set to generate a target feature parameter;

第四计算模块,用于计算所述目标特征参数与初始特征集中的任一个特征参数的相关性;A fourth calculation module, used to calculate the correlation between the target feature parameter and any feature parameter in the initial feature set;

特征合并模块,用于将相关性未满足相关性要求的目标特征参数加入所述第一特征集,并返回将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数的步骤继续执行,直至所述第一特征集满足特征要求,获得第二特征集;A feature merging module, used for adding target feature parameters whose correlations do not meet the correlation requirements into the first feature set, and returning to perform an operation on any two feature parameters in the first feature set to generate target feature parameters, until the first feature set meets the feature requirements, thereby obtaining a second feature set;

能耗预测模块,用于利用所述第二特征集,预测所述目标区域在预测时间段内所述至少一种能源对应的第二能耗数据。The energy consumption prediction module is used to use the second feature set to predict the second energy consumption data corresponding to the at least one energy source in the target area within a prediction time period.

图6所述的模型训练装置可以执行图1所示实施例所述的碳排因子的预测方法,其实现原理和技术效果不再赘述。对于上述实施例中的碳排因子的预测装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The model training device described in FIG6 can execute the carbon emission factor prediction method described in the embodiment shown in FIG1, and its implementation principle and technical effect are not described in detail. The specific manner in which each module and unit performs the operation of the carbon emission factor prediction device in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

图7为本申请实施例提供的一种模型训练装置一个实施例的结构示意图,模型训练装置700可以包括:FIG. 7 is a schematic diagram of a structure of an embodiment of a model training device provided in an embodiment of the present application. The model training device 700 may include:

第一确定模块701,用于确定至少一个样本特征参数以及所述至少一个样本特征参数对应的训练标签;所述至少一个样本特征参数包括第一能耗样本数据、时间样本数据及至少一种天气样本数据中的至少一个,所述训练标签包括能耗预测样本数据;或者所述至少一个样本特征参数包括预测能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个,所述训练标签包括碳排因子预测样本数据;The first determination module 701 is used to determine at least one sample characteristic parameter and a training label corresponding to the at least one sample characteristic parameter; the at least one sample characteristic parameter includes at least one of first energy consumption sample data, time sample data and at least one weather sample data, and the training label includes energy consumption prediction sample data; or the at least one sample characteristic parameter includes at least one of predicted energy consumption sample data, time sample data, carbon emission factor historical sample data and at least one weather sample data, and the training label includes carbon emission factor prediction sample data;

第一特征集构建模块702,用于由所述至少一个样本特征参数构成目标特征集;A first feature set construction module 702, configured to construct a target feature set from the at least one sample feature parameter;

第一训练模块703,用于利用所述目标特征集以及所述训练标签,训练预测模型;A first training module 703, used to train a prediction model using the target feature set and the training labels;

第一筛选模块704,用于从所述目标特征集中筛选至少一个关键特征参数;A first screening module 704, configured to screen at least one key feature parameter from the target feature set;

第一参数生成模块705,用于将任意两个关键特征参数执行运算操作,生成候选特征参数;The first parameter generation module 705 is used to perform an operation on any two key feature parameters to generate candidate feature parameters;

第一计算模块706,用于计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;A first calculation module 706, configured to calculate the correlation between the candidate feature parameter and any feature sample parameter in the target feature set;

第二训练模块707,用于将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并触发第一训练模块继续执行,直至所述预测模型达到训练条件。The second training module 707 is used to add candidate feature parameters whose correlations do not meet the correlation requirements to the target feature set, and trigger the first training module to continue executing until the prediction model meets the training conditions.

图7所述的模型训练装置可以执行图5所示实施例所述的模型训练方法,其实现原理和技术效果不再赘述。对于上述实施例中的模型训练装置其中各个模块、单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。The model training device described in FIG7 can execute the model training method described in the embodiment shown in FIG5, and its implementation principle and technical effect are not described in detail. The specific manner in which each module and unit performs operations in the model training device in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

在一个可能的设计中,本发明实施例提供的碳排因子的预测装置、模型训练装置可以实现为计算设备,如图8所示,该计算设备可以包括存储组件801以及处理组件802;In a possible design, the carbon emission factor prediction device and model training device provided in the embodiment of the present invention may be implemented as a computing device. As shown in FIG8 , the computing device may include a storage component 801 and a processing component 802;

存储组件801存储一条或多条计算机指令,其中,所述一条或多条计算机指令供所述处理组件802调用执行,用以实现本发明实施例提供的碳排因子的预测方法、模型训练方法。The storage component 801 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 802 to implement the carbon emission factor prediction method and model training method provided in the embodiment of the present invention.

当然,计算设备必然还可以包括其他部件,例如输入/输出接口、通信组件等。输入/输出接口为处理组件和外围接口模块之间提供接口,上述外围接口模块可以是输出设备、输入设备等。通信组件被配置为便于计算设备和其他设备之间有线或无线方式的通信等。Of course, the computing device may also include other components, such as input/output interfaces, communication components, etc. The input/output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc. The communication component is configured to facilitate wired or wireless communication between the computing device and other devices.

其中,该计算设备可以为物理设备或者云计算平台提供的弹性计算主机等,此时计算设备即可以是指云服务器,上述处理组件、存储组件等可以是从云计算平台租用或购买的基础服务器资源。Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

当计算设备为物理设备时,可以实现成多个服务器或终端设备组成的分布式集群,也可以实现成单个服务器或单个终端设备。When the computing device is a physical device, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device.

本发明实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被计算机执行时可以实现本发明实施例提供的碳排因子的预测方法、模型训练方法。An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a computer, the carbon emission factor prediction method and model training method provided in the embodiment of the present invention can be implemented.

本发明实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被计算机执行时可以实现本发明实施例提供的碳排因子的预测方法、模型训练方法。The embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a computer, the carbon emission factor prediction method and model training method provided in the embodiment of the present invention can be implemented.

其中,前文相应实施例中的处理组件可以包括一个或多个处理器来执行计算机指令,以完成上述的方法中的全部或部分步骤。当然处理组件也可以为一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。The processing components in the above corresponding embodiments may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing components may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

存储组件被配置为存储各种类型的数据以支持在设备中操作。存储组件可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The storage component is configured to store various types of data to support operations in the device. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (17)

1.一种碳排因子的预测方法,其特征在于,包括:1. A method for predicting a carbon emission factor, comprising: 获取历史时间段内至少一种能源在目标区域产生的第一能耗数据;Acquire first energy consumption data generated by at least one energy source in a target area during a historical time period; 基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据;Based on the first energy consumption data of the at least one energy source, predicting second energy consumption data of the at least one energy source within a predicted time period of the target area; 获取所述目标区域在所述历史时间段内发布的第一碳排因子;Obtaining the first carbon emission factor released by the target area during the historical time period; 基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。Based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor, a second carbon emission factor corresponding to the target area within the prediction time period is predicted. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method according to claim 1, further comprising: 获取所述目标区域在所述预测时间段内对应的至少一种天气数据:Obtain at least one weather data corresponding to the target area within the forecast time period: 所述基于所述至少一种能源的第一能耗数据,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据包括:The predicting, based on the first energy consumption data of the at least one energy source, second energy consumption data of the at least one energy source within a predicted time period of the target area comprises: 基于所述至少一种能源的第一能耗数据、所述至少一种天气数据、以及所述预测时间段对应的时间数据中的至少一个特征参数,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据。Based on the first energy consumption data of the at least one energy source, the at least one weather data, and at least one characteristic parameter in the time data corresponding to the predicted time period, second energy consumption data of the at least one energy source within the predicted time period of the target area is predicted. 3.根据权利要求2所述的方法,其特征在于,所述基于所述至少一种能源的第二能耗数据以及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子包括:3. The method according to claim 2, characterized in that the predicting of the second carbon emission factor corresponding to the target area within the prediction time period based on the second energy consumption data of the at least one energy source and at least one characteristic parameter in the first carbon emission factor comprises: 基于所述至少一种能源的第二能耗数据、所述至少一种天气数据、所述时间数据及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子。Based on the second energy consumption data of the at least one energy source, the at least one weather data, the time data and at least one characteristic parameter of the first carbon emission factor, a second carbon emission factor corresponding to the target area within the prediction time period is predicted. 4.根据权利要求3所述的方法,其特征在于,所述基于所述第一能耗数据、所述至少一种天气数据、以及所述预测时间段对应的时间数据中的至少一个特征参数,预测所述至少一种能源在所述目标区域的预测时间段内的第二能耗数据包括:4. The method according to claim 3, characterized in that the predicting the second energy consumption data of the at least one energy source within the predicted time period of the target area based on the first energy consumption data, the at least one weather data, and at least one characteristic parameter in the time data corresponding to the predicted time period comprises: 针对任一种能源,基于所述能源的第一能耗数据、所述至少一种天气数据、以及所述预测时间段对应的时间数据中的至少一个特征参数,利用第一预测模型,预测所述能源在预测时间段内的第二能耗数据;For any energy source, based on the first energy consumption data of the energy source, the at least one weather data, and at least one characteristic parameter in the time data corresponding to the prediction time period, using the first prediction model, predict the second energy consumption data of the energy source within the prediction time period; 所述基于所述至少一种能源的第二能耗数据、所述至少一种天气数据、所述时间数据及所述第一碳排因子中的至少一个特征参数,预测所述目标区域在所述预测时间段内对应的第二碳排因子包括:The predicting of the second carbon emission factor corresponding to the target area within the prediction time period based on the second energy consumption data of the at least one energy source, the at least one weather data, the time data and at least one characteristic parameter of the first carbon emission factor includes: 基于所述至少一种能源的第二能耗数据、所述至少一种天气数据、所述时间数据及所述第一碳排因子中的至少一个特征参数,利用第二预测模型,预测所述目标区域在所述预测时间段内的第二碳排因子。Based on the second energy consumption data of the at least one energy source, the at least one weather data, the time data and at least one characteristic parameter of the first carbon emission factor, a second prediction model is used to predict the second carbon emission factor of the target area within the prediction time period. 5.根据权利要求4所述的方法,其特征在于,所述第一预测模型具体按照如下方式训练获得:5. The method according to claim 4, characterized in that the first prediction model is trained and obtained in the following manner: 确定第一能耗样本数据、时间样本数据、及至少一种天气样本数据中的至少一个样本特征参数;Determine at least one sample characteristic parameter of the first energy consumption sample data, the time sample data, and at least one weather sample data; 由所述至少一个样本特征参数构成目标特征集;The at least one sample feature parameter forms a target feature set; 将所述目标特征集作为模型输入,能耗预测样本数据作为训练标签,训练所述第一预测模型;Using the target feature set as a model input and the energy consumption prediction sample data as training labels to train the first prediction model; 从所述目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set; 将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters; 计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;Calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set; 将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并返回将所述目标特征集作为模型输入,所述能耗预测样本数据作为训练标签,训练所述第一预测模型的步骤继续执行,直至所述第一预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the target feature set is returned as the model input, and the energy consumption prediction sample data is used as the training label. The step of training the first prediction model continues until the first prediction model meets the training conditions. 6.根据权利要求5所述的方法,其特征在于,所述从所述目标特征集中筛选至少一个关键特征参数包括:6. The method according to claim 5, characterized in that the step of selecting at least one key feature parameter from the target feature set comprises: 确定所述第一预测模型基于所述目标特征集生成的第一预测结果;Determine a first prediction result generated by the first prediction model based on the target feature set; 基于所述第一预测结果,从所述目标特征集中筛选至少一个关键特征参数。Based on the first prediction result, at least one key feature parameter is selected from the target feature set. 7.根据权利要求4所述的方法,其特征在于,还包括:7. The method according to claim 4, further comprising: 从所述目标区域的历史生产数据中,获取目标历史时间之前的第一时间段产生的第一能耗数据作为第一能耗样本数据、所述目标历史时间之后的第二时间段产生的第一能耗数据作为能耗预测样本数据;From the historical production data of the target area, first energy consumption data generated in a first time period before the target historical time is obtained as first energy consumption sample data, and first energy consumption data generated in a second time period after the target historical time is obtained as energy consumption prediction sample data; 将所述第二时间段发生的天气数据作为天气样本数据,以及所述第二时间段对应的时间数据作为时间样本数据。The weather data occurring in the second time period is used as weather sample data, and the time data corresponding to the second time period is used as time sample data. 8.根据权利要求7所述的方法,其特征在于,还包括:8. The method according to claim 7, further comprising: 基于第一能耗样本数据、时间样本数据、以及至少一种天气样本数据中的至少一个样本特征参数,及所述至少一个样本特征参数对应的能耗预测样本数据,训练多个第一候选模型;Training a plurality of first candidate models based on the first energy consumption sample data, the time sample data, at least one sample characteristic parameter in at least one weather sample data, and energy consumption prediction sample data corresponding to the at least one sample characteristic parameter; 对所述多个第一候选模型进行模型评估;Performing model evaluation on the multiple first candidate models; 选择模型评估结果满足性能要求的第一候选模型作为所述第一预测模型。The first candidate model whose model evaluation result meets the performance requirements is selected as the first prediction model. 9.根据权利要求4所述的方法,其特征在于,所述第二预测模型具体按照如下方式训练获得:9. The method according to claim 4, characterized in that the second prediction model is trained and obtained in the following manner: 确定第二能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个样本特征参数;Determine at least one sample characteristic parameter among the second energy consumption sample data, the time sample data, the carbon emission factor historical sample data, and at least one weather sample data; 由所述至少一个样本特征参数构成目标特征集;The at least one sample feature parameter forms a target feature set; 将所述目标特征集作为模型输入,碳排因子预测样本数据作为训练标签,训练所述第二预测模型;Using the target feature set as model input and the carbon emission factor prediction sample data as training labels, training the second prediction model; 从所述目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set; 将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters; 计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;Calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set; 将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并返回将所述目标特征集作为模型输入,所述碳排因子预测样本数据作为训练标签,训练所述第二预测模型的步骤继续执行,直至所述第二预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the target feature set is returned as the model input, and the carbon emission factor prediction sample data is used as the training label. The step of training the second prediction model continues until the second prediction model meets the training conditions. 10.根据权利要求1所述的方法,其特征在于,还包括:10. The method according to claim 1, further comprising: 根据所述目标区域对应的第二碳排因子,计算在所述预测时间段内的任意时间范围内对应的碳排放数量。According to the second carbon emission factor corresponding to the target area, the corresponding carbon emission quantity within any time range within the predicted time period is calculated. 11.根据权利要求10所述的方法,其特征在于,所述目标区域部署有用以提供计算服务的数据中心,所述方法还包括:11. The method according to claim 10, wherein a data center for providing computing services is deployed in the target area, and the method further comprises: 基于所述碳排放数量,生成所述数据中心的推荐提示信息;Based on the carbon emission amount, generating recommendation prompt information of the data center; 向目标用户发送所述推荐提示信息。The recommendation prompt information is sent to the target user. 12.根据权利要求1所述的方法,其特征在于,所述目标区域部署有数据中心,所述方法还包括:12. The method according to claim 1, wherein a data center is deployed in the target area, and the method further comprises: 根据所述目标区域对应的第二碳排因子,计算在所述预测时间段内的任意时间范围内对应的碳排放数量;Calculate the corresponding carbon emission amount within any time range within the forecast time period according to the second carbon emission factor corresponding to the target area; 结合所述目标区域对应的第二碳排因子,计算所述数据中心在所述预测时间段内的任意时间范围内对应的计算成本;In combination with the second carbon emission factor corresponding to the target area, the corresponding computing cost of the data center within any time range within the forecast time period is calculated; 根据不同目标区域的数据中心在不同时间范围分别对应的计算成本,分配计算任务。Computing tasks are allocated based on the computing costs corresponding to data centers in different target areas in different time ranges. 13.根据权利要求1所述的方法,其特征在于,所述基于所述第一能耗数据、所述至少一种天气数据、以及表示所述预测时间段的时间数据中的至少一个特征参数,预测所述目标区域在预测时间段内所述至少一种能源对应的第二能耗数据包括:13. The method according to claim 1, characterized in that the predicting the second energy consumption data corresponding to the at least one energy source in the target area within the prediction time period based on the first energy consumption data, the at least one weather data, and at least one characteristic parameter in the time data representing the prediction time period comprises: 确定所述第一能耗数据、所述至少一种天气数据、以及表示所述预测时间段的时间数据构成的至少一个初始特征参数;determining at least one initial characteristic parameter consisting of the first energy consumption data, the at least one weather data, and time data representing the predicted time period; 由所述至少一个初始特征参数构成第一特征集;forming a first feature set by the at least one initial feature parameter; 将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数;Performing an operation on any two feature parameters in the first feature set to generate a target feature parameter; 计算所述目标特征参数与初始特征集中的任一个特征参数的相关性;Calculating the correlation between the target feature parameter and any feature parameter in the initial feature set; 将相关性未满足相关性要求的目标特征参数加入所述第一特征集,并返回将所述第一特征集中的任意两个特征参数执行运算操作,生成目标特征参数的步骤继续执行,直至所述第一特征集满足特征要求,获得第二特征集;Adding target feature parameters whose correlations do not meet the correlation requirements to the first feature set, and returning to perform an operation on any two feature parameters in the first feature set to generate target feature parameters, the step continues until the first feature set meets the feature requirements, thereby obtaining a second feature set; 利用所述第二特征集,预测所述目标区域在预测时间段内所述至少一种能源对应的第二能耗数据。The second feature set is used to predict second energy consumption data corresponding to the at least one energy source in the target area within a prediction time period. 14.一种模型训练方法,其特征在于,包括:14. A model training method, characterized by comprising: 确定至少一个样本特征参数以及所述至少一个样本特征参数对应的训练标签;所述至少一个样本特征参数包括第一能耗样本数据、时间样本数据及至少一种天气样本数据中的至少一个,所述训练标签包括能耗预测样本数据;或者所述至少一个样本特征参数包括预测能耗样本数据、时间样本数据、碳排因子历史样本数据以及至少一种天气样本数据中的至少一个,所述训练标签包括碳排因子预测样本数据;Determine at least one sample characteristic parameter and a training label corresponding to the at least one sample characteristic parameter; the at least one sample characteristic parameter includes at least one of first energy consumption sample data, time sample data, and at least one weather sample data, and the training label includes energy consumption prediction sample data; or the at least one sample characteristic parameter includes at least one of predicted energy consumption sample data, time sample data, carbon emission factor historical sample data, and at least one weather sample data, and the training label includes carbon emission factor prediction sample data; 由所述至少一个样本特征参数构成目标特征集;The at least one sample feature parameter forms a target feature set; 利用所述目标特征集以及所述训练标签,训练预测模型;Using the target feature set and the training labels, training a prediction model; 从所述目标特征集中筛选至少一个关键特征参数;Select at least one key feature parameter from the target feature set; 将任意两个关键特征参数执行运算操作,生成候选特征参数;Perform operation on any two key feature parameters to generate candidate feature parameters; 计算所述候选特征参数与所述目标特征集合中的任一个特征样本参数的相关性;Calculating the correlation between the candidate feature parameter and any feature sample parameter in the target feature set; 将相关性未满足相关性要求的候选特征参数加入所述目标特征集,并返回利用所述目标特征集以及所述训练标签,训练所述预测模型的步骤继续执行,直至所述预测模型达到训练条件。The candidate feature parameters whose correlations do not meet the correlation requirements are added to the target feature set, and the step of training the prediction model using the target feature set and the training labels is returned to continue until the prediction model meets the training conditions. 15.一种计算设备,其特征在于,包括处理组件以及存储组件;15. A computing device, comprising a processing component and a storage component; 所述存储组件存储一个或多个计算机指令;所述一个或多个计算机指令用以被所述处理组件调用执行,实现如权利要求1至13任一项所述的碳排因子的预测方法,或者实现如权利要求14所述的模型训练方法。The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the carbon emission factor prediction method as described in any one of claims 1 to 13, or to implement the model training method as described in claim 14. 16.一种计算机存储介质,其特征在于,存储有计算机程序,所述计算机程序被计算机执行时,实现如权利要求1至13任一项所述的碳排因子的预测方法,或者实现如权利要求14所述的模型训练方法。16. A computer storage medium, characterized in that a computer program is stored therein, and when the computer program is executed by a computer, the method for predicting the carbon emission factor as described in any one of claims 1 to 13 is implemented, or the model training method as described in claim 14 is implemented. 17.一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序代码,在所述计算机程序代码被计算机设备执行时,所述计算机设备执行上述权利要求1至13任一项所述的碳排因子的预测方法,或者执行如权利要求14所述的模型训练方法。17. A computer program product, characterized in that the computer program product comprises a computer program code, and when the computer program code is executed by a computer device, the computer device executes the carbon emission factor prediction method described in any one of claims 1 to 13, or executes the model training method described in claim 14.
CN202410295614.0A 2024-03-14 2024-03-14 Carbon emission factor prediction method, model training method, computing device, storage medium and program product Active CN117910657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410295614.0A CN117910657B (en) 2024-03-14 2024-03-14 Carbon emission factor prediction method, model training method, computing device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410295614.0A CN117910657B (en) 2024-03-14 2024-03-14 Carbon emission factor prediction method, model training method, computing device, storage medium and program product

Publications (2)

Publication Number Publication Date
CN117910657A true CN117910657A (en) 2024-04-19
CN117910657B CN117910657B (en) 2024-07-26

Family

ID=90695056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410295614.0A Active CN117910657B (en) 2024-03-14 2024-03-14 Carbon emission factor prediction method, model training method, computing device, storage medium and program product

Country Status (1)

Country Link
CN (1) CN117910657B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988489A (en) * 2021-12-27 2022-01-28 国网浙江省电力有限公司信息通信分公司 Prediction evaluation method and device of electrical carbon factor and readable storage medium
CN114841274A (en) * 2022-05-12 2022-08-02 百度在线网络技术(北京)有限公司 Language model training method and device, electronic equipment and storage medium
CN115600722A (en) * 2022-09-02 2023-01-13 浙江大学(Cn) Long-term forecast method of enterprise electricity carbon factor
CN116822997A (en) * 2023-08-30 2023-09-29 国网区块链科技(北京)有限公司 A real-time carbon emission accounting method and device considering green electricity
CN116862050A (en) * 2023-06-09 2023-10-10 广东电网有限责任公司广州供电局 Time sequence network-based daily prediction method, system, storage medium and equipment for carbon emission factors
CN117371610A (en) * 2023-10-30 2024-01-09 国网山东省电力公司营销服务中心(计量中心) Carbon emission monitoring method and system
CN117371622A (en) * 2023-12-06 2024-01-09 国网湖北省电力有限公司经济技术研究院 Prediction method, system and equipment for long-term dynamic carbon emission factor in region
CN117408394A (en) * 2023-12-14 2024-01-16 国网天津市电力公司电力科学研究院 Carbon emission factor prediction methods, devices and electronic equipment for power systems
WO2024020801A1 (en) * 2022-07-26 2024-02-01 西门子股份公司 Carbon emission calculation method, electronic device and readable medium
CN117494931A (en) * 2023-09-22 2024-02-02 国网湖北省电力有限公司经济技术研究院 Method, system and equipment for determining marginal carbon emission factors based on grid nodes
CN117610737A (en) * 2023-12-07 2024-02-27 广东技术师范大学 A carbon emission factor prediction method and system based on ASTGCN
CN117634678A (en) * 2023-11-24 2024-03-01 国舜绿建科技有限公司 Low-carbon park carbon emission prediction method based on actual operation scene
CN117670586A (en) * 2023-11-28 2024-03-08 东北大学佛山研究生创新学院 A method and system for predicting carbon factors of power grid nodes based on graph neural network

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988489A (en) * 2021-12-27 2022-01-28 国网浙江省电力有限公司信息通信分公司 Prediction evaluation method and device of electrical carbon factor and readable storage medium
CN114841274A (en) * 2022-05-12 2022-08-02 百度在线网络技术(北京)有限公司 Language model training method and device, electronic equipment and storage medium
WO2024020801A1 (en) * 2022-07-26 2024-02-01 西门子股份公司 Carbon emission calculation method, electronic device and readable medium
CN115600722A (en) * 2022-09-02 2023-01-13 浙江大学(Cn) Long-term forecast method of enterprise electricity carbon factor
CN116862050A (en) * 2023-06-09 2023-10-10 广东电网有限责任公司广州供电局 Time sequence network-based daily prediction method, system, storage medium and equipment for carbon emission factors
CN116822997A (en) * 2023-08-30 2023-09-29 国网区块链科技(北京)有限公司 A real-time carbon emission accounting method and device considering green electricity
CN117494931A (en) * 2023-09-22 2024-02-02 国网湖北省电力有限公司经济技术研究院 Method, system and equipment for determining marginal carbon emission factors based on grid nodes
CN117371610A (en) * 2023-10-30 2024-01-09 国网山东省电力公司营销服务中心(计量中心) Carbon emission monitoring method and system
CN117634678A (en) * 2023-11-24 2024-03-01 国舜绿建科技有限公司 Low-carbon park carbon emission prediction method based on actual operation scene
CN117670586A (en) * 2023-11-28 2024-03-08 东北大学佛山研究生创新学院 A method and system for predicting carbon factors of power grid nodes based on graph neural network
CN117371622A (en) * 2023-12-06 2024-01-09 国网湖北省电力有限公司经济技术研究院 Prediction method, system and equipment for long-term dynamic carbon emission factor in region
CN117610737A (en) * 2023-12-07 2024-02-27 广东技术师范大学 A carbon emission factor prediction method and system based on ASTGCN
CN117408394A (en) * 2023-12-14 2024-01-16 国网天津市电力公司电力科学研究院 Carbon emission factor prediction methods, devices and electronic equipment for power systems

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杜强;陈乔;杨锐;: "基于Logistic模型的中国各省碳排放预测", 长江流域资源与环境, no. 02, 15 February 2013 (2013-02-15) *
王志明;谭显胜;袁哲明;伍朝华;: "自调用支持向量回归优化支持向量机参数", 系统仿真学报, no. 02, 8 February 2010 (2010-02-08) *

Also Published As

Publication number Publication date
CN117910657B (en) 2024-07-26

Similar Documents

Publication Publication Date Title
Lew et al. Value of wind power forecasting
CN112036668A (en) Water consumption prediction method, device, electronic equipment and computer readable medium
CN110727717A (en) Monitoring method, device, equipment and storage medium for gridding atmospheric pollution intensity
CN113205227B (en) Vehicle line optimization method and device
US20130085673A1 (en) System, method and program product for providing populace centric weather forecasts
CN117613883A (en) Method and device for predicting generated power, computer equipment and storage medium
CN114493052B (en) Multi-model fusion self-adaptive new energy power prediction method and system
CN116701481B (en) Electric heating electricity consumption fluctuation analysis system and method
CN115688547A (en) Simulated weather scenarios and extreme weather predictions
CN117910657B (en) Carbon emission factor prediction method, model training method, computing device, storage medium and program product
CN108154259B (en) Load forecasting method and device for heat pump, storage medium and processor
CN114399235A (en) Method and system for judging disaster risk level based on rain condition data
CN109978237A (en) A kind of area power grid Short Term Load Forecasting System based on fining meteorological data
Zhang et al. Extreme wind power forecast error analysis considering its application in day‐ahead reserve capacity planning
CN118442676A (en) Cold station temperature control method and device, electronic equipment and readable storage medium
CN116646917A (en) Campus multi-step probability power load prediction method and system
CN117852975A (en) Urban updating action visual assessment method and system based on digital design
Gaikwad et al. Harnessing deep learning for forecasting fire-burning locations and unveiling PM 2.5 emissions
Majumdar et al. Rainfall forecasting for Silchar city using stacked-LSTM
CN117391257A (en) A method and device for predicting road congestion
CN117743992A (en) Carbon emission prediction method and device, storage medium and electronic equipment
Piotrowski et al. On the importance of training methods and ensemble aggregation for runoff prediction by means of artificial neural networks
CN117613855A (en) Short-term photovoltaic power generation amount calculation method and system
Bhatnagar et al. Short-term electric load forecast model using the combination of ant lion optimization with bi-LSTM network
CN116646923A (en) Method, device, terminal and storage medium for predicting medium and long term power load

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant