In this series of articles, we will share with you how to build a reliable, efficient vehicle that meets the needs of industry scenarios based on EMQ's practical experience in the field of IoV, from theoretical knowledge such as protocol selection to practical operations such as platform architecture design. Internet platform.

Before that, we have introduced the MQTT protocol in the IoV scenario, and how to design the MQTT theme in the IoV TSP platform scenario according to actual business needs. Next, we need to consider how to transmit message data with high quality and security. In this article, we will use the QoS features of the MQTT protocol to introduce the QoS design of MQTT messages in the Internet of Vehicles scenario to ensure the quality of data transmission.

foreword

In the Internet of Vehicles scenario, massive data will be generated, which can be used as the basis for vehicle diagnosis to ensure the safe and stable operation of the vehicle; it can also be linked with infrastructure such as mobile phones to provide a better driving experience. The country and the industry have also successively issued relevant policy documents, such as "Automotive Driving Automation Classification", "Guidelines for the Construction of the National IoV Industry Standard System", and "Technical Requirements for Data Security of IoV Information Services", etc. high demands. The security, stability and reliability of communication have always been the topic of the Internet of Vehicles. Therefore, a complete data transmission guarantee scheme is also a part of the Internet of Vehicles business that cannot be ignored.

QoS levels in the MQTT protocol

As the first choice for the data communication protocol in the Internet of Vehicles industry today, the MQTT protocol specifies the message quality of service (QoS). QoS ensures the reliability of message delivery in different network environments, and can be used as the primary implementation technology to ensure reliable message transmission in the Internet of Vehicles scenario.

MQTT is designed with 3 QoS levels:

MQTT QoS 0

MQTT QoS 1

MQTT QoS 2

Message QoS Design in the Internet of Vehicles Scenario

First of all, it needs to be clear that the higher the QoS level, the more complex the message interaction and the greater the system resource consumption. Therefore, the higher the QoS level is, the better. Applications can choose the appropriate QoS level according to their own network scenarios and business requirements.

According to the attributes and characteristics of the data related to the Internet of Vehicles information service, we can divide it into six categories: basic attribute data, vehicle industrial control data, environment perception data, vehicle control data, application service data and user personal information. So how to choose the MQTT QoS level in different car networking scenarios?

Special reminder

It should be noted that the QoS in the MQTT publish and subscribe operation represents different meanings. The QoS when publishing indicates the QoS level used by the message sent to the MQTT server, and the QoS when subscribed indicates that the MQTT Broker can use when forwarding messages to itself. Maximum QoS level. It is necessary to ensure that the QoS of sending and subscription is consistent to ensure that the final received message is of a fixed QoS level, otherwise consumption will be degraded. For example: the QoS of the message sent by A is 2, and the QoS of the message subscribed by B is 1, then the QoS of the message finally received is 1.

EMQX message transmission guarantee based on QoS level

In order to better ensure the safety and reliability of data transmission between people, vehicles, roads, networks and clouds in the process of Internet of Vehicles, while improving the efficiency of message throughput and reducing the impact of network fluctuations, the cloud-native distributed IoT message server EMQX is in On the basis of fully adapting QoS signaling interaction, functions such as flight window, message queue, message full-link tracking and offline message storage are also designed to improve message reliability.

The design of the flight window allows multiple unacknowledged QoS 1 and QoS 2 packets to exist on the network link at the same time, and the message queue can further store the message when the message exceeds the flight window in the message link, so as to avoid the need for further storage. Meet the storage requirements of unreceived messages or unacknowledged data messages when the client is offline. The flight window also has the upgrade_qos parameter to implement functions such as forced upgrade of QoS according to subscription, which can achieve the consistency of QoS levels and ensure that there will be no consumption degradation. In addition, EMQX can also provide the ability to restrict service access by region to achieve different QoS levels, data bridging QoS management, MQTT-SN protocol QoS management and other capabilities, which provide a strong guarantee for reliable message transmission in the Internet of Vehicles scenario.

Download experience: https://www.emqx.com/zh/try?product=enterprise

Epilogue

Through this article, we can see that the QoS characteristics of the MQTT protocol are of great significance for the secure transmission of message data in the Internet of Vehicles scenario. As a cloud-native distributed message server that fully supports the MQTT protocol standard, EMQX makes full use of the features and advantages of the MQTT protocol in product design to provide reliable data connection, movement, processing and integration for IoT platform and application construction.

Copyright statement: This article is original by EMQ, please indicate the source when reprinting.

Original link: https://www.emqx.com/zh/blog/mqtt-qos-design-for-internet-of-vehicles


EMQX
336 声望438 粉丝

EMQ(杭州映云科技有限公司)是一家开源物联网数据基础设施软件供应商,交付全球领先的开源 MQTT 消息服务器和流处理数据库,提供基于云原生+边缘计算技术的一站式解决方案,实现企业云边端实时数据连接、移动、...