| Much raw data often collected in the RFID application systems, will make the business systems become abnormally complex, without good expansibility and flexibility, and can’t adapt to changing needs of the business, which directly deals with the massive primitive RFID data. RFID composite events detection is to convert a large number of original RFID data according to certain business rules to composite events with certain significance of business logic to drive the upper business system in event-driven way, which makes the business system decoupling from the original RFID data. This essay deeply studied the methods and models for detecting RFID composite events.This essay first expounded the present research development on RFID composite events detection, thoroughly studied some test methods and models, and pointed out the advantages and disadvantages of each. On this basis, this paper proposed the detection method of RFID composite events based on rules engine, and demonstrated its effectiveness and feasibility. Rete algorithm is now widely used in rules engine as a kind of rules matching algorithm, and its data structure is called Rete rules net. In order to make Rete algorithm apply to RFID composite events detection, the essay analyzed the characteristics of RFID events and the existing problems on Rete algorithm. According to the characteristics of RFID events, this essay proposed two improved mechanisms for Rete algorithm. First, we proposed a Rete garbage collection mechanism based on the life cycle of the partial matching, through which to delete expired partial matching results in the cache of Rete rules net, effectively reduced the pressure of cache. Second, considering the phenomenon that the caches of nodes in Rete rules net with a large number of rules are empty, we proposed a filtering mechanism based on the index of the cache state. By filtering the invalid connection test for the nodes whose caches are empty in advance, it effectively improved the match performance in Rete rule net.Finally, this essay introduced in detail the development of the two improved mechanisms in the rules system Drools, and the experiment results showed that the proposed improved Rete algorithm as the rules matching algorithm of rules engine can be effectively used in the detection of RFID composite events. |