CN112256662A - Storage and tracing method, device, equipment and storage medium for agricultural product information block chain - Google Patents

Storage and tracing method, device, equipment and storage medium for agricultural product information block chain Download PDF

Info

Publication number
CN112256662A
CN112256662A CN202011139406.XA CN202011139406A CN112256662A CN 112256662 A CN112256662 A CN 112256662A CN 202011139406 A CN202011139406 A CN 202011139406A CN 112256662 A CN112256662 A CN 112256662A
Authority
CN
China
Prior art keywords
agricultural product
transaction information
information
batch number
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
CN202011139406.XA
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.)
Anhui Agricultural University AHAU
Original Assignee
Anhui Agricultural University AHAU
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 Anhui Agricultural University AHAU filed Critical Anhui Agricultural University AHAU
Priority to CN202011139406.XA priority Critical patent/CN112256662A/en
Publication of CN112256662A publication Critical patent/CN112256662A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1834Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is suitable for the technical field of block chains, and provides a storage and tracing method, a device, equipment and a storage medium for agricultural product information block chains, wherein the storage method for the agricultural product information block chains comprises the following steps: determining agricultural product batch information and an IPFS hash address of agricultural product supply link information under an IPFS; combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain; judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not; if yes, adding a position Hash pointer of the prior transaction information in the current transaction information, and storing the position Hash pointer in the block chain. According to the method provided by the embodiment of the invention, by searching the block chain, when the prior transaction information associated with the agricultural product batch number is judged to exist in the block chain, the position Hash pointer of the prior transaction information is added in the current transaction information to form a storage closed loop in the chain, so that the agricultural product information can be traced later.

Description

Storage and tracing method, device, equipment and storage medium for agricultural product information block chain
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a storage and tracing method, device, equipment and storage medium for an agricultural product information block chain.
Background
People eat the food as days, and China is used as a big agricultural country, so that the method has very important significance for ensuring the planting safety, production safety, green, healthy, pollution-free and sustainable development of agricultural products. The quality safety credible tracing of the agricultural product supply chain is beneficial to the healthy safety and sustainable production of the agricultural products, and the public trust is improved by the visible safety. Therefore, credible agricultural products based on the block chain technology are the research hot spot in the year.
In the existing agricultural product information storage technology based on the block chain, a double-database scheme is mostly adopted to reduce the load on the block chain, the weakness of storage capacity is made up by relying on a centralized relational database, and meanwhile, the verification, the retrieval and the association of data on the chain are efficiently completed by virtue of the advantages of a two-dimensional table formed by the relational database and the relational database. The centralized relational database is fused with the decentralized blockchain technology, so that the performance of agricultural product blockchain storage is high, and meanwhile, the limitation is brought, and the semi-centralized idea can only form a small-range trusted blockchain alliance. Due to the lack of correlation among the stored agricultural product information, the agricultural product information cannot be effectively traced, and the reliability of the block chain alliance is affected.
Therefore, the agricultural product information stored by the existing agricultural product information storage technology based on the block chain is lack of correlation, so that the agricultural product information cannot be effectively traced, and the credibility of the block chain alliance is influenced.
Disclosure of Invention
The embodiment of the invention aims to provide a storage method of an agricultural product information block chain, and aims to solve the problems that the agricultural product information stored by the existing agricultural product information storage technology based on the block chain is lack of correlation, the agricultural product information cannot be effectively traced, and the credibility of a block chain union is influenced.
The embodiment of the invention is realized in such a way that an agricultural product information block chain storage method comprises the steps of determining agricultural product batch information and agricultural product supply link information;
determining an IPFS hash address of the agricultural product supply link information under an IPFS;
combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain in a mode of calling an intelligent contract;
judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not according to the agricultural product batch number;
and when judging that the prior transaction information associated with the agricultural product batch number exists in the block chain, adding a position Hash pointer of the prior transaction information in the current transaction information, and storing the position Hash pointer into the block chain.
Another objective of an embodiment of the present invention is to provide a method for tracing to a source of a block chain of agricultural product information, wherein the agricultural product information is pre-stored on the block chain by using the method for storing a block chain of agricultural product information as described above, which specifically includes the following steps:
determining a batch number of agricultural products to be traced;
judging whether first transaction information associated with the agricultural product batch number exists in the block chain according to the agricultural product batch number;
judging whether a position Hash pointer exists in the first transaction information or not;
when judging that the position Hash pointer exists in the first transaction information, determining second transaction information according to the position Hash pointer, determining the second transaction information as the first transaction information, and returning to the step of judging whether the position Hash pointer exists in the first transaction information;
when judging that no position Hash pointer exists in the first transaction information, determining IPFS Hash addresses in all transaction information;
and acquiring complete agricultural product supply link information according to the IPFS hash address.
Another objective of an embodiment of the present invention is to provide an agricultural product information block chain storage device, including:
the agricultural product traceability information determining unit is used for determining agricultural product batch information and agricultural product supply link information;
the IPFS hash address calculation unit is used for determining the IPFS hash address of the agricultural product supply link information under the IPFS;
the current transaction information generating unit is used for combining the IPFS hash address and the agricultural product batch information to form current transaction information and sending a transaction request to the blockchain in a mode of calling an intelligent contract;
the prior transaction information judging unit is used for judging whether prior transaction information related to the agricultural product batch number exists in the block chain according to the agricultural product batch number;
and the position Hash pointer association unit is used for adding a position Hash pointer of the prior transaction information into the current transaction information and storing the current transaction information into the block chain when the prior transaction information associated with the agricultural product batch number is judged to exist in the block chain.
Another objective of an embodiment of the present invention is to provide an agricultural product information block chain tracing apparatus, including:
the agricultural product batch number determining unit is used for determining the agricultural product batch number to be traced;
the first transaction information determining unit is used for determining first transaction information related to the agricultural product batch number in the block chain according to the agricultural product batch number;
the position Hash pointer judging unit is used for judging whether a position Hash pointer exists in the first transaction information or not;
the second transaction information determining unit is used for determining second transaction information according to the position Hash pointer when the position Hash pointer is judged to exist in the first transaction information, determining the second transaction information as the first transaction information, and returning to the step of judging whether the position Hash pointer exists in the first transaction information or not;
the IPFS Hash address determination unit is used for determining IPFS Hash addresses in all transaction information when judging that no position Hash pointer exists in the first transaction information;
and the agricultural product supply link information acquisition unit is used for acquiring complete agricultural product supply link information according to the IPFS hash address.
It is another object of an embodiment of the present invention to provide a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the agricultural product information blockchain storage method or the agricultural product information blockchain traceability method.
It is another object of an embodiment of the present invention to provide a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, causes the processor to execute the steps of the agricultural product information blockchain storage method or the agricultural product information blockchain traceability method.
Compared with the prior art in which a transaction request is directly sent to a block chain in the form of an intelligent contract to realize the storage process of agricultural product information, the block chain is additionally searched, whether prior transaction information associated with the agricultural product batch number exists in the block chain is judged, when the prior transaction information exists, a Hash pointer at the position of the prior transaction information is added in the current transaction information, and then the storage of the prior transaction information is realized to form a storage closed loop in the chain, namely, the association between the stored agricultural product information is improved, so that when the block chain is used for tracing to the source, after one-time transaction information is obtained, the prior transaction information associated with the transaction information can be sequentially found through the position Hash pointer, and then the agricultural product supply link information is obtained through the IPFS, so that a complete transaction process associated with certain agricultural product batch information is obtained, and the traceability of the agricultural product information is realized.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for storing a block chain of agricultural product information according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of another method for storing a block chain of agricultural product information according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating steps of another method for storing a block chain of agricultural product information according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for tracing a block chain of agricultural product information according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating steps of another agricultural product information blockchain tracing method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a step of another agricultural product information blockchain tracing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an agricultural product information block chain storage device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an agricultural product information block chain tracing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer device for executing an agricultural product information blockchain storage method or an agricultural product information blockchain tracing method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
The invention aims to solve the technical problems that the stored agricultural product information lacks correlation and the agricultural product information cannot be effectively traced in the existing agricultural product information block chain storage technology, the storage method of the existing block chain is improved, whether the block chain has prior transaction information associated with the agricultural product batch number or not is judged firstly in the process of sending a transaction request to the block chain in an intelligent contract mode to realize the storage of the agricultural product information, when the prior transaction information is judged to exist, a position Hash pointer of the prior transaction information is added in the current transaction information, then the prior transaction information is stored to form a storage closed loop in the chain, so that the storage closed loop in the chain is realized, the prior transaction information associated with the transaction information can be sequentially found through the position Hash pointer after one transaction information is acquired when the block chain is utilized subsequently, and then, agricultural product supply link information is acquired through the IPFS, so that a complete transaction flow associated with certain agricultural product batch information is acquired, and the tracing of agricultural product information is realized.
The agricultural product information storage method is improved on the basis of the existing block chain, and the existing block chain is relatively mature in technology and belongs to the common knowledge well known by the technical personnel in the field, so that the invention only simply states the unmodified part, and the technical personnel in the field can know the specific implementation scheme of the invention by combining the conventional block chain technology when reading the invention.
As shown in fig. 1, a flowchart of the steps of the method for storing a block chain of agricultural product information according to an embodiment of the present invention includes the following steps:
step S102, agricultural product batch information and agricultural product supply link information are determined.
In the embodiment of the invention, the agricultural product information is divided according to each link of a supply chain of the agricultural product information, and then the agricultural product information is connected through the defined agricultural product batch numbers, for example, the agricultural product information of the same agricultural product in different links can be respectively obtained by dividing according to the links of antenatal (agricultural material management, planting management and the like), midnatal (processing production, warehousing and the like), postnatal (logistics transportation, graded sales and the like) and supervision.
And step S104, determining the IPFS hash address of the agricultural product supply link information under the IPFS.
In the embodiment of the present invention, an IPFS (internet File System) is a File storage and content distribution network protocol that identifies a File by generating an independent hash value according to the content of the File, rather than identifying the File by a File storage location. That is, only one file with the same content exists in the system, and the addressing address is a hash address, that is, the IPFS hash value of the file.
In the embodiment of the invention, the IPFS supports efficient storage, transmission and maintenance of large-scale structured data or unstructured data, and meanwhile, the IPFS stores the data by establishing a hash deduplication mode for data contents and generates a corresponding IPFS hash address. After the tracing information of different links associated with the agricultural product batch number is stored in the IPFS, corresponding IPFS hash address values associated with the agricultural product batch number are generated, heavy redundancy of data stored in the block chain is greatly reduced, and meanwhile, corresponding original data can be taken out from the IPFS at any time through the IPFS hash address.
In the embodiment of the invention, the data structure of the storage object of the IPFS is Merkle DAG (Merck directed acyclic graph), and the construction of the Merkle DAG is based on Merkle Tree, but the operation of a balanced Tree is not needed, and meanwhile, non-leaf nodes are allowed to contain data. The hash tree of the Merkle DAG is composed of encrypted content blocks, wherein the size of each data block is limited to 256KB, and the IPFS hash address returned by the content block combination has three characteristics: content-based addressing, tamper-resistance, deduplication. The IPFS stores the tracing original data, the divided tracing information is stored in the IPFS, the IPFS divides data blocks, and finally IPFS hash addresses based on the tracing original information are combined. The content stored in the data block has two parts, one part is Link and comprises a related Link array, and the other part comprises stored data content; meanwhile, one Link comprises three parts: link name, data cryptographic hash value, and data size. Storing original traceability information after agricultural product division into an IPFS (Internet protocol file system) in different modes according to the size, creating a MerkleDAG structural object by using the common IPFS add file slice mode for big data, and storing the assembled blocks of the data division blocks by the IPFS; the small data can be processed by using a block instruction, the block adds data by directly operating an IPFS data block, and the processing efficiency can be obviously improved in the scene of processing a large amount of small files. The IPFS is used for storing the original source tracing information of the agricultural products, so that the consumption of storage space is greatly reduced.
And step S106, combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain in a mode of calling an intelligent contract.
In the embodiment of the present invention, similar to the existing blockchain storage manner, the transaction request is sent to the blockchain by invoking the intelligent contract, and considering that invoking the intelligent contract is common knowledge in blockchain technology, the improvement point of the present invention is not here, and is only briefly explained here.
In the embodiment of the invention, an intelligent contract is created for creating a Data part in a transaction body, the Data structure needing to be transmitted into a blockchain is defined in the intelligent contract, then the intelligent contract is deployed into the blockchain network as transaction edition, the ABI coding and the Bytecode coding are needed to be carried out on the intelligent contract when the intelligent contract is deployed, and the Data storage is completed through the Data defined in the intelligent contract when the intelligent contract is called. The external account calls an intelligent contract, a transaction containing data is created, the transaction is sent to a block chain network transaction pool through sendtransmission (), after the block chain nodes pass through a POW consensus algorithm, the transaction is synchronized to all nodes, and meanwhile, link traceability information IPFS hash address values and agricultural product batch numbers which need to be stored are stored and enter the block chain, and data persistence is achieved.
And S108, judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not according to the agricultural product batch number. When it is determined that the prior transaction information associated with the agricultural product batch number exists in the blockchain, executing step S110; when it is determined that prior transaction information associated with the agricultural product batch number does not exist within the blockchain, performing other steps.
In the embodiment of the invention, in the subsequent retrieval process, whether the prior transaction information associated with the agricultural product batch number exists in the block chain can be judged by judging the agricultural product batch number, so that the relevance of the block chain agricultural product information is improved, and the subsequent agricultural product information can be traced conveniently. Reference may be made in detail to fig. 4 and its description that follows.
As a preferred embodiment of the present invention, a BF-DHT retrieval module is constructed, and specifically, a modified Bloom Filter (Bloom Filter) and a Distributed Hash Table (DHT) are combined to implement the retrieval of the transaction information, and specific contents may refer to contents and explanation of fig. 2 and fig. 3.
And step S110, adding a position Hash pointer of the prior transaction information in the current transaction information.
In the embodiment of the invention, when a plurality of prior transaction messages exist, the Hash pointer of the position of the latest prior transaction message is usually added.
And step S112, storing the current transaction information into the block chain.
In the embodiment of the present invention, when the transaction information is stored in the blockchain, it is usually required to be based on the common knowledge in the field of blockchain, and the description thereof is not specifically provided herein.
In the embodiment of the present invention, it can be seen that the transaction information stored in the block chain generally includes three data contents, a corresponding agricultural product batch number, an IPFS Hash address, and a position Hash pointer pointing to the previous transaction information (if present), where the position Hash pointer points to the previous transaction information, and then an IPFS Hash address set of complete agricultural product traceability information can be obtained by using a string of position Hash pointer sets, and further, the corresponding agricultural product supply link information can be obtained from the IPFS by using the IPFS Hash address, and the above process is also a principle of implementing an agricultural product information block chain traceability process.
Compared with the prior art in which a transaction request is directly sent to a block chain in the form of an intelligent contract to realize the storage process of agricultural product information, the block chain is additionally searched, whether prior transaction information associated with the agricultural product batch number exists in the block chain is judged, when the prior transaction information exists, a Hash pointer at the position of the prior transaction information is added in the current transaction information, and then the storage of the prior transaction information is realized to form a storage closed loop in the chain, namely, the association between the stored agricultural product information is improved, so that when the block chain is used for tracing to the source, after one-time transaction information is obtained, the prior transaction information associated with the transaction information can be sequentially found through the position Hash pointer, and then the agricultural product supply link information is obtained through the IPFS, so that a complete transaction process associated with certain agricultural product batch information is obtained, and the traceability of the agricultural product information is realized.
As shown in fig. 2, a flowchart of another method for storing a block chain of agricultural product information according to an embodiment of the present invention is provided as follows.
In the embodiment of the present invention, the difference from the step flowchart of the agricultural product information block chain storage method shown in fig. 1 is that the other steps are executed, specifically:
and S202, carrying out Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value.
In the embodiment of the present invention, it should be noted that the existing block chain is to use a bloom filter, that is, a BF retrieval module to implement retrieval of a transaction information log, specifically, the bloom filter uses a hash function method to map an element to a point on an entire column with a length of n, if there is an element, the point is 1, otherwise, the point is 0, that is, the element with the position of 1 does not necessarily exist in a set, and if the position is 0, the element does not necessarily exist in the set, but as the number of set elements increases, time and space both increase linearly, and the retrieval speed also becomes slow, that is, the bloom filter has an idea of sacrificing accuracy and time to save space, so that the actual retrieval effect is not ideal enough.
In the embodiment of the invention, in order to improve the accuracy of the retrieval effect, a retrieval method combining an improved idea of a distributed Hash table is provided, namely an improved BF-DHT retrieval module, after a transaction passes through a bloom filter, an agricultural product batch number is added in a set, then the agricultural product batch number is encrypted by a Hash algorithm and is used as a Key of the Hash table, then a certain information Value (for example, a position Hash pointer in the transaction information, an identification Value and even the transaction information) related to the transaction information is used as Value and is stored in the Hash table, and a plurality of values can be stored in a corresponding Key set, namely, the association between the agricultural product batch number and the transaction information is backed up. The functions that can be realized by the improved distributed hash table include: when the transaction is retrieved to be 0 through the bloom filter, an agricultural product batch number Key of the transaction is created in the distributed hash table; when the retrieval is 1, the correctness verification of the Hash pointer is completed through the Key and Value in the distributed Hash table, and the retrieval accuracy can be effectively improved by the method.
In the embodiment of the invention, after the transaction information is stored based on the improved BF-DHT retrieval module, a subsequent user can obtain the retrieval Value of the agricultural product batch number, namely the Key Value, by inputting the batch number through the same Hash processing, and then obtain the transaction information by using the < Key, Value > in the Distributed Hash Table (DHT), wherein the transaction information can be compared with the transaction information obtained by retrieving the transaction information log through a Bloom Filter (BF), and the retrieval accuracy is improved through a BF-DHT double verification mode.
As shown in fig. 3, a flowchart of steps of another agricultural product information blockchain storage method according to an embodiment of the present invention is provided as follows.
In the embodiment of the present invention, the difference from the step flowchart of the agricultural product information block chain storage method shown in fig. 2 is that after the step S110, the method further includes:
and step S302, performing Hash calculation on the Hash pointer of the position of the prior transaction information to generate an agricultural product supply link traceability value, and associating the traceability value with an agricultural product batch number retrieval value.
In the embodiment of the invention, the position Hash pointer of the transaction information is stored in the DHT as the Value to realize the association with the agricultural product batch number retrieval Value, namely the Key Value, and the same Hash calculation needs to be carried out on the position Hash pointer of the transaction information. By directly using the position Hash pointer of the transaction information as the Value, compared with the case that the transaction information itself or a set identification Value is used as the Value, the corresponding transaction information can be determined more quickly.
As shown in fig. 4, a step flowchart of an agricultural product information blockchain tracing method provided in an embodiment of the present invention is mainly used for tracing agricultural product information stored by using the agricultural product information blockchain storage method shown in fig. 1, and specifically includes the following steps:
step S402, determining the agricultural product batch number to be traced.
In the embodiment of the invention, the transaction information stored in the block chain generally comprises three data contents, namely an agricultural product batch number, an IPFS Hash address and a Hash pointer (if the transaction information exists) pointing to the position of the last transaction information, and the agricultural product batch number is key information for connecting all links of an agricultural product supply chain, so that the agricultural product batch number is input to obtain the complete transaction information of the agricultural product to be traced.
Step S404, judging whether first transaction information related to the agricultural product batch number exists in the block chain according to the agricultural product batch number.
In an embodiment of the present invention, the first transaction information associated with the agricultural product batch number is transaction information including the agricultural product batch number.
In the embodiment of the present invention, there are countless ways to determine whether the first transaction information associated with the agricultural product batch number exists in the block chain according to the agricultural product batch number, for example, the first transaction information may be obtained by conventionally retrieving a transaction information log through a bloom filter, and if the bloom filter is considered to be improved in the storage process, the retrieval result of the bloom filter may also be verified by using the result of the distributed hash table in combination with the idea of the distributed hash table (specifically, refer to contents of fig. 2 and fig. 3). The following description of fig. 5 and fig. 6 may be referred to specifically.
Step S406, determining whether a position Hash pointer exists in the first transaction information. When it is determined that the position Hash pointer exists in the first transaction information, executing step S408; and executing step S410 when it is determined that the location Hash pointer does not exist in the first transaction information.
Step S408, determining second transaction information according to the position Hash pointer, determining the second transaction information as the first transaction information, and then returning to the step S406.
In the embodiment of the invention, the Hash pointers at the positions in the latest transaction information are found in the block chain through the agricultural product batch numbers, and then the Hash pointers in all the transaction information are sequentially taken out through the pointing of the pointers.
Step S410, determine the IPFS hash address in all transaction information.
In the embodiment of the invention, when the position Hash pointer does not exist in the transaction information any more, the tracing process is finished, all transaction information can be determined at the moment, and IPFS Hash addresses in all transaction information are obtained.
And step S412, acquiring complete agricultural product supply link information according to the IPFS hash address.
In the embodiment of the invention, the IPFS hash address in the IPFS is uniquely corresponding to the agricultural product supply link information, and the agricultural product supply link information can be determined according to the IPFS hash address.
As shown in fig. 5, a flowchart of another method for tracing agricultural product information blockchain according to an embodiment of the present invention is a flowchart of steps of a method for tracing agricultural product information blockchain, where the flowchart of steps mainly implements tracing of agricultural product information stored by using the method for storing agricultural product information blockchain as shown in fig. 2, and is described in detail as follows.
In the embodiment of the present invention, the difference from the step flowchart of the agricultural product information blockchain tracing method shown in fig. 4 is that after the step S402, the method further includes:
and step S502, carrying out Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value.
Step S504, whether first transaction information related to the agricultural product batch number retrieval value exists in the block chain is judged according to the agricultural product batch number retrieval value.
In the embodiment of the invention, when an agricultural product batch number is input, the Key in a Hash table, namely an agricultural product batch number retrieval Value, is obtained by carrying out Hash calculation in a BF-DHT retrieval module, and all Value in a region, namely content related to transaction information, is taken out through the agricultural product batch number retrieval Value, so that bit Hash pointers of all corresponding transaction information in an ether house block chain can be determined; in addition, as can be seen from the content of fig. 4, the Hash pointer at the position in the latest transaction can also be found in the blockchain transaction tree through the agricultural product batch number, and then the Hash pointers in all transaction information are sequentially taken out through the pointing direction of the pointers; and verifying the integrity of the transaction of the agricultural product batch number by comparing the Hash table with the Hash pointer in the transaction tree.
As shown in fig. 6, a step flowchart of another agricultural product information blockchain tracing method provided in an embodiment of the present invention mainly implements tracing of agricultural product information stored by using the agricultural product information blockchain storage method shown in fig. 3, and specifically includes the following steps:
step S602, determining the agricultural product batch number to be traced.
And step S604, carrying out Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value.
And step S606, determining an agricultural product supply link traceability value associated with the agricultural product batch number retrieval value.
And step S608, determining a position Hash pointer according to the agricultural product supply link traceability value.
And step S610, determining transaction information according to the position Hash pointer.
Step S612, determine the IPFS hash address in all transaction information.
And step S614, acquiring complete agricultural product supply link information according to the IPFS hash address.
In the embodiment of the invention, the implementation process is specifically given when the Value is the position Hash pointer of the transaction information, that is, the Value corresponding to the Key in the Hash table is determined to be the Hash Value of the position Hash pointer of the corresponding transaction information.
Fig. 7 is a schematic structural diagram of an agricultural product information block chain storage device according to an embodiment of the present invention, which is described in detail below.
In an embodiment of the present invention, the agricultural product information blockchain storage device includes:
the agricultural product traceability information determining unit 710 is configured to determine agricultural product batch information and agricultural product supply link information.
In the embodiment of the invention, the agricultural product information is divided according to each link of a supply chain of the agricultural product information, and then the agricultural product information is connected through the defined agricultural product batch numbers, for example, the agricultural product information of the same agricultural product in different links can be respectively obtained by dividing according to the links of antenatal (agricultural material management, planting management and the like), midnatal (processing production, warehousing and the like), postnatal (logistics transportation, graded sales and the like) and supervision.
And the IPFS hash address calculation unit 720 is configured to determine an IPFS hash address of the agricultural product supply link information under IPFS.
In the embodiment of the present invention, an IPFS (internet File System) is a File storage and content distribution network protocol that identifies a File by generating an independent hash value according to the content of the File, rather than identifying the File by a File storage location. That is, only one file with the same content exists in the system, and the addressing address is a hash address, that is, the IPFS hash value of the file.
In the embodiment of the invention, the IPFS supports efficient storage, transmission and maintenance of large-scale structured data or unstructured data, and meanwhile, the IPFS stores the data by establishing a hash deduplication mode for data contents and generates a corresponding IPFS hash address. After the tracing information of different links associated with the agricultural product batch number is stored in the IPFS, corresponding IPFS hash address values associated with the agricultural product batch number are generated, heavy redundancy of data stored in the block chain is greatly reduced, and meanwhile, corresponding original data can be taken out from the IPFS at any time through the IPFS hash address.
In the embodiment of the invention, the data structure of the storage object of the IPFS is Merkle DAG (Merck directed acyclic graph), and the construction of the Merkle DAG is based on Merkle Tree, but the operation of a balanced Tree is not needed, and meanwhile, non-leaf nodes are allowed to contain data. The hash tree of the Merkle DAG is composed of encrypted content blocks, wherein the size of each data block is limited to 256KB, and the IPFS hash address returned by the content block combination has three characteristics: content-based addressing, tamper-resistance, deduplication. The IPFS stores the tracing original data, the divided tracing information is stored in the IPFS, the IPFS divides data blocks, and finally IPFS hash addresses based on the tracing original information are combined. The content stored in the data block has two parts, one part is Link and comprises a related Link array, and the other part comprises stored data content; meanwhile, one Link comprises three parts: link name, data cryptographic hash value, and data size. Storing original traceability information after agricultural product division into an IPFS (Internet protocol file system) in different modes according to the size, creating a MerkleDAG structural object by using the common IPFS add file slice mode for big data, and storing the assembled blocks of the data division blocks by the IPFS; the small data can be processed by using a block instruction, the block adds data by directly operating an IPFS data block, and the processing efficiency can be obviously improved in the scene of processing a large amount of small files. The IPFS is used for storing the original source tracing information of the agricultural products, so that the consumption of storage space is greatly reduced.
And a current transaction information generating unit 730, configured to combine the IPFS hash address and the agricultural product batch information to form current transaction information, and send a transaction request to the blockchain in a form of invoking an intelligent contract.
In the embodiment of the present invention, similar to the existing blockchain storage manner, the transaction request is sent to the blockchain by invoking the intelligent contract, and considering that invoking the intelligent contract is common knowledge in blockchain technology, the improvement point of the present invention is not here, and is only briefly explained here.
In the embodiment of the invention, an intelligent contract is created for creating a Data part in a transaction body, the Data structure needing to be transmitted into a blockchain is defined in the intelligent contract, then the intelligent contract is deployed into the blockchain network as transaction edition, the ABI coding and the Bytecode coding are needed to be carried out on the intelligent contract when the intelligent contract is deployed, and the Data storage is completed through the Data defined in the intelligent contract when the intelligent contract is called. The external account calls an intelligent contract, a transaction containing data is created, the transaction is sent to a block chain network transaction pool through sendtransmission (), after the block chain nodes pass through a POW consensus algorithm, the transaction is synchronized to all nodes, and meanwhile, link traceability information IPFS hash address values and agricultural product batch numbers which need to be stored are stored and enter the block chain, and data persistence is achieved.
And the prior transaction information judging unit 740 is configured to judge whether prior transaction information associated with the agricultural product batch number exists in the block chain according to the agricultural product batch number.
In the embodiment of the invention, whether the prior transaction information associated with the agricultural product batch number exists in the block chain is judged by judging the agricultural product batch number so as to improve the relevance of the block chain agricultural product information and facilitate the tracing of the subsequent agricultural product information.
As a preferred embodiment of the present invention, a BF-DHT retrieval module is constructed, and specifically, a modified Bloom Filter (Bloom Filter) and a Distributed Hash Table (DHT) are combined to implement the retrieval of the transaction information, and specific contents may refer to contents and explanation of fig. 2 and fig. 3.
And a position Hash pointer association unit 750, configured to add a position Hash pointer of the previous transaction information to the current transaction information when it is determined that the previous transaction information associated with the agricultural product batch number exists in the block chain.
In the embodiment of the invention, when a plurality of prior transaction messages exist, the Hash pointer of the position of the latest prior transaction message is usually added.
The current transaction information storage unit 760 stores the current transaction information into the block chain.
In the embodiment of the present invention, when the transaction information is stored in the blockchain, it is usually required to be based on the common knowledge in the field of blockchain, and the description thereof is not specifically provided herein.
In the embodiment of the present invention, it can be seen that the transaction information stored in the block chain generally includes three data contents, a corresponding agricultural product batch number, an IPFS Hash address, and a position Hash pointer pointing to the previous transaction information (if present), where the position Hash pointer points to the previous transaction information, and then an IPFS Hash address set of complete agricultural product traceability information can be obtained by using a string of position Hash pointer sets, and further, the corresponding agricultural product supply link information can be obtained from the IPFS by using the IPFS Hash address, and the above process is also a principle of implementing an agricultural product information block chain traceability process.
Compared with the prior art in which a transaction request is directly sent to a block chain in the form of an intelligent contract to realize the storage process of agricultural product information, the block chain is additionally searched, whether prior transaction information associated with the agricultural product batch number exists in the block chain is judged, when the prior transaction information exists, a Hash pointer at the position of the prior transaction information is added in the current transaction information, and then the storage of the prior transaction information is realized to form a storage closed loop in the chain, namely, the association between the stored agricultural product information is improved, so that when the block chain is used for tracing to the source, after one-time transaction information is obtained, the prior transaction information associated with the transaction information can be sequentially found through the position Hash pointer, and then the agricultural product supply link information is obtained through the IPFS, so that a complete transaction process associated with certain agricultural product batch information is obtained, and the traceability of the agricultural product information is realized.
As shown in fig. 8, a schematic structural diagram of an agricultural product information block chain tracing apparatus according to an embodiment of the present invention is described in detail as follows.
The agricultural product batch number determining unit 810 is configured to determine an agricultural product batch number to be traced.
In the embodiment of the invention, the transaction information stored in the block chain generally comprises three data contents, namely an agricultural product batch number, an IPFS Hash address and a Hash pointer (if the transaction information exists) pointing to the position of the last transaction information, and the agricultural product batch number is key information for connecting all links of an agricultural product supply chain, so that the agricultural product batch number is input to obtain the complete transaction information of the agricultural product to be traced.
And a first transaction information determining unit 820, which determines the first transaction information associated with the agricultural product batch number in the block chain according to the agricultural product batch number.
In an embodiment of the present invention, the first transaction information associated with the agricultural product batch number is transaction information including the agricultural product batch number.
The position Hash pointer determining unit 830 is configured to determine whether a position Hash pointer exists in the first transaction information.
And the second transaction information determining unit 840 is configured to determine, when it is determined that the position Hash pointer exists in the first transaction information, second transaction information according to the position Hash pointer, determine the second transaction information as the first transaction information, and then return to the position Hash pointer determining unit 830.
In the embodiment of the invention, the Hash pointers at the positions in the latest transaction information are found in the block chain through the agricultural product batch numbers, and then the Hash pointers in all the transaction information are sequentially taken out through the pointing of the pointers.
And an IPFS Hash address determining unit 850, configured to determine an IPFS Hash address in all transaction information when it is determined that the location Hash pointer does not exist in the first transaction information.
In the embodiment of the invention, when the position Hash pointer does not exist in the transaction information any more, the tracing process is finished, all transaction information can be determined at the moment, and IPFS Hash addresses in all transaction information are obtained.
And an agricultural product supply link information obtaining unit 860, configured to obtain complete agricultural product supply link information according to the IPFS hash address.
In the embodiment of the invention, the IPFS hash address in the IPFS is uniquely corresponding to the agricultural product supply link information, and the agricultural product supply link information can be determined according to the IPFS hash address.
FIG. 9 is a diagram illustrating an internal structure of a computer device in one embodiment. As shown in fig. 9, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by the processor, the processor can realize an agricultural product information block chain storage method or an agricultural product information block chain tracing method. The internal memory may also store a computer program, and when the computer program is executed by the processor, the processor may execute an agricultural product information blockchain storage method or an agricultural product information blockchain traceability method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the agricultural product information blockchain storage device or the agricultural product information blockchain traceability device provided by the present application may be implemented in the form of a computer program, and the computer program may be executed on a computer device as shown in fig. 9. The memory of the computer device may store various program modules constituting the agricultural product information blockchain storage device or the agricultural product information blockchain traceability device, such as the agricultural product traceability information determination unit 710 and the IPFS hash address calculation unit 720 shown in fig. 7, and the agricultural product batch number determination unit 810 and the first transaction information determination unit 820 shown in fig. 8. The computer program formed by the program modules enables the processor to execute the steps in the agricultural product information blockchain storage method or the agricultural product information blockchain traceability method of the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 9 may execute step S102 through the agricultural product traceability information determination unit 710 in the agricultural product information blockchain storage device shown in fig. 7; step S104 may be performed by the IPFS hash address calculation unit 720 in the agricultural product information blockchain storage device as shown in fig. 7; the computer device shown in fig. 9 may execute step S402 by the agricultural product batch number determining unit 810 in the agricultural product information blockchain tracing apparatus shown in fig. 8; step S404 may be performed by the first transaction information determining unit in the agricultural product information blockchain traceability device as shown in fig. 8.
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
determining agricultural product batch information and agricultural product supply link information;
determining an IPFS hash address of the agricultural product supply link information under an IPFS;
combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain in a mode of calling an intelligent contract;
judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not according to the agricultural product batch number;
and when judging that the prior transaction information associated with the agricultural product batch number exists in the block chain, adding a position Hash pointer of the prior transaction information in the current transaction information, and storing the position Hash pointer into the block chain.
In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of:
determining agricultural product batch information and agricultural product supply link information;
determining an IPFS hash address of the agricultural product supply link information under an IPFS;
combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain in a mode of calling an intelligent contract;
judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not according to the agricultural product batch number;
and when judging that the prior transaction information associated with the agricultural product batch number exists in the block chain, adding a position Hash pointer of the prior transaction information in the current transaction information, and storing the position Hash pointer into the block chain.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. An agricultural product information blockchain storage method is characterized by comprising the following steps:
determining agricultural product batch information and agricultural product supply link information;
determining an IPFS hash address of the agricultural product supply link information under an IPFS;
combining the IPFS hash address and the agricultural product batch information to form current transaction information, and sending a transaction request to a block chain in a mode of calling an intelligent contract;
judging whether prior transaction information associated with the agricultural product batch number exists in the block chain or not according to the agricultural product batch number;
and when judging that the prior transaction information associated with the agricultural product batch number exists in the block chain, adding a position Hash pointer of the prior transaction information in the current transaction information, and storing the position Hash pointer into the block chain.
2. The agricultural product information blockchain storage method according to claim 1, further comprising, after the step of determining whether there is prior transaction information associated with the agricultural product batch number within a blockchain according to the agricultural product batch number:
and when judging that no prior transaction information associated with the agricultural product batch number exists in the block chain, performing Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value, and storing the current transaction information into the block chain.
3. The method for storing the blockchain of agricultural product information according to claim 2, wherein after the step of adding the Hash pointer of the position of the prior transaction information to the current transaction information, the method further comprises:
and performing Hash calculation on the Hash pointer of the position of the prior transaction information to generate an agricultural product supply link traceability value, and associating the traceability value with an agricultural product batch number retrieval value.
4. An agricultural product information blockchain traceability method, wherein agricultural product information is pre-stored on a blockchain through the agricultural product information blockchain storage method according to claim 1, comprising the following steps:
determining a batch number of agricultural products to be traced;
judging whether first transaction information associated with the agricultural product batch number exists in the block chain according to the agricultural product batch number;
judging whether a position Hash pointer exists in the first transaction information or not;
when judging that the position Hash pointer exists in the first transaction information, determining second transaction information according to the position Hash pointer, determining the second transaction information as the first transaction information, and returning to the step of judging whether the position Hash pointer exists in the first transaction information;
when judging that no position Hash pointer exists in the first transaction information, determining IPFS Hash addresses in all transaction information;
and acquiring complete agricultural product supply link information according to the IPFS hash address.
5. An agricultural product information blockchain traceability method, wherein agricultural product information is pre-stored on a blockchain through the agricultural product information blockchain storage method according to claim 2, comprising the following steps:
determining a batch number of agricultural products to be traced;
carrying out Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value;
judging whether first transaction information associated with the agricultural product batch number retrieval value exists in the block chain according to the agricultural product batch number retrieval value;
judging whether a position Hash pointer exists in the first transaction information or not;
when judging that the position Hash pointer exists in the first transaction information, determining second transaction information according to the position Hash pointer, determining the second transaction information as the first transaction information, and returning to the step of judging whether the position Hash pointer exists in the first transaction information;
when judging that no position Hash pointer exists in the first transaction information, determining IPFS Hash addresses in all transaction information;
and acquiring complete agricultural product supply link information according to the IPFS hash address.
6. An agricultural product information blockchain traceability method, wherein agricultural product information is pre-stored on a blockchain through the agricultural product information blockchain storage method according to claim 3, comprising the following steps:
determining a batch number of agricultural products to be traced;
carrying out Hash calculation on the agricultural product batch number to generate an agricultural product batch number retrieval value;
determining an agricultural product supply link traceability value associated with the agricultural product batch number retrieval value;
determining a position Hash pointer according to the agricultural product supply link traceability value;
determining transaction information according to the position Hash pointer;
determining IPFS hash addresses in all transaction information;
and acquiring complete agricultural product supply link information according to the IPFS hash address.
7. An agricultural product information blockchain storage device, comprising:
the agricultural product traceability information determining unit is used for determining agricultural product batch information and agricultural product supply link information;
the IPFS hash address calculation unit is used for determining the IPFS hash address of the agricultural product supply link information under the IPFS;
the current transaction information generating unit is used for combining the IPFS hash address and the agricultural product batch information to form current transaction information and sending a transaction request to the blockchain in a mode of calling an intelligent contract;
the prior transaction information judging unit is used for judging whether prior transaction information related to the agricultural product batch number exists in the block chain according to the agricultural product batch number;
and the position Hash pointer association unit is used for adding a position Hash pointer of the prior transaction information into the current transaction information and storing the current transaction information into the block chain when the prior transaction information associated with the agricultural product batch number is judged to exist in the block chain.
8. An agricultural product information blockchain traceability device, comprising:
the agricultural product batch number determining unit is used for determining the agricultural product batch number to be traced;
the first transaction information determining unit is used for determining first transaction information related to the agricultural product batch number in the block chain according to the agricultural product batch number;
the position Hash pointer judging unit is used for judging whether a position Hash pointer exists in the first transaction information or not;
the second transaction information determining unit is used for determining second transaction information according to the position Hash pointer when the position Hash pointer is judged to exist in the first transaction information, determining the second transaction information as the first transaction information, and returning to the step of judging whether the position Hash pointer exists in the first transaction information or not;
the IPFS Hash address determination unit is used for determining IPFS Hash addresses in all transaction information when judging that no position Hash pointer exists in the first transaction information;
and the agricultural product supply link information acquisition unit is used for acquiring complete agricultural product supply link information according to the IPFS hash address.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the agricultural product information blockchain storage method of any of claims 1 to 3 or the agricultural product information blockchain traceability method of any of claims 4 to 6.
10. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of the agricultural product information blockchain storage method according to any one of claims 1 to 3 or the agricultural product information blockchain traceability method according to any one of claims 4 to 6.
CN202011139406.XA 2020-10-22 2020-10-22 Storage and tracing method, device, equipment and storage medium for agricultural product information block chain Pending CN112256662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011139406.XA CN112256662A (en) 2020-10-22 2020-10-22 Storage and tracing method, device, equipment and storage medium for agricultural product information block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011139406.XA CN112256662A (en) 2020-10-22 2020-10-22 Storage and tracing method, device, equipment and storage medium for agricultural product information block chain

Publications (1)

Publication Number Publication Date
CN112256662A true CN112256662A (en) 2021-01-22

Family

ID=74264696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011139406.XA Pending CN112256662A (en) 2020-10-22 2020-10-22 Storage and tracing method, device, equipment and storage medium for agricultural product information block chain

Country Status (1)

Country Link
CN (1) CN112256662A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
CN112860801A (en) * 2021-03-15 2021-05-28 智显互联(深圳)股份有限公司 Commercial display industry supply chain information storage system and information storage and retrieval method thereof
CN113191706A (en) * 2021-04-02 2021-07-30 南京博雅区块链研究院有限公司 Logistics transportation auxiliary system and method based on block chain
CN113610482A (en) * 2021-06-03 2021-11-05 杭州数澜科技有限公司 System, method, electronic device and computer readable medium for tracing events
CN113743955A (en) * 2021-08-06 2021-12-03 广西综合交通大数据研究院 Food material traceability data security access control method based on intelligent contract
WO2022225446A1 (en) * 2021-04-22 2022-10-27 Asia Green Fund Management Limited Method and system for trading assets and their carbon footprint status
CN115544047A (en) * 2022-11-25 2022-12-30 浙江非线数联科技股份有限公司 Block chain-based distributed supply chain tracing and information storage method and system
CN116051125A (en) * 2022-12-21 2023-05-02 浙江由由科技有限公司 Agricultural product traceability method and system based on image recognition
CN117407467A (en) * 2023-12-15 2024-01-16 烟台大学 Block chain code storage system combining bloom filter and DHT

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN109146524A (en) * 2018-08-22 2019-01-04 周口师范学院 A kind of agricultural product using block chain technology are traced to the source information security solution
CN109191003A (en) * 2018-09-25 2019-01-11 仲恺农业工程学院 Fruits and vegetables agricultural product quality safety traceability system based on block chain
CN110061838A (en) * 2019-04-28 2019-07-26 广州大学 A kind of the decentralization storage system and its realization, information retrieval method of DNS resource record
CN110059054A (en) * 2019-03-25 2019-07-26 天津大学 It is a kind of based on the information of vehicles of block chain and IPFS storage and search method
CN110188243A (en) * 2019-05-10 2019-08-30 北京农业信息技术研究中心 A kind of anti-fake information storage and method for quickly querying and the device of tracing to the source of agricultural product
KR102065315B1 (en) * 2019-10-04 2020-01-13 주식회사 도우테크 System and method for keeping and sharing a file based on block chain network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN109146524A (en) * 2018-08-22 2019-01-04 周口师范学院 A kind of agricultural product using block chain technology are traced to the source information security solution
CN109191003A (en) * 2018-09-25 2019-01-11 仲恺农业工程学院 Fruits and vegetables agricultural product quality safety traceability system based on block chain
CN110059054A (en) * 2019-03-25 2019-07-26 天津大学 It is a kind of based on the information of vehicles of block chain and IPFS storage and search method
CN110061838A (en) * 2019-04-28 2019-07-26 广州大学 A kind of the decentralization storage system and its realization, information retrieval method of DNS resource record
CN110188243A (en) * 2019-05-10 2019-08-30 北京农业信息技术研究中心 A kind of anti-fake information storage and method for quickly querying and the device of tracing to the source of agricultural product
KR102065315B1 (en) * 2019-10-04 2020-01-13 주식회사 도우테크 System and method for keeping and sharing a file based on block chain network

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
WANG KEKE 等: "Efficient traceability system for quality and safety of agricultural products based on consortium blockchain", JOURNAL OF COMPUTER APPLICATIONS, 8 August 2019 (2019-08-08), pages 2438 - 2443 *
刘家稷;杨挺;汪文勇;: "使用双区块链的防伪溯源系统", 信息安全学报, no. 03, 15 May 2018 (2018-05-15), pages 17 - 29 *
徐科;梁泽华;孙媛;: "基于区块链技术的中药材质量追溯研究与体系构建", 现代计算机(专业版), no. 32, 15 November 2018 (2018-11-15), pages 67 - 72 *
杨晨雪;孙志国;: "基于区块链技术的农产品供应链数据管理系统设计", 农业大数据学报, no. 02, 26 June 2020 (2020-06-26), pages 74 - 83 *
林波;杨睿哲;杨兆鑫;金凯;张延华;: "基于区块链和边缘计算的智慧农业系统", 情报工程, no. 03, 15 June 2018 (2018-06-15), pages 14 - 20 *
肖博 等: "基于联盟链的制造供应链质量追溯研究", 国外电子测量技术, 15 September 2020 (2020-09-15), pages 19 - 24 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819468A (en) * 2021-02-24 2021-05-18 浙江蓝景科技有限公司 Intelligent contract processing method and device and electronic equipment
CN112860801A (en) * 2021-03-15 2021-05-28 智显互联(深圳)股份有限公司 Commercial display industry supply chain information storage system and information storage and retrieval method thereof
CN113191706A (en) * 2021-04-02 2021-07-30 南京博雅区块链研究院有限公司 Logistics transportation auxiliary system and method based on block chain
WO2022225446A1 (en) * 2021-04-22 2022-10-27 Asia Green Fund Management Limited Method and system for trading assets and their carbon footprint status
CN113610482A (en) * 2021-06-03 2021-11-05 杭州数澜科技有限公司 System, method, electronic device and computer readable medium for tracing events
CN113743955A (en) * 2021-08-06 2021-12-03 广西综合交通大数据研究院 Food material traceability data security access control method based on intelligent contract
CN115544047A (en) * 2022-11-25 2022-12-30 浙江非线数联科技股份有限公司 Block chain-based distributed supply chain tracing and information storage method and system
CN115544047B (en) * 2022-11-25 2023-03-10 浙江非线数联科技股份有限公司 Distributed supply chain tracing and information storage method and system based on block chain
CN116051125A (en) * 2022-12-21 2023-05-02 浙江由由科技有限公司 Agricultural product traceability method and system based on image recognition
CN117407467A (en) * 2023-12-15 2024-01-16 烟台大学 Block chain code storage system combining bloom filter and DHT
CN117407467B (en) * 2023-12-15 2024-03-22 烟台大学 Block chain code storage system combining bloom filter and DHT

Similar Documents

Publication Publication Date Title
CN112256662A (en) Storage and tracing method, device, equipment and storage medium for agricultural product information block chain
US11475034B2 (en) Schemaless to relational representation conversion
CN102460404B (en) Generate obfuscated data
CN111177302A (en) Business document processing method and device, computer equipment and storage medium
CN111190901B (en) Business data storage method and device, computer equipment and storage medium
CN115544007A (en) Label preprocessing method and device, computer equipment and storage medium
CN105930354B (en) Storage model conversion method and device
CN111552696A (en) Data processing method and device based on big data, computer equipment and medium
CN114138781A (en) Policy data updating method and device, computer equipment and readable storage medium
CN112433753A (en) Interface document generation method, device, equipment and medium based on parameter information
CN111679963A (en) User behavior data processing method, device, equipment and storage medium
CN109460500B (en) Hotspot event discovery method and device, computer equipment and storage medium
Millham et al. Pattern mining algorithms
CN113821517A (en) Data synchronization method, device, equipment and storage medium
CN115495452A (en) Data processing method, data processing device, computer equipment and storage medium
CN115795187A (en) Resource access method, device and equipment
Jang et al. A Comparison of the Query Execution Algorithms in Secure Database System.
Yan et al. Dynamic forward secure searchable encryption scheme with phrase search for smart healthcare
CN113934729A (en) Data management method based on knowledge graph, related equipment and medium
CN112416966A (en) Ad hoc query method, apparatus, computer device and storage medium
CN112862449A (en) Structural chemical industry bill generation method and device, computer equipment and storage medium
Frye et al. Big data storage techniques for spatial databases: implications of big data architecture on spatial query processing
CN115622700B (en) Electricity consumption data encryption searching method and device, computer equipment and storage medium
CN114385630A (en) Blood relationship combing method, apparatus, device, storage medium, and program product
CN111046241B (en) Graph storage method and device for flow graph processing

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