CN115482012A - Grain and oil food credibility tracing method and equipment based on block chain - Google Patents

Grain and oil food credibility tracing method and equipment based on block chain Download PDF

Info

Publication number
CN115482012A
CN115482012A CN202211113376.4A CN202211113376A CN115482012A CN 115482012 A CN115482012 A CN 115482012A CN 202211113376 A CN202211113376 A CN 202211113376A CN 115482012 A CN115482012 A CN 115482012A
Authority
CN
China
Prior art keywords
data
grain
oil food
block chain
block
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
CN202211113376.4A
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.)
Inspur Industrial Internet Co Ltd
Original Assignee
Inspur Industrial Internet Co Ltd
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 Inspur Industrial Internet Co Ltd filed Critical Inspur Industrial Internet Co Ltd
Priority to CN202211113376.4A priority Critical patent/CN115482012A/en
Publication of CN115482012A publication Critical patent/CN115482012A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/04Manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Manufacturing & Machinery (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a grain and oil food credibility tracing method and equipment based on a block chain, belongs to the technical field of the block chain, and is used for solving the technical problems that the authenticity and the transparency of grain and oil food data cannot be ensured and the full supply chain data of the grain and oil food cannot be traced by the existing grain and oil food data storage method. The method comprises the following steps: carrying out format verification on grain and oil food data of each supply link in a block chain node through an intelligent contract; acquiring data abstract information of grain and oil food data in each supply link; encrypting the data abstract information by a digital signature technology to obtain corresponding signature data; according to the signature data, verifying the grain and oil food data uploaded by the user in each supply link, and storing the grain and oil food data into a cloud database after the verification is passed; determining a data index code according to grain and oil food data stored in a cloud database; and performing consensus verification on the data index codes and storing the data index codes into the latest data block so as to store the data index codes into the block chain.

Description

Grain and oil food credibility tracing method and equipment based on block chain
Technical Field
The application relates to the technical field of block chains, in particular to a grain and oil food credibility tracing method and equipment based on the block chains.
Background
The grain and oil food is a necessity for human life, and the safety of the supply chain is directly related to the health of people. In recent years, food safety accidents and safety problems are frequently seen, the physical health safety of consumers is seriously threatened, and the public requirements on food quality safety are continuously increased.
The grain and oil food comprises finished grain, raw grain oil and fat, related processed products and the like, is a necessity for human life, ensures the safety of grain and oil food supply, and has great significance for the life health of the people and the harmonious development of the society. At present, the food supply link of grain and oil has many safety problems, such as food-borne diseases caused by pesticide residue exceeding the standard and industrial pollution, illegal operation of production and processing links, illegal use of food additives, storage and transportation safety problems, counterfeit and pseudo-inferior products and the like. The existing grain and oil food data storage method cannot guarantee the authenticity and transparency of the grain and oil food data and cannot trace the full supply chain data of the grain and oil food, so that the safety problem of the grain and oil food is still solved.
Disclosure of Invention
The embodiment of the application provides a grain and oil food credibility tracing method and equipment based on a block chain, which are used for solving the following technical problems: the existing grain and oil food data storage method cannot guarantee the authenticity and transparency of the grain and oil food data and cannot trace the full supply chain data of the grain and oil food.
The embodiment of the application adopts the following technical scheme:
on one hand, the embodiment of the application provides a block chain-based grain and oil food credibility tracing method, which comprises the following steps: carrying out format verification on grain and oil food data of each supply link in a block chain node through an intelligent contract; after the verification is passed, acquiring data abstract information of grain and oil food data in each supply link; encrypting the data abstract information by a digital signature technology to obtain corresponding signature data; according to the signature data, verifying the grain and oil food data uploaded by the user in each supply link, and storing the grain and oil food data uploaded by the user in each supply link into a cloud database after the verification is passed; determining a data index code according to the grain and oil food data stored in the cloud database; and performing consensus verification on the data index code, storing the data index code into a latest data block, and linking the latest data block with a previous-level data block so as to store the data index code into a block chain.
In one possible embodiment, before performing format verification on the supply link food and grain data in the blockchain node through the intelligent contract, the method further comprises: compiling and generating codes according to the protocol clause content of the enterprise related to each supply link, obtaining an intelligent contract after compiling, and issuing the intelligent contract to each block chain node; wherein, the agreement clause content comprises the data format requirement commonly set by the enterprises; and after the validity of the intelligent contract is identified and verified by each block link point, the intelligent contract is broadcasted in the whole network to complete the intelligent contract deployment.
In one possible implementation, after the intelligent contract is fully network-broadcasted to complete intelligent contract deployment, the method further includes: respectively uploading grain and oil food data of each supply link to corresponding block link points in a grain and oil food supply chain; wherein each of the supply links comprises: a production link, a processing link, a storage link, a logistics link and a sales link; the grain and oil food data of the production link at least comprises the following data: planting time, harvesting time and product batch; the grain, oil and food data of the processing link at least comprises the following steps: product numbering and processing procedures; the grain, oil and food data of the storage link at least comprises the following data: warehouse serial number and warehouse-in and warehouse-out time; the grain and oil food data of the logistics link at least comprises the following data: transport vehicles, transport personnel; the grain and oil food data of the sales link at least comprises the following data: sales location, salesperson.
In a feasible implementation manner, the format verification of the grain and oil food data of each supply link in the block chain nodes is carried out through an intelligent contract, and the method specifically comprises the following steps: judging whether the grain and oil food data in the block chain nodes meet the requirement of a data format or not through the intelligent contract; if the grain and oil food data in the block chain nodes meet the requirement of the data format, carrying out integrity verification on the grain and oil food data; if the grain and oil food data in the block chain nodes do not meet the data format requirement, format processing is carried out on the grain and oil food data through a preset code, and integrity verification is carried out after the grain and oil food data meet the data format requirement; and after the integrity verification is finished, each block chain link point checks whether the result of the integrity verification is correct, if so, the result of the integrity verification is broadcasted to all the block chain nodes, and the result is stored in the block chain for evidence storage.
In a feasible implementation manner, after the verification is passed, data summary information of grain and oil food data in each supply link is acquired, and the data summary information is encrypted by a digital signature technology to obtain corresponding signature data, which specifically includes: respectively carrying out Hash operation on the grain and oil food data of each supply link through a preset Hash algorithm to obtain data abstract information corresponding to the grain and oil food data of each supply link, and determining the data abstract information as first data abstract information; generating a pair of public key and private key by asymmetric cryptography technology; encrypting first data summary information corresponding to the grain and oil food data of each supply link through the private key to obtain signature data corresponding to the grain and oil food data of each supply link; and uploading the signature data corresponding to the grain, oil and food data of each supply link to the cloud database.
In a possible implementation manner, according to the signature data, verifying the grain and oil food data of each supply link uploaded by the user, and after the verification is passed, storing the grain and oil food data of each supply link uploaded by the user into a cloud database, specifically comprising: decrypting the signature data uploaded to the cloud database through the public key to obtain first data summary information corresponding to the grain and oil food data of each supply link; performing hash operation on the grain and oil food data of each supply link uploaded to the cloud database by a user through the preset hash algorithm to obtain corresponding second data summary information; wherein, the user is an enterprise related to each supply link; and comparing the second data summary information with the first data summary information, if the comparison result is consistent, storing the grain and oil food data uploaded by the user into the cloud database, and if the comparison result is inconsistent, determining that the grain and oil food data uploaded by the user is tampered and cannot be stored into the cloud database.
In a possible implementation manner, determining a data index code according to the grain and oil food data stored in the cloud database specifically includes: extracting product brief information from the grain and oil food data of each supply link stored in the cloud database; wherein the product profile information includes at least: date, product lot code; and carrying out Hash operation on the product brief information and the Hash value of the grain and oil food data stored in the cloud database together to obtain the data index code.
In a possible implementation manner, performing consensus verification on the data index code and storing the data index code into a latest data block, and linking the latest data block with a previous-stage data block to store the data index code into a block chain specifically includes: sending the product brief information and the data index code to a block chain through a block chain node which is maintained independently, and broadcasting the product brief information and the data index code to all the block chain nodes; after the common identification verification is carried out on the product brief information and the data index codes by all the block link points, the product brief information and the data index codes are stored into a latest data block, the latest data block is linked to a previous-stage data block, and the process of storing the data index codes into a block chain is completed; and the block head of the latest data block is packaged with the hash value of the data block at the upper stage, the version number of the current block, the timestamp and the product brief information.
In a possible implementation manner, after performing consensus verification on the data index code and storing a latest data block, and linking the latest data block with a previous-stage data block to store the data index code in a block chain, the method further includes: in response to an operation of a consumer or a regulatory agency inputting a product batch code, locating a block header containing the product batch code in a block chain, and determining a corresponding target data block according to the block header; calling out a stored data index code in the target data block; and searching corresponding grain and oil food data of each supply link in the cloud database according to the data index code so as to enable the consumer to trace the full supply chain data of the grain and oil food corresponding to the product batch code.
On the other hand, this application embodiment still provides a grain and oil food credibility equipment of traceing back based on block chain, and the equipment includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a block chain based grain and oil food credibility tracing method according to any of the above embodiments.
The block chain-based grain and oil food credibility tracing method and equipment provided by the application realize the supervision and product tracing of the links from production to distribution and circulation of the grain and oil food, enable data on a grain and oil food supply chain to be more transparent and reliable, break information islands among enterprises in different links, accurately position a problem occurrence link, solve the trust-related problems faced by food safety at present, and improve the dilemma that the trust degree of the public in the current society on food safety and the government supervision and spot inspection qualification rate have a fall. The traceability and the safety of food are further enhanced, the transparency of a grain and oil food supply chain is improved, and the method has certain significance for guaranteeing the food quality safety and the national diet health.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts. In the drawings:
fig. 1 is a flowchart of a block chain-based grain and oil food credibility tracing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a credible grain and oil food traceability model provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a block chain-based grain and oil food credible traceability device provided in an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present disclosure.
The embodiment of the application provides a block chain-based grain and oil food credibility tracing method, and as shown in fig. 1, the block chain-based grain and oil food credibility tracing method specifically comprises the following steps of S101-S105:
s101, carrying out format verification on grain and oil food data of each supply link in the block chain nodes through an intelligent contract.
Specifically, before uploading grain and oil food data, firstly, compiling and generating codes according to the protocol clause content of enterprises related to each supply link, obtaining an intelligent contract after compiling, and issuing the intelligent contract to each block chain node. The contents of the agreement clauses contain the data format requirements commonly set by enterprises. And then carrying out consensus verification on the effectiveness of the intelligent contracts at each block link point, and broadcasting the intelligent contracts in the whole network to complete intelligent contract deployment.
Further, the grain and oil food data of each supply link in the grain and oil food supply chain are respectively uploaded to corresponding block chain nodes. Wherein, each supply link includes: a production link, a processing link, a storage link, a logistics link and a sales link; the grain and oil food data of the production link at least comprises the following steps: planting time, harvesting time and product batch; the grain and oil food data of the processing link at least comprises the following data: product numbering and processing procedures; the grain and oil food data of the storage link at least comprises the following steps: warehouse serial numbers and warehouse-in and warehouse-out time; the grain, oil and food data of the logistics link at least comprise: transport vehicles, transport personnel; the grain and oil food data of the selling link at least comprises the following steps: sales location, salesperson.
And further, judging whether the grain and oil food data in the block chain nodes meet the requirement of a data format or not through an intelligent contract. If the grain and oil food data in the block chain nodes meet the requirement of the data format, carrying out integrity verification on the grain and oil food data; and if the grain and oil food data in the block chain nodes do not meet the data format requirement, format processing is carried out on the grain and oil food data through a preset code, and integrity verification is carried out after the grain and oil food data meet the data format requirement.
After the integrity verification is finished, each block chain link point checks whether the integrity verification result is correct, if so, the integrity verification result is broadcasted to all block chain nodes, and the integrity verification result is stored in the block chain for evidence storage.
As a feasible implementation mode, the production link refers to harvesting of grain and oil food and recording of relevant information (planting time, harvesting time, product batch and the like), the processing link includes drying, shelling, processing and other works of the harvested products and recording of information (product numbers, processing procedures and the like), the storage link records information of storage (warehouse numbers, warehousing-in and warehousing-out time and the like), the logistics link includes logistics transportation (transportation vehicles, transportation personnel and the like) of the harvested products and processed finished products, and the sales link refers to sales (sales places of sale, sales personnel and the like) of the processed finished products, so that supervision and tracing of the whole supply link from harvesting of the grain and oil food to sales of the finished products are completed.
According to the intelligent contract uploading method and device, the intelligent contract is introduced before data uploading, grain and oil food data uploaded by each block link point are required to follow the specification of the intelligent contract, and the data can be uploaded successfully only if the data meet the requirements of the intelligent contract conditions. Because the information data formats uploaded by different enterprises are different, the data of different nodes are judged through intelligent contracts, and then the data are verified through a digital signature technology and uploaded to and stored in a database. The specific process is as follows: carrying out Hash operation on grain and oil food data to obtain data summary information, then generating a public key and a private key through asymmetric cryptography, encrypting the grain and oil food data through the private key, after the encrypted signature data are uploaded to a cloud database, decrypting the received signature data through the public key by the cloud database, carrying out Hash operation on the grain and oil food data to be uploaded by a user by using the same Hash operation method after decryption is finished, comparing the obtained data summary information with the data summary information obtained after the digital signature is decrypted, if the comparison result is consistent, the data are proved to be true and reliable without being tampered, and if the result is inconsistent, the data are not verified and cannot be stored in the database. Through the digital signature technology, the data stored in the cloud database by each enterprise is effective and credible, so that the authenticity of a large amount of grain and oil food data in the cloud database is ensured.
And S102, acquiring data abstract information of the grain and oil food data in each supply link after the verification is passed. And encrypting the data abstract information by a digital signature technology to obtain corresponding signature data.
Specifically, hash operation is respectively carried out on the grain and oil food data of each supply link through a preset hash algorithm to obtain data summary information corresponding to the grain and oil food data of each supply link, and the data summary information is determined as first data summary information. And then generating a pair of public key and private key by asymmetric cryptography technology, and encrypting the first data summary information corresponding to the grain and oil food data of each supply link by the private key to obtain signature data corresponding to the grain and oil food data of each supply link. And uploading signature data corresponding to the grain, oil and food data of each supply link to a cloud database.
S103, verifying the grain and oil food data uploaded by the user in each supply link according to the signature data, and storing the grain and oil food data uploaded by the user in the cloud database after the verification is passed.
Specifically, the cloud database decrypts the signature data through the generated public key to obtain first data summary information corresponding to the grain and oil food data in each supply link. And then carrying out hash operation on the grain and oil food data of each supply link uploaded to the cloud database by the user through a preset hash algorithm to obtain corresponding second data summary information. Wherein, the user is an enterprise related to each supply link.
Further, the cloud database compares the second data summary information with the first data summary information, if the comparison result is consistent, the grain and oil food data uploaded by the user are stored in the cloud database, and if the comparison result is inconsistent, it is determined that the grain and oil food data uploaded by the user are tampered and cannot be stored in the cloud database.
And S104, determining a data index code according to the grain and oil food data stored in the cloud database.
Specifically, product brief information is extracted from the grain and oil food data of each supply link stored in the cloud database. Wherein the product profile includes at least: date, product lot code. And performing Hash operation on the product brief information and the Hash value of the grain and oil food data stored in the cloud database to obtain a data index code.
And S105, performing consensus verification on the data index codes, storing the data index codes into the latest data block, and linking the latest data block with the previous-stage data block to store the data index codes into the block chain.
Specifically, the product brief information and the data index code are sent to the blockchain through the independently maintained blockchain nodes and are broadcast to all the blockchain nodes. After the product brief information and the data index code are subjected to consensus verification at all the block link points, the product brief information and the data index code are stored into the latest data block, the latest data block is linked to the previous-stage data block, and the process of storing the data index code into the block chain is completed. The block header of the latest data block is packaged with the hash value, the current block version number, the timestamp and the product brief information of the previous data block.
Further, in response to the consumer or the regulatory agency entering the product batch code, a block header containing the product batch code is located in the block chain, and a corresponding target data block is determined according to the block header. Calling out a stored data index code in the target data block; and searching corresponding grain and oil food data in each supply link in a cloud database according to the data index codes so that consumers can trace the full supply chain data of the grain and oil food corresponding to the product batch codes.
As a feasible implementation manner, fig. 2 is a schematic diagram of a grain and oil food credibility tracing model provided in an embodiment of the present application, as shown in fig. 2, since there are many links of a grain and oil food supply chain, from production to sale, the amount of data to be acquired, recorded, and uploaded is huge and complex, and storing all these data on a block chain would cause problems of high system cost, large burden, and low efficiency, the present application designs a data storage mode of "storage on chain + storage in cloud database", stores the huge grain and oil food data in a cloud database, and then stores a hash value obtained by hash operation on the grain and oil food data and product brief information of each link in the block chain, thereby ensuring the cost and efficiency of the operation of the block chain system.
As shown in fig. 2, the user (enterprise) uploads the grain and oil food data of each supply link to each blockchain node and simultaneously uploads the data to the cloud database. After the data in the block chain nodes are verified by the intelligent contract, the message digest is obtained through Hash operation, then signature data is obtained through a digital signature technology and is sent to the cloud database. And the cloud data performs the same hash operation on the received grain and oil food data, decrypts the received signature data, compares the two obtained message digests, stores the received grain and oil food data if the two message digests are consistent, and returns an index code to be stored in the block chain, so that the traceability of the grain and oil food is realized. The tracing process comprises the following steps: a user (a consumer or a supervision department) inputs a product batch code of a batch to be inquired through a block chain system for tracing, the product batch code is directly positioned to a block head containing the product information, so that an index code of the product is called in a block where the block head is located, and grain and oil food data of all supply links of the product are searched in index code cloud removing data for product tracing.
In addition, an embodiment of the present application further provides a block chain-based grain and oil food trusted tracing apparatus, and as shown in fig. 3, the block chain-based grain and oil food trusted tracing apparatus specifically includes:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
carrying out format verification on grain and oil food data of each supply link in a block chain node through an intelligent contract;
after the verification is passed, acquiring data abstract information of grain and oil food data in each supply link;
encrypting the data abstract information by a digital signature technology to obtain corresponding signature data;
according to the signature data, verifying the grain and oil food data uploaded by the user in each supply link, and storing the grain and oil food data uploaded by the user in each supply link into a cloud database after the verification is passed;
determining a data index code according to the grain and oil food data stored in the cloud database;
and performing consensus verification on the data index code, storing the data index code into a latest data block, and linking the latest data block with a previous-level data block so as to store the data index code into a block chain.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The foregoing description has been directed to specific embodiments of this application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the embodiments of the present application pertain. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A grain and oil food credibility tracing method based on a block chain is characterized by comprising the following steps:
carrying out format verification on grain and oil food data of each supply link in a block chain node through an intelligent contract;
after the verification is passed, acquiring data abstract information of grain and oil food data in each supply link;
encrypting the data abstract information by a digital signature technology to obtain corresponding signature data;
according to the signature data, verifying the grain and oil food data uploaded by the user in each supply link, and storing the grain and oil food data uploaded by the user in each supply link into a cloud database after the verification is passed;
determining a data index code according to the grain and oil food data stored in the cloud database;
and performing consensus verification on the data index code, storing the data index code into a latest data block, and linking the latest data block with a previous-level data block so as to store the data index code into a block chain.
2. The block chain based grain and oil food credibility tracing method according to claim 1, wherein before format verification is performed on each supply link grain and oil food data in block chain nodes through an intelligent contract, the method further comprises:
compiling and generating codes according to the protocol clause content of the enterprise related to each supply link, obtaining an intelligent contract after compiling, and issuing the intelligent contract to each block chain node; the agreement clause content comprises data format requirements commonly set by the enterprises;
and after the validity of the intelligent contract is identified and verified by each block link point, the intelligent contract is broadcasted in the whole network to complete the intelligent contract deployment.
3. The block chain-based grain-oil food credibility tracing method of claim 2, wherein after the intelligent contract is fully network-broadcasted to complete intelligent contract deployment, the method further comprises:
respectively uploading grain and oil food data of each supply link to corresponding block link points in a grain and oil food supply chain;
wherein each of the supply links comprises: a production link, a processing link, a storage link, a logistics link and a sales link;
the grain and oil food data of the production link at least comprises the following data: planting time, harvesting time and product batch; the grain and oil food data of the processing link at least comprises the following steps: product numbering and processing procedures; the grain, oil and food data of the storage link at least comprises the following data: warehouse serial numbers and warehouse-in and warehouse-out time; the grain, oil and food data of the logistics link at least comprise: transport vehicles, transport personnel; the grain and oil food data of the sales link at least comprises the following data: sales location, salesperson.
4. The block chain based grain and oil food credibility tracing method according to claim 3 is characterized in that format verification is performed on grain and oil food data of each supply link in a block chain node through an intelligent contract, and specifically comprises the following steps:
judging whether the grain and oil food data in the block chain nodes meet the requirement of a data format or not through the intelligent contract;
if the grain and oil food data in the block chain nodes meet the data format requirement, carrying out integrity verification on the grain and oil food data;
if the grain and oil food data in the block chain nodes do not meet the data format requirement, format processing is carried out on the grain and oil food data through a preset code, and integrity verification is carried out after the grain and oil food data meet the data format requirement;
and after the integrity verification is finished, each block chain link point checks whether the result of the integrity verification is correct, if so, the result of the integrity verification is broadcasted to all the block chain nodes, and the result is stored in the block chain for evidence storage.
5. The block chain-based grain and oil food credibility tracing method according to claim 1, is characterized in that after passing verification, data summary information of grain and oil food data in each supply link is obtained, and the data summary information is encrypted by a digital signature technology to obtain corresponding signature data, and specifically comprises:
respectively carrying out Hash operation on the grain and oil food data of each supply link through a preset Hash algorithm to obtain data abstract information corresponding to the grain and oil food data of each supply link, and determining the data abstract information as first data abstract information;
generating a pair of public key and private key by asymmetric cryptography technology;
encrypting first data summary information corresponding to the grain and oil food data of each supply link through the private key to obtain signature data corresponding to the grain and oil food data of each supply link;
and uploading the signature data corresponding to the grain, oil and food data of each supply link to the cloud database.
6. The block chain-based grain-oil food credibility tracing method according to claim 5, is characterized in that grain-oil food data of each supply link uploaded by a user are verified according to the signature data, and after the verification is passed, the grain-oil food data of each supply link uploaded by the user are stored into a cloud database, and specifically comprises the following steps:
decrypting the signature data uploaded to the cloud database through the public key to obtain first data summary information corresponding to the grain and oil food data of each supply link;
performing hash operation on the grain and oil food data of each supply link uploaded to the cloud database by a user through the preset hash algorithm to obtain corresponding second data summary information; wherein, the user is an enterprise related to each supply link;
and comparing the second data summary information with the first data summary information, if the comparison result is consistent, storing the grain and oil food data uploaded by the user into the cloud database, and if the comparison result is inconsistent, determining that the grain and oil food data uploaded by the user is tampered and cannot be stored into the cloud database.
7. The block chain-based grain and oil food credible tracing method according to claim 1, wherein determining a data index code according to grain and oil food data stored in the cloud database specifically comprises:
extracting product brief information from the grain and oil food data of each supply link stored in the cloud database; wherein the product profile information includes at least: date, product lot code;
and carrying out hash operation on the product brief information and the hash value of the grain and oil food data stored in the cloud database to obtain the data index code.
8. The block chain-based grain and oil food credible tracing method according to claim 7, wherein the data index code is subjected to consensus verification and stored in a latest data block, and the latest data block is linked with a previous-level data block so as to store the data index code in a block chain, specifically comprising:
sending the product brief information and the data index code to a block chain through a block chain node which is maintained independently, and broadcasting the product brief information and the data index code to all the block chain nodes;
after the common identification verification is carried out on the product brief information and the data index codes by all the block link points, the product brief information and the data index codes are stored into a latest data block, the latest data block is linked to a previous-stage data block, and the process of storing the data index codes into a block chain is completed; and the block head of the latest data block is packaged with the hash value of the data block at the upper stage, the version number of the current block, the timestamp and the product brief information.
9. The block chain-based grain and oil food credibility tracing method according to claim 8, wherein after the data index code is subjected to consensus verification and stored in a latest data block, and the latest data block is linked with a previous data block so as to store the data index code in a block chain, the method further comprises:
in response to an operation of a consumer or a regulatory agency inputting a product batch code, locating a block header containing the product batch code in a block chain, and determining a corresponding target data block according to the block header;
calling out a stored data index code in the target data block;
and searching corresponding grain and oil food data of each supply link in the cloud database according to the data index code so as to enable the consumer to trace the full supply chain data of the grain and oil food corresponding to the product batch code.
10. A block chain based grain and oil food credibility tracing device is characterized by comprising:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform a block chain-based food grain trustworthiness traceability method according to any of claims 1-9.
CN202211113376.4A 2022-09-14 2022-09-14 Grain and oil food credibility tracing method and equipment based on block chain Pending CN115482012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211113376.4A CN115482012A (en) 2022-09-14 2022-09-14 Grain and oil food credibility tracing method and equipment based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211113376.4A CN115482012A (en) 2022-09-14 2022-09-14 Grain and oil food credibility tracing method and equipment based on block chain

Publications (1)

Publication Number Publication Date
CN115482012A true CN115482012A (en) 2022-12-16

Family

ID=84423985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211113376.4A Pending CN115482012A (en) 2022-09-14 2022-09-14 Grain and oil food credibility tracing method and equipment based on block chain

Country Status (1)

Country Link
CN (1) CN115482012A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366678A (en) * 2023-06-02 2023-06-30 杭州端点网络科技有限公司 Dynamic data distributed storage system of data operation intelligent platform
CN116452119A (en) * 2023-06-07 2023-07-18 浪潮云洲(山东)工业互联网有限公司 Digital supervision method and device for grain inventory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366678A (en) * 2023-06-02 2023-06-30 杭州端点网络科技有限公司 Dynamic data distributed storage system of data operation intelligent platform
CN116366678B (en) * 2023-06-02 2023-08-01 杭州端点网络科技有限公司 Dynamic data distributed storage system of data operation intelligent platform
CN116452119A (en) * 2023-06-07 2023-07-18 浪潮云洲(山东)工业互联网有限公司 Digital supervision method and device for grain inventory
CN116452119B (en) * 2023-06-07 2024-01-19 浪潮云洲工业互联网有限公司 Digital supervision method and device for grain inventory

Similar Documents

Publication Publication Date Title
CN115482012A (en) Grain and oil food credibility tracing method and equipment based on block chain
CN109377244A (en) A kind of quick traceability system of food and method based on multichain interconnection block chain network
CN107704493A (en) It is a kind of to be used to provide the method and system that product is traced to the source
CN108959416A (en) A kind of web data automatic evidence-collecting based on block chain and deposit card method
CN114386992A (en) Grain and oil quality safety credible traceability method based on block chain and identification analysis
CN109583917A (en) A kind of two dimensional code source tracing method and system based on block chain
CN111612483B (en) Tea leaf credible tracing system based on decentralization and centralization cooperation
EP3429167B1 (en) Published information processing method and device, and information publishing system
CN111667368B (en) Anti-money laundering monitoring system and method
CN111242651A (en) Block chain-based vaccine manufacturing process supervision method
CN110910150B (en) Correlation method and device for tracing source based on Internet of things technology and combined block chain
CN111401927A (en) Food label unique code issuing and circulation tracing method based on block chain major-minor chain technology
CN110069937A (en) Data source tracing method, system and device based on block chain
CN116342146A (en) Seed quality safety tracing anti-counterfeiting method and device and electronic equipment
CN116506230A (en) Data acquisition method and system based on RSA asymmetric encryption
CN207461173U (en) For the anti-tamper cultivation traceability system that chicken growth is whole
CN114897481A (en) Intelligent customhouse logistics monitoring method based on block chain
CN111199371B (en) Grain circulation tracing release verification method and system based on blockchain
CN113689263A (en) E-commerce historical price query system based on block chain
CN112837062A (en) Data fingerprint transaction management system and tracing method based on block chain-trusted computing
CN112053095A (en) Cargo monitoring method and device, computer equipment and storage medium
CN117575634B (en) Dermatological medicine traceability system and method based on blockchain
CN109744165A (en) For the anti-tamper cultivation traceability system that chicken growth is whole
CN115759893B (en) Cross-chain logistics service management method and device and electronic equipment
CN117596086B (en) Commodity data encryption transmission method and system based on supply chain

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