US 12,034,604 B2
MQTT protocol simulation method and simulation device
Hang Yuan, Shanghai (CN); Lijun Zu, Shanghai (CN); Guobao Liu, Shanghai (CN); Jun Fu, Shanghai (CN); and Zhijie Xue, Shanghai (CN)
Assigned to CHINA UNIONPAY CO., LTD., Shanghai (CN)
Appl. No. 17/799,864
Filed by CHINA UNIONPAY CO., LTD., Shanghai (CN)
PCT Filed Jan. 13, 2021, PCT No. PCT/CN2021/071535
§ 371(c)(1), (2) Date Aug. 15, 2022,
PCT Pub. No. WO2022/032984, PCT Pub. Date Feb. 17, 2022.
Claims priority of application No. 202010808243.3 (CN), filed on Aug. 12, 2020.
Prior Publication US 2023/0080588 A1, Mar. 16, 2023
Int. Cl. H04L 41/14 (2022.01); H04L 43/0811 (2022.01)
CPC H04L 41/145 (2013.01) [H04L 43/0811 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A message queuing telemetry transport (MQTT) protocol simulation method, wherein a simulation device is provided with a user space and a network adapter; and the method comprises:
obtaining, by the simulation device, a serialization command of a simulation test, and configuring, by the simulation device, the serialization command for a plurality of MQTT client instances;
controlling, by the simulation device, the plurality of MQTT client instances to package the serialization command by using a simulation protocol stack of the user space so as to obtain a simulation message;
controlling, by the simulation device, the plurality of MQTT client instances to transmit the simulation message to the network adapter by using a direct memory access (DMA) technology, and sending, by the network adapter, the simulation message to an MQTT server for simulation testing;
controlling, by the simulation device, the network adapter to receive an MQTT message sent by the MQTT server, wherein the MQTT message comprises an MQTT client instance ID;
controlling, by the simulation device, the network adapter to transmit the MQTT message to an MQTT client instance corresponding to the MQTT client instance ID by using the DMA technology according to the MQTT client instance ID; and
controlling, by the simulation device, the MQTT client instance corresponding to the MQTT client instance ID to parse the MQTT message by using the simulation protocol stack of the user space so as to obtain test response data.