MQTT-based coal mine robot unified dispatching command system

By adopting the MQTT-based communication protocol in the coal mine robot system, high concurrency, high reliability and high real-time data transmission between the robot and the scheduling and command system is realized, and the data transmission problem in the harsh network environment of the coal mine is solved.

CN119561962APending Publication Date: 2025-03-04CITIC HIC KAICHENG INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411750706.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high concurrency, high reliability and high real-time transmission of coal mine robot data, especially in the harsh network environment of coal mines.

Method used

Using the MQTT-based communication protocol, the two-way data interaction between the robot and the scheduling and command system is realized through the connection between the EMQX server and the application server, and supports high concurrency and high load data transmission.

Benefits of technology

It realizes high real-time and high-reliability data transmission between the robot and the scheduling and command system, and can support the data access of hundreds or thousands of robots, and is suitable for data transmission and control in unstable network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561962A_ABST
    Figure CN119561962A_ABST
Patent Text Reader

Abstract

The invention discloses a coal mine robot unified dispatching command system based on MQTT. The coal mine robot unified dispatching command system comprises a robot, an EMQX server, an application server, a hard disk video recorder and a computer client. The robot is respectively connected with the EMQX server, the application server and the hard disk video recorder; the EMQX server is in communication connection with the application server, and the application server is respectively in communication connection with the hard disk video recorder and the computer client; according to the system, the robot pushes a real-time state to the EMQX server and pushes a video to the hard disk video recorder, the real-time state and the video are uniformly received by the dispatching command program, and a signal for controlling the robot is sent to the EMQX server through the dispatching command program and forwarded to the robot for execution. And the client views and remotely controls the robot by accessing the dispatching command program. The system has the capabilities of low delay and high quality under the conditions of high concurrency and high load, and ensures accuracy and timeliness under the conditions of unstable network environment and strong interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of robot data transmission, and in particular is a unified dispatching and commanding system for coal mine robots based on MQTT. Background Art

[0002] With the vigorous development of intelligent mining construction, more and more robots of different types and manufacturers are used by the same customer. At present, robots from various manufacturers basically have independent control systems for each robot, without centralized control and management. The unified dispatching and commanding system for robots has come into being. The unified dispatching and commanding system connects hundreds of robot data. If the traditional socket one-to-one real-time communication is used, the requirements for server hardware and network are too high. Its hardware requirements cannot guarantee the concurrency of large data for hundreds of connected robots at the same time through a low-cost server; its network requirements cannot adapt to the harsh conditions of strong interference, high packet loss rate, and high network delay in coal mines. Therefore, a lightweight, highly reliable, and highly concurrent data transmission method is needed, and a dispatching and commanding system that supports high concurrency needs to be built. Summary of the invention

[0003] In order to solve the above technical problems, the present invention discloses a unified dispatching and commanding system for coal mine robots based on MQTT, which utilizes MQTT communication to realize two-way data interaction between the robot and the dispatching and commanding system, thereby achieving the purpose of lightweight, highly reliable and highly concurrent data transmission.

[0004] The present invention discloses a unified dispatching and commanding system for coal mine robots based on MQTT, comprising a robot, an EMQX server, an application server, a hard disk video recorder and a computer client; the robot is connected to the EMQX server, the application server and the hard disk video recorder respectively; The EMQX server is connected to the application server in communication, and the application server is connected to the hard disk recorder and the computer client in communication respectively; The robot transmits the video stream of the camera to the hard disk recorder, the robot transmits real-time data to the EMQX server, and receives control data forwarded by the EMQX server; the application server receives and processes the video stream of the hard disk recorder and the real-time data forwarded by EMQX, and forwards the operations of the computer client to the EMQX server; the computer client is used for video stream preview and robot control.

[0005] A further improvement of the present invention is that the coal mine robot unified dispatching and commanding system adopts the following steps for communication: Step S1: The robot is registered in the scheduling and command program of the application server, and a uuid is assigned to the robot; uuid refers to the unique identification code of the robot; after registration, the scheduling and command program of the application server subscribes to the real-time topic and the heartbeat topic in the EMQX server; the real-time topic is used to receive the real-time data of the robot, and the heartbeat topic is used to receive the heartbeat data of the robot; Step S2: register the video stream of the robot's camera in the hard disk recorder. The hard disk recorder assigns different channel numbers to the camera of each robot. After the robot's camera is started, the hard disk recorder will automatically pull and save the video stream. After the registration is completed, fill in the corresponding channel number in the camera configuration of the robot corresponding to the dispatch command program. Step S3: After the robot is started, it connects to the EMQX server through the built-in MQTT client, subscribes to the control topic in the EMQX server to receive control data; at the same time, it pushes heartbeat data to the heartbeat topic according to the set first frequency; Step S4: The robot connects to the EMQX server, and after the connection is successful, pushes real-time data to the real-time topic in the EMQX server at the second frequency, and the EMQX server automatically forwards the data to the scheduling command program of the application server; Step S5: After receiving the real-time data pushed by EMQX, the dispatching and commanding program of the application server writes the data into the Redis database of the application server using uuid as the key value of the Redis database; Step S6: Every time the scheduling command program of the application server is triggered, the real-time data in the Redis database is read according to the uuid and written into the Mysql database. After the writing is completed, the real-time data in the corresponding Redis database is cleared; Step S7: the scheduling and commanding program of the application server pulls the video stream in the hard disk video recorder and transcodes it; Step S8: The computer client sends a control command to the scheduling and command program of the application server through the browser. After receiving the control command, the scheduling and command program of the application server can forward it to the EMQX server through the control topic, and automatically push it to the robot's MQTT client through the EMQX server. The robot parses and executes the corresponding operation.

[0006] A further improvement of the present invention is that the real-time subject is the robot / serverSendData / {uuid} subject; the heartbeat subject is the robot / heartbeat / {uuid} subject; and the control subject is the robot / clientSendData / {uuid} subject.

[0007] A further improvement of the present invention is that the first frequency is 8-12 Hz, and the second frequency is 0.5-3 Hz.

[0008] A further improvement of the present invention is that in step S3: if the robot fails to connect to the EMQX server or fails to push, the robot immediately initiates a reconnection through the MQTT client until the connection is successful.

[0009] A further improvement of the present invention is that in step S3, if the robot fails to connect to the EMQX server or fails to push data, the robot immediately stops executing commands to prevent the robot from running out of control.

[0010] A further improvement of the present invention is that the heartbeat data includes the timestamp t1 and uuid of the robot. The scheduling command program compares its own system time t with the timestamp t1 of the robot. If t-t1>1 second, it means that the robot is offline. When the robot is offline, the computer client is not allowed to perform any control.

[0011] A further improvement of the present invention is that the transcoding in step S7 refers to transcoding the video stream from rtsp to rtmp video through ffmpeg for playback on a computer client.

[0012] A further improvement of the present invention is that the heartbeat theme, control theme and real-time theme are all encrypted and transmitted through an RSA asymmetric encryption algorithm.

[0013] Beneficial effects of the present invention: The present invention can realize the high real-time and high reliability data transmission requirements between the robot and the dispatching command system. At the same time, the invention can also collect data of hundreds or thousands of robots, supporting high concurrency and high load. In addition, the system is particularly suitable for accurate data transmission and control in the case of poor robot network environment and unstable network. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is the network architecture diagram of the dispatching and commanding system; Figure 2 This is the MQTT communication architecture diagram of the dispatching and command system. DETAILED DESCRIPTION

[0015] The technical scheme in the embodiment of the present invention is described clearly and completely below in conjunction with the accompanying drawings in the embodiment of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0016] The invention discloses a unified dispatching and commanding system for coal mine robots based on MQTT, which utilizes the MQTT communication protocol to realize two-way data interaction between the robot and the dispatching and commanding system.

[0017] The present invention provides a unified dispatching and commanding system for coal mine robots based on MQTT, including: a robot, an EMQX server, an application server, a hard disk recorder and a computer client, wherein the robot is connected to the EMQX server, the application server and the hard disk recorder respectively through a wifi signal. The robot transmits the video stream to the hard disk recorder, transmits the real-time data to the EMQX server, and receives the control command forwarded by the EMQX server. The application server receives and processes the video content of the hard disk recorder and the real-time data forwarded by EMQX, and forwards the client's operation to the EMQX server. The computer client can perform video preview, robot information display and robot control, such as Figure 1 shown.

[0018] The system of the present invention can realize that the robot automatically pushes the real-time status data to the EMQX server and automatically pushes the video information of the robot's camera to the hard disk recorder, and finally receives and processes it uniformly by the dispatching and commanding program running in the application server. It also supports sending the signal of controlling the robot to the EMQX server through the dispatching and commanding program, which is automatically forwarded to the robot for execution by the EMQX server. Customers can access the robot dispatching and commanding program running in the application server through a browser to view information and remotely control the robot manually. The application server is installed with Redis database and MySql database, and the dispatching and commanding program (Java program) is deployed for data processing on the server side. This system can access a large number of robots at the same time (each robot is guaranteed not to affect each other by pre-assigning a unique uuid), supports multiple clients to use online at the same time and one client to control multiple robots. The system still has low latency and high-quality processing capabilities under high concurrency and high load conditions. It is especially suitable for ensuring the accuracy and timeliness of data in the case of unstable network environment and strong interference in the robot.

[0019] The unified dispatching and command system of coal mine robots uses the following steps for communication: Step S1: The robot is manually registered in the dispatching and commanding program of the application server, and a uuid (unique identification code) is manually assigned to the robot. It must be ensured that the uuid of each robot is different. After the registration is completed, the dispatching and commanding program of the application server subscribes to the real-time topic and the heartbeat topic in the EMQX server. The real-time topic is used to receive the real-time data of the robot, and the heartbeat topic is used to receive the heartbeat data of the robot. The real-time topic is the robot / serverSendData / {uuid} topic; the heartbeat topic is the robot / heartbeat / {uuid} topic. Figure 2 Shown Step S2: Manually register the video stream of the robot's camera in the hard disk recorder. The hard disk recorder will automatically assign different channel numbers to each robot's camera, and after the robot's camera is started, the hard disk recorder will automatically pull and save the camera's video stream; after the registration is completed, fill in the corresponding channel number in the camera configuration of the robot corresponding to the dispatch command program; Step S3: After the robot is started, it connects to the EMQX server through the built-in MQTT client via wifi, subscribes to the control topic to receive control data; at the same time, it pushes heartbeat data to the heartbeat topic according to the set first frequency; the control topic is robot / clientSendData / {uuid} topic, {uuid} refers to the pre-assigned uuid to ensure that the control topic corresponding to each robot is different. The first frequency is 8-12Hz. The heartbeat data includes the timestamp t1 and uuid of the robot. The scheduling command program can obtain the heartbeat topics and data of all robots by subscribing to robot / heartbeat / # (# is a wildcard that can match the uuid of all robots), and compares its own system time t with the timestamp t1 of the robot. If t-t1>1 second, the robot is considered offline. When the robot is offline, the computer client is not allowed to perform any control.

[0020] If the robot fails to connect to the EMQX server or fails to push, the robot will immediately initiate a reconnection through the MQTT client until the connection is successful.

[0021] If the robot fails to connect to the EMQX server or fails to push data, the robot will immediately stop executing commands to prevent runaway operation.

[0022] Step S4: The robot connects to the EMQX server via wifi. After the connection is successful, the real-time data is pushed to the real-time topic in the EMQX server at the second frequency and the EMQX server automatically forwards it to the scheduling command program of the application server; the second frequency is 0.5-3 Hz.

[0023] Step S5: After receiving the real-time data pushed by the EMQX server, the scheduling and command program of the application server writes it into the Redis database of the application server with uuid as the key value, thereby reducing the pressure on the application server and achieving high-concurrency data access.

[0024] Step S6: Every time the scheduling command program of the application server is triggered (once every minute), the real-time data in the Redis database is read according to the robot uuid and written to the Mysql database. After writing, the data in the corresponding Redis database is cleared; the Redis database is a high-performance key-value storage system, which is often used in application scenarios such as caching, message queues, and session storage. The Redis database is known for its extremely high performance and can support hundreds of thousands of read and write operations per second, which makes the Redis database an ideal choice for processing high-concurrency requests.

[0025] Step S7: The dispatching and commanding program of the application server pulls the video stream from the hard disk recorder and transcodes the rtsp video stream into an rtmp video stream through ffmpeg for playback on the computer client. The computer client can access the dispatching and commanding program through a browser to view the working status of the robot and preview the video of the camera, thereby meeting the basic real-time monitoring needs of the robot.

[0026] Step S8: The computer client can send control commands for controlling the robot to the scheduling and command program of the application server through the browser. After receiving the control command, the scheduling and command program of the application server can forward it to the EMQX server through the control topic, and automatically push it to the robot's MQTT client through the EMQX server, and the robot will parse and execute the corresponding operation.

[0027] The EMQX server of the present invention is based on the MQTT protocol, which is a protocol designed for communication between a large number of remote sensors and control devices with limited computing power and working on low-bandwidth, unreliable networks. The MQTT protocol transmits very little content, which can significantly reduce network traffic. MQTT supports three different message delivery quality (QoS) levels: QoS0 (at most once), QoS1 (at least once) and QoS2 (only once). This makes it possible to select an appropriate message delivery guarantee level based on the requirements of the robot. MQTT can adapt to unstable network conditions, such as network interruptions, reconnections, etc. It has a mechanism for automatic reconnection after disconnection, as well as a mechanism for reissuing lost messages, which can ensure reliable transmission of messages.

[0028] The dispatching and command system based on MQTT can support high concurrency and can easily support millions of clients to send and receive data online at the same time, meet the data access needs of hundreds or thousands of robots, and provide corresponding low latency and high reliability.

[0029] MQTT is used in conjunction with the Redis database to reduce the pressure of real-time computing on the server by caching data, thereby reducing system hardware requirements.

[0030] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

Claims

1. A unified dispatching and commanding system for coal mine robots based on MQTT, characterized in that: It includes a robot, an EMQX server, an application server, a hard disk video recorder and a computer client; the robot is connected to the EMQX server, the application server and the hard disk video recorder respectively; The EMQX server is connected to the application server, and the application server is connected to the hard disk recorder and the computer client respectively; The robot transmits the video stream of the camera to the hard disk recorder, the robot transmits real-time data to the EMQX server, and receives control data forwarded by the EMQX server; the application server receives and processes the video stream of the hard disk recorder and the real-time data forwarded by EMQX, and forwards the operations of the computer client to the EMQX server; the computer client is used for video stream preview and robot control.

2. According to the MQTT-based coal mine robot unified dispatching and commanding system of claim 1, it is characterized in that: The coal mine robot unified dispatching and commanding system adopts the following steps for communication: Step S1: The robot is registered in the scheduling and command program of the application server, and a uuid is assigned to the robot; uuid represents the unique identification code of the robot; after registration, the scheduling and command program of the application server subscribes to the real-time topic and the heartbeat topic in the EMQX server; the real-time topic is used to receive the real-time data of the robot, and the heartbeat topic is used to receive the heartbeat data of the robot; Step S2: registering the video stream of the robot's camera in the hard disk recorder. The hard disk recorder assigns a different channel number to each robot's camera, and after the robot's camera is started, the hard disk recorder will automatically pull and save the camera's video stream; After registration is completed, fill in the corresponding channel number in the camera configuration of the robot corresponding to the dispatch command program; Step S3: After the robot is started, it connects to the EMQX server through the built-in MQTT client, subscribes to the control topic in the EMQX server to receive control data; at the same time, it pushes heartbeat data to the heartbeat topic according to the set first frequency; Step S4: The robot connects to the EMQX server, and after the connection is successful, pushes real-time data to the real-time topic in the EMQX server at the second frequency, and the EMQX server automatically forwards the data to the scheduling command program of the application server; Step S5: After receiving the real-time data pushed by EMQX, the dispatching and commanding program of the application server writes the data into the Redis database of the application server using uuid as the key value of the Redis database; Step S6: Every time the scheduling command program of the application server is triggered, the real-time data in the Redis database is read according to the uuid and written into the Mysql database. After the writing is completed, the real-time data in the corresponding Redis database is cleared; Step S7: the scheduling and commanding program of the application server pulls the video stream in the hard disk video recorder and transcodes it; Step S8: The computer client sends a control command to the scheduling and command program of the application server through the browser. After receiving the control command, the scheduling and command program of the application server can forward it to the EMQX server through the control topic, and automatically push it to the robot's MQTT client through the EMQX server. The robot parses and executes the corresponding operation.

3. According to the MQTT-based coal mine robot unified dispatching and commanding system of claim 2, it is characterized in that: The real-time topic is robot / serverSendData / {uuid} topic; The heartbeat topic is robot / heartbeat / {uuid} topic; The control topic is the robot / clientSendData / {uuid} topic.

4. According to the MQTT-based coal mine robot unified dispatching and commanding system according to claim 2, it is characterized in that: The first frequency is 8-12 Hz, and the second frequency is 0.5-3 Hz.

5. The MQTT-based coal mine robot unified dispatching and commanding system according to claim 2 is characterized in that: In step S3: If the robot fails to connect to the EMQX server or the push fails, the robot immediately initiates a reconnection through the MQTT client until the connection is successful.

6. A coal mine robot unified dispatching and commanding system based on MQTT according to claim 5, characterized in that: In step S3, if the robot fails to connect to the EMQX server or fails to push data, the robot immediately stops executing commands to prevent the robot from running out of control.

7. The MQTT-based coal mine robot unified dispatching and commanding system according to claim 5 is characterized in that: The heartbeat data includes the timestamp t1 and uuid of the robot. The scheduling command program compares its own system time t with the timestamp t1 of the robot. If t-t1>1 second, it means that the robot is offline. When the robot is offline, the computer client is not allowed to perform any control.

8. The MQTT-based coal mine robot unified dispatching and commanding system according to claim 5, characterized in that: The transcoding in step S7 refers to transcoding the video stream from rtsp to rtmp video through ffmpeg for playback on the computer client.

9. The MQTT-based coal mine robot unified dispatching and commanding system according to claim 2, characterized in that: The heartbeat topic, control topic, and real-time topic are all encrypted and transmitted using the RSA asymmetric encryption algorithm.