CN-122022834-A - Agricultural product traceability-oriented block chain consensus method, apparatus, device and medium
Abstract
The invention provides a block chain consensus method, device, equipment and medium for agricultural product tracing, which comprise the steps of obtaining an agricultural product transaction request and an agricultural product tracing alliance chain, wherein the agricultural product tracing alliance chain comprises a plurality of tracing nodes, each tracing node comprises a production node, a detection node and a circulation node, a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes are determined from the agricultural product tracing alliance chain based on rights and interests of each tracing node and node reputation scores, and tracing consensus is carried out based on the agricultural product transaction request and on the candidate production nodes, the candidate detection nodes and the candidate circulation nodes respectively. According to the invention, the plurality of candidate production nodes, the candidate detection nodes and the candidate circulation nodes which can participate in the consensus are comprehensively determined based on the rights and interests evidence and the node reputation scores, and the tracing consensus is carried out based on the candidate production nodes, the candidate detection nodes and the candidate circulation nodes, so that the accuracy of the consensus is improved.
Inventors
- XIAO JING
- LIU XUENING
- DONG LEILEI
- Lian Nan
- Pei zhe
- YIN ZEMING
- WANG BIN
Assignees
- 石河子大学
Dates
- Publication Date
- 20260512
- Application Date
- 20251231
Claims (10)
- 1. A block chain consensus method for agricultural product tracing is characterized by comprising the following steps: The method comprises the steps of obtaining an agricultural product transaction request and an agricultural product tracing alliance chain, wherein the agricultural product tracing alliance chain comprises a plurality of tracing nodes, and the tracing nodes comprise production nodes, detection nodes and circulation nodes; Determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product tracing alliance chain based on the rights and interests evidence and the node reputation scores of the tracing nodes; and tracing and consensus is carried out based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node respectively.
- 2. The agricultural product traceable blockchain consensus method according to claim 1, wherein the determining a plurality of candidate production nodes, candidate detection nodes, and candidate circulation nodes from the agricultural product traceable alliance chain based on the rights evidence and the node reputation score of each traceable node comprises: acquiring average confirmation time of each tracing node in a plurality of blocks, and calculating a reputation threshold of each tracing node based on the average confirmation time; and determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes based on the rights and interests evidence, the node reputation scores and the reputation threshold of each traceable node.
- 3. The agricultural product traceable blockchain consensus method according to claim 1, wherein before determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product traceable alliance chain based on the rights evidence and the node reputation scores of each traceable node, further comprising: Acquiring data uploading quality of each traceable node, participation verification frequency and traceable query accuracy; Calculating node contribution degree of each traceable node based on the data uploading quality, the participation verification frequency and the traceable query accuracy; And calculating the rights and interests evidence of each tracing node based on the node contribution degree.
- 4. The agricultural product traceable blockchain consensus method according to claim 1, wherein before determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product traceable alliance chain based on the rights evidence and the node reputation scores of each traceable node, further comprising: Acquiring multidimensional behavior indexes of each traceable node in historical traceability consensus; And calculating the node reputation scores of the traceable nodes based on the multidimensional behavior indexes.
- 5. The agricultural product traceable blockchain consensus method according to claim 1, wherein the traceable consensus based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node, respectively, comprises: Consensus is carried out on agricultural product source information in the agricultural product transaction request through the candidate production nodes; The candidate detection node is used for consensus of quality inspection information in the agricultural product transaction request; and carrying out consensus on the logistics information in the agricultural product transaction request through the candidate circulation node.
- 6. The agricultural product traceable blockchain consensus method according to any of the claims 1 to 5, wherein after the traceable consensus based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node, respectively, further comprising: and if the traceability consensus fails, carrying out the traceability consensus based on the supplemented agricultural product transaction data.
- 7. The agricultural product traceable blockchain consensus method according to any of the claims 1 to 5, wherein after the traceable consensus based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node, respectively, further comprising: If the traceability consensus is not passed, starting an intelligent contract to arbitrate the agricultural product transaction request, and obtaining an arbitration result; and updating the arbitration result to the node credit management node.
- 8. Agricultural product traceability-oriented block chain consensus device is characterized by comprising: the system comprises a first acquisition module, a first distribution module and a second distribution module, wherein the first acquisition module is configured to acquire an agricultural product transaction request and an agricultural product tracing alliance chain, the agricultural product tracing alliance chain comprises a plurality of tracing nodes, and the tracing nodes comprise production nodes, detection nodes and circulation nodes; A determining module configured to determine a plurality of candidate production nodes, candidate detection nodes, and candidate circulation nodes from the agricultural product tracing alliance chain based on the rights and interests credentials and the node reputation scores for each of the tracing nodes; The first tracing consensus module is configured to perform tracing consensus based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node respectively.
- 9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements the agricultural product traceability oriented blockchain consensus method according to any of claims 1 to 7 when the computer program is executed.
- 10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the agricultural product traceability oriented blockchain consensus method according to any of claims 1 to 7.
Description
Agricultural product traceability-oriented block chain consensus method, apparatus, device and medium Technical Field The invention relates to the technical field of blockchain and agricultural product tracing, in particular to a blockchain consensus method, device, equipment and medium for agricultural product tracing. Background With the rapid development of blockchain technology and Internet of things equipment, agricultural product quality safety traceability has become an important research direction of modern agriculture and food industry. The agricultural product traceability system is widely applied to the key folk fields of fruits and vegetables, grains, livestock and poultry products and the like, and the reliability of the agricultural product traceability system is directly related to the health safety and social stability of consumers. However, with the continuous increase of the complexity of the supply chain, the conventional centralized traceability system cannot meet the requirement of the whole process traceability of modern agricultural products, and particularly, the system faces a great technical challenge in terms of data authenticity and multi-party collaborative verification. The existing blockchain tracing scheme mainly adopts basic consensus mechanisms such as workload certification and rights and interests certification. These schemes, while capable of providing basic data that is not tamper-evident, have significant drawbacks in dealing with the specific scenario of agricultural product traceability. The agricultural product supply chain relates to a plurality of links, and the informatization level and the data acquisition capability of the participants of each link are obviously different, so that the consensus accuracy is lower. Disclosure of Invention The invention provides a block chain consensus method, device, equipment and medium for tracing agricultural products, which are used for solving the defects in the prior art. The invention provides a block chain consensus method for agricultural product tracing, which comprises the following steps: The method comprises the steps of obtaining an agricultural product transaction request and an agricultural product tracing alliance chain, wherein the agricultural product tracing alliance chain comprises a plurality of tracing nodes, and the tracing nodes comprise production nodes, detection nodes and circulation nodes; Determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product tracing alliance chain based on the rights and interests evidence and the node reputation scores of the tracing nodes; and tracing and consensus is carried out based on the agricultural product transaction request and based on the candidate production node, the candidate detection node and the candidate circulation node respectively. According to the blockchain consensus method for agricultural product tracing, provided by the invention, a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes are determined from the agricultural product tracing alliance chain based on the rights and interests evidence and the node reputation scores of the tracing nodes, and the method comprises the following steps: acquiring average confirmation time of each tracing node in a plurality of blocks, and calculating a reputation threshold of each tracing node based on the average confirmation time; and determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes based on the rights and interests evidence, the node reputation scores and the reputation threshold of each traceable node. According to the method for identifying blockchain for tracing agricultural products provided by the invention, before determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product tracing alliance chain based on the rights and interests evidence and the node reputation scores of the tracing nodes, the method further comprises: Acquiring data uploading quality of each traceable node, participation verification frequency and traceable query accuracy; Calculating node contribution degree of each traceable node based on the data uploading quality, the participation verification frequency and the traceable query accuracy; And calculating the rights and interests evidence of each tracing node based on the node contribution degree. According to the method for identifying blockchain for tracing agricultural products provided by the invention, before determining a plurality of candidate production nodes, candidate detection nodes and candidate circulation nodes from the agricultural product tracing alliance chain based on the rights and interests evidence and the node reputation scores of the tracing nodes, the method further comprises: Acquiring mul