The content of the invention
Therefore, the application provides and a kind of block chain technology and satellite positioning tech is conveniently used in combination to the side that product traces to the source
Method, system and server.
According to an aspect of the present invention, there is provided a kind of to be used to provide the method that product is traced to the source, methods described includes:
Determine the place of production information of each product batches in multiple product batches;
The place of production information of each product batches is merged with satellite location data and standard time data, described in calculating
First cryptographic Hash of the place of production information by fusion, and based on the block chain of each batch products of first cryptographic Hash generation
Batch encodes, and the place of production information Jing Guo Rong He and block chain batch coding is stored in block chain in association, the block
Chain batch is encoded for identifying each product batches;
The product information of each monomer product of minimum package unit in present lot product is determined, is believed based on the product
Production information and quality information in breath generate the second cryptographic Hash, and block chain product coding is generated based on second cryptographic Hash,
The product information and block chain product coding are stored in block chain in association, the block chain product coding is to be used for
The identity code of labeled monomer product and it is marked in the outer packing of monomer product;
The monomer product of predetermined quantity is formed into product stream unit and equips satellite fix core for product stream unit
Piece, obtain the product stream unit positional information and will be each in the monomer product of the positional information and predetermined quantity
Monomer product is stored in block chain in association;
Combination to the first cryptographic Hash and the second cryptographic Hash carries out Hash calculation, to generate the 3rd cryptographic Hash, based on the 3rd
Cryptographic Hash generates the private key of present lot product and the private key and present lot product is stored in into block chain in association
In.
Wherein, the place of production information includes:Grown place block message, production qualification information and manufacturer information.
Wherein, the grown place block message includes:The organic class information of soil and soil fertility information.
Wherein, the place of production information by fusion is 6 tuples<Grown place block message, production qualification information, producer's letter
Breath, place of production positional information, production time started, production end time>.
Wherein, the product information includes:Produce deadline, production site, production information, quality information and packaging
Type.
Wherein, the Membership Queries for product of tracing to the source being treated in response to receiving policy of tracing to the source are asked, and block chain query service is flat
The signature that the public key of product to be traced to the source and producer are directed to current production batch by platform is sent to the side of tracing to the source, and the side of tracing to the source is logical
The signature of current product batches and the public key of product to be traced to the source are crossed to verify whether the private key of current production batch is correct.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction block chain query service platform of tracing to the source
Product inquiry request is sent, the block chain query service platform is based on the block chain product coding in the product inquiry request
It is determined that the product information of product to be traced to the source.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction block chain query service platform of tracing to the source
Product inquiry request is sent, the block chain query service platform is encoded based on the block chain batch in the product inquiry request
It is determined that the place of production information of product to be traced to the source.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction block chain query service platform of tracing to the source
Product inquiry request is sent, the block chain query service platform is based on the block chain product coding in the product inquiry request
It is determined that the motion track information of product to be traced to the source.
Wherein, satellite location data is determined by Beidou satellite system and determines to mark according to Beidou satellite system time service
Between punctual;Determined to produce the deadline by the internet of things equipment in production equipment;Quality measurements are determined by quality inspection equipment;With
And production qualification information is occurred by qualification certification mechanism core.
According to another aspect of the present invention, there is provided a kind of to be used to provide the system that product is traced to the source, the system includes:
Batch information processing unit, determine the place of production information of each product batches in multiple product batches;By each product
The place of production information of batch is merged with satellite location data and standard time data, calculates the place of production information by fusion
The first cryptographic Hash, and generate based on first cryptographic Hash block chain batch coding of each batch products, will pass through and melt
Place of production information and block chain the batch coding of conjunction are stored in block chain in association, and the block chain batch is encoded for identifying
Each product batches;
Product information processing unit, determine the product letter of each monomer product of minimum package unit in present lot product
Breath, the second cryptographic Hash is generated based on the production information in the product information and quality information, given birth to based on second cryptographic Hash
Into block chain product coding, the product information and block chain product coding are stored in block chain in association, the area
Block chain product coding is the identity code for labeled monomer product and is marked the outer packing in monomer product;
Positioning unit, the monomer product of predetermined quantity is formed into product stream unit and defended for product stream unit equipment
Star positioning chip, obtain the positional information of the product stream unit and by the positional information and the monomer product of predetermined quantity
In each monomer product be stored in association in block chain;
Computing unit, the combination to the first cryptographic Hash and the second cryptographic Hash carries out Hash calculation, to generate the 3rd cryptographic Hash,
The private key of present lot product is generated based on the 3rd cryptographic Hash and stores the private key and present lot product in association
In block chain.
Wherein, the place of production information includes:Grown place block message, production qualification information and manufacturer information.
Wherein, the grown place block message includes:The organic class information of soil and soil fertility information.
Wherein, the place of production information by fusion is 6 tuples<Grown place block message, production qualification information, producer's letter
Breath, place of production positional information, production time started, production end time>.
Wherein, the product information includes:Produce deadline, production site, production information, quality information and packaging
Type.
Wherein, in addition to query unit, the Membership Queries that product of tracing to the source is treated in response to receiving policy of tracing to the source are asked, will
The signature that the public key and producer of product to be traced to the source are directed to current production batch is sent to the side of tracing to the source, and the side of tracing to the source is by working as
Whether the public key of the signature of preceding product batches and product to be traced to the source is correct to verify the private key of current production batch.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit of tracing to the source sends product and looked into
Request is ask, the query unit determines the product of product to be traced to the source based on the block chain product coding in the product inquiry request
Information.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit of tracing to the source sends product and looked into
Request is ask, the query unit determines the place of production of product to be traced to the source based on the block chain batch coding in the product inquiry request
Information.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit of tracing to the source sends product and looked into
Request is ask, the query unit determines the movement of product to be traced to the source based on the block chain product coding in the product inquiry request
Trace information.
Wherein, satellite location data is determined by Beidou satellite system and determines to mark according to Beidou satellite system time service
Between punctual;Determined to produce the deadline by the internet of things equipment in production equipment;Quality measurements are determined by quality inspection equipment;With
And production qualification information is occurred by qualification certification mechanism core.
According to another aspect of the present invention, there is provided a kind of product is traced to the source server, including:
At least one processor;
Memory, the instruction executable for storing the processor;
The processor, which is configured as performing, to be used to provide the method that product is traced to the source as previously described.
Embodiment
Below based on embodiment, present invention is described, but the present invention is not restricted to these embodiments.Under
It is detailed to describe some specific detail sections in the literary detailed description to the present invention.Do not have for a person skilled in the art
The description of these detail sections can also understand the present invention completely.In order to avoid obscuring the essence of the present invention, known method, mistake
The not narration in detail of journey, flow, element and circuit.
In addition, it should be understood by one skilled in the art that provided herein accompanying drawing be provided to explanation purpose, and
What accompanying drawing was not necessarily drawn to scale.
Unless the context clearly requires otherwise, otherwise entire disclosure is similar with the " comprising " in claims, "comprising" etc.
Word should be construed to the implication included rather than exclusive or exhaustive implication;That is, it is containing for " including but is not limited to "
Justice.
In the description of the invention, it is to be understood that term " first ", " second " etc. are only used for describing purpose, without
It is understood that to indicate or implying relative importance.In addition, in the description of the invention, unless otherwise indicated, the implication of " multiple "
It is two or more.
Fig. 1 shows the logical schematic of product traceability system 100 in the prior art.Product traceability system 100 includes:It is raw
Produce data processing unit 101, product data processing unit 102, logistics data processing unit 103 and platform for data arrangement 104.
Generally, creation data processing unit 101 is used to establish Product archives and preserves the data related to production.It is for example, raw
Production data processing unit 101, which is established, includes agricultural land information, agricultural production membership information, peasant household's information and production person letter
The Product archives of breath.
Product data processing unit 102 is used to establish file of product and preserves the data related to product.For example, product
Data processing unit 102 establishes the production procedure archives and quality testing archives associated with production link.Wherein production procedure
Archives include the process data and status data of links in production flow.Quality testing archives accord with including production standard
Conjunction property, production qualification information, packaged information, quality examination object information etc..
Logistics data processing unit 103 is used to establish the archives related to the logistics information after product export and preserves thing
Stream information.Creation data processing unit 101, product data processing unit 102 and logistics data processing unit 103 can be by institutes
The data of preservation are sent to platform for data arrangement 104, to realize the integration of data.Platform for data arrangement 104 passes through product identification
To be integrated to creation data, product data and logistics data, and data query function is provided based on product identification.With
Family can utilize terminal device to access platform for data arrangement 104, to obtain the inquiry number determined by platform for data arrangement 104
According to.
Fig. 2 shows the flow chart according to the preferred embodiment of the present invention for being used to provide the method 200 that product is traced to the source.Side
Method 200 realizes that the position in production plot locks by satellite positioning tech, and can will produce soil information, the fertility in plot
Information, production site, quality examination result, packaged information, production qualification are merged with spatial geographical locations.In addition, method
200 can also provide the soil information for producing plot, fertility information, production site, quality examination result, packaged information, production
Matter is merged with the production deadline.Also, the information by fusion is stored in block chain to prevent that information from being usurped by method 200
Change.
Product by production after the completion of, method 200 can product specific unit packaging (e.g., including 5,6,
The packaging unit of the monomer product such as 10 or 12) on configure satellite fix chip, so that it is guaranteed that product is real in logistics progress
It is existing whole traceable.In addition, method 200 is synchronized positional information by using block chain technology to whole network in real time,
So as to ensure that whole retrospect of the product in the process of circulation.Method 200 changes the Product archives based on central database, production
The trustship mechanism of product archives, by using block chain distributed storage and encryption technology so that including production link, intermediate links
With the producer in sales section, regulator, sellers, consumer and financial institution (if lender participates in production, pin
Sell link) all related sides can realize the synchronization of spatial information and temporal information, deposit card and also ensure data can not distort.
Method 200 carries out information processing and feedback by service platform, so that block chain can be inquired about at any time by client by obtaining user
In information.
Preferably, method 200 is since step 201 place.In step 201, each product batch in multiple product batches is determined
Secondary place of production information.Wherein, place of production information includes:Grown place block message, production qualification information and manufacturer information.The life
Place of production block message includes:The organic class information of soil and soil fertility information.Generally, the product of same batch same clicks through
Row production, and the place of production of each product batches may be related to the credit rating of product.
In step 202, place of production information and the satellite location data and standard time data of each product batches are melted
Close, calculate the first cryptographic Hash of the place of production information by fusion, and each batch is generated based on first cryptographic Hash
The block chain batch coding of product, the place of production information Jing Guo Rong He and block chain batch coding are stored arrive block chain in association
In, the block chain batch is encoded for identifying each product batches.Preferably, place of production information includes:Grown place block message, life
Produce qualification information and manufacturer information.In order to which the life of each batch products is positioned and can determine to place of production information
The time is produced, the application is merged the place of production information of each product batches with satellite location data and standard time data.Its
Middle the application is determined the geographical position in the place of production and opened using satellite system time service to record production using global position system
Begin time and production end time.Therefore, the place of production information by fusion can be 6 tuples<Grown place block message, production qualification
Information, manufacturer information, place of production positional information, production time started, production end time>.
Then, the application calculates the first cryptographic Hash of the place of production information by fusion.For example, by 6 tuples<Grown place
Block message, production qualification information, manufacturer information, place of production positional information, production time started, production end time>Form word
Symbol string, and using sha256 and ripemd160 algorithms to being calculated by this character string to generate the first cryptographic Hash.Its
In, form the placement of character string include being linked in sequence, the various modes such as logical operation.Then, the application is based on the described first Kazakhstan
Uncommon value generates the block chain batch coding of each batch products, and the place of production information by fusion is related to block chain batch coding
The storage of connection ground is into block chain.Wherein, the block chain batch is encoded for identifying each product batches, i.e., using block chain batch
Identifier of the secondary coding as each product batches.
In step 203, the product information of each monomer product of minimum package unit in present lot product is determined, is based on
Production information and quality information in the product information generate the second cryptographic Hash, and block chain is generated based on second cryptographic Hash
Product coding, the product information and block chain product coding are stored in block chain in association, the block chain product
Coding is the identity code for labeled monomer product and is marked the outer packing in monomer product.Generally, monomer produces
Product can also be the minimum unit sold in the market, such as one bag of milk, a box Yoghourt etc..Wherein, the product letter
Breath includes:Produce deadline, production site, production information, quality information and packaging type.
The second cryptographic Hash is generated subsequently, based on the production information in the product information and quality information.For example, will production
Deadline, production site, production information, quality information and packaging type composition character string, and using sha256 and
Ripemd160 algorithms by this character string to being calculated to generate the second cryptographic Hash.Wherein, the placement bag of character string is formed
Include be linked in sequence, the various modes such as logical operation.Then, the application is based on second cryptographic Hash generation block chain product volume
Code, the product information and block chain product coding are stored in block chain in association.Preferably, the block chain product
Coding is the identity code for labeled monomer product and is marked the outer packing in monomer product.
The production informations such as production time, place, product quality, packaging per a collection of product enter warehouse for finished product in the batch
When, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.It is single
After packing production, unique block chain encoding will be generated after creation data and quality detecting data Hash, as single product
Identity code, i.e., the identification code in block chain to should product source data.By the identification code of tracing to the source of this product
It is imprinted in the packaging of single product.
In step 204, the monomer product of predetermined quantity is formed into product stream unit and equipped for product stream unit
Satellite fix chip, obtain the positional information of the product stream unit and produce the monomer of the positional information and predetermined quantity
Each monomer product in product is stored in block chain in association.After the completion of production, on the certain unit packaging of product
Equipped with satellite fix chip, it is ensured that product is whole traceable in logistics progress, while is believed position using block chain technology
(or timing) is synchronous to the whole network in real time for breath, ensure that whole retrospect of the product in the process of circulation.
In step 205, the combination to the first cryptographic Hash and the second cryptographic Hash carries out Hash calculation, to generate the 3rd Hash
Value, the private key of present lot product is generated based on the 3rd cryptographic Hash and deposits the private key and present lot product in association
Storage is in block chain.Per production time of a collection of product, place, product quality, the production information such as packaging the batch into
During product storehouse, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.
After individual packaging production, unique block chain encoding will be generated after creation data and quality detecting data Hash,
As the identity code of single product, i.e., the identification code in block chain to should product source data.By this product
Identification code of tracing to the source be imprinted in the packaging of single product.The cryptographic Hash of single product and the cryptographic Hash of batch products are by Hash again
The private key of this batch of product is generated by random generator afterwards, then by secp256k1 algorithm process private keys, generates public key, passes through
Sha256 and ripemd160 algorithm process public keys, generate public key Hash.When the demand for initiating to trace to the source occurs, in block link network
Product public key to be traced to the source is obtained in network, while asks for producer signature, producer sends electronic signature to the side of tracing to the source, and tracing to the source can
To verify that producer possesses private key by signature and public key, process of tracing to the source is completed.
Preferably, the Membership Queries for product of tracing to the source being treated in response to receiving policy of tracing to the source are asked, block chain query service
The signature that the public key of product to be traced to the source and producer are directed to current production batch by platform is sent to the side of tracing to the source, the side of tracing to the source
Verify whether the private key of current production batch is correct by the signature of current production batch and the public key of product to be traced to the source.
Preferably, in the case of it is determined that the private key of current production batch is correct, direction block chain query service of tracing to the source is flat
Platform sends product inquiry request, and the block chain query service platform is compiled based on the block chain product in the product inquiry request
Code determines the product information of product to be traced to the source.Preferably, in the case of it is determined that the private key of current production batch is correct, the side of tracing to the source
Product inquiry request is sent to block chain query service platform, the block chain query service platform is based on product inquiry please
Block chain batch coding in asking determines the place of production information of product to be traced to the source.Preferably, it is determined that the private key of current production batch
In the case of correctly, direction block chain query service platform of tracing to the source sends product inquiry request, and the block chain query service is flat
Block chain product coding of the stylobate in the product inquiry request determines the motion track information of product to be traced to the source.
Preferably, satellite location data is determined by Beidou satellite system and determined according to Beidou satellite system time service
Standard time;Determined to produce the deadline by the internet of things equipment in production equipment;Quality measurements are determined by quality inspection equipment;
And production qualification information is occurred by qualification certification mechanism core.
Fig. 3 shows the structural representation according to the preferred embodiment of the present invention for being used to provide the system 300 that product is traced to the source
Figure.System 300 realizes that the position in production plot locks by satellite positioning tech, and can believe the soil for producing plot
Breath, fertility information, production site, quality examination result, packaged information, production qualification are merged with spatial geographical locations.This
Outside, system 300 will can also produce the soil information in plot, fertility information, production site, quality examination result, packaged information,
Production qualification is merged with the production deadline.Also, the information by fusion is stored in block chain to prevent letter by system 300
Breath is tampered.
Product by production after the completion of, system 300 can product specific unit packaging (e.g., including 5,6,
The packaging unit of the monomer product such as 10 or 12) on configure satellite fix chip, so that it is guaranteed that product is real in logistics progress
It is existing whole traceable.In addition, system 300 is synchronized positional information by using block chain technology to whole network in real time,
So as to ensure that whole retrospect of the product in the process of circulation.System 300 changes the Product archives based on central database, production
The trustship mechanism of product archives, by using block chain distributed storage and encryption technology so that including production link, intermediate links
With the producer in sales section, regulator, sellers, consumer and financial institution (if lender participates in production, pin
Sell link) all related sides can realize the synchronization of spatial information and temporal information, deposit card and also ensure data can not distort.
System 300 carries out information processing and feedback by service platform, so that block chain can be inquired about at any time by client by obtaining user
In information.
Preferably, system 300 includes:Batch information processing unit 301, product information processing unit 302, positioning unit
303rd, computing unit 304 and query unit 305.Batch information processing unit 301 is used to determine each in multiple product batches
The place of production information of product batches.Wherein, place of production information includes:Grown place block message, production qualification information and manufacturer information.
The grown place block message includes:The organic class information of soil and soil fertility information.Generally, the product of same batch is same
Place is produced, and the place of production of each product batches may be related to the credit rating of product.
Batch information processing unit 301 is by the place of production information of each product batches and satellite location data and standard time number
According to being merged, the first cryptographic Hash of the place of production information by fusion is calculated, and generate based on first cryptographic Hash
The block chain batch coding of each batch products, the place of production information Jing Guo Rong He and block chain batch coding are stored in association
Into block chain, the block chain batch is encoded for identifying each product batches.Preferably, place of production information includes:Grown place
Block message, production qualification information and manufacturer information.In order to which each batch is positioned and can determine to place of production information
The production time of secondary product, batch information processing unit 301 by the place of production information of each product batches and satellite location data and
Standard time data is merged.Wherein the application determines the geographical position in the place of production and utilized to defend using global position system
Star system time service produces time started and production end time to record.Therefore, the place of production information by fusion can be 6 tuples
<Grown place block message, production qualification information, manufacturer information, place of production positional information, production time started, production end time
>。
Batch information processing unit 301 calculates the first cryptographic Hash of the place of production information by fusion.For example, by 6 yuan
Group<At the end of grown place block message, production qualification information, manufacturer information, place of production positional information, production time started, production
Between>Character string is formed, and using sha256 and ripemd160 algorithms to being calculated by this character string to generate first
Cryptographic Hash.Wherein, form the placement of character string and include being linked in sequence, the various modes such as logical operation.Then, batch information is handled
Unit 301 generates the block chain batch coding of each batch products based on first cryptographic Hash, and the place of production by fusion is believed
Breath and block chain batch coding store in block chain in association.Wherein, the block chain batch encodes each for identifying
Product batches, i.e., encode the identifier as each product batches using block chain batch.
Product information processing unit 302 determines the product of each monomer product of minimum package unit in present lot product
Information, the second cryptographic Hash is generated based on the production information in the product information and quality information, based on second cryptographic Hash
Block chain product coding is generated, the product information and block chain product coding are stored in block chain in association, it is described
Block chain product coding is the identity code for labeled monomer product and is marked the outer packing in monomer product.It is logical
Often, monomer product can also be the minimum unit sold in the market, such as one bag of milk, a box Yoghourt etc..Wherein, institute
Stating product information includes:Produce deadline, production site, production information, quality information and packaging type.
The second cryptographic Hash is generated subsequently, based on the production information in the product information and quality information.For example, will production
Deadline, production site, production information, quality information and packaging type composition character string, and using sha256 and
Ripemd160 algorithms by this character string to being calculated to generate the second cryptographic Hash.Wherein, the placement bag of character string is formed
Include be linked in sequence, the various modes such as logical operation.Then, the application is based on second cryptographic Hash generation block chain product volume
Code, the product information and block chain product coding are stored in block chain in association.Preferably, the block chain product
Coding is the identity code for labeled monomer product and is marked the outer packing in monomer product.
The production informations such as production time, place, product quality, packaging per a collection of product enter warehouse for finished product in the batch
When, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.It is single
After packing production, unique block chain encoding will be generated after creation data and quality detecting data Hash, as single product
Identity code, i.e., the identification code in block chain to should product source data.By the identification code of tracing to the source of this product
It is imprinted in the packaging of single product.
The monomer product of predetermined quantity is formed product stream unit and equipped for product stream unit by positioning unit 303
Satellite fix chip, obtain the positional information of the product stream unit and produce the monomer of the positional information and predetermined quantity
Each monomer product in product is stored in block chain in association.After the completion of production, on the certain unit packaging of product
Equipped with satellite fix chip, it is ensured that product is whole traceable in logistics progress, while is believed position using block chain technology
(or timing) is synchronous to the whole network in real time for breath, ensure that whole retrospect of the product in the process of circulation.
Combination of the computing unit 304 to the first cryptographic Hash and the second cryptographic Hash carries out Hash calculation, to generate the 3rd Hash
Value, the private key of present lot product is generated based on the 3rd cryptographic Hash and deposits the private key and present lot product in association
Storage is in block chain.Per production time of a collection of product, place, product quality, the production information such as packaging the batch into
During product storehouse, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.
After individual packaging production, unique block chain encoding will be generated after creation data and quality detecting data Hash,
As the identity code of single product, i.e., the identification code in block chain to should product source data.By this product
Identification code of tracing to the source be imprinted in the packaging of single product.The cryptographic Hash of single product and the cryptographic Hash of batch products are by Hash again
The private key of this batch of product is generated by random generator afterwards, then by secp256k1 algorithm process private keys, generates public key, passes through
Sha256 and ripemd160 algorithm process public keys, generate public key Hash.When the demand for initiating to trace to the source occurs, in block link network
Product public key to be traced to the source is obtained in network, while asks for producer signature, producer sends electronic signature to the side of tracing to the source, and tracing to the source can
To verify that producer possesses private key by signature and public key, process of tracing to the source is completed.
The Membership Queries that query unit 305 treats product of tracing to the source in response to receiving policy of tracing to the source are asked, and will wait production of tracing to the source
The signature that the public key and producer of product are directed to current production batch is sent to the side of tracing to the source, and the side of tracing to the source passes through current production batch
Secondary signature and the public key of product to be traced to the source verify whether the private key of current production batch is correct.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit 305 of tracing to the source sends product
Inquiry request, the query unit 305 determine product to be traced to the source based on the block chain product coding in the product inquiry request
Product information.Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit 305 of tracing to the source is sent
Product inquiry request, the query unit 305 determine to wait to trace to the source based on the block chain batch coding in the product inquiry request
The place of production information of product.Wherein, in the case of it is determined that the private key of current production batch is correct, direction query unit 305 of tracing to the source
Product inquiry request is sent, the query unit 305 determines to treat based on the block chain product coding in the product inquiry request
Trace to the source the motion track information of product.
Wherein, satellite location data is determined by Beidou satellite system and determines to mark according to Beidou satellite system time service
Between punctual;Determined to produce the deadline by the internet of things equipment in production equipment;Quality measurements are determined by quality inspection equipment;With
And production qualification information is occurred by qualification certification mechanism core.
Fig. 4 shows the logical schematic of product traceability system 400 according to the preferred embodiment of the present invention.Such as Fig. 4 institutes
Show, product traceability system 400 includes:Creation data processing unit 401, product data processing unit 402, satellite data processing are single
Member 403, logistics data processing unit 403, integration platform 404 and block chain deposit card Infrastructure platform 405.Preferably, it is raw
Production data processing unit 401 can determine the place of production information of each product batches in multiple product batches.Wherein, place of production packet
Include:Grown place block message, production qualification information and manufacturer information.The grown place block message includes:The organic grade of soil
Information and soil fertility information.Generally, the product of same batch is produced in same place, and the production of each product batches
Ground may be related to the credit rating of product.Creation data processing unit 401 calculates the of the place of production information by fusion
One cryptographic Hash.For example, by 6 tuples<Grown place block message, production qualification information, manufacturer information, place of production positional information, production
Time started, production end time>Character string is formed, and using sha256 and ripemd160 algorithms to passing through this character
String is calculated to generate the first cryptographic Hash.Wherein, form the placement of character string and include being linked in sequence, the various sides such as logical operation
Formula.Then, creation data processing unit 401 generates the block chain batch volume of each batch products based on first cryptographic Hash
Code, to store the place of production information Jing Guo Rong He and block chain batch coding to area in association in subsequent treatment
In block chain.Wherein, the block chain batch is encoded for identifying each product batches, i.e., is encoded using block chain batch as every
The identifier of individual product batches.
Creation data processing unit 401 is by the place of production information of each product batches and satellite location data and standard time number
According to being merged, the first cryptographic Hash of the place of production information by fusion is calculated.Preferably, place of production information includes:Grown place
Block message, production qualification information and manufacturer information.In order to which each batch is positioned and can determine to place of production information
The production time of secondary product, creation data processing unit 401 by the place of production information of each product batches and satellite location data and
Standard time data is merged.Wherein the application determines the geographical position in the place of production and utilized to defend using global position system
Star system time service produces time started and production end time to record.Therefore, the place of production information by fusion can be 6 tuples
<Grown place block message, production qualification information, manufacturer information, place of production positional information, production time started, production end time
>。
Product data processing unit 402 determines the product of each monomer product of minimum package unit in present lot product
Information, the second cryptographic Hash is generated based on the production information in the product information and quality information, based on second cryptographic Hash
Block chain product coding is generated, to be associated the product information and block chain product coding in subsequent treatment
Ground store into block chain, the block chain product coding be the identity code for labeled monomer product and be marked in
In the outer packing of monomer product.Generally, monomer product can also be the minimum unit sold in the market, such as one bag of ox
Milk, a box Yoghourt etc..Wherein, the product information includes:Produce the deadline, production site, production information, quality information with
And packaging type.For example, will production deadline, production site, production information, quality information and packaging type composition character
String, and using sha256 and ripemd160 algorithms to being calculated by this character string to generate the second cryptographic Hash.Its
In, form the placement of character string include being linked in sequence, the various modes such as logical operation.
Satellite data processing unit 403 can obtain satellite location data and satellite time transfer data.For example, production site position
Confidence ceases the BEI-DOU position system collection by production firm and is capped timestamp according to Big Dipper time service, uploads network automatically.Necessarily
The product (product of such as one production batch) of batch, this batch of product belongs to some manufacturer, and (producer is block chain link
Point), satellite positioning information passes manufacturer's node back by internet of things equipment, and is stored in block chain at times.The production of certain batch
Product (product of such as one production batch), this batch of product belongs to some manufacturer's (producer is block chain node), satellite
Position information passes manufacturer's node back by internet of things equipment, and is stored in block chain at times.
Logistics data processing unit 403 obtain with product export after logistics information and preserve logistics information, to promote
Creation data, product data and logistics data are integrated by product identification.
Integration platform 404 by Hash again, that is, is assembled to the cryptographic Hash of single product and the cryptographic Hash of batch products
Hash, to generate merging Hash.Timestamp is added to the packet including cryptographic Hash using the standard time of satellite time transfer.With
Afterwards, the private key of this batch of product is generated by random generator, then by secp256k1 algorithm process private keys, generates public key, passes through
Sha256 and ripemd160 algorithm process public keys, generate public key Hash.When the demand for initiating to trace to the source occurs, in block link network
Product public key to be traced to the source is obtained in network, while asks for producer signature, producer sends electronic signature to the side of tracing to the source, and tracing to the source can
To verify that producer possesses private key by signature and public key, process of tracing to the source is completed.So possess source, production batch, list
Product three parts are traced to the source information.
Block chain deposits card Infrastructure platform 405 and is used to preserving traces to the source related data and in response to receiving to product
Policy of tracing to the source treats the Membership Queries request for product of tracing to the source, and block chain query service platform is by the public key of product to be traced to the source and production
Policy is sent to the side of tracing to the source for the signature of current production batch, and the side of tracing to the source is by the signature of current production batch and waits to trace back
The public key of product-derived verifies whether the private key of current production batch is correct.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction block chain of tracing to the source deposits card infrastructure
Platform 405 sends product inquiry request, and the block chain deposits card Infrastructure platform 405 based in the product inquiry request
Block chain product coding determines the product information of product to be traced to the source.Wherein, it is determined that the correct feelings of the private key of current production batch
Under condition, direction block chain of tracing to the source deposits card Infrastructure platform 405 and sends product inquiry request, and the block chain deposits card infrastructure
Platform 405 determines the place of production information of product to be traced to the source based on the block chain batch coding in the product inquiry request.Wherein, exist
In the case of determining that the private key of current production batch is correct, direction block chain of tracing to the source deposits card Infrastructure platform 405 and sends product
Inquiry request, the block chain deposit card Infrastructure platform 405 based on the block chain product coding in the product inquiry request
It is determined that the motion track information of product to be traced to the source.
Preferably, production site positional information is gathered by the BEI-DOU position system of production firm and is capped according to Big Dipper time service
Timestamp, network is uploaded automatically.The deadline is produced, is recorded by the internet of things equipment in production equipment, and upload network automatically.
Quality measurements, network is uploaded by quality inspection equipment output equipment automatically.Qualification is produced, by qualification certification mechanism core hair, core hair
After cochain deposit card.Manufacturer uploads the information package in these equipment as packaged service device.
The application carries out the digital signature of creation data or product data using public key and private key, that is, using private key encryption
Signature send jointly to other side with public key, other side with the content that encryption is checked after public key decryptions and the content received whether one
Cause.The block catenary system of the application uses encryption mechanism and distributed key, and the central role of block catenary system is by source
Relevant all information enter the authenticity that chain ensures source information.Secondly, block catenary system is using distributed cipher key skill
Art, the private key of each user are generated in individual subscriber wallet, thus only user oneself preserve have this part of private key, so
Reduce the safety problem of generating process.Block chain, it is necessary to be signed with private key in transaction and broadcasting process, complete by signature
The whole network is just broadcast to afterwards, therefore private key will not also be lost during transaction, can thus protect the safety of private key well
Property.By such means, make to trace to the source each time it is all similar once merchandise, and this " transaction " is completed on block chain,
It ensure that the authenticity for the behavior of tracing to the source.
Fig. 5 shows the structural representation of product traceability system 500 according to the preferred embodiment of the present invention.Product is traced to the source
System 500 realizes that the position in production plot locks by satellite positioning tech, and can will produce soil information, the fertilizer in plot
Force information, production site, quality examination result, packaged information, production qualification are merged with spatial geographical locations.In addition, production
Product traceability system 500 can also believe the soil information for producing plot, fertility information, production site, quality examination result, packaging
Breath, production qualification are merged with the production deadline.Also, the information by fusion is stored in area by product traceability system 500
Block chain is to prevent information to be tampered.
After the completion of product is by production, product traceability system 500 can pack (e.g., including 5 in the specific unit of product
Individual, 6, the packaging unit of the monomer product such as 10 or 12) on configure satellite fix chip, so that it is guaranteed that product is in logistics
Realized in journey whole traceable.In addition, product traceability system 500 by using block chain technology by positional information in real time to whole
Network synchronizes, so as to ensure that whole retrospect of the product in the process of circulation.Product traceability system 500, which changes, to be based on
The Product archives of heart database, the trustship mechanism of file of product, by using block chain distributed storage and encryption technology so that
Including the producer in production link, intermediate links and sales section, regulator, sellers, consumer and financial institution (such as
Fruit have lender participate in produce and sell link) all related sides can realize the synchronization of spatial information and temporal information, deposit card
And ensure that data can not distort.Product traceability system 500 carries out information processing and feedback by service platform, so as to obtain user
The information that can be inquired about at any time in block chain by client.
507, big-dipper satellite positioning obtains real-time position information and provides time service information.Production site positional information by
The BEI-DOU position system collection of production firm is simultaneously capped timestamp according to Big Dipper time service.In addition, it is production by Beidou satellite system
Product traceability system 500 provides the standard time.
5004, the place of production information of each product batches in multiple product batches is determined.Wherein, place of production information includes:It is raw
Place of production block message, production qualification information and manufacturer information.The grown place block message includes:The organic class information of soil and
Soil fertility information.Generally, the product of same batch is produced in same place, and the place of production of each product batches may
It is related to the credit rating of product.
The place of production information of each product batches is merged with satellite location data and standard time data, described in calculating
First cryptographic Hash of the place of production information by fusion, and based on the block chain of each batch products of first cryptographic Hash generation
Batch encodes, and the place of production information Jing Guo Rong He and block chain batch coding is stored in block chain in association, the block
Chain batch is encoded for identifying each product batches.Preferably, place of production information includes:Grown place block message, production qualification information
And manufacturer information., will in order to which the production time of each batch products is positioned and can determine to place of production information
The place of production information of each product batches is merged with satellite location data and standard time data.Wherein the application uses satellite
Alignment system come determine the geographical position in the place of production and using satellite system time service come record production the time started and production terminate
Time.Therefore, the place of production information by fusion can be 6 tuples<Grown place block message, production qualification information, manufacturer information,
Place of production positional information, production time started, production end time>.
Calculate the first cryptographic Hash of the place of production information by fusion.For example, by 6 tuples<Grown place block message, production
Qualification information, manufacturer information, place of production positional information, production time started, production end time>Character string is formed, and is made
With sha256 and ripemd160 algorithms to being calculated by this character string to generate the first cryptographic Hash.Wherein, character is formed
The various modes such as the placement of string is including being linked in sequence, logical operation.Each batch production is generated subsequently, based on first cryptographic Hash
The block chain batch coding of product, the place of production information Jing Guo Rong He and block chain batch coding are stored arrive block chain in association
In.Wherein, the block chain batch is encoded for identifying each product batches, i.e., is encoded using block chain batch and be used as each production
The identifier of product batch.
505, the product information of each monomer product of minimum package unit in present lot product is determined, based on described
Production information and quality information in product information generate the second cryptographic Hash, and block chain product is generated based on second cryptographic Hash
Coding, the product information and block chain product coding is stored in block chain in association, the block chain product coding
It is the identity code for labeled monomer product and is marked the outer packing in monomer product.Generally, monomer product
Can be the minimum unit sold in the market, such as one bag of milk, a box Yoghourt etc..Wherein, the product information bag
Include:Produce deadline, production site, production information, quality information and packaging type.
The second cryptographic Hash is generated subsequently, based on the production information in the product information and quality information.For example, will production
Deadline, production site, production information, quality information and packaging type composition character string, and using sha256 and
Ripemd160 algorithms by this character string to being calculated to generate the second cryptographic Hash.Wherein, the placement bag of character string is formed
Include be linked in sequence, the various modes such as logical operation.Then, the application is based on second cryptographic Hash generation block chain product volume
Code, the product information and block chain product coding are stored in block chain in association.Preferably, the block chain product
Coding is the identity code for labeled monomer product and is marked the outer packing in monomer product.
The production informations such as production time, place, product quality, packaging per a collection of product enter warehouse for finished product in the batch
When, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.It is single
After packing production, unique block chain encoding will be generated after creation data and quality detecting data Hash, as single product
Identity code, i.e., the identification code in block chain to should product source data.By the identification code of tracing to the source of this product
It is imprinted in the packaging of single product.
506, the monomer product of predetermined quantity is formed into product stream unit and equips satellite for product stream unit
Positioning chip, obtain the positional information of the product stream unit and by the monomer product of the positional information and predetermined quantity
Each monomer product be stored in association in block chain.After the completion of production, it is equipped with the certain unit packaging of product
Satellite fix chip, it is ensured that product is whole traceable in logistics progress, while using block chain technology that positional information is real
When (or regularly) synchronous to the whole network, it ensure that whole retrospect of the product in the process of circulation.
503, the combination to the first cryptographic Hash and the second cryptographic Hash carries out Hash calculation, to generate the 3rd cryptographic Hash, base
The private key of present lot product is generated in the 3rd cryptographic Hash and is stored in the private key and present lot product in association
In block chain.The production informations such as production time, place, product quality, packaging per a collection of product enter warehouse for finished product in the batch
When, encrypted in the lump together with geography information and temporal information and be included in block chain, generate the block chain identity coding of present lot.
After individual packaging production, unique block chain encoding will be generated after creation data and quality detecting data Hash,
As the identity code of single product, i.e., the identification code in block chain to should product source data.By this product
Identification code of tracing to the source be imprinted in the packaging of single product.The cryptographic Hash of single product and the cryptographic Hash of batch products are by Hash again
The private key of this batch of product is generated by random generator afterwards, then by secp256k1 algorithm process private keys, generates public key, passes through
Sha256 and ripemd160 algorithm process public keys, generate public key Hash.When the demand for initiating to trace to the source occurs, in block link network
Product public key to be traced to the source is obtained in network, while asks for producer signature, producer sends electronic signature to the side of tracing to the source, and tracing to the source can
To verify that producer possesses private key by signature and public key, process of tracing to the source is completed.
502, the Membership Queries that product of tracing to the source is treated in response to receiving policy of tracing to the source are asked, and block chain query service is flat
The signature that the public key of product to be traced to the source and producer are directed to current production batch by platform is sent to the side of tracing to the source, and the side of tracing to the source is logical
The signature of current product batches and the public key of product to be traced to the source are crossed to verify whether the private key of current production batch is correct.
Wherein, in the case of it is determined that the private key of current production batch is correct, direction block chain query service platform of tracing to the source
Product inquiry request is sent, the block chain query service platform is based on the block chain product coding in the product inquiry request
It is determined that the product information of product to be traced to the source.Wherein, in the case of it is determined that the private key of current production batch is correct, trace to the source direction area
Block chain query service platform sends product inquiry request, and the block chain query service platform is based in the product inquiry request
Block chain batch coding determine the place of production information of product to be traced to the source.Wherein, it is determined that the private key of current production batch is correct
In the case of, direction block chain query service platform of tracing to the source sends product inquiry request, and the block chain query service platform is based on
Block chain product coding in the product inquiry request determines the motion track information of product to be traced to the source.
Wherein, satellite location data is determined by Beidou satellite system and determines to mark according to Beidou satellite system time service
Between punctual;Determined to produce the deadline by the internet of things equipment in production equipment;Quality measurements are determined by quality inspection equipment;With
And production qualification information is occurred by qualification certification mechanism core.
501, looking into for user's input is received by block chain client (terminal for being used to provide inquiry service for client)
Ask request.
Detailed description above has elaborated equipment and/or method by using block diagram, flow chart and/or example
Numerous embodiments.In the case where this block diagram, flow chart and/or example include one or more functions and/or operation,
It will be understood by those skilled in the art that each function and/or operation in this block diagram, flow chart or example can be by various
Hardware, software, firmware or they substantial any combination to realize individually and/or jointly.In one embodiment, it is of the invention
If the stem portion of the theme can pass through application specific integrated circuit (ASIC), field programmable gate array (FPGA), data signal
Processor (DSP) or other integrated forms are realized.However, those skilled in the art will appreciate that implementation disclosed herein
The some aspects of example can be realized equally in integrated circuits on the whole or partly, be embodied as calculating at one or more
The one or more computer programs run on machine are (for example, be embodied as one run in one or more computer system
Or multiple programs), the one or more programs for being embodied as running on the one or more processors are (for example, be embodied as at one
Or the one or more programs run on multi-microprocessor), it is embodied as firmware, or be substantially embodied as appointing for aforesaid way
Meaning combination, and those skilled in the art will be provided with designing circuit and/or write software and/or firmware code according to the present invention
Ability.In addition, it would be recognized by those skilled in the art that the mechanism of the present invention can be carried out as the program product of diversified forms
Distribution, and show regardless of the actual particular type for being used for performing the signal bearing medium of distribution, theme of the present invention
Example property embodiment is applicable.The example of signal bearing medium includes but is not limited to:Recordable-type media, such as floppy disk, hard drive
Device, compact-disc (CD), digital video disc (DVD), digital magnetic tape, computer storage etc.;And transmission type media, such as numeral
And/or analogue communication medium (for example, optical fiber cable, waveguide, wired communications links and/or channel, wireless communication link and/or
Channel etc.).
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for those skilled in the art
For, the present invention can have various changes and change.All any modifications made within spirit and principles of the present invention, it is equal
Replace, improve etc., it should be included in the scope of the protection.