| In recent years,the Internet of Things is rapidly integrating with various fields.With the increasing demand for devices from traditional enterprises to connect to the network,the rapid growth of IoT devices and types has been promoted.Due to certain differences in the basic composition,function implementation,communication protocols,and data transmission standards between different devices,the fragmentation of IoT devices is becoming more and more serious.In the process of adding new types of equipment to the network,it is often necessary to modify the IoT platform according to the characteristics of the equipment,which not only increases the cost of enterprise investment,but also reduces the speed of equipment access to the network,and also affects the process of intelligent IoT.Based on the actual needs of Beijing Dongfu Jiuheng Instrument Technology Co.,Ltd.,a manufacturer of grain quality testing equipment in the grain industry,to establish a management platform for IoT devices,this thesis aims at the access and management of heterogeneous devices,the storage mechanism of massive heterogeneous data,and the expansion capability of business logic to design and implement an extensible IoT access middleware.Its scalability is mainly reflected in the access and adaptation of various IoT communication protocols,the adaptation and management of heterogeneous IoT devices,and custom business logic.The specific work completed in this thesis is as follows:1.Completed the whole development process of an IoT access middleware through requirement analysis,outline design,detailed design and implementation.This middleware provides access and management functions for heterogeneous IoT devices,management interfaces for external applications,and system management pages for system administrators.The core modules in its system architecture include device access layer,device management module and rule engine.2.The device access layer is designed and implemented to support multi-protocol heterogeneous device access.Based on Netty,it implements support for HTTP,WebSocket,CoAP and MQTT IoT communication protocols.The adaptation of multi-source heterogeneous data is realized through the custom data standardization method,and the device authorization and authentication capabilities are realized with the help of JWT.3.The device management module is designed and implemented to support the adaptation and management of heterogeneous IoT devices.Heterogeneous devices are abstracted through the object model to eliminate differences in devices.Implement device communication decoupling through device shadows.Based on MongoDB,an efficient access mechanism for unstructured time series data generated by IoT devices is implemented.4.The custom business logic function is implemented through the rule engine.Combined with the device access layer and the device management module,a rule engine implementation scheme is designed,which adopts the chain combination of various rule nodes to realize the separation of business logic and source code,and completes the dynamic management for extended business logic.The IoT access middleware implemented in this paper can help enterprises accelerate the process of device network access and reduce development costs.At present,this middleware has been running in the Internet of Things management platform system for rice taste meter and rice appearance detection system,and the system has been delivered to users and has been tested online. |