| Smart home can monitor the living environment and supply convenient service for users via wireless sensor actuator networks,providing us comfortable living surroundings with rules subscription and execution.Users can define rules to meet demands,and the system will automatically check and execute the rules,which is now the most special service in smart home.Meanwhile,users can set up scenes with existing rules.All above make life easier.However,one of the result is the rapid increase of rule amount and complexity,leading to redundancy in the progress of adding rules and executing.Redundancy may burden the system,influence the management and decrease the efficiency.So we design and implement an scheme to detect and avoid rule redundancy.Firstly we introduce the structure of smart home established by our lab and analyze the shortcoming.Furthermore,we briefly describe the development and improvement on the system,including the design and implementation of sele-adaptive system for driver scripts of devices,rule system for rules and scenes institution,in addition to the improvement of information encryption,user privilege,data format and other functions.We build a model for rule description and design the new scheme detecting and dealing with rule redundancy.We abstract the character of rules and come up with a model called TAS,representing Trigger,Action and Status.We implement the classification,analysis,mergence,etc.,and with defined redundancy class,successfully describe the relation between rules where there is redundancy.According to this,we design the algorithm for redundancy detection and apply it in the progress of rule defining and executing.The algorithm also detects the redundancy in scenes for the purpose of redundancy avoidance and elimination.We implement the algorithm in the smart home system in our lab and with the result of tests,the scheme based on TAS model can resolve and classify the rules and identify the part or complete redundancy inside and between rules.Compared with some existing schemes,ours takes the advantage of pertinency and accuracy.Moreover,the scheme achieves redundancy elimination in the process of rule creation and scene establishment,and redundancy avoidance in the process of rule execution and scene startup,bringing obvious decrease in rule amount and time,and rise of efficiency. |