Design and implementation of light-weight rules engine on IoT gateway
TIAN Ruiqin1, WU Jinzhao1,2, TANG Ding3
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
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.
[1] CHEN H, JIA X, LI H. A brief introduction to IoT gateway [C]// Proceedings of the 2011 IET International Conference on Communication Technology and Application. Piscataway: IEEE Press, 2011:610-613. [2] GENG Q. Research of a domain-oriented rule engine [D]. Beijing: Beihang University, 2009.(耿庆宦. 面向领域的规则引擎的研究[D].北京:北京航空航天大学,2009.) [3] ZHANG Y, ZHAO J, XING C. An extensible framework for Internet booking application based on rule engine[C]// Proceedings of the Sixth Web Information Systems and Applications Conference. Piscataway: IEEE Press, 2009: 139-142. [4] CHOI C, PARK I, HYUN S, et al. MiRE: a minimal rule engine for context-aware mobile devices[C]// Proceedings of the Third International Conference on Digital Information Management. Piscataway: IEEE Press, 2008: 172-177. [5] FORGE C L. Rete: a fast algorithm for the many pattern/many object pattern match problem [J]. Artificial Intelligence, 1982,19(1):17-37. [6] XIAO D, ZHONG X. Improving rete algorithm to enhance performance of rule engine systems [C]// Proceedings of the 2010 International Conference on Computer Design and Applications. Piscataway: IEEE Press, 2010: 572-575. [7] SOTTARA D, MELLO P, PROCTOR M. A configurable Rete-OO engine for reasoning with different types of imperfect information [J]. IEEE Transactions on Knowledge and Data Engineering, 2010, 22(11):1535-1548. [8] BATORY D. The LEAPS algorithms, 94-28 [R]. Austin: University of Texas at Austin, 1994. [9] HEUSINKVELD J, GEISSBUHLER A, SHESHELIDZE D, et al. A programmable rules engine to provide clinical decision support using HTML forms[J]. Proceedings of the AMIA Symposium, 1999,1999:800-803. [10] ZHANG R, YIN J. Design of configurable rule engine for information filtering [C]// Proceedings of the 2009 IEEE International Conference on Web Information Systems and Mining. Piscataway: IEEE Press, 2009:752-755. [11] ZHANG G, SHAN W, WANG F. Research on the promotion of rule engine performance [C]// Proceedings of the 2010 2nd International Workshop on Intelligent Systems and Applications. Piscataway: IEEE Press, 2010: 1-3. [12] DEPURU S S S R, WANG L, DEVABHAKTUNI V. A rule engine based classification algorithm for detection of illegal consumption of electricity [C]// Proceedings of the 2012 North American Power Symposium. Piscataway: IEEE Press, 2012:1-6.