Block chain-based hydrogen energy transaction and tracing management method and system
By generating unique hydrogen digital asset certificates through blockchain technology and utilizing smart contracts, the problem of information asymmetry in traditional hydrogen transactions is solved, efficient hydrogen transactions and traceability management are achieved, and market transparency and transaction efficiency are improved.
Patent Information
- Application Number
- CN202511101289.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-08-07
AI Technical Summary
The traditional hydrogen energy trading system lacks a trusted data sharing mechanism, which leads to serious information island problems, information asymmetry, increased transaction costs and risks, and difficulty in achieving full life cycle traceability and quality verification of hydrogen energy products.
A blockchain-based hydrogen energy transaction and traceability management method is adopted. By obtaining the static creation data of hydrogen energy, a unique data summary and asset identity code are generated. Combined with zero-knowledge proof and threshold signature technology, a hydrogen energy digital asset certificate is constructed, and smart contracts are used to achieve automated matching and trading.
It realizes the authenticity and non-tamperability of hydrogen energy information, reduces the trust cost of both parties to the transaction, improves transaction efficiency and resource utilization, builds a complete hydrogen energy circulation traceability system, and improves market transparency and standardization.
Smart Images

Figure CN120612178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based hydrogen energy trading and traceability management method and system. Background Art
[0002] As the global energy transition deepens, hydrogen, as a clean and efficient energy carrier, is gradually becoming an important component of the future energy system. Hydrogen has advantages such as high energy density and zero emissions during storage, transportation, and utilization, and is considered one of the key technological paths to achieving carbon neutrality. Traditional hydrogen trading and management mainly rely on centralized databases and paper vouchers for record keeping, with energy companies or third-party institutions responsible for maintaining transaction information and product traceability data. With the continuous extension of the hydrogen energy industry chain and the expansion of the market scale, the production, storage, transportation, trading, and use of hydrogen energy have formed a complex network system, placing higher requirements on transaction transparency and product traceability.
[0003] Traditional hydrogen trading systems lack a trusted data-sharing mechanism, with each participant maintaining its own independent database, leading to a serious information silo problem. When hydrogen products circulate between different entities, relevant data is difficult to synchronize in real time, resulting in information asymmetry among all parties involved in the transaction. This increases transaction costs and risks, and makes it difficult to trace hydrogen products throughout their lifecycle.
[0004] The quality attributes and environmental characteristics (such as carbon footprint) of hydrogen products are difficult to effectively verify. Due to the lack of unified standards and reliable technical means, it is difficult to distinguish hydrogen products produced using different production processes (such as green hydrogen and gray hydrogen) in the market, and their environmental value cannot be accurately quantified. This affects the market premium of high-quality hydrogen products and the trading of their clean energy attributes. Summary of the Invention
[0005] The embodiments of the present invention provide a blockchain-based hydrogen energy trading and traceability management method and system, which can solve the problems in the existing technology.
[0006] A first aspect of an embodiment of the present invention provides a blockchain-based hydrogen energy transaction and traceability management method, comprising: Obtain static creation data for a specific physical batch of hydrogen energy; apply a hash algorithm to the static creation data to generate a unique data digest; combine the data digest with the unique hydrogen asset identity code assigned to the physical batch of hydrogen energy, and encapsulate the two together into a hydrogen digital asset certificate; and publish the hydrogen digital asset certificate to the blockchain network; The hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. Based on the transaction terms, it searches for and matches suppliers holding hydrogen energy digital asset certificates that meet the conditions. After the supplier responds to the match, it calls a lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract. The hydrogen energy procurement smart contract executes the asset delivery logic based on the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
[0007] Calling a hash algorithm to operate on the static creation data to generate a unique data summary; combining the data summary with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulating them together into a hydrogen energy digital asset certificate including: Constructing a polynomial hash function to perform polynomial mapping on the static creation data to obtain initial eigenvalues, using a local sensitive hashing algorithm to perform multi-mapping on the initial eigenvalues to obtain a feature hash set, and performing a weighted calculation on the feature hash set with a preset weight coefficient to obtain a data summary, wherein the static creation data includes raw material information for uniquely identifying the physical batch, hydrogen production process parameters, and a unique identification code of the initial storage container; Constructing a zero-knowledge proof circuit based on the data digest, setting verification constraints in the zero-knowledge proof circuit, generating a key pair including a proof key and a verification key, and performing a proof operation on the data digest using the proof key to obtain zero-knowledge proof data; Divide the zero-knowledge proof data into multiple data shards according to a preset sharding rule, perform threshold signature calculation on the multiple data shards to obtain multiple signature components, and reconstruct the signature components that are not less than the preset threshold value to obtain a unique hydrogen energy asset identity code; The data summary is combined with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and the two are encapsulated together into a hydrogen energy digital asset certificate.
[0008] Dividing the zero-knowledge proof data into multiple data shards according to a preset sharding rule, performing threshold signature calculation on the multiple data shards to obtain multiple signature components, and reconstructing signature components that are not less than a preset threshold value to obtain a unique hydrogen energy asset identity code includes: Generate a threshold parameter based on the preset total number of participants and the minimum number of signatures, determine a security factor based on the number of bits in the threshold parameter, and substitute the security factor into a random number generation function to generate a master private key; The master private key is sharded using the Shamir threshold scheme, and a polynomial function containing the master private key is constructed. The order of the polynomial function is set based on the minimum number of signatures, and the coefficients of the polynomial function are determined by random numbers. The independent variables of the polynomial function are sequentially set to the participant numbers, and the corresponding child private keys are calculated; The sub-private key is distributed to each participant respectively. Each participant uses the sub-private key received to perform a signing operation on the message to be signed to obtain a signature component, and then verifies the validity of the signature component; Calculating the interpolation coefficients of each signature component based on the Lagrange interpolation principle, and normalizing the interpolation coefficients to obtain weight coefficients, which are used to determine the contribution of each signature component to the final signature; Selecting valid signature components that are no less than the minimum number of signatures from the signature components, and performing weighted summation of the valid signature components and corresponding weight coefficients to obtain a complete signature; The complete signature and timestamp information are concatenated and then hashed to obtain a basic code. The basic code is combined with the version information, and the checksum information is calculated and then encapsulated to generate a hydrogen energy asset identity code.
[0009] The hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the hydrogen energy demander retrieves and matches the suppliers holding hydrogen energy digital asset certificates that meet the conditions, including: Constructing a multi-level index structure, each level of the index structure contains characteristic information of the hydrogen energy procurement smart contract, calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating optimal search path information; Based on the optimal search path information, the hydrogen energy procurement smart contract to be searched is divided into multiple search slices to obtain a plurality of search slices, a parallel search operation is performed on each search slice to obtain a search result score value, and search results with a search result score greater than a preset search threshold are screened to generate a candidate search result set; Obtain the preset evaluation index weight coefficient, calculate the evaluation score value of each supplier in the candidate search result set under different evaluation indicators, and perform weighted calculation on the evaluation score value corresponding to each evaluation indicator and the corresponding evaluation index weight coefficient to obtain the comprehensive matching degree of each supplier; and select the supplier with the largest comprehensive matching degree as the optimal matching supplier.
[0010] Calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating the optimal search path information includes: Calculating the hierarchical depth value of the index structure based on the total number of contracts and a preset branching factor, layering the total number of contracts according to the hierarchical depth value to obtain a node capacity benchmark value for each level, and multiplying the node capacity benchmark value by a preset redundancy coefficient as the node capacity threshold for each level; Perform cluster analysis on the contract features in each index node, grouping contracts whose feature distance is greater than a preset distance threshold into the same cluster, and calculating the ratio of the number of contracts in the current node to the node capacity threshold. When the ratio is greater than the preset split threshold, a node split operation is triggered; Obtain the number of calculation operations in the search process and the preset operation weight coefficient, and calculate the search calculation cost value; obtain the search path length and the preset path weight coefficient, and calculate the path length cost value; obtain the number of path jumps and the preset jump weight coefficient, and calculate the path jump cost value; The search calculation cost, the path length cost and the path jump cost are added together to obtain a total search path cost. Multiple search paths are sorted based on the total search path cost. The search path with the largest total search path cost is selected as the optimal search path.
[0011] Triggering the atomic certificate splitting process, the program will deactivate the original hydrogen energy digital asset certificate and simultaneously generate two new sub-certificates: one represents the sold quantity and transfers its ownership to the demander's address, and the other represents the remaining quantity and returns its ownership to the supplier's address. Both new sub-certificates contain traceability indexes to the original hydrogen energy digital asset certificate, including: Among them, there are two new sub-vouchers: one represents the sold quantity and transfers its ownership to the demander's address, and the other represents the remaining quantity and returns its ownership to the supplier's address; Perform quantity allocation verification on the original hydrogen energy digital asset certificate, and allocate the quantity value of the original hydrogen energy digital asset certificate into a sold quantity value and a remaining quantity value; combine the original hydrogen energy digital asset certificate, block height information and timestamp information into traceability index information; Performing a hash calculation on the traceability index information, the sales quantity value, and the buyer's blockchain address information to obtain sales voucher identification information; signing the sales voucher identification information, transfer time information, and the buyer's blockchain address information with a private key to obtain sales voucher ownership proof information; and packaging the sales voucher identification information, the sales quantity value, the sales voucher ownership proof information, and the traceability index information to generate a sales sub-voucher; The traceability index information, the remaining quantity value and the seller's blockchain address information are hashed to obtain the remaining voucher identification information, the remaining voucher identification information, the transfer time information and the seller's blockchain address information are signed with the private key to obtain the remaining voucher ownership proof information, and the remaining voucher identification information, the remaining quantity value, the remaining voucher ownership proof information and the traceability index information are packaged to generate the remaining sub-voucher.
[0012] A second aspect of an embodiment of the present invention provides a hydrogen energy transaction and traceability management system based on blockchain, including: The first unit is used to obtain static creation data of a specific physical batch of hydrogen energy; call a hash algorithm to operate on the static creation data to generate a unique data digest; combine the data digest with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulate them into a hydrogen energy digital asset certificate; and publish the hydrogen energy digital asset certificate to the blockchain network; The second unit is used by the hydrogen energy demander to deploy a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the demander retrieves and matches the supplier holding a hydrogen energy digital asset certificate that meets the conditions; after the supplier responds to the match, the demander calls the lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract; The third unit is used for the hydrogen energy procurement smart contract to execute the asset delivery logic according to the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
[0013] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0014] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0015] The beneficial effects of this application are as follows: By obtaining the static creation data of a specific physical batch of hydrogen energy and generating a unique digital asset certificate, the digital mapping of hydrogen energy is achieved, ensuring the authenticity and non-tamperability of hydrogen energy information, and providing a reliable data foundation for hydrogen energy transactions.
[0016] With the help of smart contract technology, the hydrogen energy transaction process is automatically matched and executed, reducing the trust cost and intermediary fees of both parties to the transaction. At the same time, the atomic certificate splitting procedure supports flexible partial transactions, improving transaction efficiency and resource utilization.
[0017] Based on the distributed storage characteristics of blockchain, a complete hydrogen energy circulation traceability system has been built, so that information on the entire process of hydrogen energy from production, warehousing to trading can be tracked and verified, effectively solving the information asymmetry problem in traditional hydrogen energy transactions and improving the transparency and standardization of the hydrogen energy market. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flowchart of a hydrogen energy transaction and traceability management method based on blockchain according to an embodiment of the present invention; Figure 2 The figure is a flow chart of voucher segmentation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0020] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0021] refer to Figure 1 and Figure 2 The hydrogen energy transaction and traceability management method based on blockchain in an embodiment of the present invention includes: Obtain static creation data for a specific physical batch of hydrogen energy; apply a hash algorithm to the static creation data to generate a unique data digest; combine the data digest with the unique hydrogen asset identity code assigned to the physical batch of hydrogen energy, and encapsulate the two together into a hydrogen digital asset certificate; and publish the hydrogen digital asset certificate to the blockchain network; The hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. Based on the transaction terms, it searches for and matches suppliers holding hydrogen energy digital asset certificates that meet the conditions. After the supplier responds to the match, it calls a lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract. The hydrogen energy procurement smart contract executes the asset delivery logic based on the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
[0022] In an optional embodiment, a hash algorithm is called to operate on the static creation data to generate a unique data summary; the data summary is combined with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy to encapsulate the two together into a hydrogen energy digital asset certificate, including: Constructing a polynomial hash function to perform polynomial mapping on the static creation data to obtain initial eigenvalues, using a local sensitive hashing algorithm to perform multi-mapping on the initial eigenvalues to obtain a feature hash set, and performing a weighted calculation on the feature hash set with a preset weight coefficient to obtain a data summary, wherein the static creation data includes raw material information for uniquely identifying the physical batch, hydrogen production process parameters, and a unique identification code of the initial storage container; Constructing a zero-knowledge proof circuit based on the data digest, setting verification constraints in the zero-knowledge proof circuit, generating a key pair including a proof key and a verification key, and performing a proof operation on the data digest using the proof key to obtain zero-knowledge proof data; Divide the zero-knowledge proof data into multiple data shards according to a preset sharding rule, perform threshold signature calculation on the multiple data shards to obtain multiple signature components, and reconstruct the signature components that are not less than the preset threshold value to obtain a unique hydrogen energy asset identity code; The data summary is combined with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and the two are encapsulated together into a hydrogen energy digital asset certificate.
[0023] The present invention provides a method for generating a hydrogen energy digital asset certificate. By calling a hash algorithm to operate on static creation data, a unique data summary is generated, and the summary is combined with the unique hydrogen energy asset identity code allocated to the physical batch of hydrogen energy, and the two are encapsulated into a hydrogen energy digital asset certificate.
[0024] In one embodiment, the system first collects static creation data for a physical batch of hydrogen energy, including key information such as the production batch number "HY20230501-001," production time "2023-05-01 08:30:00," production location coordinates "119.2965, 26.0745," production energy type "photovoltaic power generation," electrolyzer operating parameters "current density 350mA / cm², temperature 65°C, pressure 3MPa," hydrogen purity "99.999%," and batch yield "500kg." This static creation data serves as the hydrogen energy's "birth certificate," ensuring its uniqueness and immutability.
[0025] The system constructs a polynomial hash function to perform polynomial mapping on static generative data. Specifically, it uses the Rabin fingerprint algorithm as the polynomial hash function, treating the input static generative data as coefficients to construct a polynomial. For example, for the production batch number "HY20230501-001," the system uses its ASCII code value sequence as the polynomial coefficients and calculates the polynomial mapping value through a modulo-256 operation. For all collected static generative data, the system calculates a set of initial eigenvalues: {79863, 54291, 86420, 12975, 43680, 92501}.
[0026] The system then uses a locality-sensitive hashing algorithm to perform multiple mappings on the initial eigenvalues. Using the SimHash algorithm, each initial eigenvalue is converted into a 64-bit binary sequence. These sequences are then weighted and merged to produce the feature hash set {0xf72a58c91b643de9, 0x8e5d73a6c419f026, 0x2b97c38d45e61fa0}. Locality-sensitive hashing ensures that similar initial eigenvalues are mapped to similar hash spaces, improving the system's anti-interference capabilities.
[0027] The system performs a weighted calculation on the feature hash set based on the preset weight coefficients {0.35, 0.25, 0.40}. The three feature hash values are multiplied by their corresponding weights and then combined using a bitwise XOR operation to produce the data digest 0xd47b91e5a3c82df7. The weight coefficients reflect the importance of different feature hashes in the overall digest and can be adjusted based on business needs.
[0028] A zero-knowledge proof circuit is constructed based on a data digest. The circuit structure is designed using the Groth16 protocol. The data digest 0xd47b91e5a3c82df7 is used as the circuit's private input. Verification constraints are set: the digest value must be generated from valid static creation data using a specified algorithm. The system generates a key pair consisting of a proving key and a verification key. The proving key is used to generate the proof, while the verification key is used to verify the validity of the proof. The proving key is used to perform a proof operation on the data digest, generating zero-knowledge proof data containing proof elements π={πA, πB, πC}. πA, πB, and πC are points on a curve, representing specific mathematical relationships. This allows the verifier to verify the validity of the data digest without knowing the original static creation data.
[0029] The system divides the zero-knowledge proof data into multiple data shards according to a preset sharding rule. Using a (3,5) threshold scheme, the zero-knowledge proof data π = {πA, πB, πC} is divided into five data shards {s1, s2, s3, s4, s5}, where any three of these shards can reconstruct the complete zero-knowledge proof data. A threshold signature calculation is performed on these five data shards, using the elliptic curve digital signature algorithm to generate signature components {sig1, sig2, sig3, sig4, sig5}.
[0030] When reconstructing the hydrogen asset identity code, the system collects signature components, such as {sig1, sig3, sig5}, that are no less than a preset threshold (3 in this example). Using Lagrange interpolation, the complete signature is reconstructed to obtain the unique hydrogen asset identity code "HID-0xfe73a92bc6d481e5." This threshold signature mechanism improves the system's security and fault tolerance. Even if some signature components are lost or damaged, the complete asset identity code can still be recovered.
[0031] The system combines the data digest 0xd47b91e5a3c82df7 with the unique hydrogen asset identity code "HID-0xfe73a92bc6d481e5" and encapsulates it according to a predefined data structure format to generate a hydrogen digital asset certificate. The certificate is stored in JSON format and contains a data digest field, an asset identity code field, a timestamp field "2023-05-01T09:15:30Z", and a digital signature field. The complete hydrogen digital asset certificate is recorded in the distributed ledger for hydrogen trading, traceability, and regulatory purposes.
[0032] Through the implementation of the above technologies, the present invention realizes the digital mapping of physical batches of hydrogen energy, ensures the uniqueness, security and verifiability of hydrogen energy digital assets, and provides technical support for the transaction, circulation and supervision of hydrogen energy throughout its life cycle.
[0033] In an optional embodiment, the zero-knowledge proof data is divided into multiple data shards according to a preset sharding rule, threshold signature calculation is performed on the multiple data shards to obtain multiple signature components, and signature components that are not less than a preset threshold value are reconstructed to obtain a unique hydrogen energy asset identity code, including: Generate a threshold parameter based on the preset total number of participants and the minimum number of signatures, determine a security factor based on the number of bits in the threshold parameter, and substitute the security factor into a random number generation function to generate a master private key; The master private key is sharded using the Shamir threshold scheme, and a polynomial function containing the master private key is constructed. The order of the polynomial function is set based on the minimum number of signatures, and the coefficients of the polynomial function are determined by random numbers. The independent variables of the polynomial function are sequentially set to the participant numbers, and the corresponding child private keys are calculated; The sub-private key is distributed to each participant respectively. Each participant uses the sub-private key received to perform a signing operation on the message to be signed to obtain a signature component, and then verifies the validity of the signature component; Calculating the interpolation coefficients of each signature component based on the Lagrange interpolation principle, and normalizing the interpolation coefficients to obtain weight coefficients, which are used to determine the contribution of each signature component to the final signature; Selecting valid signature components that are no less than the minimum number of signatures from the signature components, and performing weighted summation of the valid signature components and corresponding weight coefficients to obtain a complete signature; The complete signature and timestamp information are concatenated and then hashed to obtain a basic code. The basic code is combined with the version information, and the checksum information is calculated and then encapsulated to generate a hydrogen energy asset identity code.
[0034] This invention provides a hydrogen energy asset identity encoding method based on zero-knowledge proof, which ensures the security and credibility of hydrogen energy asset identity through threshold signature technology. The specific implementation process is as follows: When processing zero-knowledge proof data, the system first sets the total number of participants, n, and the minimum number of signatures, t, based on business requirements. For example, n=5 and t=3, indicating a total of five participants and requiring signatures from at least three of them to complete identity code generation. Based on these two parameters, the system generates the threshold parameters (t,n), (3,5), and determines the security factor λ as the number of bits in the threshold parameter, for example, 256 bits. This security factor is then substituted into the random number generator (PRNG(λ)) to generate the master private key s, which can be a large, random 256-bit integer, such as "8a7b6c5d4e3f2g1h" (in hexadecimal notation).
[0035] The system uses the Shamir threshold scheme to shard the master private key. A polynomial function f(x) containing the master private key is constructed, with an order of t-1, i.e., a second-order polynomial. The function takes the form f(x) = s + a1·x + a2·x², where s is the master private key and a1 and a2 are randomly generated coefficients. For example, a1="2e3d4c5b6a7f8e9d" and a2="1a2b3c4d5e6f7g8h". The system sets the polynomial function's independent variable x to the participant number i (i ranges from 1 to n) and calculates the corresponding child private key si=f(i). For example, for participant 1, its child private key s1=f(1); for participant 2, its child private key s2=f(2), and so on.
[0036] The system distributes the sub-private key to each participant via a secure channel. After receiving the sub-private key, each participant performs a signature operation on the message to be signed (e.g., the hash value of the zero-knowledge proof data) to obtain their respective signature components. Each participant uses their sub-private key si to execute the signature algorithm Sign(si,m) on the message to be signed m, generating signature components σi. For example, participant 1 generates signature component σ1 = Sign(s1,m). Each participant is also required to verify the validity of their generated signature components to ensure that the signature results conform to the expected rules.
[0037] After the system collects signature components, it calculates interpolation coefficients for each signature component based on the Lagrange interpolation principle. For each participant j, the interpolation coefficient λj is calculated using the numbers of all participating parties. Once the interpolation coefficients are calculated, the system normalizes them to obtain weight coefficients wj, which are used to determine the contribution of each signature component to the final signature. For example, if signature components are collected from participants 1, 3, and 4, the corresponding weight coefficients w1, w3, and w4 are calculated, satisfying w1+w3+w4=1.
[0038] The system selects valid signature components from the set of signature components, at least the minimum number t of signatures. For example, it selects valid signature components σ1, σ3, and σ4 from participants 1, 3, and 4. These valid signature components are weighted and summed with the corresponding weight coefficients to obtain the complete signature σ = w1·σ1+w3·σ3+w4·σ4. This complete signature is equivalent to the result obtained by directly signing with the master private key s, but in practice, the master private key s is not fully reconstructed.
[0039] The system concatenates the full signature σ with the current timestamp ts and performs a hash operation to obtain the base code code = Hash(σ||ts). For example, if the timestamp is "2023-06-15T08:30:45Z", it is concatenated with the full signature and hashed with SHA-256 to obtain the 256-bit base code "9e8d7c6b5a4f3e2d" (simplified representation). The system combines this base code with the version information ver (for example, "01") to generate the intermediate code "01_9e8d7c6b5a4f3e2d". The system calculates the checksum information check on the intermediate code, for example, using the CRC32 algorithm to obtain "a1b2c3d4". Finally, the version information, base code, and checksum information are packaged to generate the final hydrogen energy asset identity code "01_9e8d7c6b5a4f3e2d_a1b2c3d4".
[0040] The above implementation process fully leverages the security features of threshold signature technology, ensuring the unforgeability and verifiability of hydrogen energy asset identity codes. In practical applications, the number of participants and the minimum number of signatures can be adjusted according to security requirements, providing flexible security level configuration. The entire process eliminates the need for centralized storage of the master private key, effectively avoiding the risk of single points of failure. The introduction of timestamps and checksums further enhances the uniqueness and integrity verification capabilities of the identity code. The sharding of zero-knowledge proof data and the threshold signature reconstruction mechanism enable efficient authentication and transaction confirmation of hydrogen energy assets while maintaining privacy.
[0041] In an optional embodiment, the hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the suppliers holding hydrogen energy digital asset certificates that meet the conditions are retrieved and matched, including: Constructing a multi-level index structure, each level of the index structure contains characteristic information of the hydrogen energy procurement smart contract, calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating optimal search path information; Based on the optimal search path information, the hydrogen energy procurement smart contract to be searched is divided into multiple search slices to obtain a plurality of search slices, a parallel search operation is performed on each search slice to obtain a search result score value, and search results with a search result score greater than a preset search threshold are screened to generate a candidate search result set; Obtain the preset evaluation index weight coefficient, calculate the evaluation score value of each supplier in the candidate search result set under different evaluation indicators, and perform weighted calculation on the evaluation score value corresponding to each evaluation indicator and the corresponding evaluation index weight coefficient to obtain the comprehensive matching degree of each supplier; and select the supplier with the largest comprehensive matching degree as the optimal matching supplier.
[0042] In one embodiment, the hydrogen energy trading matching system achieves intelligent matching between demanders and suppliers through a blockchain network. The system first allows demanders to deploy a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. Then, based on these transaction terms, it automatically retrieves and matches suppliers holding hydrogen energy digital asset certificates that meet the conditions.
[0043] The system constructs a multi-level index structure to improve retrieval efficiency. This index structure consists of three main levels: the first level is the hydrogen purity index, which categorizes hydrogen procurement smart contracts according to purity requirements: "above 99.9%," "99.5%-99.9%," and "99.0%-99.5%." The second level is the hydrogen production index, which divides contracts into three intervals based on daily production requirements: "below 100kg," "100kg-500kg," and "above 500kg." The third level is the delivery time index, which divides contracts into three time periods based on delivery deadlines: "within 24 hours," "1-3 days," and "more than 3 days." Each smart contract has a corresponding position in each level of the index, forming a complete index path.
[0044] The system calculates the cost function value of a search path based on a multi-level index structure. The cost function considers three factors: search path length, index hit rate, and computing resource consumption. The search path length refers to the number of levels traversed from the index root node to the target node; the index hit rate reflects the probability that a search path will find a contract that meets the conditions; and computing resource consumption represents the computing power required to execute the search path. In a practical application, the system calculated three possible search paths for a hydrogen procurement smart contract (requiring 99.95% purity, 300 kg daily production, and delivery within 48 hours): Path A (purity first, production second, and time last) had a cost of 12.3; Path B (production first, purity second, and time last) had a cost of 15.7; and Path C (time first, purity second, and production last) had a cost of 18.2. The system selected Path A, which had the lowest cost, as the optimal search path and generated search path information including the search order and index category.
[0045] The system shards the hydrogen procurement smart contract for search based on the optimal search path. Sharding divides a complete search task into multiple subtasks to enable parallel searches. For the example contract, the system divides the search task into three shards based on Path A: Shard 1 searches for hydrogen supplies with a purity of "above 99.9%"; Shard 2 searches for supplies with a daily production of "100kg-500kg"; and Shard 3 searches for supplies with a delivery time of "1-3 days."
[0046] The system performs parallel searches on each search shard. For each search shard, the system calculates the degree of match between the search results and the target requirements, generating a search result score. For example, supplier X provides hydrogen with a purity of 99.97%, resulting in a search score of 0.95; a daily production of 350 kg, resulting in a search score of 0.88; and a delivery time of 36 hours, resulting in a search score of 0.92. The average of these scores is 0.917, exceeding the preset search threshold of 0.85, and supplier X is therefore included in the candidate search result set. Through similar calculations, the system ultimately selects five suppliers as candidate search results.
[0047] The system obtains preset evaluation indicator weight coefficients for a comprehensive evaluation of suppliers. Evaluation indicators include price rationality (weight 0.4), historical delivery reliability (weight 0.3), production capacity stability (weight 0.2), and user evaluation (weight 0.1). The system calculates the evaluation score of each supplier in the candidate search result set under different evaluation indicators. For example, for supplier X, the price rationality score is 85 points (the price per kilogram is 5% lower than the market average), the historical delivery reliability score is 92 points (28 out of the past 30 transactions were on time), the production capacity stability score is 78 points (production capacity fluctuations within 10% in the past three months), and the user evaluation score is 88 points (overall score 4.4 / 5).
[0048] The system calculates the weighted scores for each evaluation indicator by adding the corresponding weight coefficients. Supplier X's overall match is calculated as: 85 × 0.4 + 92 × 0.3 + 78 × 0.2 + 88 × 0.1 = 85.9. The system also calculates the overall match for the other suppliers: Supplier Y is 82.7, Supplier Z is 87.3, Supplier W is 79.5, and Supplier V is 83.2.
[0049] The system selects the optimal matching supplier from the suppliers with the highest overall matching score. In this example, Supplier Z, with an overall matching score of 87.3, is the optimal matching supplier. The system automatically recommends Supplier Z to the demander, providing the rationale for the match and a detailed evaluation report. The demander can review the evaluation results and confirm whether to enter into a transaction with this supplier. If the transaction is confirmed, the system automatically triggers the execution of the smart contract, records the transaction details, and generates an immutable transaction certificate on the blockchain, completing the intelligent matching process for hydrogen energy.
[0050] In an optional embodiment, calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating the optimal search path information includes: Calculating the hierarchical depth value of the index structure based on the total number of contracts and a preset branching factor, layering the total number of contracts according to the hierarchical depth value to obtain a node capacity benchmark value for each level, and multiplying the node capacity benchmark value by a preset redundancy coefficient as the node capacity threshold for each level; Perform cluster analysis on the contract features in each index node, grouping contracts whose feature distance is greater than a preset distance threshold into the same cluster, and calculating the ratio of the number of contracts in the current node to the node capacity threshold. When the ratio is greater than the preset split threshold, a node split operation is triggered; Obtain the number of calculation operations in the search process and the preset operation weight coefficient, and calculate the search calculation cost value; obtain the search path length and the preset path weight coefficient, and calculate the path length cost value; obtain the number of path jumps and the preset jump weight coefficient, and calculate the path jump cost value; The search calculation cost, the path length cost and the path jump cost are added together to obtain a total search path cost. Multiple search paths are sorted based on the total search path cost. The search path with the largest total search path cost is selected as the optimal search path.
[0051] In practical applications, the present invention provides a method for calculating the cost function value of a search path based on a multi-level index structure and selecting the optimal search path. The method first constructs a multi-level index structure, then calculates the cost function values of different search paths, and selects the path with the lowest cost as the optimal search path.
[0052] When constructing a multi-level index structure, the index's hierarchical depth must be calculated based on the total number of contracts and the preset branching factor. Assuming there are 10,000 contract documents in the system and a preset branching factor of 10, the hierarchical depth can be calculated using logarithmic operations. The total number of contracts is then layered based on the calculated hierarchical depth to determine the node capacity baseline for each layer. In the example above, the node capacity baseline for the first layer is 1, the second layer is 10, the third layer is 100, and the fourth layer is 1000. If the preset redundancy factor is 1.2, the node capacity thresholds for each layer are 1.2, 12, 120, and 1200, respectively.
[0053] When clustering the contract features in each index node, a feature distance calculation method is used to assess the similarity between contracts. For example, the feature vectors of two contract documents A and B are [0.5, 0.3, 0.8] and [0.6, 0.2, 0.7], respectively. The Euclidean distance between these two vectors is calculated to be 0.173. If the preset distance threshold is 0.2, the two contracts will be classified into the same cluster. When the ratio of the number of contracts in a node to the node capacity threshold exceeds the preset split threshold, the node split operation is triggered. Assuming that a third-layer node contains 100 contracts, its node capacity threshold is 120, and the ratio is 0.83, if the preset split threshold is 0.8, the node needs to be split, and the contracts in the node are distributed to multiple child nodes based on the clustering results.
[0054] During the retrieval process, the system records the number of calculation operations and multiplies it by the preset operation weight coefficient to calculate the retrieval calculation cost. Assuming that a retrieval process involves 50 comparison operations, 30 read operations, and 10 write operations, and the preset weight coefficients corresponding to each operation are 1, 2, and 3 respectively, the retrieval calculation cost is 50×1+30×2+10×3=140. At the same time, the system obtains the retrieval path length and the preset path weight coefficient to calculate the path length cost. For example, if the retrieval path length is 4 and the preset path weight coefficient is 10, the path length cost is 4×10=40. In addition, the system also obtains the number of path jumps and the preset jump weight coefficient to calculate the path jump cost. If two cross-node jumps occur during the retrieval process and the preset jump weight coefficient is 15, the path jump cost is 2×15=30.
[0055] The total cost of the search path is obtained by adding the search calculation cost, path length cost, and path jump cost. In the above example, the total cost is 140+40+30=210. Based on the total cost of the search path, the system sorts multiple possible search paths. For example, the system generates three possible search paths with total costs of 210, 185, and 230, respectively. They are sorted from smallest to largest in terms of cost: 185, 210, and 230. The search path with the smallest total cost (the path with a cost of 185) is determined as the optimal search path.
[0056] In actual application scenarios, the relationship between search efficiency and system resource consumption can be balanced by adjusting the preset operation weight coefficients, path weight coefficients, and jump weight coefficients. For example, in a resource-constrained environment, the operation weight coefficient can be increased to make the system more inclined to select search paths with low computational complexity; in scenarios with high response time requirements, the path weight coefficient can be increased to make the system prioritize search solutions with short paths.
[0057] By establishing a multi-level index structure and selecting the optimal search path, this implementation significantly improves contract retrieval efficiency. Experimental data shows that compared to traditional linear retrieval methods, this method can reduce average retrieval time from 300 milliseconds to 50 milliseconds, improving retrieval efficiency by approximately 83%. Furthermore, by dynamically adjusting the node capacity threshold and split threshold, the system can adapt to contract repositories of varying sizes and maintain good retrieval performance. When the total number of contracts increases from 10,000 to 100,000, retrieval time only increases by approximately 20%, demonstrating excellent scalability.
[0058] This method also adaptively optimizes the index structure based on actual search patterns. When the system detects that a certain type of contract is frequently searched, it adjusts the position of the relevant nodes in the index structure, shortening the search path for these popular contracts. Experiments show that for the top 10% of most frequently accessed contracts, the average search time can be further reduced to 30 milliseconds, approximately 40% faster than searching for standard contracts, effectively improving overall system performance and user experience.
[0059] In an optional implementation, an atomic certificate splitting procedure is triggered, which will deactivate the original hydrogen digital asset certificate and simultaneously generate two new sub-certificates: one representing the sold quantity and transferring its ownership to the address of the demander, and the other representing the remaining quantity and returning its ownership to the address of the supplier. Both new sub-certificates contain traceability indexes to the original hydrogen digital asset certificate, including: Among them, there are two new sub-vouchers: one represents the sold quantity and transfers its ownership to the demander's address, and the other represents the remaining quantity and returns its ownership to the supplier's address; Perform quantity allocation verification on the original hydrogen energy digital asset certificate, and allocate the quantity value of the original hydrogen energy digital asset certificate into a sold quantity value and a remaining quantity value; combine the original hydrogen energy digital asset certificate, block height information and timestamp information into traceability index information; Performing a hash calculation on the traceability index information, the sales quantity value, and the buyer's blockchain address information to obtain sales voucher identification information; signing the sales voucher identification information, transfer time information, and the buyer's blockchain address information with a private key to obtain sales voucher ownership proof information; and packaging the sales voucher identification information, the sales quantity value, the sales voucher ownership proof information, and the traceability index information to generate a sales sub-voucher; The traceability index information, the remaining quantity value and the seller's blockchain address information are hashed to obtain the remaining voucher identification information, the remaining voucher identification information, the transfer time information and the seller's blockchain address information are signed with the private key to obtain the remaining voucher ownership proof information, and the remaining voucher identification information, the remaining quantity value, the remaining voucher ownership proof information and the traceability index information are packaged to generate the remaining sub-voucher.
[0060] In this implementation, when a hydrogen digital asset transaction requires a partial quantity transfer, the system triggers an atomic certificate splitting process. This process first performs a quantity allocation verification on the original hydrogen digital asset certificate to ensure that the sum of the sold quantity and the remaining quantity equals the total quantity of the original certificate. For example, for an original certificate representing 100 kg of hydrogen, if the transaction demand is 60 kg, the system verifies that the sum of 60 kg (the sold quantity) and 40 kg (the remaining quantity) is indeed equal to 100 kg (the original quantity).
[0061] After the quantity is verified, the system collects the current blockchain network's block height and millisecond-accurate timestamp information. Assuming the current block height is 8246372 and the timestamp is 1678523648215 (corresponding to 14:27:28:215 milliseconds on March 11, 2023), the system combines this information with the original certificate's unique identifier (e.g., "H2-CERT-202303-0015") to form the traceability index information: "H2-CERT-202303-0015-8246372-1678523648215."
[0062] The system then generates the sales sub-voucher. First, the traceability index, the sales quantity (60 kilograms), and the buyer's blockchain address (e.g., "0x7Ab123...def456") are concatenated and hashed using a SHA-256 algorithm to generate the sales voucher identification information, e.g., "0x8a721c6...e9b54f2." The system then uses a private key (typically held by the platform or the seller) to sign this identification information, along with the transfer time (also accurate to the millisecond, e.g., 1678523648500), and the buyer's blockchain address using the Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm, to generate proof of ownership information for the sales voucher, e.g., "0x3a9b7c...d12e5f." The system then packages the sales voucher identification information, the sales quantity (60 kilograms), the proof of ownership information, and the traceability index information to generate the complete sales sub-voucher data structure.
[0063] At the same time, the system generates the remaining sub-voucher. Using similar steps, the traceability index information, the remaining quantity value (40 kilograms), and the seller's blockchain address information (e.g., "0x5Fc789...abc123") are concatenated and hashed with a SHA-256 hash to obtain the remaining voucher identification information, e.g., "0x2d8e9f...c7a3b6." The system uses the same private key to perform an ECDSA signature on this identification information, along with the transfer time information and the seller's blockchain address, to generate the remaining voucher ownership proof information, e.g., "0x6f5d4c...e9a8b7." The system then packages the remaining voucher identification information, the remaining quantity value (40 kilograms), the remaining voucher ownership proof information, and the traceability index information to generate the complete remaining sub-voucher data structure.
[0064] After the two sub-certificates are generated, the system executes an atomic transaction on the blockchain. This operation includes three key steps: deactivating the original certificate, registering the sold sub-certificate and assigning ownership to the buyer, and registering the remaining sub-certificate and assigning ownership to the seller. Smart contracts ensure that these three steps are either fully executed successfully or rolled back if all fail, preventing partial execution.
[0065] In practice, the system will store the complete information of the sub-voucher on the blockchain, including quantity, proof of ownership, and traceability index, while also saving more detailed transaction records in an off-chain database for query. For example, for 60 kilograms of hydrogen sold, the system will record additional attributes such as its production location, production time, purity, and carbon emission intensity, which are inherited from the original voucher.
[0066] Through the traceability index information, anyone can trace the relationship between the sub-voucher and the original voucher, verifying the complete life cycle of the hydrogen energy digital asset. For example, to verify the authenticity of a sold sub-voucher, the traceability index can be used to find the original voucher and confirm that the sub-voucher was indeed split from a valid original voucher and that the quantity is correct.
[0067] Additionally, when the system detects that an original voucher has been completely split (the sold quantity equals the original quantity, and the remaining quantity is zero), it automatically marks the original voucher as "Fully Transferred" to prevent reuse. If the original voucher is only partially transferred, the remaining sub-vouchers can continue to be used in subsequent transactions, subject to the same splitting rules.
[0068] Throughout the entire process, the system ensures the security of digital signatures through cryptography, the immutability of transactions through blockchain technology, and the atomicity of operations through smart contracts, thereby ensuring the security, transparency, and traceability of hydrogen digital asset transactions. This segmentation mechanism greatly improves the liquidity of hydrogen digital assets, enabling on-demand trading of hydrogen energy to meet diverse market needs.
[0069] The blockchain-based hydrogen energy transaction and traceability management system according to the embodiment of the present invention includes: The first unit is used to obtain static creation data of a specific physical batch of hydrogen energy; call a hash algorithm to operate on the static creation data to generate a unique data digest; combine the data digest with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulate them into a hydrogen energy digital asset certificate; and publish the hydrogen energy digital asset certificate to the blockchain network; The second unit is used by the hydrogen energy demander to deploy a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the demander retrieves and matches the supplier holding a hydrogen energy digital asset certificate that meets the conditions; after the supplier responds to the match, the demander calls the lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract; The third unit is used for the hydrogen energy procurement smart contract to execute the asset delivery logic according to the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
[0070] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0071] According to a fourth aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0072] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A hydrogen energy transaction and traceability management method based on blockchain, characterized in that: include: Obtain static creation data of a specific physical batch of hydrogen energy; Calling a hash algorithm to operate on the static creation data to generate a unique data summary; combining the data summary with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulating them together into a hydrogen energy digital asset certificate; publishing the hydrogen energy digital asset certificate to the blockchain network; The hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. Based on the transaction terms, it searches for and matches suppliers holding hydrogen energy digital asset certificates that meet the conditions. After the supplier responds to the match, it calls a lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract. The hydrogen energy procurement smart contract executes the asset delivery logic based on the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
2. The method according to claim 1, characterized in that Calling a hash algorithm to operate on the static creation data to generate a unique data summary; combining the data summary with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulating them together into a hydrogen energy digital asset certificate including: Constructing a polynomial hash function to perform polynomial mapping on the static creation data to obtain initial eigenvalues, using a local sensitive hashing algorithm to perform multi-mapping on the initial eigenvalues to obtain a feature hash set, and performing a weighted calculation on the feature hash set with a preset weight coefficient to obtain a data summary, wherein the static creation data includes raw material information for uniquely identifying the physical batch, hydrogen production process parameters, and a unique identification code of the initial storage container; Constructing a zero-knowledge proof circuit based on the data digest, setting verification constraints in the zero-knowledge proof circuit, generating a key pair including a proof key and a verification key, and performing a proof operation on the data digest using the proof key to obtain zero-knowledge proof data; Divide the zero-knowledge proof data into multiple data shards according to a preset sharding rule, perform threshold signature calculation on the multiple data shards to obtain multiple signature components, and reconstruct the signature components that are not less than the preset threshold value to obtain a unique hydrogen energy asset identity code; The data summary is combined with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and the two are encapsulated together into a hydrogen energy digital asset certificate.
3. The method according to claim 2, characterized in that Dividing the zero-knowledge proof data into multiple data shards according to a preset sharding rule, performing threshold signature calculation on the multiple data shards to obtain multiple signature components, and reconstructing signature components that are not less than a preset threshold value to obtain a unique hydrogen energy asset identity code includes: Generate a threshold parameter based on the preset total number of participants and the minimum number of signatures, determine a security factor based on the number of bits in the threshold parameter, and substitute the security factor into a random number generation function to generate a master private key; The master private key is sharded using the Shamir threshold scheme, and a polynomial function containing the master private key is constructed. The order of the polynomial function is set based on the minimum number of signatures, and the coefficients of the polynomial function are determined by random numbers. The independent variables of the polynomial function are sequentially set to the participant numbers, and the corresponding child private keys are calculated; The sub-private key is distributed to each participant respectively. Each participant uses the sub-private key received to perform a signing operation on the message to be signed to obtain a signature component, and then verifies the validity of the signature component; Calculating the interpolation coefficients of each signature component based on the Lagrange interpolation principle, and normalizing the interpolation coefficients to obtain weight coefficients, which are used to determine the contribution of each signature component to the final signature; Selecting valid signature components that are no less than the minimum number of signatures from the signature components, and performing weighted summation of the valid signature components and corresponding weight coefficients to obtain a complete signature; The complete signature and timestamp information are concatenated and then hashed to obtain a basic code. The basic code is combined with the version information, and the checksum information is calculated and then encapsulated to generate a hydrogen energy asset identity code.
4. The method according to claim 1, wherein The hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the hydrogen energy demander retrieves and matches the suppliers holding hydrogen energy digital asset certificates that meet the conditions, including: Constructing a multi-level index structure, each level of the index structure contains characteristic information of the hydrogen energy procurement smart contract, calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating optimal search path information; Based on the optimal search path information, the hydrogen energy procurement smart contract to be searched is divided into multiple search slices to obtain a plurality of search slices, a parallel search operation is performed on each search slice to obtain a search result score value, and search results with a search result score greater than a preset search threshold are screened to generate a candidate search result set; Obtain the preset evaluation index weight coefficient, calculate the evaluation score value of each supplier in the candidate search result set under different evaluation indicators, and perform weighted calculation on the evaluation score value corresponding to each evaluation indicator and the corresponding evaluation index weight coefficient to obtain the comprehensive matching degree of each supplier; and select the supplier with the largest comprehensive matching degree as the optimal matching supplier.
5. The method according to claim 4, characterized in that Calculating the cost function value of the search path based on the multi-level index structure, selecting the search path with the minimum cost function value as the optimal search path, and generating the optimal search path information includes: Calculating the hierarchical depth value of the index structure based on the total number of contracts and a preset branching factor, layering the total number of contracts according to the hierarchical depth value to obtain a node capacity benchmark value for each level, and multiplying the node capacity benchmark value by a preset redundancy coefficient as the node capacity threshold for each level; Perform cluster analysis on the contract features in each index node, grouping contracts whose feature distance is greater than a preset distance threshold into the same cluster, and calculating the ratio of the number of contracts in the current node to the node capacity threshold. When the ratio is greater than the preset split threshold, a node split operation is triggered; Obtain the number of calculation operations in the search process and the preset operation weight coefficient, and calculate the search calculation cost value; obtain the search path length and the preset path weight coefficient, and calculate the path length cost value; obtain the number of path jumps and the preset jump weight coefficient, and calculate the path jump cost value; The search calculation cost, the path length cost and the path jump cost are added together to obtain a total search path cost. Multiple search paths are sorted based on the total search path cost. The search path with the largest total search path cost is selected as the optimal search path.
6. The method according to claim 1, characterized in that Triggering the atomic certificate splitting procedure, the procedure will deactivate the original hydrogen energy digital asset certificate and simultaneously generate two new sub-certificates. Both new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate, including: Perform quantity allocation verification on the original hydrogen energy digital asset certificate, and allocate the quantity value of the original hydrogen energy digital asset certificate into a sold quantity value and a remaining quantity value; combine the original hydrogen energy digital asset certificate, block height information and timestamp information into traceability index information; Performing a hash calculation on the traceability index information, the sales quantity value, and the buyer's blockchain address information to obtain sales voucher identification information; signing the sales voucher identification information, transfer time information, and the buyer's blockchain address information with a private key to obtain sales voucher ownership proof information; and packaging the sales voucher identification information, the sales quantity value, the sales voucher ownership proof information, and the traceability index information to generate a sales sub-voucher; The traceability index information, the remaining quantity value and the seller's blockchain address information are hashed to obtain the remaining voucher identification information, the remaining voucher identification information, the transfer time information and the seller's blockchain address information are signed with the private key to obtain the remaining voucher ownership proof information, and the remaining voucher identification information, the remaining quantity value, the remaining voucher ownership proof information and the traceability index information are packaged to generate the remaining sub-voucher.
7. The method according to claim 6, characterized in that The two new sub-credentials include: One represents the quantity sold and transfers ownership to the demander’s address; The other represents the remaining quantity and returns ownership to the supplier address.
8. A hydrogen energy transaction and traceability management system based on blockchain, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain static creation data of a specific physical batch of hydrogen energy; call a hash algorithm to operate on the static creation data to generate a unique data digest; combine the data digest with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy, and encapsulate them into a hydrogen energy digital asset certificate; and publish the hydrogen energy digital asset certificate to the blockchain network; The second unit is used by the hydrogen energy demander to deploy a hydrogen energy procurement smart contract containing transaction terms on the blockchain network. According to the transaction terms, the demander retrieves and matches the supplier holding a hydrogen energy digital asset certificate that meets the conditions; after the supplier responds to the match, the demander calls the lock instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract; The third unit is used for the hydrogen energy procurement smart contract to execute the asset delivery logic according to the hydrogen energy quantity defined in the transaction terms: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen energy digital asset certificate is directly transferred to the demander's address; if the transaction quantity is less than the total quantity represented by the certificate, the atomic certificate splitting program is triggered, which will deactivate the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain a traceability index to the original hydrogen energy digital asset certificate.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Digital commodity transaction method and device based on block chain
CN112883109A
Financial derivative digital transaction system based on trusted computing and smart contract
CN113011894A
Blockchain-based renewable energy power excess consumption voucher transaction method
CN113222594A
Digital right encryption management method and system based on block chain
CN119557854A
Block chain-based hydrogen energy trusted auction transaction method and mechanism
CN119963322A
Cited By
Data tracing method and device based on block chain and big data
CN121387850A
Data traceability method and device based on blockchain and big data
CN121387850B