An MQTT-based real-time collaborative simulation method for digital twin of excavator
The excavator digital twin real-time collaborative simulation method built using the MQTT protocol solves the problems of insufficient real-time performance and interactivity in traditional excavator simulation modes, and realizes efficient and immersive virtual debugging and cross-platform collaborative simulation, thereby improving the real-time performance and availability of the simulation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TAIYUAN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-12
Smart Images

Figure CN122194723A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of collaborative simulation communication technology, and in particular to a real-time collaborative simulation method for excavator digital twins based on MQTT. Background Technology
[0002] Excavators, as typical construction machinery, are complex electromechanical-hydraulic systems that integrate mechanical structure, hydraulic transmission, power system, and control system. Their simulation models must accurately reflect the dynamic interactions and energy transfer between subsystems, characterized by high model accuracy requirements, high computational complexity, and stringent real-time requirements. Traditional simulation methods typically rely on a single simulation platform for multidisciplinary modeling and coupled simulation. While these platforms offer advantages in physical modeling and solution accuracy, their visualization and interactive capabilities are generally weak, making it difficult to construct a highly immersive and realistic virtual working environment.
[0003] This traditional model, which emphasizes simulation but neglects interaction, prevents operators from gaining an intuitive and natural human-computer interaction experience during simulation, making it difficult to conduct real-time on-loop debugging simulations or control strategy verification. While existing technologies offer platforms that achieve cross-process data bridging via Modbus or UDP protocols, they fundamentally lack a unified solution environment with millisecond-level state synchronization between models, and lack high-frequency real-time bidirectional control loops. Furthermore, the use of dynamic link libraries for integration results in tight system coupling, making it difficult to support distributed deployments or cross-platform remote collaborative simulation scenarios, and significantly limiting dynamic interaction capabilities. Summary of the Invention
[0004] To address the aforementioned technical problems, according to a first aspect of the embodiments of this application, a real-time collaborative simulation method for excavator digital twins based on MQTT is provided. The method includes: In response to the operation in the first virtual interactive interface, a corresponding target control command is generated; the target control command is encapsulated by the first sending client and published to the preset command topic of the dedicated communication hub; the preset status topic of the dedicated communication hub is monitored by the first receiving client, and real-time simulation status data calculated and returned by the second terminal is received; based on the real-time simulation status data, the status of the digital twin model and data display panel in the first virtual interactive interface is synchronously updated.
[0005] This solution enables real-time, two-way closed-loop visualization from the issuance of operation commands to the feedback of model simulation status, significantly improving the efficiency of virtual debugging and the immersive interactive experience.
[0006] In one embodiment, before generating a corresponding target control command in response to a control operation in the first virtual interactive interface, the method further includes: acquiring a three-dimensional model of the target device, performing kinematic constraints based on kinematic chain relationships, and assigning physical properties to generate the digital twin model; constructing a dynamic work scene corresponding to the real work environment using particle systems and texture technology; and integrating the digital twin model, the dynamic work scene, and the data display panel in the first virtual interactive interface.
[0007] This solution enables the construction of highly realistic physical rendering and operational scenarios, enhancing the realism of the simulation environment and the credibility of the operation.
[0008] In one implementation, the step of synchronizing and updating the state of the digital twin model and data display panel in the first virtual interactive interface based on the real-time simulation state data includes: acquiring the original message of the real-time simulation state data and deserializing it into a structured data object that the system can recognize through an embedded protocol parsing engine; pushing the structured data object to the data-driven engine of the data display panel to dynamically refresh the multi-dimensional information historical trend chart and performance key parameter view with a unified timestamp as the reference axis; monitoring the target parameters in the structured data object according to a preset threshold, and triggering highlighting, color change or alarm prompt information if the preset threshold is exceeded.
[0009] This solution can transform abstract physical simulation data into intuitive and visual multidimensional charts and early warning signals, making it easier for operators to monitor the status and make decisions.
[0010] In one implementation, the first sending client and the first receiving client are configured with different first identifiers to perform data transmission and reception in independent thread isolation.
[0011] This solution effectively avoids thread blocking and message out-of-order issues that may be caused by high-frequency sending and receiving in the same connection, ensuring extremely high stability of the communication link.
[0012] In one embodiment, the method further includes: in response to a target physical parameter adjustment instruction received in the parameter configuration interface, sending the target physical parameter adjustment instruction to the dedicated communication hub via the first sending client, so as to drive the second terminal to dynamically adjust the corresponding system parameters before simulation or during a pause phase.
[0013] This solution provides the system with flexible R&D capabilities for dynamic parameter tuning in the loop, facilitating rapid verification of the impact of different physical parameters on the overall system performance.
[0014] According to a second aspect of the embodiments of this application, a real-time collaborative simulation method for excavator digital twins based on MQTT is also provided. The method includes: receiving a target control command sent by a first terminal by listening to a preset instruction topic of a dedicated communication hub through a second receiving client; parsing the target control command and converting it into a precise physical signal according to a preset mapping relationship; injecting the precise physical signal into a multidisciplinary coupling model, driving the multidisciplinary coupling model to perform dynamic calculation of a preset simulation step size, and obtaining real-time simulation state data; verifying the real-time simulation state data based on a preset conditional release mechanism, and when the release conditions are met, releasing the encapsulated real-time simulation state data to the preset state topic of the dedicated communication hub through a second sending client.
[0015] This solution provides high-precision physical law calculation support for collaborative simulation and significantly reduces network transmission load through lightweight asynchronous publishing.
[0016] In one embodiment, the multidisciplinary coupled model includes at least a mechanical system model, a hydraulic system model, a power system model, and a control system model that are coupled with each other. The step of driving the multidisciplinary coupled model to perform dynamic calculations with a preset simulation step size to obtain real-time simulation state data includes: bidirectionally coupling the mechanical system model and the hydraulic system model through a physical port and transmitting force in real time to drive the mechanical system model to move; outputting commands to the actuators through the control system model based on the precise physical signals; and dynamically calculating and outputting power state parameters through the power system model according to the commands and load torque, summarizing and generating the real-time simulation state data containing multi-dimensional physical states.
[0017] This approach deeply recreates the real dynamic interaction and energy transfer process of complex electromechanical-hydraulic systems, ensuring the engineering usability of the simulation results.
[0018] In one implementation, the real-time simulation status data is verified based on a preset conditional publishing mechanism, and when the publishing conditions are met, the encapsulated real-time simulation status data is published to a preset status topic of the dedicated communication hub through a second sending client. This includes: comparing each field attribute of the currently acquired real-time simulation status data with that of the previously sent data; determining that the publishing conditions are met only when a change in the value of the field attribute is detected, performing a serialization operation on the real-time simulation status data, and triggering the network publishing mechanism of the second sending client.
[0019] This solution enables intelligent, redundancy-free, on-demand data distribution, significantly reducing bandwidth consumption and unnecessary front-end rendering overhead.
[0020] In one implementation, the step of publishing the encapsulated real-time simulation status data to a preset status topic of the dedicated communication hub via a second sending client includes: extracting core indicator data from the real-time simulation status data, the core indicator data including actuator spatial trajectory, pressure displacement status, or instantaneous load status; encapsulating the core indicator data using a predefined data model class, and converting it into a structured load message using a conversion function.
[0021] This solution unifies the data contract standard across heterogeneous software, improving the efficiency and accuracy of data deserialization.
[0022] In one embodiment, the method further includes: binding a corresponding callback function to the preset instruction topic during the initialization phase of the second terminal, and ensuring the atomicity of access to the real-time simulation state data through a thread lock mechanism.
[0023] This solution prevents dirty reads and state conflicts that may occur under high-frequency concurrent data interaction, ensuring the robustness of the background processing service.
[0024] Thirdly, embodiments of this specification provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in either the first or second aspect.
[0025] Fourthly, embodiments of this specification provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in either the first or second aspect. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0027] Figure 1 This is a flowchart illustrating the real-time collaborative simulation method for excavator digital twins based on MQTT, according to Embodiment 1 of this application. Figure 2 This is a schematic diagram of the system framework involved in the embodiments of this application; Figure 3 This is a schematic diagram illustrating the integration of the virtual interaction module involved in the embodiments of this application; Figure 4This is a flowchart illustrating the real-time collaborative simulation method for excavator digital twins based on MQTT, according to Embodiment 2 of this application. Figure 5 This is a schematic diagram of the multidisciplinary simulation module system integration involved in the embodiments of this application; Figure 6 This is a schematic diagram of the MQTT data hub framework involved in the embodiments of this application; Figure 7 This is a schematic diagram of the workflow involved in the embodiments of this application; Figure 8 This is a schematic diagram of the interaction process of the MQTT-based real-time collaborative simulation method for excavator digital twins according to Embodiment 3 of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided for the implementation of this specification. Detailed Implementation
[0028] Unless otherwise defined, the technical or scientific terms used in the embodiments of this specification shall have the ordinary meaning understood by one skilled in the art to which this specification pertains. The terms "first," "second," and similar terms used in the embodiments of this specification do not indicate any order, quantity, or importance, but are merely used to avoid confusion of constituent elements.
[0029] Unless the context otherwise requires, throughout this specification, "a plurality of" means "at least two," and "including" is interpreted as open-ended or encompassing, that is, "including, but not limited to." In the description of this specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this specification. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example.
[0030] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0031] As mentioned in the background technology, excavators, as typical engineering machinery, are complex electromechanical-hydraulic multidisciplinary coupled systems integrating mechanical structure, hydraulic transmission, power system, and control system. Their simulation models need to accurately reflect the dynamic interactions and energy transfer between subsystems, characterized by high model accuracy requirements, large computational complexity, and strict real-time requirements. In traditional simulation modes, multidisciplinary modeling and coupled simulation are typically performed using a single simulation platform. While these platforms have advantages in physical modeling and solution accuracy, their visualization and interactive capabilities are generally weak, making it difficult to construct a highly immersive and realistic virtual working environment.
[0032] This traditional model, which emphasizes simulation but neglects interaction, prevents operators from gaining an intuitive and natural human-computer interaction experience during simulation, making it difficult to conduct real-time on-loop debugging simulations or control strategy verification. While existing technologies offer platforms that achieve cross-process data bridging via Modbus or UDP protocols, they fundamentally lack a unified solution environment with millisecond-level state synchronization between models, and lack high-frequency real-time bidirectional control loops. Furthermore, the use of dynamic link libraries for integration results in tight system coupling, making it difficult to support distributed deployments or cross-platform remote collaborative simulation scenarios, and significantly limiting dynamic interaction capabilities.
[0033] Based on the above inventive concept, the following is an exemplary description of the MQTT-based real-time collaborative simulation method for excavator digital twins provided in the embodiments of this specification.
[0034] This embodiment provides a real-time collaborative simulation method for excavator digital twins based on MQTT, including: It should be noted that the first terminal (virtual interactive terminal) and the second terminal (multidisciplinary simulation terminal) of this invention jointly access the dedicated communication hub and constitute a complete collaborative simulation system based on a unified agreed-upon preset instruction theme and preset state theme. The two are interdependent in communication links and data contracts, jointly achieving low-latency, loosely coupled closed-loop physical simulation. For example... Figure 1 As shown, as a first embodiment of this application, a real-time collaborative simulation method for excavator digital twins based on MQTT, applied to a first terminal, is provided. It includes:
[0035] S101, in response to the operation performed in the first virtual interactive interface, generates the corresponding target control command.
[0036] In this collaborative simulation system, the overall system framework is as follows: Figure 2 As shown, the virtual interaction module of the first terminal and the multidisciplinary simulation module of the second terminal, through the intermediate MQTT data hub, perform asynchronous routing and forwarding operations such as instruction encapsulation, instruction parsing, simulation data extraction and transmission, thus constructing an integrated collaborative simulation closed loop. Further combined with... Figure 3As shown in the integrated diagram of the virtual interaction module, the virtual interaction module includes an excavator twin model and dynamic operation scene in the core visualization layer, a data display panel and parameter configuration and control interface in the data display and control layer, and completes data encoding, publishing and parsing routing through the communication interface layer at the bottom layer.
[0037] Specifically, the first terminal can be a high-performance PC running the Unity3D engine, a portable control terminal, a web-based 3D graphics display device, or a VR / AR headset, generally referring to the operator-side front-end system, with a virtual interaction module at its core. In this embodiment, before performing this step, a 3D model of the target device is first acquired, kinematic constraints are applied based on the kinematic chain relationship, and a physics engine is used to generate a digital twin model. In practical implementation, by setting rendering parameters such as materials and dynamic lighting, or alternatively using a low-poly lightweight rendering scheme, the physical interaction between the excavator and the real environment is greatly simulated, thereby significantly enhancing the realism of the model.
[0038] S102 utilizes a particle system to create effects such as dust and soil splashing, and uses texture technology to present changes in the shape of the ground in real time, thus constructing a dynamic work scene that corresponds to the real work environment.
[0039] In practice, by setting dynamic particle parameters ranging from 1,000 to 5,000 particles per second, or by alternatively using pre-baked mesh deformation animation, a high-fidelity reproduction of the work site environment is achieved, greatly enhancing the immersive experience of the scene.
[0040] S103, in response to the operation performed in the first virtual interactive interface, generates the corresponding target control command.
[0041] Specifically, this operation can come from a virtual interactive component that functions identically to the real cockpit and can receive continuous operating instructions from the operator.
[0042] S104, based on the first sending client, the target control command is encapsulated and published to the preset command topic of the dedicated communication hub.
[0043] Specifically, the first sending client can be implemented as an instance of `mqttClient_send` in the MQTTnet library, while the dedicated communication hub can be implemented as an MQTT data hub server. In this step, by defining preset topics with tree-structured design rules such as "excavator / control / boom", instructions are encoded into standardized protocol messages of structured data objects such as JSON and sent. By setting a QoS level of 1 to ensure that messages are delivered at least once, or alternatively using UDP hole punching transmission (although the latter is less reliable), lossless high-speed transmission of instructions is achieved using lightweight routing. Furthermore, the first sending client and the first receiving client (`mqttClient_receive`) are configured with different first identifiers (ClientID). This independent thread isolation mechanism effectively avoids thread blocking and message out-of-order delivery caused by high-frequency bidirectional communication.
[0044] S105, the first receiving client listens to the preset status topic of the dedicated communication center and receives the real-time simulation status data calculated and returned by the second terminal.
[0045] S106, Based on the real-time simulation status data, the status of the digital twin model and data display panel in the first virtual interactive interface is updated synchronously.
[0046] In practice, after obtaining the original message, the system deserializes it into a data model class object defined in C# using Encoding.UTF8.GetString. Then, this structured data is pushed to the data-driven engine of the data display panel, dynamically refreshing the multi-dimensional information historical trend chart with timestamps as the baseline. The built-in logic unit performs threshold comparisons on target parameters such as bucket hydraulic pressure or engine instantaneous power at a set 50-millisecond refresh cycle. If the pressure exceeds a preset safe pressure threshold (e.g., 35MPa), it triggers chart highlighting, color turning red, or audible alarm prompts. Through this closed loop, operators can intuitively and efficiently monitor deep and abstract physical state changes.
[0047] like Figure 4 As shown, as another preferred embodiment of this application, a real-time collaborative simulation method for excavator digital twins based on MQTT is provided for application to a second terminal. Specifically, the second terminal can be a local physical workstation deploying Sysplorer or Simulink, or a distributed cloud-based high-computing-power cluster, generally referring to a backend computing node responsible for solving physical laws. Combined with... Figure 4 as well as Figure 5As shown in the system integration diagram of the multidisciplinary simulation module, the multidisciplinary simulation module includes mutually coupled mechanical, hydraulic, power, and control systems. The power system provides power (output torque) to the hydraulic system, the control system outputs a control algorithm to drive the hydraulic system, and the hydraulic system ultimately transmits the output force to the mechanical system. Simultaneously, the sensors of the mechanical system feed back to the control system to form an inner-loop control. Specific steps include: S401, by listening to the preset instruction topic of the dedicated communication center through the second receiving client, the target control instruction sent by the first terminal is received.
[0048] During the initialization phase, the system binds corresponding callback functions to the instruction topic and ensures the atomicity of data access through a thread lock mechanism to prevent dirty reads caused by multi-threaded concurrency. Simultaneously, combined with... Figure 6 As shown in the MQTT data hub framework diagram, the data hub manages topics using a publish / subscribe model. The second terminal (multidisciplinary simulation module) utilizes a Paho-MQTT dual-client layer for receiving and sending, and binds topic callbacks through the main controller, employing a thread lock protection mechanism for stable communication.
[0049] S402, the parsing engine interprets the target control commands and converts them into precise physical signals according to the preset mapping relationship.
[0050] Specifically, the precise physical signal can realize physical quantities such as the target opening degree (mm) of the main valve or the target flow rate (L / min) of the hydraulic cylinder. In practical implementation, numerical conversion is performed using gain coefficients and dead zone compensation algorithms, or nonlinear mapping is performed using a preset lookup table, thereby enabling the network abstraction instructions to be seamlessly converted into parameters that can be accurately identified within the simulation model.
[0051] S403, the precise physical signal is injected into the multidisciplinary coupled model to drive it to perform dynamic calculation of the preset simulation step size and obtain real-time simulation state data.
[0052] In practical implementation, the multidisciplinary coupled model deeply integrates mechanical system models, hydraulic system models, power system models, and control system models. The hydraulic system model (including the main pump, directional valves, etc., set according to actual specifications) achieves bidirectional coupling with the mechanical system model, which incorporates flexible units, through physical ports, transmitting driving force in real time and calculating stress and deformation under dynamic loads. Simultaneously, the power system model calculates the speed output based on the load torque, summarizing and generating simulation data containing full-dimensional physical states. This multidisciplinary collaborative calculation, by setting a strict step size of 1 millisecond, ensures absolute accuracy and fidelity in energy transfer and system efficiency indicators.
[0053] S404, the real-time simulation status data is verified based on a preset condition release mechanism, and the encapsulated payload message is released to the dedicated communication hub when the conditions are met.
[0054] Specifically, such as combining Figure 7 As shown in the flowchart of the collaborative simulation method, the entire system forms a complete closed-loop operation model, from command initiation, command encapsulation and release, command routing and reception, command parsing and injection, to multi-disciplinary collaborative simulation calculation, then to data acquisition and feedback release, and finally, the data parsing and presentation module drives the data display panel update. The preset conditional release mechanism can be implemented as an intelligent network load reduction algorithm with a set deadband. In specific implementation, the system compares each field of the current data with the previously sent data one by one. Only when the absolute value of the difference exceeds the set deadband threshold (such as a change of 0.5%) is it determined that an actual change has occurred and a JSON serialization operation is performed. Core indicator data (such as the spatial trajectory coordinates of the bucket tooth tip, pressure and displacement of each node) are packaged and encapsulated through the data model class defined by @dataclass. Compared with the timed blind release mechanism, this strategy based on difference verification significantly reduces network bandwidth consumption and greatly reduces unnecessary processing overhead in front-end rendering, thereby ensuring the real-time performance and high availability of the entire virtual testing platform.
[0055] like Figure 8 As shown, the complete timing and physical execution closed-loop process of the entire collaborative simulation is explained in detail from the perspective of the interaction between the first terminal (virtual interaction module), the dedicated communication hub (MQTT data hub), and the second terminal (multidisciplinary simulation module). The specific interaction steps are as follows: S801, the first terminal responds to the operation in the first virtual interactive interface, generates a corresponding target control command, and encapsulates the target control command and sends it to the preset command subject of the dedicated communication hub through the first sending client.
[0056] In practical implementation, taking the excavator's digging action as an example, the operator controls the excavator's digging action through the control interface of the first terminal (virtual interaction module). This control interface provides virtual interaction components consistent with the functions of a real cockpit, receiving continuous operation commands from the operator. Subsequently, the communication interface of the first terminal summarizes the operation signals from the interface in real time, encodes them into standardized structured commands, and sends the commands to a predefined control command topic through a dedicated first sending client (mqttClient_send).
[0057] S802, the dedicated communication hub routes and forwards the target control command, and the second terminal listens to the preset command topic through the second receiving client, receives and parses the target control command into a precise physical signal.
[0058] In practice, instructions are asynchronously routed via the MQTT data hub (using a publish / subscribe model) and received in real time by the communication module of the second terminal (multidisciplinary simulation module) subscribed to this topic. At the receiving end, the main controller binds the corresponding callback function to the instruction topic during the initialization phase and ensures the atomicity of data access through a thread lock mechanism. After reception, the parsing engine embedded in the second terminal interprets the structured instruction message and, according to a preset mapping relationship, converts it into precise physical quantity values (such as precise physical signals) recognizable by the corresponding signal ports within the simulation model.
[0059] S803, the second terminal injects the precise physical signal into the multidisciplinary coupling model, drives the multidisciplinary coupling model to perform dynamic calculation of the preset simulation step size, and obtains real-time simulation state data.
[0060] In practice, the aforementioned precise physical signals are seamlessly injected into the running multidisciplinary coupled simulation model. Upon receiving the drive signal, the high-fidelity model in the second terminal initiates a dynamic calculation of one simulation step. Its mechanical dynamics model, hydraulic system model, power model, and control system are simulated collaboratively. This not only calculates the motion of each actuator but also, through an integrated load model, calculates the forces on each joint of the excavator, the pressure and flow fluctuations at each node of the hydraulic system, and the instantaneous load torque of the engine under this combined action, thus generating the real-time simulation state data.
[0061] S804. The second terminal verifies the real-time simulation status data based on a preset conditional release mechanism. When the release conditions are met, the encapsulated simulation data is sent to the preset status topic of the dedicated communication hub through the second sending client.
[0062] In practice, after the simulation is completed, the communication module of the second terminal actively collects key core data from the simulation results, including the spatial trajectory of the bucket teeth, the pressure and displacement of each cylinder, and the real-time speed and power of the engine. Before transmission, the system executes the core intelligent publishing mechanism: comparing each field of the current data with the previously transmitted data one by one, and only performing data serialization when an actual change is detected (i.e., the publishing conditions are met). Subsequently, this data is repackaged according to the defined data contract and published back to multiple subdivided status topics in the MQTT data hub through the second sending client.
[0063] S805, the dedicated communication hub routes and forwards the real-time simulation status data, and the first terminal listens to the preset status topic through the first receiving client, receives the data, and updates the status of the interface synchronously.
[0064] In practice, after the status data packets are routed through the MQTT data hub, the first receiving client (mqttClient_receive) of the first terminal subscribes to and obtains these status data packets. Subsequently, the embedded protocol parsing engine is invoked to deserialize the original messages following the agreed-upon contract into structured data objects recognizable by the system (e.g., parsing JSON payloads using Encoding.UTF8.GetString). The parsed simulation data is pushed to the data display panel in real time. The panel's data-driven engine is then triggered, updating its internal state based on the new data and using timestamps as a unified baseline, dynamically refreshing historical trend charts, etc. Simultaneously, the panel's built-in logic units can monitor key parameters according to preset thresholds and trigger highlighting, color changes, or alarm prompts, thereby transforming deep, abstract simulation data into intuitive visual information, ultimately forming a complete interactive closed loop from data reception, parsing, transmission to visualization rendering.
[0065] In one exemplary embodiment of this specification, an electronic device is also provided, such as Figure 9 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute an MQTT-based excavator digital twin real-time collaborative simulation method, which includes:
[0066] In response to the control operations performed in the first virtual interactive interface, a corresponding target control command is generated; The target control command is encapsulated by the first sending client and published to a preset command topic of the dedicated communication hub; The first receiving client listens to the preset status topic of the dedicated communication center and receives real-time simulation status data calculated and returned by the second terminal. Based on the real-time simulation status data, the status of the digital twin model and data display panel in the first virtual interactive interface is updated synchronously.
[0067] Alternatively, another MQTT-based excavator digital twin real-time collaborative simulation method can be implemented, which includes: listening to the preset instruction topic of the dedicated communication center through the second receiving client and receiving the target control instruction sent by the first terminal; The target control command is parsed and converted into a precise physical signal according to a preset mapping relationship; The precise physical signal is injected into the multidisciplinary coupling model to drive the multidisciplinary coupling model to perform dynamic calculations of a preset simulation step size and obtain real-time simulation state data. The real-time simulation status data is verified based on a preset conditional release mechanism, and when the release conditions are met, the encapsulated real-time simulation status data is released to the preset status topic of the dedicated communication hub through the second sending client.
[0068] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] In addition to the methods, apparatus, and devices described above, the MQTT-based excavator digital twin real-time collaborative simulation method provided in the embodiments of this specification can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps in the MQTT-based excavator digital twin real-time collaborative simulation method according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0070] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this specification. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages.
[0071] Furthermore, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor of the steps in the MQTT-based real-time collaborative simulation method for excavator digital twins according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0072] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0074] The embodiments described above are merely illustrative of several implementation methods outlined in this specification. While the descriptions are specific and detailed, they should not be construed as limiting the scope of the solutions provided in this specification. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this specification, and these all fall within the scope of protection of this specification. Therefore, the scope of protection for this patent should be determined by the appended claims.
Claims
1. A real-time collaborative simulation method for excavator digital twins based on MQTT, applied to a first terminal, characterized in that, include: In response to the control operations performed in the first virtual interactive interface, a corresponding target control command is generated; The target control command is encapsulated by the first sending client and published to a preset command topic of the dedicated communication hub; The first receiving client listens to the preset status topic of the dedicated communication center and receives real-time simulation status data calculated and returned by the second terminal. Based on the real-time simulation status data, the status of the digital twin model and data display panel in the first virtual interactive interface is updated synchronously.
2. The method according to claim 1, characterized in that, Before generating the corresponding target control command in response to the control operation in the first virtual interactive interface, the method further includes: A three-dimensional model of the target device is obtained, kinematic constraints are applied based on the kinematic chain relationship, and physical properties are assigned to generate the digital twin model; Dynamic work scenes corresponding to real work environments are constructed using particle systems and texture technology. The digital twin model, the dynamic work scenario, and the data display panel are integrated into the first virtual interactive interface.
3. The method according to claim 1, characterized in that, The step of synchronizing and updating the state of the digital twin model and data display panel in the first virtual interactive interface based on the real-time simulation state data includes: The original message of the real-time simulation state data is obtained and deserialized into a structured data object that can be recognized internally by the system through the embedded protocol parsing engine; The data-driven engine pushes the structured data objects to the data display panel and dynamically refreshes the multi-dimensional information historical trend chart and performance key parameter view with a unified timestamp as the reference axis. The target parameters in the structured data object are monitored according to a preset threshold. If the target parameters exceed the preset threshold, a highlighting, color change, or alarm message is triggered.
4. The method according to claim 1, characterized in that, The first sending client and the first receiving client are configured with different first identifiers to perform data transmission and reception in independent thread isolation.
5. The method according to claim 1, characterized in that, The method further includes: In response to the target physical parameter adjustment instruction received in the parameter configuration interface, the target physical parameter adjustment instruction is sent to the dedicated communication hub via the first sending client to drive the second terminal to dynamically adjust the corresponding system parameters before simulation or during the pause phase.
6. A real-time collaborative simulation method for excavator digital twins based on MQTT, applied to a second terminal, characterized in that, include: The second receiving client listens to the preset instruction topics of the dedicated communication center and receives the target control instructions sent by the first terminal. The target control command is parsed and converted into a precise physical signal according to a preset mapping relationship; The precise physical signal is injected into the multidisciplinary coupling model to drive the multidisciplinary coupling model to perform dynamic calculations of a preset simulation step size and obtain real-time simulation state data. The real-time simulation status data is verified based on a preset conditional release mechanism, and when the release conditions are met, the encapsulated real-time simulation status data is released to the preset status topic of the dedicated communication hub through the second sending client.
7. The method according to claim 6, characterized in that, The multidisciplinary coupled model includes at least mutually coupled mechanical system models, hydraulic system models, power system models, and control system models; The process of driving the multidisciplinary coupled model to perform dynamic calculations of a preset simulation step size and obtaining real-time simulation state data includes: The mechanical system model and the hydraulic system model are bidirectionally coupled through a physical port, and force is transmitted in real time to drive the mechanical system model to move. The control system model outputs commands to the actuators based on the precise physical signals. The dynamic system model dynamically calculates and outputs dynamic state parameters based on the instructions and load torque, and summarizes these parameters to generate real-time simulation state data containing multi-dimensional physical states.
8. The method according to claim 6, characterized in that, The real-time simulation status data is verified based on a preset conditional release mechanism. When the release conditions are met, the encapsulated real-time simulation status data is released to a preset status topic of the dedicated communication hub through a second sending client, including: Compare each field attribute of the currently acquired real-time simulation status data with that of the previously sent data; The publishing condition is determined to be met only when the value of the field attribute is detected to have changed. The real-time simulation state data is then serialized and the network publishing mechanism of the second sending client is triggered.
9. The method according to claim 6, characterized in that, The step of publishing the encapsulated real-time simulation state data to the preset state topic of the dedicated communication hub through the second sending client includes: Extract the core indicator data from the real-time simulation state data, including the actuator spatial trajectory, pressure displacement state, or instantaneous load state; The core indicator data is encapsulated using a predefined data model class and converted into a structured payload message using a conversion function.
10. The method according to claim 6, characterized in that, The method further includes: During the initialization phase of the second terminal, a corresponding callback function is bound to the preset instruction topic, and the atomicity of access to the real-time simulation state data is ensured through a thread lock mechanism.