Engineering carbon emission hierarchical accounting method and system based on path enumeration encoding
By using path enumeration coding and multidimensional inclusion matching, the problems of data fragmentation and computational bottlenecks in traditional carbon emission data management systems have been solved. This has enabled efficient collection of carbon emission data and objective consistency in factor selection, meeting audit traceability requirements and improving the system's response speed and data management uniformity.
Patent Information
- Application Number
- CN202611296225.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
In traditional carbon emission data management systems, carbon emission data is separated from engineering physical structures, leading to difficulties in engineering data aggregation. The lack of an automatic factor matching mechanism with multi-dimensional constraints makes it impossible to meet the requirements of accounting snapshots and lineage tracing mechanisms. Furthermore, hierarchical aggregation suffers from computational bottlenecks, failing to meet audit traceability requirements.
A three-tiered data model of organization, project, and work breakdown structure (WBS) is constructed using path enumeration coding. By combining multidimensional inclusion matching and preset priority, emission factors are automatically selected. The calculation results and factor values are solidified into a complete copy through accounting snapshots. The contribution relationship of activity data to the accounting results is established by data lineage recording. The prefix matching feature of path enumeration is used for hierarchical summarization.
It achieves efficient collection of carbon emission data according to engineering structure level, ensures objective and consistent factor selection, complete reproduction of historical accounting, meets the full-process audit traceability of the calculation process, and improves the system response speed and data management uniformity.
Smart Images

Figure CN123181012A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carbon emission data processing technology, and in particular to a hierarchical accounting method and system for engineering carbon emissions based on path enumeration coding. Background Technology
[0002] In the field of carbon emission accounting and project-level data management for municipal engineering projects, traditional solutions mainly cover the following three aspects: (1) Carbon emission accounting standard system based on activity level data × emission factor: Represented by the international greenhouse gas accounting system (GHG Protocol) and the national standard GB / T 51366 "Building carbon emission calculation standard", it establishes an accounting paradigm that starts from the emission source inventory, collects energy and building material consumption item by item, multiplies it by the corresponding emission factor and sums it up, and classifies and reports it according to the Scope1 / 2 / 3 caliber.
[0003] (2) General carbon emission data management information systems: Currently, the mainstream carbon data management platforms on the market mainly provide functions such as emission source ledger entry, basic emission factor database query, and final emission total statistics. However, the factor allocation of such platforms generally relies on manual specification by users in the entry process, and an automatic association mechanism between the factor database and emission sources has not yet been established.
[0004] (3) Work Breakdown Structure (WBS) technology in the field of engineering project management: In order to implement project schedule and cost management, traditional solutions usually decompose the project into sections and sub-items, and construct a work breakdown structure (WBS) with tree-like hierarchical characteristics. Its underlying data structure often uses adjacency lists for modeling, and realizes data collection and summarization between levels through recursive queries.
[0005] Traditional WBS technology also includes a path enumeration model in its database implementation. Each WBS node records the complete path code from the root node to that node (e.g., "1.2.3"), which can be used for hierarchical queries through string prefix matching. However, this model is only used for schedule and cost management and does not establish a connection with carbon emission accounting data, nor does it utilize its prefix matching feature to solve the problem of hierarchical collection and real-time aggregation of carbon emission data.
[0006] The aforementioned traditional solutions have the following objective technical defects: (1) The separation between carbon emission data and engineering physical structure leads to difficulties in project data collection: Traditional carbon management platforms collect data in a flat ledger based on emission source type, which makes it impossible to establish an effective physical mapping between the data and WBS nodes. In municipal engineering projects, due to the large number of bidding sections and complex procedures, this separation makes it impossible for managers to collect and trace carbon emissions by bidding section or sub-item engineering level, making it difficult to accurately locate specific high-emission procedures and carry out targeted emission reduction.
[0007] (2) The lack of a multi-dimensional constraint factor automatic matching mechanism introduces human error: The selection of emission factors depends entirely on manual specification. There is no automatic screening mechanism based on the applicable conditions of factors in multiple dimensions such as region, material category, year of occurrence, and power grid partition. This results in the selection of factors varying from person to person and lacks uniformity and objectivity. Moreover, after the factor library is updated, the factor version information on which the historical accounting is based is lost, resulting in the inability to reproduce the historical accounting results.
[0008] (3) Lack of accounting snapshot and lineage tracing mechanisms fails to meet audit traceability requirements: Traditional solutions only perform a single static calculation and output the accounting result value, without saving the specific values, version numbers, and calculation context of the emission factors on which the accounting process depends. Therefore, it is impossible to explain which activity level data constitute the final total result, and what the contribution rate of each data is. This black-box accounting cannot be self-verified and is difficult to meet the verification requirements of GB / T 51366 and ISO 14064 for accounting process traceability and audit compliance.
[0009] (4) Hierarchical aggregation based on adjacency lists and recursive queries suffers from severe computational bottlenecks: In municipal engineering projects (such as urban rail transit and large road networks), WBS structures typically have extremely deep hierarchies (up to 8 to 10 levels or more) and tens or even hundreds of thousands of nodes. Using adjacency lists for storage and recursive queries for hierarchical aggregation results in a time complexity that is the product of the number of nodes and the depth of the hierarchy. This leads to a significant increase in the time required for a single aggregation as the data size grows, resulting in a sluggish system response and an inability to support real-time dynamic viewing of carbon emission aggregation data across regions and projects at multiple organizational levels. Summary of the Invention
[0010] The purpose of this invention is to solve at least one technical problem in the background art and to provide a hierarchical accounting method and system for engineering carbon emissions based on path enumeration coding.
[0011] To achieve the above objectives, this invention provides a hierarchical accounting method for engineering carbon emissions based on path enumeration coding, comprising: Establish a three-tier data model: Construct a three-tier data model of organization, project, and work breakdown structure (WBS) in the database. The organizational level includes multi-level nodes, and projects are attached to the end nodes of the multi-level nodes. Establish a work breakdown structure for projects. Each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set. Collect activity level data and bind it to WBS nodes: record the value, unit of measurement, date of occurrence, data source and confidence level of emission sources, and label its material category, region and year with attribute set, and bind the activity level data to WBS nodes; Construct a versioned emission factor library: Each emission factor declares its scope of application with a multidimensional key-value set, which includes at least a set of regions, materials, years, and power grid zones; and uses a second type of slowly changing dimension mechanism to record the version number, effective date, expiration date, and whether it is the current version for each emission factor. Intelligent matching of emission factors: The material category, region, and year attribute of the activity level data are used to construct range filtering conditions. Multi-dimensional inclusion matching is performed on candidate emission factors that are within the validity period and are the current version. The dimensions declared by the emission factors must include all values of the filtering conditions, and the dimensions not declared by the emission factors are considered as wildcards. The optimal emission factor is selected according to the preset priority. Batch calculation and hierarchical aggregation: Perform batch calculations on the matched activity level data and corresponding emission factors to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2 or Scope3. Hierarchical aggregation is performed using the prefix matching feature of WBS path enumeration, and the emission aggregation of any level node is completed in one go based on the path prefix condition. Generate accounting snapshot: Generate a unique snapshot identifier for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation, and persist the total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this operation as a whole. The snapshot saves a complete copy of the accounting results and the emission factor values used. Establish data lineage: Establish lineage associations for each activity level data and accounting result. The lineage association table records the accounting snapshot identifier, WBS node identifier, activity level data identifier, factor identifier and version number, contribution emission, contribution rate, calculation expression and lineage generation time.
[0012] According to one aspect of the present invention, the path enumeration encoding of the WBS node adopts a dot-separated numerical hierarchical encoding; the dynamic attribute set includes professional attributes, stage attributes, unit of measurement attributes, and quantity attributes.
[0013] According to one aspect of the present invention, the unit of measurement of the activity level data is automatically aligned with the unit of measurement of the emission factor through a built-in unit conversion rule library. The conversion rule library has built-in standard conversion relationships covering the dimensions of mass, volume, energy, length and area, and supports administrators to add custom units and their conversion coefficients with standard units. During batch calculations, a dimensional consistency check is first performed on the measurement units of the activity level data and the emission factors. After the check passes, the activity data values are normalized and converted into equivalent values under the factor measurement units according to the conversion rules before being included in the calculation.
[0014] According to one aspect of the invention, the dates of occurrence of the activity level data are correlated with the set of years of the emission factors based on the following criteria: The effective versions of emission factors are selected based on the occurrence date of the activity level data. The emission factor version that meets all of the following conditions is selected: the effective date of the emission factor version is not later than the occurrence date; the emission factor version is not expired, or its expiration date is later than the occurrence date; the year to which the occurrence date belongs is included in the year set of emission factor versions; for activity level data that occurs continuously across years, each data point is split according to the occurrence date and assigned to the emission factor version of the corresponding year.
[0015] According to one aspect of the present invention, the multidimensional matching includes: the material category, region, and year attribute values of the activity level data respectively constitute a single-value filter set; the set of dimension values declared for the emission factor must include all values in the corresponding filter set; wherein the region dimension supports administrative division level prefix matching in addition to exact matching; the material category and year dimensions use enumerated values for exact matching; when a certain dimension field of the emission factor is an empty set, that dimension does not participate in the filtering and is regarded as a wildcard.
[0016] According to one aspect of the present invention, the preset priority is as follows: first, the matching degree of the power grid partition dimension is compared, and the emission factor that exactly hits the declared value is given priority over the emission factor that hits the wildcard value; if the matching degree of the power grid partition dimension is the same, the matching degree of the material category dimension is compared, and the emission factor that exactly hits the declared value is given priority over the emission factor that hits the wildcard value; if they are still the same, the year dimension is compared, and the emission factor that has a higher degree of fit between the declared year and the year of occurrence is given priority; if all three priority levels are the same, the one with the highest matching confidence is selected; if the confidence levels are still the same, the emission factor with the latest version number is selected; the matching results of each dimension and the judgment path on which the selection process is based are recorded together.
[0017] According to one aspect of the present invention, the batch operation is as follows: arranging the activity level data values of the same batch into an activity data vector, arranging the factor values of the corresponding matching emission factors into a factor vector of the same dimension, and multiplying the two vectors element by element to obtain the emission result vector; The emission factors include: fossil fuel combustion factors, industrial process emission factors, purchased electricity factors, purchased heat factors, carbon emissions from building materials, transportation factors, and waste disposal factors. The classification rules for the Scope are as follows: fossil fuel combustion factors and industrial process emission factors correspond to Scope1, purchased electricity factors and purchased heat factors correspond to Scope2, and building material embodied carbon factors, transportation factors, and waste disposal factors correspond to Scope3.
[0018] According to one aspect of the present invention, the hierarchical aggregation using the prefix matching feature of WBS path enumeration is as follows: for any level node, its path enumeration code is used as a prefix condition, all WBS nodes whose paths begin with this prefix are queried, and the emission results bound to them are aggregated at once without recursive traversal.
[0019] According to one aspect of the invention, the persistent content of the accounting snapshot includes: total emissions, scope classification, phase decomposition, professional decomposition, intensity indicators, and a complete copy of the factor value, unit of measurement, version number, effective date, expiration date and matching context for each emission factor used in this accounting.
[0020] According to one aspect of the present invention, the contribution rate is calculated as follows: contribution rate = emission amount calculated by matching emission factors for the activity level data ÷ total emission amount of the accounting result × 100%; lineage is generated in real time during the accounting process and persisted along with the accounting snapshot; when the activity level data changes, a recalculation is triggered, generating a new accounting snapshot and a corresponding new lineage record, while the historical accounting snapshots and their lineage records remain unchanged.
[0021] To achieve the above objectives, the present invention also provides a hierarchical accounting system for engineering carbon emissions based on path enumeration coding, comprising: The three-tier data model building module constructs a three-tier data model of organization, project, and work breakdown structure (WBS) in the database. The organizational level includes multi-level nodes, and projects are attached to the end nodes of the multi-level nodes. The work breakdown structure is established for projects, and each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set. The activity level data acquisition and WBS node binding module records the value, unit of measurement, date of occurrence, data source and confidence level of emission source consumption, and labels its material category, region and year with attribute sets, and binds the activity level data to the WBS node; The versioned emission factor library construction module declares the scope of application of each emission factor with a multidimensional key-value set, which includes at least a region set, a material set, a year set, and a power grid partition set; and uses a second type of slowly changing dimension mechanism to record the version number, effective date, expiration date, and whether it is the current version for each emission factor. The emission factor intelligent matching module constructs the material category, region, and year attribute of the activity level data as range filtering conditions. It performs multi-dimensional inclusion matching on candidate emission factors that are within the validity period and are the current version. The declared dimensions of the emission factor must include all values of the filtering conditions, and the undeclared dimensions of the emission factor are considered as wildcards. The optimal emission factor is selected according to the preset priority. The batch calculation and hierarchical aggregation module performs batch calculations on the matched activity level data and corresponding emission factors to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2 or Scope3. The module uses the prefix matching feature of WBS path enumeration to perform hierarchical aggregation, and completes the emission aggregation of any level node in one go based on the path prefix condition. The accounting snapshot generation module generates a unique snapshot identifier for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation. It persists the total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this operation as a whole. The snapshot saves a complete copy of the accounting results and the emission factor values used. The data lineage establishment module establishes a lineage association for each activity-level data and accounting result. The lineage association table records the accounting snapshot identifier, WBS node identifier, activity-level data identifier, factor identifier and version number, contribution emission, contribution rate, calculation expression and lineage generation time.
[0022] To achieve the above objectives, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the path enumeration encoding-based engineering carbon emission hierarchical accounting method as described above.
[0023] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path enumeration encoding-based hierarchical accounting method for engineering carbon emissions as described above.
[0024] According to the present invention, a three-layer data model of organization, project, and work breakdown structure (WBS) is constructed. Activity-level data is bound to WBS nodes. The prefix matching characteristic of path enumeration coding is used to replace recursive queries to achieve hierarchical aggregation. Multidimensional inclusion matching and preset priority are combined to achieve automatic selection of emission factors. The calculation results and factor values are solidified into complete copies through accounting snapshots, and the contribution relationship of activity data to the accounting results is established by data lineage records. This achieves efficient collection of carbon emission data according to engineering structure levels, objective consistency of factor selection, complete reproduction of historical accounting, and full-process audit traceability of the calculation process. Attached Figure Description
[0025] Figure 1 A flowchart illustrating a method for hierarchical accounting of engineering carbon emissions based on path enumeration coding according to an embodiment of the present invention; Figure 2 This schematic diagram illustrates a data lineage diagram according to one embodiment of the present invention. Detailed Implementation
[0026] The invention will now be discussed with reference to exemplary embodiments. It should be understood that the described embodiments are merely intended to enable those skilled in the art to better understand and thus implement the invention, and are not intended to imply any limitation on the scope of the invention.
[0027] As used herein, the term "comprising" and its variations are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "at least partially based on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment".
[0028] Figure 1 A flowchart illustrating a hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to an embodiment of the present invention is shown below. Figure 1 As shown, the hierarchical accounting method for engineering carbon emissions based on path enumeration coding includes the following steps: S1. Establish a three-layer data model.
[0029] A three-tiered data model of organization, project, and work breakdown structure (WBS) is constructed in the database. The organizational hierarchy includes multi-level nodes, with projects attached to the end nodes of the multi-level nodes. A work breakdown structure is established for each project, and each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set.
[0030] The multi-level nodes of the organizational hierarchy form a tree structure, with the terminal nodes being the leaf nodes. Projects, as data entities, are attached to the leaf nodes, achieving data access isolation between different organizational levels. The path enumeration encoding of WBS nodes uses a dot-separated hierarchical numerical encoding; for example, 1.2.3 represents the third node in the third level, under the second node in the second level of the first level. Each node records the parent node identifier (Parent ID), the complete enumerated path (Path), the hierarchy depth (Depth), and a dynamic attribute set. The dynamic attribute set includes professional attributes (such as civil engineering, mechanical and electrical engineering, and rail transit), stage attributes (such as design stage, construction stage, and operation and maintenance stage), unit of measurement attributes (such as tons, cubic meters, and kilowatt-hours), and quantity attributes (such as designed quantity and actual completed quantity).
[0031] By using path enumeration encoding, the WBS hierarchical relationship is solidified into a string prefix inclusion relationship, and hierarchical aggregation can be achieved by querying the prefix condition without recursive traversal.
[0032] S2. Collect activity level data and bind it to WBS nodes.
[0033] Record the numerical value, unit of measurement, date of occurrence, data source and confidence level of emission source consumption, and label the material category, region and year with attribute set, bind activity level data with WBS nodes, and support the association of voucher attachments.
[0034] Activity level data is the fundamental input for carbon emission accounting. The numerical value represents the actual consumption of the emission source; the unit of measurement records the unit of measurement for the consumption; the date of occurrence records the actual time the emission activity occurred (not the accounting time); the data source identifies the data collection channel (e.g., manual entry, IoT sensors, ERP system interface); and the confidence level indicates the reliability of the data (e.g., high, medium, low). The material category indicates the material type of the emission source (e.g., cement, steel, diesel, electricity); the region indicates the geographical location where the emission activity occurred; and the year is derived from the date of occurrence. Supporting documentation allows binding original documents, invoices, test reports, etc., with the activity level data as supporting evidence for the data source.
[0035] Activity level data is linked to WBS nodes via foreign keys, making each emission data point traceable to a specific engineering decomposition unit.
[0036] S3. Construct a versioned emission factor library.
[0037] Each emission factor declares its scope of application using a multidimensional key-value set, which includes at least a set of regions, materials, years, and power grid zones. A Slowly Changing Dimension Type 2 (SCD Type 2) mechanism is used to record the version number, effective date, expiration date, and whether it is the current version for each emission factor.
[0038] Emission factors are carbon emission coefficients corresponding to a unit of activity level data, and their applicable scope is declared through a multidimensional key-value set. The region set declares the geographical scope to which the factor applies (e.g., national, provincial, or municipal scope), the material set declares the material type to which it applies (e.g., cement, concrete), the year set declares the year range to which it applies (e.g., 2020 to 2022), and the power grid zone set declares the power grid zone to which it applies (e.g., first power grid zone, second power grid zone).
[0039] The SCD Type 2 mechanism generates a new version record for each change to a factor. The old version is marked with its expiration date, and the new version is marked with its effective date, ensuring that the entire factor evolution is traceable. The current version identifier is a boolean value, and only the latest valid version is marked as true.
[0040] S4, Intelligent matching of emission factors.
[0041] The material category, region, and year attribute of the activity level data are used to construct range filtering conditions. Multidimensional inclusion matching is then performed on candidate emission factors that are within their validity period and represent the current version. All declared dimensions of the emission factor must include all values of the filtering conditions; undeclared dimensions are treated as wildcards. The optimal emission factor is selected according to a preset priority.
[0042] The matching process first performs time validity screening: using the occurrence date of the activity level data as the time base, versions with an effective date no later than the occurrence date, an expiration date later than the occurrence date (or not yet expired), and the year of the occurrence date being included in the factor year set are selected. For activity level data that occurs continuously across years, each data point is split according to its occurrence date and assigned to the corresponding year's factor version.
[0043] The semantics of multidimensional matching are as follows: the material category, region, and year attribute values of the activity level data each constitute a single-value filter set, and the declared dimension value set of the emission factor must contain all values in the corresponding filter set. Specifically, the region dimension supports not only exact matching but also administrative division level prefix matching (e.g., if the activity data region is a certain province and city, it can match factors whose declared region is that province); the material category and year dimensions use enumerated values for exact matching. When a dimension field of the emission factor is empty, that dimension is not included in the filtering and is considered a wildcard; any value in the activity data is considered a successful match.
[0044] When multiple emission factors match successfully simultaneously, the following preset priority is used for selection: First, the matching degree of the power grid partition dimension is compared, with factors that precisely match the declared value taking precedence over those that match wildcards; if the matching degree of the power grid partition dimension is the same, the material category dimension is compared, with the same rules; if they are still the same, the year dimension is compared, with factors whose declared year range is more closely aligned with the year of occurrence taking precedence; if all three priority levels are the same, the factor with the highest matching confidence is selected; if the confidence levels are still the same, the factor with the latest version number is selected. The matching results of each dimension and the judgment path used in the selection process are recorded together for future review.
[0045] S5, Batch Calculation and Hierarchical Summary.
[0046] The matched activity level data and corresponding emission factors are batch-processed to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2, or Scope3. The prefix matching feature of WBS path enumeration is used for hierarchical aggregation, and the emission aggregation of any level node is completed in one go based on the path prefix condition.
[0047] Batch calculation adopts a vectorized calculation method: the activity level data values of the same batch are arranged into an activity data vector, and the factor values of the corresponding matching emission factors are arranged into a factor vector of the same dimension. The two vectors are multiplied element by element to obtain the emission result vector, thus replacing the cyclic calculation one by one with a batch calculation.
[0048] Emission results are automatically categorized based on emission factor type and unit of measurement: Scope 1 (Direct Emissions): Fossil fuel combustion factors (such as diesel and natural gas combustion) and industrial process emission factors (such as cement production processes), typically measured in tons, kilograms, cubic meters, and liters; Scope2 (Indirect Emissions from Purchased Energy): Purchased electricity factor and purchased heat factor, typically measured in kilowatt-hours and gigajoules; Scope3 (Other Indirect Emissions): Carbon factors embodied in building materials, transportation factors, and waste disposal factors, typically measured in tons or ton-kilometers.
[0049] The processing rules for cross-scope boundaries are as follows: when the same activity data involves multiple scopes, it is classified into a single scope according to its main emission attributes and its boundary attributes are marked in the lineage record to avoid duplicate measurement; emissions from fuel consumed by self-generated power plants are classified into Scope1, while purchased electricity and heat are classified into Scope2; composite emission sources that include both direct combustion and purchased energy are split into multiple activity data according to energy type and then classified separately.
[0050] Hierarchical aggregation leverages the prefix matching feature of WBS path enumeration: for any level node, its path enumeration code is used as a prefix condition to query all WBS nodes whose paths begin with that prefix, aggregating their bound emission results all at once without recursive traversal. For example, a node with a path code of 1.2 can have its own emissions and those of all its child nodes aggregated at once using the condition (WHERE path='1.2' OR pathLIKE '1.2.%').
[0051] S6. Generate accounting snapshot.
[0052] A unique snapshot identifier is generated for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation. The total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this study are persisted as a whole. The snapshot saves a complete copy of the calculation results and the emission factor values used.
[0053] The snapshot persists the following content: total emissions, Scope classification (emissions for Scope1, Scope2, and Scope3), phase breakdown (emissions for the design, construction, and operation / maintenance phases), professional breakdown (emissions for civil engineering, mechanical and electrical engineering, and rail transit), intensity indicators (such as carbon emissions per unit of output and carbon emissions per unit of project volume), and a complete copy of the factor value, unit of measurement, version number, effective date, expiration date, and matching context for each emission factor used in this calculation. The snapshot saves a complete copy of the emission result values and the factor values used (value snapshot), not just the result values and factor version number references. Therefore, even if historical factor versions in the factor library are subsequently marked as invalid or updated, the factor value copies persisted in the snapshot still ensure that historical calculation results can be completely reproduced as is.
[0054] S7. Establish data lineage.
[0055] Establish lineage relationships for each activity level data point and accounting result. The lineage relationship table records the accounting snapshot identifier, WBS node identifier, activity level data identifier, factor identifier and version number, contribution emissions, contribution rate, calculation expression, and lineage generation time.
[0056] Blood relations are stored using a relational blood relation table. The blood relation table must contain at least the following fields: blood relation identifier, accounting snapshot identifier, WBS node identifier, activity level data identifier, factor identifier and version number, contribution emission of the activity data, contribution rate, calculation expression, and blood relation generation time.
[0057] Lineage is generated in real time during the accounting process and persisted along with the accounting snapshot. When the activity level data changes, a recalculation is triggered, generating a new accounting snapshot and corresponding new lineage records. Historical accounting snapshots and their lineage records remain unchanged (immutable). This allows for both forward analysis of the impact of activity level data on the results of previous accounting iterations and backward analysis of any accounting result to trace its complete data composition.
[0058] In this embodiment, through the above steps, the present invention can achieve the following technical effects: (1) High efficiency in hierarchical aggregation: Prefix matching of path enumeration transforms the aggregation of deep-level WBS from recursive query to a single conditional query. A comparative test was conducted on the path enumeration prefix matching and the recursive query based on the adjacency list on the same WBS tree (test environment: ordinary office computer (processor i5-1155G7, memory 16GB, SQLite 3.53 database, average of 3 rounds), hierarchical depth 8 levels, nodes of each magnitude are evenly distributed in each level), the results are as follows: With 1000 WBS nodes and 8 levels, the recursive query summary takes about 69.9 milliseconds, and the path prefix matching summary takes about 15.4 milliseconds. With 5000 WBS nodes and 8 levels, the recursive query summary takes about 298.3 milliseconds, and the path prefix matching summary takes about 76.0 milliseconds. With 10,000 WBS nodes and 8 levels, the recursive query summary takes approximately 636.3 milliseconds, and the path prefix matching summary takes approximately 166.3 milliseconds.
[0059] As the node size increases, the number of SQL queries required for recursive queries increases approximately with the product of the number of nodes and the level depth. However, path prefix matching transforms the aggregation at any level into a single conditional query, with the number of SQL queries for a single aggregation always being 1, regardless of the subtree size. At a scale of 10,000 nodes, the time consumption for aggregation across the entire tree is reduced by approximately 74%, and the number of SQL queries required is reduced from 38,114 to 8,751, demonstrating unexpected technical effects and supporting real-time aggregation across multiple organizational hierarchies.
[0060] (2) Objective selection of factors: Multidimensional automatic matching eliminates the arbitrariness of manually specified factors, and the matching rules are uniform and the results are consistent.
[0061] (3) Reproducible accounting: The snapshot mechanism solidifies the factor version and calculation results, and the historical accounting is not distorted as the factor library is updated.
[0062] (4) Full auditability: The bloodline and contribution rate records make it possible to explain the data composition of any accounting result, which meets the calculation traceability requirements of GB / T 51366 and ISO 14064.
[0063] (5) Engineering semantic integration: Emission data is linked to WBS, so that carbon emission management, project progress and cost management share the same decomposition system, which makes it easier to locate high emission processes and take targeted emission reduction measures.
[0064] Furthermore, according to one embodiment of the present invention, the unit of measurement for activity level data is automatically aligned with the unit of measurement for emission factors through a built-in unit conversion rule library. The conversion rule library contains built-in standard conversion relationships for mass (tons, kilograms, grams), volume (cubic meters, liters), energy (kilowatt-hours, megajoules, gigajoules), length, and area dimensions. Simultaneously, the conversion rule library supports configurable expansion, allowing administrators to add custom units and their conversion coefficients with standard units.
[0065] During batch calculations, a dimensional consistency check is first performed between the units of measurement for activity level data and emission factors. After the check passes, the activity data values are normalized and converted to their equivalent values in the factor units according to the conversion rules before being used in the calculations. The conversion factors used and the conversion process are recorded together for audit traceability.
[0066] For example, if an activity level data record shows a diesel consumption of 5000 liters, and the matching diesel combustion emission factor is measured in tons, then the conversion factor from liters to tons (such as 0.00084 tons per liter) is queried from the conversion rule base to convert 5000 liters to 4.2 tons before being included in the emission calculation.
[0067] In this embodiment, by verifying the consistency of dimensions and automatically converting units, the calculation errors caused by inconsistent units of measurement are eliminated. At the same time, it supports the flexible expansion of custom units, which improves the applicability of the system.
[0068] Furthermore, according to one embodiment of the present invention, the occurrence date of the activity level data is associated with the year set of emission factors based on the following criteria: the occurrence date of the activity level data is used as the time criterion to filter valid versions of emission factors, and emission factor versions that meet all of the following conditions are selected: the effective date of the emission factor version is not later than the occurrence date; the emission factor version is not expired, or its expiration date is later than the occurrence date; the year to which the occurrence date belongs is included in the year set of emission factor versions.
[0069] For activity level data that spans multiple years, each data point is broken down by its occurrence date and assigned to the corresponding emission factor version for that year. For example, if a construction activity lasts from October 2023 to March 2024, its activity level data is broken down into the 2023 and 2024 segments by occurrence date, and the effective emission factor versions for 2023 and 2024 are matched respectively, ensuring that the emissions for each time period are subject to the effective emission factor for that period.
[0070] The calculation date is only used to determine the snapshot generation time and is not involved in the selection of the emission factor version.
[0071] In this implementation, the occurrence date rather than the calculation date is used as the basis for selecting the factor version to ensure that the historical activity data is applicable to the valid emission factors at the time of its occurrence, avoid the distortion of historical calculations due to subsequent updates to the emission factor database, and achieve accurate time alignment between the emission factor version and the activity data.
[0072] Furthermore, according to one embodiment of the present invention, multidimensional matching includes the following: the material category, region, and year attribute values of the activity level data each constitute a single-value filter set, and the declared dimension value set of the emission factor must include all values in the corresponding filter set. Specifically, the region dimension supports administrative division level prefix matching in addition to exact matching, while the material category and year dimensions use enumerated values for exact matching. When a certain dimension field of the emission factor is an empty set, that dimension is not included in the filtering and is considered a wildcard.
[0073] For example, the attributes of a certain activity level data are: material type is cement, location is a certain city in a certain province, and year is 2023. The applicable scope of candidate emission factor A is: the region set includes the province, the material set includes cement and concrete, the year set includes 2022 to 2024, and the power grid zone set is empty. Then, factor A's region set includes the city in the province (matched by administrative division level prefix), the material set includes cement, the year set includes 2023, and the empty power grid zone set is considered a wildcard, therefore factor A matches successfully.
[0074] In this implementation, by matching semantic and administrative division level prefixes in the set, flexible declaration and precise matching of the applicable scope of factors are achieved. Automatic wildcard matching for undeclared dimensions avoids overly restricted matching failures, thereby improving the coverage and matching success rate of the factor library.
[0075] Furthermore, according to one embodiment of the present invention, the preset priority is as follows: first, compare the matching degree of the power grid partition dimension, with emission factors that precisely match the declared value taking priority over emission factors that match wildcards; if the matching degree of the power grid partition dimension is the same, compare the matching degree of the material category dimension, with emission factors that precisely match the declared value taking priority over emission factors that match wildcards; if they are still the same, compare the year dimension, with emission factors that have a higher degree of fit between the declared year and the year of occurrence taking priority; if all three priority levels are the same, select the one with the highest matching confidence; if the confidence is still the same, select the emission factor with the latest version number. The matching results of each dimension and the determination path on which the selection process is based are recorded together.
[0076] For example, activity data is matched to factor A (emission factor A) and factor B (emission factor B): Factor A's power grid zone is a specific power grid zone (exact match), the material is cement (exact match), and the year is from 2020 to 2025 (wide range). Factor B's power grid partition is empty (wildcard), the material is cement (precise hit), and the year is 2023 (narrow range, high fit).
[0077] According to the priority rules, the precise matching of power grid zones by factor A takes precedence over the wildcard matching by factor B, so factor A is selected. If the matching degree of power grid zones is the same for both, then the material categories are compared; if they are still the same, then factor B has a narrower year range and a higher degree of fit, so factor B is selected first.
[0078] In this implementation, a multi-dimensional priority selection rule is used to ensure that the most accurate and applicable factor is selected from multiple candidate factors. The transparent recording of the selection process supports post-event review and audit traceability.
[0079] Furthermore, according to one embodiment of the present invention, the batch operation is as follows: the activity level data values of the same batch are arranged into an activity data vector, the factor values of the corresponding matching emission factors are arranged into a factor vector of the same dimension, and the two vectors are multiplied element by element to obtain the emission result vector.
[0080] Emission factors include: fossil fuel combustion factors, industrial process emission factors, purchased electricity factors, purchased heat factors, carbon emissions from building materials, transportation factors, and waste disposal factors.
[0081] The Scope classification rules are as follows: fossil fuel combustion factors and industrial process emission factors correspond to Scope1, purchased electricity factors and purchased heat factors correspond to Scope2, and building material embodied carbon factors, transportation factors, and waste disposal factors correspond to Scope3.
[0082] For example, a batch contains 3 activity data entries: Data 1 represents a diesel consumption of 100 tons, matched with a fossil fuel combustion factor of 2.68 tons of carbon dioxide equivalent per ton; Data 2 shows an electricity consumption of 5000 kWh, matched with a purchased electricity factor of 0.5703 kg CO2 equivalent per kWh; Data 3 shows a cement consumption of 50 tons, which corresponds to a building material carbon factor of 0.735 tons of carbon dioxide equivalent per ton.
[0083] After arranging the vectors, multiply them element by element: The emission result vector is [100 x 2.68, 5000 x 0.5703, 50 x 0.735], which, after unit normalization, is [268.0, 2.8515, 36.75] tons of CO2 equivalent, totaling 307.6 tons of CO2 equivalent. The emission factor unit for data 2 is kilograms of CO2 equivalent per kilowatt-hour. 5000 kilowatt-hours multiplied by 0.5703 kilograms of CO2 equivalent per kilowatt-hour equals 2851.5 kilograms of CO2 equivalent, which, after normalization using the conversion rule library, is 2.8515 tons of CO2 equivalent and then incorporated into the result vector.
[0084] Categorize by Scope: Data 1 goes into Scope1, Data 2 into Scope2, and Data 3 into Scope3.
[0085] In this implementation, vectorized batch operations are used instead of iterative calculations, which significantly improves the processing efficiency of large-scale data accounting; automatic scope classification based on factor type and unit of measurement avoids the subjectivity and errors of manual classification.
[0086] Furthermore, according to one embodiment of the present invention, hierarchical aggregation is performed using the prefix matching characteristic of WBS path enumeration as follows: for any level node, its path enumeration code is used as a prefix condition to query all WBS nodes whose paths start with this prefix, and the emission results bound to it are aggregated at once without recursive traversal.
[0087] For example, the WBS tree contains the following nodes and their path codes: Node A has a path of 1, representing the entire project; Node B has a path of 1.1, representing segment 1; Node C has a path of 1.1.1, representing sub-item 1 of section 1; Node D has a path of 1.1.2, representing sub-item 2 of section 1; Node E has a path of 1.2, representing segment 2.
[0088] When performing hierarchical aggregation on node B (path 1.1), a query with a prefix condition (WHERE path='1.1' OR pathLIKE '1.1.%') is used to aggregate the results of node B itself, as well as nodes C and D, in one go, without needing to recursively traverse its subtrees starting from node B.
[0089] In this implementation, string prefix matching is used to replace recursive queries, reducing the time complexity of hierarchical aggregation from O(n multiplied by d) to O(n). This enables millisecond-level responses in deep-level, multi-node scenarios, supporting large-scale real-time aggregation requirements.
[0090] Furthermore, according to one embodiment of the present invention, the persistent content of the accounting snapshot includes: total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators, and a complete copy of the factor value, unit of measurement, version number, effective date, expiration date and matching context of each emission factor used in this accounting.
[0091] For example, a snapshot generated from a certain accounting calculation includes: The total emissions were 15,680.5 kg of carbon dioxide equivalent. The scope is categorized as follows: Scope1 equals 8500.0, Scope2 equals 5200.5, and Scope3 equals 1980.0. The phases are broken down as follows: design phase (1200.0), construction phase (13000.5), and operation and maintenance phase (1480.0). The professional breakdown is as follows: Civil Engineering = 9500.0, Mechanical and Electrical Engineering = 4680.5, and Rail Transit = 1500.0; The intensity index is that the carbon emission per unit of output value is equal to 0.0158 kg of carbon dioxide equivalent per yuan; The factor copy contains the factor values, units of measurement, version numbers, effective and expiration dates, and matching contexts for all emission factors used in this instance.
[0092] In this embodiment, the snapshot preserves a complete copy of the calculation results and factor values. Even if the factor library is updated later, the historical snapshot can still completely reproduce the original calculation results, thus achieving the time invariance and auditability of the calculation results.
[0093] Furthermore, according to one embodiment of the present invention, the formula for calculating the contribution rate is: Contribution rate = Emissions calculated from the activity level data using matched emission factors ÷ Total emissions from the relevant accounting results × 100%.
[0094] For example, if the total emissions of a certain accounting result are 10,000 kg of carbon dioxide equivalent, and the emissions of activity data D1 calculated by the matching factor are 500 kg of carbon dioxide equivalent, then the contribution rate of D1 is 500 divided by 10,000 multiplied by 100%, which equals 5%.
[0095] Lineage is generated in real time during the accounting process and persisted along with the accounting snapshot. When the activity level data changes, a recalculation is triggered, generating a new accounting snapshot and a corresponding new lineage record. Historical accounting snapshots and their lineage records remain unchanged (immutable).
[0096] For example, if the value of activity level data D1 is revised from 100 to 120, triggering a recalculation: Generate a new accounting snapshot SNAPSHOT_V2; A new lineage record is generated, and D1's contribution rate in the new snapshot is updated accordingly. The original accounting snapshot SNAPSHOT_V1 and its lineage records remain unchanged and are still traceable.
[0097] like Figure 2 As shown, D1 and D2 are activity level data, F1 and F2 are emission factors that match the activity level data, and R1 is a snapshot of the calculation results. The arrows in the figure indicate the direction of data flow and correlation: activity level data contributes to the snapshot of the calculation results after being calculated by matching factors.
[0098] like Figure 2 As shown, solid arrows represent factor matching relationships, i.e., the correspondence between activity level data and matching emission factors, and the calculation contribution relationship between matching emission factors and the snapshot of the accounting results; dashed arrows represent lineage tracing relationships, i.e., the reverse tracing path from the snapshot of the accounting results to the activity level data and matching factors. Through this lineage tracing relationship, it is possible to trace the complete data composition backward from the accounting results, and to analyze the impact of activity level data on the accounting results forward.
[0099] In this implementation, by quantifying contribution rates and maintaining immutable lineage records, positive impact analysis from activity data to accounting results and reverse tracing from accounting results to activity data are achieved, thus meeting the requirements of audit and verification for data transparency.
[0100] Furthermore, according to one embodiment of the present invention, the present invention also provides a hierarchical accounting system for engineering carbon emissions based on path enumeration coding, comprising: The three-tier data model building module constructs a three-tier data model of organization, project, and work breakdown structure (WBS) in the database. The organizational hierarchy includes multi-level nodes, and projects are attached to the end nodes of the multi-level nodes. The work breakdown structure is built for projects, and each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set. The activity level data acquisition and WBS node binding module records the value, unit of measurement, date of occurrence, data source and confidence level of emission source consumption, and labels the material category, region and year with attribute sets, and binds the activity level data to the WBS node; The versioned emission factor library construction module declares the scope of application for each emission factor with a multidimensional key-value set, which includes at least a region set, a material set, a year set, and a power grid partition set; and uses a second type of slowly changing dimension mechanism to record the version number, effective date, expiration date, and whether it is the current version for each emission factor. The emission factor intelligent matching module constructs range filtering conditions based on the material category, region, and year attributes of the activity level data. It performs multi-dimensional inclusion matching on candidate emission factors that are within the validity period and are in the current version. The declared dimensions of the emission factor must include all values of the filtering conditions; dimensions not declared by the emission factor are treated as wildcards. The optimal emission factor is selected according to a preset priority. The batch calculation and hierarchical aggregation module performs batch calculations on the matched activity level data and corresponding emission factors to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2 or Scope3. The module uses the prefix matching feature of WBS path enumeration to perform hierarchical aggregation, and completes the emission aggregation of any level node in one go based on the path prefix condition. The accounting snapshot generation module generates a unique snapshot identifier for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation. It persists the total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this operation as a whole. The snapshot saves a complete copy of the accounting results and the emission factor values used. The data lineage establishment module establishes a lineage association for each activity-level data and accounting result. The lineage association table records the accounting snapshot identifier, WBS node identifier, activity-level data identifier, factor identifier and version number, contribution emission, contribution rate, calculation expression and lineage generation time.
[0101] Furthermore, according to one embodiment of the present invention, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the path enumeration encoding-based engineering carbon emission hierarchical accounting method as described above.
[0102] Furthermore, according to one embodiment of the present invention, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the engineering carbon emission hierarchical accounting method based on path enumeration encoding as described above.
[0103] Those skilled in the art will recognize that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and equipment can be referred to the corresponding process in the foregoing method implementation, and will not be repeated here.
[0105] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0106] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the objectives of the embodiments of the present invention, depending on actual needs.
[0107] In addition, the functional modules in the embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0108] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to conventional solutions, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the sending / receiving methods of various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0109] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in this application.
[0110] It should be understood that the sequence number of each step in the invention and its embodiments does not absolutely imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Claims
1. A hierarchical accounting method for engineering carbon emissions based on path enumeration coding, characterized in that, include: Establish a three-tier data model: Construct a three-tier data model of organization, project, and work breakdown structure (WBS) in the database. The organizational level includes multi-level nodes, and projects are attached to the end nodes of the multi-level nodes. Establish a work breakdown structure for projects. Each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set. Collect activity level data and bind it to WBS nodes: record the value, unit of measurement, date of occurrence, data source and confidence level of emission sources, and label its material category, region and year with attribute set, and bind the activity level data to WBS nodes; Construct a versioned emission factor library: Each emission factor declares its scope of application with a multidimensional key-value set, which includes at least a set of regions, materials, years, and power grid zones; and uses a second type of slowly changing dimension mechanism to record the version number, effective date, expiration date, and whether it is the current version for each emission factor. Intelligent matching of emission factors: The material category, region, and year attribute of the activity level data are used to construct range filtering conditions. Multi-dimensional inclusion matching is performed on candidate emission factors that are within the validity period and are the current version. The dimensions declared by the emission factors must include all values of the filtering conditions, and the dimensions not declared by the emission factors are considered as wildcards. The optimal emission factor is selected according to the preset priority. Batch calculation and hierarchical aggregation: Perform batch calculations on the matched activity level data and corresponding emission factors to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2 or Scope3. Hierarchical aggregation is performed using the prefix matching feature of WBS path enumeration, and the emission aggregation of any level node is completed in one go based on the path prefix condition. Generate accounting snapshot: Generate a unique snapshot identifier for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation. The accounting results consisting of total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this operation are persisted as a whole. The snapshot saves a complete copy of the accounting results and the emission factor values used. Establish data lineage: Establish lineage associations for each activity level data and accounting result. The lineage association table records the accounting snapshot identifier, WBS node identifier, activity level data identifier, factor identifier and version number, contribution emission, contribution rate, calculation expression and lineage generation time.
2. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The path enumeration encoding of the WBS node adopts a dot-separated numerical hierarchical encoding; the dynamic attribute set includes professional attributes, stage attributes, unit of measurement attributes, and quantity attributes.
3. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The unit of measurement for the activity level data is automatically aligned with the unit of measurement for the emission factors through a built-in unit conversion rule library. The conversion rule library has built-in standard conversion relationships covering the dimensions of mass, volume, energy, length, and area, and supports administrators to add custom units and their conversion coefficients with standard units. During batch calculations, a dimensional consistency check is first performed on the measurement units of the activity level data and the emission factors. After the check passes, the activity data values are normalized and converted into equivalent values under the factor measurement units according to the conversion rules before being included in the calculation.
4. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The set of dates for which the activity level data occurred and the years for the emission factors are correlated according to the following criteria: The effective versions of emission factors are selected based on the occurrence date of the activity level data. The emission factor version that meets all of the following conditions is selected: the effective date of the emission factor version is not later than the occurrence date; the emission factor version is not expired, or its expiration date is later than the occurrence date; the year to which the occurrence date belongs is included in the year set of emission factor versions; for activity level data that occurs continuously across years, each data point is split according to the occurrence date and assigned to the emission factor version of the corresponding year.
5. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The multidimensional matching includes the following: the material category, region, and year attribute values of the activity level data constitute a single-value filter set, and the declared dimension value set of the emission factor must include all values in the corresponding filter set; among them, the region dimension supports administrative division level prefix matching in addition to exact matching, and the material category and year dimensions use enumerated values for exact matching; when a certain dimension field of the emission factor is an empty set, that dimension does not participate in the filtering and is regarded as a wildcard.
6. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 5, characterized in that, The preset priority is as follows: First, compare the matching degree of the power grid partition dimension, and the emission factor that exactly matches the declared value is given priority over the emission factor that matches the wildcard value; if the matching degree of the power grid partition dimension is the same, compare the matching degree of the material category dimension, and the emission factor that exactly matches the declared value is given priority over the emission factor that matches the wildcard value; if they are still the same, compare the year dimension, and the emission factor that has a higher degree of fit between the declared year and the year of occurrence is given priority; if all three priority levels are the same, the one with the highest matching confidence is selected; if the confidence levels are still the same, the emission factor with the latest version number is selected; the matching results of each dimension and the judgment path on which the selection process is based are recorded together.
7. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The batch operation is as follows: arrange the activity level data values of the same batch into an activity data vector, arrange the factor values of the corresponding matching emission factors into a factor vector of the same dimension, and multiply the two vectors element by element to obtain the emission result vector; The emission factors include: fossil fuel combustion factors, industrial process emission factors, purchased electricity factors, purchased heat factors, carbon emissions from building materials, transportation factors, and waste disposal factors. The classification rules for the Scope are as follows: fossil fuel combustion factors and industrial process emission factors correspond to Scope1, purchased electricity factors and purchased heat factors correspond to Scope2, and building material embodied carbon factors, transportation factors, and waste disposal factors correspond to Scope3.
8. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The hierarchical aggregation using the prefix matching feature of WBS path enumeration is as follows: For any level node, its path enumeration code is used as a prefix condition to query all WBS nodes whose paths start with this prefix, and the emission results bound to them are aggregated at once without recursive traversal.
9. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The persistent content of the accounting snapshot includes: total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators, and a complete copy of the factor value, unit of measurement, version number, effective date, expiration date and matching context for each emission factor used in this accounting.
10. The hierarchical accounting method for engineering carbon emissions based on path enumeration coding according to claim 1, characterized in that, The contribution rate is calculated as follows: Contribution rate = Emissions calculated by matching emission factors for the activity level data ÷ Total emissions of the relevant accounting results × 100%; Lineage is generated in real time during the accounting process and persisted along with the accounting snapshot; When activity level data changes, a recalculation is triggered, generating a new accounting snapshot and corresponding new lineage records. Historical accounting snapshots and their lineage records remain unchanged.
11. A hierarchical accounting system for engineering carbon emissions based on path enumeration coding, characterized in that, include: The three-tier data model building module constructs a three-tier data model of organization, project, and work breakdown structure (WBS) in the database. The organizational level includes multi-level nodes, and projects are attached to the end nodes of the multi-level nodes. The work breakdown structure is established for projects, and each WBS node uses path enumeration encoding. The node records the parent node identifier, enumeration path, hierarchy depth, and dynamic attribute set. The activity level data acquisition and WBS node binding module records the value, unit of measurement, date of occurrence, data source and confidence level of emission source consumption, and labels its material category, region and year with attribute sets, and binds the activity level data to the WBS node; The versioned emission factor library construction module declares the scope of application of each emission factor with a multidimensional key-value set, which includes at least a region set, a material set, a year set, and a power grid partition set; and uses a second type of slowly changing dimension mechanism to record the version number, effective date, expiration date, and whether it is the current version for each emission factor. The emission factor intelligent matching module constructs the material category, region, and year attribute of the activity level data as range filtering conditions. It performs multi-dimensional inclusion matching on candidate emission factors that are within the validity period and are the current version. The declared dimensions of the emission factor must include all values of the filtering conditions, and the undeclared dimensions of the emission factor are considered as wildcards. The optimal emission factor is selected according to the preset priority. The batch calculation and hierarchical aggregation module performs batch calculations on the matched activity level data and corresponding emission factors to obtain emission results. Based on the emission factor type and unit of measurement, the emissions are automatically classified into Scope1, Scope2 or Scope3. The module uses the prefix matching feature of WBS path enumeration to perform hierarchical aggregation, and completes the emission aggregation of any level node in one go based on the path prefix condition. The accounting snapshot generation module generates a unique snapshot identifier for the emission classification results of each level node obtained through batch calculation and hierarchical aggregation. It persists the total emissions, scope classification, stage decomposition, professional decomposition, intensity indicators and the list of emission factor versions used in this operation as a whole. The snapshot saves a complete copy of the accounting results and the emission factor values used. The data lineage establishment module establishes a lineage association for each activity-level data and accounting result. The lineage association table records the accounting snapshot identifier, WBS node identifier, activity-level data identifier, factor identifier and version number, contribution emission, contribution rate, calculation expression and lineage generation time.
12. An electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the engineering carbon emission hierarchical accounting method based on path enumeration encoding as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the hierarchical accounting method for engineering carbon emissions based on path enumeration encoding as described in any one of claims 1-10.
