Font Size: a A A

Design And Implementation Of Office Building Device Control System Based On Rule Engine

Posted on:2022-03-12Degree:MasterType:Thesis
Country:ChinaCandidate:R ZhengFull Text:PDF
GTID:2492306740491984Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the continuous development of the Internet of Things technology,more and more devices in office buildings have the ability to access the network,forming a large-scale device network composed of sensors and electromechanical devices.It is a challenge to manage and utilize these devices.In order to meet the flexible and changeable requirements of device control,the thesis applies the rule engine to the office building device control system.Applying the existing rule engine products directly to the device control of office buildings will have the problems of complicated rule configuration,poor performance,poor usability and low support for timing rule functions.In response to these problems,this thesis improves the rule engine module in the open source Internet of Things platform Thingsboard to realize the device control system DCRules based on the rule engine.The main work of the thesis includes:(1)Designs and implements a rule description template based on the ECA model that is easier for users to understand,and provides an intuitive and easy-to-operate visual point-and-click rule editing function.This improvement overcomes that the rule description template based on the directed acyclic graph in Thingsboard is not friendly to ordinary users.(2)Designs the Rule Chain model corresponding to ECA rules which is an intermediate description form of user-oriented ECA rule and executable code.It mainly describes the logical relationship between atomic statements in ECA rule and lays the foundation for subsequent executable code generation.(3)The dynamic evaluation of expressions in the rule verification process is realized based on the expression evaluation engine Aviator,instead of relying on the Java Script script configured by the user,which reduces the user’s difficulty in use.(4)Aiming at the problem of high redundancy of data reported by devices in the office building environment,a Bloom filter is introduced to filter out messages reported by devices irrelevant to the triggering event,avoiding these messages from triggering the rule verification process and reducing system efficiency.The dynamic expansion and dynamic reconstruction mechanism of the Bloom filter is designed to make up for the disadvantages of low bit vector space utilization and the lack of support for deletion in the basic Bloom filter.(5)Designs and implements the DCRules cluster deployment plan,which improved the availability of the system.The Quartz framework is introduced to realize the conversion from timedriven timing tasks to message-driven rule verification,and the timing rule function is realized.Through Pulsar’s shared subscription model and Quartz’s cluster management capabilities,the problem that multiple application instances in a cluster environment may repeatedly trigger rules can be solved.(6)Based on the above research work,the prototype of DCRules is designed and implemented.The test results show that the solution in this thesis is effective and can meet the requirements of rule-based office building device control.
Keywords/Search Tags:Rule Engine, ECA Rule, Actor Model, Bloom Filter, Cluster
PDF Full Text Request
Related items