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, 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 through 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 corresponding label of this DELETION information leaves sensing range; When receiving a CURRENT (in real time) reporting events, think that then the corresponding label of this CURRENT information also is in sensing range.The business logic processing module just can be judged the trend of label through 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 several successive check periodic report check 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, had influence on the processing of application system, and the treatment effeciency of using system caused had a strong impact on service logic.
Summary of the invention
The technical matters that the present invention will solve 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 present invention provides the disposal route of label event in a kind of radio frequency identification application system, representes to have on the fresh information when label event and gives the correct time, and carries out fresh information immediately and reports; When label event represented to have the removing information reporting, through the mode of buffer memory, deletion belonged to the redundant information of same label, removes information reporting again.
Further, said method comprises the steps:
(1) the incident extraction apparatus sends to the redundant information processor with label event change event message;
(2) said redundant information processor receives said event message, extracts the product electronic code EPC and the event type of this incident;
(3) when said 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 said event type is deletion during DELETION, judge whether this incident is to remove information reporting, 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 said step (3), when said 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 sends to the business logic processing module to this event message;
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 said step (3), when said 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 is for removing information reporting; 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 said step (3); When certain EPC incident was effective in the indication DELETION of the monitor incident pond, the redundant information processor reported 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 present invention provides the treating apparatus of label event in a kind of radio frequency identification application system, comprises incident extraction apparatus, redundant information processor, monitor;
Wherein, said incident extraction apparatus is used to receive label event, converts said label event into event message, sends to the redundant information processor;
Said redundant information processor is used for extracting the EPC and the event type of said this incident of event message, when said event type is ADDITION or CURRENT, judges whether this incident is that fresh information reports, if then report this event message; When said event type is DELETION, judge whether this incident is to remove information reporting, if, when this EPC incident of monitor indication is effective, report again then with this event message buffer memory;
Whether said monitor is used for monitoring the EPC incident of redundant information processor buffer memory, and be used to indicate said EPC incident effective.
Further, said 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, said 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 for removing information reporting, then adds DELETION incident pond with this incident, 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, said reader is used for giving middleware with the label counting information reporting, also comprises: incident extraction apparatus, redundant information processor, monitor;
Wherein, said incident extraction apparatus is used to receive the label event that middleware sends, and converts said label event into event message, sends to redundant information processor or business logic processing module;
Said redundant information processor is used for extracting the EPC and the event type of said this incident of event message; When said event type is ADDITION or CURRENT; Judge whether this incident is that fresh information reports, if then send to the business logic processing module to this event message; When said event type is DELETION, judge whether this incident is to remove information reporting, if, when this EPC incident of monitor indication is effective, send to the business logic processing module to this event message more then with this event message buffer memory;
Whether said monitor is used for monitoring the EPC incident of redundant information processor buffer memory, and be used to indicate said EPC incident effective.
Further, said 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 sends to the business logic processing module to this 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, said 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 for removing information reporting, then adds DELETION incident pond with this incident, 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 has 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; Possible deceptive information to reporting is observed, if deceptive information is just cleared up, does 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; When removing information reporting, utilize the caching mechanism of processor to fall the bulk redundancy information filtering of the same label that reports, finally be compressed into an information reporting.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.
Below in conjunction with accompanying drawing and specific embodiment the present invention is elaborated.
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, said reader is used to report label counting information;
Said middleware reports this label counting information the treating apparatus of label event as label event;
The treating apparatus of said label event comprises incident extraction apparatus, redundant information processor, monitor;
Said incident extraction apparatus is used to receive the label event that middleware sends; Convert said label event into event message that redundant information processor and business logic processing module can be understood, send to the redundant information processor or the business logic processing module is handled; When needs carry out the redundant information processing, said event message is sent to the redundant information processor, when need not the redundant information processing, said event message is sent to the business logic processing module; Wherein, can set by manual work whether needs carry out the redundant information processing according to the concrete condition of RFID application system;
Said redundant information processor is used to receive the event message that the incident extraction apparatus sends; Extract the EPC (Electronic Product Code, product electronic code) and the event type of this incident, when said event type is ADDITION or CURRENT; Judge whether this incident is that fresh information reports; If then send to the business logic processing module to this event message, otherwise do not send; When said event type is DELETION, judge whether this incident is to remove information reporting, if; Then with this event message buffer memory; When this EPC incident of indication of monitor is effective, send to the business logic processing module to this event message again, otherwise do not send;
Specifically, said redundant information processor comprises ADDITION incident pond and DELETION incident pond, and when said event type was ADDITION, the redundant information processor had following several kinds of processing modes:
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 sends to the business logic processing module to this event message;
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 said 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 sends to the business logic processing module to this event message; Like this, avoided the generation of label skip phenomenon;
When said event type was DELETION, the redundant information processor had following several kinds of processing modes:
If this EPC incident not in the ADDITION incident pond representes 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 for removing information reporting, then adds DELETION incident pond with this incident, 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; Said 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;
Said monitor is used for monitoring DELETION incident pond EPC incident time corresponding; When said 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; Said 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, said 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;
Said business logic processing module is used to receive and the event message of processing events extraction apparatus and redundant information processor transmission.
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; Said 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 converts said label event into event message that redundant information processor and business logic processing module can be understood;
Such as, can said label event be converted into 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 said event message, returns step 202;
Step 207, the incident extraction apparatus sends to the redundant information processor with said 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 said 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 sends to the business logic processing module to the event message of this EPC incident, 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 for removing information reporting, then adds DELETION incident pond with this incident, 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 is as shown in Figure 3, comprises the steps:
Step 301, the timer in monitor detection starting 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 said 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 carried out many label countings, label collision often occurring, to cause label event to report incomplete; Make middleware report a large amount of different events information 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, and 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 is applied to the RFID application system at present, its principle has ubiquity, and somewhat 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.