Complex event processing (CEP) can extract meaningful events for real-time locating system (RTLS) applications. To identify complex event accurately in RTLS, we propose a new RFID complex event processing method GEEP, which is based on the timed automata (TA) theory. By devising RFID locating application into complex events, we model the timing diagram of RFID data streams based on the TA. We optimize the constraint of the event streams and propose a novel method to derive the constraint between objects, as well as the constraint between object and location. Experiments prove the proposed method reduces the cost of RFID complex event processing, and improves the efficiency of the RTLS.
In recent years, radio frequency identification (RFID) is more and more used in positioning, tracking and analysis system for moving objects. It reads the information of mobile tags within the effective range by fixed readers to identify and locate moving objects [
With the gradually increasing in RFID applications (such as network monitoring, supply chain management, and moving objects tracking, etc.) needing to handle large volumes of RFID data streams [
To solve problems which RFID for RTLS encounters in complex event processing, this paper proposes a method for RFID complex event processing based on timed automata theory, this method can make real-time process for complex events in RFID data streams.
David Luckham [
Present event definition language regards events as transient, although some events occur on a time period. They all use semantics based on detection. They can only detect occurrence of composite events by the end time of events, but cannot distinguish detection of events from occurrence of events. So they have significant limitations for those applications based on period semantic, for instance, in the detection of the timing events, operations in the events appear in different combinations will lead to inconsistent semantics.
The core issue of event-centric approach is complex event processing (Complex Event Processing, CEP), namely, how to efficiently make combination of primitive events to be complex events with more complex semantics, including considering the restrictions between various events, even in some applications need to continue to detect complex events to generate a higher level of complex events. The following methods are available: Finite Automata models, Petri Net models, Match Tree models and models based on graph [
Complex event system for data stream is mainly responsible for the detection of complex events, Primitive events can be connected to constitute a complex event by “logical” timing operator. A language used for filtering and associating events is needed for modeling complex events. Many papers have studied the complex event language, such as publish/subscribe [
To achieve the complex event language, we need the support of the data structure in the underlying language model. There are many researchers in different areas using different data structures, XML filtering, publish/order, active database extension. They can be divided into three categories: automata-based, Petrinet based, tree and graph-based approach. Altinel [
In SASE [
Simple automata model cannot re-access the event after match an atomic event, if you need to consider the relationship about time between the various atomic events; you need to introduce a new data structure to hold this information, we can add the time limit on the basis of the finite state automata [
The background of this paper is the RFID smart library system [
Based on event specification described above, we now define RFID event and event streams for RTLS.
Definition 1. Events and Event Streams. Events reflect the current states of real-time system or states of the object changes, including the time of the incident and event type. An event type set, an event is a tuple (E,t), for an RFID system, the event E = event
(tagID, readerID, timestamp), tagID is a label, readerID is a reader, the timestamp is the timestamp, in this, t is the timing of the events. A steady stream of events forms the event streams (event streams), the event stream ES defined on is an event sequence sorted by time, ES = (E1, t1), (E2, t2), ... (Es, ts), ..., where ti < tj (1 ≤ i < j ≤ s).
Definition 2. Primitive Event (PE). Primitive events in RFID system is the underlying event, it is a data exchange between readers and tags, primitive events are inseparable. The formal definition of PE = {Ei| ∈ Ei, by |Ei| = 1, the distance (PE) = 0, ti ≠ 0}.
Definition 3. Complex Event (CE). RFID complex events are senior events constructed by RFID primitive events. Formal definition for the CE = {Ei × Ej → E | ∈ Ei × Ej, |E| ≠ 1, interval (ei, ej)≠0}.
Event stream is a simplify form continuous event data. When the event handler receives inflow event data, it applies real-time application logic on event data to expert knowledge of the behavior inherent in the event data. In this paper, with RFID-based real-time location applications, we propose a complex event processing. RTSL application background is defined as follows:
Definition 4. The physical world:. Said a geographic area, where O is the set of objects, L is the set of predefined position, T is the ordered discrete-time domain, L is the collection of the pre-defines logical location, or (x,y,z) coordinates generated by positioning system.
Definition 5. Relationship. At time t, W’s state is embodied by the positional relationship set, a oi ∈ O appears in a li ∈ L, and there are constraints between the objects and object, the correspondence between the object and location.
Definition 6. Grid G. Known as the smallest unit of address space, denoted by G and G corresponds to a location li, is atomic.
Definition 7. Scenes S. We said address space unit corresponding to different levels called scenarios, denoted by S and S is constituted by the grid, that is G S, contains relationship exists between scenes.
When the object’s state changes (for example, into a region, to exit a certain area), or constraint relations between objects and objects are changed, the state of the scene will also change. In particular, the location of an object is unknown, if it does not appear in any of the predefined location, for example, passed between the two grids, or abnormal exit of the physical world.
The widespread deployment of the reader and other devices will generate a huge number of events, we need apply filtration and related association on these vast amounts of simple events, which in the semantic layer for end-user applications to detect more complex events, in order to achieve this purpose, we see these complex events as a continuous queries groups run on the simple events.
CEP language can make a detailed description of the event handling syntax and semantics, to make CEP engine easier to learn. CEP has designed a SQL extended language which supports continuous query to facilitate high-level application to submit their concern events. Here is a typical continuous event query:
The meaning of the above-mentioned continuous event query language is detection of library books without lawful to borrow to carry out from Museum. Detection of books on the theft is done by reading three specific RFID data streams readings: (1) taking books from the shelves; (2) didn’t apply for borrowing procedures at librarian (or at the self-charging place); (3) book information is captured by Museum access system when getting out of Museum. EVENT clause DATA STREAM defined readings of the three data streams, WHERE clause specified assertion of events occurring based on multiple abovementioned readings, in this case only if the same label appears in three RFID flows we confirm that detection event happens, we need restrict the primitive events streams through a special mechanism. Timed automata introduced by time constraints based on a finite state machine, to describe location changes of the RTLS.
Timed Automata adds time constraints on finite automata, which can handle real-time system. Timed Automata uses a finite number of variables to represent the time, referred to as the time variable. It adds a constraint to annotate the state transition diagram, position migration in timed automata has clocked constraints, only when the clock constraint conditions are met, and the location migration can be carried out.
Definition 8. Timed Automata (TA). TA is a six-tuple: Σ is a finite marker set; S is a finite set of states; s0∈S is the initial set of states; X is a finite set of clocks, each element can be expressed with the x, y, and z symbols; I said mapping, specify clock constraints in Φ(X) to S, that is I(s):; E is a convert set; a transition said an edge about event e from location s to location,; collection give the clock reset in the, this conversion to λ which is a subset of, represents the clock interpretation: for each
, , and for each,
; Φ is an clock constraints on X specify when state transition occurs, to a clock variable finite set X, an X clock interpretation is a mapping v: X→T, it allocates each clock a time value. Semantic of timed automata is defined by a conversion system STA, which associated with it. A state of STA is a tuple (s,v), s is a TA position, v is a clock interpretation of X, and v satisfy the mapping I(s). The set of all states of TA is expressed QTA. If an initial position of the TA and v(x) = 0, then the state (v,x) is an initial state.
There are two types of conversion in STA:
1. Time migration. For a state (s,v) and a real-valued time increment δ ≥ 0, if, all met the mapping I(s).
2. Location migration. To (s,v) and, if v satisfy.
Time migration, said the passage of time in a node, the location migration said the position conversion between the nodes if the constraint conditions are met. Migration is divided into strong and weak, strong migration on behalf of detection events and the next event is a partial order, expressed with a solid line; weak migration on behalf of detection events and the next event is ordering relation, expressed with the dashed line.
When RFID Reader of RTLS reads the temporal and spatial information data, it requests the data values can reflect the current state of the real world; we need a consistent mechanism to ensure the time consistency of spatial data.
In order to derive the probable location of the object and probably contains relationship, we refer Timed Automata [
The edge set E packet the possible constraint relations between objects, the edge oi → oj, express oj contains oi, (for example, bookcase containing layer, layer contains books) ,we allows each node to have multiple input and output side on behalf of the shelves can contain multiple books, one book could appear in many shelves. We allow the merger of the colored and uncolored nodes. An edge cannot link two nodes of different colors. That is not allowed objects which stay in two different locations establish constraint relationship.
To support the derivation, this time figure also comes with statistics information, each edge maintains a bit vector recording the last arrangement information of two objects. When two points linked by an edge assigned the same color, we set the corresponding bit value. Each node records statistical information of the parent node, or to use probabilistic methods [
Time is divided into time slices, each time slice corresponds to a moment, in each moment algorithm uses time graph G before that and generates a new graph G* with the readings set Rk, we allocate clock for each conversion, using automatic machine to move from one state to another state, if the time for the introduction of the event to meet the time constraints, we will assign time value to each conversion. After each migration (transformation), the time graph will reset the time, that is, reset the clock. The system should be able to control the redistribution of the clock in the time diagram. RFID data streams timing diagram is shown in
Update algorithm of data stream timing diagram meets the request—“one pass”, that is, when each reading arrives we update map by increment, and to ensure that at some point the graph G* consistent with the readings from all readers, the update process of graph is divided into three steps:
If the new object was first observed, then create a new node in the graph; for each observed object, using the observed color of the reader to color the corresponding node, objects not observed cannot be updated. At the same time update statistics of the edge which at least is a node colored.
If the two nodes of the adjacent layers have the same color, if there is no edge, then add an edge between the two nodes, thus enumerate all of the constraints (for ex-
ample, slash-filled books can be included in the slashfilled book cart), moment t ②→⑤ in
If the nodes of an edge are assigned different colors that objects in the same location previously are in different positions according to the latest arrival of the readings, this edge will be removed from
Complexity analysis of algorithm: in time t, reading set is Rt, cost for updating the node is less than |Rt|; each reader reading set is Rtk , cost of adding edge for adjacent node in the same location is less than, updating cost of set of edges G to be updated is
.
In order to test the performance of the GEEP, RFID equipment is deployed in a real library environment, including readers (902 - 928 MHz), labels, number of samples is 1000 books, 20 bookshelves, shelves with tags, each bookshelf with 8 layer tags, the books are contained in a layer. The test range is 100 M2.
The data acquisition server configuration: Pentium 4 3.0 G/1 G/100 G, event handling server configuration Pentium Core Duo, 1.8 G/2 G/100 G.
Contrasting with event detection engine achieved by the Microsoft RFID middleware BizTalk, we record reading which randomly assigned to books in the process of moving and contrast that with the actual location of the books to test the infer accuracy of GEEP.
The experimental results were shown in
To simulate automatic inventory scenarios, we deploy some fixed reader in proper locations to detect books unreasonable move events. The specific process is to remove a book from a bookcase on a layer, move to the other shelves and insert the corresponding layer, then identify if the moving event is reasonable.