<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Context Management in Event Marketplaces</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yiannis Verginadis</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ioannis Patiniotakis</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nikos Papageorgiou</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dimitris Apostolou</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gregoris Mentzas</string-name>
          <email>gmentzas@mail.ntua.gr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nenad Stojanovic</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>FZI Forschungszentrum Informatik</institution>
          ,
          <addr-line>Karlsruhe</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Communications and Computer Systems, National Technical University of Athens</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper refers to methods and tools for enabling context detection and management based on events. We propose a context model that builds on top of previous efforts and we give details about the mechanisms developed for context detection in event marketplaces. In addition, we show how simple or complex events can be used in combination with external services in order to derive higher level context with the use of Situation-Action-Networks (SANs). Specifically, we present two different approaches, one for detecting low level context and another one for deriving higher-level contextual information using SANs. We present an illustrative scenario for demonstrating the process of specialization of our generic context model and its instantiation based on realtime events.</p>
      </abstract>
      <kwd-group>
        <kwd>Context</kwd>
        <kwd>Event Marketplace</kwd>
        <kwd>Detecting Context</kwd>
        <kwd>Deriving Context</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Context is “any information that can be used to characterize the situation of an entity,
i.e., a person, place, or object that is considered relevant to the interaction between a
user and an application, including the user and applications themselves.” [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Context
detection is considered important in the so-called event marketplaces [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] (see e.g.,
http://pachube.com, a platform offering a service based architecture, a range of
graphing and visualization tools, event detection via triggers, along with
costeffective data storage) for enhancing the user's experience when interacting with the
event marketplace.
      </p>
      <p>
        Events from event marketplaces are an important source of context for
servicebased applications that consume them because they may convey important
information, which is relevant for service execution and adaptation. To achieve the
goal of injecting event processing results to context, an event-based context model is
needed along with context detection and derivation mechanisms. In previous work [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
Situation-Action-Networks have been proposed as a hierarchical goal-directed
modeling approach comprising nodes with specific semantics used to model goal
decompositions, enriched with flow control capabilities. SANs provide means to
decompose goals into subgoals and capabilities for seeking and achieving the
highlevel goals, involving situations (i.e. complex event patterns), context conditions and
actions.
      </p>
      <p>The simplest SAN possible is a two level tree with a parent (root) node and three
child nodes, each of them having specific semantics. A parent node models the Goal
sought. The leftmost child node describes a situation that must occur, in order to start
goal seeking. The middle child node corresponds to context update and requires that a
specific contextual condition is true before continuing with the SAN traversal. The
rightmost child node specifies the action to be taken in order to fulfil the goal.
Rightmost node can also be a sub-goal node with its own three child nodes, or it can
even be a construct joining several sub-goals in sequence or in parallel. As the SAN
becomes more complex, involving several subgoals (Figure 1), it deepens and reveals
its hierarchical and goal-directed characteristics. In this work, SANs are extended so
that they can be used for detecting and deriving context from events.</p>
      <p>This paper continues with a discussion about related work in the domain of
eventbased context management, while in section 3 it presents a generic context model that
is considered appropriate for the needs of event marketplaces. In section 4, we
consider two different approaches, one for detecting low level context and another
one for deriving higher-level contextual information using SANs. In section 5, we
show how the generic context model can be specialized so that it can be instantiated
to support an example scenario. We conclude in section 6 with a summary of our
event-based context management approach.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Related Work</title>
      <p>
        Context-awareness in service-oriented systems refers to the capability of a service or
service-based application to be aware of its physical environment or situation and to
respond proactively and intelligently based on such awareness; see e.g. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Through
the use of context, a new generation of service-based applications is expected to arise
for the benefit of coping with the dynamic nature of the Internet; see e.g. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. To
reflect the varying nature of context and to ensure a universal applicability of
contextaware systems, context is typically represented at different levels of abstraction [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
At the first level of raw context sources there are context data coming from sensor
devices, or user applications. At the next levels, context is represented using
abstraction approaches of varying complexity. The work in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] reviews models of
context that range from key-value models, to mark-up schemes, graphical models,
object-oriented models, logic-based models and ontology-based models. In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] an
ontological model of the W4H classification for context was proposed. The W4H
ontology provides a set of general classes, properties, and relations exploiting the five
semantic dimensions: identity (who), location (where), time (when), activity (what)
and device profiles (how). The five dimensions of context have been also pointed out
earlier in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] where it was stated that context should include the ‘five W’: Who,
What, Where, When, and Why.
      </p>
      <p>
        Our work focuses on detecting context changes which correspond to either atomic
or complex events and use complex event processing to model and identify them.
Similarly to [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], we focus on events as a source of context because they are snippets
of the past activities; therefore event processing may be viewed as a context detecting
technology. Event processing results may be transferred to other applications,
injecting context related information into services and processes. Based on the context
definition of Dey and Abowd [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and the associated five dimensions of context
expressed in ontological model of the W4H [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], we define a high-level context model
following an object-based modelling approach which can be easily specialized for
different applications. We use semantic querying to extract contextual information
from event payloads. Moreover, we exploit the reasoning capabilities of
SituationAction- Networks to enable dynamic derivation of context from multiple event
streams and external services.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3 Context Model</title>
      <p>
        We propose a context model as a stepping stone for facilitating event-based context
detection and derivation functionality, in order to better understand situations in
dynamic service oriented environments that demand for new additional information
sources or/and lead to a number of service adaptations as means for successfully
coping with dynamic environmental changes. In order to achieve the goal of
extracting contextual information, analyzing them and then deriving higher level
context, we follow an event-based context modelling approach. In this section, we
present such a Context Model (Figure 2), expressed in UML 2.0 class diagram. This
model is based on the W4H model [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] that describes the five main elements
associated within a context; the five elements are arranged into a quintuple (When,
What, Where, Who, How).
      </p>
      <p>
        This Context Model expresses the temporal (i.e. When), spatial (i.e. Where),
declarative (i.e. Who, What) and explanatory (i.e. How) dimensions of context having
as central point of focus the notion of Entity. We refer to either physical or virtual
entities with specific profiles and preferences that characterise them (e.g. vessel, port
authority information system etc.). This way context obtains substance around the
notion of an entity which can be a customer of an event marketplace system. The
context class in our model constitutes the aggregation of several different context
elements that may refer to five dimensions of context. Each Context element can have
a value that can be acquired from the situation node of a SAN and/or a derived value
that arises from any kind of reasoning process or call of external services. All context
related information can be captured as objects which can store either a single scalar
value or multiple values such as vectors, sets, lists etc. As any of the available context
models [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], our model needs to become domain or application specific in order to be
useful. Next, we show how SAN Editor can be used to specialize and instantiate the
generic context model.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Event-based Context Management</title>
      <p>In our context modelling approach and implementation, we consider entities as being
able to own SAN trees. The scope of context elements is distinguished into three
levels: “Local”: Context elements can be updated and used only by a specific SAN
instance. “Entity”: Context elements can be updated and used by any of the SANs
owned by the same entity. “Global”: Context elements can be updated and used by all
SANs independently to which entity they belong to.</p>
      <p>Using the SAN Editor, we can perform context model specializations based on the
application scenario and can formulate the necessary queries to events for extracting
contextual information. We provide two approaches for acquiring context from simple
or complex events and instantiating our context model. Both approaches use the SAN
Editor for:
1. defining SPARQL queries to specific RDF event payload information that can
update the values of an entity’s context elements; and
2. defining SANs that can use information from several event streams, analyse them
and/or combine them with external services, in order to update the derived values
of context elements. In this way, we succeed in acquiring higher level context
compared to the lower level information that events carry.</p>
      <p>The application of both approaches is presented in the following section through
the marine vessel traffic illustrative scenario, which uses events related to marine
traffic control that can be used to detect potentially dangerous vessel movements
informing a controller when two vessels are approaching each other.</p>
    </sec>
    <sec id="sec-5">
      <title>5 Illustrative Scenario</title>
      <p>A vast amount of real time events are available from portals connected to automatic
identification systems (AIS) that contain important vessel information worldwide
(e.g., speed, course, vessel type, wind conditions etc.) and the several different
users/authorities that might be interested in them. In order to exploit efficiently all
these information in an automated way we use our context model and present how it
can be specialized for the specific application domain while we give a glimpse to its
possible run time instantiations.</p>
      <p>Context Model Specialization: Our context model needs to become application
specific in order to be useful. In this section, we focus on context model specialisation
which pertains the definition of entities along with their context elements necessary
for capturing the context in terms of a specific application scenario. We use the
marine vessel traffic scenario which is related to vessel and marine traffic control
observing systems.</p>
      <p>In this scenario, we consider the entity Port Authority as the owner of all SANs
discussed below while the entity of interest is the Vessel. In order to capture
contextual information related to Vessels’ context, we have defined the following
Context Elements that shape the specialization of our context model: Speed, Course,
Position, Status, Distance2Port.</p>
      <p>In Figure 3, the reader can find the complete list of the five context elements
associated with the Vessel entity, specialising the context model for the marine vessel
traffic scenario, using the SAN editor. This model specialisation will be instantiated at
run time through the context detection and derivation approaches that are presented in
the following sections.</p>
      <p>Detecting Context: In this section, we discuss our first approach for acquiring
context from simple or complex events and instantiating our context model. Using
SAN Editor, we are able to define SPARQL queries to specific event payload
information that update the values of an entity’s context elements. As we show in the
following figure 3 during our experiment we received events regarding a specific
vessel called “Risoluto”. Details regarding the entity such as profile information
automatically update the context of this entity based on the detected events in the
situation node of a SAN.</p>
      <p>Figure 4 depicts a screenshot of SAN editor with the required SPARQL queries for
instantiating the “Position” context element of the vessel entity (Latitude/Longitude).
Specifically, we query the vessel entity event payload with respect to the “LatLon”
information. Similarly, other queries are used in the editor regarding the “Speed” and
“Course” context elements and refer to event=based detection of low level context.</p>
      <p>Deriving Context using SANs: Our second approach that we apply for extracting
context from simple or complex events and instantiating our context model using
SANs. We define a number of SANs that can use information from several event
streams and combine them with external services in order to update the derived value
class of context elements. In this way, we succeed in acquiring higher level context
compared to the lower level information that events carry.</p>
      <p>This context derivation can be complex and may involve multi-level SANs. Figure
1 shows a SAN that upon traversal will be able to update the derived value class of
the Status context element. Specifically, the status of the vessel becomes “Docked”
whenever we detect a vessel that has been stopped and its distance from any port is
close to zero or “UnderWay” whenever vessel’s speed is close to average and “In
Danger” when the system realizes that the vessel has almost stopped (away from any
port) and strong winds are blowing from the side. Figure 5 is a screenshot of the
runtime execution of the specific SAN for deriving the vessel’s status. A pop up alert has
been added in order to better demonstrate the context derivation regarding the Status
context element.</p>
    </sec>
    <sec id="sec-6">
      <title>6 Conclusions</title>
      <p>In this paper we presented methods and tools for enhancing context detection and
management based on events. This proposed context management approach presented
here is considered appropriate for the needs of event marketplaces. We described a
Context Model that was used by the developed mechanisms for performing
eventbased context detection and presented two different approaches for detecting low
level context (using SAN Editor) and deriving higher-level contextual information
using Situation-Action-Networks (SANs). We provided with a meaningful context
model specialization and demonstrated how simple or complex events coming from
an event marketplace can be used and combined with external services, in order to
derive higher level context with the use of SANs.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgment</title>
      <p>This work has been partially funded by the European Commission under project
PLAY (Grant FP7-258659). The authors would like to thank the project partners for
their advices and comments regarding this work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Dey</surname>
            ,
            <given-names>AK</given-names>
          </string-name>
          &amp; Abowd,
          <string-name>
            <surname>GD</surname>
          </string-name>
          :
          <article-title>Towards a Better Understanding of Context and ContextAwareness</article-title>
          ,
          <source>In Proceedings of the PrCHI 2000 Workshop on the What</source>
          , Who, Where, When, and How of Context-Awareness, pp.
          <fpage>304</fpage>
          -
          <lpage>307</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Stühmer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Stojanovic</surname>
          </string-name>
          , N.:
          <article-title>Large-scale, situation-driven and quality-aware event marketplace: the concept, challenges and opportunities</article-title>
          .
          <source>In Proceedings of the 5th ACM international conference on Distributed event-based system, NY, USA</source>
          ,
          <fpage>403</fpage>
          -
          <lpage>40</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Verginadis</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patiniotakis</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papageorgiou</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stuehmer</surname>
          </string-name>
          , R.:
          <article-title>Service Adaptation Recommender in the Event Marketplace: Conceptual</article-title>
          <string-name>
            <given-names>View. R.</given-names>
            <surname>Garcia-Castro</surname>
          </string-name>
          et al. (Eds.):
          <article-title>ESWC 2011 Workshops</article-title>
          , LNCS
          <volume>7117</volume>
          , pp.
          <fpage>194</fpage>
          --
          <lpage>201</lpage>
          . Springer, Heidelberg (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Abowd</surname>
            ,
            <given-names>GD</given-names>
          </string-name>
          , Ebling,
          <string-name>
            <surname>M</surname>
          </string-name>
          , Hunt,
          <string-name>
            <surname>G</surname>
          </string-name>
          , Lei,
          <string-name>
            <surname>H</surname>
          </string-name>
          &amp; Gellersen,
          <string-name>
            <given-names>HW</given-names>
            :
            <surname>Context-Aware</surname>
          </string-name>
          <string-name>
            <surname>Computing</surname>
          </string-name>
          ,
          <source>IEEE Pervasive Computing</source>
          , Vol
          <volume>1</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>3</given-names>
          </string-name>
          , pp.
          <fpage>22</fpage>
          -
          <lpage>23</lpage>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Sheng</surname>
            ,
            <given-names>QZ</given-names>
          </string-name>
          , Nambiar,
          <string-name>
            <surname>U</surname>
          </string-name>
          , Sheth,
          <string-name>
            <surname>AP</surname>
          </string-name>
          , Srivastava,
          <string-name>
            <given-names>B</given-names>
            ,
            <surname>Maamar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z</given-names>
            &amp;
            <surname>Elnaffar</surname>
          </string-name>
          <string-name>
            <surname>S</surname>
          </string-name>
          : WS3: international workshop on context
          <article-title>-enabled source and service selection, integration and adaptation</article-title>
          ,
          <source>In Proceedings of the International Workshop on Context enabled Source and Service Selection, Integration and Adaptation</source>
          , Beijing, China, pp
          <fpage>1263</fpage>
          -
          <lpage>1264</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Sheng</surname>
            ,
            <given-names>QZ</given-names>
          </string-name>
          , Yu,
          <string-name>
            <given-names>J</given-names>
            &amp;
            <surname>Dustdar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S: Enabling</given-names>
            <surname>Context-Aware Web</surname>
          </string-name>
          Services: Methods, Architectures, and
          <string-name>
            <surname>Technologies</surname>
          </string-name>
          , 1st ed.,
          <source>Chapman</source>
          and Hall/CRC (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Luther</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fukazawa</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wagner</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kurakake</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Situational reasoning for taskoriented mobile service recommendation</article-title>
          .
          <source>The Knowledge Engineering Review</source>
          <volume>23</volume>
          (
          <issue>01</issue>
          ),
          <fpage>7</fpage>
          -
          <lpage>19</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Bettini</surname>
            ,
            <given-names>C</given-names>
          </string-name>
          , Brdiczka,
          <string-name>
            <given-names>O</given-names>
            ,
            <surname>Henricksen</surname>
          </string-name>
          ,
          <string-name>
            <surname>K</surname>
          </string-name>
          , Indulska,
          <string-name>
            <given-names>J</given-names>
            ,
            <surname>Nicklas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D</given-names>
            ,
            <surname>Ranganathan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            &amp;
            <surname>Riboni</surname>
          </string-name>
          ,
          <string-name>
            <surname>D:</surname>
          </string-name>
          <article-title>A survey of context modelling and reasoning techniques</article-title>
          ,
          <source>Pervasive and Mobile Computing</source>
          , Vol.
          <volume>6</volume>
          , Issue 2, pp.
          <fpage>161</fpage>
          -
          <lpage>180</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Truong</surname>
            ,
            <given-names>HL</given-names>
          </string-name>
          , Manzoor,
          <string-name>
            <given-names>A</given-names>
            &amp;
            <surname>Dustdar</surname>
          </string-name>
          ,
          <string-name>
            <surname>S:</surname>
          </string-name>
          <article-title>On modeling, collecting and utilizing context information for disaster responses in pervasive environments</article-title>
          ,
          <source>In Proceedings of the 1st int. workshop on Context-aware software technology and applications</source>
          , pp.
          <fpage>25</fpage>
          -
          <lpage>28</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Abowd</surname>
            ,
            <given-names>GD</given-names>
          </string-name>
          &amp;
          <string-name>
            <surname>Mynatt</surname>
            <given-names>E.D.</given-names>
          </string-name>
          :
          <article-title>Charting past, present, and future research in ubiquitous computing</article-title>
          ,
          <source>ACM Transactions on Computer-Human Interaction</source>
          , Vol.
          <volume>7</volume>
          , Issue 1, pp.
          <fpage>29</fpage>
          -
          <lpage>58</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Etzion</surname>
            ,
            <given-names>O</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Skarbovsky</surname>
            ,
            <given-names>I</given-names>
          </string-name>
          , Magid,
          <string-name>
            <surname>Y</surname>
          </string-name>
          , Zolotorevsky,
          <string-name>
            <given-names>N</given-names>
            , &amp;
            <surname>Rabinovich</surname>
          </string-name>
          ,
          <string-name>
            <surname>E:</surname>
          </string-name>
          <article-title>Context Aware Computing and its utilization in event-based systems</article-title>
          , Tutorial presented in DEBS, Cambridge, UK (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>