[0018] Below in conjunction with accompanying drawing, the present invention is described in detail.
[0019] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, and are not intended to limit the present invention.
[0020] see Figure 1-Figure 2 , this specific embodiment adopts the following technical scheme: it includes a front-end field controller and an Internet of Things gateway server, and the front-end controller accesses the sensors, transmitters and executives with wired or wireless network interfaces on the production site through the drive protocol provided by each device Intelligent device or RTU, and use the MODBUS/TCP general protocol recommended by GB/T-19582.3 to transmit the collected field data to the gateway server to realize the information collection layer function of the intelligent Internet of things; the gateway server of the Internet of things is based on the configuration Business functions, analyze and process data, generate and persist business data in a standard way, and provide data services for the intelligent Internet of Things information application layer in the form of standard Web services through the Internet, 3G network and other information transmission layers.
[0021] The production business is modeled in the gateway server of the Internet of Things, and the business plan is generated into a control instruction flow at runtime, and the front-end controller is driven to collect production site data. When the business changes, only the business model in the business model factory in the server needs to be changed, without changing the programs of the front-end controller and field information collection equipment. Adopting such a design scheme can speed up the progress of system development, and is conducive to the migration and promotion of the system in various intelligent Internet of Things applications.
[0022] Front-end controller: The front-end controller is realized by an embedded system based on LINUX. The hardware platform uses an embedded processor, and the peripherals are equipped with LCD screen display equipment and an operating keyboard to facilitate human-computer interaction. Important files such as system configuration, etc., can be saved in the FLASH memory in the form of files. The interface includes Ethernet port and RS232/485 interface, and communicates with peripheral information collection equipment PLC or RTU.
[0023] The front-end controller is designed to be pluggable, which increases system flexibility and shortens the development cycle. Except for fixed modules such as processor, memory, and flash memory, other peripheral devices adopt the design principle of pluggability. When the system requirements change, the peripheral modules can be plugged in at any time.
[0024] Since the front-end controller needs to implement complex information application layer logic, especially to construct various TCP/IP network protocols and basic network communication protocols, it needs a set of friendly interface, reliable quality, wide application, easy development, multi-tasking, and low price. Inexpensive operating system, the embedded Linux operating system is the preferred solution because of its low price, powerful functions, and easy transplantation. For this reason, the front-end controller takes the embedded operating system based on LINUX as the core, and develops application software modules. The software module can be updated through the Ethernet, the man-machine dialogue can be carried out through the keyboard, and the data can be displayed through the LCD.
[0025] like image 3 As shown, the IoT gateway server: mainly consists of a business configuration management module, a business service provision module, a central business scheduling engine, and the underlying MODBUS/TCP communication protocol stack.
[0026] Front-end controller: The underlying communication module has MODBUS/TCP communication protocol stack, and various data acquisition modules used to control the front-end acquisition unit PLC/RTU, etc.; the core module is the front-end business scheduling engine; the upper layer has a screen display module for output and Human intervention module for input.
[0027] Interface between gateway server and front-end server: adopt MODBUS/TCP standard protocol. At the same time, the MODBUS function code is extended to realize more application layer functions. As a truly developed protocol, the MODBUS protocol has the advantages of simple protocol, easy implementation and high cost performance. It has been widely supported by many industrial control manufacturers and has become a de facto industrial standard. In 2008, "Industrial Automation Network Specification Based on Modbus Protocol" officially became a national standard, numbered GB/T 19582-2008. The third part of the national standard, MODBUS/TCP, provides the optimal information collection layer interface scheme for this system.
[0028] Gateway server design:
[0029] The ultimate goal of the gateway server is to provide data services for the intelligent IoT information application layer in the form of WEB services, streaming media services, and database services.
[0030]The Internet of Things business is roughly divided into four categories, identity-related business, information aggregation business, collaborative perception business and ubiquitous service business. For example, identity-related services mainly use radio frequency identification (RFID), two-dimensional codes, barcodes and other technologies that can mark identities, and provide various services based on identities; information aggregation services are mainly collected, processed, and processed by IoT terminals. The data reported by the communication network is processed by the IoT platform and submitted to specific applications and services. The IoT platform conducts unified management of IoT terminals, data, applications, services, and third parties; in the field of smart agriculture, these services are may be applied.
[0031] System requirements modeling: According to the design goals and the aforementioned DDD design ideas, the system establishes business management and configuration models, business service data models, and business-driven data models. The specific business is modeled separately through these three types of models. Describe a specific business through the business management and configuration model, and realize the management and configuration of the business itself through the man-machine interface; through the business service data model, describe when to provide data services to users; through the business-driven data model, describe What format data is sent to the front-end controller, so that the front-end controller can drive the on-site acquisition equipment to collect on-site information and report it to the IoT gateway server.
[0032] Module operation logic: The central business dispatching engine is the core of the IoT gateway server and plays the role of an engine in the system. The system models the intelligent Internet of Things business, and provides business configuration management interfaces for authorized users; the central business scheduling engine generates business event flows and business service provision models based on the existing business model, and through the MODBUS/ The TCP communication module sends it to the corresponding front-end controller; in the opposite direction, when receiving the collection data packet from the front-end controller, the central business scheduling engine analyzes the data, and finally the mapping given by the business management and configuration model converts the front-end collection data model Data, through a certain algorithm, is mapped to the business service data model, stored in the database for persistence, and published to users who have subscribed to this type of application.
[0033] Front Controller Design:
[0034] The front-end controller communicates with the gateway server through MODBUS/TCP protocol. The MODBUS/TCP communication protocol stack receives the data packet sent by the IoT gateway server, and after the verification is correct, it is handed over to the front-end business scheduling engine. The scheduling engine parses out the business model according to the interface protocol, and generates event flow and instruction planning scripts. In the next business execution, the script-driven data acquisition module reads the production site data, presents it on the screen when necessary, and accepts manual intervention by the user. After the data collection is completed, it is handed over to the business scheduling engine. According to the business model, the engine pre-analyzes the data and generates data in the corresponding format, which is sent to the IoT gateway server through the MODBUS/TCP communication protocol stack.
[0035] like Figure 4 As shown, the interface protocol design is completely designed in accordance with the third part of GB/T 19582-2008, and its structure is as follows: MODBUS protocol communicates in a master-slave manner. In this system, a MODBUS server (master station) is realized on the front-end controller, and a MODBUS client (slave station) is realized on the gateway server side. The server sends a request to the front-end controller, and the front-end controller sends back a response after performing an operation; in order to expand the system function, the active reporting function of the front-end controller is added.
[0036] like Figure 5 As shown, MODBUS uses 1 byte to represent the function code. Among them, in addition to the standard function codes, there are two definition ranges of user-defined function codes, that is, decimal 65 to 72 and 100 to 110. This provides an extension method for the realization of this system. In the interaction between the gateway server and the front-end controller, more complex configuration and control functions can be realized through extended function codes.
[0037] The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.