Summary of the invention
Technical matters to be solved by this invention provides a kind of method for anti-counterfeit, electronic tag and reader based on EPC Class-1 G-2 agreement, makes false proof more reliable to article.
For solving the problems of the technologies described above, it is as follows to the invention provides technical scheme:
A kind of method for anti-counterfeit based on EPC Class-1 G-2 agreement comprises the steps:
The EPC sign indicating number of product is write the EPC memory block of electronic tag, the access password of electronic tag is write the access password memory block of electronic tag;
Described EPC sign indicating number and access password are deposited in the application server as a record;
The EPC memory block of electronic tag is set at writes locking, the access password memory block of electronic tag is set at the read-write locking;
Reader compares to determine access password in the electronic tag and the access password in the application server whether electronic tag is legal.
Above-mentioned method, wherein, reader compares to determine that to the access password in the electronic tag and the access password in the application server electronic tag is whether legal specifically comprises:
Reader reads the EPC sign indicating number of storing in the electronic tag EPC memory block;
Reader is inquired about corresponding access password according to the EPC sign indicating number that reads from application server, and when inquiring access password, the access password that inquires is sent to electronic tag;
Electronic tag judges whether the access password of storing in the access password memory block of access password that reader sends and this electronic tag is consistent, as if unanimity, then jumps to the Secured state;
Reader is carried out unlocking operation to the access password memory block of electronic tag, and reads the access password of storing in the access password memory block of electronic tag;
Reader judges whether the access password of inquiring about is consistent with the access password that reads from electronic tag from application server, if consistent, determine that then electronic tag is legal, otherwise, determine that electronic tag is illegal.
Above-mentioned method wherein, when the EPC sign indicating number that the reader basis reads is failed from the corresponding access password of application server inquiry, determines that directly electronic tag is illegal.
Above-mentioned method, wherein, reader is carried out unlocking operation to the access password memory block of electronic tag and specifically comprised: reader sends the instruction of release access password memory block to electronic tag; Whether after electronic tag receives the instruction of release access password memory block, judging current is the Securied state, if, then remove the read lock of access password memory block, otherwise, unlocking operation do not carried out.
Above-mentioned method, wherein, reader reads the access password of storing in the access password memory block of electronic tag and specifically comprises: reader sends the instruction of read access password to electronic tag; After electronic tag receives the instruction of read access password, whether judge the access password memory block by read lock, if, not to reader backward reference password, otherwise, to reader backward reference password.
Above-mentioned method wherein, when reader is failed from the access password memory block read access password of electronic tag, determines that directly electronic tag is illegal.
A kind of electronic tag based on EPC Class-1 G-2 agreement comprises:
The EPC memory block is used for the EPC sign indicating number of storage products;
The access password memory block is used for the access password of store electrons label;
Locking module has been used in the EPC storage area stores behind the EPC sign indicating number locking being write in described EPC memory block, in the access password storage area stores behind the access password, locking is read and write in described access password memory block;
State redirect module is used for after receiving the access password that reader sends, and judges whether the access password of storing in access password that reader sends and the described access password memory block is consistent, as if unanimity, then makes electronic tag jump to the Secured state;
Separate lock module, be used for after the instruction of the release access password that receives the reader transmission, judging whether electronic tag is the Secured state, if then remove the read lock of access password memory block.
A kind of electronic label reader based on EPC Class-1 G-2 agreement comprises:
EPC sign indicating number read module is used for reading the EPC sign indicating number that store electronic tag EPC memory block;
The access password enquiry module is used for according to the access password of the described EPC sign indicating number that reads from application server inquiry correspondence, and when inquiring access password, the access password that inquires is sent to electronic tag;
The access password read module is used for unlocking operation is carried out in the access password memory block of electronic tag, and reads the access password of storing in the access password memory block of electronic tag;
False proof judge module is used for judging whether the access password of inquiring about from application server is consistent with the access password that reads, if consistent, determines that then electronic tag is legal from electronic tag, otherwise, determine that electronic tag is illegal.
Above-mentioned electronic label reader, wherein, described false proof judge module also is used for, if the access password enquiry module is failed from the corresponding access password of application server inquiry according to the EPC sign indicating number that reads, determines that then electronic tag is illegal.
Above-mentioned electronic label reader, wherein, described false proof judge module also is used for, if the access password read module determines then that from the access password memory block read access password failure of electronic tag electronic tag is illegal.
Compared with prior art, technical scheme of the present invention uses the access password of storing in the reserved storage area of electronic tag to control the state redirect of label, then, by access password in the electronic tag and the access password in the application server are compared to determine whether electronic tag is legal, make false proof more reliable to article; And this scheme is observed EPC Class-1 G-2 consensus standard fully.
Embodiment
According to EPC Class-1 G-2 agreement regulation, electronic tag has various states, checks finishing early stage with reader to begin alternately to carry out; read, write, locking; when business operation such as killing, be in open (Open) and one of protection (Secured) two states usually.When the access password of storing in the reserved storage area of electronic tag (Access Password) when being not 0, label can jump to the Open state earlier; The Access Password that stores in the described reserved storage area is 0 o'clock, and then label can directly jump to the Secured state from the state in early stage.When label was in the Open state, reader can be to label execution other business operations except that locking/unlocking; When label was in the Secured state, reader can be carried out all business operations to label.
According to above-mentioned protocol contents, core concept of the present invention is: the EPC sign indicating number of AccessPassword and product is set in electronic tag, and general<EPC sign indicating number, Access Password〉deposit in the enterprise product database (application server) as a record; When Antiforge inquiry, by the redirect (jumping to the Secured state) of Access Password control tag state, and then control the access limit of reader, thereby reach false proof purpose electronic tag from the Open state.
For making the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the accompanying drawings and the specific embodiments.
With reference to Fig. 2, the method for anti-counterfeit based on EPC Class-1 G-2 agreement of the embodiment of the invention mainly comprises the steps:
Step 201: writing labels, promptly usually said hair fastener writes the EPC memory block of electronic tag with the EPC sign indicating number of product, the access password (Access Password) of distributing to electronic tag is write the access password memory block of electronic tag.
Step 202: stored data base record, general<EPC sign indicating number, Access Password〉deposit in the enterprise product database as a record.
Step 203: lock tag, the access password memory block of electronic tag is set at the read-write locking, the EPC memory block of electronic tag is set at writes locking.
At this moment, reader can't read the AccessPassword that stores in the access password memory block of electronic tag, also can't rewrite this Access Password; Reader can read the EPC sign indicating number of the product of EPC memory block, but can't rewrite this EPC sign indicating number.According to concrete demand, also all memory fields of label all can be set at and write locking.
Step 204: Antiforge inquiry, reader compares to determine access password in the electronic tag and the access password in the application server whether electronic tag is legal.
With reference to Fig. 3, the Antiforge inquiry reciprocal process in the step 204 is specific as follows:
Step 301: reader sends the instruction of reading the EPC sign indicating number to electronic tag;
Step 302: after electronic tag receives described instruction, return the EPC sign indicating number of storing in its EPC memory block to reader;
Step 303: reader sends the request of obtaining corresponding Access Password according to the EPC sign indicating number that reads to enterprise application server (product database);
Step 304: after the enterprise application server verification reader authority, be index, inquire about corresponding Access Password, and the Access Password that inquires is returned to reader with the EPC sign indicating number;
Step 305: reader receives the Access Password that application server sends, and the Access Password that receives is sent to electronic tag;
In this step, reader illustrates the inquiry failure if do not receive the Access Password that application server sends, and determines that then this electronic tag is illegal, and process ends.
Step 306: electronic tag is compared Access Password that receives and the AccessPassword that self stores, and both unanimities then jump to the Secured state, the inconsistent Open state that then still remains on;
Step 307: reader sends the instruction of release access password memory block to electronic tag;
Step 308: after electronic tag receives the instruction of release access password memory block, if current be the Securied state, then remove the read lock of access password memory block, as if current be the Open state, do not carry out described unlocking operation;
Step 309: reader sends the instruction of read access password to electronic tag;
Step 310: after electronic tag receives the instruction of read access password, whether judge the access password memory block by read lock, if, do not return Access Password to reader, otherwise, Access Password returned to reader;
Step 311: reader receives the Access Password that electronic tag sends, and it is compared with the Access Password that receives from application server, and both unanimities determine that then electronic tag is legal, is the original-pack label of article encapsulation when dispatching from the factory; Inconsistent, determine that then electronic tag is illegal.
In this step, reader illustrates the release failure if do not receive the Access Password that electronic tag sends, and determines that then this electronic tag is illegal.
Corresponding to above-mentioned method for anti-counterfeit based on EPC Class-1 G-2 agreement, the embodiment of the invention also provides a kind of electronic tag and reader based on EPC Class-1 G-2 agreement.
With reference to Fig. 4, the electronic tag based on EPC Class-1 G-2 agreement of the embodiment of the invention mainly comprises:
EPC memory block 41 is used for the EPC sign indicating number of storage products;
Access password memory block 42 is used for the access password of store electrons label;
Locking module 43 is used for after the EPC sign indicating number has been stored in EPC memory block 41 locking being write in EPC memory block 41, after access password has been stored in access password memory block 42, locking is read and write in access password memory block 42;
State redirect module 44 is used for after receiving the access password that reader sends, and judges whether the access password of storage in access password that reader sends and the access password memory block 42 is consistent, as if unanimity, then makes electronic tag jump to the Secured state;
Separate lock module 45, be used for after the instruction of the release access password that receives the reader transmission, judging whether electronic tag is the Secured state, if then remove the read lock of access password memory block 42.
With reference to Fig. 5, the electronic label reader based on EPC Class-1 G-2 agreement of the embodiment of the invention mainly comprises:
EPC sign indicating number read module 51 is used for reading the EPC sign indicating number of electronic tag EPC memory block 41 storages;
Access password enquiry module 52 is used for according to the access password of the described EPC sign indicating number that reads from application server inquiry correspondence, and when inquiring access password, the access password that inquires is sent to electronic tag;
Access password read module 53 is used for unlocking operation is carried out in the access password memory block 42 of electronic tag, and reads the access password of storing in the access password memory block 43 of electronic tag;
False proof judge module 54 is used for judging whether the access password of inquiring about from application server is consistent with the access password that reads, if consistent, determines that then electronic tag is legal from electronic tag, otherwise, determine that electronic tag is illegal.
Wherein, when access password enquiry module 52 according to the EPC sign indicating number that reads during from the corresponding access password failure of application server inquiry, false proof judge module 54 determines that electronic tags are illegal; When the access password memory block 42 read access passwords failure of access password read module 53 from electronic tag, false proof judge module 54 determines that electronic tag is illegal.
Describe the application example of the present invention below in conjunction with a product in detail from producing to the whole life process of using that circulates in the article anti-counterfeit field.
Here use an abstract product (Product, be called for short P) to describe as an example, the P representative can be used the article of RFID label arbitrarily, such as the tealeaves cake, cigarette, wine, or the like all can.The RFID label (Tag) that is attached on the article P is called for short T; The application server of enterprise (Server) is called for short S; RFID reader (Reader) is called for short R.Concrete implementation step is as follows:
S01: the Access Password that will distribute to the EPC sign indicating number of product P and label T writes EPC memory block and the Reserved memory block of T respectively.
S02: producer is attached to label T on the product P, and concrete attachment position and method will be decided on concrete product, and this step is to allow P and T produce binding relationship in a word.
S03: the EPC sign indicating number of the P that reading tag T stored and the Access Password of T, and deposit the enterprise product database in as a record.
S04: producer carries out lock operation to label T, requires the EPC district to be write locking, and Access Password district is by the read-write locking.
S05: product P is dispatched from the factory, and the channel that circulates arrives in ultimate consumer's the hand.
S06: the consumer holds product P, enters the detection distance of the set inquiry reader R of producer, initiates the query requests of authenticity.
S07: reader R sends to T and reads the EPC code instruction.
S08:T is in the Open state, and returns the EPC sign indicating number to R.
S09:R holds the EPC sign indicating number, initiates Access Password query requests to the application server S of enterprise.
S10:S issues R with the Access Password of the EPC sign indicating number correspondence of product database stores.
S11:R sends to T with the Access Password that S returns.
S12:T is with the AccessPassword comparison of the Access Password that receives and own protected code storage area stores, and unanimity then jumps to the Secured state.
S13:R sends the unlock command of Access Password memory block to T.
S14:T carries out release.
S15:R sends the instruction of reading Access Password to T.
S16:T carries out and reads instruction, and the Access Password that self stores is returned to R.
The S17:R comparison is from S Access Password that obtains and the Access Password that obtains from T.
S18: comparison result for both when consistent, smart-tag authentication passes through, and is legal label, product P is a genuine piece.
Now consider the situation of possible forgery label, the label of forgery is designated as T1.
First kind of situation: the fake producer at will takes a RFID label T1 personation T.At this moment, carrying out S10 during the step, the AccessPassword of the EPC sign indicating number correspondence of T1 is can not find out in no record in the product database among the S.In the S10 step is that decidable T1 is an illegal label, and the accompanying product P 1 of T1 is a fake product.
Second kind of situation: the fake producer uses the reader R1 of protocol compliant standard to read the EPC sign indicating number of T earlier, then the EPC sign indicating number is write among the T1, the Access Password of T1 can only at will be provided with one, this moment, the Access Password of T was the read-write locking, can't be read, and R1 can't be connected with S, can't obtain the state redirect that legal Access Password controls T.For this kind situation, in the S12 step, Access Password that the T1 comparison receives and the Access Password of self, inconsistent, T1 still keeps the Open state; In the S14 step, T1 carries out the unlocking operation failure, and in the S16 step, T1 carries out and reads Access Password operation failure, in the S17 step, R can't obtain AccessPassword from T1, can't finish comparison, therefore smart-tag authentication does not pass through, and T1 is an illegal label, and P is a fake product.
The present invention also can have other various embodiments, and under the situation that does not deviate from spirit of the present invention and essence thereof, those of ordinary skill in the art are when making corresponding change and distortion according to the present invention.All utilize, and redirect realizes that the method for article anti-counterfeit all should belong to category of the present invention based on EPC Class-1 G-2 consensus standard control tag state, and it changes and be out of shape the protection domain that all should belong to the appended claim of the present invention accordingly.