Sociology Paradigms for Dynamic Integration of Devices into a Context-Aware System

Ubiquitous and mobile context-aware computing is an essential component of the smart cities infrastructure. Widely available wireless networks, the maturity level of distributed computing and the increasing number of mobile devices have significantly influenced the human experience with computing. In the present paper, we discuss the need for a model that will be able to represent a formal structure of a context-aware system in a device. The core functionality of the model is expected to expose context-aware behaviour and support dynamic integration of mobile devices and context-aware behaviour. The major contribution of this work is to identify deficiencies of the existing model which is using the notions from sociology such as Role, Ownership and Responsibility.


INTRODUCTION
Cities are centres of progress and innovation, and create most of the world's wealth, i.e., 70 percent of the global Global Domestic Product (Sassen, 2011).United Nations Environmental Program data suggest that cities are responsible for 75 percent of global carbon dioxide emissions, with buildings and transportation being among the largest contributors.This makes cities face numerous challenges related to climate change.Despite the fact that cities represent only two percent of the world's surface area, they are responsible for up to two-third of the world's energy consumption.The proportion of the world's population living in an urban area is predicted to increase to 66 percent by 2020 (United Nations, 2014) which will result in overpopulation, social exclusion and energy dependency (European Comission, 2015).Providing liveable conditions given the rapid urban population growth worldwide poses a new scenario (Albino et al., 2015) that cities cannot ignore: How can cities align the rapid worldwide urban population growth to sustainable levels and liveable conditions?A potential answer necessarily requires new urban development paradigm and a deeper understanding of the Smart City concept (Chourabi et al., 2012).While the term "Smart City" is still fuzzy (Goodspeed, 2015), we summarize its key characteristics as follows (Caragliu et al., 2011): (i) the utilization of the networked infrastructure, (ii) an underlying emphasis on business-led urban development, (iii) a focus on the crucial role of high-tech industry in urban growth, and (iv) social and environmental sustainability.
Smart City can be seen as a collection of the smart computing infrastructure, such as a new generation of integrated hardware, software and network technologies that provide a real-time awareness of the real world, and actions that optimize public city services and business processes (Washburn & Sindhu, 2009).Using a technology-driven approach, Smart City aims to provide effective services through real-time monitoring by means of sensors for data collection and control devices.There are many global Smart City projects being implemented, including IBM Smarter Cities, Cisco Smart Cities, GSMA Smart Mobile Cities, Siemens Sustainable Cities, Microsoft CityNext, and European projects, such as Smart Santander, the ELLIOT project, and the Periphèria project.The concept of smart cities within the European Union goes beyond the use of software, hardware and network technologies, and aims to approach city issues in a holistic manner to provide smarter urban transport network (Ojala, 2013), efficient ways for water supply and residential space heating, and upgraded garbage collecting facilities (Chapman et al., 2015), among others.
Smart Cities typically rely on the vision of ubiquitous computing whereby devices can communicate with each other to provide services and information to end users (Meier & Lee, 2011).Ubiquitous computing is a wellestablished software engineering concept in which computing appears everywhere using any device, in any location and format.A context-sensitive behaviour is considered a major factor in realizing ubiquitous computing systems (Coutaz et al., 2005;Jagadamba & Sathish Babu, 2016).As envisioned by Weiser (1991), and elaborated by Abowd (2016b) computers have to foresee human actions and act proactively to offer expected assistance (Abowd, 2012;Schilit et al., 1994).To do so, any information characterizing a situation of the interaction between users, applications, and the environment can be regarded as context (Musumba & Nyongesa, 2013).An understanding of context will help designers and system architects to use it effectively (Dey, 2001), and lead to a new component of ubiquitous computing called context-aware computing.

MOTIVATION FOR THE RESEARCH
One challenge of context-aware computing is the difficulty in teaching a computer to sense the environment where other computers and devices may exist.This would allow a computer to effectively exploit and communicate with other nearby computing resources (Lyytinen & Yoo, 2002).Since the idea behind ubiquitous computing is a combination of large-scale mobility and pervasive computing capability, this concept inherently poses technical, social, and organizational challenges.These challenges include the design and implementation of computing architectures, and the rethinking of feasible ontologies, domain models, and a wide range of policy issues concerning social organization.
While the concept of Internet of Things aims to make electronic devices remotely accessible over the Internet (Jazayeri et al., 2015), it pays little attention to their context awareness (Perera et al., 2012).Thus, there is a need for both connecting computing devices and making them context-aware.To support the dynamic integration of devices into a context-enabled computing system with a predefined structure, a device needs to possess a certain amount of information and "intelligence" about the surrounding environment.
There is much research offering complex solutions including software agents and artificial intelligence (Gelogo et al., 2015;Solanas et al., 2014;Aouatef et al., 2015;Olaru et al., 2013).Current research builds on the work of Santos et al. (2015) and Kamberov et al. (2016), and emphasises a need for a novel model to facilitate the dynamic integration of a device into a context-enabled computing system.This will be achieved by ingraining a minimum set of features and information about the system into a mobile device.
This contextual information will allow a device to understand (i) the available roles (Nwana, 1996) that exist in the environment, (ii) the roles a device can play (provided that its functionality meets the system requirements), and (iii) the information about other devices that play roles in that system.To overcome this issue, Santos et al. (2015) proposed a model in which social paradigms were central.Social and organizational relationships such as Role, Ownership, and Responsibility were proposed for dynamic integration of a device into a system and enabling cooperation with other elements (e.g.other nearby devices) belonging to a system.However, there are imperfections and limitations associated with the proposed model.The purpose of the present research is to identify the limitations and to propose solutions to overcome them, thereby contributing to the discussion on social paradigms in mobile context-aware computing in the Smart City context.
The long-term objectives of the research are to: (i) develop a model that is able to represent the formal structure of one or more computer systems using the concepts from the theory of organization and sociology, and (ii) conduct a proof of concept by developing a robust prototype that can be effectively incorporated into a mobile device to dynamically integrate in those computer systems.This paper focuses on the first research objective, in which we assess the existing model and discuss possible solutions toward the inclusion of social and organizational paradigms in mobile context-aware computing in smart cities scenarios.To do so, the following section provides a brief literature review covering ubiquitous computing, context and its models, and context-aware computing and its applications.Section IV briefly talks about the fundamentals of Artificial Intelligence, while section V highlights the drawbacks and imperfections of the existing model, and potential solutions to overcome them.

RELATED WORK
Today computers are everywhere, connected to everything and embedded in every object.The omnipresence of computing devices has resulted in the disappearance of the one-computer-to-many-people and the onecomputer-to-one-person trends, and we now have one-person-to-many-computers.This recent trend refers to ubiquitous computing, a software engineering concept in which computing appears everywhere, using any device, in any location, and in any format.A context-aware behaviour is seen to be a key factor in realizing ubiquitous computing systems (Coutaz et al., 2005;Sriram et al., 2015).To fully disappear, as envisioned by Weiser (1999), computers have to foresee human actions and act proactively to offer expected assistance (Schilit et al., 2002).Dey (2001) defines context as any information characterizing the situation of an entity.The entity can be a person, a place, or an object that is related to a user, a system, and their interaction.
Context-aware applications require models to define and store contextual information in a machineunderstandable way.Strang & Linnhoff-Popien (2004) systematized the most important models in terms of distributed composition, partial validation, richness and quality of information, incompleteness and ambiguity, level of formality, and applicability to existing ubiquitous systems.The authors provided advantages and weaknesses of key-value, mark-up, graphical, object-oriented, logic-based, and ontology-based models.
Context-aware computing has been applied to different application domains and scenarios.For example, Schilit et al., (1994) classified the following types of context-aware applications as follows: (i) Proximate Selection, (ii) Automatic Contextual Reconfiguration, (iii) Contextual Information and Commands, and (iv) Context-Triggered Actions.There are many ways context-aware systems can be implemented, which depend on certain requirements such as location of sensors, the number of users, and the type of resources available (Baldauf et al., 2007).The context acquisition method affects the architecture of the context-aware system, and it is therefore important to consider it.
In this regard, Bardram (2004) and Bardram (2005) developed a context-awareness framework that is represented by Java-based context awareness infrastructure and application programming interface in clinical/hospital settings.The system is divided into two parts: Context-awareness Runtime Infrastructure and Context-awareness Programming Framework.The Runtime Infrastructure consists of (i) Distributed and Cooperating Services, which handle context information, (ii) Event-based Infrastructure, which is responsible for subscription to context events and notification when such events occur, and (iii) Access Control providing security and privacy.The Application Programming Interface, in turn, is represented by (i) Semantic-free modelling abstraction to help a programmer to model and handle context data regardless of the application domain, (ii) Context Quality to expose more or less context data as a function of the level of uncertainty, and (iii) Support for Activities to enable the reasoning at the level of user activities.The important conclusion of the research is that context-aware clinical applications may be a substantial contribution towards providing clinical environment with better computing capacity.
A similar example is Bardram & Hansen (2010), in which the authors used the Java Context-Awareness Infrastructure (Bardram, 2005) to develop the AWARE architecture to support context sensing and management regarding the working context of users.Two applications, AwarePhone and AwareMedia, were developed to demonstrate the applicability of the AWARE architecture.The AwarePhone provides context information about colleagues and workplaces, while the AwareMedia acts as a whiteboard system for cooperation in workplaces.Similar to Bardram, (2005), Bardram & Hansen (2010) demonstrated the usefulness of social, temporal, activityrelated, and spatial awareness in coordinating the medical work.
In a different setting, Coppola et al. (2009) proposed a new approach in the management of web context, which the authors called Context-Aware Browser (CAB), which combines web and context-aware computing.By interacting with the surrounding environment, such as sensors and information systems, CAB was able to collect data and infer the contextual information by using several artificial intelligence techniques such as the ability to search contents and applications given the current context, to automatically load and display the chosen web pages and applications, and to automatically propose web applications and web pages.The CAB system was designed in a three-tier architecture, in which the topmost layer interacts with the user, the middle layer facilitates the communication between the topmost and the bottom layer, which is responsible for the collection and the analysis of the contextual information, and the search of the suitable contents given the inferred context.Hong et al. (2010) designed and prototyped context-aware messenger (ConaMSN), which used information collected from wearable sensors and shared it among application users.Emotion, stress, and activity are types of sensed context information using probabilistic methods.To overcome the issues of uncertainty of the situational information, the authors used situation inference dynamic Bayesian networks.There are some challenges associated with sensing human emotions and stress, such as the fact that a more sophisticated model is required to overcome the issues of personalized context recognition.Baltrunas et al. (2011) developed a methodology for supporting a context-aware collaborative filtering system.The methodology was fourfold: (i) a context acquisition tool, (ii) a user tool for collecting users' preferences about various items given certain context, (iii) a context-aware prediction generating tool, and (iv) a mobile recommender system that aggregates the aforementioned functionality and visualizes the results to the user.The application offered music recommendations to the passengers of a car based on their preferences collected via a web application.The system recommended new items based on the ones previously preferred under certain contextual conditions, such as driving style, mood, landscape, weather etc. Löwe et al. (2012) developed a middleware-based system called Context Directory.In their system one or several context directories communicate with context clients.The context information is stored and processed in the context directory.The only component of the architecture that talks to a mobile device is a context client.Context clients collect attributes from mobile devices and merge them in the context directories.The authors proposed a context directory architecture, which consisted of a set of context models, interpretation methods, and adaptation functionality.They argued that a feature-based development approach for context-aware mobile applications has more advantages over a component-based one, and that generic middleware requires structural information to enable context-aware behaviour.
iConAwa is an intelligent context-aware multi-agent system that proactively provides context-aware information and services to its users (Yılmaz & Erdur, 2012).The system is built using software agents to effectively exchange contextual information between users and a server, and make decisions accordingly.The authors applied an ontology-oriented approach and the Web Ontology Language (Bechhofer, 2009) to model context and points of interest.The system was composed of three software agents: (i) the context agent, which provides mobile users with context information, (ii) the service agent, which provides services regarding points of interest given the user's request, and (iii) the client agent, which is a client itself that received information from the context agent and visualizes it on the map.The Google Maps API, Apache Jena (Semantic Web Framework), and Protégé Ontology editor were used to develop a prototype of the system.
Westhuizen & Coetzee (2013) analysed previously developed systems and frameworks using web accessible services on mobile devices.Based on their literature review, the authors proposed a new framework that considers the provisioning and discovery of context-aware RESTful web services hosted on mobile devices.They emphasized that hosting web services on mobile devices was constrained by battery power, network connectivity, and Global Positioning Systems availability.Additionally, further issues on services discovery and provisioning deteriorated the situation.Thus, the proposed framework gathered contextual information focusing on lightweight services to enable effective discovery.The distinctive feature of the framework is the Context Manager that increases performance and reduces resource consumption.This hybrid, decentralized discovery mechanism uses Mobile P2P, and JmDNS, and facilitates the discovery of RESTful services hosted on mobile devices.The flaw in this approach is the lack of technical implementation details.Attard et al. (2013) presented a matching technique to enable automatic situation recognition and evaluated its performance in an experiment with real users and perceived contextual information.The distinctive feature of the proposed technique was its ontology-based nature.To generate people's context, their devices were treated as nodes in a sensor network.DCON (Digital.Me Context Ontology) is used to combine raw and interpreted context information and convert it into a machine-readable format.The results of the constraint-based matching and ontology-based weighing system is used to compute similarity scores at various levels (elements, attributes, aspects), aggregating them in a degree of similarity.The authors argued that the algorithm can be efficiently used to order situations by similarity, which makes it suitable in interactive context-aware systems.
The literature review suggests that there are numerous research works devoted to the ontology-based approach and context modelling (Attard et al., 2013;Wang et al., 2004;Fook et al., 2006;Christopoulou & Goumopoulos, 2004;Paganelli & Giuli, 2011), and software architecture solutions in developing context-aware application (Baltrunas et al., 2011;Bardram et al., 2004;Bardram & Hansen, 2010;Coppola et al., 2009;Hong et al., 2010;Löwe et al., 2012;Westhuizen & Coetzee, 2013;Yılmaz & Erdur, 2012).(Sriram et al., 2015) compared and discussed the frameworks that support crucial features in the healthcare system, while Gelogo et al. (2015) proposed a context-aware framework for ubiquitous healthcare that can reduce the network traffic.However, there is a lack of research that applies ontology and social paradigms in designing such systems.Kabir et al. (2011), Kabir (2013) and Kabir et al. (2013) emphasize evidence of limited work focusing on socially-aware applications.Thus, the following section introduces the approach combining social reasoning, ontology models, and the organization theory notions to enable context-sensitive behaviour of a mobile device in a computing system.

FUNDAMENTALS OF ARTIFICIAL INTELLIGENCE
To sense the surrounding environment, mobile devices are equipped with sensors in various forms.According to Nurmi & Floréen (2004) context is hierarchical and can have different level of abstraction and sophistication.
While time, orientation, nearby objects, noise level, network bandwidth and location represent low-level context, high-level one is usually inferred by combining low-level context and reasoning methods.Context reasoning is the ability of a system to deduce new and relevant information using context data in an intelligent way.
Current research is inspired by the distributed artificial intelligence, social reasoning and the dependence theory.Reasoning is one of the central problems of Artificial Intelligence (AI), a study and design of intelligent agents.While there are many definitions of AI, they can be organized into four categories: (i) systems that think like humans, (ii) systems that act like humans, (iii) systems that think rationally, and (iv) systems that act rationally.Agents exhibit the following properties (Luck et al., 2004;Russell & Norvig, 1995): autonomy, social ability, reactivity, and pro-activeness.Analysing agents in AI and their behaviour, context-awareness instinctively becomes an application domain for paradigms and techniques of AI.
Figure 1 shows the existing overlap between research questions of both artificial intelligence and context-aware computing.The red polygon identifies the sub-domains of AI that are of interest in context-aware computing, while the yellow polygons highlight the overlapping research questions (Pichler et al., 2004)  Communication Language (FIPA ACL) created by the DARPA Knowledge Sharing Effort and the Foundation of Intelligent Physical Agents respectively.However, both approached are not suitable for MAS with the exception when all agents are designed by one developer (Bonisoli, 2013).
Social reasoning represents a particular interest in the present research.An essential feature of an agent to be fully autonomous is a social reasoning mechanism.Social reasoning is a mechanism that uses information about the others in order to infer some conclusions (Sichman et al., 1994).This mechanism is realised through a data structure, also called an external description, and consists of the following elements: goals, actions, resources and plans.The underlying theory of social reasoning is realised using social notions and is based on dependence concept to achieve the planned goals.Goals are what an agent wants to achieve, while actions are what an agent performs.An agent also has control over resources and a plan to achieve a goal using any actions and resources.Goals are achieved through dependence relations when an agent depends on another agent to accomplish it.The idea stems from Castelfranchi et al. (1992) who discovered that human interactions happen autonomously and are based on a number of principles.A needed background for a computation model of context-enabled social interaction can be represented by those principles, which stated that dependence is the ground basis and the reason for social interaction.

ISSUES OF THE EXISTING MODEL AND POTENTIAL SOLUTIONS
The dynamic integration of a device into a context-aware computing system is one of the important contemporary research challenges.While AI methods can provide power models and methods to enable contextaware behaviour, they require computation power, which is one of the limitation of mobile devices.In the contextaware computing, devices receive the information about their environment from various sensors.
Being inspired by the concepts from dependence theory and sociology, Santos et al. (2015) proposed an ontology to describe a formal structure of a system that enables the dynamic integration of mobile devices into it.The present paragraph briefly describes the model of Santos et al. (2015) (Figure 2).Before discussing the knowledge representation and relations adopted in the model, we introduce competency principle which refers to the ability of a device to execute all required functions to accomplish the tasks imposed by the role it owns.It is assumed that when a device owns a role, the competency principle is approved.The key notions used to characterise the model are Role, Ownership and Responsibility.Role is seen to be a particular connection of a device to the cooperative structure of a system that defines a number of responsibilities for the device.The relation between a device, role and context is called Ownership and formally expressed as Owner (X,R,Ca), where X is a device, R is a role performed by the device, and Ca is context in which the device X "plays" the role R. Responsibility is a task association to a role that entails obligations to accomplish tasks.The relations between roles  (Santos et al., 2015) are managed by contracts which, in turn, are regulated by rules.It is necessary for a device to possess curtain skills to be able to own a role.A device can own more than one role in different context, while one role can be owned by more than one device.It is worth to note that roles, relations between them and and rules are predefined.This reduces the flexibility of the model and reduces the intelligence of devices.
While this approach is unique and opens new horizons in designing systems with enabled context dependent behaviour, it possesses imperfections and limitations associated with the model, which are critically discussed below as a series of questions: (1) How does the system manage task execution?This challenge requires further research.Before proposing a possible solution, we should bring up the background information.There are two types of responsibility for devices in the model proposed: (i) the execution, i.e. the execution of an assigned task, and (ii) the delegation, when a device that is in charge of a complex task delegates it to another device by producing a message with an order of execution.If an atomic task is delegated, then there are ways to control whether it will be executed.However, in the case of a composite task, it is not trivial for a device to control and monitor the execution of subtasks, as well as to assure that they are executed in the correct order and with appropriate timing.We propose to explore methods for tasks and sub-tasks coordination and test their applicability in the domain of context-aware computing.One such way for task execution monitoring is messaging.There needs to be an internal representation of the workflow of the task and sub-tasks.Technologies such as BPMN, XPDL, jPDL, BPEL, and YAWL may solve the issue.Given the complexity of the challenge, the further research will be conducted on the appropriate way to perform the task flow management.
(2) How to supply the information about a certain role to different devices?Currently, there is no mechanism in the model differentiating devices and supplying them with the necessary information regarding a role.A software engineering solution is seen to resolve the issue.We propose to create a central catalogue that will be communicating with devices.The web application will have a database with a full context structure and device registration skills.The communication with devices can be organized by means of web services.The idea is to provide functionality for a device to register and receive context information.Given the obtained context the device can convey its competence and skills, and receives requirements to accomplish a task.Mobile devices will receive the information related to a role via communication with the web application once the device is validated.
(3) How to check whether a device is "honest" to perform a role?There should be functionality in the model that allows for the validation of the device's competence to perform a certain role.Thus, the system is expected to be able to either identify a device and delegate responsibilities, or in case of identification failure to request additional information.Another approach to ensure the device's capability is to perform a test revealing the device's real skills.The test on technical capabilities can be implemented through a native API.
(4) How to provide robust device management given several devices with the same role?This issue is related to cases in which certain devices are not competent to perform a role on their own, but together they have the expected set of skills to perform tasks.While only a theoretical solution was originally proposed, we emphasise that a working algorithm needs to be developed, and a robust prototype has to demonstrate tasks break-down and ownership management mechanisms.This issue might be overcome by applying a partial ownership of a role.If a device, for instance, is unable to assume 100% ownership of a role, it indicates its incompetence to execute all tasks associated with that role.Thus, a partial ownership solution needs to be considered.
(5) The proposed communication schema based on messages is outdated and needs refinement.While (Santos et al., 2015) proposed a communication schema using a message, it is not specified how the system will be dealing with server failures.If we keep the proposed communication schema, a message queue system can be adopted to overcome the mentioned issue.In case of the alternative solution, REST HTTP calls can be considered.It is worth noting that messaging system has to consider the scarce computation resources and battery power.
(6) Logic system Currently, there is only predicate logic offered in their model.We argue that this type of logic is not enough given the complexity of the relationship between components in the model and the need for task execution functionality.There are cases of partial truth requiring fuzzy logic.Since the proposed model is inspired by organization theory, deontic, a philosophical logic may help cope with obligations and permissions.This issue is also a subject for additional research.

CONCLUSION AND FUTURE WORK
This paper reviewed relevant literature in the context-aware computing field, an essential aspect in building intelligent services for smart cities, and identified the need for a novel approach to provide context-aware services ubiquitous and dynamic integration of mobile devices into network infrastructure.
We also discussed the existing idea of Santos et al. (2015) who proposed to adopt systems with pre-defined formal structure and utilise social dependence theory, social reasoning and sociology notions to define relations between devices.We identified drawbacks and deficiencies of the existing model and proposed possible ways to resolve them.While some of the imperfections can be overcome by applying appropriate software engineering solutions, we emphasized that others require a thorough investigation of ontology models in the context enabled setting.
The new ontology model will be the main focus in the immediate future.Next research activities will include a novel model that will describe the formal structure of the computing system.The core functionality of the model will be to enable dynamic integration of mobile devices into a system.Further efforts must be carried out in order to define relations and rules between devices, facilitate their ability to reason and achieve goals given the contextual information.Detailed scenarios and use cases are of the particular interest for future work, as well as framing the research against the fourth generation of personal computing, so called collective computing, coined by Abowd (2016a).Once the model is developed, a system architecture will be designed to conduct proof of concept.
:  Context representation: this issue arises due to the hierarchical nature of context.While it might be trivial to represent raw contextual data, it is not easy to model context of high level of abstraction.Perttunen et al. (2009), Kofod-petersen & Mikalsen (2005) and Moldovan & Clark (2005) emphasised the importance of context modelling for its subsequent mapping into a higher level and reasoning.While ontologies provide a power approach, fuzzy logic or non-classical logical construct, such as modal, temporal and many valued logic are anticipated to offer a power solution for context representation. Context interpretation includes dealing with uncertainty, inference and prediction of the contextual information using a certain function or decision rules.Rule-based systems, inductive learning, clustering, data-driven modelling and fuzzy logic can aid to tackle the aforementioned issues. Context reasoning is a decision-making phase when a system examines the contextual information to perform appropriate actions when conditions are fulfilled.Logical and rule-based nature of context reasoning often makes it an application domain for decision analysis, logic programming, expert systems and rule-based methods.Multi-agent systems (MAS), a successor of the Distributed Artificial Intelligence (DAI), deal with the development of multiple intelligent agents communicating with the environment.It differs from the traditional AI and allows for decision making intelligent agents to achieve their goals.Communication is an important feature in MAS and is realised by the Knowledge Query and Manipulation Language (KQML) or FIPA Agent

Figure 1 .
Figure 1.Context-aware computing and Artificial Intelligence