Establishment method and device of carbon calculation model, equipment and storage medium
By creating model configuration files and matching sub-models, the carbon calculation model establishment process is optimized, solving the problem of low modeling efficiency in the existing technology, and achieving efficient carbon calculation model construction and carbon reduction work.
Patent Information
- Application Number
- CN202410872905.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-11
AI Technical Summary
The establishment process of existing carbon calculation models is complicated and requires dividing a large number of sub-models, resulting in heavy workload, long cycle, and low modeling efficiency.
By creating a model configuration file with a preset definition format, matching sub-models in the model library, and building a connection relationship between configuration items and sub-models, the carbon calculation model establishment process is optimized and the reuse of sub-models is achieved.
It reduces the modeling workload, shortens the modeling cycle, improves modeling efficiency, improves carbon reduction efficiency, reduces carbon calculation costs, and adapts to different scenarios and complex needs.
Smart Images

Figure CN118760906A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of carbon reduction technology, and in particular to a method, device, equipment and storage medium for establishing a carbon calculation model. Background Art
[0002] As energy conservation and carbon reduction gradually gain attention, various energy users and product manufacturers are also responding to green, environmentally friendly, and low-carbon production methods. Among them, carbon calculation can quantify carbon reduction results, so carbon calculation has become an important aspect of energy conservation and carbon reduction practice. Due to the complexity of the carbon calculation process, the establishment of a carbon calculation model usually needs to be divided into a large number of sub-models, and each sub-model is established separately. However, due to the large number of sub-models, the workload of establishing a carbon calculation model is large, the cycle is long, and the modeling efficiency is low. Summary of the invention
[0003] The present invention provides a method, device, equipment and storage medium for establishing a carbon calculation model to reduce the workload of modeling, shorten the modeling cycle and improve the modeling efficiency.
[0004] According to one aspect of the present invention, a method for establishing a carbon calculation model is provided, comprising:
[0005] Creating a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, and each of the configuration items has a plurality of related information contents;
[0006] Matching at least one sub-model in the model library according to the at least one configuration item of the model configuration file;
[0007] A connection relationship between the configuration items of the model configuration file and each of the sub-models is constructed, and at least one matching sub-model is loaded accordingly to establish a carbon calculation model.
[0008] Optionally, before matching at least one sub-model in the model library according to the at least one configuration item in the model configuration file, the method further includes: calculating the similarity between each configuration item in the configuration file and each sub-model in the model library to obtain a plurality of similarity calculation values;
[0009] The matching of at least one sub-model in the model library according to the at least one configuration item of the model configuration file includes:
[0010] Comparing each of the similarity calculation values with a preset matching threshold;
[0011] The sub-model corresponding to the similarity calculation value greater than the preset matching degree threshold is selected as the sub-model matching the configuration item.
[0012] Optionally, the method for calculating the similarity between the configuration item and the sub-model specifically includes:
[0013] Comparing the attributes of the relevant information content contained in the configuration item with the attributes of the model content contained in the sub-model to obtain a comparison result;
[0014] If the same related information content contains at least two attributes, weights are configured for different attributes respectively; if the same model content contains at least two attributes, weights are configured for different attributes respectively;
[0015] The similarity calculation value is obtained according to the comparison result and the weight.
[0016] Optionally, the method for calculating the similarity between the configuration item and the sub-model specifically includes:
[0017] Performing feature extraction on the relevant information content included in the configuration item to obtain a demand feature vector; and performing feature extraction on the model content included in the sub-model to obtain a model feature vector;
[0018] The similarity calculation value is obtained according to each demand feature in the demand feature vector and each model feature in the model feature vector.
[0019] Optionally, the demand feature includes: at least one of a standard feature, an architecture feature, a hyperparameter setting feature, and a performance indicator feature;
[0020] And / or, the model features include: at least one of standard features, architecture features, hyperparameter setting features and performance indicator features.
[0021] Optionally, matching at least one sub-model in a model library according to the at least one configuration item of the model configuration file includes:
[0022] The text of the relevant information content contained in the configuration file and the model content contained in the sub-model are directly matched.
[0023] Optionally, before constructing the connection relationship between the configuration items of the model configuration file and each of the sub-models and loading each of the sub-models accordingly to establish the carbon calculation model, the method further includes:
[0024] Directly selecting a specific sub-model from the model library according to user specification, the specific sub-model being used as a sub-model matching the specified configuration item;
[0025] Alternatively, the sub-model matching the specified configuration item is adjusted according to user requirements to obtain a specific sub-model.
[0026] Optionally, the method of constructing the connection relationship between the configuration items of the model configuration file and each of the sub-models includes: constructing a connection relationship configuration file; the connection relationship configuration file includes: at least one of the name, sub-model path and sub-model parameters of the sub-model matching the configuration item.
[0027] Optionally, the model configuration file further includes model configuration parameters, and the model library further includes a main model;
[0028] The main model matches the model configuration parameters, and the connection relationship configuration file further includes: the connection relationship between each of the sub-models and the main model.
[0029] Optionally, the model configuration parameters include: at least one of a path of input data, a calculation standard, a boundary and a time interval.
[0030] Optionally, the carbon calculation object includes at least one of an organization carbon calculation object, an activity carbon calculation object, and a product carbon footprint calculation object.
[0031] Optionally, the configuration item corresponding to the organizational carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources, and scope 3 emission sources;
[0032] and / or, the configuration item corresponding to the active carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources, and scope 3 emission sources;
[0033] and / or, the configuration item corresponding to the product carbon footprint calculation object includes at least one process information of at least one life cycle stage;
[0034] And / or, the relevant information includes at least one of input and output data and a calculation method.
[0035] Optionally, the number of sub-models matching the configuration items in the configuration file is at least two; the number of carbon calculation models established is at least two;
[0036] After loading the matched at least one sub-model to establish a carbon calculation model, the method further includes:
[0037] Combining each of the carbon calculation models with the carbon emission factors in the factor database, respectively, to calculate and obtain at least two carbon data results;
[0038] The carbon calculation model with the smallest corresponding value in the carbon data results is used as the final carbon calculation model.
[0039] According to another aspect of the present invention, there is provided a device for establishing a carbon calculation model, comprising:
[0040] A configuration file creation module, used to create a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, each of which has a plurality of related information contents;
[0041] A sub-model matching module, used for matching at least one sub-model in a model library according to the at least one configuration item of the model configuration file;
[0042] The carbon calculation model building module is used to build a connection relationship between the configuration items of the configuration file and each of the sub-models, and load at least one matching sub-model accordingly to establish a carbon calculation model.
[0043] According to another aspect of the present invention, there is also provided an electronic device, the electronic device comprising:
[0044] at least one processor; and
[0045] a memory communicatively connected to the at least one processor; wherein,
[0046] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for establishing a carbon calculation model described in any embodiment of the present invention.
[0047] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for establishing a carbon calculation model described in any embodiment of the present invention when executed.
[0048] The embodiment of the present invention creates sub-models for different carbon calculation processes and stores them in a model library, creates a model configuration file with a preset definition format for the carbon calculation object, and matches at least one sub-model in the model library according to at least one configuration item of the model configuration file, which is conducive to the reuse of sub-models in the model library. The embodiment of the present invention optimizes the steps of establishing a carbon calculation model. Through the establishment of a model configuration file, it is possible to quickly match a suitable sub-model from a large number of quantum models, thereby helping to reduce the workload of modeling, improve the modeling speed, shorten the modeling cycle, and improve the modeling efficiency. Furthermore, the embodiment of the present invention is conducive to improving the efficiency of carbon reduction work, reducing the cost of carbon calculation, and can adapt to different scenarios and complex and diverse needs.
[0049] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A schematic diagram of a process for establishing a carbon calculation model provided by an embodiment of the present invention;
[0052] Figure 2 A schematic flow chart of another method for establishing a carbon calculation model provided by an embodiment of the present invention;
[0053] Figure 3 A schematic flow chart of another method for establishing a carbon calculation model provided in an embodiment of the present invention;
[0054] Figure 4 A schematic flow chart of another method for establishing a carbon calculation model provided in an embodiment of the present invention;
[0055] Figure 5 A schematic flow chart of another method for establishing a carbon calculation model provided in an embodiment of the present invention;
[0056] Figure 6 A schematic flow chart of another method for establishing a carbon calculation model provided in an embodiment of the present invention;
[0057] Figure 7 A schematic flow chart of another method for establishing a carbon calculation model provided in an embodiment of the present invention;
[0058] Figure 8 A schematic diagram of the structure of a device for establishing a carbon calculation model provided by an embodiment of the present invention;
[0059] Fig. 9 A schematic diagram of the structure of another device for establishing a carbon calculation model provided by an embodiment of the present invention;
[0060] Fig.10 A schematic diagram of the structure of another device for establishing a carbon calculation model provided by an embodiment of the present invention;
[0061] Fig.11 A schematic diagram of the structure of another device for establishing a carbon calculation model provided by an embodiment of the present invention;
[0062] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0064] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0065] The embodiment of the present invention provides a method for establishing a carbon calculation model, which can be applied to a variety of carbon calculation objects, such as organizational carbon calculation objects, activity carbon calculation objects, and product carbon footprint calculation objects. Carbon calculation objects can also be called energy users or product manufacturers, etc., which can include all organizations, enterprises, households, individuals, and products that need to carry out carbon reduction work. The embodiment of the present invention can specifically realize the calculation and accounting of product carbon footprints, organizational carbon calculation and accounting, and activity carbon calculation and accounting.
[0066] The method for establishing a carbon calculation model provided in the embodiment of the present invention may be executed by a device for establishing a carbon calculation model, and the device may be implemented by software and / or hardware.
[0067] Figure 1 A flow chart of a method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 1 The method for establishing the carbon calculation model comprises the following steps:
[0068] S110. Create a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, and each configuration item has a plurality of related information contents.
[0069] The relevant information content refers to the information that needs to be recorded in the model configuration file, and the definition format refers to the arrangement format of the relevant information content of the model configuration file. The definition format can be universal or set separately. In one embodiment, the relevant information content varies according to the different carbon calculation objects, so it can be set to different preset definition formats. Under the same definition format, one, two or more configuration items can be added, and one configuration item corresponds to one sub-model.
[0070] Optionally, the relevant information includes at least one of input and output data and calculation methods. For example, the carbon calculation object is an organizational carbon calculation object or an activity carbon calculation object, and its corresponding configuration items include at least one of scope 1 emission sources, scope 2 emission sources and scope 3 emission sources. Among them, scope 1 emission sources, scope 2 emission sources and scope 3 emission sources all include input and output data and calculation methods, etc. Scope 1 emission sources are direct emission sources, scope 2 emission sources are indirect emission sources, and scope 3 emission sources are secondary indirect emission sources or externally purchased raw materials and substances. Emission sources can be related information such as ethanol gasoline combustion, cafeteria natural gas combustion, SF6 use fugitives, refrigerant R23 fugitives, purchased electricity, business travel-aviation, material procurement, product transportation or waste disposal services.
[0071] For another example, the carbon calculation object is a product carbon footprint calculation object, and its corresponding configuration item includes at least one process information of at least one life cycle stage. Among them, the process information includes input and output data and calculation methods, etc. The carbon footprint process can be the resistor of the production raw materials, the solder of the production auxiliary materials, the PCB welding of the production process, the final product packaging, product installation, product use, product maintenance or product scrapping, etc. A process can correspond to multiple input data and multiple output data. For example, a bottle of mineral water has input data such as the plastic paper and glue of the label, the electricity consumed by the machine for labeling, etc., and output data such as the waste of the barrel of glue, the packaging of the label, etc.
[0072] Furthermore, variables related to configuration items are added to the model configuration file. Taking the production and transportation of a bottle of mineral water as an example, the configuration items include the procurement and warehousing stage of raw materials, the production process, and the transportation stage. The production process includes multiple generation processes, each of which includes matter and energy. The input variables and output variables involved in each process are added to the configuration file. In the transportation stage of bottle caps, variables of the transportation method used (for example, ship, train, or car) and the transportation distance are added to the model configuration file.
[0073] S120: Match at least one sub-model in the model library according to at least one configuration item in the model configuration file.
[0074] For example, a configuration item can match a sub-model, and the sub-model can be used to implement carbon calculation of the configuration item. For example, the sub-model can implement carbon calculation of ethanol gasoline combustion, the sub-model can implement carbon calculation of resistors used to produce raw materials, and so on.
[0075] The model library stores a large number of sub-models, each of which is used for carbon calculations of different processes, different parts, and different emission sources. In a series of products or a family of products of the same category, there is a relatively high proportion of the same process and parts; in the carbon calculation of the organization, there are situations where the emission sources are the same. For example, the same sub-model can be used for carbon calculations with the same process, so the sub-model can be called by different carbon calculation models to achieve sub-model reuse.
[0076] S130: construct a connection relationship between the configuration items of the model configuration file and each sub-model, and load at least one matching sub-model accordingly to establish a carbon calculation model.
[0077] Among them, the carbon calculation model is used to perform the carbon calculation task of the carbon calculation object. The configuration file usually includes multiple configuration items, and the number of corresponding matching sub-models is multiple. In the matching process, it is also necessary to establish a connection relationship between each configuration item and the sub-model to facilitate the calling of the sub-model. Exemplarily, the connection relationship between the configuration items of the configuration file and each sub-model is constructed by constructing a connection relationship configuration file. Specifically, the connection relationship configuration file includes: at least one of the name of the sub-model that matches the configuration item, the sub-model path and the sub-model parameters, so as to associate each configuration item with the corresponding sub-model to ensure that the match between each configuration item and the sub-model is accurate and complete.
[0078] Furthermore, through program code, all sub-models that meet the conditions are loaded according to pre-defined conditions (including model configuration files or connection relationship configurations, etc.), which involves traversing all sub-models stored in the model library.
[0079] The embodiment of the present invention creates sub-models for different carbon calculation processes and stores them in a model library, creates a model configuration file with a preset definition format for the carbon calculation object, and matches at least one sub-model in the model library according to at least one configuration item of the model configuration file, which is conducive to the reuse of sub-models in the model library. The embodiment of the present invention optimizes the steps of establishing a carbon calculation model. Through the establishment of a model configuration file, it is possible to quickly match a suitable sub-model from a large number of quantum models, thereby helping to reduce the workload of modeling, improve the modeling speed, shorten the modeling cycle, and improve the modeling efficiency. Furthermore, the embodiment of the present invention is conducive to improving the efficiency of carbon reduction work, reducing the cost of carbon calculation, and can adapt to different scenarios and complex and diverse needs.
[0080] Figure 2A flow chart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 2 Based on the above embodiments, optionally, for a product carbon footprint calculation object, the method for establishing the carbon calculation model includes the following steps:
[0081] S210. Create a model configuration file with a preset definition format for a product carbon footprint calculation object; wherein the model configuration file includes at least one process configuration item, and each process configuration item has a plurality of process-related information contents.
[0082] S220. Match at least one process sub-model in the model library according to at least one process configuration item in the model configuration file.
[0083] S230, constructing a connection relationship between the process configuration items of the configuration file and each process sub-model, and loading each process sub-model accordingly to establish a carbon calculation model.
[0084] Through S210-S230, the establishment of a carbon calculation model for the product carbon footprint calculation object is achieved.
[0085] Figure 3 A flowchart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 3 Based on the above embodiments, optionally, for an organizational carbon calculation object, the method for establishing the carbon calculation model includes the following steps:
[0086] S310. Create a model configuration file with a preset definition format for an organization's carbon calculation object; wherein the model configuration file includes at least one emission source configuration item, and each emission source configuration item has multiple emission source related information contents.
[0087] S320. Match at least one emission source sub-model in the model library according to at least one emission source configuration item in the model configuration file.
[0088] S330, constructing a connection relationship between the emission source configuration items of the configuration file and each emission source sub-model, and loading each emission source sub-model accordingly to establish a carbon calculation model.
[0089] Through S310 - S330 , the establishment of a carbon calculation model for the organization's carbon calculation object is achieved.
[0090] Based on the above embodiments, optionally, S120, before matching at least one sub-model in the model library according to at least one configuration item in the model configuration file, further includes: calculating the similarity between each configuration item in the configuration file and each sub-model in the model library to obtain multiple similarity calculation values. Accordingly, S120, matching at least one sub-model in the model library according to at least one configuration item in the model configuration file includes: comparing each similarity calculation value with a preset matching threshold; selecting the sub-model corresponding to the similarity calculation value greater than the preset matching threshold as the sub-model matching the configuration item.
[0091] Specifically, FIG4 is a flow chart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 4 , the method comprises the following steps:
[0092] S410: Create a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, and each configuration item has a plurality of related information contents.
[0093] S420: Calculate the similarity between each configuration item in the configuration file and each sub-model in the model library to obtain a plurality of similarity calculation values.
[0094] S430, comparing each similarity calculation value with a preset matching threshold; selecting a sub-model corresponding to a similarity calculation value greater than the preset matching threshold as a sub-model matching the configuration item.
[0095] Among them, the similarity between the configuration item and the sub-model that can be matched should be greater than the preset matching threshold. The preset matching threshold is used to determine whether the sub-model and the model configuration file match. The preset matching threshold can be adjusted according to the specific situation to balance the accuracy and recall rate of model establishment (a certain configuration item cannot match the sub-model). The higher the preset matching threshold, the higher the accuracy but the greater the recall rate; the lower the preset matching threshold, the lower the recall rate but the lower the accuracy.
[0096] Optionally, when matching at least one sub-model in the model library according to at least one configuration item of the model configuration file, the model configuration file, the model library data, and a preset matching degree threshold are loaded to facilitate subsequent matching steps.
[0097] S440: construct a connection relationship between the configuration items of the model configuration file and each sub-model, and load at least one matching sub-model accordingly to establish a carbon calculation model. The embodiment of the present invention performs sub-model matching by calculating similarity, which is conducive to improving the accuracy of modeling.
[0098] Figure 5A flowchart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 5 Based on the above embodiments, optionally, the method for establishing the carbon calculation model includes the following steps:
[0099] S510, initializing the model library; creating a model configuration file with a preset definition format for the carbon calculation object; wherein the model configuration file includes at least one configuration item, and each configuration item has a plurality of related information contents.
[0100] S520: Obtain configuration items from the model configuration file.
[0101] Among them, one configuration item is obtained in each loop, and multiple loops can traverse all configuration items in the model configuration file.
[0102] S530: Obtain a sub-model from a model library.
[0103] Among them, one sub-model is obtained in each loop, and multiple loops can traverse all the sub-models in the model library.
[0104] S540: Calculate the matching degree between the current configuration item and the current sub-model.
[0105] S550, determine whether the matching degree is greater than a preset matching degree threshold; if so, execute S560; otherwise, return to execute S530.
[0106] S560: Obtain a connection relationship of at least one sub-model matching the current configuration item.
[0107] Among them, if in S550, the loop is jumped out after the configuration item matches the sub-model, then the number of sub-models matching the configuration item is one; if in S550, the loop is not jumped out after the configuration item matches the sub-model until the sub-model traversal in the model library is completed, then the number of sub-models matching the configuration item may be multiple.
[0108] S570, determine whether the configuration items in the model configuration file are matched; if so, execute S580; otherwise, return to execute S520.
[0109] S580: Determine all matching sub-models, build a connection relationship between the configuration items of the model configuration file and each sub-model, and load each sub-model accordingly to establish a carbon calculation model.
[0110] Through S510-S580, the establishment of a carbon calculation model for sub-model matching by calculating similarity is achieved.
[0111] In the above embodiments, there are multiple methods for calculating the similarity between a configuration item and a sub-model, which are described in detail below but are not intended to limit the present invention.
[0112] In one embodiment, optionally, the method for calculating the similarity between a configuration item and a sub-model specifically includes the following steps: comparing the attributes of the relevant information content contained in the configuration item and the attributes of the model content contained in the sub-model to obtain a comparison result; if the same relevant information content contains at least two attributes, respectively configuring weights for different attributes; if the same model content contains at least two attributes, respectively configuring weights for different attributes; and calculating the similarity between the configuration item and the sub-model based on the comparison result and the weight.
[0113] Among them, the relevant information content contained in the configuration item may be stored in the form of fields, or in the form of attributes, or may include both attributes and fields. Carbon calculation is a complex process that requires obtaining the required data from multiple data acquisition paths and multiple databases. Most of these data are heterogeneous data, and some data are natural languages, which need to be processed and calculated through natural language processing (NLP). In some cases, the same content may have different expressions; in other cases, the same name may have different attribute expressions. The embodiment of the present invention can optimize the true intention of the content expression by configuring weights for the attributes of the content. Exemplarily, for natural gas, it may also be expressed as liquefied natural gas or LNG, where one attribute of liquefied natural gas is liquefaction and the other attribute is natural gas, and weights can be configured for these two attributes respectively. For another example, for raw material quartz sand, it can also be expressed as silica sand or silicon dioxide, etc., where the first attribute of silicon dioxide is raw material quartz sand, the second attribute is glass, the third attribute is optical fiber, and the fourth attribute is lubricant, etc., and weights can be configured for multiple attributes of silicon dioxide according to its different application scenarios.
[0114] In another embodiment, optionally, the method for calculating the similarity between a configuration item and a sub-model specifically includes the following steps: performing feature extraction on relevant information content contained in the configuration item to obtain a requirement feature vector; and performing feature extraction on model content contained in the sub-model to obtain a model feature vector; and calculating the similarity between the configuration item and the sub-model based on each requirement feature in the requirement feature vector and each model feature in the model feature vector.
[0115] Among them, the number of related information contents of configuration items and model contents of sub-models is large, and their content names, etc. can be expressed in different forms, which can be summarized and summarized by feature extraction. Optionally, the demand features include: at least one of standard features, architecture features, hyperparameter setting features and performance indicator features; and / or, the model features include: at least one of standard features, architecture features, hyperparameter setting features and performance indicator features. Among them, the standard features express the calculation standards. For example, different regions and industries have different calculation standards; for example, the same region and the same industry have different standard depths. Specifically, when performing carbon calculation, only carbon dioxide is involved as one calculation depth, and other gases such as nitrogen oxides and sulfur dioxide are involved in addition to carbon dioxide. It is another calculation depth. The architecture feature refers to whether it involves organizational carbon calculation, activity carbon calculation or product carbon footprint calculation. The performance indicator can be an extended indicator. For the case where the model configuration file is large, it involves performance indicators. For example, for a ship of several hundred meters, it involves tens of thousands of parts and a large number of sub-models, which involves performance optimization.
[0116] Optionally, the method for calculating the similarity between the configuration item and the sub-model includes: at least one of a cosine similarity calculation method and an Euclidean distance calculation method. Euclidean distance, Jaccard similarity coefficient, Boolean model similarity, inner product method, etc. can be written into the specification. The existing similarity calculation method is not limited to
[0117] In the above embodiments, the method of matching the configuration items with the sub-models by comparing the matching degree is exemplified, which is not a limitation of the present invention. In other embodiments, the text of the relevant information content contained in the configuration file and the model content contained in the sub-model can also be directly matched. For example, the name (e.g., natural gas consumption), type (e.g., range one) and calculation standard can be directly matched.
[0118] Figure 6 A flowchart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 6 Based on the above embodiments, optionally, before S130, building a connection relationship between the configuration items of the configuration file and at least one matching sub-model, and loading each sub-model accordingly to establish a carbon calculation model, the method further includes:
[0119] S150. According to the user's specification, a specific sub-model is directly selected from the model library, and the specific sub-model is used as the sub-model matching the specified configuration item; or, according to the user's requirements, the sub-model matching the specified configuration item is adjusted to obtain the specific sub-model.
[0120] Among them, at least one sub-model obtained in S120 is a sub-model with a matching degree greater than a preset matching degree threshold screened by the model building device, and is output as a recommendation result and returned to the user. The embodiment of the present invention also provides a solution for the user to specify a sub-model or the user to adjust the sub-model according to the recommendation result. This setting is conducive to further meeting user needs and improving the accuracy of model building.
[0121] Based on the above embodiments, optionally, the storage format of the model configuration file may be: EXCEL, CVS, JSON, XML or YAML, etc.
[0122] Based on the above embodiments, optionally, the model configuration file also includes model configuration parameters, and the model library also includes a main model; wherein the main model matches the model configuration parameters, and the connection relationship configuration file also includes: the connection relationship between each sub-model and the main model.
[0123] Among them, the main model corresponds to the model configuration parameters, and the main model establishes the overall framework for the carbon calculation model. The model configuration parameters can be, for example, an appendix in the model configuration file. Optionally, the model configuration parameters include: at least one of the path of the input data, the calculation standard, the boundary and the time interval. Exemplarily, taking the transportation of mineral water bottle caps as an example, its transportation data comes from the transportation system, and the transportation method and distance can be obtained through the transportation system. The calculation standard can be, for example, different calculation standards formulated by different regions and industries; for example, the same region and the same industry have different standard depths. Specifically, when performing carbon calculation, only carbon dioxide is involved as a calculation depth, and in addition to carbon dioxide, other gases such as nitrogen oxides and sulfur dioxide are involved as another calculation depth. The boundary refers to the scope involved in the carbon calculation. Taking the organizational carbon calculation as an example, a group has X factories, and the carbon calculation only calculates Y of them.
[0124] By obtaining the connection relationship between each sub-model and the main model, the sub-model can be integrated into the main model for joint calculation, which is conducive to ensuring the circulation and processing of data, thereby improving efficiency and accuracy. You can use the connection relationship in the configuration file.
[0125] On the basis of the above embodiments, optionally, the number of sub-models matching the configuration items in the configuration file is at least two; the number of carbon calculation models established is at least two. The embodiment of the present invention also provides a technical solution for optimizing the carbon calculation model. For example, after loading each sub-model to establish a carbon calculation model, it also includes: combining each carbon calculation model with the carbon emission factor in the factor database to calculate at least two carbon data results; and taking the carbon calculation model with the smallest corresponding value in the carbon data result as the final carbon calculation model.
[0126] Specifically, Figure 7A flowchart of another method for establishing a carbon calculation model provided by an embodiment of the present invention. Figure 7 Based on the above embodiments, optionally, the method for establishing the carbon calculation model includes the following steps:
[0127] S710, initializing the model library and factor database; creating a model configuration file with a preset definition format for the carbon calculation object; wherein the model configuration file includes at least one configuration item, and each configuration item has a plurality of related information contents.
[0128] S720: Match at least one sub-model in the model library according to at least one configuration item in the model configuration file, where the matching degree between the sub-model and the configuration item is greater than a preset matching degree threshold.
[0129] S730: Determine all matching sub-models, construct a connection relationship between the configuration items of the model configuration file and each sub-model, and load each sub-model accordingly to establish a carbon calculation model, and the number of carbon calculation models is at least two.
[0130] S740. Combine the carbon calculation model with the carbon emission factor in the factor database to calculate the carbon data result corresponding to the carbon calculation model.
[0131] The carbon data results of one carbon calculation model are obtained in each cycle, and the carbon data results of all carbon calculation models can be traversed through multiple cycles.
[0132] S750, judging whether the carbon calculation results of each carbon calculation model have been calculated; if so, executing S760; otherwise, returning to S740.
[0133] S760, sorting the carbon data results, and selecting the carbon calculation model with the smallest value as the final carbon calculation model.
[0134] Among them, different carbon calculation models calculate different carbon data results. The carbon data results with smaller values are more favorable for users, indicating that their carbon emissions are lower.
[0135] S710-S760 realizes the optimization of multiple carbon calculation models, which is conducive to obtaining a carbon calculation model that better meets user needs.
[0136] Optionally, after obtaining the carbon calculation model, the method further includes: saving the carbon calculation model integrated with the sub-models to a disk or other storage medium for future use. When saving, it is necessary to ensure that the connection relationship and configuration information of the main model and all sub-models are included.
[0137] The embodiment of the present invention also provides a device for establishing a carbon calculation model, which can be implemented by software and / or hardware. Figure 8A schematic diagram of a carbon calculation model establishment device provided by an embodiment of the present invention, see Figure 8 , the device comprises:
[0138] The configuration file creation module 810 is used to create a model configuration file with a preset definition format for the carbon calculation object; wherein the model configuration file includes at least one configuration item, and each configuration item has a plurality of related information contents;
[0139] A sub-model matching module 820, configured to match at least one sub-model in the model library according to at least one configuration item of the model configuration file;
[0140] The carbon calculation model construction module 830 is used to construct the connection relationship between the configuration items of the configuration file and each sub-model, and load each sub-model accordingly to establish a carbon calculation model; wherein the carbon calculation model is used to execute the carbon calculation task of the carbon calculation object.
[0141] Among them, the configuration file creation module 810 can also be called a model configuration adding module, the sub-model matching module 820 can also be called a process model recommendation module, and the carbon calculation model construction module 830 can also be called a calculation model determination module.
[0142] Fig. 9 A schematic diagram of another carbon calculation model establishment device provided in an embodiment of the present invention, see Fig. 9 Optionally, the device further includes a model library 840, and the model library 840 is used to store sub-models.
[0143] Fig.10 A structural diagram of another carbon calculation model establishment device provided by an embodiment of the present invention, see Fig.10 Optionally, the device also includes a model optimization module 850, which is used to combine each carbon calculation model with the carbon emission factor in the factor database to calculate at least two carbon data results; and use the carbon calculation model with the smallest corresponding value in the carbon data result as the final carbon calculation model.
[0144] Fig.11 A structural diagram of another carbon calculation model establishment device provided by an embodiment of the present invention, see Fig.11 Optionally, the device further includes a factor database 860, and the factor database 860 is used to store carbon emission factors.
[0145] Optionally, the sub-model matching module 820 is further used to calculate the similarity between each configuration item in the configuration file and each sub-model in the model library.
[0146] Optionally, the method for calculating the similarity between the configuration item and the sub-model specifically includes:
[0147] Compare the attributes of the relevant information content contained in the configuration item with the attributes of the model content contained in the sub-model to obtain a comparison result;
[0148] If the same relevant information content contains at least two attributes, weights are configured for different attributes respectively; if the same model content contains at least two attributes, weights are configured for different attributes respectively;
[0149] Based on the comparison results and weights, the similarity between the configuration item and the sub-model is calculated.
[0150] Optionally, the method for calculating the similarity between the configuration item and the sub-model specifically includes:
[0151] Extracting features from the relevant information contained in the configuration item to obtain a demand feature vector; and extracting features from the model content contained in the sub-model to obtain a model feature vector;
[0152] The similarity between the configuration item and the sub-model is calculated according to each demand feature in the demand feature vector and each model feature in the model feature vector.
[0153] Optionally, the requirement feature includes: at least one of a standard feature, an architecture feature, a hyperparameter setting feature, and a performance indicator feature;
[0154] And / or, the model features include: at least one of standard features, architecture features, hyperparameter setting features and performance indicator features.
[0155] Optionally, the method for calculating the similarity between the configuration item and the sub-model includes: at least one of a cosine similarity calculation method and a Euclidean distance calculation method.
[0156] Optionally, the sub-model matching module 820 is also used to directly match the text of the relevant information content contained in the configuration file with the model content contained in the sub-model.
[0157] Optionally, the sub-model matching module is further used to:
[0158] A specific sub-model is directly selected from the model library according to the user's specification, and the specific sub-model is used as the sub-model matching the specified configuration item;
[0159] Alternatively, the sub-model matching the specified configuration item is adjusted according to user requirements to obtain a specific sub-model.
[0160] Optionally, the method of constructing the connection relationship between the configuration items of the model configuration file and each sub-model includes: constructing a connection relationship configuration file; the connection relationship configuration file includes: at least one of the name, sub-model path and sub-model parameter of the sub-model matching the configuration item.
[0161] Optionally, the model configuration file also includes model configuration parameters, and the model library also includes a main model;
[0162] The main model matches the model configuration parameters, and the connection relationship configuration file also includes: the connection relationship between each sub-model and the main model.
[0163] Optionally, the model configuration parameters include: at least one of a path of input data, a calculation standard, a boundary and a time interval.
[0164] Optionally, the carbon calculation object includes at least one of an organization carbon calculation object, an activity carbon calculation object, and a product carbon footprint calculation object;
[0165] The configuration item corresponding to the organizational carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources and scope 3 emission sources;
[0166] and / or, the configuration item corresponding to the active carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources, and scope 3 emission sources;
[0167] and / or, the configuration item corresponding to the product carbon footprint calculation object includes at least one process information of at least one life cycle stage;
[0168] And / or, the relevant information includes at least one of input and output data and a calculation method.
[0169] The device for establishing a carbon calculation model provided in the embodiment of the present invention can execute the method for establishing a carbon calculation model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0170] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0171] like Fig.12As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0172] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0173] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for establishing a carbon computing model.
[0174] In some embodiments, the method for establishing a carbon calculation model may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for establishing a carbon calculation model described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for establishing a carbon calculation model in any other appropriate manner (e.g., by means of firmware).
[0175] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0176] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0177] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0178] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0179] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0180] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0181] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0182] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for establishing a carbon calculation model, characterized in that: include: Creating a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, and each of the configuration items has a plurality of related information contents; Matching at least one sub-model in the model library according to the at least one configuration item of the model configuration file; A connection relationship between the configuration items of the model configuration file and each of the sub-models is constructed, and at least one matching sub-model is loaded accordingly to establish a carbon calculation model.
2. The method for establishing a carbon calculation model according to claim 1, characterized in that: Before matching at least one sub-model in the model library according to the at least one configuration item in the model configuration file, the method further includes: calculating the similarity between each configuration item in the configuration file and each sub-model in the model library to obtain a plurality of similarity calculation values; The matching of at least one sub-model in the model library according to the at least one configuration item of the model configuration file includes: Comparing each of the similarity calculation values with a preset matching threshold; The sub-model corresponding to the similarity calculation value greater than the preset matching degree threshold is selected as the sub-model matching the configuration item.
3. The method for establishing a carbon calculation model according to claim 2, characterized in that: The method for calculating the similarity between the configuration item and the sub-model specifically includes: Comparing the attributes of the relevant information content contained in the configuration item with the attributes of the model content contained in the sub-model to obtain a comparison result; If the same related information content contains at least two attributes, weights are configured for different attributes respectively; if the same model content contains at least two attributes, weights are configured for different attributes respectively; The similarity calculation value is obtained according to the comparison result and the weight.
4. The method for establishing a carbon calculation model according to claim 2, characterized in that: The method for calculating the similarity between the configuration item and the sub-model specifically includes: Performing feature extraction on the relevant information content included in the configuration item to obtain a demand feature vector; and performing feature extraction on the model content included in the sub-model to obtain a model feature vector; The similarity calculation value is obtained according to each demand feature in the demand feature vector and each model feature in the model feature vector.
5. The method for establishing a carbon calculation model according to claim 4, characterized in that: The requirement characteristics include: at least one of standard characteristics, architecture characteristics, hyperparameter setting characteristics and performance indicator characteristics; And / or, the model features include: at least one of standard features, architecture features, hyperparameter setting features and performance indicator features.
6. The method for establishing a carbon calculation model according to claim 1, characterized in that: The matching of at least one sub-model in the model library according to the at least one configuration item of the model configuration file includes: The text of the relevant information content contained in the configuration file and the model content contained in the sub-model are directly matched.
7. The method for establishing a carbon calculation model according to claim 1, characterized in that: Before the connection relationship between the configuration items of the model configuration file and each sub-model is constructed and each sub-model is loaded accordingly to establish the carbon calculation model, the method further includes: Directly selecting a specific sub-model from the model library according to user specification, the specific sub-model being used as a sub-model matching the specified configuration item; Alternatively, the sub-model matching the specified configuration item is adjusted according to user requirements to obtain a specific sub-model.
8. The method for establishing a carbon calculation model according to claim 1, characterized in that: The method of constructing the connection relationship between the configuration items of the model configuration file and each of the sub-models includes: constructing a connection relationship configuration file; the connection relationship configuration file includes: at least one of the name, sub-model path and sub-model parameter of the sub-model matching the configuration item.
9. The method for establishing a carbon calculation model according to claim 8, characterized in that: The model configuration file also includes model configuration parameters, and the model library also includes a main model; The main model matches the model configuration parameters, and the connection relationship configuration file further includes: the connection relationship between each of the sub-models and the main model.
10. The method for establishing a carbon calculation model according to claim 8, characterized in that: The model configuration parameters include: at least one of a path for input data, a calculation standard, a boundary and a time interval.
11. The method for establishing a carbon calculation model according to claim 1, characterized in that: The carbon calculation object includes at least one of an organization carbon calculation object, an activity carbon calculation object, and a product carbon footprint calculation object.
12. The method for establishing a carbon calculation model according to claim 11, characterized in that: The configuration item corresponding to the organizational carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources, and scope 3 emission sources; and / or, the configuration item corresponding to the active carbon calculation object includes at least one of scope 1 emission sources, scope 2 emission sources, and scope 3 emission sources; and / or, the configuration item corresponding to the product carbon footprint calculation object includes at least one process information of at least one life cycle stage; And / or, the relevant information includes at least one of input and output data and a calculation method.
13. The method for establishing a carbon calculation model according to claim 1, characterized in that: The number of sub-models matching the configuration items in the configuration file is at least two; the number of carbon calculation models established is at least two; After loading the matched at least one sub-model to establish a carbon calculation model, the method further includes: Combining each of the carbon calculation models with the carbon emission factors in the factor database, respectively, to calculate and obtain at least two carbon data results; The carbon calculation model with the smallest corresponding value in the carbon data results is used as the final carbon calculation model.
14. A device for establishing a carbon calculation model, characterized in that: include: A configuration file creation module, used to create a model configuration file with a preset definition format for a carbon calculation object; wherein the model configuration file includes at least one configuration item, each of which has a plurality of related information contents; A sub-model matching module, used for matching at least one sub-model in a model library according to the at least one configuration item of the model configuration file; The carbon calculation model building module is used to build a connection relationship between the configuration items of the configuration file and each of the sub-models, and load at least one matching sub-model accordingly to establish a carbon calculation model.
15. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for establishing a carbon calculation model according to any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for establishing a carbon calculation model according to any one of claims 1 to 13 when executed.
