The invention provides a
data transmission method and
system, and the method comprises the steps: generating data at a device or a user terminal at a
data source end, packaging the data through an
MQTT client, publishing the packaged data to an EMQX
server cluster and other distributed
system server clusters, and distributing a message to the
MQTT client at a data receiving and display end through the EMQX
server cluster according to a subscription relation. And the
MQTT client transmits the message to a Canvas
visual interface to be displayed. The distributed architecture is adopted, the MQTT is responsible for
data transmission, the EMQX is responsible for
message processing, the Canvas is responsible for visual display, and all modules are clear in responsibility and low in
coupling degree. Compared with a traditional centralized architecture, the
system is high in expansibility and easy to maintain. According to the method, the functions of strong real-time performance, rich interactivity and visual display individuation are realized, compared with the traditional HTTP
data transmission and simple
visualization technology, the low-
delay transmission of the MQTT ensures the real-time performance of the data, and the flexible drawing capability of the Canvas supports the user to carry out interactive operations such as zooming, labeling and the like and individuation display.