CONTEXT MANAGEMENT: TOWARD ASSESSING QUALITY OF CONTEXT PARAMETERS IN A UBIQUITOUS AMBIENT ASSISTED LIVING ENVIRONMENT

This paper provides an approach to assessing Quality of Context (QoC) parameters in a ubiquitous Ambient Assisted Living (AAL) environment. Initially, the study presents a literature review on QoC, generating taxonomy. Then it introduces the context management architecture used. The proposal is verified with the Siafu simulator in an AAL scenario where the user’s health is monitored with information about blood pressure, heart rate and body temperature. Considering some parameters, the proposed QoC assessment allows verifying the extent to which the context information is up-to-date, valid, accurate, complete and significant. The implementation of this proposal might mean a big social impact and a technological innovation applied to AAL, at the disposal and support of a significant number of individuals such as elderly or sick people, and with a more precise technology.


INTRODUCTION
Ubiquitous computing has increasingly been part of people's daily activities through the use of mobile and portable devices.These devices have diverse features and interfaces as GPS (Global Positioning System), radio and TV, audio players, digital cameras, etc.This type of computing has strong links with the characteristics of the physical world and the profiles of their users (Loureiro et al., 2009).
Such information is called context, and represents the input element for contextaware computing.Context is any information that can be used to characterize the situation of entities such as a person, a place or an object that is considered relevant to the interaction between a user and an application (Dey, 2000).
According to Chen and Kotz (2000), context has four dimensions: the computational context refers to the technical aspects related to capacities and computing resources; the physical context is accessed by sensors with features encompassing, for example, location, traffic condition, speed, temperature, lighting, etc.The time context captures information such as time of a day, week, month, season, year, etc.The user context is related to the social dimension of the user, such as the user's profile, people nearby, current social situation, preferences, etc.
A system can thus use such significant context information and then provide more optimized and personalized services, increasing user satisfaction.Through the use of context, it is also possible to minimize the consumption of resources such as energy, processing and communication, providing more accurate and dynamic services (Loureiro et al., 2009).
In ubiquitous environments, one of the many important factors is the context sensitivity.But the context information may not be reliable or useful, becoming a problem in terms of quality of the context information.Consequently, an important point about the context sensitivity is that the context information must be reliable; quality must be ensured (Y.Kim & Lee, 2006).
Quality of Context (QoC) is any information that describes the quality of information that is used as context information.So QoC refers to the information itself, not the process or the hardware component that provides the information (Buchholz, Küpper, & Schiffers, 2003).QoC does not require perfect context information with the highest possible accuracy and up-to-dateness, but it needs a correct estimation of the data quality (Bellavista, Corradi, Fanelli, & Foschini, 2012).
The quality of the context information used in the adaptation of services has a significant impact on users' experiences with context-sensitive services, which can be positive or negative depending on the QoC.For that reason, QoC can help the user to estimate the behavior of a context-aware service.QoC can also serve as an indicator for the selection of a more appropriate context provider.
Lack of quality can lead assisted systems to respond inappropriately, resulting in errors related to assistance or support, or putting the user at risk.QoC assessments can improve these systems and set them to perform specific actions whenever lapses in quality occur, thus proving the importance of a QoC evaluation.
The objective of this study is to conduct a review of the literature concerning QoC, and then demonstrate the use of QoC in an Ambient Assisted Living (AAL) environment, evaluating some QoC parameters.Through this evaluation of QoC, it is intended to achieve the following objectives: detect anomalies or inconsistencies in sensors, generate alerts, activate backup sensors, discard data with insufficient QoC, choose appropriate providers, and other actions.
The paper is organized as follows: Section 2 describes the research method used.Section 3 presents taxonomy of the studies on QoC found in the literature.Section 4 describes the context management architecture adopted and its three layers.Section 5 presents the Ambient Assisted Living scenario selected.Section 6 presents the case study implemented; describing the simulator used the context provider, the context processing, the form of QoC assessment, and the results.Section 7 mentions some related works, and section 8 presents our conclusions and future work.

RESEARCH METHOD
Initially, this study conducted a literature review on Quality of Context, comprising: data collection, data analysis and synthesis, and data representation.
The data was collected from the databases: Web of Science, Scopus and Google Scholar, with the search term "quality of context", resulting in the selection of 108 papers.
For the analysis of this material, an auxiliary chart was created including information like author, title, QoC parameters studied, technique or method used, and observations.The chart helped to classify the papers into categories or subjects, which are represented in the Taxonomy described in the following section.
After the literature review, a Context Management Architecture was proposed, with emphasis on the QoC evaluation process, involving two main modules: the QoC Quantifier and the QoC Evaluator.The present study provides an overview of such Architecture, highlighting the QoC Quantifier module.
Subsequently, we carried out the simulation of an Ambient Assisted Living scenario for health monitoring using some QoC parameters.This study used the context simulator Siafu (Europe, 2007) to simulate the proposed AAL scenario with the sensor readings: blood pressure, heart rate and body temperature, with emphasis on health-monitoring sensors.
After obtaining this data from the simulator, the following QoC parameters were quantified: Up-to-dateness, Coverage, Precision, Completeness, and Significance.An overall quality value was calculated, too.The obtained values can be displayed graphically or through a file in text format for manipulation.Some analyzes can be performed when a QoC problem is detected, helping in the identification of an existing problem, such as: sensor failures, inconsistencies, network communication problems, or warnings about potential health problems.
After completing the case study, some related works will be cited.These works encompass scenarios related to Health, Smart Home, Simulation and QoC use.

QoC Taxonomy
The taxonomy developed is represented in Figure 1.

Figure 1. QoC Taxonomy
In a more general way, the concept of Information Quality (IQ), used for any type of information, can be found in (Y.Kim & Lee, 2006) that builds a relationship between IQ dimensions and QoC parameters.
While QoC describes the quality of contextual information, QoS refers to Quality of Services.QoS is any information that describes how well a service performs.Services are performed in hardware components, and these devices also possess a quality, called Quality of Device (QoD).QoD is any information about a device's technical properties and capabilities (Buchholz et al., 2003).
The literature review was focused on the topic of QoC, initially selecting a total of 108 articles out of which we obtained the following classification: • Definitions and proposals of QoC parameters (24 papers); • Alternatives for quantification of QoC parameters (22 papers); • Context Representation Models with QoC (12 papers); • Other topics (21 papers); • Application of QoC to a scenario (13 papers); Some of the articles discussed concepts related to QoC or suggested the use of QoC in future work, not falling under any category.Thus, a total of 56 articles were considered relevant according to this classification, and were included in the taxonomy.It is noteworthy that some works fit more than one category.This study can be found in full details in (Nazario, Dantas, & Todesco, 2012), and also in all references in each category.
The five categories of QoC taxonomy are described more succinctly than in the full article (Nazario, Dantas, & Todesco, 2012), as follows.

Definitions and proposals of QoC parameters
Based on a number of twenty-four papers, a set of parameters was defined and/or one or more parameters were proposed.It was observed that there is no standardization of nomenclature and definitions.Several authors have defined a set of parameters, sometimes different names with the same or similar meaning.In some situations the same authors used different nomenclatures, as in (Manzoor, Truong, & Dustdar, 2008) and (Manzoor, Truong, & Dustdar, 2010).Another aspect noticed was the large number of QoC parameters in the literature, over forty parameters.
The proposed QoC assessment will be made through the quantification of some QoC parameters.Many parameters have been proposed and defined in the literature.Some of them are described below.
Reliability: defines how tolerant the application is in relation to sensor failures (Dey, 2000); Trustworthiness: similarly to Reliability, describes the probability of the information provided being correct.It is used by the context provider to evaluate the quality of the agent from which the context provider originally receives the context information (Buchholz et al., 2003); Coverage: defines the set of all possible values for a context attribute (Dey, 2000); Resolution: is similar to information accuracy, or defined granularity (Dey, 2000) or yet the smallest perceptible element (Gray & Salber, 2001); Up-to-dateness: indicates how old the context information is by using a timestamp (Buchholz et al., 2003); Precision: describes exactly how the context information provided reflects reality (Buchholz et al., 2003); Probability of correctness: indicates the probability of part of the context information being correct or a reflection of the actual situation (Buchholz et al., 2003); Accuracy is also referred to as Probability of corretness, meaning how accurate and reliable the data is; the probability of part of the context information being correct (Y.Kim & Lee, 2006); Completeness: is the extent to which the context information is available, sufficient and not absent (Y.Kim & Lee, 2006); Access security: restricted access in order to maintain security (Y.Kim & Lee, 2006); Access Right: metric that varies depending on who will access the context information (Manzoor, Truong, & Dustdar, 2010), equivalent to Access security; Integrity: refers to the credibility and reliability of the context source; Significance: indicates the importance of the context information, its value is particularly important in life-threatening situations for humans (Manzoor et al., 2008); Priority: aims to allow differentiated traffic when multiple data must be sent (Corradi, Fanelli, & Foschini, 2010).
The studies (Manzoor et al., 2008) and (Filho, Miron, Satoh, Gensel, & Martin, 2010) used similar approaches but with different nomenclatures.A more detailed study would be required to obtain an integrated solution.
Further studies are needed in order to examine the methods for more accurate conclusions.

Context Representation Models with QoC
Context representation models can be classified according to various approaches, for instance: key-value pairs, based on markup scheme models, domain-driven models, graphical models, object-oriented models, entity-relationship model, based on reasoning, topic maps, contextual graphs, based on ontology, as well as hybrid models (Bettini et al., 2010;Santos, 2008).
Twelve papers were selected.Among the approaches to context models found in the literature, some of the authors used QoC.These authors emphasized models that use graphical notation (Henricksen, Indulska, & Rakotonirainy, 2002); (Filho & Martin, 2008), XML (Extensible Markup Language) (Manzoor et al., 2008), UML (Unified Modelling Language) (Neisse, Wegdam, & Sinderen, 2008) and especially the use of ontologies and OWL (Ontology Web Language) (Tang, Yang, & Wu, 2007), (Toninelli & Corradi, 2009), (Filho et al., 2010).The use of ontologies for modeling context and QoC allows for reuse and sharing of context information.The difficulties of standardization and quantification of parameters are extended to representation models.

CONTEXT MANAGEMENT ARCHITECTURE
In this section we propose a differentiated context management architecture that takes into account the QoC evaluation during the step of context processing.
QoC can be used to improve context management, assisting in decision making as regards its applications.The context management architecture is presented in Figure 2.

Figure 2. Context Management Architecture
The bottom layer shows the context providers, which may be room sensors such as for temperature, light; health monitoring sensors such as of heart rate, blood pressure; mobile device sensors such as of location, time, and preferences; or actuators that can be used in intelligent automation.
The middle layer shows the context processing, where acquisition of context information, processing and distribution of such information will take place.In order to follow these steps, some modules will be used: • Context Collector: collects the context data from the sensors; • QoC Quantifier: performs the quantification (calculations) of QoC parameters and QoC overall value, considering the context for instance space, time, user, etc.; • QoC Evaluator: verifies the QoC associated with the context information by means of ontologies; • Security Policy: checks the security policies adopted for the distribution of context knowledge and QoC among context consumers; It is in this layer that the QoC assessment will be made, comprising the modules QoC Quantifier and QoC Evaluator.For the case study investigated in the present research, details of the QoC Quantifier module will be provided.
Still in this layer, data is converted into information and then into knowledge.The context collector obtains data (values that have no meaning when isolated).The QoC Quantifier both makes the necessary calculations and develops relationships with the context involved, hence the information is generated.The Evaluator, in turn, assesses the QoC through inferences in the ontology(s), so this module deals with context knowledge.
Finally, the top layer displays context knowledge and QoC consumers, such as healthcare applications, home or intelligent environment, in addition to other services where the context is considered.
Among the possible scenarios for applying the model, the following can be cited: leisure, tourism, traffic, industry, commerce, health, entertainment, smart environments, disasters, and others.
Since the proposed study focuses on the context-processing layer, it could be understood that this applies to any type of scenario previously mentioned.For the purpose of verifying this proposal, an Ambient Assisted Living (AAL) scenario was selected.

THE SCENARIO
No universal definition of Ambient Assisted Living (AAL) has been adopted, but it can be described as information and communication technology based products, services and systems to provide older and vulnerable people with a secure environment, improve their quality of life and reduce the costs of health and social care (Cardinaux, Bhowmik, Abhayaratne, & Hawley, 2011).
In a different definition, AAL is the term given to the provision of care to people either in their own homes or in supported housing, underpinned by technology.The provision of care, augmented by assisted living technologies, is growing because of the increasing demand and also due to the maturing of many of the underlying technologies that make assisted living possible (McNaull, Augusto, Mulvenna, & McCullagh, 2012).
As for the scope of use of AAL (van den Broek, Cavallo, & Wehrmann, 2010), the following can be mentioned: • AAL for persons: AAL for health, rehabilitation and care; coping with impairments and disabilities; personal and home safety and security; • AAL in the community: Social inclusion; entertainment and leisure; mobility; • AAL at work: Needs of older workers; access to working space; support for working; safety and health regulations; Our proposed AAL scenario, in the 'AAL for persons' category, is a house consisting of a kitchen, a laundry room, a bathroom, a TV room, a bedroom and a studio/office, as illustrated in Figure 3.

Figure 3: AAL Scenario
The house is occupied by an old person (henceforth referred to as resident).This person takes daily medication for health control.Some of the resident's daily activities are: waking up around 8:00 a.m.; having breakfast; walking the dogs; taking medicines; doing health monitoring (blood pressure, heart rate, body temperature); having lunch at home or at a nearby restaurant; doing some housework and handicraft; reading; having dinner; watching TV; using the bathroom; sleeping.
The simulation used sensors of blood pressure, heart rate and body temperature, with emphasis on health monitoring sensors.

CASE STUDY
Testing, assessing or validating a context-sensitive or distributed application involves costs with people, time and equipment.For that reason, a simulation can be the first step to check the consistency of a given investigation.
This study used the context simulator Siafu, to simulate both context provider and context processing.This simulator has been chosen because it allows the creation of new scenarios, obtaining context information as needed, and it enables inclusion of QoC assessment during simulation.Due to its characteristics, some of the previously mentioned studies dealing with QoC also used this simulator, for instance (Brgulja et al., 2009), (Chabridon, Abid, & Taconet, 2011), (Xu et al., 2012).Other simulators and emulators for ubiquitous scenarios are discussed in (Knappmeyer, Kiani, Reetz, Baker, & Tonjes, 2013).

Siafu Simulator
This case study used Siafuan open-source context simulator developed in Java language at the NEC European Research Lab (Europe, 2007).This simulator is aimed at generating context information in a given scenario.Some of the scenarios developed are available for simulations, for instance: some cities, a university and office.In addition to graphic visualization and simulation of the context information, the data output is via listener or CSV file.This tool enables the development of new scenarios in three steps.The first step is defining the place, which involves the creation of the scenario map (a graph), the definition of circulation areas for the agents (in the color black; obstacles are white), the creation of context variables and identification of locations on the map, thus generating multiple layers with different information.
The second step is programming the behavior, where three classes are programmed: BaseWorldModelbehavior of the place, BaseContextModelcontext data, and BaseAgentModelbehavior of each agent.Finally, the third step is data bundling (Martin & Nurmi, 2006).
After these steps, the simulation can be performed in the application Siafu, allowing real-time visualization of the agents.It is possible to change the agents' behavior at runtime, or change runtime.

Context Provider
A graphic scenario was created with Siafu, with an agent representing the resident.The simulated sensors are those related to the monitoring of the resident's health: blood pressure, heart rate and body temperature, in the bottom layer of the proposed architecture: Context Provider.

Context Processing
The main layer of the proposed architecture is the context processing layer, which is characterized by the modules of quantification and QoC evaluation.
The first step of the context processing is data acquisition.The data is obtained from the sensors through a context collector module implemented in the simulation.Subsequently, the QoC quantification is done using the QoC Quantifier module, as described below.

QoC Quantifier
At this point, an algorithm will quantify the QoC parameters through the QoC Quantifier module.Based on the study of the parameters found in the literature, the following parameters were selected: Up dating, Coverage, Precision, Completeness, and Significance.These parameters were chosen for being more significant, that is, their values can help more effectively in diagnosing possible problems QoC.For example: failures in sensors and communication networks, outdated information, warnings about health issues, among others, additionally not requiring much processing capability.Other parameters may be included in future work.
All parameters must have values between 0 and 1, according to the form of use proposed by most of the authors under consideration.

Up-to-dateness (U):
The quantification of this parameter is based on (Manzoor et al., 2008), where: The variable lifetime is set to a value at which the information becomes "old", outdated.
The parameter Up-to-dateness is calculated for each unit of context information (sensor), so its implementation includes: U (temperature), U (pulse), U (pressure).

Coverage (C):
According to the definition of Dey (2000), the value range for each sensor (upper_limit, lower_limit) is identified and then tested, as follows: The parameter Coverage is calculated for each unit of context information (sensor): C (temperature), C (pulse), C (pressure).

Precision (P):
It is the difference between the actual value and the value measured by the sensor, divided by the actual value; the two values (actual and measured) are in the simulation, as shown below: Each unit of context information (sensor) will have the value of the parameter Precision as: P (temperature); P (pulse); P (pressure)in this case, precision will be the same for diastolic and systolic pressure.

Completeness (Cm):
According to Manzoor et al. (2008), this measurement of quality indicates the amount of information provided by a context object.It is the ratio between the number of available attributes and the total attributes of a context object, in this case, a sensor.The calculation takes into account the available attributes and weight of each attribute, as shown below: Whereas context attributes (information from a sensor) can have different weights, the parameter completeness is the sum of weights of the available attributes divided by the sum of weights of all attributes of the sensor.
In this case study, the temperature and pulse sensors have only one attribute.The sensor that measures pressure, in turn, has two attributes: value of diastolic and systolic pressure, which in this study will have the same weight.
In the literature it is not clear what an available attribute is.This study considered an attribute as available if a measured value is within the prescribed lifetime in the calculation of the parameter Up-to-dateness.

Significance (S):
This QoC parameter was proposed by Manzoor et al. (2008) and is related to the importance of context information, especially in emergencies, health issues, etc.For the calculation of S, it is taken into account the critical value (CV) and the maximum critical value (CVmax): Therefore, it is understood that the information with more significance will have value of S=1, and will decrease for other information.

Approach to using the parameter Significance
Considering that the present case study deals with health monitoring, the parameter Significance is proposed to be used for alerting towards situations that require more attention.
The parameter Coverage indicates whether the value is in a valid range.But values can be critical.For instance, if temperature is 39, the patient has a fever.The same happens to unexpected values of pressure and pulse.
Thus, the implementation shows: S=1 when the values are valid, but not expected; S=0 for other values within the range considered normal;

Overall QoC Value
According to Yasar, Paridel, Preuveneers and Berbers (2011), an overall quality value can be calculated taking into account the QoC parameters of a given weight for each parameter.These weights need to be defined and this value is calculated for each sensor or context source.Considering the parameters assessed in this study, it can be established that: Each unit of context information for Diastolic Pressure, Systolic Pressure, Pulse and Temperature includes: actual values (Ac), read values (R), calculated precision (P) and age (A).Subsequently, QoC information includes: Up dating (U), Coverage (C), Precision (P), Completeness (Cm), Significance (S) and the overall QoC value (QoC).
In addition to the graphic display, a history of information recorded at every instant of time is shown below in Table 1, for time (T).The column type (TP) includes Temperature (T), Diastolic Pressure (DP), Systolic Pressure (SP) and Pulse (P).The column LR is the last read value, and the remaining columns follow the same nomenclature of Figure 4.
Several tests can be performed with the output data of the simulation.Table 1 illustrates some situations.The first line shows that at time 56 the temperature has low QoC.There is a big difference between the last reading and the true value, moreover the information is outdated.Next, time 57 shows a good QoC, the reading has been updated, the values are valid and accurate, and S equals zero indicating that the values are within the expected range.At time 101, S changed to 1, indicating that the temperature is higher than expected; QoC remained adequate but it is a situation that deserves attention.Time 105 illustrates the pulse reading, with good QoC.The subsequent times concern pressure readings.At time 138, the QoC value is appropriate as well as other parameters, with S equaling zero, indicating that the values are in line with the expectations.At time 150, in turn, the QoC value is low, and so is the precision value, and the value of C is zero (outside the expected value range).These values indicate a possible problem with the pressure gauge.
It is worth noting that multiple values described in the QoC assessment can be configured as: information lifetime (in U), upper and lower limits (in C), weights of attributes (in Cm), critical limits (in S), and weights of the parameters in the QoC calculation.
In short, it can be said that the sensor QoC information represents the extent to which the information provided is: • Up-to-dateas from Up-to-dateness (U); • Valid -Coverage (C); • Accurate -Precision (P); • Complete -Completeness (Cm); • Significant -Significance (S); • In addition to its general QoC value, which uses U, C, P and Cm.

QoC Evaluator
The overall QoC value quantified should indicate whether the quality of the information obtained is adequate.In this case, context is used, providing a more precise adaptation.
When a quality problem is detected, that is, when the QoC value is not appropriate, it is expected that the set of parameters used will enable an analysis towards identification of the problem by means of the QoC Evaluator module.For example: • It is expected that the ontology in the QoC Evaluator module can help identify QoC problems by means of context information values, QoC parameters, and rules created in the ontology, in addition to integration with other ontologies such as those related to health.

Security Policy
After the QoC assessment in the step of context processing, the security policies adopted are verified prior to the context and QoC distribution to context consumers.This study will not cover this topic, which will be saved for future work.

RELATED WORKS
Some studies found in the literature are cited in Table 2, involving scenarios related to Health, Smart Home, Simulation and QoC use.
The assessment proposed by the present study is different from the studies cited in what concerns the set of QoC parameters used and how some of the parameters were quantified, for instance: Coverage, Precision and Significance, as well as the calculation of the overall QoC value of the context source.
The implementation of this proposal in an Ambient Assisted Living (AAL) scenario with health monitoring through sensors of heartbeat, blood pressure and body temperature demonstrates how this approach can support situations involving risk of life for sick or elderly people, or with some disability.
There was a concern to demonstrate, in a didactic manner, the use of QoC and its parameters, considering that most of the studies under consideration did not apply or did not clearly detail this use.

CONCLUSIONS AND FURTHER RESEARCH
The initial contribution of this study was to present a literature review of QoC in an attempt to identify taxonomies, and contribute to future research on this topic.This study stands out for its approach to evaluating QoC information used in a ubiquitous assisted environment, supporting the care of people with special needs (the elderly or people with health problems), thus improving their quality of life.
In order to conduct the proposed case study, the simulator Siafu was used, since it provides tools for obtaining the necessary context information, and allows the implementation of the proposed QoC assessment in an AAL scenario.
Whereas life expectancy has been increasing, the population has been aging.For that reason, AAL systems can provide not only a more effective adaptation by increasing user satisfaction, but also support and care for elderly or disabled people, improving their well-being and quality of life.Thus, it is believed that the implementation of this proposal might make a big social impact and a technological innovation applied to AAL, at the disposal and support of a significant number of people such as elderly or sick people, and with a more precise technology.
The primary limitation of this research is the use of a simulation to obtain the data, instead of using a real scenario.However, after conducting the case study described, with the Siafu simulator, the research will proceed with the use of the e-Health Sensor Platform (Cooking-hacks, 2014).The application will thus use a realworld scenario with data collected from users through the e-Health Sensor Platform.
In future works, we also intend to include environment sensors and mobile devices, evaluate other QoC parameters, and use ontology in the development of the QoC Evaluator module in order to identify potential QoC problems.

Table 1 .
Output data of the simulation If the values are outside the expected range (the parameter Coverage) and/or are not accurate (the parameter Precision), possibly there is a problem with the sensor; • Sensors with different QoC values indicate the existence of inconsistencies that need to be addressed; • Unavailable (the parameter Completeness) or outdated (the parameter Up dating) information may indicate a problem in the communication network; • The parameter Significance can help raise alerts in situations that pose risks to the user, when the information from the health monitoring provides values that may indicate a health problem;

Table 2 :
Related works