At the rule-node level, the resultant rules are transformed to a SPARQL query.
7 SPARQL enables the fast
querying of PIM items corresponding to the registered events. More details on the RN generator and
the SPARQL transformation have been published in
the paper by Debattista, Scerri, Rivera, and Handschuh (2013).
Checking Events Against the Rule Network
With each event perceived by the personal sensor
network, a new entry is broadcast to the RN. This
includes the event’s resource type (for example, Person, Document), the event operation (for example,
person is nearby, document modified), a time stamp,
and a pointer to the PIM location where the resource
is stored (with the exception of items that have just
been deleted). The latter is crucial since it enables a
context-aware system to locate the item in the case of
actions that require its manipulation, for example,
changing the person’s trust level, and others.
The lifetime of an event is regulated so that the RN
is filtered only based on the latest events. We adopt
the consumption mode, maximum event lifetime,
and time-based windows techniques from the paper
by Walzer, Breddin, and Groch (2008). The first
retains the most recent events in a join node; the second expires them after a predefined maximum
amount of time; the third expires events after a predefined time window based on their type (refer to the
DCON validity property described earlier). In addition, a garbage collection service discards expired
partial results stored in the join nodes, for example,
context-dependent events registered in the live context following a further change (for example, a registered nearby person is no longer detected).
The RN processing algorithm, fully described by
Debattista, Scerri, Rivera, and Handschuh (2013),
checks for rule activation with each perceived event.
Candidate rules are filtered (PL) using the K-shortest
path algorithm (Yen 1971). The algorithm discovers
common subpaths (Cp), thus reducing the number of
PIM queries required. It iterates through the set of
ordered paths, executing queries stored in the rule
nodes. If a path has a join node, the list of shortest
paths is checked for the first ordered input. If a query
returns a result, a rule has been triggered. Since rules
sharing the same condition are represented by the
same branch in the network, when a condition is
matched, all other paths are excluded from further
In the paper by Debattista, Scerri, Rivera, and
Handschuh (2013), a network-based event processor
was compared to a sequential approach. Results show
that the RN is still initialized within an acceptable
time-frame (~ 760 milliseconds for 50 rules). It also
performs much better than the alternative, taking the
same amount of time (< 1. 5 milliseconds) to process
rules having between 1–16 distinct event types. A
load test indicates that this event processor can
process 100 parallel events (which is within the
bounds of the envisaged use) in less than 0.1 sec-
onds, with up to 10,000 events being consumed and
processed in around 2 seconds.
A contribution of the Digital.Me project, the di.me
userware8 is a context-aware personal information
management system that targets scattered data from
multiple personal devices and online accounts. The
userware is a proof of concept for the context-aware
models and technology presented in this article since
it employs the described ontologies, context-match-
ing, and event processing techniques.
The decentralized di.me architecture (Thiel et al.
2012) enables peer-to-peer sharing of distributed personal information. Each person in the di.me network
owns a personal server containing his or her PIM representation. Figure 3 shows a simplified version of
the architecture, focusing on components that
enable its ontology-driven context-aware features.
An information extractor extracts information from
the registered personal sources. This information is
semantically lifted onto the ontologies, and the
PIMO service stores the result in a PIM graph containing time-independent descriptions of various
PIM items. A Context Listener is responsible for registering all context changes from the personal sensor
network, streaming them onto the PIMO service to
update the centralized live context graph. The context listener applies the described technique for situation matching and adaptation. On system initial-ization, the event processor (EP) generates a rule
network based on the stored DRMO rules. With each
event registered by the PIM and live context graphs,
the EP filters the rules to determine if any one of
them has been satisfied, upon which the corresponding action(s) is retrieved and executed.
The di.me userware employs a user interface (
Scerri et al. 2013) that enables people with basic computer proficiency to make full use of the powerful
features described in this article. Complex ontological knowledge is abstracted between various UI items
corresponding to different PIM items, DCON elements, and their various attributes. As described in
the following paragraphs, these enable the customization and visualization of personalized situations and context-driven rules. Videos demonstrating the described functionality (among others) are
also available online.
Situation Suggestion and Visualization
Personal situations can be saved through a button in
the main UI dashboard. Saved situations are identified by personal labels (for example, Working@
Office). On saving, context elements registered by
the live context are automatically added to the situ-