邱雨 彭大芹 梁吉申 林峰 项磊
摘 要: 随着智能家居的迅猛发展,使其在高、中、低不同市场上都存在着很多竞争。YunOS智能操作系统的推出也加快了智能家居行业的发展。Message Queuing Telemetry Transport(MQTT)协议是为大量计算能力有限,并且工作在低带宽、不可靠的网络的远程传感器和控制设备通信而设计的协议。由于开销小,适用小型传输,在智能家居中得到大量运用。通过对MQTT协议结构以及关键字段的研究,并从实际环境中抓取到的智能家居中Packet Capture(PCAP)包进行分析,提出一种改进型的消息过滤算法将MQTT协议中订阅的主题与智能家居品牌联系起来,实现识别智能家居设备厂商的目的。
关键词: 智能家居; MQTT; 消息过滤算法; 小型传输; PCAP包; 關键字段
中图分类号: TN915?34 文献标识码: A 文章编号: 1004?373X(2018)16?0064?04
Abstract: With the rapid development of the smart home, a lot of competitions exist in its various high, medium and low level markets. On the other hand, the launch of the YunOS smart operating system also speeds up the development of the smart home industry. The message queuing telemetry transport (MQTT) protocol is designed for communications between a great quantity of remote sensors and control equipments which have limited calculation capabilities and work on unreliable low?bandwidth networks. As the MQTT protocol has small overheads and is suitable for small transmissions, it is widely used in the smart home. An improved message filtering algorithm is proposed by studying the structure and key fields of the MQTT protocol, and analyzing the PCAP package grasped in real environments for the smart home, so as to associate the subscription topics of the MQTT protocol with the smart home brands, which can achieve the purpose of identifying the manufacturers of smart home equipments.
Keywords: smart home; MQTT; message filtering algorithm; small transmission; PCAP package; key field
随着人们生活水平的不断提高,追求的生活质量也越来越高,智能家居在日常生活中体现出重要地位。MQTT是用作制动器和传感器的通信协议。由于其适用于小型传输,所需的带宽小,并且可以较好地工作在不稳定的网络中,使得MQTT协议广泛应用在物联网和机器与机器(M2M)通信环境中[1]。本文设计一款基于MQTT协议的智能家居安防设备的识别系统,首先研究了MQTT协议,通过Wireshark抓取了MQTT协议的PCAP包,分析了MQTT协议的PCAP包中Publish Message里各字段的作用,采用改进的消息过滤算法对MQTT协议数据流相关字节的关键字进行匹配,识别出智能家居生产商。
1.1 协议简介
消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)是一种轻量级基于代理的发布/订阅的消息传输协议。……