<!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>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Fano Ramparany</string-name>
          <email>fano.ramparany@orange.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iago F. Trentin</string-name>
          <email>iagofelipetrentin@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Julien Cumin</string-name>
          <email>julien1.cumin@orange.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olivier Boissier</string-name>
          <email>olivier.boissier@emse.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Mines Saint-Etienne, Univ Clermont Auvergne, CNRS, UMR 6158 LIMOS, Institut Henri Fayol</institution>
          ,
          <addr-line>F - 42023 Saint-Etienne</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Orange Innovation</institution>
          ,
          <addr-line>28 chemin du Vieux Chêne, 38244 Meylan</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <abstract>
        <p>In this article, we introduce our work on using multi-agent technologies for implementing context aware services, for the benefit of urban communities. Our claim is that linked data and multi-agent technologies are key assets for enabling advanced context aware services for the benefit of users living in smart environments. To explore and assess our vision, we have developed a demonstrator that we also describe in this article. In our demonstrator, each house of a collaborative neighborhood is monitored by a dedicated agent, which exploits the content of the house context database. Such agents are able to reason on the current context and plan their actions accordingly. Their are also able to align their behaviour to features that are usually ascribed to human beings such as the ability to respect social rules and human values. The context database consists of a personal and private knowledge graph, that models the home context information.</p>
      </abstract>
      <kwd-group>
        <kwd>multi-agent systems</kwd>
        <kwd>linked data</kwd>
        <kwd>context aware services</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>When talking about smart homes, the qualifier of smart denotes that the home is instrumented
with connected sensors and actuators. These devices provide real time data about what is
going on in the home. By analysing these streams of data we can infer higher level context
information including the identity, location and activities of persons present. Thus, agent
technology will valorize this context information by providing more awareness to smart home
services. More precisely, software agents bring reasoning and collaboration capabilities, which
they intimately interwine with their autonomy, pro-activity, reactivity. In addition, they act as
intelligent assistants which enable people to make the best use of their home resources.</p>
      <p>Potential use cases we envision include resource sharing (e.g. tools and furniture loaning).
social interaction fostering (e.g. collaborative safety and security), opportunistic behaviours
(e.g. last minute car sharing).</p>
    </sec>
    <sec id="sec-2">
      <title>2. Implementation</title>
    </sec>
    <sec id="sec-3">
      <title>3. Use Case</title>
      <p>Figure 2 presents the prototype we have developped. It runs three deliberative home agents
which continuously analyze the context KG of their respective homes. Whenever one home
agent detects an intrusion, it triggers a plan which requests help from other home agents. If the
plan requires the police intervention, the home agent retrieves the police contact information
from the yellow page agent.</p>
      <p>Figure 3 depicts the behaviour of a home agent. It is presented using a finite state machine
formalism. The three home agents share the same behaviour and implementation. This ensures
a high level of consistency in the way these agents interact with each other. In this finite state
machine diagram, circles define agent states and diamonds define agent actions and decisions.
Upon external events that the agent is monitoring and depending on the agent’s own decision,
the agent state might change. States transitions are depicted as arrows that link initial states to
target states. A perpendicular segment in the middle of the arrow indicates that the transition
has been partly caused by an external event.</p>
      <p>Let us detail each states the home agent run through during its lifetime and the actions and
decisions it might make while being in each state:</p>
      <p>waiting state: At bootstrap, the home agent is waiting for any external event. In this state
there are two events it is sensitive to: A location event and a request for help from another
home agent. In case it receives a location event corresponding to a presence in the home, the
agent queries the Context Manager whether there are any known occupants in. In case the
answer is negative, it concludes that there is an intrusion and it triggers the corresponding plan,
otherwise, it stays in the waiting state as there is nothing to worry about. The SPARQL query
that the home agent submit to the Context Manager is:</p>
      <p>PREFIX sosa: &lt;http://www.w3.org/ns/sosa/&gt; PREFIX homein: &lt;http://orange.smart.home/HomeIn#&gt;
ASK WHERE {
?o1 sosa:resultTime ?maxt .
?o1 sosa:hasFeatureOfInterest ?x .
?o1 sosa:hasResult ?place .</p>
      <p>FILTER(?x != homein:unknown)
FILTER(?place != homein:outside)
{</p>
      <p>SELECT (MAX(?t) AS ?maxt) ?x WHERE {
?o a homein:LocationObservation .
?o sosa:hasFeatureOfInterest ?x .</p>
      <p>?o sosa:resultTime ?t .
} GROUP BY ?x }}</p>
      <p>Note that this SPARQL query contains and embbeded SELECT query, which purpose is to
retrieve the latest location observation for each person. Once done, it checks if that person is
known (i.e. is diferent from unknown) and in the home (i.e. in a place diferent from outside).
In case an intrusion has been detected, the agent launches the corresponding plan. In Jason the
plan is expressed as:
+onlyUnknownOccupantDetected : true
&lt;?name(Me);
.broadcast(achieve,pleaseGetHelpRequestFrom(Me));
-+state(waitingFeedback);
!!timer30000.</p>
      <p>As you can see, by executing this plan, the agent broadcasts a request for help. It then puts
itself in a waitingFeedback state, and sets up a timer, so that in absence of any feedback after 30
seconds, it will engage in an emergency backup plan that we don’t detail here. While in the
waiting state, if the home agent receives a request for help, it checks wether there is somebody
in. This is done by querying the Context Manager with a SPARQL query, similar to the previous
one. If the response is positive, the home agent informs the occupant present about the situation
and asks whether she/he is willing to help out in the safety operations. It then waits for the
occupant’s reply. If the reply is positive, it lets the breached home agent know which neighbor
is ready to help.</p>
      <p>waitingFeedback state: In that state, the agent is waiting for help proposals from other
home agents. As mentioned it waits for at most 30 seconds. If within these 30 seconds it receives
a proposal for help, it informs its occupants about the situation. As soon as both the occupants
of the breached house and the occupants that are willing to help out have been identified by
their respective home agents, they can establish a standard communication using their phone
to organize the home safety operations. The home agent then puts itself in the processing state.</p>
      <p>processing state: In this state, the occupants and the helpers are handling the situation. So
the home agent asks the home occupant to confirm that it can return to the waiting state, once
the situation has been made safe again.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion</title>
      <p>Let us highlight the main features of our prototype. As mentioned in section 3 our agents are
deliberative and informational. Our prototype involves four linked data sources. Three
of them provide context information of their respective home. The fourth one is the yellow
page agent which provides a directory service.</p>
      <p>As mentioned in section 2, the content of smart home context information is
heterogeous by nature. It contains information about people, information about equipment,
environmental information, etc. We use the KG formalism to manage this heterogeneity. In
addition, the content of home context graphs and the directory graph managed by the yellow
page agent use two diferent ontologies.</p>
      <p>Our agents have heterogeneous behaviours: whereas home agents are deliberative, the
yellow page agent is informational. However, through their interaction, they constitute a
inter-mediation layer for coping with the information heterogeneity mentioned earlier, as each
agent knows when and how to exploit its linked data source, and how to share it with other
agents.</p>
      <p>The home is equipped with connected sensors (thermometer, pressure sensors and other
environmental sensors) whose measurements are collected and processed to update the context
KG in real time. This enables the home agent to perform a timely context evaluation and quick
decision. This is essential in our collaborative security use case. In addition to this realtime
dynamicity, new furnitures, sensors, actuators and equipment, can be easily inserted in the
home environment at a longer term temporal granularity, say at a yearly rate. This insertion
will be done by simply adding new nodes and relations to the KG which correspond to new
instances of the ontologies classes and their relationship with existing nodes. New types of
devices can even be introduced by adding nodes corresponding to new classes to our ontology.
Agent could even be involved in this process by detecting objects they don’t recognize as a type
they know.</p>
      <p>In our prototype, the three home agents and yellow page agent form a community that
collaborate to ensure collective safety in the entire neighborhood through a form of social
interaction among agents. The breached home broadcasts a request for help to the other
homes, which will positively answer depending on who is present. Home agents eventually
submit critical decisions they make to occupants for final approval before the appropriate
actions are performed.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>H.</given-names>
            <surname>Rahimi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. F.</given-names>
            <surname>Trentin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ramparany</surname>
          </string-name>
          ,
          <string-name>
            <surname>O. Boissier,</surname>
          </string-name>
          <article-title>SMASH: a Semantic-enabled Multi-agent Approach for Self-adaptation of Human-centered IoT, 2021</article-title>
          . URL: https://hal-emse.ccsd.cnrs. fr/emse-03251346, submitted to PAAMS
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bordini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hübner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Santi</surname>
          </string-name>
          <article-title>, Multi-agent oriented programming with jacamo</article-title>
          ,
          <source>Science of Computer Programming</source>
          <volume>78</volume>
          (
          <year>2013</year>
          )
          <fpage>747</fpage>
          -
          <lpage>761</lpage>
          . URL: https://www. sciencedirect.com/science/article/pii/S016764231100181X. doi:h t t p s : / / d o i .
          <source>o r g / 1 0 . 1 0</source>
          <volume>1 6</volume>
          / j . s
          <source>c i c o . 2 0 1 1 . 1 0 . 0 0 4</source>
          , special section:
          <source>The Programming Languages track at the 26th ACM Symposium on Applied Computing (SAC</source>
          <year>2011</year>
          ) &amp;
          <article-title>Special section on Agent-oriented Design Methods and Programming Techniques for Distributed Computing in Dynamic and Complex Environments</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Seaborne</surname>
          </string-name>
          ,
          <year>2010</year>
          , Jena, a Semantic Web Framework, URL: http://wiki.apache.org/incubator/ JenaProposal.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Brickley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <source>FOAF Vocabulary Specification</source>
          <volume>0</volume>
          .97,
          <string-name>
            <surname>Namespace</surname>
            <given-names>document</given-names>
          </string-name>
          ,
          <source>FOAF Project</source>
          ,
          <year>2010</year>
          . URL: http://xmlns.com/foaf/spec/20100101.html.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>K.</given-names>
            <surname>Janowicz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Haller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. J. D.</given-names>
            <surname>Cox</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>Phuoc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lefrançois</surname>
          </string-name>
          ,
          <article-title>Sosa: A lightweight ontology for sensors, observations, samples, and actuators</article-title>
          ., CoRR abs/
          <year>1805</year>
          .09979 (
          <year>2018</year>
          ). URL: http://dblp.uni-trier.de/db/journals/corr/corr1805.html#abs-1805-09979.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F.</given-names>
            <surname>Ramparany</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q. H.</given-names>
            <surname>Cao</surname>
          </string-name>
          ,
          <article-title>A semantic approach to iot data aggregation and interpretation applied to home automation</article-title>
          ,
          <source>in: 2016 International Conference on Internet of Things and Applications (IOTA)</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>23</fpage>
          -
          <lpage>28</lpage>
          .
          <source>doi:1 0 . 1 1 0 9 / I O T A . 2</source>
          <volume>0 1 6 . 7 5 6 2 6 8 9 .</volume>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>