CN115063149A - Block chain-based agricultural product information authentication and fund tracing method and system - Google Patents

Block chain-based agricultural product information authentication and fund tracing method and system Download PDF

Info

Publication number
CN115063149A
CN115063149A CN202210667750.9A CN202210667750A CN115063149A CN 115063149 A CN115063149 A CN 115063149A CN 202210667750 A CN202210667750 A CN 202210667750A CN 115063149 A CN115063149 A CN 115063149A
Authority
CN
China
Prior art keywords
information
block
node
fund
hash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210667750.9A
Other languages
Chinese (zh)
Inventor
彭岩
马浚茹
杜国玉
邵子尧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Taihu University
Original Assignee
Wuxi Taihu University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Taihu University filed Critical Wuxi Taihu University
Priority to CN202210667750.9A priority Critical patent/CN115063149A/en
Publication of CN115063149A publication Critical patent/CN115063149A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Accounting & Taxation (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Fuzzy Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an agricultural product information authentication and fund tracing method and system based on a block chain, which comprises the following steps: generating a block chain network structure, wherein a Peer node performs read-write operation on an account book, calculates a hash of a received fund or authentication information uplink request to generate a unique event code, sends the received fund or authentication information and the event code to a corresponding Endorser node endorsement, and sends uplink request original information, signed information, the event code and a timestamp during signature to an Orderer node after the endorsement is finished; the Orderer node generates a block and then sends the block to the Peer node for uplink and stores the block in a corresponding database; and sending the information to be verified and the corresponding event code to a random Peer node, comparing the data, and finishing information authentication and fund tracing. The invention integrates the block chain and the agricultural product transaction to trace the fund flow direction, and better meets the requirements of agricultural product information authentication and fund tracing.

Description

Block chain-based agricultural product information authentication and fund tracing method and system
Technical Field
The invention relates to the technical field of block chains, in particular to an agricultural product information authentication and fund tracing method and system based on a block chain.
Background
Nowadays, the Internet is utilized to widen the sales channel, and the problem of difficult selling of agricultural products is solved in multiple channels. However, many illegal vendors see the business opportunities to publicize the products falsely and earn benefits again, which not only hurts the feelings and trusts of consumers, but also infringes the benefits of real farmers. The specific problems are as follows:
(1) it is difficult to confirm whether the goods are genuine or not:
the marketing of many so-called agricultural products is just a false publicity of illegal vendors, and pictures are used to bring people to a good deal. Many people believe it is after seeing the picture and the introduction of the goods that they suffer property damage as a result. And the inquiry of whether the product is complicated is not beneficial to the operation of ordinary people.
(2) The capital flow direction is unknown
The selling process of the agricultural products is complex, the fund is difficult to track after the process of farmers-buyers-distributors-markets, meanwhile, the price of the agricultural products is regulated and must be the average price of the similar products, but the consumers are difficult to confirm whether the price of the purchased products is checked by related departments, and the final selling amount of the agricultural products actually reaches the related farmers instead of being peeled by intermediary institutions layer by layer and is finally left for the farmers.
Thus, a way to combine blockchains with agricultural sales to solve the problem is considered. However, the block chain technology in the prior art is intended to be applied to agricultural product information authentication and fund tracing, and still has the following problems:
(1) the underlying network technology of the block chain adopts a peer-to-peer network, which is called P2P network for short. This is a distributed network communication technology, also known as "peer-to-peer network". Unlike the traditional client/server (C/S) structure, there is no master-slave between nodes in the P2P network, and the roles are all peer-to-peer, and each node can be either a server or a client.
However, complete openness affects network security performance. The account book stores authentication information and product information of the user, belongs to privacy information, and should not be completely opened.
(2) Fabric consensus mechanism
The consensus mechanism is divided into three steps:
the application program selects endorsement nodes according to the requirements of the endorsement policy and sends transaction proposals to be executed to the nodes. The endorsement node calls the chain code to execute the transaction proposals, and the transaction is executed in a simulation mode and does not really submit data to an account book. And after the execution is finished, calling a transaction endorsement system chain code ESCC to sign and endorse the simulation execution result.
The sequencing stage receives the transactions signed with endorsements, determines the number and sequence of the transactions, packs the sequenced transactions into blocks, and broadcasts the blocks to the Peer nodes for verification. Typically, the ordering service does not output a single transaction as a block from an efficiency perspective, but rather packages multiple transactions into a block.
The Peer node verifies the validity of the transactions contained in the received block, including endorsement policy verification and double-flower detection. Validation errors can be divided into two broad categories: syntax errors and logic errors. Syntax errors include invalid inputs, unverified signatures, and duplicate transactions (double-flower attacks) that should be discarded. The second category of errors is complex, such as transactions that may result in double flowers or MVCC failures, which requires policy definition to decide whether the program should continue execution or terminate. The default transaction verification system chain code VSCC only supports verification of endorsement policies.
Wherein the endorsement node is determined by the CA node issuing a digital certificate. The CA node is a certificate authority, consisting of a server and a client component. And the CA node receives the registration application of the client and returns a registration password for user login so as to obtain the identity certificate. All operations on the blockchain network verify the identity of the user.
However, the endorsement node in the agricultural product certification should be a relevant institution and a relevant third-party supervision institution, and the endorsement node has determined that the endorsement node does not need to be increased or decreased. Moreover, the operation on many networks is only to verify information, and not only is it completely unnecessary to record information on the network, but also the performance of the network is seriously affected by such a large amount of information records.
Furthermore, product authentication should be endorsed by the relevant institution and the relevant third party regulatory institution, while the fund flow information should be endorsed by the relevant bank, each endorsement node having different endorsement responsibilities for different uplink contents.
Disclosure of Invention
The invention aims to provide an agricultural product information authentication and fund tracing method and system based on a block chain, which integrate the block chain and agricultural product transaction to trace the fund flow direction and better meet the requirements of agricultural product information authentication and fund tracing.
In order to solve the technical problem, the invention provides an agricultural product information authentication and fund tracing method based on a block chain, which comprises the following steps:
s1, generating a block chain network structure, wherein the block chain network structure comprises a plurality of Peer nodes, Orderer nodes and an Endorer node, and the Endorer node is generated and responsible by a relevant organization responsible for agricultural product approval and a bank responsible for fund flow;
s2, deploying the chain codes on the Peer nodes, reading and writing the book by the Peer nodes, generating a unique event code by chaining the received fund or authentication information and requesting to calculate the hash, and sending the received fund or authentication information and the event code to the corresponding Endorser node endorsement;
s3, after Endorser node endorses, the original information of the uplink request, the signed information, the event code and the time stamp during signing are sent to the Orderer node together;
s4, verifying the information by using the public key of the Endorer node after the Orderer node receives the information sent by the Endorer node, calculating a hash value of all the information through verification, generating a block through the hash value, an event code and a timestamp, sending the block to the Peer node for uplink, and storing the block in a corresponding database;
s5, repeating the steps S2-S4, completing the chain linking of the fund or the authentication information, and performing network synchronization once after each block is out of blocks;
and S6, sending the information to be verified and the corresponding event code to a random Peer node, inquiring the block corresponding to the event code and the root of the hash calculation hash tree from the database by the Peer node, comparing the calculated root with the data in the block, and finishing information authentication and fund tracing.
As a further improvement of the invention, the Peer nodes are respectively generated into equivalent nodes by a distribution platform, a third-party supervision mechanism and an examining and approving party network mechanism and are maintained by all the affiliated mechanisms; the Orderer node is generated by a distribution platform, a third-party supervision mechanism and an approver network mechanism respectively and is responsible for one node.
As a further improvement of the present invention, the network synchronization specifically includes: after each Peer node receives an uplink block, calculating the hash of the complete block and putting the hash into a hash table; the hash values of all blocks are stored in each Orderer node, wherein all Peer nodes chain-finish returning confirmation to the Orderer node.
As a further improvement of the invention, when three Orderer nodes receive all the confirmations, the hash value of the hash table is calculated, the three Orderer nodes are checked firstly, one Orderer node broadcasts the hash to all the Peer nodes again after the confirmation, all the Peer nodes calculate the hash value of the hash table and compare the hash value, if the hash value is correct, the hash value is returned to be correct, and if the hash value is incorrect, the account book synchronization is carried out.
As a further improvement of the present invention, the step S3 specifically includes the following steps:
the method comprises the steps that an Endorser node receives required uplink information sent by a Peer node;
judging whether the information belongs to the responsibility range of the Endorser node;
inquiring whether the related information is consistent with the information to be uplinked, if so, carrying out digital signature on the information by using a private key to endorse the information, otherwise, returning to a corresponding Peer node;
and after endorsement is finished, sending the original information, the signed information, the event code and the time stamp during signing to the Orderer node.
As a further improvement of the present invention, the step S4 specifically includes the following steps:
the Orderer receives the information sent by the Endorser node, verifies the information by using the public key of the Endorser node, calculates a hash value by all the information, and packs the hash value, the event code and the timestamp into an information pool;
when the information waiting for chaining in the information pool is 1024 or the time reaches fifteen minutes, arranging all the information according to the time stamp sequence as the bottom layer of the hash tree to generate the hash tree, checking the hash tree structure among Orderer nodes, taking the values of all the generated leaf nodes without children as numbers, and taking event codes of other leaf nodes as the numbers to describe the tree by using a child brother representation method;
taking the root of the hash tree as the block data of the block, and calculating the hash as the block head of the block together with the timestamp when the block is generated and the block head of the previous block;
generating a block by a block header of a previous block, a block header of the block, data and a time stamp, and sending the block and the description of the hash tree of the block to the Peer node for uplink;
after receiving the message, the Peer node uplinks and returns a confirmation message;
after receiving all the acknowledgements, the Orderer node finishes the uplink and starts the network synchronous operation.
As a further improvement of the present invention, the step S6 specifically includes the following steps:
sending the information to be verified and the corresponding event code to a random peer node;
after receiving the event code, the Peer node queries the block corresponding to the event code and the shortest path from the corresponding Hash tree to the leaf from the database;
inquiring values of all leaves and two children on the shortest path from a database;
calculating the root of the hash tree according to the hash of the values of all the leaves and two children thereof on the shortest path and the verified message;
and comparing the calculated root with the data in the block, if the calculated root is the same as the data in the block, returning to be correct, and otherwise, returning to be wrong.
As a further improvement of the invention, an elliptic curve encryption algorithm is adopted in the block chain network structure.
An agricultural product information authentication and fund tracing system based on a block chain is used for type agricultural product query by adopting the agricultural product information authentication and fund tracing method based on the block chain.
As a further improvement of the invention, the system comprises a client and a blockchain server, wherein the blockchain server performs corresponding processing according to an operation request of the client and returns corresponding data.
The invention has the beneficial effects that: the invention integrates the block chain and the agricultural product transaction to trace the capital flow direction, thereby realizing the supervision of the capital; the method has the advantages that the Fabric consensus mechanism is optimized to be the S-Fabric consensus mechanism, so that the requirements of agricultural product information authentication and fund traceability can be met better, the surplus structure of the network is optimized, and the network performance is improved; the invention authenticates the information of the agricultural products on the basis of having legal credibility by writing a proper transaction endorsement system chain code ESCC for the blockchain.
Drawings
FIG. 1 is a schematic diagram of the network architecture of the present invention;
FIG. 2 is a schematic diagram of the system for implementing the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The invention provides an agricultural product information authentication and fund tracing method based on a block chain, which comprises the following steps:
s1, generating a block chain network structure, wherein the block chain network structure comprises a plurality of Peer nodes, Orderer nodes and an Endorer node, and the Endorer node is generated and responsible by an approver mechanism responsible for agricultural product approval and a bank responsible for fund transfer;
s2, deploying the link code on a Peer node, reading and writing the book by the Peer node, generating a unique event code by the uplink request calculation hash of the received fund or authentication information, and sending the received fund or authentication information and the event code to a corresponding Endorser node endorsement;
s3, after Endorser node endorses, the original information of the uplink request, the signed information, the event code and the time stamp during signing are sent to the Orderer node together;
s4, verifying the information by using the public key of the Endorer node after the Orderer node receives the information sent by the Endorer node, calculating a hash value of all the information through verification, generating a block through the hash value, an event code and a timestamp, sending the block to the Peer node for uplink, and storing the block in a corresponding database;
s5, repeating the steps S2-S4, completing the chain linking of the fund or the authentication information, and performing network synchronization once after each block is out of blocks;
and S6, sending the information to be verified and the corresponding event code to a random Peer node, inquiring the block corresponding to the event code and the root of the hash calculation hash tree from the database by the Peer node, comparing the calculated root with the data in the block, and finishing information authentication and fund tracing.
As described in the background, the existing Fabric consensus mechanism endorsement node is determined by the CA node issuing a digital certificate. However, the endorsement node in the product certification should be an approver and related third-party supervision authorities, and the endorsement node is determined not to need to be increased or decreased. Moreover, the operation on many networks is only to verify information, and not only is it completely unnecessary to record information on the network, but also the performance of the network is seriously affected by such a large amount of information records. Therefore, the consensus mechanism of the present invention has no CA node. The endorser specifies the endorser at system setup, and does not need CA node determination. The specific scheme is as follows:
as shown in FIG. 1, the S-Fabric consensus mechanism and network architecture:
firstly, a node generation and network structure:
peer node: the chaincode is deployed on the Peer node, performs read-write operation on an account book, generates a unique event code by calculating a hash of the received fund or authentication information uplink request, returns the unique event code to a sender requesting uplink information, sends the received fund or authentication information and the event code to a corresponding Endorer node endorsement, and receives a block sent by an orderer node for uplink. There will be multiple Peer nodes in a blockchain network.
The generation method comprises the following steps: the equivalent nodes are respectively generated by the distribution platform, the third-party monitoring mechanism and the examining and approving party network mechanism, and are maintained by all the affiliated mechanisms.
Orderer node: and sequencing the transactions, packaging in batches, generating blocks and sending the blocks to the Peer nodes. There may be multiple Orderer nodes in a blockchain network that collectively provide ordering services. The ordering service is provided by a transaction-created timestamp.
The generation method comprises the following steps: the node is generated and responsible for one node by a distribution platform, a third-party supervision mechanism and an examining and approving party network mechanism respectively.
The Ensorder node receives the information corresponding to the Ensorder node for authentication and endorsement, and then sends the information to the Orderer node.
The generation method comprises the following steps: the agricultural product approval system is generated and responsible by an approver mechanism responsible for agricultural product approval and a bank responsible for fund transfer.
Furthermore, the network does not allow unauthorized nodes to join.
Secondly, Peer node synchronization in the network:
on the basis of the network structure, network synchronization is performed once after each block is generated: after each peer node receives a uplink block, the hash of the complete block is calculated and put into a hash table, and therefore, the hash values of all blocks are stored in the hash table. The hash values of all blocks are also stored in each Orderer node. All Peer nodes link completion back to the Orderer node.
Specifically, the three Peer nodes calculate the hash value of the hash table after receiving all the confirmations, check the three Peer nodes firstly, broadcast the hash to all the Peer nodes again by one Peer node after the confirmation, calculate and compare the hash value of the hash table by all the Peer nodes, return to be correct if the hash value is correct, and synchronize the account book if the hash value is incorrect.
Thirdly, executing the chain code ESCC of the endorsement system:
the Ensorder node receives the required uplink information sent by the Peer node;
judging whether the information belongs to the responsibility range of the Ensorder node;
inquiring whether the related information is consistent with the information to be uplink; (whether the agricultural product information is in the related database of the examining and approving department or whether the capital flow information is real)
And if the information is consistent with the Peer node, digitally signing the information by using the private key to endorse, otherwise returning to the corresponding Peer node.
And after the endorsement is finished, sending the original information, the signed information, the event code and the time stamp during signing to the Orderer node.
Fourthly, block generation and uplink:
the Orderer node receives the information sent by the Ensorder node, verifies the information by using the public key of the Ensorder node, calculates a hash value by all the information, and packs the hash value, the event code and the timestamp into an information pool;
when the information waiting for chaining in the information pool is 1024 or the time reaches fifteen minutes, arranging all the information according to the time stamp sequence as the bottom layer of the hash tree to generate the hash tree, checking the hash tree structure among three Orderer nodes, taking the values of all the generated leaf nodes without children as numbers, and taking event codes of other leaf nodes as the numbers to describe the tree by using a child brother representation method;
taking the root of the hash tree as the block data of the block, and calculating the hash as the block head of the block together with the timestamp when the block is generated and the block head of the previous block;
generating a block by a block header of a previous block, a block header of the block, data and a time stamp, and sending the block and the description of the hash tree of the block to a peer node for uplink;
after receiving the message, the Peer node uplinks and returns a confirmation message;
after receiving all the acknowledgements, the Orderer node finishes the uplink and starts the network synchronous operation.
Examples
The embodiment of the invention provides an agricultural product information authentication and fund tracing system based on a block chain, and based on the implementation mode, the agricultural product information authentication and fund tracing system based on the block chain is configured as shown in fig. 2. The system comprises a user operation module, a function module, a block chain module and a storage module, wherein the user operation module comprises an information display and software interaction interface, and a user can perform login registration, information verification and other operations through the module. The function module is realized by the server, corresponding processing is carried out according to the operation request transmitted by the client, corresponding data is returned, and the related data is stored in the local database. The blockchain module needs to implement information verification and intelligent endorsement, and meanwhile, the blockchain is also stored through a local database of the node, and a network structure is also shown in the figure. The system enables information authentication, fund traceability and a block chain to be well combined together by formulating a communication protocol and a standard data interface.
When the consumer checks the information: the consumer clicks the inquiry button on the corresponding interface, the system sends the information to be verified and the corresponding event code to a random Peer node, and after receiving the event code, the Peer node inquires the shortest path from the block corresponding to the event code and the corresponding Hash tree to the leaf from the database; inquiring values of all leaves and two children on the shortest path from a database; calculating the root of the hash tree according to the value and the hash of the verified message; and comparing the calculated root with the data in the block, if the calculated root is the same as the data in the block, returning to be correct, and otherwise, returning to be wrong.
Further, the system adopts an elliptic curve encryption algorithm, and the specific implementation process is as follows:
1. a user A selects an elliptic curve Ep (a, b), and takes a point on the elliptic curve as a base point G;
2. a user A selects a private key K and generates a public key K which is kG;
3. user A transmits Ep (a, B) and points K, G to user B;
4. after receiving the information, the user B encodes the plaintext to be transmitted to a point M (many encoding methods, which are not discussed here) on Ep (a, B), and generates a random integer r (r < n);
5. user B calculates point C1 ═ M + rK; c2 ═ rG;
6. user B transmits C1, C2 to user A;
7. after the user A receives the information, C1-kC2 is calculated, and the result is a point M; because C1-kC2 ═ M + rK-k (rg) ═ M + rK-r (kg) ═ M;
and then the point M is decoded to obtain a plaintext.
In this encrypted communication, if there is a peeper H, it is relatively difficult to see Ep (a, b), K, G, C1, C2 and to do k through K, G or r through C2, G. Therefore, H cannot obtain the plaintext information transmitted between A, B.
The invention can realize the authentication of the consumer on the agricultural product and the tracking of the accurate flow direction of the fund through simple operation, and the invention can better meet the practical requirements of the information authentication of the agricultural product and the fund traceability by improving the Fabric consensus mechanism, improve the surplus structure of the network and increase the network performance.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (10)

1. An agricultural product information authentication and fund tracing method based on a block chain is characterized in that: the method comprises the following steps:
s1, generating a block chain network structure, wherein the block chain network structure comprises a plurality of Peer nodes, Orderer nodes and an Endorer node, and the Endorer node is generated and responsible by an organization responsible for agricultural product approval and a bank responsible for fund flow;
s2, deploying the link code on a Peer node, reading and writing the book by the Peer node, generating a unique event code by the uplink request calculation hash of the received fund or authentication information, and sending the received fund or authentication information and the event code to a corresponding Endorser node endorsement;
s3, after Endorser node endorses, the original information of the uplink request, the signed information, the event code and the time stamp during signing are sent to the Orderer node together;
s4, verifying the information by using the public key of the Endorer node after the Orderer node receives the information sent by the Endorer node, calculating a hash value of all the information through verification, generating a block through the hash value, an event code and a timestamp, sending the block to the Peer node for uplink, and storing the block in a corresponding database;
s5, repeating the steps S2-S4, completing the chain linking of the fund or the authentication information, and performing network synchronization once after each block is out of blocks;
and S6, sending the information to be verified and the corresponding event code to a random Peer node, inquiring the block corresponding to the event code and the root of the hash calculation hash tree from the database by the Peer node, comparing the calculated root with the data in the block, and finishing information authentication and fund tracing.
2. The blockchain-based agricultural product information authentication and fund tracing method according to claim 1, wherein: the Peer nodes are respectively generated into equivalent nodes by a distribution platform, a third-party supervision mechanism and an examining and approving party network mechanism, and are maintained by all the affiliated mechanisms; the Orderer node is generated by a distribution platform, a third-party supervision mechanism and an approver network mechanism respectively and is responsible for one node.
3. The blockchain-based agricultural product information authentication and fund tracing method according to claim 1, wherein: the network synchronization specifically includes: after each Peer node receives an uplink block, calculating the hash of the complete block and putting the hash into a hash table; the hash values of all blocks are stored in each order node, wherein all peer nodes complete the uplink and return acknowledgements to the oederer node.
4. The blockchain-based agricultural product information authentication and fund tracing method according to claim 3, wherein: when the three Orderer nodes receive all the confirmations, the hash values of the hash table are calculated, the three Orderer nodes are checked, one Orderer node broadcasts the hash to all the Peer nodes again after the confirmation, all the Peer nodes calculate the hash values of the hash tables and compare the hash values, if the hash values are correct, the hash values are returned, and if the hash values are incorrect, the account book synchronization is carried out.
5. The blockchain-based agricultural product information authentication and fund tracing method according to claim 1, wherein: the step S3 specifically includes the following steps:
the method comprises the steps that an Endorser node receives required uplink information sent by a Peer node;
judging whether the information belongs to the responsibility range of the Endorser node;
inquiring whether the related information is consistent with the information to be uplinked, if so, carrying out digital signature on the information by using a private key to endorse the information, otherwise, returning to a corresponding Peer node;
and after endorsement, sending the original information, the signed information, the event code and the time stamp during signing to the Orderer node.
6. The blockchain-based agricultural product information authentication and fund tracing method according to claim 1, wherein: the step S4 specifically includes the following steps:
the Orderer verifies the information by using the public key of the Endorser node after receiving the information sent by the Endorser node, calculates a hash value by all the information, packs the hash value, the event code and the timestamp and puts the packed hash value, the event code and the timestamp into an information pool;
when the information waiting for chaining in the information pool is 1024 or the time reaches fifteen minutes, arranging all the information according to the time stamp sequence as the bottom layer of the hash tree to generate the hash tree, checking the hash tree structure among Orderer nodes, taking the values of all the generated leaf nodes without children as numbers, and taking event codes of other leaf nodes as the numbers to describe the tree by using a child brother representation method;
taking the root of the hash tree as the block data of the block, and calculating the hash as the block head of the block together with the timestamp when the block is generated and the block head of the previous block;
generating a block by a block header of a previous block, a block header of the block, data and a time stamp, and sending the block and the description of the hash tree of the block to the Peer node for uplink;
after receiving the message, the Peer node uplinks and returns a confirmation message;
after receiving all the acknowledgements, the Orderer node finishes the uplink and starts the network synchronous operation.
7. The blockchain-based agricultural product information authentication and fund tracing method according to claim 1, wherein: the step S6 specifically includes the following steps:
sending the information to be verified and the corresponding event code to a random peer node;
after receiving the event code, the Peer node queries the block corresponding to the event code and the shortest path from the corresponding Hash tree to the leaf from the database;
inquiring values of all leaves and two children on the shortest path from a database;
calculating the root of the hash tree according to the hash of the values of all the leaves and two children thereof on the shortest path and the verified message;
and comparing the calculated root with the data in the block, if the calculated root is the same as the data in the block, returning to be correct, and otherwise, returning to be wrong.
8. The blockchain-based agricultural product information authentication and fund tracing method according to any one of claims 1 to 7, wherein: an elliptic curve encryption algorithm is adopted in the block chain network structure.
9. An agricultural product information authentication and fund tracing system based on a block chain is characterized in that: the block chain-based agricultural product information authentication and fund tracing method type agricultural product query as claimed in any one of claims 1-8 is adopted.
10. The blockchain-based agricultural product information authentication and fund traceability system of claim 9, wherein: the system comprises a client and a block chain server, wherein the block chain server carries out corresponding processing according to an operation request of the client and returns corresponding data.
CN202210667750.9A 2022-06-14 2022-06-14 Block chain-based agricultural product information authentication and fund tracing method and system Pending CN115063149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210667750.9A CN115063149A (en) 2022-06-14 2022-06-14 Block chain-based agricultural product information authentication and fund tracing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210667750.9A CN115063149A (en) 2022-06-14 2022-06-14 Block chain-based agricultural product information authentication and fund tracing method and system

Publications (1)

Publication Number Publication Date
CN115063149A true CN115063149A (en) 2022-09-16

Family

ID=83201002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210667750.9A Pending CN115063149A (en) 2022-06-14 2022-06-14 Block chain-based agricultural product information authentication and fund tracing method and system

Country Status (1)

Country Link
CN (1) CN115063149A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115374421A (en) * 2022-10-24 2022-11-22 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Electronic certificate management method and device for target object and electronic equipment
CN116071090A (en) * 2023-03-06 2023-05-05 安徽深迪科技有限公司 Product production information traceability system based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115374421A (en) * 2022-10-24 2022-11-22 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Electronic certificate management method and device for target object and electronic equipment
CN116071090A (en) * 2023-03-06 2023-05-05 安徽深迪科技有限公司 Product production information traceability system based on block chain
CN116071090B (en) * 2023-03-06 2023-07-04 安徽深迪科技有限公司 Product production information traceability system based on block chain

Similar Documents

Publication Publication Date Title
US11222331B2 (en) Method and system for blockchain-based gemstone ownership, identity, custody, supply-chain transfer, trading, and secure payments
US20220084013A1 (en) Identity management, smart contract generator, and blockchain mediating system, and related methods
Asgaonkar et al. Solving the buyer and seller’s dilemma: A dual-deposit escrow smart contract for provably cheat-proof delivery and payment for a digital good without a trusted mediator
RU2292589C2 (en) Authentified payment
US6353812B2 (en) Computer-based method and system for aiding transactions
CN108805585A (en) Distributed commodity data storage system, circulation and source tracing method based on block chain
US11824838B2 (en) Providing assertions regarding entities
CN115063149A (en) Block chain-based agricultural product information authentication and fund tracing method and system
US20020162003A1 (en) System and method for providing trusted browser verification
US11356258B2 (en) Methods and systems for distributed cryptographically secured data validation
CN113283957B (en) Entity product transaction method based on blockchain
CN112232828A (en) Power grid data transaction method and system
US20010037318A1 (en) Third party payment in e-commerce
CN110321730A (en) A kind of method, block chain node and the storage medium of operation data processing
CN115456619B (en) Virtual prepaid card issuing system and method based on blockchain technology
US7257554B1 (en) Anonymous purchases while allowing verifiable identities for refunds returned along the paths taken to make the purchases
CN115170132B (en) Payment method suitable for high-speed post network member system
CN117764591A (en) Identity authentication method and system based on blockchain
KR20210125801A (en) Method for Trading Ownership of Products
CN115917571A (en) Internet data use control system
CN116305037A (en) Personal information authorization method, system, device and medium based on blockchain
Du Secure electronic tendering
DE DECKER et al. UNIDENTIFIABILITY AND ACCOUNTABILITY IN ELECTRONIC TRANSACTIONS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination