SSRules:让智能家居自动化规则更易于编写和检查
作者:
作者单位:

作者简介:

王博(1997-),男,学士,主要研究领域为物联网,智能家居.
张昱(1972-),女,博士,副教授,CCF杰出会员,主要研究领域为面向新领域的编程框架与系统优化,软件分析与软件安全,量子软件.
耿佳宁(1997-),女,硕士生,主要研究领域为物联网安全.
李向阳(1971-),男,博士,教授,博士生导师,CCF专业会员,主要研究领域为移动计算,无源网络,智能感知,物联网,安全隐私,数据共享和交易.

通讯作者:

张昱,E-mail:yuzhang@ustc.edu.cn

中图分类号:

TP311

基金项目:

国家重点研发计划(2018YFB0803400);国家自然科学基金(61772487);安徽省自然科学基金(1808085MF198)


SSRules: Make it Easier to Write and Check Automation Rules for Smart Home Systems
Author:
Affiliation:

Fund Project:

National Key Research and Development Program of China (2018YFB0803400); National Natural Science Foundation of China (61772487); Anhui Provincial Natural Science Foundation (1808085MF198)

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    智能家居赋予家庭设备以智能,受到用户的广泛欢迎.由于用户需求不同,服务提供商采用“触发-动作”编程(TAP)模式以支持用户定制规则.然而,现在TAP编程和智能家居执行引擎中流行的Event-State时序范式极易出错,且难以修改规则和追踪运行错误.对TAP缺陷的原因进行系统分析之后,提出一种编写和修改难度较低、且能够检测规则运行异常的方案,记为SSRules.SSRules允许用户以一种改进的State-State时序范式输入规则,并基于Z3定理证明器将其翻译为Event-State时序范式,且为开源智能家居系统Home Assistant所接受的规则输入.考虑到智能家居需要实时掌握设备的动态,SSRules引入了运行时子系统获取实体状态信息,并对规则执行有效性检查.最后,基于Unity3D开发了智能家居模拟器HA-Simulator.测试结果表明:SSRules与传统方法相比表达简洁,规则数目平均减少60%左右,且能够及时检测瞬时异常并记录原因,更易被用户理解和使用.

    Abstract:

    Smart home systems make home devices smart and are widely welcomed by users. Due to different user needs, service providers use “trigger-action” programming (TAP) mode to support user-tailored rules. However, the Event-State paradigm, which is now popular in TAP programming and smart home rule engines, is highly error-prone, and the modification of the rules and the tracking of errors are difficult. After systematic analysis of the causes of TAP defects, a scheme with low difficulty in writing and modification and being able to detect abnormal rule operation is proposed, denoted as SSRules. SSRules allows users to enter rules written in improved State-State paradigm, and SSRules can translate them into rules written in Event-State paradigm and acceptable by the open-source smart home system Home Assistant based on the Z3 Theorem Prover. Considering that smart homes need to master the dynamics of the device in real-time, SSRules introduces a runtime subsystem to obtain state information and perform rule execution validity checks. Finally, a smart home simulator HA-Simulator is developed in Unity3D. Tests on it show that SSRules is more concise than traditional methods, the number of rules is reduced by around 60% on average. It can detect transient anomalies promptly and record the cause, which is easier for users to understand and use.

    参考文献
    相似文献
    引证文献
引用本文

王博,张昱,耿佳宁,李向阳. SSRules:让智能家居自动化规则更易于编写和检查.软件学报,2021,32(12):3728-3750

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2020-02-21
  • 最后修改日期:2020-04-28
  • 录用日期:
  • 在线发布日期: 2021-12-02
  • 出版日期: 2021-12-06
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号