Carbon data verification method and device for cross-block chain transmission and computer equipment
By extracting and mapping semantic data in cross-blockchain carbon data transmission, constructing a hash tree, and detecting digest values, the problem of inaccurate semantic consistency judgment of carbon data in existing technologies is solved, and more efficient data transmission consistency verification is achieved.
Patent Information
- Application Number
- CN202511384222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-26
AI Technical Summary
Existing cross-blockchain carbon data verification methods cannot accurately determine the semantic consistency of carbon data between different blockchains, leading to risks in data transmission and misinterpretation/misuse.
By extracting semantic data from carbon emission data, mapping it to target semantic data in the target blockchain, and converting it into source semantic hash trees and target semantic hash trees, the digest value is checked to verify consistency.
It improves the accuracy of consistency verification for cross-blockchain carbon data transmission, ensures semantic consistency of data across different blockchains, and reduces transmission risks.
Smart Images

Figure CN120874140A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a method, apparatus, and computer device for verifying carbon data transmitted across blockchains. Background Technology
[0002] Carbon emission data management is gradually shifting from the traditional centralized storage model to a distributed, trusted evidence storage system based on blockchain. Currently, power companies, carbon trading platforms, and green certification agencies have generally built their own independent blockchain systems, and the need for carbon data interaction and ownership confirmation between different platforms is growing. Therefore, there is an urgent need for a means to verify the consistency of carbon data transmitted across blockchains.
[0003] In traditional technologies, the methods for verifying the consistency of carbon data transmitted across blockchains generally adopt mechanisms such as field hash comparison, anchor structure synchronization, or relay node consensus. For example, the hash value of the first field of each carbon emission data in the source blockchain and the hash value of the second field of the same carbon emission data in the target blockchain are detected, and the hash values of the first field and the second field are compared. When the hash values of the first field and the second field are consistent, it means that the carbon data is consistent in the source blockchain and when it is transmitted to the target blockchain.
[0004] However, current methods for verifying carbon data transmitted across blockchains still suffer from inaccuracies. Summary of the Invention
[0005] Therefore, it is necessary to provide an accurate method, apparatus, computer device, computer-readable storage medium, and computer program product for verifying carbon data transmitted across blockchains, addressing the aforementioned technical issues.
[0006] Firstly, this application provides a method for verifying carbon data transmitted across blockchains, the method comprising:
[0007] Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain;
[0008] Extract multiple source semantic data from carbon emission data, and map each source semantic data to target semantic data in the target blockchain;
[0009] Convert multiple source semantic data into a source semantic hash tree, and detect the first target digest value of the source semantic hash tree;
[0010] Multiple pieces of target semantic data are converted into a target semantic hash tree, and the second target digest value of the target semantic hash tree is detected;
[0011] Based on the first target summary value and the second target summary value, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified.
[0012] In one embodiment, converting multiple pieces of source semantic data into a source semantic hash tree includes:
[0013] For each source semantic data, detect the quantitative value of the importance of the source semantic data and the semantic structure level corresponding to the source semantic data;
[0014] Based on the importance quantification value and semantic structure hierarchy, the source semantic data is converted into semantic information corresponding to the leaf nodes in the source semantic hash tree.
[0015] In one embodiment, detecting the first target digest value of the source semantic hash tree includes:
[0016] Detect the sub-summary value of the semantic information corresponding to each leaf node in the source semantic hash tree;
[0017] Based on each sub-summary value, detect the root summary value corresponding to the root node of the source semantic hash tree;
[0018] The root digest value is determined as the first target digest value of the source semantic hash tree.
[0019] In one embodiment, the method further includes, before converting multiple pieces of source semantic data into a source semantic hash tree:
[0020] Perform semantic standardization processing on multiple source semantic data;
[0021] This includes semantic standardization processing of multiple source semantic data, including:
[0022] Retrieve the field names and values of multiple source semantic data;
[0023] Map field names to target field names in the same format, and map field values to target field values in the same format.
[0024] In one embodiment, the source semantic hash tree includes multiple first leaf nodes, and the target semantic hash tree includes multiple second leaf nodes, with each first leaf node corresponding to a second leaf node.
[0025] Based on the first target digest value and the second target digest value, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified, including:
[0026] In the case where the first target summary value and the second target summary value are inconsistent, the first sub-summary value corresponding to the semantic information of each first leaf node and the second sub-summary value corresponding to the semantic information of each second leaf node are obtained.
[0027] For any combination of leaf nodes, query the target leaf node combination where the first sub-summary value and the second sub-summary value are different. The leaf node combination includes any first target leaf node among multiple first leaf nodes, and a second target leaf node among multiple second leaf nodes that matches the first target leaf node.
[0028] Obtain the first target node identifier corresponding to the first target leaf node and the second target node identifier corresponding to the second target leaf node in the target leaf node combination. Combine the first target node identifier, the second target node identifier, the source semantic data corresponding to the first target node identifier, and the target semantic data corresponding to the second target node identifier to obtain the carbon emission data verification failure information.
[0029] In one embodiment, mapping each source semantic data to target semantic data in the target blockchain includes:
[0030] Obtain the semantic conversion relationship between the source blockchain and the target blockchain, wherein the semantic conversion relationship includes at least one of the following: unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship;
[0031] For each source semantic data, the source semantic data is mapped to the target semantic data in the target blockchain based on at least one of the following: unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship.
[0032] In one embodiment, after verifying the consistency of carbon emission data transmission between the source blockchain and the target blockchain based on a first target digest value and a second target digest value, the method further includes:
[0033] When the first target digest value matches the second target digest value, carbon data consistency proof information between the source blockchain and the target blockchain is generated, and the carbon data consistency proof information is loaded into the contract protocol between the source blockchain and the target blockchain.
[0034] Secondly, this application also provides a carbon data verification device for cross-blockchain transmission, the device comprising:
[0035] The initial data acquisition module is used to acquire carbon emission data to be verified in the source blockchain, wherein the carbon emission data is the data to be transmitted to the target blockchain;
[0036] The semantic data acquisition module is used to extract multiple source semantic data from carbon emission data and map each source semantic data to target semantic data in the target blockchain.
[0037] The first digest generation module is used to convert multiple source semantic data into a source semantic hash tree and detect the first target digest value of the source semantic hash tree;
[0038] The second summary generation module is used to convert multiple target semantic data into a target semantic hash tree and detect the second target summary value of the target semantic hash tree;
[0039] The verification module is used to verify the consistency of carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value.
[0040] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0041] Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain;
[0042] Extract multiple source semantic data from carbon emission data, and map each source semantic data to target semantic data in the target blockchain;
[0043] Convert multiple source semantic data into a source semantic hash tree, and detect the first target digest value of the source semantic hash tree;
[0044] Multiple pieces of target semantic data are converted into a target semantic hash tree, and the second target digest value of the target semantic hash tree is detected;
[0045] Based on the first target summary value and the second target summary value, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified.
[0046] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0047] Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain;
[0048] Extract multiple source semantic data from carbon emission data, and map each source semantic data to target semantic data in the target blockchain;
[0049] Convert multiple source semantic data into a source semantic hash tree, and detect the first target digest value of the source semantic hash tree;
[0050] Multiple pieces of target semantic data are converted into a target semantic hash tree, and the second target digest value of the target semantic hash tree is detected;
[0051] Based on the first target summary value and the second target summary value, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified.
[0052] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0053] Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain;
[0054] Extract multiple source semantic data from carbon emission data, and map each source semantic data to target semantic data in the target blockchain;
[0055] Convert multiple source semantic data into a source semantic hash tree, and detect the first target digest value of the source semantic hash tree;
[0056] Multiple pieces of target semantic data are converted into a target semantic hash tree, and the second target digest value of the target semantic hash tree is detected;
[0057] Based on the first target summary value and the second target summary value, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified.
[0058] The aforementioned methods, apparatuses, computer devices, computer-readable storage media, and computer program products for verifying carbon data transmitted across blockchains often overlook the semantic information carried in carbon emission data, making it difficult to determine whether data with the same structure expresses the same meaning. Therefore, this application proposes a more accurate carbon data verification method. Throughout the process, instead of relying on hash comparisons of field values, it introduces semantic data of the carbon emission data, mapping each source semantic data to target semantic data in the target blockchain. The source semantic data is then converted into a source semantic hash tree, and multiple target semantic data are converted into target semantic hash trees. The digest values in the source and target semantic hash trees are then checked to ensure that even if the data has a similar structure in different blockchains, their semantics remain completely consistent, thus improving the accuracy of verifying the consistency of carbon emission data transmission between the source and target blockchains. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 This is a diagram illustrating the application environment of a carbon data verification method for cross-blockchain transmission in one embodiment.
[0061] Figure 2 This is a flowchart illustrating a carbon data verification method for cross-blockchain transmission in one embodiment.
[0062] Figure 3 This is a flowchart illustrating a carbon data verification method for cross-blockchain transmission in another embodiment;
[0063] Figure 4 This is a flowchart illustrating a carbon data verification method for cross-blockchain transmission in yet another embodiment;
[0064] Figure 5 This is a flowchart illustrating a carbon data verification method for cross-blockchain transmission in another embodiment;
[0065] Figure 6 This is a structural block diagram of a carbon data verification device for cross-blockchain transmission in one embodiment;
[0066] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0068] Carbon emission data management is gradually shifting from the traditional centralized storage model to a distributed, trusted evidence storage system based on blockchain. Currently, power companies, carbon trading platforms, and green certification agencies have generally built their own independent blockchain systems, and the need for carbon data exchange and ownership confirmation between different platforms is growing. Therefore, there is an urgent need for a means to verify the consistency of carbon data across different blockchains.
[0069] In traditional technologies, the methods for verifying the consistency of carbon data across different blockchains generally adopt mechanisms such as field hash comparison, anchor structure synchronization, or relay node consensus. For example, the first field hash value of each carbon emission data in the source blockchain and the second field hash value of the same carbon emission data in the target blockchain are detected, and the first field hash value and the second field hash value are compared. When the first field hash value and the second field hash value are consistent, it means that the carbon data is consistent in the source blockchain and the target blockchain.
[0070] However, this approach ignores the semantic information carried by carbon emission data, failing to determine whether data with the same structure express the same meaning, leading to numerous risks and shortcomings in actual business applications. This problem manifests itself in the following aspects:
[0071] 1. Current cross-blockchain technology cannot identify differences in the meaning of fields. For example, the field "carbon emissions" has the same name in two platforms, but one is based on electricity consumption and the other on power generation, so their actual meanings are completely different.
[0072] 2. Different platforms may use different sources of carbon factors, unit conversion standards, time periods, and statistical methods, which makes it difficult to ensure data semantic consistency even if the field structure is the same.
[0073] 3. Current cross-blockchain data verification mechanisms lack the ability to model the "carbon data context," making it impossible to identify and confirm the logical model behind carbon emission indicators. This can easily lead to misinterpretation and misuse, affecting the reliable transmission and application of data.
[0074] Therefore, to solve the above problems, this application provides a carbon data verification method for cross-blockchain transmission. In the whole process, it no longer relies on hash comparison of field values, but introduces semantic data of carbon emission data, and maps each source semantic data to target semantic data in the target blockchain. Then, the source semantic data is converted into a source semantic hash tree, and multiple target semantic data are converted into target semantic hash trees. The digest values in the source semantic hash tree and the target semantic hash tree are checked to ensure that even if the data has a similar structure in different blockchains, it can be determined whether its semantics are completely consistent, thus improving the accuracy of verifying the consistency of carbon emission data transmission between the source blockchain and the target blockchain.
[0075] The carbon data verification method for cross-blockchain transmission provided in this application can be applied to, for example... Figure 1 In the application environment shown, a source blockchain 102 is deployed on the first terminal 101 of the first organization, and a target blockchain 104 is deployed on the second terminal 103 of the second organization. The source blockchain 102 and the target blockchain 104 communicate via a relay server 106. Both the first terminal 101 and the second terminal 103 communicate bidirectionally with the relay server 106. The data storage system can store the data that the relay server 106 needs to process. The data storage system can be integrated onto the relay server 106 or placed on the cloud or other network servers.
[0076] Staff trigger a carbon data verification control on the carbon data verification interface of the first terminal 101. The first terminal 101 responds to the trigger request of the carbon data verification control, generates a carbon data verification request, and sends the carbon data verification request to the relay server 106. The relay server 106 obtains the carbon data verification request, obtains the carbon emission data to be verified in the source blockchain 102, wherein the carbon emission data is the data to be transmitted to the target blockchain 104, and extracts multiple source semantic data from the carbon emission data, mapping each source semantic data to target semantic data in the target blockchain 104; converts the multiple source semantic data into a source semantic hash tree, and detects the first target digest value of the source semantic hash tree; converts the multiple target semantic data into a target semantic hash tree, and detects the second target digest value of the target semantic hash tree; based on the first target digest value and the second target digest value, the consistency of the transmission of carbon emission data between the source blockchain 102 and the target blockchain 104 is verified. Furthermore, the relay server 106 can push the verification result of the consistency of carbon emission data transmission between the source blockchain 102 and the target blockchain 104 to the second terminal 103, which will then display it to the staff so that the staff can confirm that the carbon emission data is consistent in the source blockchain and the target blockchain. At this time, the carbon emission data can be transmitted from the source blockchain 102 to the target blockchain 104.
[0077] The first terminal 101 and the second terminal 103 can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The relay server 106 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0078] In one exemplary embodiment, such as Figure 2 As shown, a method for verifying carbon data transmitted across blockchains is provided, which can be applied to... Figure 1 The following explanation uses relay server 106 as an example. Specifically:
[0079] S100, Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain.
[0080] Blockchain is an integrated application of technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms, and it features decentralization, immutability, and traceability.
[0081] Specifically, carbon emission data management is gradually shifting from the traditional centralized storage model to a distributed, trusted evidence storage system based on blockchain. Currently, power companies, carbon trading platforms, and green certification bodies have generally built their own independent blockchain systems, and the demand for carbon data interaction and ownership confirmation between different institutions is increasing. Therefore, when carbon data needs to be transferred from one institution to another, the data is transferred from the source blockchain of the first institution to the target blockchain of the second. During this transfer, the consistency of the carbon emission data between the source and target blockchains needs to be verified. At this point, the carbon emission data to be verified is first obtained from the source blockchain. In practical applications, carbon emission data can include electricity consumption carbon emissions and green electricity consumption records, etc.
[0082] S200 extracts multiple source semantic data from carbon emission data and maps each source semantic data to target semantic data in the target blockchain.
[0083] Semantic data, in particular, is data that is given a clear meaning so that it can be understood and processed by computers, focusing on the meaning of the data rather than its format.
[0084] Specifically, multiple source semantic data with semantic attributes are automatically extracted from carbon emission data. The source semantic data includes, but is not limited to, the following fields:
[0085] indicator_name (indicator name);
[0086] value (numerical value);
[0087] unit (unit, such as) );
[0088] emission_factor_source (carbon factor source);
[0089] region (applicable region);
[0090] period (statistical period);
[0091] calculation_method (calculation method).
[0092] The above fields are the source semantic data, which can provide basic units for constructing a semantic hash tree. Furthermore, by sorting multiple source semantic data according to the preset hierarchical structure of each source semantic data, a semantic structure can be formed, and then this semantic structure can be transformed into a hash tree.
[0093] Furthermore, each source semantic data can be mapped to target semantic data in the target blockchain, enabling the consistency of carbon emission data transmission between the source and target blockchains to be verified based on the source semantic data and the target semantic data corresponding to the source semantic data.
[0094] S300 converts multiple source semantic data into a source semantic hash tree and detects the first target digest value of the source semantic hash tree.
[0095] A hash tree is a data structure that maps keys to storage locations using a hash function for fast data access. Its features include efficient lookup, handling hash collisions, key uniqueness, dynamic expansion, and a space-for-time tradeoff. It works by converting keys into array indices using a hash function to locate data. Applications include database indexing, caching systems, dictionary implementations, and uniqueness checks. A digest value is a fixed-length string generated by a hash function, used to uniquely identify the original data and verify its integrity.
[0096] A semantic hash tree is a data structure with semantic information used to hash and encode key semantic fields of carbon data, supporting cross-system consistency verification.
[0097] Specifically, after extracting multiple source semantic data, the multiple source semantic data are converted into a source semantic hash tree, and the first target digest value of the source semantic hash tree is detected. For example, it can be detected by a hash encryption algorithm, such as SHA (SecureHashAlgorithm)-256 or the national cryptographic SM3 algorithm.
[0098] S400 converts multiple target semantic data into a target semantic hash tree and detects the second target digest value of the target semantic hash tree.
[0099] Specifically, similarly, multiple target semantic data can be converted into a target semantic hash tree, and the first target digest value of the source semantic hash tree can be detected by a hash encryption algorithm. For example, the hash encryption algorithm can be SHA-256 or the Chinese national cryptographic algorithm SM3.
[0100] In one embodiment, when converting multiple pieces of target semantic data into a target semantic hash tree, the multiple pieces of target semantic data can be converted into a target semantic hash tree in the same predefined order as the source semantic hash tree, so that different blockchains use a consistent field order when constructing the semantic hash tree.
[0101] S500 verifies the consistency of carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value.
[0102] The process involves checking whether the first target digest value and the second target digest value are consistent. If they are consistent, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified; otherwise, the consistency is not verified. If the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified, the carbon emission data can be transmitted from the source blockchain to the target blockchain.
[0103] It needs to be explained that verifying the consistency of carbon emission data transmission between the source and target blockchains using the first and second target digest values is actually verifying the semantics and structure of the carbon emission data in the source and target blockchains. Semantic verification is necessary because the target digest value is recursively generated by converting the semantic information of each leaf node in the semantic hash tree into a digest value. Therefore, the semantics of carbon emission data in the source and target blockchains can be verified using the first and second target digest values. Furthermore, since the specific source semantic data corresponding to the semantic information of each leaf node in the semantic hash tree is determined by the structure of the carbon emission data, the structure of the carbon emission data in the source and target blockchains can also be verified using the first and second target digest values.
[0104] In one exemplary embodiment, the consistency of carbon emission data transmission between the source blockchain and the target blockchain is verified based on a first target digest value and a second target digest value, which can be implemented through cross-blockchain relay nodes, smart contracts, or gateway service interfaces.
[0105] In the aforementioned cross-blockchain carbon data verification methods, traditional methods tend to overlook the semantic information carried in carbon emission data, making it impossible to determine whether data with the same structure expresses the same meaning. Therefore, this application proposes a more accurate carbon data verification method. Throughout the process, instead of relying on hash comparison of field values, it introduces semantic data of carbon emission data and maps each source semantic data to target semantic data in the target blockchain. Then, the source semantic data is converted into a source semantic hash tree, and multiple target semantic data are converted into target semantic hash trees. The digest values in the source semantic hash tree and the target semantic hash tree are checked to ensure that even if the data has a similar structure in different blockchains, its semantics can be determined to be completely consistent, thus improving the accuracy of verifying the consistency of carbon emission data transmission between the source blockchain and the target blockchain.
[0106] In one exemplary embodiment, converting multiple pieces of source semantic data into a source semantic hash tree includes:
[0107] For each source semantic data, the importance quantification value of the source semantic data and the semantic structure level corresponding to the source semantic data are detected; based on the importance quantification value and the semantic structure level, the source semantic data is converted into semantic information corresponding to the leaf nodes in the source semantic hash tree.
[0108] In a hash tree, the leaf nodes are the lowest-level nodes that directly store the hash values of data blocks. These data blocks can be files, data records, or other forms of data.
[0109] Specifically, after extracting the source semantic data of carbon emission data, each source semantic data is organized into the semantic information corresponding to the leaf nodes of the source semantic hash tree according to a predefined order. That is, each leaf node corresponds one-to-one with a source semantic data point, and the source semantic data is used as the semantic information corresponding to the leaf node. The predefined order can be defined through a semantic rule protocol signed between the institutions corresponding to the source and target blockchains, ensuring the symmetry and verifiability of the hash tree structure between the source and target blockchains.
[0110] Furthermore, this application does not arbitrarily convert source semantic data into semantic information corresponding to any leaf node in the source semantic hash tree. Instead, it requires detecting the importance quantification value and the semantic structure level of the source semantic data. Then, based on the importance quantification value and semantic structure level, a predefined order is obtained. Multiple source semantic data are then sorted according to this predefined order, and the sorted source semantic data is converted into semantic information corresponding to a specific leaf node in the source semantic hash tree according to the sorting result. Even further, when the importance quantification value of a source semantic data is high, its predefined order is also higher; similarly, when the semantic structure level of a source semantic data is high, its predefined order is also higher.
[0111] For example, sorting source semantic data according to a predefined order can be done as follows:
[0112] indicator_name (indicator name);
[0113] unit (unit);
[0114] value;
[0115] emission_factor_source (carbon factor source);
[0116] calculation_method(calculation method);
[0117] region;
[0118] period (statistical period).
[0119] Then, the sorted source semantic data is converted into semantic information corresponding to specific leaf nodes in the source semantic hash tree. For example, the indicator name of the first level is converted into the first leaf node of the first level excluding the root node, the unit of the second level is converted into the second leaf node of the first level excluding the root node, and the value of the third level is converted into the first leaf node of the second level excluding the root node, etc.
[0120] In the above embodiments, by detecting the quantification value of the importance of the source semantic data and the semantic structure level corresponding to the source semantic data, the source semantic data can be accurately converted into semantic information corresponding to the leaf nodes in the source semantic hash tree. Furthermore, in the subsequent construction process of the target semantic hash tree, the same predefined order can be used for construction, so that the field structure order of the two is consistent.
[0121] In an exemplary embodiment, detecting the first target digest value of the source semantic hash tree includes:
[0122] Detect the sub-summary value of the semantic information corresponding to each leaf node in the source semantic hash tree; based on each sub-summary value, detect the root summary value corresponding to the root node of the source semantic hash tree; determine the root summary value as the first target summary value of the source semantic hash tree.
[0123] In a hash tree, the leaf nodes are the lowest-level nodes, directly storing the hash values of data blocks; the root node is the unique node at the top of the tree, storing the sum of all hash values for the entire tree. Changes to the leaf node data will affect the hash values layer by layer upwards, ultimately changing the root node value, ensuring data integrity and traceability.
[0124] Specifically, since comparing multiple pieces of source semantic data with the target semantic data sequentially is inefficient, this application can first perform a comprehensive comparison of multiple pieces of source semantic data with the target semantic data. In other words, after constructing the source semantic hash tree, it is necessary to find data that can uniquely identify the source semantic hash tree.
[0125] Therefore, this application detects the sub-digest value of the semantic information corresponding to each leaf node in the source semantic hash tree, and based on each sub-digest value, detects the root digest value corresponding to the root node of the source semantic hash tree, and determines the root digest value as the first target digest value of the source semantic hash tree, so as to use the first target digest value as the unique identifier of the source semantic hash tree.
[0126] In the process of detecting the root digest value of the source semantic hash tree based on each sub-digest value, the process typically starts from the bottom layer. The sub-digest values of two adjacent leaf nodes are concatenated and hashed again to generate the digest value of the parent node. This process continues, concatenating and hashing the hash values of adjacent nodes in the previous layer until a unique root digest value is generated. This root digest value is then used as the first target digest value of the source semantic hash tree. Furthermore, if the number of leaf nodes in a certain layer is odd, the last leaf node in that layer copies its own sub-digest value, pairs it with the sub-digest value, and then calculates the sub-digest value of its parent node.
[0127] For example, after detecting the sub-summary value of the semantic information corresponding to each leaf node in the source semantic hash tree, the sub-summary values H1~H6 of the semantic information corresponding to each leaf node 1~6 are as follows:
[0128] =Hash("indicator_name:carbon emissions from electricity");
[0129] =Hash(" ");
[0130] =Hash("region:xx province");
[0131] =Hash("period:20xx year Qx quarter");
[0132] =Hash("factor_source:Enterprise Factor V1.3");
[0133] =Hash("method:Electricity Consumption × Factor");
[0134] Then, sort the above sub-digest values according to the hierarchical structure of each leaf node in the source semantic hash tree, and calculate the first target digest value of the source semantic hash tree.
[0135] In the above embodiments, the sub-digest values corresponding to each leaf node can be combined layer by layer until the root digest value corresponding to the root node of the source semantic hash tree is accurately detected, and the root digest value is determined as the first target digest value of the source semantic hash tree, thereby accurately using the first target digest value as the unique identifier value of the source semantic hash tree.
[0136] In one exemplary embodiment, before converting multiple pieces of source semantic data into a source semantic hash tree, the method further includes:
[0137] Semantic standardization is performed on multiple source semantic data. This process includes: obtaining the field names and field values of each source semantic data; mapping the field names to target field names of the same format; and mapping the field values to target field values of the same format.
[0138] Semantic standardization refers to the process of unifying and standardizing data semantics to ensure that different systems or users have a consistent understanding of the meaning of data.
[0139] Specifically, before converting multiple source semantic data into a source semantic hash tree, it is also necessary to perform semantic standardization on the multiple source semantic data to ensure the semantic consistency of the semantic data.
[0140] Furthermore, in the process of semantic standardization of multiple source semantic data, the semantic standardization of multiple source semantic data can be performed by calling the carbon data semantic dictionary and field mapping table.
[0141] Specifically, the carbon data semantic dictionary and field mapping table can be:
[0142] The carbon data semantic dictionary includes common indicator terms (such as CO2 emissions, carbon intensity, and carbon factor for power generation) and their unified semantic identifiers (such as carbon_emission_value and emission_intensity, where carbon_emission_value, which represents carbon emissions, has the same meaning as carbon concentration), and supports rules for Chinese and English synonyms, regional terms, and unit conversion.
[0143] The field mapping table can be a structured configuration file (such as JSON / XML) that maps "source organization field names" to "uniform field names". For example: {"CO2_emission":"carbon_emission_value","elec_used":"electricity_consumed"}, which means that the field name CO2_emission of carbon dioxide emissions is mapped to the field name carbon_emission_value of carbon emissions, and the field name elec_used of electricity usage is mapped to the field name electricity_consumed of electricity consumption.
[0144] The semantic standardization process is as follows: read the field names and values of each source semantic data, perform mapping and replacement on the field names based on the field mapping table to map the field names to target field names of the same format, and perform unit conversion (e.g., kilowatt-hour kWh → megawatt-hour MWh), numerical standardization (preserving precision), and text consistency (e.g., unification of simplified and traditional Chinese characters, case compliance, etc.) on the field values based on the carbon data semantic dictionary, so that the field values are mapped to target field values of the same format, and finally form data fragments with unified semantic expression for subsequent hash tree construction.
[0145] In the above embodiments, by using a carbon data semantic dictionary and a field mapping table, field names can be accurately mapped to target field names of the same format, and field values can be mapped to target field values of the same format, thereby performing semantic standardization processing on multiple source semantic data. Furthermore, by performing semantic standardization processing on multiple source semantic data, multiple source semantic data can be converted into a standard format, thereby improving the efficiency of converting multiple source semantic data into a source semantic hash tree.
[0146] In an exemplary embodiment, the source semantic hash tree includes multiple first leaf nodes, and the target semantic hash tree includes multiple second leaf nodes, with a one-to-one correspondence between the first leaf nodes and the second leaf nodes; for example... Figure 3 As shown, S500 also includes:
[0147] S520, if the first target summary value and the second target summary value are inconsistent, obtain the first sub-summary value corresponding to the semantic information of each first leaf node, and the second sub-summary value corresponding to the semantic information of each second leaf node.
[0148] S540, for any combination of leaf nodes, query the target leaf node combination where the first sub-summary value and the second sub-summary value are different, wherein the combination of leaf nodes includes any first target leaf node among multiple first leaf nodes, and a second target leaf node among multiple second leaf nodes that matches the first target leaf node.
[0149] S560, obtain the first target node identifier corresponding to the first target leaf node and the second target node identifier corresponding to the second target leaf node in the target leaf node combination, and combine the first target node identifier, the second target node identifier, the source semantic data corresponding to the first target node identifier and the target semantic data corresponding to the second target node identifier to obtain the verification failure information of carbon emission data.
[0150] Specifically, if the first target summary value and the second target summary value are inconsistent, it is considered that the consistency of carbon emission data transmission between the source blockchain and the target blockchain has not been verified.
[0151] At this point, we can further analyze the specific reasons for the verification failure, that is, obtain the first sub-summary value corresponding to the semantic information of each first leaf node, and the second sub-summary value corresponding to the semantic information of each second leaf node, and then query which leaf node combination has inconsistent sub-summary values.
[0152] The leaf node combination includes any first target leaf node among multiple first leaf nodes, and a second target leaf node among multiple second leaf nodes that matches the first target leaf node.
[0153] The combination of target leaf nodes whose first and second sub-summary values differ can be considered the target leaf node combination that caused the verification failure. In this case, the first target node identifier corresponding to the first target leaf node and the second target node identifier corresponding to the second target leaf node are obtained from the target leaf node combination. The first target node identifier, the second target node identifier, the source semantic data corresponding to the first target node identifier, and the target semantic data corresponding to the second target node identifier are then combined to obtain the carbon emission data verification failure information. Both the source and target semantic data include field names and field values. In practical applications, the verification failure information can be a difference report, which can be output to staff for error correction.
[0154] For example, if the target leaf node combination characterizes the source of carbon factors... This indicates that the carbon factor origins are inconsistent; if the target leaf node combination characterizes If the units are different, it means that the unit conversion is not standardized.
[0155] In one embodiment, querying the combination of target leaf nodes where the first sub-summary value and the second sub-summary value are different refers to the first combination of leaf nodes where the first sub-summary value and the second sub-summary value are different, retrieved starting from the next level node of the root node in the semantic hash tree.
[0156] In the above embodiments, by querying the target leaf node combinations where the first sub-digest value and the second sub-digest value are different, the consistency of carbon emission data transmission between the source blockchain and the target blockchain can be verified at a deeper level to find the detailed reasons for failure to pass the verification.
[0157] In an exemplary embodiment, mapping each source semantic data to target semantic data in the target blockchain includes:
[0158] Obtain the semantic conversion relationship between the source blockchain and the target blockchain, wherein the semantic conversion relationship includes at least one of the unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship; for each source semantic data, map the source semantic data to the target semantic data in the target blockchain according to at least one of the unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship.
[0159] Among them, semantic transformation relationship refers to the equivalent transformation relationship between different blockchains in terms of field naming, units, algorithms, models, etc.
[0160] Specifically, it receives semantic conversion relationships from the target blockchain. These semantic conversion relationships are between the source blockchain and the target blockchain, such as unit conversion factor conversion relationships, carbon factor standard version conversion relationships, and field name conversion relationships.
[0161] Based on at least one of the unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship, each source semantic data can be mapped to the target semantic data in the target blockchain.
[0162] More specifically, semantic transformation relations include:
[0163] 1. Carbon factor standard version conversion relationship: such as 2022 xx power grid version, xx power grid version V1.3, each version corresponds to a set of default factor values and algorithms, which can be identified and automatically called by version number. When converting source semantic data between source blockchain field names and target blockchain, the carbon factor values and algorithms corresponding to a certain version number can be converted to the carbon factor values and algorithms of another version.
[0164] 2. Unit conversion factor relationship: e.g., 1 kilowatt-hour (kWh) = 0.001 megawatt-hour (MWh), or = The system automatically applies a conversion ratio to perform numerical conversion between the source and target blockchains based on the units declared in the field, where t is the English symbol for the mass unit "ton".
[0165] 3. Field name conversion relationship: Define the correspondence between the field names of the source blockchain and the field names of the target blockchain. It can be represented as a set of mapping pairs, such as {"emission_factor":"carbon_factor"}, that is, the field name emission_factor of the emission coefficient is mapped to the carbon emission factor carbon_factor.
[0166] Therefore, when semantic transformation relationships include unit conversion factor transformation relationships, carbon factor standard version transformation relationships, and field name transformation relationships, the source semantic data can be equivalently transformed according to the configuration of the above semantic transformation relationships. The transformation process includes the following steps:
[0167] 1. Based on the field name conversion relationship, uniformly replace the field names of the original blockchain with the standard field names of the target blockchain;
[0168] 2. For unit fields (such as kilowatt-hours (kWh) and megawatt-hours (MWh), convert the unit field according to the unit conversion factor and update the value field at the same time;
[0169] 3. If the carbon factor standard versions of the source blockchain and the target blockchain are different, the carbon emission value will be recalculated according to the carbon factor standard version conversion relationship, and the emission_factor_source and value fields of the carbon factor will be updated.
[0170] In addition, the period field can be reconstructed according to a unified time expression method (such as converting the quarter "Q4" to "xxxx year-x1 month~x2 month") to improve the consistency of semantic parsing.
[0171] At this point, target semantic data from multiple target blockchains can be aggregated to form a standard semantic structure for the target blockchain. After the target semantic data in the standard semantic structure is standardized and regulated, the standard semantic structure participates in the generation of the subsequent target semantic hash tree.
[0172] In the above embodiments, based on at least one of the unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship, the source semantic data can be accurately mapped to the target semantic data in the target blockchain. Furthermore, since the conversion rules are pre-set, the conversion process is more efficient.
[0173] In an exemplary embodiment, after verifying the consistency of carbon emission data transmission between the source blockchain and the target blockchain based on a first target digest value and a second target digest value, the method further includes:
[0174] When the first target digest value matches the second target digest value, carbon data consistency proof information between the source blockchain and the target blockchain is generated, and the carbon data consistency proof information is loaded into the contract protocol between the source blockchain and the target blockchain.
[0175] Specifically, when the first target digest value and the second target digest value are inconsistent, the consistency of carbon emission data transmission between the source blockchain and the target blockchain fails verification; when the first target digest value and the second target digest value are consistent, the consistency of carbon emission data transmission between the source blockchain and the target blockchain passes verification. At this point, carbon data consistency proof information between the source blockchain and the target blockchain can be generated. This carbon data consistency proof information is used to prove that the carbon data across blockchains is completely equivalent in structure and meaning. The carbon data consistency proof information is then loaded into the smart contract protocol between the source blockchain and the target blockchain for reference during subsequent carbon data transmission.
[0176] In practical applications, the above-described solution in this embodiment can be provided to platforms for carbon trading, regulatory auditing, and carbon asset confirmation for subsequent use.
[0177] In the above embodiments, when the first target digest value is consistent with the second target digest value, the carbon data consistency proof information can be loaded into the contract protocol between the source blockchain and the target blockchain, so that it can be referenced in the subsequent carbon data transmission process.
[0178] In one exemplary embodiment, such as Figure 4As shown, when carbon data needs to be transferred from the source blockchain to the target blockchain, a cross-chain function is first obtained. Then, multiple source semantic data are extracted from the carbon emission data. Based on these multiple source semantic data, a source semantic structure is generated. Then, based on the source semantic structure, a source semantic hash tree is generated. Based on the four leaf nodes h1, h2, h3, and h4 in the source semantic hash tree, the first target digest value SMTH-Root of the source semantic hash tree is detected. Then, the multiple source semantic data are equivalently converted into target semantic data in the target blockchain. The same method is used to generate the target semantic hash tree corresponding to the target semantic data and to detect the second target digest value SMTH'-Root of the target semantic hash tree. A semantic check is performed against the target semantic hash tree, specifically determining whether the first target digest value SMTH-Root and the second target digest value SMTH'-Root are consistent. This verifies the consistency of carbon emission data transmission between the source and target blockchains. The verification result indicates whether the first target digest value SMTH-Root and the second target digest value SMTH'-Root are consistent or inconsistent. When the verification result indicates inconsistency, it also includes conflicting fields that caused the inconsistency. Furthermore, if the verification result indicates consistency between the first target digest value SMTH-Root and the second target digest value SMTH'-Root, the carbon emission data is transmitted from the source blockchain to the target blockchain using a cross-chain function.
[0179] To address the semantic inconsistency issue in the cross-blockchain transmission of carbon emission data in existing technologies, this application proposes a carbon data mapping verification method based on a semantic hash tree. This method further extracts, standardizes, and encrypts the structural fields and semantic attributes of carbon emission data, constructing a hash tree structure with structural traceability and semantic consistency, thereby achieving semantic-level mapping and trusted verification of carbon data between different blockchain institutions. Let the source blockchain be Blockchain A, the target blockchain be Blockchain B, and carbon data need to be transmitted from Blockchain A to Blockchain B, then the following... Figure 5 As shown, a detailed embodiment of a carbon data verification method for cross-blockchain transmission is described in detail, including its internal modules and the technical principles executed by those modules:
[0180] 1. Semantic information extraction and standardization processing module:
[0181] The system receives carbon emission data (such as carbon emissions from electricity consumption, green electricity consumption records, etc.) to be verified in blockchain A, and automatically extracts fields with semantic attributes to obtain multiple source semantic data.
[0182] To ensure semantic consistency, the system calls the carbon data semantic dictionary and field mapping table at this stage to perform semantic standardization processing on the source semantic data (such as unit unification, naming consistency, value domain conversion, etc.). During the process of calling the carbon data semantic dictionary and field name mapping table to perform semantic standardization processing on the source semantic data, the system reads the field name and field value of each piece of source semantic data, calls the field name mapping table to perform mapping and replacement on the field name, and calls the carbon data semantic dictionary to perform unit conversion (such as kWh→MWh), numerical standardization (preserving precision), and text consistency (such as unification of simplified and traditional characters, case standardization, etc.) on the field value. Finally, a data fragment with a unified semantic expression is formed for subsequent hashing.
[0183] 2. Semantic Hash Tree Construction Module:
[0184] After extracting the semantic fields, the source semantic data are organized into the semantic information corresponding to the leaf nodes of the source semantic hash tree according to a predefined order, and a digest value corresponding to each leaf node is calculated using a cryptographic hash algorithm. Generally, the predefined order can be determined by the quantification value of the importance of the semantic fields and the semantic structure hierarchy, ensuring that blockchains of different institutions use a consistent field order when constructing the semantic hash tree.
[0185] The hash values are combined layer by layer according to the hash tree rules to generate the hash values of intermediate nodes, and finally the hash value of the semantic hash root node in the source semantic hash tree is generated. The hash value of the semantic hash root node is used as the first target digest value SMTH-Root of the source semantic hash tree, which serves as the unique identifier of the semantic structure of the carbon emission data.
[0186] 3. Cross-chain semantic mapping verification module:
[0187] Obtain the semantic transformation relationship between blockchain A and blockchain B, wherein the semantic transformation relationship includes at least one of the following: unit conversion factor transformation relationship, carbon factor standard version transformation relationship, and field name transformation relationship; for each source semantic data, perform an equivalent transformation on the source semantic data according to at least one of the following: unit conversion factor transformation relationship, carbon factor standard version transformation relationship, and field name transformation relationship, to obtain the target semantic data in blockchain B.
[0188] Multiple target semantic data are converted into a target semantic hash tree. The second target digest value SMTH'-Root of the target semantic hash tree is calculated in the same way as the first target digest value of the source semantic hash tree.
[0189] The verification process is as follows: Compare whether SMTH-Root and SMTH'-Root are consistent. If they are consistent, it means that the semantics and structure of the carbon emission data are consistent in both blockchain A and blockchain B, and the consistency verification of the carbon emission data transmission between blockchain A and blockchain B is passed. If they are inconsistent, it means that the semantics and structure of the carbon emission data are different in either blockchain A or blockchain B, and the consistency verification of the carbon emission data transmission between blockchain A and blockchain B is not passed.
[0190] Furthermore, if SMTH-Root and SMTH'-Root are inconsistent, the hash values of each leaf node in the source semantic hash tree and the target semantic hash tree are recorded. The matching leaf nodes are compared layer by layer in the comparison stage to find the first inconsistent leaf node, which is the location of the semantic conflict field.
[0191] 4. Verification result output and optional on-chain evidence storage module:
[0192] Upon successful verification, a semantic consistency verification document is automatically generated and can be optionally written into the target chain smart contract.
[0193] When validation fails, a structural comparison report with discrepancy descriptions is generated, including field names, field values, and reasons for the conflict (such as inconsistent units, mismatched statistical dimensions, etc.).
[0194] Based on the above analysis, this application innovatively combines semantic modeling, hash encoding and cross-blockchain verification mechanism by constructing a semantic hash tree for carbon emission data. This achieves dual consistency verification of cross-organization carbon emission data structure layer + semantic layer, breaking through the technical bottleneck of existing cross-blockchain technology that can only compare data structure but cannot verify the consistency of meaning.
[0195] The technical means of this application have the following advantages:
[0196] 1. Standardized extraction method for semantic fields of carbon emission data, including extraction and unified formatting of semantic elements such as carbon emission indicator name, unit, time period, carbon factor source, and statistical model, to ensure that the semantic structure is comparable and verifiable;
[0197] 2. A method for constructing a semantic hash tree based on semantic field data, which includes hashing each semantic field data and generating a multi-level hash tree according to a fixed logic, and using the root node of the semantic hash tree as the unique digest identifier of the semantic structure.
[0198] 3. Cross-blockchain semantic mapping and verification mechanism, including the semantic conversion relationship between the source blockchain and the target blockchain, the construction of the target semantic hash tree, and the comparison process between the target semantic hash tree and the source semantic hash tree, to solve the problem of semantic differences in carbon emission data from different institutions;
[0199] 4. Carbon data semantic consistency verification process, including: source blockchain semantic structure generation, target blockchain semantic structure reconstruction, hash root node comparison, consistency judgment and verification result output, etc., supporting semantic trust verification in chain-to-chain data transmission;
[0200] 5. Semantic verification result generation and storage methods, including automatic generation of semantic consistency proofs, identification and interpretation of abnormal fields, structured output of verification reports, and optional on-chain storage, result push and other functional modules;
[0201] As can be seen, this application, firstly, at the data trust verification level, no longer relies on simply hashing field values. Instead, it introduces contextual information of carbon data (such as carbon factor source, unit type, calculation model, time period, etc.) as semantic fields, uniformly organizing them into a multi-layered hash tree structure. This ensures that even if data has similar structures in different chains, their semantics can still be determined to be completely consistent. This processing mechanism effectively prevents the erroneous circulation of carbon data that appears consistent but is actually inconsistent.
[0202] Secondly, at the level of system interoperability and institutional integration, this application supports automatic semantic conversion and semantic hash alignment between different carbon data institutions through the configuration of semantic conversion relationships. This mechanism is adaptable to multiple typical blockchain systems such as regional power grid platforms, carbon trading systems, and green certificate authentication chains, providing a standardized interface for trusted cross-blockchain exchange of carbon data. The system can also output verification reports such as verification failure information and carbon data consistency proof information, facilitating user auditing and subsequent corrections, and improving the system's intelligence and interpretability.
[0203] At the operational level, this technical solution provides underlying reliable support for carbon asset confirmation, green electricity performance verification, and carbon audit compliance judgment under multi-chain collaboration. It is particularly suitable for the mutual recognition and reference of key business data such as carbon emission data, green electricity consumption data, and emission reduction calculation results in the power industry among different institutions, effectively ensuring the legality, authenticity, and non-repudiation of data in the carbon trading process.
[0204] Furthermore, the method described in this application has good engineering scalability and general semantic adaptability. It can support access to national cryptographic algorithms, adapt to various carbon factor libraries, semantic models, statistical period templates, etc., and has the basic conditions to evolve towards the industrial internet, energy big data institutions, and international carbon data universal protocols.
[0205] In summary, this application not only solves the problem of "structural consistency but semantic inconsistency" in traditional cross-blockchain data verification, but also improves the credibility of carbon emission data sharing, circulation, and auditing among multiple institutions. It possesses significant technological advancements and industry applicability, providing crucial support for building a trustworthy, unified, and verifiable carbon data mutual recognition system. Therefore, this application is applicable to the semantic mapping and verification framework of carbon emission data in multi-blockchain systems (heterogeneous trust domains), possessing cross-institutional, multi-model, and multi-factor library adaptability capabilities, and can be extended to various business scenarios such as carbon trading, green electricity rights confirmation, carbon verification, and carbon auditing.
[0206] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0207] Based on the same inventive concept, this application also provides a carbon data verification device for cross-blockchain transmission, used to implement the carbon data verification method for cross-blockchain transmission described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of one or more embodiments of the carbon data verification device for cross-blockchain transmission provided below can be found in the limitations of the carbon data verification method for cross-blockchain transmission described above, and will not be repeated here.
[0208] In one exemplary embodiment, such as Figure 6 As shown, a carbon data verification device for cross-blockchain transmission is provided, comprising: an initial data acquisition module 100, a semantic data acquisition module 200, a first digest generation module 300, a second digest generation module 400, and a verification module 500, wherein:
[0209] The initial data acquisition module 100 is used to acquire carbon emission data to be verified in the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain;
[0210] The semantic data acquisition module 200 is used to extract multiple source semantic data from carbon emission data and map each source semantic data to target semantic data in the target blockchain.
[0211] The first digest generation module 300 is used to convert multiple source semantic data into a source semantic hash tree and detect the first target digest value of the source semantic hash tree;
[0212] The second summary generation module 400 is used to convert multiple target semantic data into a target semantic hash tree and detect the second target summary value of the target semantic hash tree;
[0213] The verification module 500 is used to verify the consistency of carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value.
[0214] In one embodiment, the first summary generation module 300 is further configured to detect the importance quantification value of each source semantic data and the semantic structure level corresponding to the source semantic data; and convert the source semantic data into semantic information corresponding to the leaf nodes in the source semantic hash tree based on the importance quantification value and the semantic structure level.
[0215] In one embodiment, the first digest generation module 300 is further configured to detect the sub-digest value of the semantic information corresponding to each leaf node in the source semantic hash tree; based on each sub-digest value, detect the root digest value corresponding to the root node of the source semantic hash tree; and determine the root digest value as the first target digest value of the source semantic hash tree.
[0216] In one embodiment, the carbon data verification device for cross-blockchain transmission further includes a standardization module, which is used to obtain the field names and field values of multiple source semantic data; map the field names to target field names of the same format; and map the field values to target field values of the same format.
[0217] In one embodiment, the source semantic hash tree includes multiple first leaf nodes, and the target semantic hash tree includes multiple second leaf nodes, with a one-to-one correspondence between the first leaf nodes and the second leaf nodes. The verification module 500 is used to, when the first target digest value and the second target digest value are inconsistent, obtain the first sub-digest value corresponding to the semantic information of each first leaf node, and the second sub-digest value corresponding to the semantic information of each second leaf node; for any combination of leaf nodes, query the target leaf node combination where the first sub-digest value and the second sub-digest value are different, wherein the leaf node combination includes any first target leaf node among multiple first leaf nodes, and a second target leaf node among multiple second leaf nodes that matches the first target leaf node; obtain the first target node identifier corresponding to the first target leaf node and the second target node identifier corresponding to the second target leaf node in the target leaf node combination, and combine the first target node identifier, the second target node identifier, the source semantic data corresponding to the first target node identifier, and the target semantic data corresponding to the second target node identifier to obtain the verification failure information of carbon emission data.
[0218] In one embodiment, the semantic data acquisition module 200 is further configured to acquire the semantic conversion relationship between the source blockchain and the target blockchain, wherein the semantic conversion relationship includes at least one of the unit conversion factor conversion relationship, the carbon factor standard version conversion relationship, and the field name conversion relationship; for each source semantic data, the source semantic data is mapped to the target semantic data in the target blockchain according to at least one of the unit conversion factor conversion relationship, the carbon factor standard version conversion relationship, and the field name conversion relationship.
[0219] In one embodiment, the carbon data verification device for cross-blockchain transmission further includes a loading module, which is used to generate carbon data consistency proof information between the source blockchain and the target blockchain when the first target digest value is consistent with the second target digest value, and load the carbon data consistency proof information into the contract protocol between the source blockchain and the target blockchain.
[0220] Each module in the aforementioned carbon data verification device for cross-blockchain transmission can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0221] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores carbon emission data to be verified in the source blockchain. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a carbon data verification method for cross-blockchain transmission.
[0222] Those skilled in the art will understand that Figure 7The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0223] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0224] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0225] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0226] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0227] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0228] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for verifying carbon data transmitted across blockchains, characterized in that, The method includes: Obtain carbon emission data to be verified from the source blockchain, wherein the carbon emission data is data to be transmitted to the target blockchain; Multiple source semantic data are extracted from the carbon emission data, and each source semantic data is mapped to target semantic data in the target blockchain. The multiple source semantic data are converted into a source semantic hash tree, and the first target digest value of the source semantic hash tree is detected; The multiple pieces of target semantic data are converted into a target semantic hash tree, and the second target digest value of the target semantic hash tree is detected; Based on the first target digest value and the second target digest value, the consistency of the carbon emission data transmission between the source blockchain and the target blockchain is verified.
2. The method according to claim 1, characterized in that, The step of converting the multiple source semantic data into a source semantic hash tree includes: For each source semantic data, detect the quantification value of the importance of the source semantic data and the semantic structure level corresponding to the source semantic data; Based on the importance quantification value and the semantic structure hierarchy, the source semantic data is converted into semantic information corresponding to the leaf nodes in the source semantic hash tree.
3. The method according to claim 2, characterized in that, The detection of the first target digest value of the source semantic hash tree includes: Detect the sub-summary value of the semantic information corresponding to each leaf node in the source semantic hash tree; Based on each of the sub-digest values, detect the root digest value corresponding to the root node of the source semantic hash tree; The root digest value is determined as the first target digest value of the source semantic hash tree.
4. The method according to claim 2, characterized in that, Before converting the multiple source semantic data into a source semantic hash tree, the method further includes: The multiple source semantic data are subjected to semantic standardization processing; The semantic standardization process for the multiple source semantic data includes: Obtain the field names and field values of each of the multiple source semantic data; Map the field names to target field names of the same format, and map the field values to target field values of the same format.
5. The method according to claim 1, characterized in that, The source semantic hash tree includes multiple first leaf nodes, and the target semantic hash tree includes multiple second leaf nodes, with each first leaf node corresponding to one of the second leaf nodes. The step of verifying the consistency of the carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value includes: In the case where the first target summary value and the second target summary value are inconsistent, the first sub-summary value corresponding to the semantic information of each first leaf node and the second sub-summary value corresponding to the semantic information of each second leaf node are obtained. For any combination of leaf nodes, query the target leaf node combination where the first sub-summary value and the second sub-summary value are different, wherein the leaf node combination includes any first target leaf node among the plurality of first leaf nodes, and a second target leaf node among the plurality of second leaf nodes that matches the first target leaf node; Obtain the first target node identifier corresponding to the first target leaf node and the second target node identifier corresponding to the second target leaf node in the target leaf node combination, and combine the first target node identifier, the second target node identifier, the source semantic data corresponding to the first target node identifier and the target semantic data corresponding to the second target node identifier to obtain the verification failure information of the carbon emission data.
6. The method according to claim 1, characterized in that, The step of mapping each of the source semantic data to the target semantic data in the target blockchain includes: Obtain the semantic conversion relationship between the source blockchain and the target blockchain, wherein the semantic conversion relationship includes at least one of the following: unit conversion factor conversion relationship, carbon factor standard version conversion relationship, and field name conversion relationship; For each source semantic data, the source semantic data is mapped to target semantic data in the target blockchain according to at least one of the unit conversion factor conversion relationship, the carbon factor standard version conversion relationship, and the field name conversion relationship.
7. The method according to claim 1, characterized in that, After verifying the consistency of the carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value, the method further includes: When the first target digest value is consistent with the second target digest value, carbon data consistency proof information between the source blockchain and the target blockchain is generated, and the carbon data consistency proof information is loaded into the contract protocol between the source blockchain and the target blockchain.
8. A carbon data verification device for cross-blockchain transmission, characterized in that, The device includes: The initial data acquisition module is used to acquire carbon emission data to be verified in the source blockchain, wherein the carbon emission data is the data to be transmitted to the target blockchain; The semantic data acquisition module is used to extract multiple source semantic data from the carbon emission data and map each source semantic data to target semantic data in the target blockchain. The first digest generation module is used to convert the multiple source semantic data into a source semantic hash tree and detect the first target digest value of the source semantic hash tree; The second summary generation module is used to convert multiple pieces of target semantic data into a target semantic hash tree, and to detect the second target summary value of the target semantic hash tree; The verification module is used to verify the consistency of the carbon emission data transmission between the source blockchain and the target blockchain based on the first target digest value and the second target digest value.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data storage method, data verification method and device
CN106815530A
Carbon emission activity checking method and device
CN113888034A
Carbon emission data chaining method based on block chain technology
CN115941206A
Supply chain carbon data credible management method based on block chain
CN120069336A
Carbon emission factor data traceability management system based on block chain
CN120387837A