MQTT-based edge computing gateway platform

By adopting an MQTT-based edge computing gateway platform in the Internet of Things system, the delay and resource pressure problems in traditional cloud computing when processing large-scale and real-time IoT data are solved, and more efficient and real-time data processing and analysis are achieved.

CN223007574UActive Publication Date: 2025-06-20JIANGSU UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422238393.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-06-20
Estimated Expiration
2034-09-12

AI Technical Summary

Technical Problem

Traditional cloud computing has problems such as data transmission delay, network bandwidth limitation and cloud computing resources centralization when processing large-scale and real-time IoT data.

Method used

The edge computing gateway platform based on MQTT is adopted, including the edge layer, the device layer and the platform layer. The edge layer collects device layer data through the main control module, the communication module and the serial port module for edge computing, and uploads the processed data to the cloud platform.

Benefits of technology

By performing edge computing near data sources, data transmission volume is reduced, response speed is improved, and data storage, computing pressure and energy consumption in the cloud are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223007574U_ABST
    Figure CN223007574U_ABST
Patent Text Reader

Abstract

The utility model relates to the technical field of cloud data processing, in particular to an edge computing gateway platform based on MQTT, which comprises an edge layer, an equipment layer and a platform layer, the edge layer comprises a main control module, a communication module and a serial port module, the communication module and the serial port module are electrically connected with the main control module, and the equipment layer is electrically connected with the equipment layer. The main control module collects data of the equipment layer, performs edge calculation and then uploads the data to the platform layer; the equipment layer comprises a plurality of acquisition modules, and the acquisition modules are in communication connection with the main control module through serial port modules; the platform layer is a cloud platform, and the main control module is wirelessly connected with the cloud platform through the communication module by using an MQTT protocol. According to the utility model, the data of the acquisition module is collected through the single-chip microcomputer and the serial port module, edge calculation is carried out in the main control module, redundant data is removed according to a data set mean value and a given threshold value, and the residual data is reserved and uploaded to a cloud platform, so that the data transmission quantity is reduced, the response speed is improved, and the data storage and calculation pressure and energy consumption of a cloud end are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of cloud data processing, and particularly relates to an edge computing gateway platform based on MQTT. Background Art

[0002] With the rapid development of Internet of Things technology, more and more devices are connected to the network, generating a huge amount of data. The traditional data processing method mainly relies on the cloud computing center. However, when dealing with data with high requirements for large scale and real-time performance, cloud computing has problems such as data transmission delay, limited network bandwidth, and centralization of cloud computing resources. Therefore, a more efficient and real-time data processing method is needed to meet the requirements of Internet of Things applications. The utility model adopts an edge computing structure to sink data processing and analysis tasks to the network edge, that is, to perform calculations near the data source and then upload the results to the cloud platform. Summary of the Invention

[0003] To solve the above problems, the utility model provides an edge computing gateway platform based on MQTT, which includes an edge layer, a device layer, and a platform layer. The edge layer includes a main control module, a communication module, and a serial port module. The communication module and the serial port module are electrically connected to the main control module. The main control module collects data from the device layer, performs edge computing, and then uploads the data to the platform layer.

[0004] The device layer includes several acquisition modules, and the acquisition modules are communicatively connected to the main control module through the serial port module.

[0005] The platform layer is a cloud platform, and the main control module is wirelessly connected to the cloud platform through the communication module using the MQTT protocol.

[0006] Further, the main control module is an STM32F103C8T6 single-chip microcomputer.

[0007] Further, the communication module is an ESP8266WIFI module. The main control module sends AT commands through the ESP8266WIFI module to connect to the Wi-Fi network, and establishes a connection with the cloud platform after verification through the API or SDK.

[0008] Further, the acquisition module is a temperature and humidity sensor SM7822B.

[0009] Further, the serial port module is an RS485 to TTL module.

[0010] Further, the gateway platform further includes a display module for displaying data, a button module for setting the main control module, and an alarm module for alarming.

[0011] Further, the display module is an OLED screen, which is electrically connected to the single-chip microcomputer through the IIC interface.

[0012] Further, the alarm module is an active buzzer. When the main control module receives abnormal data from the acquisition module, it sends a high level to the alarm module, and the active buzzer emits an alarm.

[0013] In summary, the present utility model includes at least one of the following beneficial effects:

[0014] Taking the temperature and humidity data acquisition as an example, the present utility model collects the data of the acquisition module through a single-chip microcomputer and a serial port module, performs edge computing in the main control module, eliminates the points outside the distance threshold according to the mean value of the data set and the given distance threshold, retains the remaining data and uploads it to the cloud platform, reduces the data transmission volume, improves the response speed, and reduces the data storage, computing pressure and energy consumption of the cloud.

[0015] The present utility model uses edge computing technology to perform data processing and analysis locally at the gateway, reduces the data transmission volume, and improves the response speed. The gateway has a protocol conversion function to meet the needs of different applications. The gateway also needs to have node management capabilities and be able to obtain and display the status information of each node. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is the architecture diagram of the present utility model;

[0017] Figure 2 is the circuit diagram of each module of the present utility model;

[0018] Figure 3 is the edge computing logic diagram of the main control module. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] The following further elaborates on the present utility model in conjunction with the attached Figures 1-3 drawings. Embodiment

[0020] This embodiment provides an edge computing gateway platform based on MQTT. Taking the temperature and humidity data acquisition as an example, a gateway platform for data collection based on edge computing is given.

[0021] As Figure 1 shown, this embodiment includes a device layer, an edge layer and a platform layer. The platform layer is a cloud platform or a mobile phone APP for data collection and processing on the network side; the device layer is used for various data collections. In this embodiment, the temperature and humidity data collection is taken as an example; the edge layer is the central core of the device side, collects the data of the device layer, performs edge processing and uploads it to the platform layer. In this embodiment, the platform layer adopts the OneNET cloud platform.

[0022] In this embodiment, the core of the edge layer is an STM32F103C8T6 single-chip microcomputer, and its circuit diagram is as Figure 2As shown in the figure, the periphery of the single-chip microcomputer is connected with a display module, a communication module, a serial port module, an alarm module, a key module and a collection module.

[0023] The collection module adopted by the device layer is as Figure 2 shown, which are several SM7822B temperature and humidity sensors. When the sensors receive the inquiry frame sent by the single-chip microcomputer, they return the corresponding response frame to the single-chip microcomputer module. It includes 4 pins: A, B, VCC and GND. A and B are connected to the RS485 to TTL module (i.e., the serial port module). The TXD interface of the TTL to RS485 is connected to the B6 pin of the single-chip microcomputer, and the RXD interface is connected to the B7 pin of the single-chip microcomputer.

[0024] The display module is an OLED display screen, which adopts the IIC interface. There are four interfaces connected to the single-chip microcomputer: GND, VCC, SCL and SDA, which are respectively connected to the GND, 3.3V, PB1 and PB0 pins of the single-chip microcomputer. The data that the OLED needs to display are: temperature, humidity, alarm status, sensor address and set threshold.

[0025] The main control module single-chip microcomputer uses the communication ESP8266 module to communicate with the platform layer. During initialization, the single-chip microcomputer sends AT commands to connect to the Wi-Fi network, including setting the SSID and password of the Wi-Fi, as well as handling errors and reconnection mechanisms during the connection process; using the API or SDK provided by the OneNET cloud platform to establish a connection with the cloud platform. Set the server address, port number and authentication information of the cloud platform for the single-chip microcomputer, etc.; write code to read sensor data or other information that needs to be uploaded, encapsulate it in the OneJSON format, and then use a protocol such as MQTT to send the data to the specified interface of the cloud platform. The program of the single-chip microcomputer can implement the logic of receiving data sent by the cloud platform. When receiving the data sent by the cloud platform, it parses the data content and processes or responds according to the needs.

[0026] The key module consists of 4 independent keys: Key 1 controls the alarm status; Key 2 controls the OLED interface switching; Key 3 controls the address for reading data; Key 4 controls the value of the edge calculation distance threshold. The key program design first initializes the GPIO and interrupts, configures the GPIO pins PA4, PA5, PA6, PA7 connected to the keys as input mode, enables the pull-up resistor and external interrupt, and configures it to trigger on the falling edge. Then configure the NVIC for the key interrupt, set the interrupt priority and enable the interrupt, and write the key interrupt service program. When the key status changes, the interrupt function service program will be called. In the interrupt function service program, read the status of the GPIO pin, judge whether the key is pressed or released, and if the key is pressed, the corresponding interrupt service program will be executed.

[0027] The alarm module uses an active buzzer, which is triggered by a high level. It has four interfaces connected to the microcontroller: VCC, I / O and GND, which are respectively connected to the 3.3V, PA1 and GND pins of the microcontroller. When the data collected by the microcontroller is abnormal, the PA1 pin sends a high level and the buzzer alarms. Example

[0028] In this embodiment, the edge layer needs to perform edge computing after receiving the device layer data and then upload it to the platform layer. The logic of edge computing is as follows: Figure 3 As shown:

[0029] After receiving the data, the average temperature and humidity values ​​are calculated based on the data set, and the difference between each data and the average value is calculated and compared with the threshold value. The data with a difference exceeding the threshold value is removed and the remaining data is retained. The retained data is then stored and uploaded to the cloud platform. This reduces the amount of data uploaded to the cloud platform, improves the response speed, and reduces the data storage, computing pressure and energy consumption of the cloud.

[0030] At the same time, when performing edge computing screening, the alarm can be further triggered based on the comparison between the difference and the threshold, and the data can be displayed in real time through the OLED screen, thereby realizing real-time monitoring of the collected data.

[0031] The above are all preferred embodiments of the present utility model, and are not intended to limit the protection scope of the present utility model. Therefore, any equivalent changes made based on the structure, shape, and principle of the present utility model should be included in the protection scope of the present utility model.

Claims

1. An edge computing gateway platform based on MQTT, comprising an edge layer, a device layer, and a platform layer, characterized in that: The edge layer includes a main control module, a communication module and a serial port module. The communication module and the serial port module are electrically connected to the main control module. The main control module collects device layer data and performs edge computing before uploading it to the platform layer. The device layer includes several acquisition modules, and the acquisition modules are connected to the main control module through the serial port module; The platform layer is a cloud platform, and the main control module is wirelessly connected to the cloud platform using the MQTT protocol through the communication module.

2. The MQTT-based edge computing gateway platform according to claim 1, characterized in that: The main control module is a STM32F103C8T6 single chip microcomputer.

3. The MQTT-based edge computing gateway platform according to claim 2, characterized in that: The communication module is an ESP8266WIFI module. The main control module sends AT commands through the ESP8266WIFI module to connect to the Wi-Fi network, and establishes a connection with the cloud platform after API or SDK verification.

4. The MQTT-based edge computing gateway platform according to claim 2, characterized in that: The acquisition module is the temperature and humidity sensor SM7822B.

5. The MQTT-based edge computing gateway platform according to claim 4, characterized in that: The serial port module is an RS485 to TTL module.

6. The MQTT-based edge computing gateway platform according to claim 2, characterized in that: The gateway platform also includes a display module for displaying data, a key module for setting the main control module, and an alarm module for alarming.

7. The MQTT-based edge computing gateway platform according to claim 6, characterized in that: The display module is an OLED screen, which is electrically connected to the single-chip microcomputer via an IIC interface.

8. The MQTT-based edge computing gateway platform according to claim 6, characterized in that: The alarm module is an active buzzer. When the data received by the acquisition module is abnormal, the main control module sends a high level to the alarm module, and the active buzzer sounds an alarm.