Blockchain-based hydrogen energy transaction and traceability management method and system
Blockchain technology has solved the problems of hydrogen energy trading and traceability management, realized the digitization of hydrogen energy products, solved the information asymmetry problem in existing technologies, and enabled the automated matching and trading of hydrogen energy products, thereby improving market transparency and standardization.
Patent Information
- Application Number
- CN202511101289.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Traditional hydrogen energy trading systems lack a reliable data sharing mechanism, resulting in serious information silos, 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 trading and traceability management method is adopted. By obtaining static generative data and generating a unique data digest, combined with the hydrogen energy asset identity code, a hydrogen energy digital asset certificate is constructed. Smart contracts are used to achieve automated matching and trading, support atomic certificate segmentation, and ensure the immutability of data and the transparency of transactions.
It has ensured the authenticity and immutability of hydrogen energy information, reduced the trust costs for both parties in the transaction, improved transaction efficiency and resource utilization, built a complete traceability system for hydrogen energy circulation, and enhanced market transparency and standardization.
Smart Images

Figure CN120612178B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain, in particular to a hydrogen energy transaction and traceability management method and system based on blockchain. BACKGROUND
[0002] With the deepening of global energy transformation, hydrogen energy, as a clean and efficient energy carrier, is gradually becoming an important part of the future energy system. Hydrogen energy has the advantages of high energy density, zero emission, etc. in the process of storage, transportation and utilization, and is considered as one of the key technical paths to achieve the goal of carbon neutralization. Traditional hydrogen energy transaction and management mainly rely on centralized databases and paper certificates for recording, and energy enterprises or third-party institutions are 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, transaction and use of hydrogen energy form a complex network system, which puts forward higher requirements on transaction transparency and product traceability capability.
[0003] The traditional hydrogen energy transaction system lacks a credible data sharing mechanism, and each participant maintains an independent database, resulting in a serious information island problem. When hydrogen energy products circulate among different subjects, relevant data is difficult to synchronize in real time, causing information asymmetry among transaction parties, increasing transaction costs and risks, and also making it difficult to trace the whole life cycle of hydrogen energy products.
[0004] The quality attributes and environmental characteristics (such as carbon footprint) of hydrogen energy products are difficult to verify effectively. Due to the lack of unified standards and reliable technical means, it is difficult to distinguish hydrogen energy products of different production processes (such as green hydrogen and gray hydrogen) in the market, and it is impossible to accurately quantify their environmental value, which affects the market premium of high-quality hydrogen energy products and the transaction of clean energy attributes. SUMMARY
[0005] The present application provides a hydrogen energy transaction and traceability management method and system based on blockchain, which can solve the problems in the prior art.
[0006] In a first aspect, the present application provides a hydrogen energy transaction and traceability management method based on blockchain, comprising:
[0007] Obtaining 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 data digest with uniqueness; combining the data digest with a unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy to jointly encapsulate into a hydrogen energy digital asset certificate; publishing the hydrogen energy digital asset certificate to a blockchain network;
[0008] A hydrogen energy demander deploys a hydrogen energy purchase smart contract containing transaction terms on a blockchain network, according to which a supplier holding a hydrogen energy digital asset certificate meeting the conditions is retrieved and matched; after the match, the supplier calls a locking instruction to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy purchase smart contract;
[0009] The hydrogen energy purchase smart contract executes 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 address; if the transaction quantity is less than the total quantity represented by the certificate, an atomized certificate splitting program is triggered, which will disable the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both of the two new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate.
[0010] A hash algorithm is called to operate on the static creative data to generate a unique data digest; the data digest and the unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy are combined to encapsulate a hydrogen energy digital asset certificate, which includes:
[0011] A polynomial hash function is constructed to perform polynomial mapping on the static creative data to obtain an initial feature value, a local sensitive hash algorithm is used to perform multiple mappings on the initial feature value to obtain a feature hash set, a data digest is obtained by weighting calculation of the feature hash set and a preset weight coefficient, and the static creative data includes raw material information, hydrogen production process parameters, and a unique identification code of an initial storage container for uniquely identifying the physical batch;
[0012] Based on the data digest, a zero-knowledge proof circuit is constructed, a verification constraint condition is set in the zero-knowledge proof circuit, a key pair containing a proof key and a verification key is generated, and zero-knowledge proof data is obtained by proof operation of the data digest using the proof key;
[0013] 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 a unique hydrogen energy asset identity code is obtained by reconstructing no less than a preset threshold value of signature components;
[0014] The data digest and the unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy are combined to encapsulate a hydrogen energy digital asset certificate.
[0015] 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 no less than a preset threshold value of signature components is reconstructed to obtain a unique hydrogen energy asset identity code, including:
[0016] A threshold parameter is generated based on a preset total number of participants and a minimum number of signatures, a security coefficient is determined according to the number of bits of the threshold parameter, and a master private key is generated by substituting the security coefficient into a random number generation function;
[0017] The master private key is sharded using a Shamir threshold scheme, 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, the coefficients of the polynomial function are determined by random numbers, and the independent variables of the polynomial function are sequentially set as the participant numbers to calculate the corresponding sub-private keys;
[0018] The sub-private keys are distributed to each participant, and each participant uses the sub-private key received by each participant to perform signature operation on the to-be-signed message to obtain a signature component, and the validity of the signature component is verified;
[0019] Based on the Lagrange interpolation principle, the interpolation coefficients of each signature component are calculated, the interpolation coefficients are normalized to obtain weight coefficients, and the weight coefficients are used to determine the contribution of each signature component in the final signature;
[0020] Select no less than the minimum number of valid signature components from the signature components, and perform weighted summation on the valid signature components and the corresponding weight coefficients to obtain a complete signature;
[0021] The complete signature and timestamp information are concatenated and then subjected to hash operation to obtain a basic code, the basic code and version information are combined, checksum information is calculated, and a hydrogen energy asset identity code is generated.
[0022] A hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on a blockchain network, and according to the transaction terms, searches and matches a supplier holding a hydrogen energy digital asset voucher meeting the conditions, including:
[0023] A multi-level index structure is constructed, each level of the index structure contains feature information of the hydrogen energy procurement smart contract, a cost function value of a retrieval path is calculated based on the multi-level index structure, the retrieval path with the minimum cost function value is selected as the optimal retrieval path, and optimal retrieval path information is generated;
[0024] The hydrogen energy procurement smart contract to be searched is fragmented based on the optimal search path information to obtain a plurality of search fragments, parallel search operations are performed on each search fragment to obtain a search result score value, and search results with a search result score value greater than a preset search threshold are screened to generate a candidate search result set;
[0025] A preset evaluation index weight coefficient is obtained, evaluation score values of each supplier under different evaluation indexes in the candidate search result set are calculated, the evaluation score values corresponding to each evaluation index are weighted and calculated with the corresponding evaluation index weight coefficient to obtain a comprehensive matching degree of each supplier, and the supplier with the maximum comprehensive matching degree is taken as the optimal matching supplier.
[0026] A cost function value of a search path is calculated based on the multi-level index structure, a search path with the minimum cost function value is selected as the optimal search path, and optimal search path information is generated, including:
[0027] The level depth value of the index structure is calculated based on the total number of contracts and a preset branch factor, the total number of contracts is layered based on the level depth value to obtain a node capacity reference value of each level, and the product of the node capacity reference value and a preset redundancy coefficient is determined as the node capacity threshold of each level;
[0028] The contract features in each index node are subjected to cluster analysis, contracts with a feature distance greater than a preset distance threshold are grouped into the same cluster, and the ratio of the number of contracts in the current node to the node capacity threshold is calculated. When the ratio is greater than a preset splitting threshold, a node splitting operation is triggered;
[0029] The number of calculation operations in the search process and a preset operation weight coefficient are obtained to calculate a search calculation cost value, the length of the search path and a preset path weight coefficient are obtained to calculate a path length cost value, and the number of path jumps and a preset jump weight coefficient are obtained to calculate a path jump cost value;
[0030] The search calculation cost value, the path length cost value, and the path jump cost value are added to obtain a total search path cost value, the plurality of search paths are sorted based on the total search path cost value, and the search path with the maximum total search path cost value is taken as the optimal search path.
[0031] An atomized voucher segmentation program is triggered, which will disable the original hydrogen energy digital asset voucher and synchronously generate two new sub-vouchers: one representing the sold-out quantity and transferring its ownership to the demander address, and the other representing the remaining quantity and returning its ownership to the supplier address, and both new sub-vouchers contain a traceability index of the original hydrogen energy digital asset voucher, including:
[0032] Among them, there are two new sub-certificates: one represents the quantity sold and its ownership is transferred to the demander's address, and the other represents the remaining quantity and its ownership is returned to the supplier's address;
[0033] The original hydrogen energy digital asset certificate is subjected to quantity allocation verification, and the quantity value of the original hydrogen energy digital asset certificate is allocated as the sold quantity value and the remaining quantity value; the original hydrogen energy digital asset certificate, block height information and timestamp information are combined into traceability index information;
[0034] The traceability index information, the quantity sold, and the buyer's blockchain address information are hashed to obtain the sales certificate identification information. The sales certificate identification information, the transfer time information, and the buyer's blockchain address information are signed with a private key to obtain the sales certificate ownership proof information. The sales certificate identification information, the quantity sold, the sales certificate ownership proof information, and the traceability index information are packaged to generate a sales sub-certificate.
[0035] The remaining certificate identifier information is obtained by hashing the traceability index information, the remaining quantity value, and the seller's blockchain address information. The remaining certificate identifier information, the transfer time information, and the seller's blockchain address information are signed using the private key to obtain the remaining certificate ownership proof information. The remaining certificate identifier information, the remaining quantity value, the remaining certificate ownership proof information, and the traceability index information are packaged to generate the remaining sub-certificate.
[0036] A second aspect of this invention provides a blockchain-based hydrogen energy trading and traceability management system, comprising:
[0037] The first unit is used to acquire static creation data of a specific physical batch of hydrogen energy; to call a hash algorithm to perform calculations on the static creation data to generate a unique data digest; to combine the data digest with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy and encapsulate them together into a hydrogen energy digital asset certificate; and to publish the hydrogen energy digital asset certificate to the blockchain network.
[0038] The second unit is used by hydrogen energy demanders to deploy a hydrogen energy procurement smart contract containing transaction terms on a blockchain network. According to 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 locking command to temporarily bind the hydrogen energy digital asset certificate to the address of the hydrogen energy procurement smart contract.
[0039] The third unit is configured to execute asset delivery logic according to the hydrogen energy quantity defined in the transaction terms, and the asset delivery logic includes: 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 demand address; if the transaction quantity is less than the total quantity represented by the certificate, an atomized certificate splitting program is triggered, the original hydrogen energy digital asset certificate is disabled, and two new sub-certificates are generated synchronously, and the two new sub-certificates both contain the traceability index of the original hydrogen energy digital asset certificate.
[0040] In a third aspect, an electronic device is provided, and the electronic device includes:
[0041] a processor;
[0042] a memory for storing processor-executable instructions;
[0043] The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0044] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.
[0045] The present application has the following beneficial effects:
[0046] By obtaining the static creation data of a specific physical batch of hydrogen energy and generating a digital asset certificate with uniqueness, the digital mapping of hydrogen energy is realized, the authenticity and non-tamperability of hydrogen energy information are ensured, and a credible data foundation is provided for hydrogen energy transactions.
[0047] With the help of smart contract technology, the automatic matching and execution of the hydrogen energy transaction process are realized, the trust cost and intermediary fee of the transaction parties are reduced, and flexible partial transactions are supported through the atomized certificate splitting program, thereby improving the transaction efficiency and resource utilization rate.
[0048] Based on the distributed storage characteristics of the blockchain, a complete hydrogen energy flow tracing system is constructed, so that the information of the whole process of hydrogen energy from production, storage to transaction can be tracked and verified, the information asymmetry problem in traditional hydrogen energy transactions is effectively solved, and the transparency and standardization level of the hydrogen energy market are improved. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 FIG. 1 is a flowchart of a hydrogen energy transaction and traceability management method based on a blockchain according to an embodiment of the present application;
[0050] Figure 2 FIG. 4 is a flowchart of certificate splitting according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0052] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and some embodiments can not be described again for the same or similar concepts or processes.
[0053] Reference Figure 1 and Figure 2 The hydrogen energy transaction and traceability management method based on the blockchain in the embodiments of the present application comprises:
[0054] Obtaining 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 data digest with uniqueness; combining the data digest with a unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy to jointly encapsulate into a hydrogen energy digital asset certificate; and publishing the hydrogen energy digital asset certificate to a blockchain network.
[0055] A hydrogen energy demander deploys a hydrogen energy purchase smart contract containing transaction terms on the blockchain network, and according to the transaction terms, searches and matches a supplier holding a hydrogen energy digital asset certificate meeting the conditions; the supplier responds to the matching, and calls a locking instruction to temporarily bind the hydrogen energy digital asset certificate with the address of the hydrogen energy purchase smart contract.
[0056] The hydrogen energy purchase smart contract executes 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 address; if the transaction quantity is less than the total quantity represented by the certificate, an atomized certificate splitting program is triggered, which will disable the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both of the two new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate.
[0057] In an optional implementation, calling a hash algorithm to operate on the static creation data to generate a data digest with uniqueness; combining the data digest with a unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy to jointly encapsulate into a hydrogen energy digital asset certificate comprises:
[0058] A polynomial hash function is constructed to perform polynomial mapping on the static creative data to obtain initial feature values, a local sensitive hashing algorithm is used to perform multiple mapping on the initial feature values to obtain a feature hash set, and the feature hash set is weighted calculated with a preset weight coefficient to obtain a data digest, the static creative data includes raw material information for uniquely identifying the physical batch, hydrogen production process parameters, and a unique identification code of an initial storage container;
[0059] Based on the data digest, a zero-knowledge proof circuit is constructed, a verification constraint condition is set in the zero-knowledge proof circuit, a key pair containing a proof key and a verification key is generated, and the data digest is proof operated by using the proof key to obtain zero-knowledge proof data;
[0060] The zero-knowledge proof data is divided into multiple data fragments according to a preset fragmentation rule, threshold signature calculation is performed on the multiple data fragments to obtain multiple signature components, and the unique hydrogen energy asset identity code is reconstructed by using not less than a preset threshold value of signature components;
[0061] The data digest and the unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy are combined and encapsulated into a hydrogen energy digital asset voucher.
[0062] The present application provides a kind of hydrogen energy digital asset voucher generation method, by calling hash algorithm to the static creative data is operated, generate the data digest with uniqueness, and this summary and for the physical batch of hydrogen energy allocation unique hydrogen energy asset identity code are combined, and encapsulated into hydrogen energy digital asset voucher.
[0063] In one embodiment, the system first collects the static creative data of the physical batch of hydrogen energy, including 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", electrolytic cell working parameters "current density 350 mA / cm², temperature 65 ℃, pressure 3 MPa", hydrogen purity "99.999%", batch yield "500 kg" and other key information. These static creative data as the "birth certificate" of hydrogen energy, ensure the uniqueness and tamper resistance of data.
[0064] The system constructs a polynomial hash function to perform polynomial mapping on the static creative data. Specifically, using the Rabin fingerprint algorithm as the polynomial hash function, the input static creative data is regarded as the coefficient to construct a polynomial. For example, for the production batch number "HY20230501-001", the system takes its ASCII code value sequence as the polynomial coefficient, and obtains the polynomial mapping value through modulo 256 operation. For all collected static creative data, the system respectively calculates a set of initial feature value sets {79863, 54291, 86420, 12975, 43680, 92501}.
[0065] Subsequently, the system adopts the local sensitive hashing algorithm to perform multiple mapping on the initial feature values. Using the SimHash algorithm, each initial feature value is converted into a 64-bit binary sequence, and these sequences are weighted and combined to obtain a feature hash set {0xf72a58c91b643de9, 0x8e5d73a6c419f026, 0x2b97c38d45e61fa0}. Local sensitive hashing ensures that similar initial feature values are mapped to similar hash spaces, improving the system's anti-interference ability.
[0066] The system performs weighted calculation on the feature hash set according to the preset weight coefficients {0.35, 0.25, 0.40}, multiplies the three feature hash values by the corresponding weight, and then combines them through bitwise XOR operation to finally obtain the data digest 0xd47b91e5a3c82df7. The setting of the weight coefficient reflects the importance of different feature hashes in the overall digest, which can be adjusted according to business needs.
[0067] Based on the data digest, a zero-knowledge proof circuit is constructed, and the circuit structure is designed using the Groth16 protocol. The data digest 0xd47b91e5a3c82df7 is taken as the private input of the circuit, and the verification constraint condition is set: the digest value must be generated by the specified algorithm from the legal static creative data. The system generates a key pair containing a proof key and a verification key, the proof key is used to generate a proof, and the verification key is used to verify the validity of the proof. Using the proof key, the data digest is subjected to proof operation to generate zero-knowledge proof data, containing proof elements π={πA, πB, πC}, where πA, πB, πC are points on the curve, representing a specific mathematical relationship, so that the verifier can verify the legality of the data digest without knowing the original static creative data.
[0068] The system divides the zero-knowledge proof data into multiple data shards according to a preset sharding rule. The zero-knowledge proof data π={πA, πB, πC} is divided into five data shards {s1, s2, s3, s4, s5} using a (3, 5) threshold scheme, where any three shards can reconstruct the complete zero-knowledge proof data. Threshold signature calculation is performed on the five data shards, and signature components {sig1, sig2, sig3, sig4, sig5} are generated using the elliptic curve digital signature algorithm.
[0069] When it is necessary to reconstruct the hydrogen energy asset identity code, the system collects no less than the preset threshold value (3 in this example) of signature components, such as {sig1, sig3, sig5}, and reconstructs the complete signature by Lagrange interpolation to obtain the unique hydrogen energy asset identity code "HID-0xfe73a92bc6d481e5". This threshold signature mechanism improves the security and fault tolerance of the system, and even if part of the signature components are lost or damaged, the complete asset identity code can still be recovered.
[0070] The system combines the data digest 0xd47b91e5a3c82df7 with the unique hydrogen energy asset identity code "HID-0xfe73a92bc6d481e5", and encapsulates it according to the predefined data structure format to generate a hydrogen digital asset voucher. The voucher is stored in JSON format, containing 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 voucher is recorded in the distributed ledger for hydrogen trading, tracing, and supervision.
[0071] Through the above technical implementation, the present application realizes the digital mapping of physical batch hydrogen energy, ensures the uniqueness, security, and verifiability of hydrogen digital assets, and provides technical support for the transaction, circulation, and supervision of hydrogen energy in the whole life cycle.
[0072] 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 no less than a preset threshold value of signature components is reconstructed to obtain a unique hydrogen energy asset identity code, comprising:
[0073] Generate threshold parameters based on the preset total number of participants and the minimum number of signatures, determine a security coefficient according to the number of bits of the threshold parameters, and substitute the security coefficient into a random number generation function to generate a master private key;
[0074] The main private key is fragmented by using a Shamir threshold scheme, a polynomial function containing the main private key is constructed, the order of the polynomial function is set based on the minimum number of signatures, the coefficients of the polynomial function are determined by random numbers, and the independent variables of the polynomial function are sequentially set as the numbers of the participants to obtain corresponding sub-private keys through calculation;
[0075] The sub-private keys are distributed to each participant respectively, each participant performs signature operation on the to-be-signed message by using the received sub-private key to obtain a signature component, and validity verification is performed on the signature component;
[0076] The interpolation coefficients of each signature component are calculated based on the Lagrange interpolation principle, the interpolation coefficients are normalized to obtain weight coefficients, and the weight coefficients are used to determine the contribution degree of each signature component in the final signature;
[0077] The effective signature components are selected from the signature components, and the effective signature components and the corresponding weight coefficients are weighted and summed to obtain a complete signature;
[0078] The complete signature and timestamp information are concatenated and then subjected to hash operation to obtain a basic code, the basic code and version information are combined, checksum information is calculated, and then a hydrogen energy asset identity code is generated.
[0079] The application provides a hydrogen energy asset identity coding method based on zero-knowledge proof, which ensures the security and credibility of the hydrogen energy asset identity through threshold signature technology. The specific implementation process is as follows:
[0080] When performing zero-knowledge proof data processing, the system first sets the total number of participants as n and the minimum number of signatures as t according to business requirements, for example, n=5 and t=3, which means that there are a total of 5 participants, and at least 3 participants' signatures are required to complete the identity code generation. The system generates threshold parameters (t, n) based on the two parameters, i.e., (3, 5), determines the security coefficient λ as the number of bits of the threshold parameters, for example, 256 bits. Substitute the security coefficient into the random number generation function PRNG(λ) to generate the main private key s, which can be a 256-bit random large integer, for example, the value is "8a7b6c5d4e3f2g1h" (hexadecimal representation).
[0081] The system adopts a Shamir threshold scheme to slice the master private key. A polynomial function f(x) containing the master private key is constructed, and the order of the function is t-1, i.e., a 2-order polynomial. The function is 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 independent variable x of the polynomial function to the participant number i (i from 1 to n) in turn, and calculates the corresponding sub-private key si = f(i). For example, for participant 1, the sub-private key s1 = f(1); for participant 2, the sub-private key s2 = f(2), and so on.
[0082] The system distributes the sub-private keys to each participant through a secure channel. After receiving the sub-private keys, each participant signs the message to be signed (such as the hash value of the zero-knowledge proof data) to obtain their own signature component. Each participant uses its sub-private key si to perform the signature algorithm Sign(si, m) on the message to be signed m to generate the signature component σi. For example, participant 1 generates the signature component σ1 = Sign(s1, m). Each participant also needs to verify the effectiveness of the signature component generated by themselves to ensure that the signature result meets the expected rules.
[0083] When the system collects the signature components, it calculates the interpolation coefficients of each signature component based on the Lagrange interpolation principle. For each participant j, the calculation of its interpolation coefficient λj involves the numbers of all participants who participate in signing. After the interpolation coefficient is calculated, the system normalizes it to obtain the weight coefficient wj, which is used to determine the contribution of each signature component in the final signature. For example, if the signature components of participants 1, 3, and 4 are collected, the corresponding weight coefficients w1, w3, and w4 are calculated, which satisfy w1 + w3 + w4 = 1.
[0084] The system selects no less than t valid signature components from the set of signature components, for example, the valid signature components σ1, σ3, and σ4 of 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 using the master private key s, but in the actual process, the master private key s is not completely reconstructed.
[0085] The system performs a hash operation on the complete signature σ concatenated with the current timestamp information ts to obtain the base encoding code = Hash(σ||ts). For example, the timestamp is "2023-06-15T08:30:45Z", which is concatenated with the complete signature and then subjected to SHA-256 hash operation to obtain a 256-bit base encoding "9e8d7c6b5a4f3e2d" (simplified representation). The system combines the base encoding with the version information ver (e.g., "01") to generate the intermediate encoding "01_9e8d7c6b5a4f3e2d". The system calculates the checksum information check on the intermediate encoding, for example, using the CRC32 algorithm to obtain "a1b2c3d4", and finally encapsulates the version information, base encoding, and checksum information to generate the final hydrogen energy asset identity encoding "01_9e8d7c6b5a4f3e2d_a1b2c3d4".
[0086] The above implementation process fully utilizes the security features of threshold signature technology, ensuring the non-forgery and verifiability of the hydrogen energy asset identity encoding. In actual application, the number of participants and the minimum number of signatures can be adjusted according to security requirements to provide flexible security level configuration. The entire process does not require centralized storage of the master private key, effectively avoiding single point failure risk, while the introduction of timestamp and checksum further enhances the uniqueness and integrity checking capability of the identity encoding. The fragmentation processing of zero-knowledge proof data and the threshold signature reconstruction mechanism enable efficient identity verification and transaction confirmation of hydrogen energy assets while ensuring privacy.
[0087] In an optional implementation, the hydrogen energy demand side deploys a hydrogen energy procurement smart contract containing transaction terms on the blockchain network, and according to the transaction terms, retrieves and matches the supply side holding the hydrogen energy digital asset certificate that meets the conditions, including:
[0088] A multi-level index structure is constructed, each level of the index structure containing feature information of the hydrogen energy procurement smart contract, a cost function value of the retrieval path is calculated based on the multi-level index structure, the retrieval path with the minimum cost function value is selected as the optimal retrieval path, and optimal retrieval path information is generated;
[0089] Based on the optimal retrieval path information, the hydrogen energy procurement smart contract to be retrieved is subjected to fragmentation processing to obtain a plurality of retrieval fragments, parallel retrieval operations are performed on each retrieval fragment to obtain retrieval result score values, and retrieval results with retrieval result score values greater than a preset retrieval threshold are filtered to generate a candidate retrieval result set;
[0090] The preset evaluation index weight coefficient is acquired, evaluation score values of each supplier in the candidate search result set under different evaluation indexes are calculated, the evaluation score values corresponding to each evaluation index are weighted and calculated to obtain a comprehensive matching degree of each supplier, and the supplier with the maximum comprehensive matching degree is taken as the optimal matching supplier.
[0091] In one embodiment, the hydrogen energy transaction matching system implements intelligent matching of demand parties and supply parties through a blockchain network. The system first allows demand parties to deploy hydrogen energy procurement smart contracts containing transaction terms on the blockchain network, and then automatically retrieves and matches supply parties holding hydrogen energy digital asset certificates that meet the conditions based on these transaction terms.
[0092] The system constructs a multi-level index structure to improve retrieval efficiency. The index structure includes three main levels: the first level is a hydrogen purity index, which divides hydrogen energy procurement smart contracts into three categories according to purity requirements: "more than 99.9%", "99.5%-99.9%" and "99.0%-99.5%"; the second level is a hydrogen production index, which divides the contracts into three intervals according to daily production requirements: "less than 100 kg", "100-500 kg" and "more than 500 kg"; the third level is a delivery time index, which divides the contracts into three time periods according to the delivery period: "within 24 hours", "1-3 days" and "more than 3 days". Each smart contract has a corresponding position in each index, forming a complete index path.
[0093] The system calculates the cost function value of the retrieval path based on the multi-level index structure. The cost function considers three factors: retrieval path length, index hit rate and computing resource consumption. The retrieval path length refers to the number of levels passed from the index root node to the target node; the index hit rate reflects the probability that a certain retrieval path can find a contract that meets the conditions; the computing resource consumption represents the computing power required to execute the retrieval path. In practical applications, the system calculates three possible retrieval paths for a hydrogen energy procurement smart contract (purity requirement 99.95%, daily production 300 kg, delivery within 48 hours): path A (purity first, then production, and finally time) has a cost of 12.3; path B (production first, then purity, and finally time) has a cost of 15.7; path C (time first, then purity, and finally production) has a cost of 18.2. The system selects the path with the smallest cost, path A, as the optimal retrieval path and generates retrieval path information containing the retrieval order and index category.
[0094] The system performs sharding on the hydrogen energy procurement smart contract to be searched according to the optimal search path information. Sharding divides a complete search task into multiple sub-tasks to achieve parallel search. For the example contract, the system divides the search task into three search shards according to path A: shard 1 is responsible for searching for hydrogen energy supply with purity of "99.9% or above"; shard 2 is responsible for searching for supply with daily output of "100kg-500kg"; and shard 3 is responsible for searching for supply with delivery time of "1-3 days".
[0095] The system performs parallel search operations on each search shard. For each search shard, the system calculates the matching degree of the search result with the target requirement to obtain a search result score value. For example, supplier X provides hydrogen energy with purity of 99.97%, a search score of 0.95; daily output of 350kg, a search score of 0.88; and delivery time of 36 hours, a search score of 0.92. The average of each score is 0.917, which is higher than the preset search threshold 0.85, so supplier X is included in the candidate search result set. Through similar calculations, the system finally filters out 5 suppliers as candidate search results.
[0096] The system obtains preset evaluation index weight coefficients for comprehensive evaluation of the suppliers. The evaluation indexes include price reasonableness (weight 0.4), historical delivery reliability (weight 0.3), capacity stability (weight 0.2), and user evaluation (weight 0.1). The system calculates the evaluation score value of each supplier in the candidate search result set under different evaluation indexes. For example, for supplier X, the price reasonableness score is 85 points (5% lower than the market average per kilogram), the historical delivery reliability score is 92 points (28 times on time delivery in the past 30 transactions), the capacity stability score is 78 points (capacity fluctuation within 10% in the past three months), and the user evaluation score is 88 points (comprehensive score 4.4 / 5).
[0097] The system performs weighted calculation on the evaluation score value corresponding to each evaluation index and the evaluation index weight coefficient. The comprehensive matching degree of supplier X is calculated as: 85x0.4 + 92x0.3 + 78x0.2 + 88x0.1 = 85.9. The system also calculates the comprehensive matching degrees of other suppliers: 82.7 for supplier Y, 87.3 for supplier Z, 79.5 for supplier W, and 83.2 for supplier V.
[0098] The system selects the optimal matching supplier from the supplier with the largest comprehensive matching degree. In this example, supplier Z becomes the optimal matching supplier with a comprehensive matching degree of 87.3. The system automatically recommends supplier Z to the demand side and provides matching reasons and detailed evaluation reports. The demand side can view the evaluation results and confirm whether to enter into a transaction with the supplier. If the transaction is confirmed, the system automatically triggers the smart contract to execute, records the transaction content and generates an unalterable transaction proof on the blockchain, completing the smart matching transaction process of hydrogen energy.
[0099] In an optional implementation, a cost function value of a retrieval path is calculated based on the multi-level index structure, an optimal retrieval path is selected as a retrieval path with a minimum cost function value, and the optimal retrieval path information is generated, including:
[0100] A level depth value of the index structure is calculated based on the total number of contracts and a preset branch factor, the total number of contracts is processed in layers according to the level depth value to obtain a node capacity reference value of each level, and a product of the node capacity reference value and a preset redundancy coefficient is determined as a node capacity threshold of each level;
[0101] The feature distance of each index node is clustered and analyzed, and contracts with a feature distance greater than a preset distance threshold are classified into the same cluster, a ratio of the number of contracts in the current node to the node capacity threshold is calculated, and a node splitting operation is triggered when the ratio is greater than a preset splitting threshold;
[0102] The number of calculation operations in the retrieval process and a preset operation weight coefficient are obtained, and a retrieval calculation cost value is calculated; the length of the retrieval path and a preset path weight coefficient are obtained, and a path length cost value is calculated; the number of path jumps and a preset jump weight coefficient are obtained, and a path jump cost value is calculated;
[0103] The retrieval calculation cost value, the path length cost value, and the path jump cost value are added to obtain a total retrieval path cost value, the multiple retrieval paths are sorted based on the total retrieval path cost value, and a retrieval path with a maximum total retrieval path cost value is selected as an optimal retrieval path.
[0104] In practical applications, the present application provides a method for calculating a retrieval path cost function value based on a multi-level index structure and selecting an optimal retrieval path. The method first constructs a multi-level index structure, then calculates the cost function values of different retrieval paths, and selects a path with a minimum cost as an optimal retrieval path.
[0105] In the construction process of the multi-level index structure, the level depth value of the index structure needs to be calculated based on the total number of contracts and the preset branch factor. Assuming that there are 10,000 contract documents in the system and the preset branch factor is 10, the level depth value can be obtained by logarithmic operation. According to the calculated level depth value, the total number of contracts is layered to obtain the node capacity reference value of each level. In the above example, the first layer node capacity reference value is 1, the second layer is 10, the third layer is 100, and the fourth layer is 1000. If the preset redundancy coefficient is 1.2, the node capacity threshold of each level is 1.2, 12, 120 and 1200 respectively.
[0106] When clustering analysis is performed on the contract features in each index node, the feature distance calculation method is used to evaluate 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 value between the two vectors is 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 splitting operation is triggered. Assuming that a third layer node contains 100 contracts, the node capacity threshold is 120, and the ratio is 0.83, if the preset split threshold is 0.8, node splitting is required, and the contracts in the node are distributed to multiple child nodes according to the clustering results.
[0107] In 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 value. 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 value is 50x1+30x2+10x3=140. At the same time, the system obtains the retrieval path length and the preset path weight coefficient, and calculates the path length cost value. For example, if the retrieval path length is 4 and the preset path weight coefficient is 10, the path length cost value is 4x10=40. In addition, the system also obtains the path jump frequency and the preset jump weight coefficient, and calculates the path jump cost value. If there are 2 cross-node jumps in the retrieval process, and the preset jump weight coefficient is 15, the path jump cost value is 2x15=30.
[0108] The search path total value is obtained by adding the search calculation value, the path length value and the path jump value. In the above example, the total value is 140+40+30=210. Based on the search path total value, the system sorts the multiple possible search paths. For example, the system generates three possible search paths, and the total values of the three paths are 210, 185 and 230 respectively. Then, the paths are sorted in ascending order of the total value, that is, 185, 210, 230. The search path with the smallest total value (the path with the value of 185) is determined as the optimal search path.
[0109] In actual application scenarios, the relationship between search efficiency and system resource consumption can be balanced by adjusting the preset operation weight coefficient, the path weight coefficient and the jump weight coefficient. For example, in a resource-limited environment, the operation weight coefficient can be increased so that the system is more inclined to select a search path with small calculation amount; in a scenario with high requirements for response time, the path weight coefficient can be increased so that the system preferentially selects a search path with short path.
[0110] By establishing a multi-level index structure and selecting an optimal search path, the present embodiment can significantly improve the contract search efficiency. Experimental data show that, compared with the traditional linear search method, the average search time can be reduced from 300 milliseconds to 50 milliseconds by using the present method, and the search efficiency is improved by about 83%. At the same time, by dynamically adjusting the node capacity threshold and the split threshold, the system can adapt to different sizes of contract library and maintain good search performance. When the total number of contracts increases from 10,000 to 100,000, the search time only increases by about 20%, showing good scalability.
[0111] The method can also adaptively optimize the index structure according to the actual search mode. When the system detects that a certain type of contract is frequently searched, the positions of related nodes in the index structure are adjusted, so that the search paths of these hot contracts are shorter. Experiments show that for the top 10% of contracts with the highest access frequency, the average search time can be further reduced to 30 milliseconds, which is about 40% faster than the search of ordinary contracts, effectively improving the overall performance of the system and the user experience.
[0112] In an alternative embodiment, a credential segmentation procedure is triggered to atomize, which will disable the original hydrogen energy digital asset credential and synchronously generate two new sub-credentials: one representing the sold-out quantity and transferring its ownership to the demander address, and the other representing the remaining quantity and returning its ownership to the supplier address, and both of the two new sub-credentials contain a traceability index of the original hydrogen energy digital asset credential including:
[0113] Among them, the two new sub-credentials: one represents the sold-out quantity and transfers its ownership to the demander address, and the other represents the remaining quantity and returns its ownership to the supplier address;
[0114] The quantity allocation verification is performed on the original hydrogen energy digital asset certificate, and the quantity value of the original hydrogen energy digital asset certificate is allocated as a sold quantity value and a remaining quantity value; the original hydrogen energy digital asset certificate, block height information and timestamp information are combined into traceability index information;
[0115] The traceability index information, the sold quantity value and the buyer blockchain address information are subjected to hash calculation to obtain sold certificate identification information, the sold certificate identification information, the transfer time information and the buyer blockchain address information are signed by using a private key to obtain sold certificate ownership proof information, and the sold certificate identification information, the sold quantity value, the sold certificate ownership proof information and the traceability index information are packaged to generate a sold sub-certificate;
[0116] The traceability index information, the remaining quantity value and the seller blockchain address information are subjected to hash calculation to obtain remaining certificate identification information, the remaining certificate identification information, the transfer time information and the seller blockchain address information are signed by using the private key to obtain remaining certificate ownership proof information, and the remaining certificate identification information, the remaining quantity value, the remaining certificate ownership proof information and the traceability index information are packaged to generate a remaining sub-certificate.
[0117] In the embodiment, when a hydrogen energy digital asset transaction needs to be partially transferred, the system triggers an atomized certificate splitting program. The program first performs quantity allocation verification on the original hydrogen energy digital asset certificate to ensure that the sum of the sold quantity and the remaining quantity is equal to the total quantity of the original certificate. For example, for an original certificate representing 100 kg of hydrogen energy, if the transaction demand is 60 kg, the system will verify that the sum of 60 kg (sold quantity) and 40 kg (remaining quantity) is indeed equal to 100 kg (original quantity).
[0118] After the quantity verification is passed, the system collects the block height information and the timestamp information accurate to milliseconds of the current blockchain network. Assuming that the current block height is 8246372 and the timestamp is 1678523648215 (corresponding to March 11, 2023, 14:27:28, 215 milliseconds), the system combines these information with the unique identifier of the original certificate (such as "H2-CERT-202303-0015") to form traceability index information: "H2-CERT-202303-0015-8246372-1678523648215".
[0119] The system then begins to generate the sold sub-certificate, first connects the traceability index information, the sold quantity value (60 kg), and the buyer's blockchain address information (such as "0x7Ab123...def456") to perform SHA-256 hash calculation, obtaining the sold certificate identification information, such as "0x8a721c6...e9b54f2". The system uses a private key (usually a private key held by the platform or the seller) to perform an elliptic curve digital signature algorithm (ECDSA) signature on the identification information, the transfer time information (also accurate to milliseconds, such as 1678523648500), and the buyer's blockchain address information, generating the sold certificate ownership proof information, such as "0x3a9b7c...d12e5f". The system then packages the sold certificate identification information, the sold quantity value (60 kg), the sold certificate ownership proof information, and the traceability index information to generate the complete sold sub-certificate data structure.
[0120] At the same time, the system generates the remaining sub-certificate, using a similar process, connecting the traceability index information, the remaining quantity value (40 kg), and the seller's blockchain address information (such as "0x5Fc789...abc123") to perform SHA-256 hash calculation, obtaining the remaining certificate identification information, such as "0x2d8e9f...c7a3b6". The system uses the same private key to perform an ECDSA signature on the identification information, the transfer time information, and the seller's blockchain address information, generating the remaining certificate ownership proof information, such as "0x6f5d4c...e9a8b7". The system then packages the remaining certificate identification information, the remaining quantity value (40 kg), the remaining certificate ownership proof information, and the traceability index information to generate the complete remaining sub-certificate data structure.
[0121] After the generation of the two sub-certificates, the system performs an atomic transaction operation on the blockchain, which includes three key actions: disabling 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. These three actions are ensured by the smart contract to be either all successfully executed or all failed to roll back, avoiding partial execution.
[0122] In practical applications, the system will store the complete information of the sub-certificate on the blockchain, including quantity, ownership proof, traceability index, etc., and also save more detailed transaction records in the off-chain database for query. For example, for the sold 60 kg of hydrogen energy, the system will record its production location, production time, purity, carbon intensity, and other additional attributes, which are inherited from the original certificate.
[0123] By tracing the index information, anyone can track the relationship between the sub-certificate and the original certificate, and verify the complete life cycle of the hydrogen digital asset. For example, to verify the authenticity of the sold sub-certificate, the original certificate can be found by tracing the index, confirming that the sub-certificate is indeed split from a valid original certificate, and the quantity verification is correct.
[0124] In addition, when the system detects that the original certificate is completely split (the sale quantity is equal to the original quantity, and the remaining quantity is zero), it will automatically mark the original certificate as "fully transferred" to prevent reuse. If the original certificate is only partially transferred, the remaining sub-certificate can continue to participate in subsequent transactions, also following the splitting rules.
[0125] Throughout the 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 safety, transparency, and traceability of hydrogen digital asset transactions. This splitting mechanism greatly improves the liquidity of hydrogen digital assets, enabling hydrogen to be traded on demand and meeting the diverse needs of the market.
[0126] The blockchain-based hydrogen transaction and traceability management system according to an embodiment of the present invention comprises:
[0127] The first unit is configured to obtain static creation data of a specific physical batch of hydrogen energy, call a hash algorithm to operate on the static creation data, generate a data digest with unique identity, combine the data digest with a unique hydrogen asset identity code allocated for the physical batch of hydrogen energy, and jointly encapsulate into a hydrogen digital asset certificate, and publish the hydrogen digital asset certificate to a blockchain network.
[0128] The second unit is configured to deploy a hydrogen purchase smart contract containing transaction terms on the blockchain network by a hydrogen energy demand side, retrieve and match a supply side holding a hydrogen digital asset certificate meeting the conditions according to the transaction terms, and call a locking instruction by the supply side in response to the matching to temporarily bind the hydrogen digital asset certificate with the address of the hydrogen purchase smart contract.
[0129] The third unit is configured to execute asset delivery logic according to the hydrogen energy quantity defined in the transaction terms by the hydrogen purchase smart contract: if the transaction quantity is equal to the total quantity represented by the certificate, the ownership of the hydrogen digital asset certificate is directly transferred to the demand side address; if the transaction quantity is less than the total quantity represented by the certificate, an atomic certificate splitting program is triggered, which disables the original hydrogen digital asset certificate and synchronously generates two new sub-certificates, and both new sub-certificates contain the traceability index of the original hydrogen digital asset certificate.
[0130] The third aspect of the embodiment of the present invention,
[0131] An electronic device is provided, comprising:
[0132] a processor;
[0133] a memory for storing processor-executable instructions;
[0134] wherein the processor is configured to invoke the instructions stored by the memory to perform the method as described above.
[0135] A fourth aspect of the embodiments of the present application,
[0136] A computer readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method as described above.
[0137] The present application can be a method, an apparatus, a system, and / or a computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions stored therein, the computer readable program instructions being executable by a computer processor to perform aspects of the present application.
[0138] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A blockchain-based hydrogen energy transaction and traceability management method, characterized in that, The application comprises the following steps: acquiring static creation data of a specific physical batch of hydrogen energy; applying a hash algorithm to the static creation data to generate a data digest with uniqueness; combining the data digest with a unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy to jointly encapsulate a hydrogen energy digital asset certificate, which comprises: constructing a polynomial hash function to perform polynomial mapping on the static creation data to obtain an initial characteristic value, using a local sensitive hash algorithm to perform multiple mappings on the initial characteristic value to obtain a characteristic hash set, and performing weighted calculation on the characteristic hash set and a preset weight coefficient to obtain a data digest; the static creation data includes raw material information, hydrogen production process parameters, and a unique identification code of the initial storage container for uniquely identifying the physical batch; based on the data digest, constructing a zero-knowledge proof circuit, setting verification constraints in the zero-knowledge proof circuit, generating a key pair containing a proof key and a verification key, and performing proof operation on the data digest using the proof key to obtain zero-knowledge proof data; 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 the unique hydrogen energy asset identity code from no less than a preset threshold value of signature components; combining the data digest with the unique hydrogen energy asset identity code assigned to the physical batch of hydrogen energy to jointly encapsulate a hydrogen energy digital asset certificate; publishing the hydrogen energy digital asset certificate to a blockchain network; a hydrogen energy demander deploys a hydrogen energy purchase smart contract containing transaction terms on the blockchain network, retrieves and matches a supplier holding a hydrogen energy digital asset certificate meeting the conditions according to the transaction terms; the supplier responds to the matching and calls the locking instruction to temporarily bind the hydrogen energy digital asset certificate with the address of the hydrogen energy purchase smart contract; the hydrogen energy purchase smart contract executes 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 address; if the transaction quantity is less than the total quantity represented by the certificate, an atomized certificate splitting program is triggered, which disables the original hydrogen energy digital asset certificate and synchronously generates two new sub-certificates, and both of the two new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate.
2. The method of claim 1, wherein, 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 the unique hydrogen energy asset identity code from no less than a preset threshold value of signature components comprises: generating a threshold parameter based on a preset total number of participants and a minimum number of signatures, determining a security coefficient according to the number of bits of the threshold parameter, and substituting the security coefficient into a random number generation function to generate a master private key; The main private key is fragmented by using a Shamir threshold scheme, a polynomial function containing the main private key is constructed, an order of the polynomial function is set based on the minimum signature quantity, coefficients of the polynomial function are determined by random numbers, and independent variables of the polynomial function are sequentially set as participant numbers to obtain corresponding sub-private keys through calculation; The sub-private keys are respectively distributed to each participant, each participant performs signature operation on the to-be-signed message by using the received sub-private key to obtain a signature component, and validity of the signature component is verified; Based on the Lagrange interpolation principle, interpolation coefficients of each signature component are calculated, and the interpolation coefficients are normalized to obtain weight coefficients, which are used to determine contribution degrees of each signature component in a final signature; At least the minimum signature quantity of effective signature components are selected from the signature components, the effective signature components and corresponding weight coefficients are weighted and summed to obtain a complete signature; After the complete signature and timestamp information are concatenated, a hash operation is performed to obtain a basic code, the basic code and version information are combined, checksum information is calculated, and a hydrogen energy asset identity code is generated.
3. The method of claim 1, wherein, A hydrogen energy demander deploys a hydrogen energy procurement smart contract containing transaction terms on a blockchain network, and according to the transaction terms, searches and matches a supplier holding a hydrogen energy digital asset certificate meeting the conditions, including: A multi-level index structure is constructed, each level index structure contains feature information of the hydrogen energy procurement smart contract, a cost function value of a retrieval path is calculated based on the multi-level index structure, a retrieval path with the minimum cost function value is selected as an optimal retrieval path, and optimal retrieval path information is generated; Based on the optimal retrieval path information, a plurality of retrieval fragments are obtained by fragmenting the to-be-retrieved hydrogen energy procurement smart contract, a retrieval result score value is obtained by performing parallel retrieval operation on each retrieval fragment, and a candidate retrieval result set is generated by screening retrieval results with a retrieval result score value greater than a preset retrieval threshold; A preset evaluation index weight coefficient is obtained, evaluation score values of each supplier under different evaluation indexes in the candidate retrieval result set are calculated, a comprehensive matching degree of each supplier is calculated by weighting the evaluation score value corresponding to each evaluation index and the evaluation index weight coefficient corresponding to the evaluation index, and a supplier with the maximum comprehensive matching degree is selected as an optimal matching supplier.
4. The method of claim 3, wherein, The cost function value of the retrieval path is calculated based on the multi-level index structure, the retrieval path with the minimum cost function value is selected as the optimal retrieval path, and the optimal retrieval path information is generated, including: The level depth value of the index structure is calculated based on the total number of contracts and a preset branch factor, the total number of contracts is processed in layers according to the level depth value to obtain a node capacity reference value of each level, and the product of the node capacity reference value and a preset redundancy coefficient is determined as the node capacity threshold of each level; The contracts in each index node are clustered and analyzed, the contracts with a feature distance greater than a preset distance threshold are classified into the same cluster, and the ratio of the number of contracts in the current node to the node capacity threshold is calculated. When the ratio is greater than a preset splitting threshold, a node splitting operation is triggered. The number of computing operations in the retrieval process and the preset operation weight coefficient are obtained, and the retrieval computing cost value is calculated; the path length and the preset path weight coefficient are obtained, and the path length cost value is calculated; the path jump number and the preset jump weight coefficient are obtained, and the path jump cost value is calculated; The retrieval path total cost value is obtained by adding the retrieval computing cost value, the path length cost value and the path jump cost value, and the plurality of retrieval paths are sorted based on the retrieval path total cost value; the retrieval path with the maximum retrieval path total cost value is taken as the optimal retrieval path.
5. The method of claim 1, wherein, Trigger the atomized certificate segmentation program, which will disable the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both of the two new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate Comprise: Among them, two new sub-certificates: one represents the quantity sold and transfers its ownership to the demand side address, and the other represents the remaining quantity and returns its ownership to the supply side 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 as 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; Hash calculation is performed on the traceability index information, the sold quantity value and the buyer blockchain address information to obtain sold certificate identification information, and signature is performed on the sold certificate identification information, the transfer time information and the buyer blockchain address information using a private key to obtain sold certificate ownership proof information. The sold certificate identification information, the sold quantity value, the sold certificate ownership proof information and the traceability index information are packaged to generate a sold sub-certificate; Hash calculation is performed on the traceability index information, the remaining quantity value and the seller blockchain address information to obtain remaining certificate identification information, and signature is performed on the remaining certificate identification information, the transfer time information and the seller blockchain address information using the private key to obtain remaining certificate ownership proof information. The remaining certificate identification information, the remaining quantity value, the remaining certificate ownership proof information and the traceability index information are packaged to generate a remaining sub-certificate.
6. A blockchain-based hydrogen energy transaction and traceability management system for implementing the method of any one of claims 1-5, characterized in that, Comprise: The first unit is used for obtaining static creation data of a specific physical batch of hydrogen energy; a hash algorithm is called to operate on the static creation data to generate a data digest with uniqueness; the data digest and the unique hydrogen energy asset identity code allocated for the physical batch of hydrogen energy are combined together to encapsulate into a hydrogen energy digital asset certificate; and the hydrogen energy digital asset certificate is published to a blockchain network; The second unit is used for a hydrogen energy demand side to deploy a hydrogen energy purchase smart contract containing transaction terms on the blockchain network, and according to the transaction terms, to retrieve and match a supply side holding a hydrogen energy digital asset certificate meeting the conditions; the supply side responds to the matching, calls a locking instruction, and temporarily binds the hydrogen energy digital asset certificate with the address of the hydrogen energy purchase smart contract; A third unit configured to execute asset delivery logic according to the hydrogen energy quantity defined in the transaction terms in the hydrogen energy procurement smart contract: 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 demand side address; if the transaction quantity is less than the total quantity represented by the certificate, an atomized certificate splitting program is triggered, which will disable the original hydrogen energy digital asset certificate and synchronously generate two new sub-certificates, and both new sub-certificates contain the traceability index of the original hydrogen energy digital asset certificate.
7. An electronic device, comprising: Comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Digital commodity transaction method and device based on block chain
CN112883109A
Blockchain-based renewable energy power excess consumption voucher transaction method
CN113222594A
Digital right encryption management method and system based on block chain
CN119557854A