A query language for semantic complex event processing: Syntax, semantics and implementation
Semantic Web Journal
The field of Complex Event Processing (CEP) deals with the techniques and tools developed to efficiently process pattern-based queries over data streams. The Semantic Web, through its standards and technologies, is in constant pursuit to provide solutions for such paradigm while employing the RDF data model. The integration of Semantic Web technologies in this context can handle the heterogeneity, integration and interpretation of data streams at the semantic level. In this paper, we propose
... implement a new query language, called SPA , that extends SPARQL with new Semantic Complex Event Processing (SCEP) operators that can be evaluated over RDF graph-based events. The novelties of SPA include (i) the separation of general graph pattern matching constructs and temporal operators; (ii) the support for RDF graph-based events and multiple RDF graph streams; (iii) the expressibility of temporal operators such as Kleene+, conjunction, disjunction and event selection strategies; and (iv) the operators to integrate background information and streaming RDF graph streams. Hence, SPA enjoys good expressiveness compared with the existing solutions. Furthermore, we provide an efficient implementation of SPA using a non-deterministic automata (NFA) model for an efficient evaluation of the SPA queries. We provide the syntax and semantics of SPA and based on this, we show how it can be implemented in an efficient manner. Moreover, we also present an experimental evaluation of its performance, showing that it improves over state-of-the-art approaches. UC 4 (Stock Market Analytics) A stock market analytics platform processes financial transactions to detect the patterns that signify the emergence of profit opportunities [10, 8, 28] . Examples of such pattern are head-and-shoulders  , V-shaped [8,35], and Wshaped  patterns. From the set of these patterns, the head and shoulder pattern is defined as follows: A the left shoulder (increase in the stock price) that is formed by an uptrend; B detect the head being a peak higher than the left shoulder (one or more events); C the right shoulder that shows an increase but fails to take out the peak value of the head. Moreover, background KB containing the company related information, such as address, CEO, type, etc., can be joined with the matched events to extract the contextual information. UC 5 (Traffic Management) With the growing popularity of Internet of Things (IoT) technologies, more and more cities are leaning towards the initiative of smart cities to provide robust traffic management [36, 37] . A key use case in this context is to be proactive against the traffic jams due to an accident or a social event. Hence taking actions to keep the traffic jams as local as possible and stop its effect propagation to the main roads of the city  . A query for such use case would be: A If a road segment is congested followed by B (at least) one of its connected road segments is also congested then traffic should be directed to other directions. The information about the road segments' congestion is gathered from a set of streams, each from a sensor located at a road segment. Further contextual information such as the exact location of the sensors, the type of the road, etc., can be extracted from an static background KB.