MQTT报文的优化与拓展
Optimization and expansion of MQTT message
MQTT协议在物联网中有广泛的应用。然而在对MQTT协议进行分析后发现该协议存在着一些问题,如发布者无法控制所发布消息的去向,对于高频使用的字段未做优化处理,客户端无法获知主题结构等。本文将着力于对MQTT协议进研究,对MQTT协议进行优化与拓展,使其更好的承担对应的工作本文设计并实现了定向发布机制、字段注册机制和主题信息查询机制。通过在原协议的基础上拓展了数条控制报文,并对原协议中的相关报文进行了优化的方式,实现了以上机制。在Windows环境下在对上述方案进行了测试,测试结果表明,新增机制正常运行,有效地丰富了MQTT的功能,且优化及拓展后的报文平均长度显著缩短。
he MQTT protocol has a wide range of applications in the Internet of Things. However, after analyzing the MQTT protocol, it is found that there are some problems. For example, the publisher cannot control the whereabouts of the published message, and the field used for high frequency is not optimized, also, the client cannot know the topic structure. This paper will focus on the research of MQTT protocol, optimize and expand the MQTT protocol, and make it better to undertake the corresponding work. This paper designs and implements the directed publishing mechanism, field registration mechanism and topic information query mechanism. The above mechanism is realized by expanding several control messages based on the original protocol and optimizing the related messages in the original protocol. The above scheme was tested in the Windows environment. The test results show that the new mechanism works normally, which effectively enriches the function of MQTT, and the average length of optimized and expanded packets is significantly shortened.
邝坚、张航
无线通信通信
软件工程物联网MQTT
Software EngineeringLoTMQTT
邝坚,张航.MQTT报文的优化与拓展[EB/OL].(2019-03-13)[2025-08-16].http://www.paper.edu.cn/releasepaper/content/201903-136.点此复制
评论