CN109146518A - A kind of product traceability method - Google Patents
A kind of product traceability method Download PDFInfo
- Publication number
- CN109146518A CN109146518A CN201810875899.XA CN201810875899A CN109146518A CN 109146518 A CN109146518 A CN 109146518A CN 201810875899 A CN201810875899 A CN 201810875899A CN 109146518 A CN109146518 A CN 109146518A
- Authority
- CN
- China
- Prior art keywords
- information
- transaction information
- intelligence
- transaction
- product
- 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.)
- Granted
Links
Classifications
-
- 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
-
- 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/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0609—Buyer or seller confidence or verification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Entrepreneurship & Innovation (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a kind of product traceability methods.For the method first from node member to register node enrollment status information, other nodes execute the authenticity of intelligence and about one verifying registration information;Registration information is stored in block chain if true and waits common recognition, is deleted from nodal cache queue if untrue;Both parties formulate intelligent contract, the seller is according to requiring to fill in Transaction Information and be broadcast in network, other nodes execute intelligent contract and verify whether its Transaction Information meets the requirements, and are stored in block chain if meeting the requirements and wait common recognition, deleted from nodal cache queue if being unsatisfactory for;By the transaction of each agent, Transaction Information is printed as two dimensional code and traced to the source for consumer scans by last retailer.Mode provided by the invention of tracing to the source is with a high credibility, true or false can be looked into, and can be traced to the source step by step according to Transaction Information, it might even be possible to be traceable to the raw material of product, very good solution traditional product is traced to the source the defect of mode.
Description
Technical field
The present invention relates to block chains and intelligent contract technical field, more particularly to a kind of product traceability method.
Background technique
Internet era, some criminals put one's ass on the line means fake product to chase interests, and modification information is pretended to claim
It lies about and mutually denies, cause many consumers that can not understand the true features of product, occur between consumer and businessman and businessman
Interest conflicts.Therefore product traceability becomes the hot spot of this Internet age, even more focus.Traditional product traceability solution has
Product information is uploaded onto the server by businessman and then generates two dimensional code by the product traceability based on two dimensional code, method, and by disappearing
Expense person scans the two-dimensional code acquisition product information.For traditional solution there are also the product traceability method based on RFID, method is same
Sample is saved product information to RFID and server by businessman, and RFID is attached on product.Consumer scans its RFID or two
Dimension code and server info comparison can be appreciated that product information.There are also some other similar methods, identical point all passes through
Product information is stored in single node (information centralised storage) by mobile Internet, consumer by scan businessman provide two
It ties up code and obtains corresponding product information.
Generally speaking, there are the following problems for traditional product traceability mode:
(1) it traces to the source insincere.Product information storage causes the product information checked out insincere on a single node.Quotient
Family is for interests, product information that can arbitrarily in change system.The information that consumer obtains cannot be guaranteed the authenticity of information.
(2) level-one is traced to the source.Level-one, which is traced to the source, refers to that this product that can only trace to the source cannot trace to the source the raw material and related procedure of product
Information.There are many traceability systems at present, but each traceability system is isolated, and is controlled by oneself or the relevant company of interests
System.Therefore current traceability system has significant limitation.
(3) there is denial.When product accident (such as food safety) occurs, it is difficult to confirm between consumer and businessman,
Buyer-seller relationship between businessman and businessman.
(4) true or false.Since product information is deployed on single node system by businessman, root cannot be in real meaning
Upper emulation is pseudo-.
Summary of the invention
The object of the present invention is to provide a kind of product traceability methods, in conjunction with the characteristics of block chain and intelligent contract to solve to pass
Product traceability mode of uniting is with a low credibility, limitation is big, there are the technological deficiencies that denial, true or false can not be looked into.
To achieve the above object, the present invention provides following schemes:
A kind of product traceability method, which comprises
Consumer, agent and production link businessman generate public private key pair respectively, and are utilized respectively public key and registration information
Address registration and certification are carried out to register node;The agent includes retail trader and retailer;The production link businessman packet
Include manufacturer and manufacturer;The registration information includes public key address, address, title, user type, organizes code, can verify that letter
Tree is demonstrate,proved and sold to breath, type of message, operation permission, public key script, legal person, status of a legal person;
The register node broadcasts the registration information, other nodes receive the registration information and believed according to the registration
Breath determines whether to wait common recognition;
When product is sold to buyer by the manufacturer, the manufacturer constructs Transaction Information using buyer's public key and registration information
One, and the Transaction Information one is broadcast to other nodes;The Transaction Information one include buyer's public key, first input information,
Raw material information, the first output information, the first other information and first company's script;
Other nodes receive the Transaction Information and determine whether that waiting is known together next time together;
When product is sold to buyer by the agent, the agent utilizes buyer's public key and registration information building transaction letter
Breath two, and the Transaction Information two is broadcast to other nodes;The Transaction Information two includes buyer's public key, the second input letter
Breath, the second output information, the second other information and second company's script;
Other nodes receive the Transaction Information two and determine whether to wait and know together next time;
When product is sold to buyer by the manufacturer, the manufacturer utilizes buyer's public key and registration information building transaction letter
Breath three, and the Transaction Information three is broadcast to other nodes;The Transaction Information three include third output information, third other
Information and third company script;
Other nodes receive the Transaction Information three and determine whether to wait and know together next time;
The retailer is by the public key of the product and private key script and company's public key address and private key signature script system
Two dimensional code is made to be attached on the product;
Buyer carries out product traceability according to the two dimensional code;The buyer is consumer, manufacturer or agent.
Optionally, other described nodes receive the registration information and determine whether to wait altogether according to the registration information
Know, specifically include:
Other nodes receive the registration information and the registration information are stored in buffer area;
Other nodes obtain intelligence and about one;
Judge whether the registration information meets all conditions in the intelligence and about one, obtains the first judging result;
If first judging result is that the registration information meets all conditions in the intelligence and about one, other sections
The registration information is bundled to wait in block chain and know together by point;
If first judging result is that the registration information is unsatisfactory for all conditions in the intelligence and about one, other
Node deletes the registration information from buffer area.
Optionally, described to judge whether the registration information meets all conditions in the intelligence and about one, obtain the
One judging result, specifically includes:
Whether other described nodes inquire the personal information in the registration information to national Ministry of Industry and Information's door or relevant departments
In the presence of;The personal information includes the address, legal person and tissue code;
Whether inquiry agent's information belongs to lawful operation;
Inquire whether manufacturer's information is true and whether operation is legal;
Inquiry initiates whether the information that registrant provides is me;
If all query results are to be, first judging result is that the registration information meets the intelligence conjunction
All conditions in about one;
If have in query result any one be it is no, first judging result is unsatisfactory for institute for the registration information
State all conditions in intelligence and about one.
Optionally, other nodes reception Transaction Information determines whether to wait together knows together next time, specific to wrap
It includes:
Other nodes receive the Transaction Information and are stored in buffer area together;
Other nodes obtain intelligence and about two;
Judge whether the Transaction Information one meets condition all in the intelligence and about two, obtains the second judgement knot
Fruit;
If second judging result is that the Transaction Information one meets condition all in the intelligence and about two, described
The Transaction Information one is bundled to wait in block chain and know together by other nodes;
If second judging result is that the Transaction Information one is unsatisfactory for condition all in the intelligence and about two,
He deletes the Transaction Information one node from buffer area.
Optionally, other described nodes receive the Transaction Information two and determine whether to wait and know together next time, specific to wrap
It includes:
Other nodes receive the Transaction Information two and are stored in buffer area;
Other nodes obtain intelligence and about three;
Judge whether the Transaction Information two meets condition all in the intelligence and about three, obtains third judgement knot
Fruit;
If the third judging result is that the Transaction Information two meets condition all in the intelligence and about three, described
The Transaction Information two is bundled to wait in block chain and know together by other nodes;
If the third judging result is that the Transaction Information two is unsatisfactory for condition all in the intelligence and about three,
He deletes the Transaction Information two node from buffer area.
Optionally, other described nodes receive the Transaction Information three and determine whether to wait and know together next time, specific to wrap
It includes:
Other nodes receive the Transaction Information three and are stored in buffer area;
Other nodes obtain intelligence and about four;
Judge whether the Transaction Information three meets condition all in the intelligence and about four, obtains the 4th judgement knot
Fruit;
If the 4th judging result is that the Transaction Information three meets condition all in the intelligence and about four, described
The Transaction Information three is bundled to wait in block chain and know together by other nodes;
If the 4th judging result is that the Transaction Information three is unsatisfactory for condition all in the intelligence and about four,
He deletes the Transaction Information three node from buffer area.
Optionally, while Transaction Information is bundled to waiting common recognition in block chain by other described nodes, further includes:
Product number in the Transaction Information is added to having sold in tree of the seller;The Transaction Information is Transaction Information
One, Transaction Information two or Transaction Information three;The seller is manufacturer, agent or manufacturer.
The specific embodiment provided according to the present invention, the invention discloses following technical effects:
The present invention provides a kind of product traceability method, and the method is believed from node member to register node enrollment status first
Breath, other nodes execute the authenticity of intelligence and about one verifying registration information;Registration information is stored in block if true
Common recognition is waited in chain, is deleted from nodal cache queue if untrue;Both parties formulate intelligence and about two, three, four, sell
For root according to requiring to fill in Transaction Information one, two, three and be broadcast in network, other nodes execute intelligence and about two, three, four verifyings
Whether its Transaction Information meets the requirements, and is stored in block chain if meeting the requirements and waits common recognition, from section if being unsatisfactory for
It is deleted in point cache queue;By the transaction of each agent, last retailer is by the product public key of Transaction Information and signs, public
Department registered address and signature are printed as two dimensional code and trace to the source for consumer scans.Mode provided by the invention of tracing to the source is with a high credibility, true
Puppet can be looked into, and can be traced to the source step by step according to Transaction Information, it might even be possible to be traceable to the raw material of product, therefore be not in that businessman supports
Rely situation, very good solution traditional product is traced to the source the defect of mode.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the method flow diagram of product traceability method provided by the invention;
Fig. 2 is the embodiment schematic diagram of product traceability method provided by the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The object of the present invention is to provide a kind of product traceability methods, in conjunction with the characteristics of block chain and intelligent contract to solve to pass
Product traceability mode of uniting is with a low credibility, limitation is big, there are the technological deficiencies that denial, true or false can not be looked into.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real
Applying mode, the present invention is described in further detail.
Block chain is a kind of Distributed sharing account book of decentralization, has credible, non-repudiation technical characterstic of trading.
In the environment of no trust, the arbitrary node in whole network sets up common recognition mechanism, is tampered without concern of data, can
It realizes point-to-point transaction, coordination and cooperates.Intelligent contract is building on the basis of block chain, one section of code executed automatically.
It is automated and programmable characteristic makes block chain possess more abundant, more flexible function.Method provided by the invention will
The characteristics of block chain and intelligent contract, combines, and can well solve the defect that traditional product is traced to the source.
Fig. 1 is the method flow diagram of product traceability method provided by the invention.Referring to Fig. 1, product provided by the invention traces back
Source method specifically includes:
Step 101: consumer, agent and production link businessman generate public private key pair respectively, and be utilized respectively public key and
Registration information carries out address registration and certification to register node.
The businessman of consumer, intermediate links and production link generate public private key pair respectively, and are utilized respectively respective public key
Address registration and certification are carried out to system registry node with registration information.The businessman of intermediate links is agent, the centre
Quotient includes retail trader and retailer;Businessman between manufacturer to manufacturer is referred to as agent, between manufacturer to consumer
Businessman be also referred to as agent.Manufacturer, manufacturer are the businessmans of production link.
The registration information includes public key address, address, title, user type, organizes code, can verify that information, message
Tree is demonstrate,proved and sold to type, operation permission, public key script, legal person, status of a legal person.Table 1 is the number for the registration information that the present invention uses
According to structure:
1 registration information data structure of table
In table 1:
Public key address: be generated by private key for user and address combination unique identification block chain in a registration information.
User type: show that the registration information owning user type, user type are consumer, agent, manufacturer or life
Business men.For example, user type=1 of consumer, user type=2 of manufacturer, user type=3 of manufacturer, in agent
User type=4 of retail trader, user type=5 of retailer, user can also divide thinner.The data that type indicates are different
It can be not limited to when sample using 1,2,3,4,5.
Type of message: show the type of the registration information, be divided into registration message and transaction message.For example, registration message
Type of message=1, type of message=2 of transaction message.
Title: indicating the title of company, is also possible to the anonymity of consumer.Consumer individual can be disappeared with registration information anonymity
Take.
Address: company's address, consumer can not fill in.
Legal person: corporate juridical person's name, if it is consumer, then it represents that consumer name.
Status of a legal person card: corporate juridical person's identity card, if it is consumer, then it represents that customer identification's card.
Organize code: company organization's code.
Operation permission: the certificates such as company management license.
Can verify that information: admire according to either other can prove to initiate the letter that registrant and registration information belong to a people
Breath.
Public key script: for verifying the right whether dealer possesses the registration information.It in this way can be to avoid attacker
Falsely use other people information pass offs.
Sold tree: each company possesses one and has sold tree, is used to anti-counterfeit products.
Wherein, unique identification of the public key as Transaction Information in block chain, public key script is as verifying when inquiring of tracing to the source
The whether true directional information of the owner of product.Personal information in registration information can be disclosed to everyone, conveniently disappear
The businessman of expense person or intermediate links and production link is as the reference stocked up.Wherein personal information includes address, corporate juridical person, group
Knit code etc..
When applied address, each producer (manufacturer) applies for an address, and the calculation method of address is as follows:
Address=Hash256 (address+legal person+status of a legal person is demonstrate,proved+organizes code+business license).
Dealer's address calculation mode is as producer.As long as consumer's identity card+name, it may be assumed that
Address=Hash256 (address+legal person+status of a legal person card).
Producer generates private key in user terminal at random, generates public key by elliptic curve.The ginseng inside Hash256 function above
It is several do not limit to it is above-mentioned mentioned, may include the data that all users can trace to the source.
Step 102: the register node broadcasts the registration information, other nodes receive the registration information and according to institute
Registration information is stated to determine whether to wait common recognition.
Registration information is first placed on buffer area after receiving registration information by register node broadcast registration information, other nodes,
Then intelligence and about one are executed, if the registration information meets all conditions in intelligence and about one, registration information is beaten
Packet waits common recognition within a block.If registration information is not able to satisfy condition all in intelligent contract, by registration information from caching
Middle deletion.
Wherein, all conditions that other nodes judge whether the registration information meets in the intelligence and about one refer to:
Node whether there is to national Ministry of Industry and Information's door or relevant departments' querying individual information;Whether inquiry agent's information belongs to legal warp
Battalion;Whether true inquire manufacturer's information, whether manage legal;It checks and initiates whether the information that registrant provides is me.If
It checks that all conditions are all correct, indicates that registration information meets all conditions in intelligence and about one, then pass back through, node will be infused
Volume information package waits common recognition within a block.If checking that one of condition is incorrect, indicate that registration information is not able to satisfy
All conditions in intelligence and about one, then return and do not pass through, registration information is removed from the cache by node.
It is checked in intelligence and about one and initiates whether the information that registrant provides is me, it is possible to prevente effectively from attacker's malice
Other people information are registered, trace to the source information reliability and safety are improved.
Step 103: when product is sold to buyer by the manufacturer, the manufacturer is handed over using buyer's public key and registration information building
Easy information one, and the Transaction Information one is broadcast to other nodes.
If product is sold to agent or consumer by manufacturer, manufacturer utilizes agent or public key, the company of consumer
Address and signature script construct Transaction Information one, and Transaction Information one is broadcast to other nodes.
The Transaction Information one include buyer's public key, first input information, raw material information, the first output information, first its
His information and first company's script.The first input information includes last transaction public key address, last transaction output rope
Draw and private key signature.The raw material information includes material name and raw material index.First output information include output script,
Product number, name of product and product other information.First other information includes user type, type of message and traces to the source
Series.First company script includes company's public key address, private key signature script, next public key address and next public key
Script.
Specifically, the data structure of the Transaction Information one is as shown in table 2:
2 Transaction Information of table, one data structure
In table 2:
Public key: the public key that buyer generates is indicated.
Input:Input_num: i.e. raw material quantity.
Input:preHash: last transaction public key address is indicated.
Input:index: last transaction output index (array index) is indicated.
Input:script: private key signature, the ownership for user's checking Transaction Information are indicated.
Raw material: material name: material name used in the product is indicated.
Raw material: Index: raw material index is indicated.Each raw material corresponds to a raw material: Index, wherein Index is Input
The subscript of array indexes.
Output: product number: indicate that the seller is sold to the product number of buyer.
Output: name of product: indicate that the seller is sold to the name of product of buyer.
Output:Output_pubScript: output script is indicated, perform script can will produce in conjunction with private key signature script
Product permission is sold to buyer.
Output: product other information: indicate that the seller is sold to the product other information of buyer.
User type: show the owning user type of the Transaction Information.
Type of message: show the type of message of the Transaction Information.
It traces to the source series: reserved field.
Company's public key address: public key (Hash)+address (address) when being registered for the seller, for retrieving register of company
Information.
Private key signature script: being effective, true for verifying registration information pointed by CompanyAddress.When supporting
When relying dispute, it can prove that product is sold to buyer by the seller.
Next public key address: public key (Hash)+address (address) when being registered for buyer.
Next public key script: for verifying buyer's ownership.
Since product quantity is huge, each client possesses a warehouse packet (being equivalent to wallet of bit coin), warehouse
Packet the inside stores N number of key pair (public key+private key).
Step 104: other nodes receive the Transaction Information and determine whether that waiting is known together next time together.
Other nodes receive Transaction Information for the moment, and first Transaction Information one is placed in the buffer queue of oneself, is then executed
Intelligence and about two.If Transaction Information one meets condition all in intelligence and about two, Transaction Information one is bundled to block
Common recognition is waited in chain, also adds corresponding product number and product information while Transaction Information one is added in block chain
To having sold in tree for the seller.If Transaction Information one is not able to satisfy condition all in intelligence and about two, wait next time altogether
Know.If being not met by all conditions in intelligence and about two after attempting n times common recognition, node postpones the Transaction Information
It deposits in queue and deletes.
The intelligence and about two process it is as follows:
The set that tree is a product number is wherein sold, one commodity (i.e. product) of every sale will be made with product number
A node is added toward tree has been sold for keyword.Its effect is preventing counterfeiting, prevents a commodity from selling (" honeysuckle ") twice.
Step 105: when product is sold to buyer by the agent, the agent utilizes buyer's public key and registration information structure
Transaction Information two is built, and the Transaction Information two is broadcast to other nodes.
When commodity are sold to consumer or manufacturer by agent, the public key of agent user consumer or manufacturer, public affairs
It takes charge of address and signature script (public key script) constructs Transaction Information two, and Transaction Information two is broadcast to other nodes.
The Transaction Information two includes buyer's public key, the second input information, the second output information, the second other information and the
Two company's scripts.Wherein the second input information includes last public key address of trading, last transaction output index and private
Key signature.Second output information includes output script, product number, name of product and product other information.Described
Two other informations include user type, type of message and series of tracing to the source.Second company script includes company's public key address, private
Key signature script, next public key address and next public key script.
Specifically, the data structure of the Transaction Information two is as shown in table 3:
3 Transaction Information of table, two data structure
The meaning phase of the meaning of data structure and identical data structure in 2 Transaction Information one of table in 3 Transaction Information two of table
Together, details are not described herein.
Step 106: other nodes receive the Transaction Information two and determine whether to wait and know together next time.
When other nodes receive Transaction Information two, first Transaction Information two is placed in the buffer queue of oneself, is then executed
Intelligence and about three.If Transaction Information two meets condition all in intelligence and about three, Transaction Information two is bundled to block
Common recognition is waited in chain.If Transaction Information two is not able to satisfy condition all in intelligence and about three, waits and knowing together next time.Such as
Fruit attempts all conditions being not met by after n times common recognition in intelligence and about three, then node is by the Transaction Information two from caching
It is deleted in queue.
The intelligence and about three process it is as follows:
Step 107: when product is sold to buyer by the manufacturer, the manufacturer utilizes buyer's public key and registration information structure
Transaction Information three is built, and the Transaction Information three is broadcast to other nodes.
When commodity are sold to other people by manufacturer, manufacturer utilizes the public key of other businessmans, CompanyAddress and signature foot
This (public key script) constructs Transaction Information three, and Transaction Information three is broadcast to other nodes.
The Transaction Information three includes third output information, third other information and third company script.Wherein described
Three output informations include output script, product number, name of product and product other information.The third other information includes
User type, type of message and series of tracing to the source.Third company script include company's public key address, private key signature script, under
One public key address and next public key script.
Specifically, the data structure of the Transaction Information three is as shown in table 4:
4 Transaction Information of table, three data structure
The meaning phase of the meaning of data structure and identical data structure in 2 Transaction Information one of table in 4 Transaction Information three of table
Together, details are not described herein.
Step 108: other nodes receive the Transaction Information three and determine whether to wait and know together next time.
When other nodes receive Transaction Information three, first Transaction Information three is placed in the buffer queue of oneself, is then executed
Intelligence and about four.If Transaction Information three meets condition all in intelligence and about four, Transaction Information three is bundled to block
Common recognition is waited in chain.If Transaction Information three is not able to satisfy condition all in intelligence and about four, waits and knowing together next time.Such as
Fruit attempts all conditions being not met by after n times common recognition in intelligence and about four, then node is by the Transaction Information three from caching
It is deleted in queue.
The intelligence and about four process it is as follows:
There are three types of Transaction Informations altogether by the present invention, are Transaction Information one, Transaction Information two, Transaction Information three respectively.Transaction
Information first is that a kind of Transaction Information that manufacturer broadcasts when commodity are sold to other people, Transaction Information second is that agent by commodity
A kind of Transaction Information broadcasted when being sold to other people, Transaction Information is third is that manufacturer is wide when commodity are sold to other people
A kind of Transaction Information broadcast.While Transaction Information is bundled to waiting common recognition in block chain by node, further includes:
Product number in the Transaction Information is added to having sold in tree of the seller.The Transaction Information is Transaction Information
One, Transaction Information two or Transaction Information three;The seller is manufacturer, agent or manufacturer.
Step 109: the retailer is by the public key of the product and private key script and company's public key address and private key label
Name script is fabricated to two dimensional code and is attached on the product.
The corresponding public key of product and private key script, company's public key address and private key script are fabricated to two dimension by last retailer
Code is attached on product.Upper primary Transaction Information can be found in block chain according to the product public key on the two dimensional code, thus
Last agent's information can be inquired step by step, and manufacturer and manufacturer can be found by constantly tracing to the source, according to the original in manufacturer
Material information can trace to the source the relevant information of raw material.
Step 110: buyer carries out product traceability according to the two dimensional code.The buyer is consumer, manufacturer or agent.
Buyer extracts product public key and private key signature script by the two dimensional code on scanning product, that is, can verify that agent is
Whether the no permission for possessing the product, the i.e. ownership of the product belong to the agent.Using company's public key on two dimensional code
Location and private key signature script verify whether the product belongs to the said firm.I of agent offer is then provided if the verification passes
Information is true.
Buyer can also find the product in upper primary Transaction Information according to the product public key on two dimensional code in block chain
Number, and tree has been sold with product inquiry seller, if the number that can find this commodity illustrates that this commodity is fake products, if looked for
Less than, and goods number when being traceable to the Transaction Information of producer and in the Transaction Information of producer is consistent, then proves the production
Product are certified products, so as to effectively prevent the circulation of fake products.
Illustrate the embodiment of product of the present invention source tracing method with a specific embodiment below.Fig. 2 mentions for the present invention
The embodiment schematic diagram of the product traceability method of confession.It is divided into commodity production link and commodity circulation ring in commodity circulation
Section.The present embodiment demonstrates simple commodity circulation process, but the present invention is not limited to this scene, it can be by each businessman
More complicated relationship is carried forward by dealing.
As shown in Fig. 2, user A1, A2, A3, A4, A5, A6 first carry out the registration of registration information to system registry node and test
Card, all users are offered to the authenticated data of the data that consumer can check and individual or company.
Product traceability system interior joint is verified by executing the registration information of intelligent contract a pair of user.It is verified
It is then stored in block chain.If verifying does not pass through, the relevant information of operator will be can not find when tracing to the source.Such as user
Registration information is as follows:
Information=<f1, M1, ad1, n1,3,1, id1, z1, j1 of manufacturer A1 registration, o1, k1, script1>
Information=<f2, M2, ad2, n2,3,1, id2, z2, j2 of manufacturer A2 registration, o2, k2, script2>
Information=<f3, M3, ad3, n3,4,1, id3, z3, j3 of dealer A3 registration, o3, k3, script3>
Information=<f4, M4, ad4, n4,2,1, id4, z4, j4 that vendor A 4 is registered, o4, k4, script4>
Information=<f5, M5, ad5, n5,4,1, id5, z5, j5 of dealer A5 registration, o5, k5, script5>
Information=<f6, M6, ad6, n6,5,1, id6, z6, j6 of retailer A6 registration, o6, k6, script6>
Fi (i=1,2,3,4,5,6) is the character of the registered public keys and other information of Ai after Hash256 processing
String.
Mi is the company of Ai or the title of individual, and adi is the company of Ai or the address of other individuals, and ni is the legal person of Ai
Name.3 in A1, A2 to represent A1, A2 be manufacturer.4 in A3, A5 to represent A3, A5 be dealer, and 2 in A4 represent manufacturer,
5 in A6 to represent A6 be retailer.Idi, zi, ji, oi, ki, scripti respectively represent the card of the status of a legal person in Ai, tissue generation
Code, operation permission, other, can verify that information, verifying script (public key script).Specific tissue such as Fig. 2.The reality of the method for the present invention
Using being not limited to these information.Steps are as follows for specific merchant transaction:
(1) product number is b2 by manufacturer A2, and the product of entitled p2 is sold to dealer A3.A3 generates public key a2 and sends
To A2, and A3 is by the registered address of oneself and signature<f3, sig3>issue A2.A2 is generated using the information that A3 is sent as traded
The Transaction Information of information three.It is specific to indicate such as Fig. 2 a2 Transaction Information block.There is { a2 } in the warehouse packet of A3 at this time.A2 transaction letter
The registration information that the f2 in block is directed toward A2 is ceased, is indicated with dotted arrow.
(2) product number is b2 by dealer A3, and the product of entitled p2 is sold to vendor A 4.A4 generates public key a3 and is sent to
A3, and A4 is by the registered address of oneself and signature<f4, sig4>issue A3.A3 is generated using the information that A4 is sent such as transaction letter
The Transaction Information of breath two.It is specific to indicate such as Fig. 2 a3 Transaction Information block.There is { a3 } in the warehouse packet of A4 at this time.A3 Transaction Information
The PreHash=a2 of input is directed toward the public key address a2 of last transaction in block.The script ssig2 that signs is used to prove certainly to system
Oneself possesses a2.CompanyAddress f3 in a3 Transaction Information block is directed toward the address of oneself registration, and sig3 is for proving oneself to possess note
Volume information f3.Wherein solid arrow indicates trade give-ups, and dotted arrow indicates registered address.
(3) product number is b1 by manufacturer A1, and the product of entitled p1 is sold to vendor A 4.A4 generates public key a1 and is sent to
A1, and A4 is by the registered address of oneself and signature<f4, sig4>issue A1.A1 is generated using the information that A4 is sent such as transaction letter
The Transaction Information of breath three.It is specific to indicate such as Fig. 2 a1 Transaction Information block.There is { a1, a3 } in the warehouse packet of A4 at this time.A1 transaction letter
Cease the registration information that the f1 in block is directed toward A1.
(4) vendor A 4 uses p1, both raw materials of p2 produce product p3.Product p3 is sold to dealer A5 by A4.A5 is generated
Public key a4 is sent to A4, and A5 is by the registered address of oneself and signature<f5, sig5>issue A4.The information that A4 utilizes A5 to send
Generate the Transaction Information such as Transaction Information one.It is specific to indicate such as Fig. 2 a4 Transaction Information block.Have in the warehouse packet of A5 at this time
{a4}.The PreHash=a1 of input1 is directed toward the public key address a1 of last transaction in a4 Transaction Information block.Sign script ssig1
For proving that oneself possesses a1 to system.The PreHash=a3 of input2 is directed toward the public key of last transaction in a4 Transaction Information block
Address a3.Signature script ssig3 is used to prove that oneself possesses a3 to system.CompanyAddress f4 in a4 Transaction Information block is directed toward certainly
The address of oneself registration, sig4 is for proving oneself to possess registration information f4.
(5) product number is b3 by dealer A5, and the product of entitled p3 is sold to retailer A6.A6 generates public key a5 and sends
To A5, and A6 is by the registered address of oneself and signature<f6, sig6>issue A5.A5 is generated using the information that A6 is sent as traded
The Transaction Information of information two.It is specific to indicate such as Fig. 2 a5 Transaction Information block.There is { a5 } in the warehouse packet of A6 at this time.A5 transaction letter
Cease the registration information that the f5 in block is directed toward A5.The PreHash=a4 of input is directed toward the public key of last transaction in a5 Transaction Information block
Address a4.Signature script ssig4 is used to prove that oneself possesses a4 to system.
(6) retailer A6 using in warehouse packet public key address and signature<a5, ssig5>, registered address and signature<f6,
Sig6 > be fabricated to two dimensional code is attached on product.
(7) consumer passes through and scans the two-dimensional code, in extraction two dimensional code<f6, sig6>can be in system (product traceability
System) in find the relevant information of A6 retailer.Script in sig6 and registration information block f6 does script operation, if operation
Correct then retailer be it is regular, if verify it is incorrect if A6 retailer it is irregular.In extraction two dimensional code<a5, ssig5>,
Transaction Information a5 is inquired according to a5, script operation is done using the script of the output in ssig5 and a5, if operation is just
Really, then show that A6 possesses a5 Transaction Information block.If operation is incorrect, which is fake products.
(8) according in a5<f5, the information of sig5>can verify that A5 dealer.According to the PreHash of the input in a5
=a4 can find last Transaction Information a4.
(9) according to type of user information=2 in a4, it is known that<f4, sig4>in it is corresponding be company-information.Also
It is to say that consumer has been traceable to producer.If consumer is not yet satisfied with, can also continue to trace back according to the PreHash in input
Source.
(10) " having sold tree " can all be judged in registration information by tracing to the source every time, if the product number sold exists
Illustrate that this commodity is fake products in " having sold tree ".If the product number sold is not in " having sold tree ", explanation is certified products,
It can trust purchase.
(11) when dispute occurs for dealing top, can by<company's public key address, private key signature script>,<next family
Public key address, next public key script > verify their buyer-seller relationship.
As it can be seen that a kind of product traceability method provided by the invention based on block chain, is infused from node member to system first
Volume Node registry identity information, other nodes execute the authenticity of intelligence and about one verifying registration information.It will note if true
Volume information, which is stored in block, waits common recognition, deletes from nodal cache queue if untrue.Both parties formulate intelligence
About two, the seller is broadcast in P2P (peer-to-peer, partner is to partner) network together according to requiring to fill in Transaction Information,
Other nodes execute intelligence and about two and verify whether its Transaction Information meets the requirements, and are stored in block chain if meeting the requirements
Common recognition is waited, is deleted from nodal cache queue if being unsatisfactory for.By the transaction of each agent, last retailer will be handed over
The public key and signature, registered address and signature of easy information are printed as two dimensional code and trace to the source for consumer scans, can obtain production step by step
Product Transaction Information realizes genuine and believable product traceability.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are said
It is bright to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, foundation
Thought of the invention, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification is not
It is interpreted as limitation of the present invention.
Claims (7)
1. a kind of product traceability method, which is characterized in that the described method includes:
Consumer, agent and production link businessman generate public private key pair respectively, and are utilized respectively public key and registration information to note
Volume node carries out address registration and certification;The agent includes retail trader and retailer;The production link businessman includes life
Business men and manufacturer;The registration information includes public key address, address, title, user type, organizes code, can verify that information, disappear
Tree is demonstrate,proved and sold to breath type, operation permission, public key script, legal person, status of a legal person;
The register node broadcasts the registration information, other nodes reception registration information is simultaneously true according to the registration information
It is fixed whether to wait common recognition;
When product is sold to buyer by the manufacturer, the manufacturer constructs Transaction Information one using buyer's public key and registration information, and
The Transaction Information one is broadcast to other nodes;The Transaction Information one includes buyer's public key, the first input information, raw material letter
Breath, the first output information, the first other information and first company's script;
Other nodes receive the Transaction Information and determine whether that waiting is known together next time together;
When product is sold to buyer by the agent, the agent constructs Transaction Information using buyer's public key and registration information
Two, and the Transaction Information two is broadcast to other nodes;The Transaction Information two include buyer's public key, second input information,
Second output information, the second other information and second company's script;
Other nodes receive the Transaction Information two and determine whether to wait and know together next time;
When product is sold to buyer by the manufacturer, the manufacturer constructs Transaction Information using buyer's public key and registration information
Three, and the Transaction Information three is broadcast to other nodes;The Transaction Information three include third output information, third other letter
Breath and third company script;
Other nodes receive the Transaction Information three and determine whether to wait and know together next time;
The public key of the product and private key script and company's public key address and private key signature script are fabricated to by the retailer
Two dimensional code is attached on the product;
Buyer carries out product traceability according to the two dimensional code;The buyer is consumer, manufacturer or agent.
2. product traceability method according to claim 1, which is characterized in that other described nodes receive the registration information
And determined whether to wait common recognition according to the registration information, it specifically includes:
Other nodes receive the registration information and the registration information are stored in buffer area;
Other nodes obtain intelligence and about one;
Judge whether the registration information meets all conditions in the intelligence and about one, obtains the first judging result;
If first judging result is that the registration information meets all conditions in the intelligence and about one, other nodes will
The registration information, which is bundled in block chain, waits common recognition;
If first judging result is that the registration information is unsatisfactory for all conditions in the intelligence and about one, other nodes
The registration information is deleted from buffer area.
3. product traceability method according to claim 1, which is characterized in that described to judge whether the registration information meets
All conditions in the intelligence and about one obtain the first judging result, specifically include:
Other described nodes whether there is to the personal information that national Ministry of Industry and Information's door or relevant departments are inquired in the registration information;
The personal information includes the address, legal person and tissue code;
Whether inquiry agent's information belongs to lawful operation;
Inquire whether manufacturer's information is true and whether operation is legal;
Inquiry initiates whether the information that registrant provides is me;
If all query results are to be, first judging result is that the registration information meets the intelligence and about one
In all conditions;
If have in query result any one be it is no, first judging result be the registration information be unsatisfactory for the intelligence
It can be with all conditions in about one.
4. product traceability method according to claim 1, which is characterized in that other described nodes receive the Transaction Information
Determine whether to wait together and know together next time, specifically includes:
Other nodes receive the Transaction Information and are stored in buffer area together;
Other nodes obtain intelligence and about two;
Judge whether the Transaction Information one meets condition all in the intelligence and about two, obtains the second judging result;
If second judging result is that the Transaction Information one meets condition all in the intelligence and about two, it is described other
The Transaction Information one is bundled to wait in block chain and know together by node;
If second judging result is that the Transaction Information one is unsatisfactory for condition all in the intelligence and about two, other sections
Point deletes the Transaction Information one from buffer area.
5. product traceability method according to claim 1, which is characterized in that other described nodes receive the Transaction Information
Two and determine whether wait know together next time, specifically include:
Other nodes receive the Transaction Information two and are stored in buffer area;
Other nodes obtain intelligence and about three;
Judge whether the Transaction Information two meets condition all in the intelligence and about three, obtains third judging result;
If the third judging result is that the Transaction Information two meets condition all in the intelligence and about three, it is described other
The Transaction Information two is bundled to wait in block chain and know together by node;
If the third judging result is that the Transaction Information two is unsatisfactory for condition all in the intelligence and about three, other sections
Point deletes the Transaction Information two from buffer area.
6. product traceability method according to claim 1, which is characterized in that other described nodes receive the Transaction Information
Three and determine whether wait know together next time, specifically include:
Other nodes receive the Transaction Information three and are stored in buffer area;
Other nodes obtain intelligence and about four;
Judge whether the Transaction Information three meets condition all in the intelligence and about four, obtains the 4th judging result;
If the 4th judging result is that the Transaction Information three meets condition all in the intelligence and about four, it is described other
The Transaction Information three is bundled to wait in block chain and know together by node;
If the 4th judging result is that the Transaction Information three is unsatisfactory for condition all in the intelligence and about four, other sections
Point deletes the Transaction Information three from buffer area.
7. according to the described in any item product traceability methods of claim 2-6, which is characterized in that other described nodes believe transaction
While breath is bundled to waiting common recognition in block chain, further includes:
Product number in the Transaction Information is added to having sold in tree of the seller;The Transaction Information be Transaction Information one,
Transaction Information two or Transaction Information three;The seller is manufacturer, agent or manufacturer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810875899.XA CN109146518B (en) | 2018-08-03 | 2018-08-03 | Product tracing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810875899.XA CN109146518B (en) | 2018-08-03 | 2018-08-03 | Product tracing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109146518A true CN109146518A (en) | 2019-01-04 |
CN109146518B CN109146518B (en) | 2021-06-15 |
Family
ID=64791547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810875899.XA Active CN109146518B (en) | 2018-08-03 | 2018-08-03 | Product tracing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109146518B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109886685A (en) * | 2019-02-28 | 2019-06-14 | 易齐盈(重庆)电子商务有限公司 | A kind of commodity tracing system and method based on block chain |
CN109903161A (en) * | 2019-02-28 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Object processing method, device, equipment and medium based on block chain |
CN111212037A (en) * | 2019-12-20 | 2020-05-29 | 腾讯科技(深圳)有限公司 | Advertisement data processing method and device |
CN111741067A (en) * | 2020-05-20 | 2020-10-02 | 广州市格利网络技术有限公司 | Block chain-based tableware circulation information management method and device and block chain system |
CN111899072A (en) * | 2020-08-06 | 2020-11-06 | 厦门资缘信息科技有限公司 | Block chain based product sale method and system |
CN111913982A (en) * | 2020-07-15 | 2020-11-10 | 玉林师范学院 | Communication product detection parameter tracing method and system based on block chain technology |
WO2023230781A1 (en) * | 2022-05-30 | 2023-12-07 | 京东方科技集团股份有限公司 | Authentication qualification issuance method and apparatus, device, medium, and blockchain system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160371679A1 (en) * | 2014-04-28 | 2016-12-22 | WageCan Inc. | Virtual currency transaction through payment card |
CN106779737A (en) * | 2016-11-30 | 2017-05-31 | 电子科技大学 | Product based on block chain technology is traced to the source verification method |
CN107220836A (en) * | 2017-05-31 | 2017-09-29 | 无锡井通网络科技有限公司 | A kind of block chain logistics based on Quick Response Code is traced to the source tracking method for anti-counterfeit |
CN108305083A (en) * | 2018-02-11 | 2018-07-20 | 张国忠 | A kind of commodity source tracing method and system based on block chain |
-
2018
- 2018-08-03 CN CN201810875899.XA patent/CN109146518B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160371679A1 (en) * | 2014-04-28 | 2016-12-22 | WageCan Inc. | Virtual currency transaction through payment card |
CN106779737A (en) * | 2016-11-30 | 2017-05-31 | 电子科技大学 | Product based on block chain technology is traced to the source verification method |
CN107220836A (en) * | 2017-05-31 | 2017-09-29 | 无锡井通网络科技有限公司 | A kind of block chain logistics based on Quick Response Code is traced to the source tracking method for anti-counterfeit |
CN108305083A (en) * | 2018-02-11 | 2018-07-20 | 张国忠 | A kind of commodity source tracing method and system based on block chain |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109886685A (en) * | 2019-02-28 | 2019-06-14 | 易齐盈(重庆)电子商务有限公司 | A kind of commodity tracing system and method based on block chain |
CN109903161A (en) * | 2019-02-28 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Object processing method, device, equipment and medium based on block chain |
CN111212037A (en) * | 2019-12-20 | 2020-05-29 | 腾讯科技(深圳)有限公司 | Advertisement data processing method and device |
CN111212037B (en) * | 2019-12-20 | 2022-09-20 | 腾讯科技(深圳)有限公司 | Advertisement data processing method and device |
CN111741067A (en) * | 2020-05-20 | 2020-10-02 | 广州市格利网络技术有限公司 | Block chain-based tableware circulation information management method and device and block chain system |
CN111741067B (en) * | 2020-05-20 | 2022-08-12 | 广州市格利网络技术有限公司 | Block chain-based tableware circulation information management method and device and block chain system |
CN111913982A (en) * | 2020-07-15 | 2020-11-10 | 玉林师范学院 | Communication product detection parameter tracing method and system based on block chain technology |
CN111899072A (en) * | 2020-08-06 | 2020-11-06 | 厦门资缘信息科技有限公司 | Block chain based product sale method and system |
CN111899072B (en) * | 2020-08-06 | 2024-02-02 | 厦门道至数字信息有限公司 | Block chain-based product sales method and system |
WO2023230781A1 (en) * | 2022-05-30 | 2023-12-07 | 京东方科技集团股份有限公司 | Authentication qualification issuance method and apparatus, device, medium, and blockchain system |
Also Published As
Publication number | Publication date |
---|---|
CN109146518B (en) | 2021-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109146518A (en) | A kind of product traceability method | |
US12021991B2 (en) | Methods and systems for implementing zero- knowledge proofs in transferring partitioned tokens on distributed ledger-based networks | |
Alabdulwahhab | Web 3.0: the decentralized web blockchain networks and protocol innovation | |
TWI777048B (en) | Anti-counterfeiting method and device based on blockchain, electronic equipment | |
CN110349056B (en) | Service processing system and method based on block chain | |
CN108389046B (en) | Privacy protection transaction method based on block chain technology in electronic commerce | |
US11232414B2 (en) | Cryptocurrency verification system | |
CN108650077B (en) | Block chain based information transmission method, terminal, equipment and readable storage medium | |
CN107730384A (en) | Art sales method and server, server end and system based on block chain | |
Forte et al. | Beyond Bitcoin-Part I: A critical look at blockchain-based systems | |
CN110096903B (en) | Asset verification method based on block chain and block chain network system | |
CN110377635B (en) | Block chain architecture-based RMB cross-border payment inquiry and retrieval method and device | |
CN111324661A (en) | User cooperation method, device and medium based on block chain | |
Luu et al. | The challenge of Bitcoin pseudo-anonymity to computer forensics | |
CN109858904A (en) | Data processing method and device based on block chain | |
Manimaran et al. | Blockchain-based smart contract for e-bidding system | |
Mohit et al. | Design and implementation of transaction privacy by virtue of ownership and traceability in blockchain based supply chain | |
KR100985660B1 (en) | Method and apparatus for establishing peer-to-peer karma and trust | |
Ye et al. | An anonymous and fair auction system based on blockchain | |
Wu et al. | A study on blockchain-based circular economy credit rating system | |
Wang et al. | Decentralized data marketplace to enable trusted machine economy | |
KR20190118785A (en) | System and method for block-chain technique for mutual reliability in electronic commerce | |
Hu et al. | Strong designated verifier signature schemes with undeniable property and their applications | |
Jahankhani | The behaviour and perceptions of on-line consumers: Risk, risk perception and trust | |
Guo et al. | A lightweight NFT auction protocol for cross-chain environment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |