Method and device capable of rapidly and accurately checking number of RFID radio frequency tagsTechnical Field
The invention relates to a method and a device capable of rapidly and accurately checking the number of RFID radio frequency tags, and belongs to the technical field of counting the number of RFID radio frequency tags.
Background
The Internet of things (Internet of things) technology is an important trend of modern informatization development, and is called as the third wave of the world information industry after computers and the Internet, and the RFID technology is one of the key technologies of the Internet of things. The RFID technology, as an article identification technology, overcomes the defects of incapability of rewriting bar code information, small memory space and poor safety, has the advantages of wireless non-line-of-sight reading and writing, strong signal penetration capacity, long distance, long service life, good environmental adaptability, capability of simultaneously identifying multiple labels and the like, and is widely applied in recent years.
When the existing RFID system checks the labels, an upper computer generally sends a checking command to an RFID reader-writer, then the reader-writer performs anti-collision arbitration identification, the process is also called as a blind spot process, after the reader-writer completes one blind spot, all unique identification codes of the labels are transmitted to the upper computer, the upper computer determines the number of the accurate labels in a radio frequency working field after continuous checking for several times, the time consumed by the whole process is long, and the technical reason comprises two aspects:
firstly, information transmission between the reader-writer and the upper computer is realized, namely the unique identification code of the label is transmitted repeatedly, and the upper computer can determine the number of the labels in the radio frequency working field by comparing the transmission result for many times; and secondly, repeated anti-collision arbitration identification is carried out between the reader-writer and the tag, wherein the arbitration time is long, so that the time consumption is long.
Disclosure of Invention
Aiming at the defects of the prior art, the invention discloses a method capable of rapidly and accurately checking the number of RFID radio frequency tags.
The invention also discloses a device for realizing the method, which is used for accurately and efficiently counting the number of the radio frequency tags in the working field.
The technical scheme of the invention is as follows:
a method for rapidly and accurately inventory the number of RFID radio frequency tags is characterized by comprising the following steps:
(1) when the reader-writer receives an upper computer checking command: sending a reset power-on instruction to a tag in a working field through a radio frequency module and an antenna, wherein the tag in the working field converts a roll call mark of the tag into a non-roll call mark, and a blind spot mark is kept unchanged;
(2) the reader-writer reads one unique identification code in the unique identification code list of the labels in the memory, and sends a roll call instruction to the labels in the working field through the radio frequency module and the antenna: if the label is in the working field, the label converts the roll call mark of the label into 'roll call', the blind spot mark is kept unchanged, and a unique identification code is returned to the reader-writer, the reader-writer receives the unique identification code, and the unique identification code list of the label is kept unchanged; if the label is outside the work field, the roll call mark of the label is unchanged, the blind spot mark is maintained unchanged, the reader-writer does not receive the label response, the record in the unique identification code list of the label is deleted, and the unique identification code of the label is uploaded to an upper computer;
(3) repeating the step (2) until all the unique identification codes of the labels in the unique identification code list of the labels are polled;
(4) the reader-writer sends an anti-collision arbitration identification instruction set to all labels with blind spots marked as ' blind spots ' in a working field, the labels with roll names marked as ' roll names ' do not respond to the blind spot instructions, and after the labels with roll names ' are correctly identified, unique identification codes are returned, the blind spot marks of the reader-writer are converted into ' blind spots ', and the roll name marks are converted into ' roll names ';
when the reader-writer receives the unique identification code of one label, a record is added in the unique identification code list of the label, and the unique identification code is uploaded to the upper computer;
(5) repeating the step (4) until completing an anti-collision arbitration identification process for the tag without the blind spot;
(6) the reader-writer sends an anti-collision arbitration identification instruction set to all labels with blind spots marked as 'named' in a working field, the labels with names marked as 'named' do not respond to the blind spot instructions, and after the labels without names are correctly identified, unique identification codes are returned, the blind spot marks of the reader-writer are converted into 'named' and the named marks are converted into 'named';
when the reader-writer receives the unique identification code of one label, a record is added in the unique identification code list of the label, and the unique identification code is uploaded to the upper computer;
(7) repeating the loop (6) until completing an anti-collision arbitration identification process for the label with the blind spot;
(8) and the reader-writer sends a label checking ending command to the upper computer.
An apparatus for counting the number of radio frequency tags within a worksite, comprising: the system comprises a reader-writer and an upper computer, wherein the reader-writer comprises an RAM memory and a radio frequency module which are connected with a microprocessor, and the radio frequency module is in wireless communication with a radio frequency tag in a working field through an antenna; the upper computer is connected with the microprocessor;
the RAM memory is used for storing the unique identification codes of all the identified tags;
the reader-writer adopts the following modes to count the tags in the wireless radio frequency work field: 1) adopting anti-collision arbitration identification, namely a blind spot mode; 2) adopting unique identification code matching identification, namely a roll call mode;
and after receiving the unique identification code of the label, the reader completes the inventory of one label.
According to the invention, the blind spot mode is realized by a flow of sending an anti-collision instruction set to the label by the reader-writer; the roll calling mode is realized by sending a roll calling instruction to the label by the reader-writer.
According to the invention, the label preferably comprises two flag bits: blind spot marks and roll call marks;
when the blind spot flag is "0", it indicates "non-blind spot"; when the blind spot flag is "1", it indicates "blind spot";
when the roll call flag is "0", it indicates "not roll call"; when the roll call flag is "1", it indicates "roll call already".
The reader-writer performs inventory on the labels in the working field in an alternating mode of 'blind spot + roll call + blind spot + roll call … …', wherein the blind spot mode is used for identifying the labels entering the working field; the roll call mode is used to identify tags that leave the field. When the unique identification code of one label is identified in a blind spot mode, a new data record is added to the label pool, otherwise, the data record in the label pool is kept unchanged; a label is identified by a roll call mode, the data record of the label pool is kept unchanged, otherwise, the label pool deletes an existing data record.
The technical advantages of the invention are as follows:
the invention improves the existing reader-writer checking process, increases the roll calling working mode, reduces the collision-proof arbitration identification times of the reader-writer on the label, and accelerates the checking speed; meanwhile, a tag pool for recording the unique identification code information of the tag is added in a memory in the reader-writer, the tag information counting work in a radio frequency work field is completed by the reader-writer, and the repeated information transmission between the reader-writer and an upper computer is reduced. The invention is suitable for application occasions such as intelligent bookshelf cabinets, intelligent catering, intelligent refrigerators, aviation logistics, production line management and the like, and particularly has more obvious effect in the application occasions of more than hundreds of labels.
Drawings
FIG. 1 is a flow chart of steps (1) - (3) of the method of the present invention;
FIG. 2 is a flow chart of steps (4) - (5) of the method of the present invention;
FIG. 3 is a flow chart of steps (6) - (8) of the method of the present invention;
fig. 4 is a block diagram of a device for counting the number of rf tags in a work field according to the present invention.
Detailed Description
The invention is described in detail below with reference to the following examples and the accompanying drawings of the specification, but is not limited thereto.
Examples 1,
As shown in fig. 1-3.
A method for rapidly and accurately inventory the number of RFID radio frequency tags comprises the following steps:
(1) when the reader-writer receives an upper computer checking command: sending a reset power-on instruction to a tag in a working field through a radio frequency module and an antenna, wherein the tag in the working field converts a roll call mark of the tag into a non-roll call mark, and a blind spot mark is kept unchanged;
(2) the reader-writer reads one unique identification code in the unique identification code list of the labels in the memory, and sends a roll call instruction to the labels in the working field through the radio frequency module and the antenna: if the label is in the working field, the label converts the roll call mark of the label into 'roll call', the blind spot mark is kept unchanged, and a unique identification code is returned to the reader-writer, the reader-writer receives the unique identification code, and the unique identification code list of the label is kept unchanged; if the label is outside the work field, the roll call mark of the label is unchanged, the blind spot mark is maintained unchanged, the reader-writer does not receive the label response, the record in the unique identification code list of the label is deleted, and the unique identification code of the label is uploaded to an upper computer;
(3) repeating the step (2) until all the unique identification codes of the labels in the unique identification code list of the labels are polled;
(4) the reader-writer sends an anti-collision arbitration identification instruction set to all labels with blind spots marked as ' blind spots ' in a working field, the labels with roll names marked as ' roll names ' do not respond to the blind spot instructions, and after the labels with roll names ' are correctly identified, unique identification codes are returned, the blind spot marks of the reader-writer are converted into ' blind spots ', and the roll name marks are converted into ' roll names ';
when the reader-writer receives the unique identification code of one label, a record is added in the unique identification code list of the label, and the unique identification code is uploaded to the upper computer;
(5) repeating the step (4) until completing an anti-collision arbitration identification process for the tag without the blind spot;
(6) the reader-writer sends an anti-collision arbitration identification instruction set to all labels with blind spots marked as 'named' in a working field, the labels with names marked as 'named' do not respond to the blind spot instructions, and after the labels without names are correctly identified, unique identification codes are returned, the blind spot marks of the reader-writer are converted into 'named' and the named marks are converted into 'named';
when the reader-writer receives the unique identification code of one label, a record is added in the unique identification code list of the label, and the unique identification code is uploaded to the upper computer;
(7) repeating the loop (6) until completing an anti-collision arbitration identification process for the label with the blind spot;
(8) and the reader-writer sends a label checking ending command to the upper computer.
Examples 2,
As shown in fig. 4.
An apparatus for counting the number of radio frequency tags within a worksite, comprising: the system comprises a reader-writer and an upper computer, wherein the reader-writer comprises an RAM memory and a radio frequency module which are connected with a microprocessor, and the radio frequency module is in wireless communication with a radio frequency tag in a working field through an antenna; the upper computer is connected with the microprocessor. The radio frequency module is connected with the antenna, transmits a wireless radio frequency signal to a working field to perform data communication with the radio frequency tag, and transmits interactive data back to the microprocessor, and the microprocessor stores the data in the RAM memory;
the RAM memory is used for storing the unique identification codes of all the identified tags;
the reader-writer adopts the following modes to count the tags in the wireless radio frequency work field: 1) adopting anti-collision arbitration identification, namely a blind spot mode; 2) adopting unique identification code matching identification, namely a roll call mode;
and after receiving the unique identification code of the label, the reader completes the inventory of one label.
The blind spot mode is realized by a flow of sending an anti-collision instruction set to the label by a reader-writer; the roll calling mode is realized by sending a roll calling instruction to the label by the reader-writer.
The label comprises two flag bits: blind spot marks and roll call marks;
when the blind spot flag is "0", it indicates "non-blind spot"; when the blind spot flag is "1", it indicates "blind spot";
when the roll call flag is "0", it indicates "not roll call"; when the roll call flag is "1", it indicates "roll call already".
The reader-writer performs inventory on the labels in the working field in an alternating mode of 'blind spot + roll call + blind spot + roll call … …', wherein the blind spot mode is used for identifying the labels entering the working field; the roll call mode is used to identify tags that leave the field. When the unique identification code of one label is identified in a blind spot mode, a new data record is added to the label pool, otherwise, the data record in the label pool is kept unchanged; a label is identified by a roll call mode, the data record of the label pool is kept unchanged, otherwise, the label pool deletes an existing data record.