In recent years,with the development of wireless communication and sensor technology,pervasive computing has gained popularity in many fields.For example,mobile applications use various sensors to collect surrounding information of environment,and then accordingly make adaptations and provide smart services.To maintain services with high quality,collected contexts should be accurate.However,due to sensing noise,contexts are likely to be inaccurate or even conflicting with each other in practice.This is known as context inconsistency,which,if left unattached,can cause an application’s abnormal adaptation or even failure.To address the context inconsistency problem,one promising approach is to conduct constraint checking for detecting context inconsistencies and identifying problematic contexts before they are fed into the application.Specifically,one should prepare pre-defined consistency constraints for specifying some of applications’ necessary properties,and then,collected contexts can be checked against such constraints to see whether there is any violation at runtime.If yes,the violation represents certain context inconsistencies,and their related contexts are problematic,which should be handled before being accessed by applications.In practice,lots of existing work have been proposed to conduct efficient and effective constraint checking.However,we still face two problems.First,there is no unified framework which can integrate those existing approaches together yet.As a result,when researchers plan to use existing approaches or propose some new optimization work based on them,they often need to reproduce or even reprogram existing approaches from scratch for their own application scenario,and this leads to extremely heavy and repetitive work,and with no doubt,can be timeconsuming and laborious.Therefore,in this thesis,we design and implement a unified context management framework called CMID,which organically founds unified structures for context management and integrates the mainstream related approaches for context consistency processing;Second,the existing work can not fully meet the efficiency requirements of constraint checking.Therefore,based on CMID framework,we also propose a more efficient constraint checking approach called CPCC.Specifically,the primary contributions of this thesis are as follows:1.We have designed and implemented a unified framework CMID for context consistency processing,which can organically(1)support various existing works through the configuration options provided,(2)support some convenient investigation of new work based on it,and(3)support convenient applications for CMID to new application scenarios.2.Based on CMID,we have proposed a new constraint checking approach called CPCC,which combines existing incremental constraint checking and parallel constraint checking approaches.Through experiments,we also observed that CPCC can be easily developed and designed based on CMID with little duplication of efforts,which can greatly improve the efficiency of constraint checking(up to 40.5%).3.We provide a user-friendly graphical interface for CMID,allowing users to access system’s functions through the configuration options provided by the framework in practice,and exhibit results of constraint checking vividly,such as checking time,false positives,and false negatives in the form of charts.4.We also carefully designed experiments to evaluate the usability,ease of use,scalability,and migratability of CMID:(1)we evaluated whether the performance of the existing work that implemented under CMID are similar to those in their original literatures,to verify its usability and ease of use;(2)we designed CPCC into the CMID with little duplication of efforts to verify its scalability;(3)we migrated CMID to a new application scenario on highway charging to verify its migratability.The results show that CMID has excellent usability,ease of use,scalability and migratability. |