计算机应用 ›› 2015, Vol. 35 ›› Issue (4): 1035-1039.DOI: 10.11772/j.issn.1001-9081.2015.04.1035

• 人工智能 • 上一篇    下一篇

物联网网关中轻量化规则引擎的设计与实现

田瑞琴1, 吴尽昭1,2, 唐鼎3   

  1. 1. 中国科学院 成都计算机应用研究所, 成都 610041;
    2. 广西混杂计算与集成电路设计分析重点实验室(广西民族大学), 南宁 530006;
    3. 中国科学院声学研究所 高性能网络实验室, 北京 100190
  • 收稿日期:2014-11-05 修回日期:2014-12-18 出版日期:2015-04-10 发布日期:2015-04-08
  • 通讯作者: 唐鼎
  • 作者简介:田瑞琴(1991-),女,甘肃静宁人,硕士研究生,主要研究方向:网络化软件; 吴尽昭(1965-),男,吉林扶余人,研究员,博士,主要研究方向:形式刻画与验证、集成电路设计与验证; 唐鼎(1976-),男(土家族),湖南张家界人,副研究员,博士,主要研究方向:宽带无线接入、物联网。
  • 基金资助:

    国家自然科学基金资助项目(11461006, 11371003);广西自然科学基金资助项目(2011GXNSFA018154, 2012GXNSFGA060003);广西区主席科技资金资助项目(10169-1);广西教育厅科研资助项目(201012MS274)。

Design and implementation of light-weight rules engine on IoT gateway

TIAN Ruiqin1, WU Jinzhao1,2, TANG Ding3   

  1. 1. Institute of Computer Application in Chengdu, Chinese Academy of Sciences, Chengdu Sichuan 610041, China;
    2. Guangxi Key Laboratory of Hybrid Computation and IC Design Analysis (Guangxi University for Nationalities), Nanning Guangxi 530006, China;
    3. High Performance of Network Laboratory, Institute of Acoustics, Chinese Academy of Sciences, Beijing 100190, China
  • Received:2014-11-05 Revised:2014-12-18 Online:2015-04-10 Published:2015-04-08

摘要:

针对物联网网关不适用于多个应用场景的问题,提出了在网关上实现规则引擎的方法。该方法通过"关联事实"属性和 "议程推理"机制,解决了传统规则引擎如JRules等无法应用于轻量级网关设备并且运行时间和响应时间较长的问题。添加"关联事实"属性能减小匹配规则集的大小,"议程推理"机制能避免匹配过程中不必要的等待时间。基于上述方法,在物联网网关上设计并实现了一种快速轻量化规则引擎(FLRE),并用规模不等的数据集测试。实验结果表明,添加"关联事实"属性能将规则引擎的运行速度提高8%~30%,"议程推理"机制能将规则引擎的响应速度提高7%~35%,使规则引擎能够高效地应用于物联网网关上。

关键词: 物联网网关, 轻量化规则引擎, 运行时间, 响应时间

Abstract:

In order to apply the Internet of Things (IoT) gateway to various scenarios, a light-weight rules engine was proposed, through which users can define personalized rules on demand. However, the limited resource for computing and storage prevents the traditional rules engine, such as JRules, being applied on the IoT gateway directly. By the "related facts" attribute added to each rule and the mechanism of "Agent-Inference", both the running time and the response time of the rules engine were reduced. Adding the "related facts" attribute to each rule can reduce the number of the rules involved in matching operations, and the mechanism of "Agent-Inference" can reduce the waiting time for available rules. Based on these methods, a Faster Light-weight Rules Engine (FLRE) was implemented and applied to IoT gateways. The experiments on different-size data sets showed that the running efficiency was increased by 8%-30% with adding "related facts" attribute, and the response time was decreased by 7%-35% with using mechanism of "Agent-Inference". The evaluation shows the two methods are effective to apply the light-weight rules engine to the IoT gateway.

Key words: Internet of Things (IoT) gateway, light-weight rules engine, running time, response time

中图分类号: