Article Details

Title · Authors · Abstract · Keywords · DOI · References

Optimized IoT MQTT Long Connection Communication and Data Processing Improvement Based on Lock-free Concurrency

WANG Lixu1,2, HE Mingyi1,2,3, LYU Fei1,2, ZONG Weikang1,2, CHEN Kaixuan1,2

(1.NARI Group Co., Ltd.,(State Grid Electric Power Research Institute Co., Ltd.,) Nanjing 211106, China; 2.NARI Technology Co., Ltd., Nanjing 211106, China; 3.State Key Laboratory of Smart Grid Protection and Control, Nanjing 211106, China)

Section:Internet of Things · Vol. 2025, Issue 1 · Pages:193-198 · 2096-4706(2025)01-0193-06 · CLC number:TN929.5 · Document code:A · DOI:10.19850/j.cnki.2096-4706.2025.01.037

Abstract

In order to better guarantee the batch access of provincial electric power Internet of Things terminal devices and improve the stability of MQTT long connection communication and the timeliness of data processing for various types of devices, the paper optimizes and improves the existing methods for device connection access and data processing. Firstly, high-performance data processing is realized based on lock-free concurrency, which improves the robustness of the execution program, thus avoiding the problem of MQTT connection timeout interruption caused by data blocking. Secondly, the hierarchical processing between applications is improved to intra-application thread decoupling, and the parallel processing is realized by using the event source driving mechanism, thus reducing the system complexity, decreasing the hierarchical dependency, and ensuring the lightweight, low power consumption, and high-reliability features of the device connection access function. Finally, through the classification test of different MQTT message sizes, it is verified that the improved program performance has the characteristics of high throughput and low latency. It greatly reduces the delay and data blocking of link communication, and the overall efficiency is improved by more than 3 times compared with the existing scheme, which has certain engineering applicability.

Keywords

lock-free concurrency; MQTT long connection; data processing; distribution power Internet of Things; event-driven

References

  1. [1] Gao Kun, Liu Zehui, Gao Wei, etc A blockchain based MQTT protocol optimization algorithm [J]. Electric Power Information and Communication Technology, 2024, 22 (5): 10-16
  2. [2] Liu Haitao, Qi Shenglong, Lu Xiang, etc Design of Inter Core Communication for Multi Core Processor in Distribution Terminal Based on MQTT [J]. Electronic Devices, 2022, 45 (5): 1207-1213
  3. [3] Liu Liang, Li Hui Functional Design and System Implementation of edge computing Gateway [J]. Electrical Measurement and Instrumentation, 2021, 58 (8): 42-48
  4. [4] Shao Ruixue, Tian Xiuxia ABAC Access Control Scheme Based on MQTT Protocol in Smart Grid [J]. Computer Application Research, 2022, 39 (11): 3436-3443
  5. [5] Zhao Jing Security Analysis of TCP/IP Protocol Stack [J]. Network Security Technology and Applications, 2024 (4): 12-14
  6. [6] Xiong Fengguang, Chen Lin, Han Huiyan, etc Research on Lightweight Text Information Distribution Technology Based on MQTT Protocol [J]. Computer Technology and Development, 2024, 34 (2): 90-97
  7. [7] Wang Zi, Liang Zhenghe, Wu Yingying Improvement of Traditional ETL Based on Kafka and Disruptor Technologies [J]. Computer Technology and Development, 2018, 28 (11): 26-29
  8. [8] Zhou Shuling, Jin Nan, Hou Haiping Solution to Multi UI Thread Concurrent Blocking Problem Based on WPF Message Mechanism [J]. Journal of Tonghua Normal University, 2021, 42 (4): 90-96
  9. [9] Li Hao, Zhang Xiaoqiang A single threaded anchor free object detection model [J]. Computer Engineering, 2021, 47 (5): 229-235+243
  10. [10] Yan Baoyue, Jiang Bo A Fast Write Algorithm for Hotspot Variables in Persistent Memory [J]. Small Microcomputer Systems, 2022, 43 (11): 2442-2448

About the authors

Wang Lixu (1991-), male, Han ethnicity, born in Yancheng, Jiangsu, is an engineer with a master's degree. His research interests include power distribution IoT and computer applications.