Quality of Context in Context-Aware Systems

Context-aware Systems (CASs) are becoming increasingly popular and can be found in the areas of wearable computing, mobile computing, robotics, adaptive and intelligent user interfaces. Sensors are the corner stone of context capturing however, sensed context data are commonly prone to imperfection due to the technical limitations of sensors, their availability, dysfunction, and highly dynamic nature of environment. Consequently, sensed context data might be imprecise, erroneous, conflicting, or simply missing. To limit the impact of context imperfection on the behavior of a context-aware system, a notion of Quality of Context (QoC) is used to measure quality of any information that is used as context information. Adaptation is performed only if the context data used in the decision-making has an appropriate quality level. This paper reports an analytical review for state of the art quality of context in context-aware systems and points to future research directions.


Introduction
The term 'Ubiquitous', which means appearing or existing everywhere, was combined with the term "Computing" to form the term "Ubiquitous Computing", which is used to describe ICT (Information and Communication Technology) systems that enable information and tasks to be available everywhere.Devices should vanish into the background to make the user and his tasks the central focus rather than computing devices and technical issues [1,2].From 80s at the last century up to current, Mark Wiser vision -the father of ubiquitous computing-about ubiquitous computing has already achieved remarkable success benefiting the technology advances especially within networking, sensors and mobile devices areas.This vision of ubiquitous computing aims at making our life better, easier and simpler in invisible manner.Devices should disappear in the background but working continuously with us anywhere, anytime with no annoying.
In fact, ubiquity itself was not the objective, supporting this intelligent environment in our daily decisions smoothly is the main objective.These computing systems should know where is it lay, know us, realize what we want and what should be done.It should be adaptive and proactive.It should be context-aware.
Context-Aware Systems (CAS) is a field in the wide range of ubiquitous computing.As mentioned in the last paragraph, CASs are systems that are aware of their situation (or context) in their physical, virtual (ICT) and user environment.CASs are able to adapt their operations to the current context without explicit user intervention and thus aim at increasing usability and effectiveness by taking environmental context into account [1,2].Despite that, this vision is very clear for many years ago, context-aware systems performances still suffer from a gap between reality and what should be.Context-aware systems (CASs) face many challenges due to sensor shortages, rapid dynamic environment, lack of harmony between different sensors and difficulties faced in situation capturing.Many researchers investigated factors that can affect quality of context-aware systems from different views.A context-aware environment is complicated to some extent; there are different constructs that can affect the whole performance, in addition to interdependency between them [3].Researches have addressed quality issues concentrating on variant dimensions ranging from quality of context to quality of service ending with quality of the devices which are used to acquire context.Quality of Experience (QoE) is addressed also recently as an aggregate of QoS [4,5].Quality of Measurements is also a hot topic that is addressed by many recent researches [6].This paper addresses QoC.
Context-aware systems use context information to decide what adaptation actions to perform in response to changes in their environment.Depending on applications, context information includes physical context (e.g.temperature and location), user context (e.g.user preferences and user activity), and ICT context (e.g.device capabilities and battery power).
Sensors are the main mean of capturing context.Unfortunately, sensed context data are commonly prone to imperfection due to the technical limitations of sensors, their availability, dysfunction, and the highly dynamic nature of environment.The roots of imperfection problem could be also formed by the diversity of context sensors that could lead to lack of harmony between different resources along with the technical shortages of sensors [7][8][9].The openness of ubiquitous systems adds more challenges to context protection against many possible attacks [10].Furthermore, sensors capture the context periodically, so some events could be easily missed between intervals assigned to sense the context.On the other hand, in the high level context (derived context), the reasoning rules that are used to derive context cannot be valid for all situations [11], thus the derived context could be invalid.This imperfection could lead to serious problems due to the wrong decisions that might be made accordingly [12].
Context imperfection aspects could also be addressed with profiled context that are created by the user; for example, the user could leave his/her agenda without updating for long time where it has actually changed [8].Consequently, sensed context data might be imprecise, erroneous, conflicting, or simply missing [10,13].To limit the impact of context imperfection on the behavior of a context-aware system, a notion of Quality of Context (QoC) is used to measure quality of any information that is used as context information [3,14].Adaptation is performed only if the context data used in the decision-making has an appropriate quality level.
This paper presents an analytical review of the state of the art on quality of context in context-aware systems.The quality of context can be considered as the basis that quality story can start with.This paper covers many issues related to QoC in CASs including QoC definitions, quality parameters and their quantification methods, quality evaluation, quality policy, quality control processes, context quality management and quality assurance.The paper discusses current researches in QoC of CASs and points to future research directions.

Ubiquitous Computing
The terminology ubiquitous computing (UC) is introduced for first time by Mark Weiser (1952 -1999).He worked at the Xerox Palo Alto Research Centre (PARC).PARC was the birthplace for many inventions that characterized the PC era such as the mouse; windows based interfaces and laser printers.His famous article "The Computer of the 21st Century" that was published in Scientific American in 1991, was the first publisher introduced Mark Weiser's ideas.The most frequently cited quotation from this article is the following paragraph: "The most profound technologies are those that disappear.They weave themselves into the fabric of everyday life until they are indistinguishable from it".
The term 'ubiquitous', is a Latin word which mean "anytime" and "anywhere" [15].It has been combined with computing to form the term "Ubiquitous Computing" which is used to describe ICT (Information and Communication Technology) systems that enable information and tasks to be available everywhere, and to support intuitive human usage while appearing invisible to the user.Devices should vanish into the background to make user and his/her tasks the central focus rather than computing devices and technical issues [1,2,[15][16][17].In UC environment, computers became embedded in Quality of Context in Context-Aware Systems everyday objects to support daily activities and became applicable to our work, our homes, or anywhere.It creates a new environment from fusion between the physical world and the electronic space [15,[18][19][20].The information is transmitted in optimal method as the user context is recognized autonomously without user intervention.Furthermore, in UC, information does not only serve to user but also many proactive actions are taken based on understanding of the current context situation.
UC suggests tiny, wirelessly intercommunicating microprocessors which are invisibly embedded into objects around us.Equipped with different types of sensors, these computers can record the environment where the objects are and provide them with intelligent processing capabilities and natural interactions [18,21].Computer power and IT can be applied to all areas ranging from military and industrial production up to personal everyday life with a new quality [21].
IT innovations have gone through four main generations: mainframe, personal computer, distributed computing, and UC [19].UC has seen a remarkable development where the physical world environment is being increasingly instrumented in a digital way and strewn with embedded sensor-based and control devices [1].It is a natural result of recent advances in computers hardware and software technologies where many and variant devices with a wide range of computing, communication and storage capabilities have been invented [15].UC is a typical crosscutting technology; it utilizes the whole range of modern information and communication technologies (ICT) such as microelectronics, the energy supply in user interfaces, information security, sensors and localization technology [21].
UC is the next wave of computing after the Internet wave.It aims at revolutionizing the current modes of human computer interaction.Computers have been already used in different aspects of human lives; however people have to adapt their behavior according to each computer system.In contrast, in UC, computing systems are invisible and embedded in each object around us in our daily life [22].UC introduces a new paradigm of interaction.Authors in [23] addressed three types of interaction themes: natural interfaces, context-aware application, and automated context capturing and automated access.
UC is reflected in a many different concepts such as "pervasive computing", "ambient intelligence", and "the Internet of things".However, the common of all concepts is the goal of assisting people to make the life better and easier by using a numerous microprocessors and sensors integrated into the environment [21,22].
Benefits of UC are introducing unobtrusive computing assistance to us when we navigate through our work and personal daily lives [24]; enabling us to retrieve information from anywhere in our real world that could not be available before and enabling us to control daily life objects surrounds us that could not be made before.The main goal is reducing the complexity in our daily life [15].
One field in the wide range of UC is contextaware systems (CASs).CASs are able to adapt their operations to the current context without explicit user intervention and thus they aim at increasing usability and effectiveness by taking environmental context into account [2].CASs will be introduced with more details in Section 3.

Main Aspects of UC
According to Mark Weiser, in UC, computers should be so imbedded, so fitting, so natural, that we use it without even thinking about it [25].This leads to figure out the main aspects of UC [18,25].Nanotechnology and wireless technology is compound to create a seamless connection and invisible computing assistance, and context-awareness and natural computing to make the computers helpful and unobtrusive [25].Aspects of UC are not completely distinct; they are strongly interrelated to each other.The following section introduces the main aspects of UC in details:

Ubiquitous Access/Wireless Connection
Access for services and information should be anywhere and anytime [21].The access to information will be ubiquitous, over time access devices become available, divers, and smaller.Decentralization of systems and their comprehensive networking should be a vital aspect for UC [21].Access channel should increasingly become wireless and widespread [26,27].Each device in UC needs to limit the range of its wireless communication to enable valuable wireless bandwidth reuse.At 1990s, there were no short-range wireless standards, but right now, there are many: Bluetooth, IrDA, Zigbee, and WiFi.These technologies enable wide deployment for devices within local ad hoc communication as in UC vision [18].

Natural Interaction
Mark Weiser saw UC should provide a natural interaction.He found the known interaction styles at those days did not make invisibility possible, it enforces user to learn how the machine interact.These traditional modes of interaction made the computation as a separate activity apart of our daily activities [24, 18, and 19].The idea behind natural interaction is to provide computer services without forcing the user to think about how to use computer to get those services [25].

Calm technology/ Invisibility/ Embedded systems
Calm technology is another term that Mark Weiser used to describe UC.Authors in [22] considered invisibility as the most aspect of UC.Opposite to PC applications that virtualize our world, UC aims to push the computers back into background to be a part of our life and no need to virtualize the reality [18].Computer hardware and software are embedded in other equipment and objects of daily use [28].Any computer can be linked with a network, this link should be achieved smoothly without users intervention, and finally, appropriate services are provided on the network at the right time through human friendly interface [19,24].

Miniaturization/ Nanotechnology
In UC, ICT components are becoming smaller [27].If computers are to be everywhere, invisible, and obtrusive, they should be as small as possible.Miniaturization of computer components to an atomic scale is called nanotechnology.Nanotechnology focuses on building transistors using highly miniaturized computers using individual atoms or molecules.These types of computers will allow impressive levels of computing because of the huge number of transistors that could be located in tiny packages [25].

Context-awareness/ Autonomous processing
The advances come from micro-electromechanical systems, which are exploited in UC, are added to miniature interconnected devices [27].Computing elements can now have sensors to measure the physical world and actuators that initiate physical response; these systems are called context-aware systems.In this environment, UC can function automatically and autonomously [21, 26, and 27].Automatic recognition and autonomous processing of repetitive tasks can be achieved without user intervention [21].This means that computers should be able to accurately understand the user needs and provide him/her with the required services on time.The notion of context-awareness is that the computers will be able to understand the situation that they are located in to offer the proper services relevant to the current context.The attributes of context vary widely, beside the user; context may include location, user rules, current time, current date, and any other physical objects or peoples.The application of contextaware systems can be a coffee maker, a heating system at home or different GPS maps in cars or mobiles, or even earthquakes and flooding forecasting systems [25].
According to authors in [27], energy autarky and the autonomy of components and systems are considered as secondary characteristics of UC.Because of this paper focuses on CASs, another detailed section is introduced for CASs-Section 3.

Trends of Research in UC
To realize the vision of Mark Waizer, UC still face many challenges.Researches differed in their classification of the UC general trends that should be worked on from the scientific research.The following section summarizes these different trends.Of course, these research trends are not completely separated.

Wireless Problems
Until now, the different companies that produce the wireless technologies desire to produce their own proprietary products speaking their own proprietary language.This leads to "no interoperability" between devices from different companies [29].Consequently, there are too many similar wireless standards.Within UC environment, we use many interconnected wireless technologies with high communication level.The challenge is "how to integrate these technologies they are based on different standards within UC environment?[30].

Quality of Context in Context-Aware Systems
The systems in UC environment should continue operate in the background and acting opportunistically; this type of systems should be designed with continuously present computer interface [31].Technological advances should continue to bring us new hardware components that will function more invisibly than before, that these interfaces up to the point of disappearance, so as not to hinder our five senses [32].Wearable technology will be one important form of this disappear technology.For example, research in wearable technologies introduced the continually worn interfaces [31].However, wearable equipment is still too clumsy and has limited field of vision, contrast and resolution.Wearable equipment need be developed to be lighter, smaller and easier to work with the user [33].
Other challenge with this disappearing technology is the mobility within the UC complex information infrastructure [30].

Efficiency and Reliability
There are general tendencies from research community towards highlighting the quality attributes and performance of UC systems, especially efficiency and reliability.Authors in [30] concerned the efficient soft computing techniques as most important UC research trend.Authors in [33] consider the challenges related to system properties as one important research trend.According to [33], these properties are such as response time delays, hardware or software failures.This attention is understandable as UC systems should act 24 hrs/day, they should possess high level of availability, reliability and efficiency.
Authors in [29] introduce a clear analogy for UC system's reliability.Today's personal computers are, in a sense, becoming more and more reliable.However, they still have a long road ahead for them to catch up with the reliability exhibited by other well-founded technologies, such as televisions, telephones and even washing machines.These well-founded technologies have been successful, in part, due to their reliability [29].This analogy clearly indicates the level of reliability we want to realize for UC computers.

Context-aware Systems
The importance of adaptation to the context is understood in the field of mobile computing but, in UC environment, this is more complex where there is a need to respond to a much larger set of contextual triggers [34].According to Weiser's different scenarios of UC environment, we can discern a form of intelligence where the system can predict the user's tasks and control and coordinates different actions to help the users.Making UC systems as context-aware is still unsolved problem [30,34].
Beyond that, how much/accurate our UC system success in representing the real world is one important challenge.Occlusion detection is an active area of study of UC systems.Using computer vision in combination with sensors could provide promising results.However, it is mostly a top-down process and hard to deal with object dynamics, and evaluation of different hypotheses [33].Given what we are now, we still stand away from what we want to achieve in this area.If you walk into an environment anywhere in the world, you would probably not find an infrastructure suitable for UC devices.Although that you can find an infrastructure with well-grounded technologies, this environment is not constructed buildings equipped with devices to support smart environment and pervasive computing [29].CASs research trends are further introduced in Section 7.

Privacy and Security Issues
Without a doubt, the subject of the security and privacy is one of the most important topics for future of UC.It expected that UC will have a social impact on our society just as the previous two eras of computing did.However, how will it affect privacy?Will society turn to a social solution, legal solution, ethical solution, or technological solution to protect privacy?[29].
The traditional approaches of privacy and security are inadequate for a modern, open information society.For example, to demand that sensitive data be deleted after its use is clearly out of sync with the Internet.Most important, legislation must acknowledge that person-related data has become a currency in the information economy.Here lies a core problem for developers who need to create systems that had better address privacy issues.Currently, users don't fully understand how the electronic trails they create can be used, so they cannot understand their personal data's value.A key challenge for future ubiquitous system designers is to empower users to evaluate the trade-off between protection of privacy and access to improved service.
Meanwhile, legislation must contribute by defining the boundaries within which such trade-offs may occur [34].On the other hand, private information should be encrypted before transferring to the network administrator.Data security must be assigned higher priority because other issues may harm users but data leak may scare the user [35].
One more ambitious goal would be to provide users with a "sixth sense" that alerts them to serious privacy threats.In the real world, such mechanisms play a key role in survival.If we can provide a sixth sense for pervasive computing, we can avoid many serious threats.This sixth sense could be provided by studying the data patterns in the previous context history and benefiting these patterns to predict the potential threats.On the other hand we must revisit many authentication and authorization mechanisms in the context of pervasive computing.For example, what authentication techniques are best suited to pervasive computing [36].
One another important security issue is the security policy.Within UC environment, we want to determine a security policy that will simultaneously be an unobtrusive mechanism to the user as well as have the ability to discover the services available for the user in a transparent manner [30].

Robotics/ Embedded Systems
Robotics is an emerging field that mobilizes a computer and enables it to effect change at arbitrary locations in the real world [30,32].This form of mobility and computer aiding is one important feature for UC.Robotics and embedded systems are the practical form of this feature.

Computer Interface
The current forms of computer interface are not suitable for UC in many ways.Until now, human activities are performed within two separated spaces, the physical world and the cyber world.Although many activities can be done faster and more accurately using current technology, many other activities are still manually done.Moreover, the systems in UC environment continuously operate in the background; this type of systems should be designed with continuously present computer interface [31].Novel natural and continuous interaction modalities such as speech become a necessary component because they do not require bulky displays or input devices.There is much work left to be done to fuse physical and the cyber world together seamlessly and invent new natural and continuous modes of interfaces that facilitates the daily tasks without disturbing users [31,32].

Evaluating UC systems
The evaluation of UC systems still faces some challenges.This is why there is little published work on UC evaluation.UC systems are complicated and the evaluation factors include a wide range criteria and different perspectives.Therefore, formative and summative evaluation is difficult.In this situation, focusing on the important factors would be necessary.Among the different views of evaluation, this research recommended a task-centric and use need approach for evaluation [31].

UC Systems Deployment
In general, UC systems deployment can be considered as distributed systems.Technically, this implies some features such as open interfaces and supporting of interconnected component communication.Deployment for UC systems should ensure the system quality aspects that are emergent aspects such as performance, security and reliability [34].This type of deployment is not easy task with UC complicated systems.

UC Management Mechanisms
Within component level of UC systems, the component needs reconfiguration frequently because of the change environment.As the number of deployed components increases, system management will likely become increasingly problematic.While we want zero-configuration, low-maintenance systems, the reality is that substantial system management will still likely be required.For many components, the administrative domain might change dynamicallyfor example, depending on the proximity of different users or devices.The combination of requirements for low (or zero) administration, multi domain management, and support for rapid reconfiguration will likely raise new challenges for system management [34].

Quality of Context in Context-Aware Systems
On the other hand, most individuals who operate a personal computer have no knowledge of how to administer a single workstation.It would be unrealistic for the manufacturers of UC devices to expect their users to administer a complex network consisting of multiple devices.How does UC deal with this challenge?[29].

New Economic Models
One major challenge of UC is that none of UC scenarios seems to generate significant revenue.Consequently, UC systems will not receive the required financial support.Thinking about revenue in different way could help.The cost of deploying and operating a given component might need to be recovered in the form of many small contributions from applications that use the component.This could require support from components in terms of billing and accounting at a level previously unseen in widespread distributed systems [34].

Health Issues
IR technology is strongly used in UC systems for different purposes.Radiations problem will be one big health challenge in UC.This issue should be tackled seriously.We have to produce a technology that would be more environmental friendly [30,35].

Context-Aware Systems
In UC, to success in inventing helpful computing environment and natural interaction modes, we have to know how humans do that.People are successful understanding each other using their rich language, their prior knowledge of how the world works and the implicit knowledge of the everyday situations and patterns.Currently, computers are not qualified enough to communicate people and understanding the context.When humans want to accomplish a task via computers, they should learn the method the computers understand to accomplish the task.We can say that they should "translate" what they want for each task.This is nothing in comparing with using human interaction styles.Improving the computer's ability to understand and acquiring context can help increasing the effectiveness of communication between computers and humans and help producing more helpful computational services.

Context-Awareness Concept
Many researches addressed context-awareness in two approaches: improving the human-computer interaction by enabling computers to interact in a much more natural manner, and enabling computers to understand the context situation of the environment that they are located in.Applications that capture and use context are called context-aware.The increasing availability of sensing technologies makes it easier to sense context for different environment situations.CASs are becoming more popular and can be found in the areas of wearable computing, mobile computing, robotics, adaptive and intelligent user interfaces, augmented reality, adaptive computing, intelligent environments, and context-sensitive interfaces [18].
Context awareness allows applications to be aware of the context/environment that they are located in, and react according to the best possible user experience [18].It is the ability of computers to be perceptive, interpretive and reactive [16].CASs are able to adapt their operations to the current context without explicit user intervention [1,2].In [18], authors defined context awareness with the following statement: "A system is context-aware if it uses context to provide relevant information and/or services to the user, where relevancy depends on the user's task" [18].Therefore, CASs can capture context, view the captured context to the user or adapt according to the context situation and the application purposes.
According to authors in [18], CASs designing process can be summarized by this sequence of activities:

Context in Context-Aware Systems
There is a range of definitions for context.Authors in [37] define context as 'any information that can be used to characterize the situation of an entity that is considered relevant to the interaction between a user and an application'.According to authors in [22], context is the information that characterizes the current situation of environment for a participant in an interaction [22].A more concreted definition of context is introduced by [38] as "a member from the set of context types, such as location, identities of nearby people, objects and changes to those objects".Context information may be acquired in a variety of ways, such as applying sensors, network information, device status, user profiles and using other source [1].This often depends on applications' use.Environment monitoring applications use multiple types of distributed sensors to determine an environment context such as air pollution and temperature [2].Context is difficult to model because it contains many different dimensions such as location, time, located nearby devices, persons who are present, physical factors such as sound, motion, temperature … etc. [18].Of course, this is not has to be the case for all applications, it is different from an application to another.
Several ways have been addressed in literatures to classify context.Authors in [39] and [24] classified context into external and internal, which mean physical and user contexts respectively.Authors in [25] classified context into physical and logical contexts where the logical context is similar to the user context.Authors in [21] proposed three classes: (1) places such as rooms and buildings, (2) people, either individuals or groups, and (3) things such as physical objects and components.Authors in [16] classified context into three categories: (1) where you are (location context including which physical environment resources are located with the user), ( 2) who you are with (social context), and ( 3) what (ICT) resources are nearby.Authors in [86] introduces what they called "An Occupant-Centered Pragmatic Approach".This approach includes three aspects of context with some relations within each: (1) the first aspect is the physical environment around the occupant with the following relations: time, location, devices and people; (2) The activity of the occupant with mental and physical relations; (3) The physiological state of the occupant with preferences and feelings relations.
On the other hand, authors in [22] and [15] distinguished between static and dynamic context.Static context is invariant context such as a person's date of birth.Dynamic context can be highly variable over space and time, e.g.temperature.Context reasoning is also an active topic in context-aware systems [65] but it is out of scope of this paper.

Quality of Context (QoC)
This section introduces a review for different concepts and issued related to quality of context.These issues are the concepts of context quality, context imperfection, QoC parameters, QoC evaluation, and context management processes.

The Concept of Quality of Context (QoC)
Referencing to the quality issue in general, specialist can use some verified heuristics to ensure conformity of required quality level when dealing with computing systems.These heuristics are always represented as data to facilitate computing quality realization and management in order to support the performance automatically.
As a result, quality of context is information about the context information that enables us to judge the quality level of context.In light of that, the first definition of QoC was introduced by [3] as: "Quality of Context (QoC) is any information that describes the quality of information that is used as context information".In our view, this definition is simple and cannot capture all and critical qualities aspects that affect and ensure quality of context.This definition focuses on the representation of quality more than the key quality aspects for context within a context-aware ubiquitous environment.
In our opinion, this definition of QoC guides researchers to elaborate the context quality as general and with concentrating on inherent objective information about context information apart of consumer view and the real context.In light of this definition, the researchers investigated context quality to cope with problems accompanied with imperfect context such as imprecision and erroneous.This approach seems not balanced and it does not satisfy the objectives of the context consumer.Thus, later, the definition of QoC is modified by [14] to involve the Quality of Context in Context-Aware Systems subjective nature to the concept with engaging user satisfaction to the definition: "Quality of context indicates the degree of conformity of the context collected by sensors to the prevailing situation in the environment and the requirements of a particular context consumer".
This definition is better from the view that it highlights the sources and the consumers of the context and their needs and roles to ensure and realize quality.This view is more close to the references models of quality and its nature.This led us to discuss how the definition should be coined, what are the factors we should to concern.It is not a philosophy but definition will affect all other quality issues ranging from parameters, indicators, measurement methods and even the quality policy.What we can agree here that quality issue and standards have to take a place.Quality of any object should be the attribute of that object make it satisfied from the consumer.Therefore, any definition should reflect that.On other hand, QoC is a technical terminology that could be found at another context.The specific nature of this term as it is within context-aware ubiquitous environment should be clear in the definition.This is could inspire researchers investigating QoC parameters appropriate for these environments.

Context Information Imperfection
Context in CASs has many sources of ambiguity.Sensors can sense incorrectly, fail, or be unsure about the context that they sensed.For higher context, context inference engines can inaccurately derive context situations or at least be unsure about their inferences.Other types of shortcomings are coming with profiled context which created by user, up_to_dateness problem could be addressed [7-9, 11, 18].
Imperfection aspects could be: unknown (no available sensor information), ambiguous (conflicting information from different sources), imprecise (information with insufficient granularity), or erroneous (sensed or aggregated context not coherent with real situation) [13,40,41].
Context imperfections may lead to problems in realizing both functional and non-functional properties in a CAS [42].It could lead to serious problems due to the wrong decisions that might be made accordingly [12].
In our opinion, investigating reasons and aspects of imperfect context will contribute significantly when determining QoC parameters and quality level of context in general.The nature of the environment and the openness of CASs could be serious threats for the context integrity.Reasons related to context in highlevel "derived context" received low attention by researchers despite it is considered more important for introducing the service.
There are some parameters proposed in literatures with different titles but they define the same concept.It is important to address that to avoid repetition.We addressed three cases for that; (1) up_to_datedness and timeliness were used to reflect the freshness of the context for given purpose; (2) Precision, accuracy, and resolution are three titles define the granularity level of context; (3) Sensitiveness, access_rights, security_level are three titles for describing the security level as defined by the user.
Reliability is the probability of context being true according to sensor limitations [14,44].Timeliness indicates the degree of rationalism to use a context object for a specific application at a given time [3, 7, 14, and 44].Accuracy is the level of details in which the context information characterizes the real world [3, 12, and 44].Completeness indicates the quantity of information that is provided by a context object [7, 14, and 12].Security_level indicates the extent to which owner of context allows the context consumer to access context [14,12].Significance indicates the worth or the preciousness of context information in a specific situation [14,7].Usability indicates suitability of use for an intended purpose [14].Representation_consistency indicates the extent to which context representation format is consistent to consumer requirements [12].
Probability_of_correctness denotes the probability or the confidence that a piece of context information is correct based on its previous occurrences [3,47].
Trustworthiness also describes how likely it is that the provided information is correct; in comparison to the probability_of_correctness, however, trustworthiness is used by the context provider to rate the quality of the actor from which the context provider originally received the context information [3,7,46].For derived context, authors in [42] proposed a definition for state reliability of a service as the probability that all components and connectors that implement it do not fail all the times they are used (i.e.numbers of activations over components and interactions over connectors).Table 1 shows an example explaining how the different literatures address QoC parameters.The level required from these quality parameters varies from an application to another based on the nature of context and CASs area.
Authors in [14] have introduced a special point of view for QoC parameters that distinguishes between objective and subjective parameters.The objective parameters encompass the quality requirements that are independent of the context consumer.They tell whether the collected context information is free of error and suitable to be used at an instance of time or not.On the contrary, subjective parameters are related to the user requirements and for a specific purpose.Objective parameters proposed in [14] include Reliability, Timeliness, and Completeness, while the proposed subjective parameters include Significance, Access_Rights, and Representation_Consistency.Classification of the parameters into objective and subjective would be useful when we want to assess the context validity, as we should depend on the objective parameters.
When analyzing the changes in QoC parameters over the time, some remarks can be raised.The first version of QoC parameters was coming with affecting of the first definition of context, which concentrates on its representation nature, as it is information, and also it was affected by the reasons focuses in sensors shortcoming to produce accurate data.
Therefore, all parameters except up_to_dateness were describing the accuracy of data.The later updates of these parameters were better with more engaging of consumer requirement dimension and the measurement situation dimension to get more accurate view of reality.Moreover, references should inspire parameters establishing is very important issue.What factors should lead parameters determining efforts.Absolutely, definition of QoC and reasons of imperfect context should be part of these factors however, other factors could effectively help.We can employ context categories, context-aware applications classification, and context-aware systems aspects to deduce parameters that are more appropriate.In addition, more attention should be paid for describing different parameters accurately with referencing quality known standards.

QoC Evaluation
Many formulas for measuring QoC parameters have been proposed in the literature; mainly based on the quantification of these parameters [12,14,[48][49][50][51][52].Quantification means describing parameters with numeric values (decimal values within the range [0, 1] are usually adopted).This quantification is necessary for the following reasons: (1) for user, it is easier to deal with decimal values because it is more expressive and also it offers a useful scale for accurate measuring; (2) QoC measuring can be exploited for automatic context processing.
Authors in [14] use some information comes from sensor characteristics and specification and context consumers for QoC quantification.This information looks like the illustrated by Table 2.As explained above in this section, a metric can be objective or subjective.Table 3 summarizes QoC metrics and the calculation method.Table 2.A Summary of Information from Sensor Characteristics, Specification, and Context Consumers [14].

Accuracy
Extent to which data is correct and free of errors However, researches started introducing different sources and consequently formulas for some QoC parameters as these metrics and calculating methods are still not standardized and need a lot of effort by research community to make them standardized.Authors in [12] added modifications to some formulas used for QoC parameters measuring which introduced by [14].For instance, according to [14] completeness parameter for a context object is calculated as a ratio between sum of weights of available attributes of a context object, and sum of weights of all attributes of that context object.In contrast, authors in [12] found this way more expensive and not realistic, as we need to recalculate it again at each new reading of a sensor.Furthermore, this approach does not indicate if the context information is available and current.Therefore, authors in [12] proposed a measurement method for completeness that describes how the context information is complete, available, and current.
Table 4 summarizes the formulas introduced in the literatures to calculate QoC parameters (Formula 1 to Formula 14).All these formulas assumed the piece of context as context object and denoted to it as O.
Where   is current time, and   () is the time that the context object  was measured at it, and the context consumer determines validity_time.
. [14] Completeness Where m is the number of available attributes and n is the total number of attributes for context Where GranularityLevel(CR) is current granularity level and GranularityLevel(O) is granularity level of context object O. [14] Access_Rights Where: ( ∩ ) is frequency of Oi and O occurring together in the previous history and () is frequency of Oi in the previous history.Oi could be a single object and a combination of objects as m will include all possible combination of objects, which affirm  according to the previous history.

𝑷𝑷𝑪𝑪𝑪𝑪(𝒄𝒄𝑹𝑹
Where ce is the abbreviation for context element.p(cei|cej) is the conditional probability between the context element under investigation cei and the context element depends on cej.DCi is the totality of dependent context elements cej, which a context element under investigation cei depends on.
QoCp(cei) is the QoC parameter of the context element under investigation cei.n is number context elements cei depends on (n = DCi size) and m is the number of QoC parameters. [50] [53] Significance Where CV(O) is the critical value of context object  and   () is the maximum critical value that can be assigned (by the consumer) to context object O.  [54] introduced the idea of context layers and context relative weights to compute quality parameters.Moving up the context layers, context facts are derived from source data.This idea led to compute some quality parameters value according to the position of piece of context in the context pyramid.

On the other hand, authors in
For example, each fact has a measurable context confidence that is derived from the underlying source data uncertainties.Situations are created by combining context facts.Situation confidence is calculated from the underlying context facts by combining the confidence of context facts with appropriate context weights, resulting in a single measure of situation confidence.
The purpose of context weight is to quantify a context fact's contribution to the occurrence of a situation, with respect to the other context facts of the situation.Authors in [55] introduced the Bayes' Theorem to calculate confidence.Then, they improved their work by introducing more fine-grain layers in [56] with three layers: sensor, abstracted context, and situation.The situation can be inferred from many intermediate situations, which are all together called abstracted context.

Calculating the Overall QoC
Subsection 5.3 illustrates different methods that are proposed to measure a QoC parameter for context object individually.However, many methods have been addressed in the literatures to calculate the overall quality of context.Authors in [12] proposed three basic methods: average value of QoC parameters, maximum, and minimum values depending on the nature of QoC parameters.
Authors in [48] introduced a fine-grain approach that evaluates quality of context.They focused on quality management and how to evaluate context.They proposed weighting idea for different quality attributes according to application type.The roots of weighting solution were introduced in [57] for Byzantine Generals Problem.Authors in [48] introduced an idea for weights scale by proposing a wide textual/numerical scale (7 levels) that describes the relative importance for QoC attribute compared to other quality attributes (Table 5).Then, it assigns the same weight for all QoC attributes and then adds the weights produced by comparing quality attributes to each other.It uses the final weights when computing quality of attributes for each context.To formulate that, let qi,j be the ith quality parameter for the jth context information, with 1 ≤ i ≤ n and 1 ≤ j ≤ p.The overall QoC of the jth context information is illustrated by Formula 15 [48]:

Quality Policy for Context in CASs
Policies are used widely in the literature for determining required levels of quality.For quality of context, two common types of policies are used: quality policies and procedural policies.However, the nature of policy is still the same; authors in [58] denoted that policies which guide the behavior of entities within the policy domain.Quality policy is a set of quality rules that achieve quality objectives [58][59][60][61].This is true for quality policy in CASs.
Authors in [62] introduced an approach for designing QoC policy.They built their approach based on the assumption that each CAS has its own objectives and a group of possible scenarios.Therefore, quality policy should not be confined of quality parameters alone; it should consider the application objectives beside quality parameters.Accordingly, two classes of quality policy are defined, application driven policy, and QoC policy.
Authors in [62] distinguished between two types of QoC policies, static policy and dynamic policy.Static policy should be used when the value of a quality parameter can be predefined whereas dynamic policy defines the value of a quality parameter during run-time.Authors in [40] and [63] introduced a policy based approach for QoC.The idea behind this approach is to focus on determining the most important QoC attributes/indicators based on the nature of application and context type/class.It selects the context items (sensed raw data) among different sensors according to that and then determines the context situation (derived context) according to these policies.Authors in [48] recommended some QoC attributes for different types of context/applications as illustrated by Table 6.

QoC Management
CASs should be able to adapt according to the context information captured from distributed redundant context sensors.For correct adaption, these systems should ensure quality level of context information that characterizes different situations.This subsection is devoted to demonstrate the work that is introduced by research community for context management and context quality assurance and control.

QoC Assurance and QoC Control
According to ISO 9000 definitions [64], Quality Assurance (QA) is "a part of quality management focused on providing confidence that quality requirements will be fulfilled".Quality control is defined as: "A part of quality management focused on fulfilling quality requirements" [64,5].Elements such as managed processes, criteria, and qualifications competence should be identified [20,65].
Quality control emphasizes on testing to detect defects according to quality objectives and reporting to management to make the decision [6].Thus, quality control is a process within quality assurance, whereas quality assurance goes beyond quality control with not only detecting but beside that, improve quality by avoiding or at least minimizing issues that lead to defects [6].These general concepts about quality have led our thinking to introduce our framework for context quality assurance.
The quality management process should be not isolated from the context management process.Within each CAS, context management framework is the part responsible for context management.The next subsection describes its function and structure.

Context Management Frameworks
The part within CASs, which is responsible of quality assurance and quality control, is the Context Management Framework (CMF).According to [63,66], CMF is responsible for main functions that affect context quality, i.e., collecting sensor data, aggregating that information to compose the context, and extracting high-level context information by performing reasoning operations.Authors in [63] named it as Context Monitoring and Management Frameworks (CMMF).
Authors in [66] introduced an approach for context management systems; this approach improves context information qualities and reduces overall performance cost for context-aware systems.It exploits context information and context metadata information for context management.Authors in [66] presented six elements for CMF: context aggregator service, context discovery service, context provider service, context observer service, context ontology reasoned service, and context query service.
CMF should implement a mechanism to verify and control quality of context information in order to improve decision-making support for context-aware system that belongs to [41].Quality control is a part of quality aggregator element [11,63].This component/element helps the management framework system selecting the high-quality context based on quality attributes and quality evaluation method applied.Authors in [63] named this element as QoC evaluator.QoC evaluator (controller) evaluates QoC parameters for a context to help CMF resolving conflict and redundancy problems.Earlier in this section, we described context conflict resolving as a vital quality control process in CASs.
Authors in [2] introduced a clear example for CMF.They introduced a layered conceptual framework.The first layer is called sensors layer; it consists of a collection of different sensors.The word "sensor" refers to every data source that may provide context information.According to that, sensors can be Quality of Context in Context-Aware Systems classified into three groups: (1) Physical sensors, which represent the most frequently, used type.(2) Virtual sensors: this type acquires context data from software applications or services.For example, it is possible to determine an employee's location by a virtual sensor, e.g., by browsing an electronic calendar, a travelbooking system, emails etc. (3) Logical sensors: these sensors use couple of information sources.They combine physical and virtual sensors with additional information from databases or various other sources in order to solve higher tasks.
For example, a logical sensor can be constructed to detect an employee's current position by analyzing logins at desktop PCs and a database mapping of devices to location information.The second layer is called raw data retrieval.It uses appropriate drivers for physical sensors and APIs for virtual and logical sensors.The query functionality is implemented in software components which make low-level details of hardware access transparent by providing more abstract methods such as getPosition().By using interfaces for components, it is possible to replace an RFID system by a GPS system without any major modification in the current and upper layers.The third layer is pre-processing layer.The pre-processing layer is responsible for reasoning and interpreting contextual information.The sensors queries in the underlying layer most often return technical data that are not appropriate to use by application designers.This layer transforms the results of layer two to a higher abstraction level.In addition, in context-aware systems consist of different context data sources, the single context atoms are combined to high-level information in this layer.This process is also called "aggregation" or "composition".Context conflicts that might occur when using different data sources has to be solved in this layer as well.Often this conflict is resolved by using additional data such as time stamps and resolution information.The fourth layer, Storage and Management, organizes gathered data and offers them via a public interface to the client.The Application layer is responsible for implementing the actual reaction of different events and context instances.

Resolving Context Conflicts in CASs
In CASs, a solution that provides a ubiquitous context assembles the context information from a group of related context services, which is called context fusion [20].This fusion is also required because sensing technologies are not 100% reliable or deterministic [23].Even for the same instance of context, multiple sensors are commonly used for dealing with context ambiguity [18].On the other hand, it is very often to find more than one user share the same ubiquitous context-aware application and the same resources, conflicts may occur during adaptation actions due to individuality.
An approach to deal with conflicts is to allow users to manually resolve the ambiguity in context.Rather than using an automated approach, this approach exploits a user's knowledge about the situation to help resolving and removing any ambiguity in the sensed or inferred context.A user may be provided by a list of the most likely interpretations of context, ranked by likelihood, and asked to select the "correct" interpretation [18].However, this approach contrasts with the basic aspects of UC especially the invisibility, the natural interaction, and the autonomous systems.Context in nature has different levels, context conflict might occur through the different levels of context; while collecting sensor data from redundant context sources or while inferring the context situations in higher level or even when serving the different consumers of context.Literatures handled context conflicts for different context levels using different approaches.Authors in [67] distinguishes three categories of failures, they are: source failures, data failures, and context failures.With source failure, some sensors could be broken or lost connectivity, and no data is available.Data failures means that the reported value is completely out-ofrange, presents abnormal variability, too little precision or is not updated frequently enough.The context failure means that the context modeling which is typically a statistical process, may introduce a particular hypothesis as the most probable one, but it does not match reality.The idea of quality policy is used for resolving conflicts.Authors in [68] introduced conflict resolving policies that are defined on the basis of the quality of context parameters.Remarkable solution introduced by authors in [69] defines three layers of conflicts to handle all types of conflicts and adopts three policies for conflict resolution in three different layers accordingly: source layer with freshness policy, processor layer (modelling and reasoning) with reliability policy, and consumer layer with priority policy.
The experiments proved that using a combination between freshness policy and reliability is better.Similarly, two types of conflicts are addressed by [70]: service resource conflict and user preference conflict.Service resource conflict can occur when selecting only some users among many users that want to be provided with the same service, this can happen due to limited service resource.User preference conflict occurs when providing only some users with personalized service, because the preference of users is not the same despite the same context of users is identified.These two problems are still not resolved perfectly, because it is difficult to provide personalized services under limited resources [5,27,70].
The next three subsections describe in details the effort that is spent by the research community to handle context conflicts based on the three layers proposed in [69]: source layer (sensed context), processor layer (derived context), and consumer layer.

Context Conflicts Resolving in Sensed Context Layer
When conflict occurs, a system has to choose one context among many conflicted contexts; selection of a context value should be done based on quality indicators or specific heuristics.Many QoC policybased approaches were proposed in [1, 11, 40, 41, 47, 62, 63, and 71] for resolving sensed context conflicts.
Authors in [62] introduced an approach for resolving sensed context conflicts based on two views: quality policy and application requirements.Authors indicated that the solution should be applied by the context provider to protect the CAS from error propagation.As a part of a proposed middleware, authors in [47] proposed some quality attributes/indicators to cope with sensor limitations and discussed some alternatives to quantify them.These quality indicators are precision, freshness, spatial resolution, temporal resolution, and probability of correctness.
On the other hand, authors in [11] and [41] exploited the previous history of a context to forecast the correctness of the current one.The solution introduced by [11] and [41] resolves conflicts within the context fusion layer of a context management framework (CMF).This layer detects and resolves conflicts according to two quality attributes: probability_of_correctness and trustworthiness.Authors in [11] and [41] benefited the solution formalized for Byzantine Generals problem in [57].Since, this problem is a trustworthiness problem.By applying this formalism to resolve conflicts problem, the number of context dimensions that affirm a context data under investigation should meet the proportion of 3m + 1 to be considered reliable by the system, where m is the number of context dimensions that contradict it, i.e., at least two-third of context elements should affirm the investigated context element.
Authors in [11] classified conflicts into internal and external.They defined them as follows: internal conflict is "the context conflict/inconsistency that may occur by fusing two or more context elements that characterize the situation from different dimensions of a same observed entity in a given moment".Two context data (or more) are concerned in internal conflicts when CMF could not deduce which one is correct in fusion time.For example, let Tom is a user in a smart home system.The CMF indicates that Tom is in the bedroom based on WiFi-based location system.However, the light of bathroom is "on" and his agenda indicates that he has an appointment with his family doctor.In this case, there is an internal context conflict when fusing these three contexts to deduce current location of Tom.
Authors in [11] defined external conflicts as "the context conflict/inconsistency that may occur between two or more collected context data that describes the situation of an observed entity from the same point of view".For example, the indoor location of Tom determined by solutions such as WiFi, RFID, and Bluetooth technologies, i.e., each context data is gathered from a different context source to characterize the situation from the same context dimensions (location).In such case, which source should be selected to provide the correct data that composes current situation?This case is called external conflicts.
To resolve internal conflicts, the approach proposed in [11] is based on the idea that for a specific situation, the context element is not used alone; almost there is other context elements used along with it.There is a collection of context data that usually occurs together.Therefore, this approach utilizes the previous history of a context and dependencies between context elements to increase the probability that a certain context is correct.
The proposed technique uses Bayesian analysis to analyze the last occurrence of a piece of context and estimate probability of correctness of that piece of Quality of Context in Context-Aware Systems context.Context dependencies and relations affirm/contradict with probability rate within the range [0, 1] since in real situations, the degree of affirmation/contradiction is variable.To resolve the external conflicts, the proposed technique benefits the probability of correctness to compute trustworthiness using predetermined thresholds identified by the user.
Beside what mentioned in [11] and [41] about using forecasting for resolving context conflicts, many other techniques for forecasting can be also used.

Context Conflicts Resolving in Derived Context Layer
In this section, a state of the art context conflicts resolution in higher level (context situation) will be articulated.Higher level context means there are conflicts with inferred/aggregated context.
Many literatures employed the idea of application policies to handle conflicts in higher level context [59,60,[72][73][74].Authors in [72], introduced an algorithm to resolve context conflicts for context situation in case that there are many policies for applying different context situations and these policies do not cover all context situations that could occur in real time.The proposed solution calculates the offset for each conflicted situation and all policies, and then chooses the nearest policy.
Authors in [73] proposed a new idea for using policies where they use different 8 ordered policies for resolving conflicts in the case that the current policy does not resolve the conflicts.Authors in [74] introduced a solution for detecting and resolving context conflicts for CASs authorization system using the idea of policies.Authors used context graph-static model for detecting the context conflicts.
In [59,60], authors introduced a policy-based solution for resolving context conflicts with differentiation between two types of conflicts: static and dynamic conflicts.Static conflict can be resolved in compile time using one of predefined policies and dynamic conflicts is the conflicts which cannot be detected and resolved during the compile time.This situation could occur when the objectives of all active policies cannot be met.On the other hand, authors in [60] introduced a mechanism for assuring the consistency of the policies to avoid any conflict in the policies in case there is more than one policy applicable for one context situation.New idea introduced in [17] by using fuzzy-logic based decision-making engine for high-level context analysis and conflict resolution.
A prevention approach introduced in [75] by avoiding context conflicts (detection before happening) and not only conflicts resolving.The proposed solution is based on modelling context and modelling expected conflicts using semantic-rules and reasoning engine.
On the other hand, authors in [76] introduced a remarkable approach for deciding if context is predictable or not before using prediction for deriving context and consuming a lot of cost with unpredictable context.The proposed approach is based on the analysis of the time series representing the previous context information.

Context Conflicts Resolving in Consumer Layer
Despite of most context management frameworks/middleware manage situations where a single user exists at one time in a given context, it is very common and natural to assume that there are more than one user in real life environments such as home, office, etc.In these environments, users often compete against each other -either explicitly or implicitly-especially when they access the same resources.Many proposed solution used prioritybased policy to handle context conflicts.
Authors in [28] proposed a solution that adopted the idea of assigning weight value for users' preferences to resolve context conflicts.In addition, authors introduced a mechanism for conflicts detection using semantics (ontology representation) without explicit descriptions of the conflicts between different applications.Authors in [19] utilized various factors such as priority, credits, age, and time when formalizing the policies.
On the other hand, authors in [5, 23, and 77] introduced an approach that makes trade-off between QoS/QoE and resource/service consumption; in other words, the adopted policy for resolving conflicts minimizes the cost.Quality of service means that users' satisfaction should be satisfied with the application's tasks.
Another approach introduced by authors in [61] for avoiding context conflicts between different applications by allowing them to define context situations that are considered to be conflicts.After detection, the system should try -at first-to resolve the conflict automatically.An initial approach used to resolve conflicts is simply done by banning the execution of the respective application.
A more complex strategy is the adaption which can be done by inducing a negotiation between conflicting applications.In [78], authors developed another prevention solution by introducing a solution that starts within a CAS design phase.For each provided activity, a software module should be designed.
All modules developed for collective applications (for different users) are encapsulated into a single block called "conflict engine", which is performed during a single activity.The conflicts detection process performs a three dimensional analysis: involved users profiles, environment profile, and application tasks [78].
A preventive and proactive approach was introduced by authors in [26] using two mediated solutions.The first solution proposed a module that evaluates all users' feelings as a group and controls the mediation.The second solution used prediction to shorten the mediation time.

Discussion and analysis
As shown in this review paper, a lot of work has been done by research community for QoC.We have remarked many points that reflect the lack in the literature regarding to QoC.
The points that have been remarked in the literature related to QoC can be summarized as follows: Most work achieved in this area deals with context quality issues separately and not as integrated parts.There are many issues related to QoC that have been addressed in the literature such as context quality parameters [3,7,12,14,27,44,47,79,80], context quality measures [12,14,80], resolving context conflicts [11,40,63,66], context validity, and resolving context uncertainty [54][55][56]80].However, realizing quality aspects needs to comprehensive solutions that can integrate all these issues together taking into account the different elements of QoC within CASs.
Many solutions, which are introduced in the literature of context quality, have been built depending on a simple view of the context, whereas the context has a complex taxonomy and different views.Thinking about QoC should start by thinking about the nature of the context itself.For example, context information combines different levels of context.In the low level, there are context elements or context facts, which are aggregated to compose a higher context information (abstracted context), and then abstracted contexts with each other compose the context situation in the top level.Despite this point of research is vital, very few studies have insufficiently addressed this issue [54][55][56].
To explain this point, let us introduce the following example: in flooding forecasting contextaware system, there are wind speed, temperature, soil saturation, precipitation and rainfall duration which are considered context facts.Rainfall status is an abstracted context, which is concluded using rainfall duration and precipitation context facts.Rainfall status cooperates with the other abstracted contexts such as soil status to compose the final situation of the context, which is the "potential flooding".For this situation, quality of context in the lower level should affect quality of context in the upper level.To the best of our knowledge, this view has not been clearly addressed by the existing solutions of context quality.
On the other hand, a context fact could be sensed context such as temperature and user movement, or profiled context such as user calendar, whereas the context is derived in higher levels.In fact, quality aspects of sensed context should not be the same for profiled context.
Thus, these different views for context should be taken into account when thinking about any comprehensive solution to context quality control.
Most existing solutions of context quality parameters did not differentiate between the two basic types of parameters: basic quality parameters, which reflect context validity as a basic quality requirement (e.g.reliability, probability_of_correctness, freshness, and completeness), and the perfection parameters, which reflect other aspects of quality (e.g.privacy, precision, and representation_consistency).We believe that the basic quality parameters should take place, as it could be a basis for many context shortcomings such as context conflicts and context uncertainty.
Moreover, one shortcoming which can be addressed regarding QoC issue is that the previous approaches introduced for improving quality did not compare results against each other to evaluate their success; different researches used different criteria.For example, authors in [66] use the idea that the quality should reduce the computing cost; they used the cost as evaluation criteria.Number of computed triples against computing time is used to estimate quality improvement against cost.However, authors in [63] added number of context objects that have been deleted from the context store in a given period of time because they did not meet the quality criteria that have been set by user.To assess the success of quality solutions, many aspects should be tested.We are in need to determine the reflection of QoC on CASs and what are the criteria that should be used.Measures for quality control and end-user satisfaction of contextaware products need to be outlined [9].
Thus, we have to define and measure the overall performance using different quality parameters in terms of predefined criteria.In addition, we have to produce a wide scale model for QoC parameters for different applications using different parameters that are weighted based on application and context taxonomy.In the same point, the relations and interdependencies between these parameters should be addressed carefully to examine if we can exclude some of them to get more agile models of parameters.
Regarding to quality control processes, most work that has been achieved has focused on conflict resolving, maybe this is because other shortcomings such as missing values can be handled using general statistic and intelligent techniques.The proposed solutions for sensed context conflict resolving still have some shortcomings.Using QoC parameters only for conflict resolving is not enough.That is because of the shortage of sensors, which are the basic resources of context element values.Three basic problems can be addressed with sensors reliability: (1) The default accuracy regarding to the sensor technology type.For example, the spatial position of an object could be captured using different technology (accuracy) such as GPS, infrared, and Bluetooth; each one of them has its default according to the technology.
(2) The distance between sensor and object.Each type of sensors has different spatial range for reliable sensing.
(3) Failures could happen with hardware due to different expected or unexpected reasons.These failures do not necessary make the sensor out of service; sensor can continue providing data but unfortunately with wrong values.This scenario could happen when a context-aware system is running thus; these systems could be critical and could lead to serious problems.We can select the best sensor according to first and second problems.This means that the higher value of reliability regarding the accuracy is defined by manufacture according to the distance between sensor and object.This could be great if the sensor works very well and does not suffer from any hardware failures.However, if the sensor has any undetected hardware problem, these two factors do not make a sense for the reliability.
Therefore, a solution that uses the previous context history to resolve conflicts could be a good solution.It can exploit the previous history to calculate probability of correctness for each conflicted value.The method that can be used to calculate total probability of correctness is to use the average of conditional probability for context element under investigation given other context elements.Sometimes, the average leads to misleading results.In case of different affirmations of context elements have extremes, this will affect the average value.Thus, probability of correctness for some context elements could be better or worse while this is not correct.Summation of affirmation would be better, because we can know the maximum value of the affirmation if we know how to use context elements for prediction.
Beside quality parameters that indicate quality level of each piece of context, other general long-term quality indicators are essentially needed to serve different context stakeholders such as context provider, consumer, and CAS developers.To the best of our knowledge, most work that has been conducted by researchers has a lack regarding to this issue.For example, the quality level of a group of context facts in the lower level will introduce an important general indicator to know the quality of the sensor network that produced that context.These indicators could indicate the need to improve the whole network of sensors in a particular area.For example, a network of weather sensors belongs to a particular station that feeds a weather forecast context-aware system.
The next generation of context-aware ubiquitous systems is rapidly growing and in the near future it should be standardized for quality parameters and indicators, which requires a lot of integrated effort done by the research community.

Research trends in Context-Aware Systems
As a hot area, it is obviously to say that UC and CAS systems have many research trends in different aspects and several issues.From our point of view, these trends come mainly from the gap between the way the people are realizing, thinking and judging and the way that the computer does.Intensive and integrated research effort between the computing field and the medicine field should be planed and arranged carefully.The majority of research should be devoted for understanding the super abilities of human in thinking and realizing the context and the way they are judging and making decisions.Based on that, the abilities for the current CASs sensor-rich environment still so far and so silly.
Other trend directions come from the supportive environment for CASs -the car that holds the CASs technology-such as the privacy, security and trust issues.As the lack of research for review papers that addressed UC and CASs trends, we have done our literature review this section concerning UC and CASs trends based on the research from the year 2000 to 2015.Existing researches recommended different research trends for Context-aware systems.Research directions are interleaved and complementary.These trends could be concluded as follows.

Producing High Quality Context
The title that the different research addressed this research trend is variant, some trends were more specific and some were more general, however, the concept still unified.CASs are smart systems that make their decisions based on the context that they realize.It is "context-aware".According to author in [81], the phrase "context-aware" is misleading as this term indicates that CASs can sense and realize the real world around just as human do.These abilities are still very far from reality.The idea is not solely, in how the five human sense works together but also in how people thinking, interpreting, concluding and judging.Researches in machine learning algorithms and context fusion are still far away to simulate the human abilities [81].Many different context integration, context reasoning and distribution techniques can be used to acquire and distribute context.Understanding context data and appropriately annotating it automatically forms a real problem [82].Robust quality frameworks should be developed to accompany the trip of context from acquiring, fusion, integrating, deriving and distribution into making the different decisions based on this context.Context quality frameworks need to be defined and employed for different levels of context and different layers of CASs; developing an efficient uncertainty management models to capture the uncertainty aspect in CASs different operation is very important [82].
On the other hand, the nature of ubiquitous computing environment where CAS is laying adds other obstacles.Mobility, openness, interleaves systems are some examples for this environment.In addition, many sensors within CASs are displacement in motion-based activity recognition systems that actually affect the application services accuracy [83].
Many sub-trends can be derived from this direction such as sensors selection, context capturing, context fusion, context deriving, context quality, and context management frameworks.However, we prefer to use the "context quality" terminology because it can express and conclude the concept deeply.Quality of context should be concern at all levels of context production processes to create a true awareness for CASs.The benchmark of these processes that should be concerned is the human mental and emotional processes and the synergy between the two sides.The quality of context, the quality of process and the quality of sensors/devices could be good triggers for research in this area.

Efficient Proactive Learning Algorithms for context processing
CASs is the basic technology of Ubiquitous Computing.According to authors in [84], the major aspect that can summarize CAS abilities is "Proactivity".To make CASs proactive, it should be smart, good learner, has a long memory and can learn from its experience.Creating like such environment is extremely important and not easy.To what extent the previous history can help in learning and predicting the current context [85].Current context inference algorithms are still complex and heavy to deploy in UC on-line environment.Un-supervised algorithms could be good solution for producing lightweight context inference algorithms [83].Actually, this research trend could be involved in the previous subsection as one of the main process for producing high quality context; however, we prefer to present it in a separated subsection due to its importance in UCs.

Security/Privacy/Trust
Quality of Context in Context-Aware Systems Within UC and every day computing environment, autonomous every day activities in our real life and the huge number of CASs around us will create a general feeling of users that they are being monitored all the time [83,84].Trust, security and privacy will be one important issue during designing the several layers CASs [83,82]  What are the minimal services that an environment must provide to make context awareness feasible?What are reasonable fall-back positions if an environment does not provide such services?[85].Designing a generic CASs Frameworks and middleware will reduces the cost of handling contextual information selection based on its accuracy and the different purposes of CASs.Designing such CASs frameworks and standardization of CASs infrastructure has not clearly identified.The challenge is coming from the diversity of context-aware applications and their required types of contextual information, sensors, and inference algorithms types.One solution could be benefiting advantage of emergent cloud computing technologies.Cloud computing enables information sharing and other situational resources among mobile devices.Context information could be stored in a cloud and used by different CASs applications for different purposes.
Thereby, this information has does not need to be captured from different sensors networks that will be decrease the computation cost in general.The same sensor network could provide the same contextual information in different accuracy levels to be appropriate to the different needs of CASs applications.Different types of sensors and different types of inference algorithm could be used by trade-off between the context information accuracy and the time/power cost [85, 83, and 84].

Efficient Solutions
CAS usually works all the day thus, what is the overhead of considering context in a CAS?What techniques can we use to keep this overhead low?The energy/power consumption and computing cost should be one of the important research trends that need to be considered [85,83].CASs use a wide range of sensor networks and context inference algorithms with different level of efficiency.
Until now, using smart devices depends on a limited battery.The growth of energy is slow compared with the increasing need of energy consumption [83].Efficient sensor management systems infusing low level sensory operations need to be addressed.Authors in [83] introduce some suggestions about that.The proposed solution is based on the idea of "dynamic sensor selection" where there are quantum and intervals for sensory sampling and selection.Thereby, sensors can be put in an order according to their power consumption levels and application relevance depending on an interested context [83].On the other hand, establishing such models and software solutions for CASs power consumption in UC will be useful for dealing with this diverse environment where there are different sensors and devices with different energy consumption needs.This could be achieved by finding the relationship between user activity and energy cost; special applications could be developed to gather data on user behavior by tracing usage pattern on device.
Current methods use external equipment to model energy estimation based on measurements of device operation in different operation modes.In contrast, recent studies prefer working without using extra equipment to track key operating system parameters and hardware components [85,83].In addition, studying the relation between the usage patterns and battery depletion in non-linear mode will make CASs to be energy-aware and will lead to successful discovery of optimal energy reduction solutions that will eventually help maximize the wasted energy consumption to improve the QoS of CASs [83].Besides battery issues, context inference algorithms are complex and heavy to process on-line as required in UC, there is a need for producing lightweight context inference algorithms [83].

CASs Services Using Mobile Cloud Computing
Cloud mobile computing is an emergent field that will facilitate the CASs performance.The idea is building a shared pool of context resources that are provisioned by cloud Internet services and mobile networks.This will be provided with minimal cost of power with benefiting the cloud mobile power and passing the limitation of traditional sensors and devices power and batteries [83].

Conclusion
This paper articulates a survey of the state of the art on QoC in CASs.It presents an analytical review of QoC issues in CASs including QoC definitions, QoC parameters, quantification methods of QoC parameters, and resolving context conflicts in CASs.The paper then discusses the current and future research directions on QoC in CASs.It is argued that a comprehensive framework can be developed to overcome the limitations of current QoC models in CASs; this will be addressed in future work.

Table 4 .
A Summary of Formulas that Used in Literatures for Evaluating QoC Parameters. ( − ) is the distance between context object and sensor,   is the maximum distance and  is accuracy of sensor.
CO(O) is completeness of a context object and U(O) is timeliness of object .The values [14] [12] A.A.Q Al-Shargabi, F. Siewe and A. Zahary NumberOfAnsweredRequest and NumberOfRequest can be obtained from a log file.Where  is a constant of normalization ranging in [0,1] depending on maximum and minimum values of transformation effort.

7. 4
Generic Context-Aware Frameworks In ubiquitous computing environment, different CASs interact with each other, share the context and may share the sensors networks for different purposes.Sensor networks encompass different sensing technologies with different accuracy.Under what circumstances should CASs use one and not another.

Table 1 .
An Example of QoC Parameters in Different Literatures.