Disclosure of Invention
To this end, the present application provides a method, system and server for product tracing combining block chain technology and satellite positioning technology.
According to one aspect of the present invention, there is provided a method for providing product traceability, the method comprising:
determining origin information for each of a plurality of product batches;
fusing the place of origin information of each product batch with satellite positioning data and standard time data, calculating a first hash value of the fused place of origin information, generating a blockchain batch code of each batch of products based on the first hash value, and storing the fused place of origin information and the blockchain batch code into a blockchain in an associated manner, wherein the blockchain batch code is used for identifying each product batch;
determining product information of each single product of a minimum packaging unit in a current batch of products, generating a second hash value based on production information and quality inspection information in the product information, generating a blockchain product code based on the second hash value, and storing the product information and the blockchain product code into a blockchain in an associated manner, wherein the blockchain product code is an identification code for identifying the single product and is marked on an outer package of the single product;
forming a predetermined number of monomer products into a product logistics unit and equipping the product logistics unit with a satellite positioning chip, acquiring position information of the product logistics unit and storing the position information in a block chain in association with each monomer product in the predetermined number of monomer products;
the method further includes hashing a combination of the first and second hash values to generate a third hash value, generating a private key for the current batch of product based on the third hash value and storing the private key in the blockchain in association with the current batch of product.
Wherein the source information comprises: production lot information, production qualification information, and producer information.
Wherein the production parcel information comprises: soil organic grade information and soil fertility information.
Wherein, the fused producing area information is 6 tuples < producing area information, producing qualification information, producer information, producing area position information, producing starting time and producing ending time >.
Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type.
The block chain query service platform sends the public key of the product to be traced and the signature of the producer on the current product batch to the tracing party in response to receiving the qualification query request of the tracing party on the product to be traced, and the tracing party verifies whether the private key of the current product batch is correct or not through the signature of the current product batch and the public key of the product to be traced.
Under the condition that the private key of the current product batch is determined to be correct, the tracing direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the product information of the product to be traced based on the blockchain product code in the product query request.
Under the condition that the private key of the current product batch is determined to be correct, the traceability direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the origin information of the product to be traced based on the blockchain batch code in the product query request.
Under the condition that the private key of the current product batch is determined to be correct, the tracing direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the movement track information of the product to be traced based on the blockchain product code in the product query request.
The method comprises the steps that satellite positioning data are determined through a Beidou satellite system, and standard time is determined according to time service of the Beidou satellite system; determining production completion time by Internet of things equipment on production equipment; determining a quality detection result by a quality detection device; and the qualification certification organization certifies and issues the production qualification information.
According to another aspect of the present invention, there is provided a system for providing product traceability, the system comprising:
a batch information processing unit that determines origin information of each of a plurality of product batches; fusing the place of origin information of each product batch with satellite positioning data and standard time data, calculating a first hash value of the fused place of origin information, generating a blockchain batch code of each batch of products based on the first hash value, and storing the fused place of origin information and the blockchain batch code into a blockchain in an associated manner, wherein the blockchain batch code is used for identifying each product batch;
the product information processing unit is used for determining the product information of each single product of the minimum packaging unit in the current batch of products, generating a second hash value based on the production information and the quality inspection information in the product information, generating a block chain product code based on the second hash value, and storing the product information and the block chain product code into a block chain in a correlation mode, wherein the block chain product code is an identification code for identifying the single product and is marked on the outer package of the single product;
the positioning unit is used for forming a preset number of monomer products into a product logistics unit, equipping the product logistics unit with a satellite positioning chip, acquiring the position information of the product logistics unit and storing the position information in a block chain in a manner of being associated with each monomer product in the preset number of monomer products;
a calculation unit that hash a combination of the first hash value and the second hash value to generate a third hash value, generates a private key of the current lot of product based on the third hash value, and stores the private key in the blockchain in association with the current lot of product.
Wherein the source information comprises: production lot information, production qualification information, and producer information.
Wherein the production parcel information comprises: soil organic grade information and soil fertility information.
Wherein, the fused producing area information is 6 tuples < producing area information, producing qualification information, producer information, producing area position information, producing starting time and producing ending time >.
Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type.
The system comprises a tracing party, a verifying unit and a verifying unit, wherein the tracing party verifies whether a private key of a current product batch is correct or not through a signature of the current product batch and a public key of a product to be traced by the tracing party.
The tracing direction inquiring unit sends a product inquiring request under the condition that the private key of the current product batch is determined to be correct, and the inquiring unit determines the product information of the product to be traced based on the block chain product code in the product inquiring request.
The tracing direction inquiring unit sends a product inquiring request under the condition that the private key of the current product batch is determined to be correct, and the inquiring unit determines the producing area information of the product to be traced based on the block chain batch code in the product inquiring request.
The tracing direction inquiring unit sends a product inquiring request under the condition that the private key of the current product batch is determined to be correct, and the inquiring unit determines the moving track information of the product to be traced based on the block chain product code in the product inquiring request.
The method comprises the steps that satellite positioning data are determined through a Beidou satellite system, and standard time is determined according to time service of the Beidou satellite system; determining production completion time by Internet of things equipment on production equipment; determining a quality detection result by a quality detection device; and the qualification certification organization certifies and issues the production qualification information.
According to another aspect of the present invention, there is provided a product tracing server, including:
at least one processor;
a memory for storing instructions executable by the processor;
the processor is configured to perform the method for providing product traceability as previously described.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
FIG. 1 illustrates a logical schematic diagram of a prior art product traceability system 100. The product tracing system 100 includes: a production data processing unit 101, a product data processing unit 102, a logistics data processing unit 103, and a data integration platform 104. In general, the production data processing unit 101 is used to create a production profile and to store data related to the production of a product. For example, the production data processing unit 101 creates a production profile including agricultural land information, agricultural production qualification information, farmer information, and product producer information.
The product data processing unit 102 is used to build a product profile and save data related to the product. For example, the product data processing unit 102 builds a production flow profile and a quality inspection profile associated with a production link. The production flow file comprises processing data and state data of each link in the production flow of the product. The quality detection file comprises production standard conformity, production qualification information, packaging information, quality inspection result information and the like.
The logistics data processing unit 103 is used for creating a file related to logistics information of the product after leaving the factory and saving the logistics information. The production data processing unit 101, the product data processing unit 102, and the logistics data processing unit 103 can send the saved data to the data integration platform 104 to realize data integration. The data integration platform 104 integrates production data, product data, and logistics data by product identification and provides data query functionality based on product identification. A user may access the data integration platform 104 using a terminal device to obtain query data determined by the data integration platform 104.
FIG. 2 illustrates a flow diagram of a method 200 for providing product traceability, in accordance with a preferred embodiment of the present invention. The method 200 realizes the position locking of the production land by the satellite positioning technology, and can fuse the soil information, the fertility information, the production site, the quality inspection result, the packaging information, the production qualification and the spatial geographic position of the production land. In addition, the method 200 may also integrate soil information, fertility information, production location, quality inspection results, packaging information, production qualification, and production completion time of the production lot. Also, the method 200 stores the fused information into the blockchain to prevent the information from being tampered.
After the product is produced, the method 200 may configure the satellite positioning chip on a specific unit package of the product (e.g., a packaging unit including 5, 6, 10, or 12 individual products), so as to ensure that the product is traceable throughout the logistics process. In addition, the method 200 synchronizes the location information to the whole network in real time by using the block chain technique, thereby ensuring the whole-course tracing of the product in the circulation process. The method 200 changes the hosting mechanism of production files and product files based on a central database, and enables all related parties including producers, supervisors, sellers, consumers and financial institutions (if loans participate in the production and sales links) in the production link, the circulation link and the sales link to realize the synchronization and the storage of spatial information and time information and ensure that data cannot be falsified by using a block chain distributed storage and encryption technology. The method 200 performs information processing and feedback through the service platform, so that a user can query information in the blockchain at any time through a client.
Preferably, the method 200 begins at step 201. At step 201, origin information for each of a plurality of product lots is determined. Wherein the origin information comprises: production lot information, production qualification information, and producer information. The production lot information includes: soil organic grade information and soil fertility information. Typically, the same batch of products is produced at the same location, and the origin of each product batch may be related to the quality grade of the product.
At step 202, the source information of each product lot is fused with the satellite positioning data and the standard time data, a first hash value of the fused source information is calculated, a blockchain lot code of each product lot is generated based on the first hash value, and the fused source information and the blockchain lot code are associatively stored into a blockchain, wherein the blockchain lot code is used for identifying each product lot. Preferably, the source information comprises: production lot information, production qualification information, and producer information. In order to be able to locate the production area information and to be able to determine the production time of each batch of products, the present application fuses the production area information of each batch of products with the satellite positioning data and the standard time data. Wherein the present application uses a satellite positioning system to determine the geographic location of the source and uses the satellite system time service to record the production start time and the production end time. Therefore, the fused producing area information may be 6-tuple < producing area information, production qualification information, producer information, producing area location information, production start time, production end time >.
Then, the present application calculates a first hash value of the fused origin information. For example, a 6-tuple < production lot information, production qualification information, producer information, production location information, production start time, production end time > is made into a character string, and this character string is subjected to computation using the sha256 and ripemd160 algorithms to generate a first hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Then, the blockchain batch code of each batch of products is generated based on the first hash value, and the fused production place information and the blockchain batch code are stored in the blockchain in an associated mode. Wherein the blockchain batch code is used to identify each product batch, i.e., using the blockchain batch code as an identifier for each product batch.
In step 203, product information of each individual product of the smallest packing unit in the current batch of products is determined, a second hash value is generated based on the production information and the quality inspection information in the product information, a blockchain product code is generated based on the second hash value, and the product information and the blockchain product code are stored in a blockchain in an associated mode, wherein the blockchain product code is an identification code used for identifying the individual product and is marked on an outer package of the individual product. Generally, a single product may also be the smallest unit sold in the market, such as a bag of milk, a box of yogurt, etc. Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type.
Then, a second hash value is generated based on production information and quality inspection information in the product information. For example, the production completion time, the production place, the production information, the quality inspection information, and the package type are made into a character string, and the pass through this character string is calculated using the sha256 and ripemd160 algorithms to generate the second hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Then, the present application generates a blockchain product code based on the second hash value, and stores the product information and the blockchain product code in association into a blockchain. Preferably, the blockchain product code is an identification code for identifying the individual product and is marked on an outer package of the individual product.
When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated. After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product.
In step 204, a predetermined number of monomer products are grouped into a product logistics unit and the product logistics unit is equipped with a satellite positioning chip, the position information of the product logistics unit is obtained and stored in a blockchain in association with each monomer product of the predetermined number of monomer products. After the production of the product is finished, the satellite positioning chip is arranged on the package of a certain unit of the product, so that the whole process of the product in the logistics process can be tracked, and meanwhile, the position information is synchronized to the whole network in real time (or at regular time) by using a block chain technology, so that the whole process of the product in the circulation process can be traced.
At step 205, a combination of the first hash value and the second hash value is hashed to generate a third hash value, a private key for the current batch of product is generated based on the third hash value and stored in association with the current batch of product in a blockchain. When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated.
After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product. The hash value of a single product and the hash values of the batch of products are hashed again, then the private key of the batch of products is generated by the random generator, the private key is processed by the secp256k1 algorithm to generate a public key, and the public key is processed by the sha256 and ripemd160 algorithms to generate the public key hash. When the requirement for initiating the tracing appears, a public key of a product to be traced is obtained in the block chain network, a signature of a producer is asked for at the same time, the producer sends an electronic signature to the tracing party, and the tracing party can verify that the producer has a private key through the signature and the public key to complete the tracing process.
Preferably, in response to receiving a qualification query request of the tracing party for the product to be traced, the blockchain query service platform sends the public key of the product to be traced and the signature of the production party for the current product batch to the tracing party, and the tracing party verifies whether the private key of the current product batch is correct through the signature of the current product batch and the public key of the product to be traced.
Preferably, the tracing direction blockchain query service platform sends a product query request under the condition that the private key of the current product batch is determined to be correct, and the blockchain query service platform determines the product information of the product to be traced based on the blockchain product code in the product query request. Preferably, the tracing direction blockchain query service platform sends a product query request under the condition that the private key of the current product batch is determined to be correct, and the blockchain query service platform determines the origin information of the product to be traced based on the blockchain batch code in the product query request. Preferably, under the condition that the private key of the current product batch is determined to be correct, the tracing direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the movement track information of the product to be traced based on the blockchain product code in the product query request.
Preferably, satellite positioning data is determined through a Beidou satellite system, and standard time is determined according to time service of the Beidou satellite system; determining production completion time by Internet of things equipment on production equipment; determining a quality detection result by a quality detection device; and the qualification certification organization certifies and issues the production qualification information.
Fig. 3 illustrates a schematic configuration of a system 300 for providing product traceability according to a preferred embodiment of the present invention. The system 300 realizes the position locking of the production land by the satellite positioning technology, and can fuse the soil information, the fertility information, the production site, the quality inspection result, the packaging information, the production qualification and the spatial geographic position of the production land. In addition, the system 300 can also integrate soil information, fertility information, production location, quality inspection results, packaging information, production qualification, and production completion time of the production lot. Also, the system 300 stores the fused information into the blockchain to prevent the information from being tampered.
After the product is manufactured, the system 300 can configure the satellite positioning chip on a specific unit package (for example, a packaging unit including 5, 6, 10 or 12 single products) of the product, so as to ensure that the product can be tracked in the whole logistics process. In addition, the system 300 synchronizes the location information to the whole network in real time by using the block chain technology, thereby ensuring the whole-course tracing of the product in the circulation process. The system 300 changes the hosting mechanism of production archives and product archives based on a central database, and enables all related parties including producers, supervisors, sellers, consumers and financial institutions (if loans participate in the production and sales links) in the production link, the circulation link and the sales link to realize the synchronization and the storage of spatial information and time information and guarantee that data cannot be falsified by using a block chain distributed storage and encryption technology. The system 300 processes and feeds back information through the service platform, so that a user can query information in the blockchain at any time through a client.
Preferably, the system 300 comprises: a batch information processing unit 301, a product information processing unit 302, a positioning unit 303, a calculating unit 304, and a querying unit 305. The batch information processing unit 301 is configured to determine origin information of each of a plurality of product batches. Wherein the origin information comprises: production lot information, production qualification information, and producer information. The production lot information includes: soil organic grade information and soil fertility information. Typically, the same batch of products is produced at the same location, and the origin of each product batch may be related to the quality grade of the product.
The lot information processing unit 301 fuses the place of origin information of each product lot with the satellite positioning data and the standard time data, calculates a first hash value of the fused place of origin information, and generates a blockchain lot code of each lot of product based on the first hash value, stores the fused place of origin information and the blockchain lot code in association into a blockchain, the blockchain lot code identifying each product lot. Preferably, the source information comprises: production lot information, production qualification information, and producer information. In order to be able to locate the place of origin information and to be able to determine the production time of each batch of products, the batch information processing unit 301 fuses the place of origin information of each batch of products with the satellite positioning data and the standard time data. Wherein the present application uses a satellite positioning system to determine the geographic location of the source and uses the satellite system time service to record the production start time and the production end time. Therefore, the fused producing area information may be 6-tuple < producing area information, production qualification information, producer information, producing area location information, production start time, production end time >.
The batch information processing unit 301 calculates a first hash value of the fused place-of-origin information. For example, a 6-tuple < production lot information, production qualification information, producer information, production location information, production start time, production end time > is made into a character string, and this character string is subjected to computation using the sha256 and ripemd160 algorithms to generate a first hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Subsequently, the batch information processing unit 301 generates a blockchain batch code for each batch of products based on the first hash value, and stores the fused production place information and the blockchain batch code in association with each other in the blockchain. Wherein the blockchain batch code is used to identify each product batch, i.e., using the blockchain batch code as an identifier for each product batch.
The product information processing unit 302 determines product information of each individual product of a smallest packing unit in a current batch of products, generates a second hash value based on production information and quality inspection information in the product information, generates a blockchain product code based on the second hash value, and stores the product information and the blockchain product code into a blockchain in an associated manner, wherein the blockchain product code is an identification code for identifying the individual product and is marked on an outer package of the individual product. Generally, a single product may also be the smallest unit sold in the market, such as a bag of milk, a box of yogurt, etc. Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type.
Then, a second hash value is generated based on production information and quality inspection information in the product information. For example, the production completion time, the production place, the production information, the quality inspection information, and the package type are made into a character string, and the pass through this character string is calculated using the sha256 and ripemd160 algorithms to generate the second hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Then, the present application generates a blockchain product code based on the second hash value, and stores the product information and the blockchain product code in association into a blockchain. Preferably, the blockchain product code is an identification code for identifying the individual product and is marked on an outer package of the individual product.
When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated. After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product.
The positioning unit 303 composes a predetermined number of monomer products into a product logistics unit and equips the product logistics unit with a satellite positioning chip, acquires position information of the product logistics unit and stores the position information in a block chain in association with each of the predetermined number of monomer products. After the production of the product is finished, the satellite positioning chip is arranged on the package of a certain unit of the product, so that the whole process of the product in the logistics process can be tracked, and meanwhile, the position information is synchronized to the whole network in real time (or at regular time) by using a block chain technology, so that the whole process of the product in the circulation process can be traced.
The calculation unit 304 performs a hash calculation on a combination of the first hash value and the second hash value to generate a third hash value, generates a private key of the current lot of product based on the third hash value, and stores the private key in the blockchain in association with the current lot of product. When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated.
After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product. The hash value of a single product and the hash values of the batch of products are hashed again, then the private key of the batch of products is generated by the random generator, the private key is processed by the secp256k1 algorithm to generate a public key, and the public key is processed by the sha256 and ripemd160 algorithms to generate the public key hash. When the requirement for initiating the tracing appears, a public key of a product to be traced is obtained in the block chain network, a signature of a producer is asked for at the same time, the producer sends an electronic signature to the tracing party, and the tracing party can verify that the producer has a private key through the signature and the public key to complete the tracing process.
The query unit 305 sends the public key of the product to be traced and the signature of the producer for the current product batch to the tracing party, which verifies whether the private key of the current product batch is correct through the signature of the current product batch and the public key of the product to be traced, in response to receiving the qualification query request of the tracing party for the product to be traced.
When the private key of the current product batch is determined to be correct, the tracing direction querying unit 305 sends a product querying request, and the querying unit 305 determines the product information of the product to be traced based on the blockchain product code in the product querying request. In the case that it is determined that the private key of the current product batch is correct, the tracing direction querying unit 305 sends a product querying request, and the querying unit 305 determines the origin information of the product to be traced based on the blockchain batch code in the product querying request. Under the condition that the private key of the current product batch is determined to be correct, the tracing direction querying unit 305 sends a product querying request, and the querying unit 305 determines the movement track information of the product to be traced based on the blockchain product code in the product querying request.
The method comprises the steps that satellite positioning data are determined through a Beidou satellite system, and standard time is determined according to time service of the Beidou satellite system; determining production completion time by Internet of things equipment on production equipment; determining a quality detection result by a quality detection device; and the qualification certification organization certifies and issues the production qualification information.
FIG. 4 illustrates a logical schematic diagram of a product traceability system 400 in accordance with a preferred embodiment of the present invention. As shown in fig. 4, the product tracing system 400 includes: a production data processing unit 401, a product data processing unit 402, a satellite data processing unit 403, a logistics data processing unit 403, an integration platform 404, and a block chain evidence infrastructure platform 405. Preferably, the production data processing unit 401 is capable of determining the production location information of each of the plurality of product lots. Wherein the origin information comprises: production lot information, production qualification information, and producer information. The production lot information includes: soil organic grade information and soil fertility information. Typically, the same batch of products is produced at the same location, and the origin of each product batch may be related to the quality grade of the product. The production data processing unit 401 calculates a first hash value of the fused production place information. For example, a 6-tuple < production lot information, production qualification information, producer information, production location information, production start time, production end time > is made into a character string, and this character string is subjected to computation using the sha256 and ripemd160 algorithms to generate a first hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Subsequently, the production data processing unit 401 generates a blockchain batch code for each batch of products based on the first hash value, so that the fused production place information and blockchain batch code can be stored in association into a blockchain in subsequent processing. Wherein the blockchain batch code is used to identify each product batch, i.e., using the blockchain batch code as an identifier for each product batch.
The production data processing unit 401 fuses the production area information of each product lot with the satellite positioning data and the standard time data, and calculates a first hash value of the fused production area information. Preferably, the source information comprises: production lot information, production qualification information, and producer information. In order to be able to locate the production location information and to be able to determine the production time for each batch of products, the production data processing unit 401 fuses the production location information for each batch of products with the satellite positioning data and the standard time data. Wherein the present application uses a satellite positioning system to determine the geographic location of the source and uses the satellite system time service to record the production start time and the production end time. Therefore, the fused producing area information may be 6-tuple < producing area information, production qualification information, producer information, producing area location information, production start time, production end time >.
The product data processing unit 402 determines product information of each individual product of a smallest packing unit in a current batch of products, generates a second hash value based on production information and quality inspection information in the product information, and generates a blockchain product code based on the second hash value, so that the product information and the blockchain product code can be stored in a blockchain in association in subsequent processing, wherein the blockchain product code is an identification code for identifying the individual product and is marked on an outer package of the individual product. Generally, a single product may also be the smallest unit sold in the market, such as a bag of milk, a box of yogurt, etc. Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type. For example, the production completion time, the production place, the production information, the quality inspection information, and the package type are made into a character string, and the pass through this character string is calculated using the sha256 and ripemd160 algorithms to generate the second hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation.
The satellite data processing unit 403 can acquire satellite positioning data and satellite timing data. For example, the position information of the production place is collected by a Beidou positioning system of a manufacturer, and a timestamp is added according to Beidou time service, so that the information is automatically uploaded to a network. And (3) a certain batch of products (such as a production batch of products) belonging to a certain manufacturer (the manufacturer is a block chain node), and the satellite positioning information is transmitted back to the production manufacturer node by the Internet of things equipment and is stored in the block chain in different time periods. And (3) a certain batch of products (such as a production batch of products) belonging to a certain manufacturer (the manufacturer is a block chain node), and the satellite positioning information is transmitted back to the production manufacturer node by the Internet of things equipment and is stored in the block chain in different time periods.
The logistics data processing unit 403 acquires logistics information after shipment of the product and saves the logistics information to facilitate integration of production data, product data, and logistics data by product identification.
The integration platform 404 hashes the hash values of the individual products and the hash values of the batch of products again, i.e., performs an aggregate hash, to generate a merged hash. And adding a time stamp to the data packet comprising the hash value by using the standard time of the satellite time service. Then, a random generator generates a private key of the batch of products, the secp256k1 algorithm processes the private key to generate a public key, and the sha256 and ripemd160 algorithms process the public key to generate a public key hash. When the requirement for initiating the tracing appears, a public key of a product to be traced is obtained in the block chain network, a signature of a producer is asked for at the same time, the producer sends an electronic signature to the tracing party, and the tracing party can verify that the producer has a private key through the signature and the public key to complete the tracing process. Therefore, the traceability system has three parts of traceability information of source, production batch and single product.
The blockchain certificate storage infrastructure platform 405 is configured to store data related to product traceability and in response to receiving a qualification query request of a traceability party for a to-be-traced product, send a public key of the to-be-traced product and a signature of a production party for a current product batch to the traceability party, where the traceability party verifies whether a private key of the current product batch is correct through the signature of the current product batch and the public key of the to-be-traced product.
Under the condition that the private key of the current product batch is determined to be correct, the tracing direction block chain evidence storing infrastructure platform 405 sends a product query request, and the block chain evidence storing infrastructure platform 405 determines the product information of the product to be traced based on the block chain product code in the product query request. Under the condition that the private key of the current product batch is determined to be correct, the tracing direction block chain evidence storing infrastructure platform 405 sends a product query request, and the block chain evidence storing infrastructure platform 405 determines the origin information of the product to be traced based on the block chain batch code in the product query request. Under the condition that the private key of the current product batch is determined to be correct, the tracing direction block chain evidence storing infrastructure platform 405 sends a product query request, and the block chain evidence storing infrastructure platform 405 determines the movement track information of the product to be traced based on the block chain product code in the product query request.
Preferably, the position information of the production place is collected by a Beidou positioning system of a manufacturer, and a timestamp is added according to Beidou time service, so that the information is automatically uploaded to a network. And the production completion time is recorded by the Internet of things equipment on the production equipment and automatically uploaded to the network. And the quality detection result is automatically uploaded to the network by the quality detection equipment output equipment. The production qualification is verified and issued by a qualification certification organization, and chain deposit is carried out after verification and issuance is finished. The manufacturer acts as a packaging server and packages and uploads the information on the devices.
The method and the device use the public key and the private key to carry out digital signature on production data or product data, namely, the signature encrypted by the private key is sent to the opposite side along with the public key, and the opposite side checks whether the encrypted content is consistent with the received content after decrypting by the public key. The blockchain system of the application uses an encryption mechanism and a distributed secret key, and the core function of the blockchain system is to link all information related to a source to ensure the authenticity of the source information. Secondly, the block chain system adopts a distributed key technology, and the private key of each user is generated in the user personal wallet, so that only the user stores the private key, and the safety problem of the generation process is reduced. The block chain needs to be signed by a private key in the transaction and broadcast processes, and the private key is broadcast to the whole network after the signature is completed, so that the private key cannot be lost in the transaction process, and the security of the private key can be well protected. By the means, each traceability is similar to a transaction, and the transaction is completed on the blockchain, so that the authenticity of the traceability behavior is ensured.
Fig. 5 is a schematic structural diagram of a product traceability system 500 according to a preferred embodiment of the present invention. The product traceability system 500 realizes the position locking of the production land through the satellite positioning technology, and can fuse the soil information, the fertility information, the production site, the quality inspection result, the packaging information, the production qualification and the spatial geographic position of the production land. In addition, the product traceability system 500 can also integrate the soil information, fertility information, production location, quality inspection result, packaging information, production qualification, and production completion time of the production site. And, the product traceability system 500 stores the fused information into the blockchain to prevent the information from being tampered.
After the product is manufactured, the product traceability system 500 can configure a satellite positioning chip on a specific unit package of the product (for example, a packaging unit including 5, 6, 10 or 12 single products), so as to ensure that the product can be tracked in the whole process of logistics. In addition, the product tracing system 500 synchronizes the location information to the whole network in real time by using the block chain technology, thereby ensuring the whole-process tracing of the product in the circulation process. The product traceability system 500 changes the hosting mechanism of production files and product files based on a central database, and enables all relevant parties including producers, supervisors, sellers, consumers and financial institutions (if loans participate in the production and sales links) in the production link, the circulation link and the sales link to realize the synchronization and the storage of spatial information and temporal information and ensure that data cannot be falsified by using a block chain distributed storage and encryption technology. The product tracing system 500 performs information processing and feedback through the service platform, so that a user can query information in the blockchain at any time through a client.
At 507, Beidou satellite positioning obtains real-time location information and provides time service information. The production place position information is collected by a Beidou positioning system of a manufacturer and is stamped according to Beidou time service. In addition, standard time is provided for the product traceability system 500 through the Beidou satellite system.
At 5004, origin information for each of a plurality of product batches is determined. Wherein the origin information comprises: production lot information, production qualification information, and producer information. The production lot information includes: soil organic grade information and soil fertility information. Typically, the same batch of products is produced at the same location, and the origin of each product batch may be related to the quality grade of the product.
Fusing the source information of each product batch with satellite positioning data and standard time data, calculating a first hash value of the fused source information, generating a blockchain batch code of each batch of products based on the first hash value, and storing the fused source information and the blockchain batch code into a blockchain in an associated manner, wherein the blockchain batch code is used for identifying each product batch. Preferably, the source information comprises: production lot information, production qualification information, and producer information. In order to be able to locate the place of origin information and to be able to determine the production time for each batch of products, the place of origin information for each batch of products is fused with satellite positioning data and standard time data. Wherein the present application uses a satellite positioning system to determine the geographic location of the source and uses the satellite system time service to record the production start time and the production end time. Therefore, the fused producing area information may be 6-tuple < producing area information, production qualification information, producer information, producing area location information, production start time, production end time >.
And calculating a first hash value of the fused origin information. For example, a 6-tuple < production lot information, production qualification information, producer information, production location information, production start time, production end time > is made into a character string, and this character string is subjected to computation using the sha256 and ripemd160 algorithms to generate a first hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Then, a blockchain batch code of each batch of products is generated based on the first hash value, and the fused production place information and the blockchain batch code are stored into the blockchain in an associated mode. Wherein the blockchain batch code is used to identify each product batch, i.e., using the blockchain batch code as an identifier for each product batch.
At 505, product information of each individual product of a smallest packaging unit in a current batch of products is determined, a second hash value is generated based on production information and quality inspection information in the product information, a blockchain product code is generated based on the second hash value, and the product information and the blockchain product code are stored in a blockchain in an associated mode, wherein the blockchain product code is an identification code used for identifying the individual product and is marked on an outer package of the individual product. Generally, a single product may also be the smallest unit sold in the market, such as a bag of milk, a box of yogurt, etc. Wherein the product information includes: production completion time, production location, production information, quality inspection information, and packaging type.
Then, a second hash value is generated based on production information and quality inspection information in the product information. For example, the production completion time, the production place, the production information, the quality inspection information, and the package type are made into a character string, and the pass through this character string is calculated using the sha256 and ripemd160 algorithms to generate the second hash value. The placement of the constituent strings includes various modes such as sequential connection and logical operation. Then, the present application generates a blockchain product code based on the second hash value, and stores the product information and the blockchain product code in association into a blockchain. Preferably, the blockchain product code is an identification code for identifying the individual product and is marked on an outer package of the individual product.
When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated. After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product.
At 506, a predetermined number of monomer products are grouped into a product logistics unit and the product logistics unit is equipped with a satellite positioning chip, position information of the product logistics unit is obtained and stored in a blockchain in association with each monomer product of the predetermined number of monomer products. After the production of the product is finished, the satellite positioning chip is arranged on the package of a certain unit of the product, so that the whole process of the product in the logistics process can be tracked, and meanwhile, the position information is synchronized to the whole network in real time (or at regular time) by using a block chain technology, so that the whole process of the product in the circulation process can be traced.
At 503, a combination of the first hash value and the second hash value is hashed to generate a third hash value, a private key for the current batch of product is generated based on the third hash value and the private key is stored in the blockchain in association with the current batch of product. When the production information of each batch of products, such as production time, production place, production quality inspection, production packaging and the like, enters the finished product library in the batch, the production information is encrypted and included into the block chain together with the geographic information and the time information, and the block chain identity code of the current batch is generated.
After the production of a single packaging product is finished, the production data and the quality inspection data are hashed to generate a unique block chain code which is used as an identification code of the single product, namely the identification code corresponds to source data of the product in a block chain. The traceability identification of this product is printed on the packaging of the individual product. The hash value of a single product and the hash values of the batch of products are hashed again, then the private key of the batch of products is generated by the random generator, the private key is processed by the secp256k1 algorithm to generate a public key, and the public key is processed by the sha256 and ripemd160 algorithms to generate the public key hash. When the requirement for initiating the tracing appears, a public key of a product to be traced is obtained in the block chain network, a signature of a producer is asked for at the same time, the producer sends an electronic signature to the tracing party, and the tracing party can verify that the producer has a private key through the signature and the public key to complete the tracing process.
At 502, in response to receiving a qualification query request of a tracing party for a to-be-traced product, the blockchain query service platform sends a public key of the to-be-traced product and a signature of a producer for a current product batch to the tracing party, and the tracing party verifies whether a private key of the current product batch is correct through the signature of the current product batch and the public key of the to-be-traced product.
Under the condition that the private key of the current product batch is determined to be correct, the tracing direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the product information of the product to be traced based on the blockchain product code in the product query request. Under the condition that the private key of the current product batch is determined to be correct, the traceability direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the origin information of the product to be traced based on the blockchain batch code in the product query request. Under the condition that the private key of the current product batch is determined to be correct, the tracing direction blockchain query service platform sends a product query request, and the blockchain query service platform determines the movement track information of the product to be traced based on the blockchain product code in the product query request.
The method comprises the steps that satellite positioning data are determined through a Beidou satellite system, and standard time is determined according to time service of the Beidou satellite system; determining production completion time by Internet of things equipment on production equipment; determining a quality detection result by a quality detection device; and the qualification certification organization certifies and issues the production qualification information.
At 501, a query request input by a user is received by a blockchain client (a terminal for providing a query service for a client).
The foregoing detailed description has set forth numerous embodiments of the devices and/or methods via the use of block diagrams, flowcharts, and/or examples. Insofar as such block diagrams, flowcharts, and/or examples contain one or more functions and/or operations, it will be understood by those within the art that each function and/or operation within such block diagrams, flowcharts, or examples can be implemented, individually and/or collectively, by a wide range of hardware, software, firmware, or virtually any combination thereof. In one embodiment, portions of the subject matter described herein may be implemented via an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), or other integrated format. However, those skilled in the art will recognize that some aspects of the embodiments disclosed herein, in whole or in part, can be equivalently implemented in integrated circuits, as one or more computer programs running on one or more computers (e.g., as one or more programs running on one or more computer systems), as one or more programs running on one or more processors (e.g., as one or more programs running on one or more microprocessors), as firmware, or as virtually any combination thereof, and that designing the circuitry and/or writing the code for the software and or firmware would be well within the skill of one of skill in the art in light of the present disclosure. Moreover, those skilled in the art will appreciate that the mechanisms of the present invention are capable of being distributed as a program product in a variety of forms, and that an illustrative embodiment of the subject matter described herein applies regardless of the particular type of signal bearing media used to actually carry out the distribution. Examples of signal bearing media include, but are not limited to: recordable type media such as floppy disks, hard disk drives, Compact Disks (CDs), Digital Video Disks (DVDs), digital tapes, computer memories, etc.; and a transmission type medium such as a digital and/or an analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link and/or channel, a wireless communication link and/or channel, etc.).
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.