Abstract
Event definitions in Complex Event Processing (CEP) systems are constrained by the expressiveness of each system's language. Some systems allow the definition of instantaneous complex events, while others allow the definition of durative complex events. While there are exceptions that offer both options, they often lack interval relations such as those specified by Allen's interval algebra. In this paper, we propose a new logic-based temporal phenomena definition language, specifically tailored for CEP, that allows the representation of both instantaneous and durative phenomena and the temporal relations between them. Moreover, we demonstrate the expressiveness of our proposed language by employing a maritime use case where we define maritime events of interest. Finally, we analyze the execution semantics of our proposed language for stream processing and introduce the 'Phenesthe' implementation prototype.
Introduction
In the domain of Complex Event Processing (CEP), the ability to identify meaningful patterns within high-velocity data streams is paramount. Applications ranging from financial fraud detection to maritime surveillance rely on the timely recognition of events. However, a significant challenge persists: the "expressiveness gap" between different temporal models. Most existing CEP languages are either point-based, focusing on instantaneous occurrences, or interval-based, focusing on states that persist over time. Real-world activities, however, are rarely confined to a single model. This paper introduces a unified logic-based language designed to bridge this gap by integrating instantaneous events and durative states within a single framework.
The Expressiveness Gap in Temporal Processing
Traditional CEP systems typically fall into one of two categories. Point-based systems excel at detecting discrete events—for example, a sensor reaching a specific threshold at a precise millisecond. Conversely, interval-based systems are designed to track states, such as a machine being in an "overheating" state for twenty minutes.
The limitation arises when a system needs to reason about the relationship between these two types of phenomena. To understand a complex activity like a "fishing trip," a system must reconcile instantaneous events (e.g., leaving a port) with durative states (e.g., trawling in a specific zone). Furthermore, many frameworks lack the formal interval relations—such as overlaps, during, or meets—defined by Allen’s interval algebra, which are essential for describing sophisticated temporal patterns.
A Unified Temporal Language
To address these limitations, we propose a formal language structured around three tiers of phenomena:
- Instantaneous ($\Phi^\bullet$): Events occurring at a single timestamp.
- Durative and Disjoint ($\Phi^-$): States that hold over maximal, non-overlapping intervals. An example is a "Stopped" state, which persists until the vessel begins moving again.
- Dynamic ($\Phi^=$): Complex phenomena that can overlap and are defined using the seven basic relations of Allen’s interval algebra.
A key technical innovation in this language is the Maximal Range Operator ($\rightarrowtail$). This logic tool defines a state that begins with one event and concludes with another, effectively implementing the "law of inertia"—the principle that a state continues until a specific event changes it.
Maritime Case Study: The Fishing Trip
The expressiveness of the proposed language is demonstrated through a Maritime Situational Awareness use case using Automatic Identification System (AIS) data. AIS provides timestamped GPS, speed, and identity information for vessels.
The challenge lies in formalizing a "Fishing Trip." This is not a single event but a complex dynamic phenomenon. It requires tracking a vessel as it:
- Departs from a port (Instantaneous).
- Travels at a specific speed (Durative).
- Enters a designated fishing zone (Durative/Dynamic).
- Eventually returns to a port (Instantaneous).
By utilizing the proposed hierarchy, we can define the "Fishing Trip" as a single dynamic temporal phenomenon that accounts for overlapping states and sequential transitions, a feat difficult to achieve in standard CEP languages.
Implementation and Execution Semantics
The language is implemented in Phenesthe, an open-source prototype written in Prolog. To ensure the system can handle real-time data streams, we developed specific execution semantics:
- Sliding Window Mechanics: The system uses a sliding window of memory to process data efficiently. We introduced an algorithm to distinguish between "redundant" data (which can be safely deleted) and "incomplete" intervals.
- Handling Uncertainty: The logic explicitly accounts for "incomplete" intervals—where a state has started but not yet ended—ensuring the system does not make false assumptions during processing.
- Topological Evaluation: By treating event definitions as a Directed Acyclic Graph (DAG), Phenesthe ensures that low-level events are processed before the high-level complex events that depend on them.
Conclusion and Future Work
This research provides a rigorous framework for combining point-based and interval-based temporal reasoning. By successfully formalizing complex activities like maritime fishing trips, we demonstrate that a hybrid logic is essential for modern CEP applications.
While the logic is sound and the Phenesthe prototype is functional, future work will focus on large-scale scalability studies using massive real-world datasets. Additionally, we aim to explore Process Mining to automatically discover temporal patterns, reducing the need for manual rule definition by experts.
Summary updated