Summary of the invention
In view of this, fundamental purpose of the present invention is to provide the device and method of realizing label counting in a kind of rfid system, be used for to solve reader and repeat to check the problem that frequently reports with data, can effectively reduce network traffics in the rfid system and the number of short message.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides the device of realizing label counting in a kind of radio frequency discrimination RFID system, the label buffer memory is set in reader, described label buffer memory comprises the shielding buffer memory and sends buffer memory; Wherein,
Described reader in checking the label process, according to the shielding cycle and the deletion cycle that arrange, carries out the conversion of tag state in conjunction with the status data that shields the label of storing in the buffer memory, realizes the label that shielding repeats to report according to tag state;
Described shielding buffer memory is for the status data of storage tags;
Described transmission buffer memory is used for the label event data that the buffer memory reader produces in the tag state transfer process, and then or when sending buffer memory and having expired the unified encapsulation of the label event data of all buffer memorys is reported middleware system in the transmission cycle;
Described shielding cycle and the deletion cycle according to arranging, carry out the conversion of tag state in conjunction with the status data that shields the label of storing in the buffer memory, comprising:
Check in the tasks carrying process, reader counting to a label is judged that to the tag state of current label in the shielding buffer memory if current label is vanishing state, the tag state of this label of reader is set to masked state, and is produced label event; If current label is masked state, does not then change tag state and do not produce label event; If current label is original state, then the tag state of this label of reader is set to masked state, and produces label event; If current label is in the shielding cycle that masked state and retention time arrange greater than reader, then the tag state with this label changes original state over to; If current label is in the deletion cycle that original state and retention time arrange greater than reader, then the tag state with this label changes vanishing state over to, namely deletes from the shielding buffer memory.
The present invention also provides the method that realizes label counting in a kind of rfid system, the shielding cycle of label allocation, deletion cycle and transmission cycle; The method is further comprising the steps of:
During reader counting to label, judge the tag state of current tag storage of checking in the shielding buffer memory of reader, determine whether to change tag state according to judged result and in conjunction with the shielding cycle that arranges in the reader and deletion cycle, and determine whether to produce label event; The label event data that produce are cached in the transmission buffer memory of reader; The transmission cycle is then or when sending buffer memory and having expired, and all label event data of buffer memory are reported middleware system together; The transmission cycle does not arrive constantly, carries out checking next label; Wherein, described tag state comprises masked state, original state and vanishing state; Describedly determine whether to change tag state according to judged result and in conjunction with the shielding cycle that arranges in the reader and deletion cycle, and determine whether to produce label event, be specially: check in the tasks carrying process, reader counting to one label, tag state to current label in the shielding buffer memory is judged, if the current label of checking is vanishing state, then the described label of reader tag state at this moment is set to masked state, and produces label event; If the current label of checking is masked state, does not then change tag state and do not produce label event; If the current label of checking is original state, then the described label of reader tag state at this moment is set to masked state, and produces label event; If current label is in the shielding cycle that masked state and retention time set in advance greater than reader, then the tag state with this label changes original state over to; If current label is in the deletion cycle that original state and retention time set in advance greater than reader, then the tag state with this label changes vanishing state over to.
In the such scheme, the initial tag state of all labels is defaulted as vanishing state.
In the such scheme, the different tasks of checking reconfigures shielding cycle, deletion cycle and the transmission cycle of label.
Realize the device and method of label counting in the rfid system provided by the invention, in the reading device side setting by the shielding buffer memory with send the label buffer memory that buffer memory forms, wherein, the shielding buffer memory is used for realizing the label filtering function, repeat to check the label that reports in the shielding cycle inner screening of setting, can reduce the flow on the network; Send the label event data that buffer memory produces in order to buffer memory, unified reporting again afterwards is about to several short messages and is packaged into packet and reports, can avoid data frequently to report, and reduces the number of short message in the network, thereby is conducive to quickly and efficiently the transmission of data.
Embodiment
Basic thought of the present invention is: by the label buffer memory that shielding buffer memory and transmission buffer memory form, utilize the shielding buffer memory to realize the label filtering function in the reading device side setting, repeat to check the label that reports in the shielding cycle inner screening of setting; Utilize to send the label event data that buffer memory comes buffer memory to produce, some short message unifications are reported.
Below in conjunction with drawings and the specific embodiments the present invention is described in further detail.
As shown in Figure 1, the reading device side of the present invention in rfid system is provided with the label buffer memory, and the label buffer memory comprises two storage subareas, namely shields buffer memory 1 and sends buffer memory 2.Wherein, shielding buffer memory 1 is used for the storage tags status data, can realize the label filtering function, repeats to check the label that reports in the shielding cycle inner screening of setting; Send buffer memory 2 and be used for the label event data that buffer memory produces, several short messages are packaged into the unified middleware system that reports behind the packet.Here, middleware system generally by network, links to each other with reader such as internet or wireless network etc.
Before once checking tasks carrying, reader arranges configuration shielding cycle and deletion cycle according to the different conditions of being checked object in the different application scene, use with three kinds of combinations of states of label in the shielding buffer memory 1, in order to realize the label filtering function of shielding buffer memory, the label of checking in the same shielding cycle can not checked again, thus avoid same shielding cycle interior label repeat check.
Here, the setting in described shielding cycle should be with reference to the applied environment of reality, in general, is carried out immediately monitoring in short maybe needs of time of rfid system internal memory to checking object if check object, the weak point that the shielding cycle can be set is a little, does not even use the shielding buffer memory; If it is longer in the time of rfid system internal memory to be checked object, then can be set the long shielding cycle.For example: gate control system, the reader radio-frequency region is 5 meters, the shielding cycle is set as 1 second, if arrange report the label event data three times after the gate inhibition open the door, so, the people just opens the door through 3 seconds from going in front of the door the doorway, if there is the people just to pass by, may just report the label event data one time, then can not open the door; If what the shielding cycle established too smallly will produce redundant reported data, when a middleware system is managed a plurality of gate inhibition, just may cause congestedly, the shielding cycle generally checks the cycle greater than one.
The setting in described deletion cycle also needs with reference to application scenarios, if reader resource-constrained or exemplar are distributed more widely and be difficult for repeating, the short deletion cycle just should be set, for example: the waiting hall, because exemplar quantity is very large, label does not become this situation of Repeat state from the Init state substantially.If exemplar narrow distribution, and repeatedly occurring back and forth can arrange the long deletion cycle, for example: an office, the deletion cycle is generally the length in a plurality of shielding cycles or longer.More than arrange and to change flexibly according to concrete application scenarios, be not limited to above said content.
When label event produced, the label event data were not mail to middleware system immediately, sent buffer memory 2 but deposit in.Reader can be according to the quantity of being checked object in the concrete application scenarios and pre-configured corresponding transmission cycle of different conditions or buffer memory capacity.Here, send the instantaneity that main consideration practical application is set in cycle, for the application of promptness, can consider that the time span of reducing the transmission cycle even do not use the transmission buffer memory, the transmission cycle generally checks the cycle greater than one.When the transmission cycle then or send buffer memory 2 and produce reported event when full, all label event data that send buffer memory 2 interior buffer memorys are reported middleware system together, so, several short messages can be packaged into packet, realize sending caching function, thereby reduce the number of short message in the network.
Fig. 2 is three kinds of states and the transition diagram each other thereof of label in the shielding buffer memory 1, here, tag state refers to the label data the checked state in reader shielding buffer memory 1, as shown in Figure 2, three of label kinds of states are respectively: shielding (Repeat) state, initial (Init) state and disappearance (Disappear) state.Described Init state, namely init state represents that this moment, label entered shielding buffer memory 1, but has exceeded a shielding cycle, check next time to reporting in cycle; Described Repeat state, namely masked state represents that label reports, and is in the shielding cycle of reader, need not again to report; Described Disappear state, namely vanishing state represents deletion in reader shielding buffer memory 1 of label under this state, this is not need state to be processed.Usually, the initial tag state of all label acquiescences is the Disappear state.
If label is in the Disappear state, so, behind this label, the tag state of this label can be arranged to the Repeat state at reader counting; If label is in the Repeat state, so, the shielding that arranges greater than reader when this label retention time is during the cycle, and the tag state of this label changes the Init state over to; If label is in the Init state, so, when the deletion cycle that this label retention time arranges greater than reader, the tag state of this label changes the Disappear state over to, i.e. deletion from shielding buffer memory 1.
Based on said apparatus, realize the method for label counting in the rfid system provided by the invention, may further comprise the steps:
Step 1: before once checking tasks carrying, the transmission cycle of the shielding cycle of the pre-configured shielding buffer memory 1 of reader, deletion cycle and transmission buffer memory 2;
Here, the described task of checking pre-sets, and middleware system says the word at every turn and controls beginning and the end of the task of checking; The cycle of namely checking in the time interval of checking also can dispose.Described shielding cycle, deletion cycle and transmission cycle, by reader according to being checked the configuration of the different state of object and quantity in the different application scene, wherein, the described state of being checked object be static, low speed moves, high-speed mobile etc.
Step 2: check in the tasks carrying process, reader counting to one label is judged the tag state of current label in the shielding buffer memory 1, if current label is the Disappear state, the tag state of this label of reader is set to the Repeat state, and produces label event; If current label is the Repeat state, then do not change tag state and do not produce label event, execution in step 5 afterwards; If current label is the Init state, then the tag state of this label of reader is set to the Repeat state, and produces label event;
In this step, for the tag state of current label, also carry out simultaneously following processing: if current label is in the shielding cycle that Repeat state and retention time arrange greater than reader, then the tag state with this label changes the Init state over to; If current label is in the deletion cycle that Init state and retention time arrange greater than reader, then the tag state with this label changes the Disappear state over to, i.e. deletion from shielding buffer memory 1.
Step 3: reader deposits the label event data that produce in the step 2 in and sends buffer memory 2.
Step 4: if the transmission cycle that sends buffer memory 2 then or when sending buffer memory and having expired, all label datas that then send in the buffer memory 2 are reported to middleware system, execution in step 5 together; If the transmission cycle not then, is then returned step 2, check next label;
Here, described label data is reported specifically together: will be kept at all short messages that send in the buffer memory 2 and be packaged into packet, and send to middleware system.
Step 5: carry out the next round label counting, repeating step 2 is checked the wheel number to step 4 until finish current appointment of checking task.
Repeating step 2 is in the process of step 4, if the last round of tag state Repeat state of having been checked, illustrate this label still be in on take turns and check in the identical shielding cycle, then this time do not produce label event, thus can avoid label repeat check.
In the step 2, if current tag state is the Init state, illustrate that this label had been surpassed a shielding cycle from last time by the time interval to this moment after checking, be converted from the Repeat state, this label that is in the Init state will be checked in the task in epicycle and again be checked, this is checked with the interval of checking last time and has surpassed a shielding cycle, can avoid like this within the same shielding cycle to same label repeat check; If label is in the Disappear state, illustrate that this label is through shielding cycle and deletion cycle, be converted from the Repeat state, or check at this and also not to be successfully inventory in task, be illustrated in the same shielding cycle and be not repeated to check, then produce label event.
Above-mentioned steps 1 to step 5 is once implementations of checking task, if carry out the next time different tasks of checking, then returns step 1 and restarts, and reader can reconfigure shielding cycle, deletion cycle and transmission cycle.
Fig. 3 is the processing flow chart of single reader counting to a label in the rfid system of the present invention, may further comprise the steps:
Step 301: once check in the tasks carrying process reader counting to a label;
Step 302: reader is searched for shielding buffer memory 1, judge in the shielding buffer memory 1 and whether have the current label of checking, be whether the current label of checking is in the Disappear state, if label is in the Disappear state, then enter step 304, if label is not in the Disappear state, then enter step 303;
Step 303: reader is done further to judge to the tag state in the shielding buffer memory 1, if label is in the Repeat state, does not then produce label event, returns step 301, if label is in the Init state, then enters step 304;
Step 304: the current label of checking of reader tag state at this moment is set to the Repeat state; Produce label event, the expression label is successfully checked by reader;
Step 305: reader deposits the label event data that produce in and sends buffer memory 2;
Step 306: if the transmission cycle then or when sending buffer memory and having expired, all label events that then will send in the buffer memory 2 report middleware system together; If the transmission cycle not then, is then returned step 302, carry out checking next label.
Among the present invention, before checking tasks carrying, reader filters and sends caching function according to the transmission cycle of shielding cycle, deletion cycle and the transmission buffer memory 2 of different application scene configuration shielding buffer memory 1 in order to realize label; In the task of checking is carried out, three kinds of combinations of states shielding cycle of label and the use in deletion cycle in the shielding buffer memory 1, can avoid same shielding cycle interior label repeat check; A transmission cycle to constantly, send buffer memory 2 all label event data of buffer memory be reported to middleware system together, be about to several short messages and be packaged into packet and report, be beneficial to quickly and efficiently the transmission of data.
The above is preferred embodiment of the present invention only, is not for limiting protection scope of the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.