Traditional Chinese medicine whole-chain informatization traceability management method and system
By generating a shared RSA common modulus N and a dynamic delay parameter T, and combining a certificateless threshold signature algorithm with erasure coding segmentation, the high energy consumption and centralization risks of the traditional Chinese medicine traceability system are solved, achieving efficient and secure full-chain traceability management.
Patent Information
- Application Number
- CN202511165647.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-08-20
AI Technical Summary
Existing traceability systems for traditional Chinese medicine suffer from high energy consumption, centralization risks, vulnerability to attacks, insufficient security, and high communication overhead, making it difficult to achieve efficient and secure full-chain traceability management.
A shared RSA common modulus N is generated by adopting an anti-collusion multi-party computation protocol. The dynamic delay parameter T is calculated by combining a nonlinear mapping function. A verifiable delay function and a certificateless threshold signature algorithm are used. The proof is split by erasure coding and signed on multiple regulatory consensus nodes to generate and record the block signature.
It reduces reliance on trusted settings, improves the fairness of leader election and system security, reduces communication and storage burden, and enhances the efficiency and security of the entire chain of traceability management for traditional Chinese medicine.
Smart Images

Figure CN120707174A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of traceability, and in particular relates to a method and system for information-based traceability management of the entire chain of traditional Chinese medicine. Background Art
[0002] The Traditional Chinese Medicine (TCM) industry chain is long and complex, encompassing numerous links, from the cultivation, harvesting, and processing of medicinal materials to the production, storage, logistics, and final sales of finished products. Each link is crucial to the quality and safety of the medicines. Traceability systems often rely on centralized databases for information management, which can be susceptible to data tampering, lack transparency, and difficulty in identifying responsible parties. This makes it difficult to quickly and accurately trace quality issues to their source. In recent years, blockchain technology, with its decentralized, immutable, and transparent nature, has emerged as an ideal solution to address the challenges of TCM traceability. Existing blockchain-based traceability systems, by recording information at each stage on-chain, have improved data credibility and traceability efficiency to a certain extent. However, Proof-of-Work (PoW) consensus suffers from high energy consumption and low transaction throughput, while Proof-of-Stake (PoS) faces the risk of centralization due to a rich-get-richer model and the possibility of predictable leader elections, making traceability systems vulnerable to targeted attacks such as distributed denial of service (DDoS). Verifiable delay functions (VDFs) generate a unique output that requires a specified time delay to compute but can be quickly verified, offering an effective approach to achieving fair and random leader election. However, existing VDFs, such as the RSA modulus N, present challenges with trusted setup if their generation relies on a single trusted entity. This single trusted entity may retain a trapdoor in N's prime factorization, potentially enabling the forgery of VDF proofs and posing a fundamental threat to the security of the entire system. Furthermore, VDFs typically employ fixed delay parameters, lacking flexibility and resilience in the face of network congestion or attacks. During the signature consensus phase of block generation, public key infrastructure (PKI) schemes rely on certificate authorities (CAs), posing single points of failure and key escrow risks. Simple multi-signature schemes, however, suffer from high communication overhead and complex signature aggregation, making them inefficient in meeting the threshold signature requirements of large-scale regulatory node participation. Developing a VDF scheme that requires no trusted setup and incorporates an efficient and secure consensus signature mechanism is a pressing technical bottleneck in the field of Traditional Chinese Medicine (TCM) traceability. Summary of the Invention
[0003] In order to solve the above problems, the present invention proposes a method for traceability management of the entire chain of traditional Chinese medicine, comprising the following steps:
[0004] Using the hash value of the initial batch identifier of traditional Chinese medicine and the standard data of medicinal material quality control as the seed, a shared RSA public modulus N is interactively generated between n initialization nodes through a collusion-resistant multi-party computing protocol. For the current traceability link, the timestamp and height of the previous block on the chain, as well as the node risk level assessed based on the current transaction data, are extracted. The dynamic delay parameter T is calculated through a nonlinear mapping function.
[0005] Hash the previous block’s delayed output with the Merkle root of the current block to be on-chain to obtain the input value x. The public modulus N, the dynamic delay parameter T, and the input value x are fed into the verifiable delay function to obtain the current block’s delayed output y and a proof of the verifiable computation process π. The input x of the genesis block is the Merkle root of the genesis block itself.
[0006] After encoding and splitting the proof π based on erasure coding, it is distributed along with the delayed output y to multiple supervisory consensus nodes. After each node locally verifies the validity of the received proof shard, it uses a certificateless threshold signature algorithm based on bilinear pairings to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate its own partial signature.
[0007] After collecting valid partial signatures reaching the preset threshold t, the Lagrange coefficient is used to reconstruct the complete block signature, and the block signature is recorded in the current block together with the delayed output y and the proof π to complete the chain.
[0008] Preferably, the method uses the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control as a seed, and interactively generates a shared RSA public modulus N among n initialization nodes through an anti-collusion multi-party computing protocol, including:
[0009] The UTF-8 encoding of the initial batch identifier of the traditional Chinese medicine is byte-concatenated with the SHA-256 hash value of the standard data file of the medicinal material control to form a seed of fixed length;
[0010] Each initialization node generates a large prime number based on the seed and its own private random number;
[0011] Each node executes a secure multiplication protocol to jointly calculate the product of the prime numbers generated by all nodes without leaking their own prime numbers, which serves as the shared RSA public modulus N.
[0012] Preferably, the calculating of the dynamic delay parameter T by the nonlinear mapping function includes:
[0013] The node risk level r is defined as the ratio of the number of rejected transactions submitted by the node in the past preset period to the total number of submitted transactions. The value range of r is [0,1].
[0014] The delay parameter T is calculated using the following function: ,in is the number of basic delay iterations, h is the height of the previous block, is the risk weight factor, is the risk sensitivity index.
[0015] Preferably, the proof π is encoded and split based on the erasure code and then distributed to multiple supervisory consensus nodes together with the delayed output y, including:
[0016] The proof of the verifiable delay function π is encoded as a byte sequence using Reed-Solomon code with encoding parameters (k, m), where m is the total number of regulatory consensus nodes, k is the minimum number of shards required to reconstruct the proof, and , t is the minimum number of signatures required for threshold signature;
[0017] Split the proof π into k data blocks, generate mk check blocks, and form a total of m coded fragments;
[0018] Distribute the m encoding shards one-to-one to the m supervisory consensus nodes.
[0019] Preferably, the certificateless threshold signature algorithm based on bilinear pairing is used to delay the output of the current block. Sign the data summary of the Merkle tree root to generate their respective partial signatures, including:
[0020] Each supervisory consensus node obtains a partial private key based on the node identity from the key generation center and independently generates a secret value. The two are combined to form a complete signature private key.
[0021] The node uses the complete signature private key corresponding to the node to sign the data summary based on the BLS12-381 curve, generating a point on the elliptic curve as a partial signature .
[0022] Preferably, the reconstructing a complete block signature using Lagrange coefficients includes:
[0023] The signature aggregation node collects valid partial signatures from t different regulatory consensus nodes Then, each signature and the node index corresponding to the signature form t points ;
[0024] After the aggregation node collects t partial signatures, it calculates the corresponding Lagrange coefficients ;
[0025] By weighted summation, that is The complete block signature obtained .
[0026] Preferably, the data summary also includes a hash value of the previous block and a timestamp of the current block.
[0027] On the other hand, the present invention also proposes a Chinese medicine full-chain information traceability management system, including the following modules:
[0028] The dynamic delay parameter acquisition module uses the hash value of the initial batch identifier of traditional Chinese medicine and the standard data of medicinal material quality control as a seed. Through the anti-collusion multi-party computing protocol, it interactively generates a shared RSA public modulus N among n initialization nodes, extracts the timestamp and height of the last block on the chain, and the node risk level assessed based on the current transaction data, and calculates the dynamic delay parameter T through a nonlinear mapping function.
[0029] The hashing module performs a hashing operation on the delayed output of the previous block and the Merkle root of the current block to be on-chain to obtain the input value x. The public modulus N, the dynamic delay parameter T, and the input value x are input into the verifiable delay function to obtain the delayed output y of the current block and the proof of the verifiable calculation process π. The input x of the genesis block is the Merkle root of the genesis block itself.
[0030] The signature generation module encodes and splits the proof π based on an erasure code, and distributes it along with the delayed output y to multiple supervisory consensus nodes. After each node locally verifies the validity of the received proof shard, it uses a certificateless threshold signature algorithm based on bilinear pairings to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate its own partial signature.
[0031] The block signature reconstruction module, after collecting a preset threshold t of valid partial signatures, uses the Lagrange coefficient to reconstruct the complete block signature, and records the block signature together with the delayed output y and proof π in the current block to complete the chain.
[0032] Preferably, the method uses the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control as a seed, and interactively generates a shared RSA public modulus N among n initialization nodes through an anti-collusion multi-party computing protocol, including:
[0033] The UTF-8 encoding of the initial batch identifier of the traditional Chinese medicine is byte-concatenated with the SHA-256 hash value of the standard data file of the medicinal material control to form a seed of fixed length;
[0034] Each initialization node generates a large prime number based on the seed and its own private random number;
[0035] Each node executes a secure multiplication protocol to jointly calculate the product of the prime numbers generated by all nodes without leaking their own prime numbers, which serves as the shared RSA public modulus N.
[0036] Preferably, the calculating of the dynamic delay parameter T by the nonlinear mapping function includes:
[0037] The node risk level r is defined as the ratio of the number of rejected transactions submitted by the node in the past preset period to the total number of submitted transactions. The value range of r is [0,1].
[0038] The delay parameter T is calculated using the following function: ,in is the number of basic delay iterations, h is the height of the previous block, is the risk weight factor, is the risk sensitivity index.
[0039] Preferably, the proof π is encoded and split based on the erasure code and then distributed to multiple supervisory consensus nodes together with the delayed output y, including:
[0040] The proof of the verifiable delay function π is encoded as a byte sequence using Reed-Solomon code, and the encoding parameters are set to , where m is the total number of supervisory consensus nodes, k is the minimum number of shards required to reconstruct the proof, and , t is the minimum number of signatures required for threshold signature;
[0041] Split the proof π into k data blocks, generate mk check blocks, and form a total of m coded fragments;
[0042] Distribute the m encoding shards one-to-one to the m supervisory consensus nodes.
[0043] Preferably, the certificateless threshold signature algorithm based on bilinear pairings is used to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate respective partial signatures, including:
[0044] Each supervisory consensus node obtains a partial private key based on the node identity from the key generation center and independently generates a secret value. The two are combined to form a complete signature private key.
[0045] The node uses the complete signature private key corresponding to the node to sign the data summary based on the BLS12-381 curve, generating a point on the elliptic curve as a partial signature .
[0046] Preferably, the reconstructing a complete block signature using Lagrange coefficients includes:
[0047] The signature aggregation node collects valid partial signatures from t different regulatory consensus nodes Then, each signature and the node index corresponding to the signature form t points ;
[0048] After the aggregation node collects t partial signatures, it calculates the corresponding Lagrange coefficients ;
[0049] By weighted summation, that is The complete block signature obtained .
[0050] Preferably, the data summary also includes a hash value of the previous block and a timestamp of the current block.
[0051] This invention generates a VDF public modulus through a collusion-resistant multi-party computation protocol, reducing reliance on trusted setups and ensuring the fairness of leader elections and the underlying security of the system. Furthermore, the certificateless threshold signature scheme employed not only reduces reliance on certificate authorities (CAs), minimizing single points of failure and key escrow risks, but also, through efficient signature aggregation and proof distribution based on erasure codes, reduces the communication and storage burden of large-scale regulatory nodes participating in consensus. This improves security and decentralization while enabling more efficient traceability management of the entire Traditional Chinese Medicine supply chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of a specific embodiment;
[0053] Figure 2 This is a schematic diagram of the traceability registration process for entering the planting stage;
[0054] Figure 3 This is a schematic diagram of the planting traceability information that is being registered;
[0055] Figure 4 Schematic diagram of the planting traceability registration page
[0056] Figure 5 Schematic diagram for generating shared RSA modulus N;
[0057] Figure 6 Schematic diagram of calculation of dynamic delay parameter T;
[0058] Figure 7 Schematic diagram of the association between VDF calculation and block data;
[0059] Figure 8 Schematic diagram of signature aggregation and block chaining. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0061] In one embodiment, the present invention proposes a method for information-based traceability management of the entire chain of traditional Chinese medicine, such as Figure 1 As shown, the following steps are included:
[0062] S1 uses the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control as a seed, and through the anti-collusion multi-party computing protocol, interactively generates a shared RSA public modulus N among n initialization nodes. For the current traceability link, the timestamp and height of the previous block on the chain, as well as the node risk level assessed based on the current transaction data, are extracted, and the dynamic delay parameter T is calculated through a nonlinear mapping function.
[0063] The traceability management of Chinese medicinal materials includes the processes of planting, production, and sales. The complete traceability includes all the above processes, and each process includes multiple sub-links. Figure 2 This is a diagram of the traceability registration for the "sowing" stage of planting traceability registration. Figure 3 This is a diagram of the planting traceability list that is being registered. Registration means that it is being reviewed and / or waiting to be added to the blockchain. Users can fill in the registration content and upload files, such as Figure 4 As shown in the figure, n entities such as medicinal material suppliers, processing companies, and quality inspection agencies are selected as initialization nodes. For example, the ZYC202401 batch of American ginseng is used as the initial batch identifier. The quality control standard data files such as pesticide residues and heavy metal content of American ginseng are hashed with SHA256, and the result is used as the public seed. Based on this seed, all nodes execute the Boneh-Franklin anti-collusion RSA key generation protocol, as shown in the figure. Figure 5 As shown, each node locally generates a secret prime number pair. Through multiple rounds of interactive computation, they jointly generate a public modulus N shared by all nodes. The two large prime factors p and q that make up N remain unknown to any single node or fewer than a preset number of colluding nodes. In one embodiment, the public modulus N is periodically updated.
[0064] Get the timestamp of the previous block from the chain, for example, 1704038400, and the height, for example, 50000. Based on the historical behavior of the nodes involved in the current package transaction, such as transaction frequency, amount, whether there is a bad record, etc., calculate the node's risk level R through a preset weighted scoring model, ranging from 1 to 5; substitute the nonlinear mapping function T, for example, T = basic delay + α times the block interval length + β times the height logarithm + γ times the risk level squared, where α, β, and γ are system adjustment coefficients, and calculate the final delay parameter T, such as Figure 6 As shown in Figure 2, the difficulty of achieving latency varies with network status and security posture.
[0065] S2: Hash the delayed output of the previous block with the Merkle root of the current block to be on-chain to obtain the input value x. The public modulus N, the dynamic delay parameter T, and the input value x are input into the verifiable delay function to obtain the delayed output y of the current block and the proof of the verifiable calculation process π. The input x of the genesis block is the Merkle root of the genesis block itself.
[0066] Output the delay of the previous block Merkle tree root generated with all transactions in the current block Perform splicing and generate the input value x through the SHA256 hash algorithm; perform T consecutive modular square operations, that is, , , until the result is calculated ; During this calculation process, the Wesolowski proof scheme is used synchronously to generate a compact proof π, such as Figure 7 As shown, proving π allows the verifier to quickly verify that y is indeed the correct result obtained by calculating x after T iterations in a complexity far less than T operations.
[0067] S3: After encoding and splitting the proof π based on the erasure code, it is distributed together with the delayed output y to multiple supervisory consensus nodes. After each node locally verifies the validity of the received proof shard, it uses a certificateless threshold signature algorithm based on bilinear pairings to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate its own partial signature.
[0068] The proof π is encoded into m data shards using Reed-Solomon erasure coding and distributed to m different supervisory consensus nodes. The encoding scheme ensures that any k shards can restore the complete proof π. After collecting at least k shards, each supervisory node reconstructs the complete proof π and uses the complete proof π to verify the correctness of the delayed output y. After verification, the node compares y with the Merkle root of the current block. After concatenation, the SHA256 hash value is calculated as the data digest. The BLS certificateless threshold signature algorithm is then used to sign the data digest using each private key shard, generating a unique partial signature. Verifying the validity of the received proof shard includes, but is not limited to, verifying the reliability of the shard's source and / or the correctness of the shard's signature, i.e., verifying that the shard originates from a legitimate node.
[0069] S4: After collecting valid partial signatures reaching the preset threshold t, the complete block signature is reconstructed using the Lagrange coefficients. The block signature is recorded in the current block together with the delayed output y and the proof π to complete the chain.
[0070] The block proposal node is responsible for collecting partial signatures broadcast in the network. After collecting t valid partial signatures from different nodes, it uses these signatures and the public information of the corresponding signing nodes to perform calculations on the exponential through Lagrange interpolation method to aggregate and reconstruct a single and valid complete block signature. ; Sign this in full , delayed output y, and complete verifiable proof π are packaged together into a specific field of the new block. After verification, the block is linked to the blockchain, completing a safe and reliable traceability information chain process.
[0071] In an optional embodiment, the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control is used as a seed, and a shared RSA public modulus N is interactively generated among n initialization nodes through an anti-collusion multi-party computing protocol, including:
[0072] The UTF-8 encoding of the initial batch identifier of the traditional Chinese medicine is byte-concatenated with the SHA-256 hash value of the standard data file of the medicinal material control to form a seed of fixed length;
[0073] Each initialization node generates a large prime number based on the seed and its own private random number;
[0074] Each node executes a secure multiplication protocol to jointly calculate the product of the prime numbers generated by all nodes without leaking their own prime numbers, which serves as the shared RSA public modulus N.
[0075] Assume that three initialization nodes participate in the generation process. The initial TCM batch identifier is ZYYP20240520A01, corresponding to the UTF-8 byte sequence B1. The TCM quality control standard data file is a PDF document containing test items and indicators, with a SHA-256 hash value of H1. B1 and H1 are concatenated sequentially to form a unified seed S. Seed S is public and consistent for all participating nodes, ensuring a deterministic starting point for the prime number generation process and binding it to a specific TCM batch and standard.
[0076] Each initialization node, such as Node 1, Node 2, and Node 3, uses this public seed S and a 32-byte private random number known only to it, such as R1, R2, and R3, to calculate its own 1024-bit prime numbers, P1, P2, and P3, using a deterministic large prime number generation algorithm. These three nodes initiate a collusion-resistant secure multiplication protocol. Through multiple rounds of encrypted message exchange, they jointly calculate N as the product of P1, P2, and P3. Throughout this process, no node can learn the prime numbers of the other nodes, ensuring the security of the subsequent verifiable delay function calculation.
[0077] In an optional embodiment, the dynamic delay parameter is calculated by a nonlinear mapping function. ,include:
[0078] The node risk level r is defined as the ratio of the number of rejected transactions submitted by the node in the past preset period to the total number of submitted transactions. The value range of r is [0,1].
[0079] The delay parameter T is calculated using the following function: ,in is the number of basic delay iterations, h is the height of the previous block, is the risk weight factor, is the risk sensitivity index.
[0080] Assume that the base delay is set For 10 million iterations, the risk weight factor is 5 million, the risk sensitivity index The risk level r is calculated over the past 1,000 blocks. The currently processed block is 80,001, so the previous block height h is 80,000. A well-performing node A submitted 500 transactions in the past 1,000 blocks, of which only 2 were rejected. The risk level r for these transactions is calculated to be 0.004.
[0081] According to the above settings, the number of delay iterations of node A is about ninety-two million four hundred thirty-two thousand times. In contrast, a node B with abnormal behavior submitted 100 transactions during the same period, but 30 of them were rejected, and the risk level r was as high as 0.3. The delay parameter T is about one hundred and forty-seven million two hundred and twenty-five thousand times, which is much higher than that of node A. The block production cost of high-risk nodes is increased to incentivize all nodes to be honest and trustworthy. It should be noted that the above data is only for illustrating the process of this embodiment, and the specific data is not limited to the above examples. For example, the delay parameter T can be uniformly divided by a certain number. For example, if the certain number is one hundred thousand, the number of delay iterations of node A is about nine hundred and twenty-three. When the delay parameter T is not an integer, the delay parameter T needs to be rounded up or down. Preferably, Among them, ceil() means rounding up.
[0082] In an optional embodiment, the proof π is encoded and split based on an erasure code and then distributed to multiple supervisory consensus nodes together with the delayed output y, including:
[0083] The proof of the verifiable delay function π is encoded as a byte sequence using Reed-Solomon code, and the encoding parameters are set to , where m is the total number of supervisory consensus nodes, k is the minimum number of shards required to reconstruct the proof, and , t is the minimum number of signatures required for threshold signature;
[0084] Split the proof π into k data blocks, generate mk check blocks, and form a total of m coded fragments;
[0085] Distribute the m encoding shards one-to-one to the m supervisory consensus nodes.
[0086] Assume that the proof π generated by the verifiable delay function is a 1024-byte data. There are m equal to 15 supervisory consensus nodes in the network, and the threshold signature scheme requires at least t equal to 10 nodes to participate in the signature. To ensure data availability is consistent with the signature threshold, the reconstruction threshold k of the Reed-Solomon code is also set to 10. Only 10 shards are needed to recover the complete proof π.
[0087] The encoding process splits the 1024-byte proof π into k equal to 10 data blocks of 102.4 bytes each, padded to an integer, for example, 103 bytes per block. Based on these 10 data blocks, the encoding algorithm calculates m minus k equal to 5 check blocks, each also 103 bytes. For example, this is generated using a k-1 degree polynomial with coefficients equal to k data blocks. This results in 15 encoded shards. These 15 shards are distributed one by one to the 15 supervisory consensus nodes, with each node storing one shard. Even if up to five nodes fail offline or maliciously withhold shards, the remaining 10 nodes can still pool their shards and successfully reconstruct the original 1024-byte proof π, ensuring that the block verification process is not interrupted by the failure of some nodes.
[0088] In an optional embodiment, the certificateless threshold signature algorithm based on bilinear pairings is used to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate respective partial signatures, including:
[0089] Each supervisory consensus node obtains a partial private key based on the node identity from the key generation center and independently generates a secret value. The two are combined to form a complete signature private key.
[0090] The node uses the complete signature private key corresponding to the node to sign the data summary based on the BLS12-381 curve, generating a point on the elliptic curve as a partial signature .
[0091] A regulatory consensus node, the node's identity ID is RegNodeGov007. The key generation center KGC uses the node's master key to calculate the partial private key bound to the ID , sent to the regulatory consensus node through a secure channel. The node RegNodeGov007 generates a random large integer as the node's secret value. The complete signature private key of the node is and Together, they constitute Generated by an authoritative organization, Controlled by the nodes themselves, this mechanism avoids the risk of a single entity completely controlling the key.
[0092] When a 32-byte data digest M needs to be signed, the node RegNodeGov007 uses the node's private key and , performs signature operation on the specific elliptic curve BLS12-381. The data summary M is mapped to a point on the curve, and the calculation is performed using the private key information to generate the result It is an element on the curve G1 group and can be represented as a 96-byte data. Every other supervisory consensus node participating in the signature in the network independently executes the same process, using its own full private key to generate its own unique partial signature for the same data digest M.
[0093] In an optional embodiment, reconstructing a complete block signature using Lagrange coefficients includes:
[0094] The signature aggregation node collects valid partial signatures from t different regulatory consensus nodes Then, each signature and the node index corresponding to the signature form t points ;
[0095] After the aggregation node collects t partial signatures, it calculates the corresponding Lagrange coefficients ;
[0096] By weighted summation, that is The complete block signature obtained .
[0097] Assuming the signature threshold t is 10, a block proposal node, as a signature aggregator, successfully collects partial signatures from ten supervisory consensus nodes with indexes 1, 2, 3, 5, 6, 7, 8, 10, 11, and 12. These partial signatures are , , , There are ten elliptic curve points, such as Figure 8 The aggregator pairs these signatures with the index of the signature to form 10 data points, for example, point 1 is , point 2 is , and so on. For each index i in the set S={1,2,3,5,6,7,8,10,11,12}, calculate a corresponding Lagrange coefficient , this coefficient is the weight of node i when interpolating at point 0. and partial signature After that, you can get the complete block signature according to the above formula. And when verifying, you don’t need to know which 10 nodes participated in the signature.
[0098] In an optional embodiment, the data summary also includes a hash value of the previous block and a timestamp of the current block.
[0099] When constructing a new block, such as one at block height 58888, the block digest generation process consists of three core components. The first component is the Merkle root hash calculated from all transactions within the block, for example, a 32-byte hash value of 0x1a2b3c... The second component is the overall hash value of its parent block, at block height 58887, for example, 0x4d5e6f... The third component is the Unix timestamp generated when the block was proposed, for example, 1678886400.
[0100] These three pieces of data—the Merkle root hash, the previous block hash, and the timestamp—are concatenated in a predefined order into a long byte string. This concatenated byte string is hashed with SHA-256 to generate a 32-byte data digest. This data digest is what the supervisory consensus nodes sign. The inclusion of the previous block hash ensures chain-locking of the entire historical ledger, ensuring tamper-proofing. The inclusion of the timestamp provides block-specific timing information, preventing replay attacks and other issues.
[0101] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0102] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0103] The above describes in detail the method and electronic device for providing commodity object information provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The description of the above embodiments is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be construed as limiting this application.
Claims
1. A method for traceability management of the entire chain of traditional Chinese medicine, characterized in that: The steps include: Using the hash value of the initial batch identifier of traditional Chinese medicine and the standard data of medicinal material quality control as the seed, a shared RSA public modulus N is interactively generated between n initialization nodes through a collusion-resistant multi-party computing protocol. For the current traceability link, the timestamp and height of the previous block on the chain, as well as the node risk level assessed based on the current transaction data, are extracted. The dynamic delay parameter T is calculated through a nonlinear mapping function. Hash the previous block’s delayed output with the Merkle root of the current block to be on-chain to obtain the input value x. The public modulus N, the dynamic delay parameter T, and the input value x are fed into the verifiable delay function to obtain the current block’s delayed output y and a proof of the verifiable computation process π. The input x of the genesis block is the Merkle root of the genesis block itself. After encoding and splitting the proof π based on erasure coding, it is distributed along with the delayed output y to multiple supervisory consensus nodes. After each node locally verifies the validity of the received proof shard, it uses a certificateless threshold signature algorithm based on bilinear pairings to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate its own partial signature. After collecting valid partial signatures reaching the preset threshold t, the Lagrange coefficient is used to reconstruct the complete block signature, and the block signature is recorded in the current block together with the delayed output y and the proof π to complete the chain.
2. The method according to claim 1, characterized in that The method uses the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control as a seed, and interactively generates a shared RSA public modulus N among n initialization nodes through an anti-collusion multi-party computing protocol, including: The UTF-8 encoding of the initial batch identifier of the traditional Chinese medicine is byte-concatenated with the SHA-256 hash value of the standard data file of the medicinal material control to form a seed of fixed length; Each initialization node generates a large prime number based on the seed and its own private random number; Each node executes a secure multiplication protocol to jointly calculate the product of the prime numbers generated by all nodes without revealing their own prime numbers, which is used as the shared RSA public modulus N. 。 3. The method according to claim 1, characterized in that The dynamic delay parameter T is calculated by the nonlinear mapping function, including: The node risk level r is defined as the ratio of the number of rejected transactions submitted by the node in the past preset period to the total number of submitted transactions. The value range of r is [0,1]. The delay parameter T is calculated using the following function: ,in is the number of basic delay iterations, h is the height of the previous block, is the risk weight factor, is the risk sensitivity index.
4. The method according to claim 1, wherein The proof π is encoded and split based on the erasure code and then distributed together with the delayed output y to multiple supervisory consensus nodes, including: The proof of the verifiable delay function π is encoded as a byte sequence using Reed-Solomon code with encoding parameters set to (k, m), where m is the total number of regulatory consensus nodes, k is the minimum number of shards required to reconstruct the proof, and , t is the minimum number of signatures required for threshold signature; Split the proof π into k data blocks, generate mk check blocks, and form a total of m coded fragments; Distribute the m encoding shards one-to-one to the m supervisory consensus nodes.
5. The method according to claim 1, wherein The certificateless threshold signature algorithm based on bilinear pairings is used to sign the data digest containing the delayed output y of the current block and the Merkle tree root, generating their respective partial signatures, including: Each supervisory consensus node obtains a partial private key based on the node identity from the key generation center and independently generates a secret value. The two are combined to form a complete signature private key. The node uses the complete signature private key corresponding to the node to sign the data summary based on the BLS12-381 curve, generating a point on the elliptic curve as a partial signature .
6. The method according to claim 1, wherein The Lagrange coefficient is used to reconstruct the complete block signature, including: The signature aggregation node collects valid partial signatures from t different regulatory consensus nodes Then, each signature and the node index corresponding to the signature form t points ; After the aggregation node collects t partial signatures, it calculates the corresponding Lagrange coefficients ; By weighted summation, that is The complete block signature obtained .
7. The method according to claim 1 or 5, characterized in that The data summary also includes the hash value of the previous block and the timestamp of the current block.
8. A Chinese medicine full-chain information traceability management system, characterized by: Includes the following modules: The dynamic delay parameter acquisition module uses the hash value of the initial batch identifier of traditional Chinese medicine and the standard data of medicinal material quality control as a seed. Through the anti-collusion multi-party computing protocol, it interactively generates a shared RSA public modulus N among n initialization nodes. For the current traceability link, it extracts the timestamp and height of the previous block on the chain, as well as the node risk level assessed based on the current transaction data, and calculates the dynamic delay parameter T through a nonlinear mapping function. The hashing module performs a hashing operation on the delayed output of the previous block and the Merkle root of the current block to be on-chain to obtain the input value x. The public modulus N, the dynamic delay parameter T, and the input value x are input into the verifiable delay function to obtain the delayed output y of the current block and the proof of the verifiable calculation process π. The input x of the genesis block is the Merkle root of the genesis block itself. The signature generation module encodes and splits the proof π based on an erasure code, and distributes it along with the delayed output y to multiple supervisory consensus nodes. After each node locally verifies the validity of the received proof shard, it uses a certificateless threshold signature algorithm based on bilinear pairings to sign the data digest containing the delayed output y of the current block and the Merkle tree root to generate its own partial signature. The block signature reconstruction module, after collecting a preset threshold t of valid partial signatures, uses the Lagrange coefficient to reconstruct the complete block signature, and records the block signature together with the delayed output y and proof π in the current block to complete the chain.
9. The system according to claim 8, characterized in that The method uses the hash value of the initial batch identifier of the traditional Chinese medicine and the standard data of the medicinal material quality control as a seed, and interactively generates a shared RSA public modulus N among n initialization nodes through an anti-collusion multi-party computing protocol, including: The UTF-8 encoding of the initial batch identifier of the traditional Chinese medicine is byte-concatenated with the SHA-256 hash value of the standard data file of the medicinal material control to form a seed of fixed length; Each initialization node generates a large prime number based on the seed and its own private random number; Each node executes a secure multiplication protocol to jointly calculate the product of the prime numbers generated by all nodes without leaking their own prime numbers, which serves as the shared RSA public modulus N.
10. The system according to claim 8, wherein: The dynamic delay parameter T is calculated by the nonlinear mapping function, including: Defining node risk levels It is the ratio of the number of rejected transactions submitted by the node in the past preset period to the total number of submitted transactions. The value range of is [0,1]; The delay parameter T is calculated using the following function: ,in is the number of basic delay iterations, h is the height of the previous block, is the risk weight factor, is the risk sensitivity index.
Citation Information
Patent Citations
Cloud storage key security management method based on block chain
CN112906056A
Digital certificate system and method based on TEE oracle cluster and block chain
CN114465817A
Method based on cross-chain data traceability
CN119006015A
Supply chain tracing method and system based on block chain
CN120235530A
Bidding system and method based on blockchain technology
US20240412281A1