The embodiment of the invention provides an Internet-of-things communication method and a cloud gateway. The method comprises the following steps: a
data acquisition process: acquiring industrial datacollected by network equipment in a
heterogeneous network; a protocol conversion process: analyzing the industrial data, and converting the industrial data with different communication protocols to OPC UA standard data, and then converting the industrial data to
MQTT protocol data; a cloud transmission process: sending
MQTT protocol data to cloud platform; a task scheduling process: triggering protocol conversion task generation after
data acquisition process; triggering the generation of cloud transmission tasks after the protocol conversion process; storing the protocol conversion tasks andcloud transmission tasks in the task
queue according to the
generation time sequence, and triggering execution of the corresponding process by calling the non-blocking task
scheduling function of thetasks in the task
queue in turn. The embodiment of the invention realizes the communication transmission of
the Internet-of-thigns in a non-blocking mode through a single gateway, and improves the real-time property of the communication of
the Internet-of-things. Industrial
data cloud services with different protocols are implemented.