{'fraction_non_alphanumeric': 0.016666666666666666, 'fraction_numerical': 0.0, 'mean_word_length': 5.670940170940171, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Conflict Resolution Method in Context-Aware Computing

The creation of various mobile devices speeded up the development of context-aware computing. Context-aware applications are able to adjust execution policies at any moment according to context information such as equipment's position, electric power, network bandwidth, and so on. In various context-aware systems, an important solution is to isolate executable codes in different context into a number of program segments and to select different execution policies according to the context in the process of operation, thus increasing the programming flexibility. However, the method can result in conflicts, making the system unable to select correct execution policy. This paper proposes a kind of algorithm designed to resolve conflicts. The algorithm calculates the selection center of each policy and the offset value of each conflicting policy under the current context environment. The algorithm will select execution policies through comparing offsets of policies, thus eliminating conflicts. To avoid the problem of policy thrashing resulting from frequent changes of context environment within a small scope, the algorithm modifies the calculate method of offset through the introduction of persistence coefficient. Experiments testify that the algorithm can effectively eliminate conflicts and well manifest the intention of policy definition, making policy selection more reasonable. Meanwhile the algorithm can avoid the thrashing of policy selection, providing more satisfaction to user.