=Paper= {{Paper |id=Vol-1867/w19 |storemode=property |title= SMARTSAN: A P2P Social Agent Network for Generating Recommendations in a Smart City Environment |pdfUrl=https://ceur-ws.org/Vol-1867/w19.pdf |volume=Vol-1867 |authors=Antonello Comi,Domenico Rosaci |dblpUrl=https://dblp.org/rec/conf/woa/ComiR17 }} == SMARTSAN: A P2P Social Agent Network for Generating Recommendations in a Smart City Environment== https://ceur-ws.org/Vol-1867/w19.pdf
                                                                    108
                                                                                                                                         1




      SMARTSAN: A P2P Social Agent Network for
       Generating Recommendations in a Smart City
                      Environment
                                                Antonello Comi†
†
  DIIES, University Mediterranea of Reggio Calabria, Via Graziella, Località Feo di Vito, 89122 Reggio Calabria,
                                         Italy, antonello.comi@unirc.it
                                                Domenico Rosaci†
†
  DIIES, University Mediterranea of Reggio Calabria, Via Graziella, Località Feo di Vito, 89122 Reggio Calabria,
                                        Italy, domenico.rosaci@unirc.it



   Abstract—The rapid advances of the Internet of Things (IoT)           with high levels of effectiveness and efficiency [3]–[5]. In
has implied that new kind of social networks are becoming                particular, if the agents are provided with social capabilities,
pervasive, and the use of the multi-agent technology has been            making them able of establishing interactions between each
recognized to have a key role in designing distributed software
architecture capable of implementing autonomous, adaptive and            others, there is the possibility of making social networks
proactive services for the citizens, with high levels of effectiveness   of agents, encoding in them some useful information about
and efficiency.In this scenario, we can imagine the possibility to       the actors of the scenario, and their existing relationships.
form groups of agents associated with users and objects that are         In this scenario, we can imagine the possibility to form
geographically close, and use these groups to provide the users          groups of agents associated with users and objects that are
with recommendations about services of potential interest.In this
paper, we propose a novel recommender system for smart city              geographically close, and use these groups to provide the users
environments, based on a P2P social agent network, designed to           with recommendations about services of potential interest. We
faced these highlighted problems. The P2P network topology is            recognize that two key issues arise in this context, namely
continuously adapted to the changes of desires and necessities of        (i) the necessity of making highly dynamic the formation of
the users, using an algorithm that match the different exigences         groups, to address the changes of the desires expressed by the
for forming groups of agents geographically close with each other.
Moreover, in order to consider also the issue (ii) above, the local      users during their movements in the city and (ii) the possibility
groups are integrated in a global social network, that can be used       of considering also the possibility that objects not belonging
to discover services of interest for a given user also managed by        to the group of a given user can be of interest for that user,
agents that do not belong to the same local group of the user.           in the case no other suitable alternatives are present in the
  Index Terms—Recommendation, Online Communities, Trust,                 local group. However, although several proposals have been
Group.                                                                   presented in the literature, that use middleware architecture to
                                                                         support the development of applications in the scope of Smart
                                                                         Cities [6]–[10], and also considering that some approaches
                        I. I NTRODUCTION
                                                                         have been introduced for constructing social networks of
   Nowadays, the recent developments of communication tech-              agents [11]–[13], any of these proposals, at the best of our
nology and intelligent systems generated an increasing ten-              knowledge, addresses the issues above. In this paper, we pro-
dency to improve human life in its social aspects, including             pose a novel recommender system for smart city environments,
entertainment, commerce, socialization, education, transporta-           called SMART City Social Agent Network (SMARTSAN),
tion, etc. These advances should make social contexts, in par-           based on a P2P social agent network, designed to faced
ticular the city, to become a better place to work and socialize,        these highlighted problems. The P2P network topology is
implying that communication should be effective and low cost,            continuously adapted to the changes of desires and necessities
and the urban organization should be intelligent enough to               of the users, using an algorithm that match the different
enable ubiquitous computing environment for delivering smart             exigences for forming groups of agents geographically close
services to a much wider audience [1]. The rapid advances                with each other. Moreover, in order to consider also the issue
of the Internet of Things (IoT) [2] has implied that new                 (ii) above, the local groups are integrated in a global social
kind of social networks are becoming pervasive, connecting               network, that can be used to discover services of interest for
not only networked devices like PCs and smartphones, but                 a given user also managed by agents that do not belong to the
also un-networked things as sensors, actuators, refrigerators,           same local group of the user.
TVs, vehicles, clothes, food, medicines, books, luggage and,                The paper is organized as follows: in Section II we deal
obviously, people. In this context, the use of the multi-agent           with some related work. Section III provides technical details
technology has been recognized to have a key role in design-             about the Recommender System architecture and the Social
ing distributed software architecture capable of implementing            Network of Agents, while Section IV describes the algorithm
autonomous, adaptive and proactive services for the citizens,            for matching the different agent goals in local groups. Finally,
                                                              109


in Section V we draw our conclusions and illustrate some               owners. In such an approach a Users-to-Group matching algo-
possible future works.                                                 rithm allows the agents to dynamically manage the evolution
                                                                       of the social network organization. Finally, in [13], the authors
                                                                       present a framework that exploits homophily to establish an
                     II. R ELATED W ORK
                                                                       integrated network linking a user to interested services and
   In [6], the authors developed a multi-agent based Smart             connecting different users with common interests, upon which
Mobile Virtual Community Management System (SMVCMS)                    both friendship and interests could be efficiently propagated.
capable of providing a decentralized and open management               The proposed friendship-interest propagation (FIP) framework
of virtual communities, based on the agent-oriented platform           devises a factor-based random walk model to explain friend-
JaCaMo and its Android client based platform JaCa-Android.             ship connections, and simultaneously it uses a coupled latent
In such a system, a participant in virtual communities is              factor model to uncover interest interactions.
supported by a Jason agent that encapsulates the logic and
the control of the participation in a virtual community (such               III. T HE M ULTI -L AYER R ECOMMENDER S YSTEM
as publishing posts, notifying members, making recommenda-                                    A RCHITECTURE
tions for the user, etc.). The authors exploited SMVCMS in the
context of Smart Cities, showing that the system fulfills decen-          The SMARTSAN recommendender system generates rec-
tralization of community management, personalized automatic            ommendations for each logged user, computing them by means
management and discovery of communities, so that any agent             of a set of software agents, and exploiting a number of inert
can create its own community. In [7], the authors presented            objects with IoT capabilities. We suppose that both users
a scalable agent architecture with emergent properties in              and objects can provide services (e.g. information about city
the context of Smart Cities. These agents form on-demand               attractions, museums, restaurants, products to buy or trip
control loops within the urban system, by considering both             to organize etc.). The system architecture is composed by
the protection and the comfort of its inhabitants, at varying          components organized in a stack of four layers, as graphically
degrees of intelligence and abstraction of tasks. A case study         represented in Figure 1. The layers are described below:
is analysed regarding a real-time creation of a control loop for                 IoT. It is at the bottom of the layer stack, and
an underground railway intersection system. In [9], a system                     contains all the objects in the Smart City that are reg-
has been designed to provide an easy and ubiquitous access                       istered in the system, and that have IoT capabilities.
to the desired information about tourist attractions, and to                     All these objects can communicate with the device
generate proactive recommendations of attractions by means                       agents of the users (see the P2P communication
of a hybrid recommendation system that considers elements                        layers) and also with the server agents of the Social
such as the user profile and preferences, the location of                        Agent Network to which they transmit information
the tourist and the activities, and the opinions of previous                     about their position and the deployed services.
tourists. This system is capable to adapt itself to changes in                   P2P Communication. This layer is placed on the
the activities and incorporate new information transparently                     top of the IoT, and it is composed by a set of
at execution time. In [10] a system architecture and design                      device agents, where each of them, denoted by
methods are proposed to support the delivery of location-based                   du , is associated with a fixed user of the system
recommendation services to create personalized tour planning,                    and lives in a device exploited by the user (e.g. a
based on tourists current location and time, as well as personal                 smartphone, a tablet). All the device are organized in
preferences and needs. The system is capable to efficiently                      a P2P Network, and communicate with each others
provide various recommendations regarding sightseeing spots,                     by means of a P2P protocol. Moreover, the device
hotels, restaurants, and packaged tour plans. Regarding the                      agent of a user u builds and updates a profile Pu
formation of social networks of agents, in [11] the authors                      of u, containing some information about the u’s
deal with the dynamics behind group formation and evolution                      preferences and past behaviours. Such a profile is
in social networks of agents, analysing in particular the notion                 periodically sent to the DF agent belonging to the
of compactness of a social group and arguing that the mutual                     Smart City Recommendation Layer.
trustworthiness between the group members should be consid-                      Social Agent Network. It contains a set of social
ered as an important factor in defining such a notion. They                      agents, each of them associated with a different user
propose a quantitative measure of group compactness that                         u or with an IoT object o of the system. This layer
takes into account both the similarity and the trustworthiness                   maintains a representation a social network, where
among users, and introduce an algorithm to optimize such                         each node represents a social agent and each arc
a measure. In [12], after defining a notion of compactness                       between two nodes represents a trust relationship
for a group, that integrates similarity and mutual trust, the                    between the two respective social agents. Formally,
authors propose to provide each user with a software agent                       the social network is denoted by SN = ⟨SA, G⟩,
associated with each topic of interest for the user, and that                    where SA is the set of social agents and G is the
represents a user’s avatar in the corresponding dimension. This                  set of groups contained in SN . We also assume that
allows the user to delegate to his/her agent the management of                   each group g is managed by an administrator agent
group joining requests regarding a given topic, selecting only                   ag . The formation of a group is a process based on
those interlocutors which appear the most appropriate for their                  two main events: a user asks for joining with a group

                                                                   2
                                                             110




                                                                      Fig. 2. The Social Agent Network, as integration of local networks



                                                                      asymmetric, in the sense that we do not automatically expect
                                                                      that v trusts u at the same level.
                                                                         Generally, in traditional approaches as in [14], a trust
                                                                      measure combines two components ru,v and Ru , where ru,v is
Fig. 1. The SMARTSAN Multi-Layer Architecture                         called reliability of u, and represents the trustworthiness that v
                                                                      has in u based on the past interactions between u and v, while
                                                                      Ru is called reputation of u, representing the trustworthiness
          and the administrator of the group accepts or refuses       that the whole social network assigns to u.
          the request. We assume that the group formation                As for the reliability, we denote it by the mapping       ru,v ,
          follows the algorithm described in Section IV.                                                                    ∪
                                                                      assuming values ranging in the domain [0 · · · 1] N U LL,
          Smart City Recommendation. This layer is at
                                                                      while ru,v = NULL means that v did not have past interactions
          the top of the stack, and it contains the following
                                                                      with u and thus it is not able to evaluate u’s trustworthiness.
          components:
                                                                         Regarding the reputation of u, we denote it by Ru in the
            • An Agent Management System (AMS), that                  interval [0 · · · 1]ϵR. The reputation is computed as follows
               manages the registration of each user and each
                                                                                                        ∑
               IoT object in the system.                                                        Ru =           fρ                    (1)
            • A Directory Facilitator (DF) that provides a                                              ρ∈F EDu
               service of yellow pages, storing for each user
               u his profile Pu .                                        where |F EDu | is the set of the services provided by the
            • A set of recommender agents, where each of
                                                                      agent u and f is the feedback, representing the level of
               them, denoted by ru , is capable to generate           satisfaction of the other agents for those services.
               some useful recommendations that are sent to              The two trust components reliability and reputation are
               the device agent d : u.                                integrated in a unique value to compute the mapping trust
                                                                      tu,v of u about v, producing a input ranging in [0 · · · 1] as
                                                                      follows:
A. Trust Measures
                                                                                      tu,v = ω · relu,v + (1 − ω) · repv                   (2)
   The trust measure tu,v between two social agents u and v
represents the degree of trustworthiness that u assigns to v:           where ω is a real number, ranging in [0...1], which is set
tu,v = 0 (resp. tu,v = 1) means that u assigns the minimum            by u to weight the relevance he/she assigns to the reliability
(resp. maximum) trustworthiness to v. The trust measure is            with respect to the reputation.

                                                                  3
                                                                   111


B. Similarity
                                                                                                       ∑           s
                                                                                                                         ∑                   s
   The similarity measures how much close the profiles of two                                             v∈gu ratev +        / u tu,v · ratev
                                                                                                                           v ∈g
agents are. The information stored in agent profiles strictly               ru∗s = ψ·s(u, k)+(1−ψ)·               ∑            ∗
                                                                                                                      v∈|Rs | tu,v
depends on the application domain. Generally, it can be for-                                                                            (4)
malized as a tuple of pair, ← (f1 , v1 ), (f2 , v2 ), ..(fn , vn ) →,          where gu is the group to which the agent u belongs and
where f1 ,..,fn are the features composing the profile, i.e. some           |Rs | is the set of the agents who have evaluated the service
agent characteristics representing interests, preferences, tech-            s. It is calculated as the combination of two contribution: the
nological parameters etc., and v1 ,..,vn are the corresponding              average rating of the agents that belong to the group of the
values, such that each value vi ∈ D(fi ), where D(fi ) is the               agent u and the score that the other groups give to the product
domain of fi . The similarity between two agents u and v is a               multiplied by the trust that u assign to its agents.
mapping su,v yielding values ranging in the real interval [0.1],               This way, the recommendation of services depends on the
representing the degree of closeness between the profiles Pu                topological structure of the social agent network, that can
and Pv : su,v = 0 (resp. su,v = 1) means that Pu completely                 viewed as composed by the groups, that are a sort of local
differs (resp. perfectly coincides). Differently from the trust,            social networks, whose formation follows the algorithm that
the similarity measure is symmetric. Many proposals have                    will be described in the next section
been presented in the literature for modelling similarity (e.g.,
those described in [11], [15]). The approach presented in this                       IV. T HE G ROUP F ORMATION A LGORITHM
paper is dully orthogonal to the particular definition chosen
for the similarity measure.                                                    The algorithm for forming the groups periodically repeat a
                                                                            fixed behaviour, allowing the groups’ composition to dynam-
                                                                            ically change with the evolution of the social agent network.
C. Agent recommendation                                                     Let T be the time between two consecutive executions of the
   The user receives, at the current step, some recommenda-                 algorithm. On the single agent side this procedure is executed
tions about the services present in the system. In other words,             to join with a set of groups focused on the same topic (or set
rus is the recommendation that the agent u receives about a                 of topics) for taking benefits from joining with more than one
service s provided by an agent k. It is calculated as follows:              group. We also assume that agent can query to a distributed
                                                                            database, named GR (Group Repository), on which the list of
                                    ∑                      s                groups of the social network is stored.
                                       v∈ρ,v̸=u tu,v · ratev
    rus = ψ · s(u, k) + (1 − ψ) ·       ∑                        (3)           The behaviour performed by the social agents is as follows.
                                           v∈ρ,v̸=u tu,v                    Let Xi be the set of the groups which the agent ai is affiliated
   In other words, is composed by two components, the first                 to, and NM AX the maximum number of groups which a trader
depnding on the similarity between the agent u and the agents               agent can analyze at time t. It is supposed that NM AX ≥ |Xi |.
k that provides the service s, and the second depending on                  Furthermore, we suppose that ai stores into a cache the group
the opinions expressed by the whole community of the agents                 profile of each group contacted in the past and the timestamp
about s, taking into account the trust measures. Each of the                d of the execution of the procedure for that group. Finally, let
two component are weighted, using a weight ψ, appositely                    ξi a timestamp threshold and χi ∈ [0, 1] be a threshold fixed
chosen depending on the application domain, ranging from                    by the agent ai . The ratio behind the procedure executed by
[0, 1].                                                                     the social agent is represented by the attempt, of the social
   As for the second component, ratesv is the opinion of the                agent, to improve the advantage in joining with a group. For
the agent v about the service s (a number between 0 and 1),                 this aim, first of all, the values of advantage are recalculated
weighed by the trust of v. This means that his/her opinion                  if they are older than the fixed threshold ξi . Then, candidate
about a service is taken into account if his/her trustworthiness            groups are sorted in a decreasing order with respect to their
is high. The weighted average allows us to identify an average              trust value. If some groups in the set Lgood are not in the set
value in which the starting numerical values have their own                 Xi , then agent ai can potentially improve convenience of the
importance, specified by its weight. In particular, we can                  user ui , if they accept the user itself to join with. The only
identify the centre of gravity of the rate. In this way, we give            constraint of the algorithm is the maximum number of groups
more importance to the rate from users that the agent u trusts.             the agent want/can to join with.
                                                                               On the group side, the algorithm works as follows. Let
                                                                            Kj be the set of the agents affiliated to the group gj , where
D. Groups                                                                   ||Kj || ≤ KM AX , being KM AX the maximum number of
    At this point, we introduce the group’s concept in the social           users allowed to be within the group gj . Suppose that the
network. In this context, we define trust t∗u,v in two different            administrator agent Aj stores into its cache the profile Pi of
ways. We suppose that the trust perceived by an agent u with                each agent ai ∈ Kj and the timestamp di of its acquisition.
respect to the component of his/her group is equal to 1 (i.e,               Moreover, let ωj a timestamp and πj ∈ [0, 1] ∈ R be a
t∗u,v =1), instead the agent u considers the trust that the agent           threshold fixed by the agent Aj . The procedure performed
has in the whole community (see Equation 2). In this way, we                by the group agent Aj is triggered whenever a join request by
define rg∗w that is the recommendation that the user u receives             the social agent ai (along with its profile Pi ) is received by
about the service s in presence of the groups:                              Aj . First of all, parameter KM AX represents the maximum

                                                                        4
                                                                        112


number of users that can join with a given group. In fact,                        [2] L. Atzori, A. Iera, and G. Morabito, “Understanding the internet
if the group has reached this maximum, no more users can                              of things: definition, potentials, and societal role of a fast evolving
                                                                                      paradigm,” Ad Hoc Networks, vol. 56, pp. 122–140, 2017.
be accepted to join with the group. The group agent asks the                      [3] M. Roscia, M. Longo, and G. C. Lazaroiu, “Smart city by multi-agent
updated profile of the components of the group itself, therefore                      systems,” in Renewable Energy Research and Applications (ICRERA),
the trust tgj ,ai is computed                                                         2013 International Conference on. IEEE, 2013, pp. 371–376.
                              ∪ for all these agents and a new,                   [4] M. Longo, M. Roscia, and G. C. Lazaroiu, “Innovating multi-agent
sorted set Kgood ⊂ {Kj           ai } is built. Then, the group agent                 systems applied to smart city,” Research Journal of Applied Sciences,
will send a leave message to all the social agents ai showing                         Engineering and Technology, vol. 7, no. 20, pp. 4269–4302, 2014.
                                                                                  [5] C. Maciel, P. C. de Souza, J. Viterbo, F. F. Mendes, and A. E. F.
a trust tgj ,ai . Finally, if ai ∈ Kgood , its request is accepted.                   Seghrouchni, “A multi-agent architecture to support ubiquitous applica-
                                                                                      tions in smart environments,” in Agent Technology for Intelligent Mobile
                                                                                      Services and Smart Societies. Springer, 2015, pp. 106–116.
                          V. C ONCLUSION                                          [6] M. Fahad, O. Boissier, P. Maret, N. Moalla, and C. Gravier, “Smart
                                                                                      places: Multi-agent based smart mobile virtual community management
   In this paper, we described a novel recommender system                             system,” Applied intelligence, vol. 41, no. 4, pp. 1024–1042, 2014.
for smart city applications, called SMART City Social Agent                       [7] M. Patrascu, M. Dragoicea, and A. Ion, “Emergent intelligence in agents:
                                                                                      A scalable architecture for smart cities,” in System Theory, Control and
Network (SMARTSAN), organized in a multi-layer architec-                              Computing (ICSTCC), 2014 18th International Conference.            IEEE,
ture comprehending both a P2P platform and a social agent                             2014, pp. 181–186.
network, built on top of an IoT infrastructure. The social                        [8] A. Sassi and F. Zambonelli, “Towards an agent coordination framework
                                                                                      for smart mobility services,” in 8th International workshop on agents in
agent network allows the presence of groups of social agents,                         traffic and transportation (May 2014), 2014.
formed on the basis of trust measures, and the overall topology                   [9] M. Batet, A. Moreno, D. Sánchez, D. Isern, and A. Valls, “Turist@:
derives by the integration of these groups, that are dynamically                      Agent-based personalised recommendation of tourist activities,” Expert
                                                                                      Systems with Applications, vol. 39, no. 8, pp. 7319–7329, 2012.
adapted in time to the changes of desires and necessities of the                 [10] C.-C. Yu and H.-P. Chang, “Personalized location-based recommenda-
users, using an algorithm that match social agent desires and                         tion services for tour planning in mobile tourism applications,” in In-
existing groups’ exigences. The use of local groups is used                           ternational Conference on Electronic Commerce and Web Technologies.
                                                                                      Springer, 2009, pp. 38–49.
to discover services of interest for a given user, integrating
the recommendations coming from the agents of the local                          [11] P. De Meo, E. Ferrara, D. Rosaci, and G. M. Sarné, “Trust and com-
                                                                                      pactness in social network groups,” IEEE transactions on cybernetics,
groups the user belongs which and those of the agents that                            vol. 45, no. 2, pp. 205–216, 2015.
do not belong to the same local groups of the user. Our                          [12] P. De Meo, F. Messina, D. Rosaci, and G. M. Sarné, “Improving the
ongoing research is currently devoted to apply the approach                           compactness in social network thematic groups by exploiting a multi-
                                                                                      dimensional user-to-group matching algorithm,” in Intelligent Network-
to real smart city applications, in which the advantages and                          ing and Collaborative Systems (INCoS), 2014 International Conference
limitations introduced by our proposal can be quantitatively                          on. IEEE, 2014, pp. 57–64.
and effectively evaluated.                                                       [13] S.-H. Yang, B. Long, A. Smola, N. Sadagopan, Z. Zheng, and H. Zha,
                                                                                      “Like like alike: joint friendship and interest propagation in social
                                                                                      networks,” in Proceedings of the 20th international conference on World
                                                                                      wide web. ACM, 2011, pp. 537–546.
                            R EFERENCES                                          [14] D. Rosaci, G. M. Sarné, and S. Garruzzo, “Integrating trust measures
 [1] A. J. Meijer, J. R. Gil-Garcia, and M. P. R. Bolı́var, “Smart city               in multiagent systems,” International Journal of Intelligent Systems,
     research: Contextual conditions, governance models, and public value             vol. 27, no. 1, pp. 1–15, 2012.
     assessment,” Social Science Computer Review, vol. 34, no. 6, pp. 647–       [15] D. Rosaci, “Trust measures for competitive agents,” Knowledge-Based
     656, 2016.                                                                       Systems, vol. 28, pp. 38–46, 2012.




                                                                             5