The disposal route of label event and device in a kind of radio frequency identification application system
Technical field
The present invention relates to RFID (Radio Frequency Identification, radio-frequency (RF) identification) application system, relate in particular to the disposal route and the device of label event in a kind of radio frequency identification application system.
Background technology
In the RFID application system, the label event realization corresponding service logic that each business logic processing module reports by receiving middleware, represent to the user during professional fructufy, this has just proposed very high requirement to the middleware reported event processing module in the application system.
At present, the common way of each business logic processing module is exactly in the RFID application system: receive an ADDITION (increase) reporting events, think that a new label is increased to sensing range, if receive a DELETION (deletion) reporting events, think that then the label of this DELETION information correspondence leaves sensing range; When receiving a CURRENT (in real time) reporting events, think that then the label of this CURRENT information correspondence also is in sensing range.The business logic processing module just can be judged the trend of label by ADDITION and DELETION incident, thus the service logic separately that realizes.
Generally speaking, this mode can operate as normal, but because the complicacy of rfid system, when a plurality of labels are checked under same reader simultaneously, because influencing each other between the label, reader once or continuously can't be checked all labels several times fully, and what several successive was checked periodic report checks the possibility of result difference, the label event and the actual conditions that cause reporting are not inconsistent, caused a large amount of deceptive information to report, have influence on the processing of application system, and the treatment effeciency of using system caused have a strong impact on service logic.
Summary of the invention
The technical problem to be solved in the present invention is exactly disposal route and the device that proposes label event in a kind of radio frequency identification application system, solve in the prior art and to duplicate the problem that reads when reader carries out many label countings, reduced numerous and diverse foreground deceptive information expending for RFID application system resource, improve the treatment effeciency of RFID application system, improved the accuracy of reporting information simultaneously.
Another technical matters that the present invention solves solves the problem that occurs skip when reader in the prior art carries out many label countings exactly, has improved the accuracy of reporting information.
In order to solve the problems of the technologies described above, the invention provides the disposal route of label event in a kind of radio frequency identification application system, represent to have on the fresh information when label event and give the correct time, carry out fresh information immediately and report; Represent to have on the removing information when label event and give the correct time, by the mode of buffer memory, deletion belongs to the redundant information of same label, carries out removing information again and reports.
Further, described method comprises the steps:
(1) the incident extraction apparatus sends to the redundant information processor with label event change event message;
(2) described redundant information processor receives described event message, extracts the product electronic code EPC and the event type of this incident;
(3) when described event type was interpolation ADDITION or real-time CURRENT, the redundant information processor judged whether this incident is that fresh information reports, if then report this event message; When described event type is deletion during DELETION, whether judge this incident for removing information reports, if, when this EPC incident of indication of monitor is effective, report this event message more then with this event message buffer memory.
Further, in the described step (3), when described event type was ADDITION or CURRENT, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond of redundant information processor judges that promptly this incident is that fresh information reports, and then joins this incident in the ADDITION incident pond, and this event message is sent to the business logic processing module;
If this EPC incident is arranged in the ADDITION incident pond of redundant information processor, this EPC incident not in the DELETION incident pond of redundant information processor then abandons this event message;
If all there is this EPC incident in the ADDITION incident pond and the DELETION incident pond of redundant information processor, then deletes corresponding EPC incident in the DELETION incident pond, and abandon this event message.
Further, in the described step (3), when described event type was DELETION, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond of redundant information processor then abandons this event message;
If in the ADDITION incident pond of redundant information processor this EPC incident is arranged, this EPC incident not in the DELETION incident pond of redundant information processor, judge that this incident reports for removing information, then this incident is added DELETION incident pond, the time that this EPC incident is joined DELETION incident pond is as this EPC incident time corresponding;
If in the ADDITION incident pond of redundant information processor and the DELETION incident pond this EPC incident is arranged all, then upgrades the time of corresponding incident in the DELETION incident pond.
Further, in the described step (3), when certain EPC incident is effective in the indication DELETION of the monitor incident pond, the redundant information processor reports the business logic processing module with the event message of this EPC incident, and events corresponding in deletion ADDITION incident pond and the DELETION incident pond.
Further, the EPC incident time corresponding in the DELETION of redundant information processor incident pond surpasses the monitor time window to the current time, and then this EPC incident of monitor indication redundant information processor is effective.
In order to solve the problems of the technologies described above, the invention provides the treating apparatus of label event in a kind of radio frequency identification application system, comprise incident extraction apparatus, redundant information processor, monitor;
Wherein, described incident extraction apparatus is used to receive label event, and described label event is converted to event message, sends to the redundant information processor;
Described redundant information processor is used for extracting the EPC and the event type of described this incident of event message, when described event type is ADDITION or CURRENT, judges whether this incident is that fresh information reports, if then report this event message; When described event type is DELETION, whether judge this incident for removing information reports, if, when monitor indicates this EPC incident effective, report again then with this event message buffer memory;
Whether described monitor is used for monitoring the EPC incident of redundant information processor buffer memory, and be used to indicate described EPC incident effective.
Further, described redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when the event type in the event message that receives was ADDITION or CURRENT, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond judges that promptly this incident is that fresh information reports, then this incident is joined in the ADDITION incident pond, and report this EPC event message;
If this EPC incident is arranged in the ADDITION incident pond, this EPC incident not in the DELETION incident pond then abandons this event message;
If all there is this EPC incident in ADDITION incident pond and DELETION incident pond, then deletes corresponding EPC incident in the DELETION incident pond, and abandon this event message.
Further, described redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when the event type in the event message that receives was DELETION, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond then abandons this event message;
If in the ADDITION incident pond this EPC incident is arranged, this EPC incident not in the DELETION incident pond, judge that this incident reports for removing information, then this incident is added DELETION incident pond, the time that this EPC incident is joined DELETION incident pond is as this EPC incident time corresponding;
If in ADDITION incident pond and the DELETION incident pond this EPC incident is arranged all, then upgrades the time of corresponding incident in the DELETION incident pond.
Further, when certain EPC incident was effective in the indication DELETION of the monitor incident pond, the redundant information processor also was used to report this event message, and events corresponding in deletion ADDITION incident pond and the DELETION incident pond.
In order to solve the problems of the technologies described above, the present invention also provides a kind of radio frequency identification application system, comprise reader, middleware, business logic processing module, described reader is used for label counting information is reported middleware, also comprises: incident extraction apparatus, redundant information processor, monitor;
Wherein, described incident extraction apparatus is used to receive the label event that middleware sends, and described label event is converted to event message, sends to redundant information processor or business logic processing module;
Described redundant information processor is used for extracting the EPC and the event type of described this incident of event message, when described event type is ADDITION or CURRENT, judge whether this incident is that fresh information reports, if then this event message is sent to the business logic processing module; When described event type is DELETION, whether judge this incident for removing information reports, if, when monitor indicates this EPC incident effective, again this event message is sent to the business logic processing module then with this event message buffer memory;
Whether described monitor is used for monitoring the EPC incident of redundant information processor buffer memory, and be used to indicate described EPC incident effective.
Further, described redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when the event type in the event message that receives was ADDITION or CURRENT, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond judges that promptly this incident is that fresh information reports, and then joins this incident in the ADDITION incident pond, and this event message is sent to the business logic processing module;
If this EPC incident is arranged in the ADDITION incident pond, this EPC incident not in the DELETION incident pond then abandons this event message;
If all there is this EPC incident in ADDITION incident pond and DELETION incident pond, then deletes corresponding EPC incident in the DELETION incident pond, and abandon this event message.
Further, described redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when the event type in the event message that receives was DELETION, the processing mode of redundant information processor was:
If this EPC incident not in the ADDITION incident pond then abandons this event message;
If in the ADDITION incident pond this EPC incident is arranged, this EPC incident not in the DELETION incident pond, judge that this incident reports for removing information, then this incident is added DELETION incident pond, the time that this EPC incident is joined DELETION incident pond is as this EPC incident time corresponding;
If in ADDITION incident pond and the DELETION incident pond this EPC incident is arranged all, then upgrades the time of corresponding incident in the DELETION incident pond.
Further, when certain EPC incident is effective in the indication DELETION of the monitor incident pond, the redundant information processor also is used for this event message is reported the business logic processing module, and events corresponding in deletion ADDITION incident pond and the DELETION incident pond.
In the present invention, when carrying out many label countings for reader, the application system that the shielding of RFID application system causes owing to many labels influence each other receives bulk redundancy information positive effect.Mainly show:
1, filters out redundant information, make the RFID application system receive the label event that conforms to actual environment, guarantee that the RFID application system represents real result to the client;
2, filter out redundant information, the incident that the RFID application system is handled significantly reduces, and has improved the efficient of application system processing events, has alleviated the processing load of application server.
The phenomenon that occurs skip when in addition, the present invention can also avoid reader to carry out many label countings.
Description of drawings
Fig. 1 is the block diagram of the embodiment of the invention;
Fig. 2 is the process flow diagram of the embodiment of the invention;
Fig. 3 is the monitor processing flow chart of the embodiment of the invention.
Embodiment
In many label countings, because the mutual collision of tag responses information causes some label can not normally to be checked in certain time period, the label data that causes reader counting to arrive is incomplete at the RFID reader, impacts using the system handles logic.The present invention uses the redundant information processor as an impact damper, in the redundant information processor, redundant information is removed, the possible deceptive information that reports is observed, if deceptive information is just cleared up, do not report application system, if satisfy certain condition, think just to report application system behind the real information.
Core concept of the present invention is: utilize the redundant information processor, on fresh information, give the correct time, processor reports application system to fresh information immediately, on removing information, give the correct time, utilize the caching mechanism of processor that the bulk redundancy information filtering of the same label that reports is fallen, finally be compressed into an information and report.So both guarantee the real-time of reporting events, guaranteed to report the authenticity of application system incident again, greatly improved the treatment effeciency of application system simultaneously.
The present invention is described in detail below in conjunction with drawings and the specific embodiments.
As shown in Figure 1, the RFID application system of the embodiment of the invention comprises: the treating apparatus of reader, middleware, business logic processing module and label event;
Wherein, described reader is used to report label counting information;
Described middleware reports this label counting information the treating apparatus of label event as label event;
The treating apparatus of described label event comprises incident extraction apparatus, redundant information processor, monitor;
Described incident extraction apparatus is used to receive the label event that middleware sends, described label event is converted to the event message that redundant information processor and business logic processing module can be understood, sends to the redundant information processor or the business logic processing module is handled; When needs carry out the redundant information processing, described event message is sent to the redundant information processor, when need not the redundant information processing, described event message is sent to the business logic processing module; Wherein, can whether needs carry out redundant information handles by artificial setting according to the concrete condition of RFID application system;
Described redundant information processor is used to receive the event message that the incident extraction apparatus sends, extract EPC (the Electronic Product Code of this incident, the product electronic code) and event type, when described event type is ADDITION or CURRENT, judge whether this incident is that fresh information reports, if then this event message is sent to the business logic processing module, otherwise does not send; When described event type is DELETION, whether judge this incident for removing information reports, if, then with this event message buffer memory, when this EPC incident of indication of monitor is effective, again this event message is sent to the business logic processing module, otherwise do not send;
Specifically, described redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when described event type was ADDITION, the redundant information processor had following several processing mode:
If this EPC incident not in the ADDITION incident pond judges that promptly this incident is that fresh information reports, and then joins this incident in the ADDITION incident pond, and this event message is sent to the business logic processing module;
If this EPC incident is arranged in the ADDITION incident pond, this EPC incident not in the DELETION incident pond promptly is expressed as the ADDITION reporting events of repetition, abandons this event message;
If all there is this EPC incident in ADDITION incident pond and DELETION incident pond, promptly represent to add again after the deletion just of this EPC incident, then delete corresponding EPC incident in the DELETION incident pond, and abandon this event message;
When described event type is CURRENT, processing mode was identical when the processing mode of redundant information processor was ADDITION with event type, wherein, if this EPC incident not in the ADDITION incident pond, represent that promptly the ADDITION incident failed to report, judge that this incident is that fresh information reports, and then stores this incident in the ADDITION incident pond into, and this event message is sent to the business logic processing module; Like this, avoided the generation of label skip phenomenon;
When described event type was DELETION, the redundant information processor had following several processing mode:
If this EPC incident not in the ADDITION incident pond represents that promptly this EPC incident is wrong, abandon this event message;
If this EPC incident is arranged in the ADDITION incident pond, this EPC incident not in the DELETION incident pond, judge that this incident reports for removing information, then this incident is added DELETION incident pond, the time that this EPC incident is joined DELETION incident pond is as this EPC incident time corresponding;
If this EPC incident is arranged in the ADDITION incident pond, the DELETION incident also has this incident in the pond, then upgrades the time of corresponding incident in the DELETION incident pond;
In addition, when certain EPC incident is effective in the indication DELETION of the monitor incident pond, described redundant information processor also is used for the event message of this EPC incident is reported the business logic processing module, and events corresponding in deletion ADDITION incident pond and the DELETION incident pond;
Described monitor is used for monitoring DELETION incident pond EPC incident time corresponding, when described EPC incident time corresponding surpasses monitor time window (also being to deduct EPC incident time corresponding the current time greater than the monitor time window of setting) to the current time, then indicate this EPC incident effective; Described monitor time window reports the deletion event time window for the redundant information processor, surpasses this time window and the deletion event that always exists just can be used as real event and reports; In addition, described monitor can be regularly to monitor, according to EPC incident time corresponding in the sense cycle monitoring DELETION incident pond of the monitor of setting;
The event message that described business logic processing module is used to receive and processing events extraction apparatus and redundant information processor send.
As shown in Figure 2, the embodiment of the invention comprises the steps:
Step 201, the sense cycle and the monitor time window of setting monitor; Described sense cycle and monitor time window can be that the user rule of thumb is worth setting;
This step is a pre-treatment step;
Step 202, reader report label counting information;
Step 203, middleware reports the incident extraction apparatus with this label counting information as label event;
Step 204, the incident extraction apparatus is converted to the event message that redundant information processor and business logic processing module can be understood with described label event;
Such as, described label event can be converted to the form of java class object;
Step 205 judges whether to carry out redundant information and handles, if do not need, then carries out next step; If need execution in step 207;
Step 206, the incident extraction apparatus directly sends to the business logic processing module with described event message, returns step 202;
Step 207, the incident extraction apparatus sends to the redundant information processor with described event message;
Step 208, the redundant information processor receives the event message that the incident extraction apparatus sends, and extracts the EPC and the event type of this incident;
Step 209 is judged the event type of described event message, if ADDITION or CURRENT then carry out next step; If DELETION, then execution in step 215;
Step 210 judges whether this EPC incident is arranged in the ADDITION incident pond, if do not have, then carries out next step, otherwise, execution in step 212;
Step 211 judges that this incident is that fresh information reports, and then this incident is joined in the ADDITION incident pond, and the event message of this EPC incident is sent to the business logic processing module, returns step 202;
Step 212 judges whether this EPC incident is arranged in the DELETION incident pond, if having, then carries out next step, otherwise, execution in step 214;
Step 213, corresponding EPC incident in the deletion DELETION incident pond, and abandon this event message, return step 202;
Step 214 abandons this event message, returns step 202;
Step 215 judges whether this EPC incident is arranged in the ADDITION incident pond, if do not have, then carries out next step; If execution in step 217 is arranged;
Step 216 abandons this event message, returns step 202;
Step 217 judges whether this EPC incident is arranged in the DELETION incident pond, if having, carries out next step, otherwise, execution in step 219;
Step 218, is returned step 202 at the time of upgrading corresponding incident in the DELETION incident pond;
Step 219 judges that this incident reports for removing information, then this incident is added DELETION incident pond, and the time that this EPC incident is joined DELETION incident pond is returned step 202 as this EPC incident time corresponding;
And
Step 220 when the redundant information processor receives that certain EPC incident is effective in the indication DELETION incident pond of monitor, is carried out next step;
Step 221, the redundant information processor reports the business logic processing module with the event message of this EPC incident, and events corresponding in deletion ADDITION incident pond and the DELETION incident pond, returns step 202.
In addition, for monitor, its treatment scheme comprises the steps: as shown in Figure 3
Step 301, the timer in monitor start detection cycle;
Step 302 when timer time arrives, judges in the DELETION incident pond of redundant event handler whether pending EPC incident is arranged, if having, then carries out next step, otherwise returns execution in step 302;
Step 303 judges that whether described EPC incident time corresponding surpasses the monitor time window to the current time, if do not surpass, returns execution in step 302; If there is EPC incident time corresponding to surpass the monitor time window to the current time, then execution in step 304;
Step 304 indicates this EPC incident of redundant event handler effective, returns execution in step 302.
The present invention has reduced numerous and diverse foreground deceptive information for the expending of RFID application system resource, and has improved the treatment effeciency of RFID application system, has improved the accuracy of reporting information simultaneously, and RFID application system real-time reliable is monitored label.
The present invention at present uses in my the ZXRIS ICAS of company gate control system.In ZXRIS ICAS gate control system, when reader carries out many label countings, label collision often occurring, to cause label event to report incomplete, make middleware report a large amount of different event informations in adjacent periods, will form the event message storm like this, the RFID application system is impacted, the RFID application system will be put in storage incident, and carry out applied logic and handle, application system was not used this method in the past, the RFID application system will be preserved a large amount of false incidents, and processing logic can not be inconsistent with actual conditions yet.After using the present invention, greatly improved the processing power of RFID application system to abnormal information, effect has also conformed to actual conditions, has also improved the real-time and the reliability of RFID application system simultaneously.
In addition, though the present invention now is applied to the RFID application system, its principle has ubiquity, and slightly modified extends to other related application systems.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.