CN109583917A - A kind of two dimensional code source tracing method and system based on block chain - Google Patents
A kind of two dimensional code source tracing method and system based on block chain Download PDFInfo
- Publication number
- CN109583917A CN109583917A CN201811469190.6A CN201811469190A CN109583917A CN 109583917 A CN109583917 A CN 109583917A CN 201811469190 A CN201811469190 A CN 201811469190A CN 109583917 A CN109583917 A CN 109583917A
- Authority
- CN
- China
- Prior art keywords
- record
- commodity
- source
- block
- producer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
- G06K17/0029—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/018—Certifying business or products
- G06Q30/0185—Product, service or business identity fraud
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Computer Networks & Wireless Communication (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A kind of two dimensional code traceability system based on block chain, is made of the center of tracing to the source, producer, dealer, consumer, time stamp server;Producer and dealer generate the record of production of commodity, storage record, outbound record, logistics record and dealer's record;And verification and preservation to record are completed in center of tracing to the source;It traces to the source convenient for consumer merchandise news.The introducing of block chain technology and third party's time stamp server, so that all records of tracing to the source of commodity have unalterable feature, non-repudiation;The index position information for retaining a record on the commodity in record, so that the backdating capability of system, speed are enhanced;Composition is recorded in specification block, provides the ability of laterally retrospect commodity.
Description
Technical field
The present invention relates to belong to record field of tracing to the source, and in particular to a kind of two dimensional code source tracing method based on block chain and is
System.
Background technique
With the rapid development of mobile Internet, traceability system especially two dimensional code traceability system has obtained more extensive
Using, push the process management of commodity to intelligent direction develop.But existing two dimensional code traceability system is substantially by one
The mechanism of a centralization be responsible for manage and run, the procedural informations such as commodity production, storage, logistics and sale are all by the mechanism
Publication, lack third-party monitoring.Once center is hacked or crumbles from inside, then whole system moment collapses.Once there are media
Report, certain two-dimension code anti-counterfeit company is not only anti-fake but also fakes, and the data of enterprise, a large amount of " genuine " the false labels of manufacture are managed on behalf of another in modification.
Summary of the invention
The purpose of the present invention is to provide a kind of two dimensional code source tracing methods based on block chain.
It is another object of the present invention to provide a kind of two dimensional code traceability systems based on block chain, solve commodity and trace to the source
Data existing the problem of being tampered during preservation, so that two dimensional code is traced to the source, have can not tamper, undeniably for data
Property;
The object of the invention is realized by following technical solution:
A kind of two dimensional code source tracing method based on block chain, comprising: record generation method, block chain generation method, record backtracking
Method;
During commodity production, first, in accordance with generation method is recorded, generation is recorded including the record of production, storage, outbound records,
Logistics record and dealer's record;Then according to block chain generation method, complete preservation to record, the generation of block chain with
And provide inquiry;Finally, according to record retrogressive method, by the inquiry and decryption to block chain, obtain the corresponding record of production,
It is put in storage record, outbound record, logistics record and dealer's record;
The record of production by commodity trace to the source code, creation data ciphertext and producer signature constitute;The creation data ciphertext by
Creation data is obtained by symmetric key encryption;The creation data includes the commodity correlation place of production, workshop, producers, packaging
Personnel and inspector;Producer's signature refers to that producer is signed using the number that private key encrypts creation data ciphertext HASH value
Name;
It is described storage record by commodity trace to the source code, the storage data ciphertext of commodity, producer sign and commodity the record of production in area
Block chain index position composition;
Outbound record is recorded in area by the trace to the source storage of code, the outbound data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Logistics record is recorded in area by the trace to the source outbound of code, the logistics data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Dealer record is recorded by the trace to the source logistics of code, the dealership data ciphertext of commodity, producer's signature and commodity of commodity
It is formed in block chain index position;
Above-mentioned storage data ciphertext, outbound data ciphertext, logistics data ciphertext and dealership data ciphertext be respectively be put in storage data,
Outbound data, logistics data and dealership data are obtained by symmetric key encryption;
Above-mentioned producer signature be respectively producer using private key to storage data ciphertext, outbound data ciphertext, logistics data ciphertext and
The digital signature that the HASH value of dealership data ciphertext is encrypted;
All records are sent to central store of tracing to the source by producer;
The block chain generation method, including timestamp endorsement method, block head generation method, block body generation method;
The block body generation method is the center of tracing to the source with every, and the HASH value recorded constructs Merkel tree as leaf node,
Merkel tree and all records for constructing Merkel tree form block body;
The block head generation method by the HASH value of a upper block, block number, block body Merkel root vertex HASH value,
Timestamp collectively constitutes block head;If the upper block nothing, HASH value are all zero;The block head and block body composition
Block;
The timestamp is timestamp endorsement method generation, i.e., upper block HASH value, block number, block body Merkel
The character string that root vertex HASH value is spliced into obtains HASH value by HASH algorithm, using center secret key of tracing to the source to character string
HASH value is signed, and send third party's time stamp server cover timestamp, the timestamp include trace to the source center signature,
Time stamp server receiving time and time stamp server digital signature.
The record retrogressive method, including block localization method and block source tracing method;
The block localization method searches for the last one link record position by tracing to the source code in block chain, extracts note
Upper recording indexes position in record, producer's signature and ciphertext, using producer's signature, ciphertext and factory public key to content and identity into
Row verification, and acquisition data information is decrypted to ciphertext using symmetric key;
The block source tracing method is to trace back to a upper record by upper recording indexes position, and obtain a upper note in record
Index position, producer's signature and ciphertext are recorded to obtain, is checked and is decrypted, the upper note of retrospect is continued by upper recording indexes position
Record, until tracing back to the record of production.
On the other hand, the present invention provides a kind of two dimensional code traceability system based on block chain, by the center of tracing to the source, producer, warp
Sell quotient, consumer, time stamp server composition;
Sellers of the dealer as commodity need to provide the dealership data of product, the restocking including commodity to producer
Time, selling spot;
The producer is respectively completed the record of production of commodity, storage record, outbound record, logistics record and dealer's record
Generate and make the two dimensional code of tracing to the source of product;
The record generation method, generating includes the record of production, storage record, outbound record, logistics record and dealer's note
Record;
The record of production by commodity trace to the source code, creation data ciphertext and producer signature constitute;The creation data ciphertext by
Creation data is obtained by symmetric key encryption;The creation data includes the commodity correlation place of production, workshop, producers, packaging
Personnel and inspector;Producer's signature refers to that producer is signed using the number that private key encrypts creation data ciphertext HASH value
Name;
It is described storage record by commodity trace to the source code, the storage data ciphertext of commodity, producer sign and commodity the record of production in area
Block chain index position composition;
Outbound record is recorded in area by the trace to the source storage of code, the outbound data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Logistics record is recorded in area by the trace to the source outbound of code, the logistics data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Dealer record is recorded by the trace to the source logistics of code, the dealership data ciphertext of commodity, producer's signature and commodity of commodity
It is formed in block chain index position;
Above-mentioned storage data ciphertext, outbound data ciphertext, logistics data ciphertext and dealership data ciphertext be respectively be put in storage data,
Outbound data, logistics data and dealership data are obtained by symmetric key encryption;
Above-mentioned producer signature be respectively producer using private key to storage data ciphertext, outbound data ciphertext, logistics data ciphertext and
The digital signature that the HASH value of dealership data ciphertext is encrypted;
The two dimensional code of tracing to the source includes trace to the source code and the symmetric key of commodity;Trace to the source code and the symmetric key of the commodity have only
One property;
The center of tracing to the source receives the record of production, storage record, outbound record, logistics record and the dealer's note that producer sends
Record, the identity for completing record is appraised and decided and the generation of block chain;It completes as follows:
S101: to every, recording, and is signed using factory public key to producer and ciphertext is compared, and confirms producer's identity;Confirm into
Function carries out step S102;
S102: all record HASH operations are obtained HASH value as leaf node and construct Merkel tree, generated by center of tracing to the source
Merkel tree and generate Merkel tree record composition block body;
S103: upper block HASH value, this block coding and block body Merkel's root vertex HASH value are then spliced into word
Symbol string obtains character string abstract by HASH algorithm, obtains character string digest using signature algorithm by tracing to the source center secret key;
S104: by character string abstract, character string digest sending time stamp stamp server, timestamp is obtained;
S105: by upper block HASH value, this block number and block body Merkel root vertex HASH value, timestamp form area
Build;All blocks being made of block body and block head are further formed into block chain;
S106: entire block chain is announced and inquiry is provided;
The time stamp server receives center of tracing to the source and sends character string abstract and character string digest, by character string abstract label
Name and center public key of tracing to the source obtain comparing character string abstract using signature algorithm, and are compared with character string abstract, such as different,
Then give up, if they are the same, then generates timestamp, and issue the center of tracing to the source;
The consumer obtains trace to the source code and the symmetric code of commodity by barcode scanning two dimensional code of tracing to the source;And complete following steps:
S201: the last one link record position is searched in block chain by tracing to the source code;
S202: upper recording indexes position in record, producer's signature and ciphertext are extracted;
S203: upper one records to obtain the upper record of index position retrospect in usage record;
S204: repeating S202, S203 step, until tracing back to record of production stopping;
S205: using factory public key to every, record ciphertext and producer's signature carry out the verification of content and identity, check successfully,
Carry out step S206;
S206: all ciphertexts are decoded using symmetric key, extract ciphertext data.
More preferably, in the record of production of above-mentioned commodity, storage record, outbound record, logistics record and dealer's record,
Increase class label;Mutually similar record has identical class label, and it is different that inhomogeneity records class label;Center is traced to the source to the note received
Record is classified according to class label;Identical class label record is used to generate same block, so that all identical class label notes
Record is stored in same block, and inhomogeneity label record is stored in different blocks.
More preferably, above-mentioned generation record is classified by commerical batches, and distributes class label.
More preferably, above-mentioned storage record is classified by entry time, and distributes class label.
More preferably, above-mentioned outbound record is classified by the outbound time, and distributes class label.
More preferably, above-mentioned logistics record is classified by logistics batch, and distributes class label;The logistics batch is identical i.e.
Logistics tool, logistics environment, logistics time are all the same.
More preferably, above-mentioned dealer's record is classified by dealer's name, and distributes class label.
Above-mentioned preferred embodiment convenient for laterally retrospect, have first inventory records laterally retrospect with batch or cargo stream etc. other
Commodity.
The invention has the following beneficial effects:
The present invention provides a kind of two dimensional code source tracing method and system based on block chain, the lead-in area in original traceability system
Block chain technology and third party's time stamp server, so that all records of tracing to the source of commodity have unalterable feature, non-repudiation;
Symmetric key encryption is carried out to commodity data, ensure that the privacy of data, the center of tracing to the source can not learn specific data information;?
The index position information for retaining a record on the commodity in record alleviates so that the backdating capability of system, speed are enhanced
It traces to the source center pressure, improves efficiency;By the record of production of all same batch of goods, storage record, outbound record and same object
The logistics of the product of stream is recorded and is individually stored in same block with dealer's record of dealer, provides transverse direction
Trace the ability of commodity.
Detailed description of the invention
Fig. 1: for the present invention is based on the two dimensional code traceability system schematic diagrames of block chain.
Fig. 2: for central record block chain product process figure of tracing to the source.
Fig. 3: it traces to the source flow chart for commodity.
Specific embodiment
The present invention is specifically described below by embodiment, it is necessary to which indicated herein is that following embodiment is only used
In invention is further explained, it should not be understood as limiting the scope of the invention, person skilled in art can
To make some nonessential modifications and adaptations to the present invention according to aforementioned present invention content.
Embodiment 1
A kind of two dimensional code traceability system based on block chain, as shown in Figure 1, by the center of tracing to the source, producer, dealer, consumer, when
Between stamp server composition;Producer and dealer generate the record of production of commodity, storage record, outbound record, logistics record and
Dealer's record;And verification and preservation to record are completed in center of tracing to the source;It traces to the source convenient for consumer merchandise news;
Firstly, producer generates uniquely trace to the source code and symmetric key to each commodity, and will trace to the source code and symmetric key production
For trace to the source two dimensional code and with commodity bind;
Secondly producer and dealer complete the record of production of commodity, storage record, outbound record, logistics record and dealer's note
The generation of record;Wherein the record of production by commodity trace to the source code, creation data ciphertext and producer signature constitute;Storage record is by commodity
Trace to the source code, the storage data ciphertext of commodity, producer signature and commodity the record of production block chain index position form;Outbound note
Record is recorded in block chain index set of locations by trace to the source code, the outbound data ciphertext of commodity, producer's signature and the storages of commodity of commodity
At;Logistics record is recorded in block chain cable by trace to the source code, the logistics data ciphertext of commodity, producer's signature and the outbounds of commodity of commodity
Draw position composition;Dealer record by commodity trace to the source code, the dealership data ciphertext of commodity, producer signature and commodity logistics remember
Record is formed in block chain index position;
Above-mentioned creation data ciphertext, storage data ciphertext, outbound data ciphertext, logistics data ciphertext and dealership data ciphertext point
Not Wei creation data, storage data, outbound data, logistics data and dealership data obtained by symmetric key encryption;
Above-mentioned producer's signature is respectively that producer uses private key to creation data ciphertext, storage data ciphertext, outbound data ciphertext, object
The digital signature that the HASH value of flow data ciphertext and dealership data ciphertext is encrypted;
Producer successively distributes the record of production of same batch of goods to identical class label respectively, and transmit trace to the source in feel
Storage;It distributes the storage record of same entry time commodity to identical class label again, transmits central store of tracing to the source;Then will
The outbound record of same outbound time commodity distributes identical class label, transmits central store of tracing to the source;Then same logistics
The logistics record of the commodity of batch distributes identical class label, transmits central store of tracing to the source;The quotient of last same dealer
The dealer of product, which records, distributes identical class label, transmits central store of tracing to the source;
Center of tracing to the source receives the record of production for the packing that producer sends, storage record, outbound record, logistics record and dealer
Record, the identity for completing to record is appraised and decided, the inspection of class label is classified and the generation of block chain;As shown in Fig. 2, having to packing
Identical class label record is completed as follows:
S101: to every, recording, and is signed using factory public key to producer and ciphertext is compared, and confirms producer's identity;Confirm into
Function carries out step S102;
S102: all record HASH operations are obtained HASH value as leaf node and construct Merkel tree, generated by center of tracing to the source
Merkel tree and generate Merkel tree record composition block body;
S103: upper block HASH value, this block coding and block body Merkel's root vertex HASH value are then spliced into word
Symbol string obtains character string abstract by HASH algorithm, obtains character string digest using signature algorithm by tracing to the source center secret key;
S104: by character string abstract, character string digest sending time stamp stamp server, timestamp is obtained;
S105: by upper block HASH value, this block number and block body Merkel root vertex HASH value, timestamp form area
Build;All blocks being made of block body and block head are further formed into block chain;
S106: entire block chain is announced and inquiry is provided;
Wherein time stamp server receives center of tracing to the source and sends character string abstract and character string digest, by character string abstract label
Name and center public key of tracing to the source obtain comparing character string abstract using signature algorithm, and are compared with character string abstract, such as different,
Then give up, if they are the same, then generates timestamp, and issue the center of tracing to the source;
Finally, obtaining trace to the source code and the symmetric code of commodity by barcode scanning two dimensional code of tracing to the source when consumer buys commodity;And it completes such as
Step shown in Fig. 3:
S201: the last one link record position is searched in block chain by tracing to the source code;
S202: upper recording indexes position in record, producer's signature and ciphertext are extracted;
S203: upper one records to obtain the upper record of index position retrospect in usage record;
S204: repeating S202, S203 step, until tracing back to record of production stopping;
S205: using factory public key to every, record ciphertext and producer's signature carry out the verification of content and identity, check successfully,
Carry out step S206;
S206: all ciphertexts are decoded using symmetric key, extract ciphertext data.
Real-time example 2
As embodiment 1 completes the block chain preservation to merchandise news;
Consumer buy marketing quality go wrong, caused by being detected as logistics links misoperation by relevant departments, producer or
Person relevant departments by the problem commodity trace to the source two dimensional code trace back to logistics record;
Block where being recorded by logistics can be traced back to laterally and be recorded with the logistics of other commodity of the same logistics of the commodity,
It and is other records in same block;
It is traced to the source code by extracting commodity in record, quickly navigates to the code of tracing to the source of all possible problem commodity of same logistics;From
And possible problem commodity are quickly positioned, it is detected and is recalled.
Claims (8)
1. a kind of two dimensional code source tracing method based on block chain: generally comprising: record generation method, block chain generation method, note
Record retrogressive method;
During commodity production, first, in accordance with generation method is recorded, generation is recorded including the record of production, storage, outbound records,
Logistics record and dealer's record;Then according to block chain generation method, complete preservation to record, the generation of block chain with
And provide inquiry;Finally, according to record retrogressive method, by the inquiry and decryption to block chain, obtain the corresponding record of production,
It is put in storage record, outbound record, logistics record and dealer's record;
The record of production by commodity trace to the source code, creation data ciphertext and producer signature constitute;
It is described storage record by commodity trace to the source code, the storage data ciphertext of commodity, producer sign and commodity the record of production in area
Block chain index position composition;
Outbound record is recorded in area by the trace to the source storage of code, the outbound data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Logistics record is recorded in area by the trace to the source outbound of code, the logistics data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Dealer record is recorded by the trace to the source logistics of code, the dealership data ciphertext of commodity, producer's signature and commodity of commodity
It is formed in block chain index position;
Above-mentioned creation data ciphertext, storage data ciphertext, outbound data ciphertext, logistics data ciphertext and dealership data ciphertext point
Not Wei creation data, storage data, outbound data, logistics data and dealership data obtained by symmetric key encryption;
Above-mentioned producer's signature is respectively that producer uses private key to creation data ciphertext, storage data ciphertext, outbound data ciphertext, object
The digital signature that the HASH value of flow data ciphertext and dealership data ciphertext is encrypted;
The block chain generation method, including timestamp endorsement method, block head generation method, block body generation method;
The block body generation method is the center of tracing to the source with every, and the HASH value recorded constructs Merkel tree as leaf node,
Merkel tree and all records for constructing Merkel tree form block body;
The block head generation method by the HASH value of a upper block, block number, block body Merkel root vertex HASH value,
Timestamp collectively constitutes block head;If the upper block nothing, HASH value are all zero;The block head and block body composition
Block;
The timestamp is timestamp endorsement method generation, i.e., upper block HASH value, block number, block body Merkel
The character string that root vertex HASH value is spliced into obtains HASH value by HASH algorithm, using center secret key of tracing to the source to character string
HASH value is signed, and send third party's time stamp server cover timestamp, the timestamp include trace to the source center signature,
Time stamp server receiving time and time stamp server digital signature;
The record retrogressive method, including block localization method and block source tracing method;
The block localization method searches for the last one link record position by tracing to the source code in block chain, extracts note
Upper recording indexes position, producer's signature and ciphertext in record;Using producer's signature, ciphertext and factory public key to content and identity into
Row verification, and acquisition data information is decrypted to ciphertext using symmetric key;
The block source tracing method is to trace back to a upper record by upper recording indexes position, and obtain a upper note in record
Index position, producer's signature and ciphertext are recorded to obtain, is checked and is decrypted, the upper note of retrospect is continued by upper recording indexes position
Record, until tracing back to the record of production.
2. a kind of two dimensional code traceability system based on block chain, by the center of tracing to the source, producer, dealer, consumer, time-stamping service
Device composition;
Sellers of the dealer as commodity need to provide the dealership data of product, the restocking including commodity to producer
Time, selling spot;
The producer is respectively completed the record of production of commodity, storage record, outbound record, logistics record and dealer's record
Generate and make the two dimensional code of tracing to the source of product;
The record generation method, generating includes the record of production, storage record, outbound record, logistics record and dealer's note
Record;
The record of production by commodity trace to the source code, creation data ciphertext and producer signature constitute;
It is described storage record by commodity trace to the source code, the storage data ciphertext of commodity, producer sign and commodity the record of production in area
Block chain index position composition;
Outbound record is recorded in area by the trace to the source storage of code, the outbound data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Logistics record is recorded in area by the trace to the source outbound of code, the logistics data ciphertext of commodity, producer's signature and commodity of commodity
Block chain index position composition;
Dealer record is recorded by the trace to the source logistics of code, the dealership data ciphertext of commodity, producer's signature and commodity of commodity
It is formed in block chain index position;
Above-mentioned creation data ciphertext, storage data ciphertext, outbound data ciphertext, logistics data ciphertext and dealership data ciphertext point
Not Wei creation data, storage data, outbound data, logistics data and dealership data obtained by symmetric key encryption;
Above-mentioned producer's signature is respectively that producer uses private key to creation data ciphertext, storage data ciphertext, outbound data ciphertext, object
The digital signature that the HASH value of flow data ciphertext and dealership data ciphertext is encrypted;
The two dimensional code of tracing to the source includes trace to the source code and the symmetric key of commodity;Trace to the source code and the symmetric key of the commodity have only
One property;
The center of tracing to the source receives the record of production, storage record, outbound record, logistics record and the dealer's note that producer sends
Record, the identity for completing record is appraised and decided and the generation of block chain;It completes as follows:
S101: to every, recording, and is signed using factory public key to producer and ciphertext is compared, and confirms producer's identity;Confirm into
Function carries out step S102;
S102: all record HASH operations are obtained HASH value as leaf node and construct Merkel tree, generated by center of tracing to the source
Merkel tree and generate Merkel tree record composition block body;
S103: upper block HASH value, this block coding and block body Merkel's root vertex HASH value are then spliced into word
Symbol string obtains character string abstract by HASH algorithm, obtains character string digest using signature algorithm by tracing to the source center secret key;
S104: by character string abstract, character string digest sending time stamp stamp server, timestamp is obtained;
S105: by upper block HASH value, this block number and block body Merkel root vertex HASH value, timestamp form area
Build;All blocks being made of block body and block head are further formed into block chain;
S106: entire block chain is announced and inquiry is provided;
The time stamp server receives center of tracing to the source and sends character string abstract and character string digest, by character string abstract label
Name and center public key of tracing to the source obtain comparing character string abstract using signature algorithm, and are compared with character string abstract, such as different,
Then give up, if they are the same, then generates timestamp, and issue the center of tracing to the source;
The consumer obtains trace to the source code and the symmetric code of commodity by barcode scanning two dimensional code of tracing to the source;And complete following steps:
S201: the last one link record position is searched in block chain by tracing to the source code;
S202: upper recording indexes position in record, producer's signature and ciphertext are extracted;
S203: upper one records to obtain the upper record of index position retrospect in usage record;
S204: repeating S202, S203 step, until tracing back to record of production stopping;
S205: using factory public key to every, record ciphertext and producer's signature carry out the verification of content and identity, check successfully,
Carry out step S206;
S206: all ciphertexts are decoded using symmetric key, extract ciphertext data.
3. a kind of two dimensional code traceability system based on block chain as claimed in claim 2, it is characterised in that: the production of the commodity
In record, storage record, outbound record, logistics record and dealer's record, increase class label;Mutually similar record has identical
Class label, the class label of inhomogeneity record is different;
The class label classifies to record for center of tracing to the source, and identical class label record is for generating same block;It is different
Class label record storage is in different blocks.
4. a kind of two dimensional code traceability system based on block chain as claimed in claim 3, it is characterised in that: the generation record is pressed
Commerical batches are classified, and distribute class label.
5. a kind of two dimensional code traceability system based on block chain as claimed in claim 4, it is characterised in that: the storage record is pressed
Entry time is classified, and distributes class label.
6. a kind of two dimensional code traceability system based on block chain as claimed in claim 5, it is characterised in that: the outbound record is pressed
The outbound time classifies, and distributes class label.
7. a kind of two dimensional code traceability system based on block chain as claimed in claim 6, it is characterised in that: the logistics record is pressed
Logistics batch is classified, and distributes class label;The logistics batch identical i.e. logistics tool, logistics environment, logistics time is equal
It is identical.
8. a kind of two dimensional code traceability system based on block chain as claimed in claim 7, it is characterised in that: dealer's record
Classify by dealer's name, and distributes class label.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811469190.6A CN109583917A (en) | 2018-11-27 | 2018-11-27 | A kind of two dimensional code source tracing method and system based on block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811469190.6A CN109583917A (en) | 2018-11-27 | 2018-11-27 | A kind of two dimensional code source tracing method and system based on block chain |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109583917A true CN109583917A (en) | 2019-04-05 |
Family
ID=65927123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811469190.6A Withdrawn CN109583917A (en) | 2018-11-27 | 2018-11-27 | A kind of two dimensional code source tracing method and system based on block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109583917A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119763A (en) * | 2019-04-16 | 2019-08-13 | 福建天晴数码有限公司 | Logistic regression data optimization methods, storage medium based on Merkel's tree thought |
CN110147942A (en) * | 2019-04-29 | 2019-08-20 | 阿里巴巴集团控股有限公司 | A kind of business collocation method based on block chain, device and electronic equipment |
CN110162527A (en) * | 2019-04-29 | 2019-08-23 | 阿里巴巴集团控股有限公司 | A kind of business source tracing method, device and electronic equipment based on block chain |
CN110335049A (en) * | 2019-06-14 | 2019-10-15 | 左燕 | A kind of block chain arithmetic facility based on computer |
CN110738286A (en) * | 2019-10-23 | 2020-01-31 | 杜明利 | Supply chain storage sorting method and system based on virtual data chain |
CN111400779A (en) * | 2020-01-07 | 2020-07-10 | 李蕴光 | High-dimensional data encryption method and system |
CN111445273A (en) * | 2020-04-10 | 2020-07-24 | 重庆新致金服信息技术有限公司 | Anti-counterfeiting traceability information processing method and system based on block chain |
CN111461737A (en) * | 2020-03-06 | 2020-07-28 | 厦门区块链云科技有限公司 | Product source tracing anti-counterfeiting and anti-channel conflict method based on block chain |
CN111475830A (en) * | 2020-05-20 | 2020-07-31 | 北京邮电大学 | Block chain system suitable for commodity traceability scene and working method thereof |
CN111612484A (en) * | 2020-04-09 | 2020-09-01 | 李梦宇 | Block chain logistics traceability system |
US11055792B2 (en) | 2019-04-29 | 2021-07-06 | Advanced New Technologies Co., Ltd. | Blockchain-based service source tracing method, apparatus, and electronic device |
CN113361036A (en) * | 2021-06-09 | 2021-09-07 | 奇瑞汽车股份有限公司 | Analog simulation method and device for automobile shock absorber and computer storage medium |
CN114638625A (en) * | 2022-05-13 | 2022-06-17 | 广东邦盛北斗科技股份公司 | Big data-based agricultural full-industry chain traceability method and system and cloud platform |
-
2018
- 2018-11-27 CN CN201811469190.6A patent/CN109583917A/en not_active Withdrawn
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110119763A (en) * | 2019-04-16 | 2019-08-13 | 福建天晴数码有限公司 | Logistic regression data optimization methods, storage medium based on Merkel's tree thought |
CN110147942A (en) * | 2019-04-29 | 2019-08-20 | 阿里巴巴集团控股有限公司 | A kind of business collocation method based on block chain, device and electronic equipment |
CN110162527A (en) * | 2019-04-29 | 2019-08-23 | 阿里巴巴集团控股有限公司 | A kind of business source tracing method, device and electronic equipment based on block chain |
CN110162527B (en) * | 2019-04-29 | 2020-08-25 | 阿里巴巴集团控股有限公司 | Service tracing method and device based on block chain and electronic equipment |
US11055792B2 (en) | 2019-04-29 | 2021-07-06 | Advanced New Technologies Co., Ltd. | Blockchain-based service source tracing method, apparatus, and electronic device |
CN110335049A (en) * | 2019-06-14 | 2019-10-15 | 左燕 | A kind of block chain arithmetic facility based on computer |
CN110738286B (en) * | 2019-10-23 | 2023-04-14 | 杜明利 | Supply chain storage sorting method and system based on virtual data chain |
CN110738286A (en) * | 2019-10-23 | 2020-01-31 | 杜明利 | Supply chain storage sorting method and system based on virtual data chain |
CN111400779A (en) * | 2020-01-07 | 2020-07-10 | 李蕴光 | High-dimensional data encryption method and system |
CN111461737A (en) * | 2020-03-06 | 2020-07-28 | 厦门区块链云科技有限公司 | Product source tracing anti-counterfeiting and anti-channel conflict method based on block chain |
CN111612484A (en) * | 2020-04-09 | 2020-09-01 | 李梦宇 | Block chain logistics traceability system |
CN111445273A (en) * | 2020-04-10 | 2020-07-24 | 重庆新致金服信息技术有限公司 | Anti-counterfeiting traceability information processing method and system based on block chain |
CN111475830A (en) * | 2020-05-20 | 2020-07-31 | 北京邮电大学 | Block chain system suitable for commodity traceability scene and working method thereof |
CN113361036A (en) * | 2021-06-09 | 2021-09-07 | 奇瑞汽车股份有限公司 | Analog simulation method and device for automobile shock absorber and computer storage medium |
CN114638625A (en) * | 2022-05-13 | 2022-06-17 | 广东邦盛北斗科技股份公司 | Big data-based agricultural full-industry chain traceability method and system and cloud platform |
CN114638625B (en) * | 2022-05-13 | 2022-08-16 | 广东邦盛北斗科技股份公司 | Big data-based agricultural whole industry chain traceability method and system and cloud platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109583917A (en) | A kind of two dimensional code source tracing method and system based on block chain | |
CN105550891A (en) | Product anti-fake source tracing method and system | |
CN201716765U (en) | Wine counterfeiting tracing system based on two-dimensional bar codes | |
US9076024B2 (en) | Anti-counterfeiting system and method | |
CN107704493A (en) | It is a kind of to be used to provide the method and system that product is traced to the source | |
CN110288354A (en) | It is a kind of that realization method and system server, program storage device are traced based on the commodity counterfeit prevention anti-channeling hundred million of block chain and RFID | |
US11418336B2 (en) | Digital ledger for unique item IDs with ownership | |
CN105427117A (en) | Universal traceable anti-fake system of agricultural products based on electronic data preservation technology and method of same | |
CN103646331B (en) | Wine anti-counterfeit source tracing method based on enciphered bar code mark | |
CN104299140A (en) | Two-dimensional code anti-counterfeiting traceability system and method based on e-commerce | |
CN103886469A (en) | Product two-dimension code generation and query system | |
CN102184506A (en) | Digital anti-counterfeiting method based on chaos password encryption | |
CN101685503B (en) | Method and system for inquiring product information | |
CN105373933A (en) | Food circulation traceability method based on electronic inspection report | |
CN111639729B (en) | RFID and blockchain-based anti-counterfeiting tracing method | |
CN104835045A (en) | Method and system for merchandise anti-counterfeiting authentication based on internet of things identity service | |
CN104239944A (en) | Commodity information identification method | |
CN101553827A (en) | Marking processing system for article management code, code judging system, article management system, method for marking article management code, code judging method and information displaying object | |
CN102496114A (en) | Method and system for product counterfeiting prevention and method and device for identity information generation | |
WO2016018244A1 (en) | Transmit an authentication mark | |
CN114140132B (en) | Anti-counterfeiting tracing system | |
CN106022797A (en) | Smart device APP image recognition method | |
CN106022187A (en) | High-efficient O2O implementation method | |
CN105427112A (en) | Encryption two-dimension code technology-based label anti-fake system and method thereof | |
CN111401927A (en) | Food label unique code issuing and circulation tracing method based on block chain major-minor chain technology |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190405 |
|
WW01 | Invention patent application withdrawn after publication |