High-performance distributed MQTT communication method and device based on industrial Internet of Things
By combining a distributed MQTT broker layer and a selective publish-subscribe module, industrial IoT communication is dynamically optimized, solving the problem that centralized MQTT brokers are prone to becoming bottlenecks. This achieves high concurrency, low latency, and high reliability in message transmission, improving the system's stability and scalability.
Patent Information
- Application Number
- CN202511884952.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-02-10
AI Technical Summary
In existing industrial IoT communication protocols, centralized MQTT brokers are prone to becoming bottlenecks, making it difficult to meet the requirements of high availability and high concurrency performance. Furthermore, existing distributed MQTT solutions lack the ability to quickly adapt to dynamic network states, affecting system stability and real-time response performance.
A distributed MQTT broker layer is adopted, and the optimal root broker node is elected through multi-dimensional evaluation to form a loop-free and efficient topology. Combined with selective publish/subscribe modules and monitoring and management modules, dynamic topology reconstruction and broker adjustment are realized to optimize message transmission paths.
It achieves high-concurrency message transmission, low-latency data interaction, and highly reliable load balancing, improving the system's scalability and fault tolerance, and ensuring stability and high reliability in the industrial IoT environment.
Smart Images

Figure CN121509503A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to industrial Internet of Things (IoT) communication and distributed system optimization, and more particularly to a high-performance distributed MQTT communication method and apparatus based on industrial IoT. Background Technology
[0002] In recent years, the Industrial Internet of Things (IIoT) has placed higher demands on the performance of communication protocols in the process of realizing remote equipment monitoring, real-time data acquisition, and intelligent decision-making, especially in terms of low-latency transmission, highly reliable connections, and large-scale concurrent communication. Existing industrial communication protocols are mostly based on static topologies and periodic polling mechanisms, which are difficult to adapt to the dynamic changes in industrial environments and the high-frequency information interaction between heterogeneous devices. This leads to problems such as link congestion, message delays, and data loss, thus affecting the real-time response and scalability of the system. To address these limitations, the lightweight message queue transport protocol MQTT, due to its publish / subscribe model, low protocol overhead, and good cross-platform compatibility, has been widely used in IIoT communication. MQTT uses broker nodes to relay and decouple messages, effectively simplifying the communication path and improving the system's flexibility and fault tolerance, making it a mainstream protocol in edge computing and remote control scenarios.
[0003] However, traditional MQTT protocols employ a centralized broker architecture, where all messages must be forwarded through a single broker node. As the number of devices and data traffic increases, the central broker easily becomes a system bottleneck, causing not only high latency and uneven load distribution but also potential global communication interruptions in the event of broker failure. This makes it difficult to meet the high availability and high concurrency performance requirements of industrial scenarios. To address this, researchers have proposed a multi-broker collaborative distributed MQTT architecture, but existing distributed MQTT solutions still have several shortcomings. Furthermore, industrial network environments are complex and dynamic, with frequent broker node online / offline occurrences and link fluctuations. Existing distributed MQTT topology adjustment mechanisms are slow to respond, structurally rigid, and lack the ability to quickly adapt to dynamic network conditions, affecting system stability and real-time response performance. Summary of the Invention
[0004] This invention addresses the shortcomings of existing technologies by providing a high-performance distributed MQTT communication method and device based on the Industrial Internet of Things (IIoT). This method enables high-concurrency message transmission, low-latency data interaction, and highly reliable load balancing in an IIoT environment, while effectively improving the system's scalability and fault tolerance.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a high-performance distributed MQTT communication device for the Industrial Internet of Things, the device comprising:
[0006] The distributed MQTT broker layer, consisting of multiple broker nodes, is used to realize distributed access, processing and forwarding of messages in the industrial IoT environment, and supports high-concurrency communication from multiple source devices.
[0007] The multi-dimensional evaluation root proxy election module comprehensively scores each proxy node based on its connectivity, computing power, path latency, reliability, and power consumption, and dynamically selects the optimal root proxy node to form a loop-free and efficient distributed topology.
[0008] The selective publish-subscribe module is used to reduce redundant communication by pruning and optimizing the topic propagation path, forwarding subscription messages only between necessary brokers. The publish-subscribe module supports three quality of service levels: QoS0, QoS1, and QoS2, corresponding to "at most once," "at least once," and "exactly once" message delivery guarantees, respectively.
[0009] The monitoring and management module triggers topology reconstruction and agent adjustment when it detects uneven load on agent nodes or abnormal links.
[0010] Furthermore, the multiple broker nodes in the distributed MQTT broker layer are interconnected through a hierarchical spanning tree topology.
[0011] The proxy layer periodically measures the round-trip time (RTT) between adjacent proxy nodes and maintains a weighted adjacency list, where the RTT is calculated according to the formula... Calculate, where t send The timestamp t for sending the probe packet reply The timestamp for receiving the corresponding reply packet. The weighted adjacency list is used to provide network state data for the multidimensional evaluation root agent election module.
[0012] Furthermore, the multidimensional evaluation root agent election module calculates a comprehensive score for each agent node using a comprehensive scoring function, specifically implemented through a comprehensive scoring function s(v):
[0013]
[0014] Where, d v The degree represents the connectivity of node v, reflecting the number of its adjacent proxies. C v Represents computing power (CPU clock speed or performance grading). D v R represents the average path delay (Average RTT). v Represents reliability metrics (such as the percentage of normal responses). P v This represents a simulated power consumption value (e.g., the number of messages processed per unit time). The coefficients α, β, γ, δ, and λ are the normalized weights of the five indicators mentioned above, and satisfy α + β + γ + δ + λ = 1; dmax C represents the maximum connectivity of nodes in the network. The connectivity dv of each node v is the number of its neighbors. max It represents the maximum computing power of a node in the network.
[0015] Furthermore, the selective publish / subscribe module achieves subscription path pruning through the collaborative management of the topic forwarding table Tlb, the historical topic table HT, and the subscription status table HS, and based on the coverage relationship of wildcard topics.
[0016] The selective publish / subscribe module performs the following: When the proxy node receives a subscription request from a client, it checks whether a wildcard topic exists in the HT and HS that can cover the requested topic. If it exists, the subscription relationship is only recorded locally, and the subscription request is not forwarded upstream. If it does not exist, the subscription request is forwarded upstream, and Tlb, HT, and HS are updated.
[0017] Furthermore, the monitoring and management module is configured as follows:
[0018] Real-time data collection of round-trip time (RTT), link status, CPU utilization, and message queue length between proxy nodes. Based on the collected data, topology adjustments are performed, wherein the triggering of these adjustments satisfies a hysteresis control condition:
[0019] The root agent switching and topology reconstruction operation is triggered only when the load of the current root agent node exceeds the preset threshold for N consecutive monitoring cycles, and there is a candidate agent node whose comprehensive score for M consecutive monitoring cycles is higher than that of the current root agent node.
[0020] Furthermore, during topology switching, the data in the topic forwarding table Tlb, historical topic table HT, and subscription status table HS in the selective publish / subscribe module are synchronized.
[0021] Furthermore, the multidimensional evaluation root agent election module is also configured to automatically trigger a re-election process under any of the following conditions:
[0022] (a) The current root agent node has not broadcast its status information for more than a preset time threshold.
[0023] (b) The timeout rate of node performance parameters stored in each proxy node for election exceeds a preset threshold. (That is, the scoring information becomes invalid. For example, if the performance data of most nodes in the system has "expired" due to communication interruptions or other reasons, it means that the state view of the entire system is unreliable, and a re-election is triggered.)
[0024] Furthermore, the method for determining the coverage relationship based on wildcard topics is as follows:
[0025] Definition of historical subscription set T: The basis for determining wildcard coverage relationships;
[0026] The wildcard topic is used to determine whether a wildcard topic exists in set T, and whether topic t is covered.
[0027] The matching function is used to determine whether t matches the wildcard topic. If they match, then t is overwritten.
[0028] For a subscribed topic t, the set T subscribed by the local client... local Subscribing to set T with downstream agent nodes downstream The historical subscription set T, formed by the union of the sets, is denoted as: Determine if a wildcard theme exists. .
[0029] If it exists And the subject t with wildcard satisfy:
[0030]
[0031] in, This indicates that you are subscribing to the matching function.
[0032] Then determine if topic t is covered.
[0033] When a match is found, the proxy node will no longer forward the subscription request upstream. When a match is not found, an upstream propagation record will be automatically generated and the forwarding table will be updated to achieve minimal propagation path control over the subscription.
[0034] Furthermore, during the root agent switching process, the monitoring and management module is also used to: automatically cache the message queue to be processed, and resume the transmission of the cached messages after the new root agent node is established.
[0035] A high-performance distributed MQTT communication method for the Industrial Internet of Things (IIoT) includes the following steps:
[0036] S1. Deploy multiple agent nodes to build a distributed MQTT agent layer.
[0037] S2. A comprehensive score is given based on the connectivity, computing power, path latency, reliability and power consumption of each proxy node, and the optimal root proxy node is dynamically elected accordingly to form a loop-free and efficient distributed topology.
[0038] S3 optimizes message forwarding paths by collaboratively managing the topic forwarding table (Tlb), historical topic table (HT), and subscription status table (HS) and pruning the propagation path of subscription requests based on the coverage relationship of wildcard topics.
[0039] S4. Collect the operating status and network indicators of the agent nodes in real time, and automatically trigger topology reconstruction and agent collaborative adjustment when the preset lag control conditions are met.
[0040] Furthermore, the preset hysteresis control condition specifically refers to: the load value of the current root agent node exceeds the preset threshold for N consecutive monitoring cycles, and the comprehensive score of a candidate agent node is higher than that of the current root agent node for M consecutive monitoring cycles.
[0041] The process of triggering a topology refactoring and performing a root agent switch also includes:
[0042] Cache messages with QoS1 or QoS2 that have not been fully transmitted.
[0043] Once the new root proxy node is established and the topology reconstruction is completed, the message will be retransmitted based on the cached records to ensure the integrity and consistency of message transmission.
[0044] Compared with the prior art, the present invention has the following advantages.
[0045] This invention establishes a high-performance distributed MQTT communication method (DWS-MQTT) for the Industrial Internet of Things (IIoT), employing a distributed proxy architecture to achieve multi-node collaborative communication and dynamic management. By introducing a dynamic topology optimization mechanism and a loop-free structure design, it ensures high-reliability message transmission in complex industrial network environments, effectively improving the system's stability and fault tolerance in industrial field environments. Attached Figure Description
[0046] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The scope of protection of the present invention is not limited to the following description.
[0047] Figure 1 This is a schematic diagram of the industrial Internet of Things platform system structure of the present invention.
[0048] Figure 2 This is a system architecture diagram of the DWS-MQTT system of the present invention.
[0049] Figure 3 This is a framework diagram of a root surrogate dynamic selection method based on multidimensional index scoring.
[0050] Figure 4 This is a diagram of the selective publish-subscribe system of the present invention.
[0051] Figure 5 This is a roadmap for the distributed MQTT communication technology of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0053] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0054] Depending on the context, words such as “if” or “suppose” used here can be interpreted as “when”, “in response to determination”, or “in response to detection”.
[0055] For ease of understanding, the embodiments of this disclosure will be described in detail first.
[0056] To address the problems of centralized MQTT broker bottlenecks, message path redundancy, uneven node load, and insufficient real-time performance in existing industrial IoT communication systems, this invention proposes a high-performance distributed MQTT communication method and device based on industrial IoT. This method can achieve high-concurrency message transmission, low-latency data interaction, and highly reliable load balancing in an industrial IoT environment, and can effectively improve the system's scalability and fault tolerance.
[0057] Example: The high-performance distributed MQTT communication device for industrial IoT consists of a heterogeneous multi-agent node system, which integrates a high-performance communication module based on the distributed MQTT protocol to receive data from multiple heterogeneous devices in the industrial field and achieve efficient and reliable message transmission.
[0058] Example 1, such as Figure 1 As shown, the service platform system architecture of the distributed MQTT communication device includes three functional layers: data acquisition device, distributed MQTT communication device, and information monitoring device, which work together to form a complete industrial Internet of Things communication system.
[0059] The first component, the data acquisition device, adopts a distributed deployment structure and is installed in various terminal devices in the industrial IoT field to collect sensor data, equipment operating parameters, and environmental status information. Specifically, it is used to collect multi-source data such as temperature, pressure, vibration, current, voltage, and equipment operating status in the industrial environment. This part interacts with the upper-layer agent node through a lightweight communication interface (such as Ethernet, serial port, or wireless connection) to achieve unified access, edge preprocessing, and standardized encapsulation of multi-source field data, providing a unified data input for the distributed communication layer.
[0060] II. The distributed MQTT communication device is the core component of the system, consisting of a layered collaborative network composed of multiple distributed agent nodes. This layer employs an improved publish / subscribe mechanism, supporting cross-regional multi-node collaboration and high-concurrency data transmission. Internally, it integrates core functional modules such as topic management, message forwarding, link optimization, and load balancing. It can dynamically adjust message routing strategies based on network topology changes and node performance status to achieve optimal message transmission path selection, thereby ensuring low latency, high reliability, and high throughput in industrial field communication.
[0061] As a preferred solution, the distributed MQTT communication device consists of a heterogeneous multi-core processor system, internally integrating a multi-agent collaborative communication module based on the DWS-MQTT architecture for efficient distributed transmission and management of collected industrial equipment data. Through the combined operation of the SPF selective publish-subscribe mechanism and the ARPS multidimensional evaluation root agent optimization algorithm, the distributed MQTT communication device achieves adaptive collaboration between agents and intelligent message flow scheduling, ensuring high real-time performance and high reliability in complex industrial network environments.
[0062] Third, the information monitoring device is used to detect and analyze the operational status of the distributed agent network, including the load level of agent nodes, message queue length, latency trends, and link status. This device can periodically collect system operation indicators, build agent performance models, issue early warnings for abnormal loads or latency exceeding thresholds, and provide scheduling decision support to the distributed MQTT communication device. This enables system-level adaptive scheduling and dynamic optimization, thereby ensuring the long-term stable operation and high availability of the industrial IoT communication system.
[0063] As a preferred solution, the information monitoring device can be used to monitor equipment operating status, network topology, agent node load, communication latency, and abnormal information in real time. This device supports data trend analysis, historical record review, and system health assessment, facilitating monitoring and management by operations and maintenance personnel. It enables standardized, high-speed, and structured transmission of industrial data.
[0064] Example 2: A high-performance distributed MQTT communication device for the Industrial Internet of Things, whose overall architecture includes a distributed MQTT broker layer, a multi-dimensional evaluation root broker election module, a selective publish-subscribe module, and a monitoring and management module.
[0065] 1. The distributed MQTT broker layer consists of multiple broker nodes, which route and forward messages in a tree topology to achieve distributed communication across regions. Each broker node has local message caching and forwarding capabilities, enabling load balancing and redundancy backup in high-concurrency scenarios.
[0066] 2. The multi-dimensional evaluation root proxy election module is used to calculate a comprehensive weight score based on multi-dimensional indicators such as real-time load, connectivity, latency, reliability and energy consumption of proxy nodes during system operation, thereby dynamically selecting the optimal node as the root proxy to achieve acyclic topology and shortest path construction.
[0067] 3. The selective publish / subscribe module is used to tailor the subscription propagation path across agents. By establishing a subscription relationship matrix and a topic filtering table, it reduces message flooding and duplicate transmission, and improves system bandwidth utilization and message delivery efficiency.
[0068] 4. The monitoring and management module monitors the status and performs performance analysis of each agent node, including indicators such as CPU utilization, message throughput, latency fluctuation, and node availability. When abnormal load or connection interruption is detected, dynamic topology reconstruction and agent migration operations are triggered to ensure high availability and high reliability of the system in complex industrial network environments.
[0069] Example 3: A root agent election mechanism based on multidimensional index evaluation, which consists of three parts: an input layer, a computation layer, and a decision execution layer.
[0070] The input layer is responsible for collecting key operational metrics of each agent node, including connectivity (reflecting the node's connectivity in the network), CPU utilization (reflecting the node's computing resource status), latency (reflecting the transmission performance between the node and other agents), reliability (reflecting the node's stability and fault tolerance), and energy consumption (reflecting the node's power consumption).
[0071] Based on the above input parameters, the computation layer uses normalization processing and a weighted scoring model to generate a comprehensive weight score for each node. The weight model can adaptively adjust the weight coefficients of each indicator according to the performance focus of different scenarios (such as low latency or low energy consumption), achieving flexible configuration of the evaluation mechanism. Its evaluation calculation function is as follows:
[0072]
[0073] in, Representative node The connectivity degree reflects the number of its adjacent proxies; Represents computing power (CPU clock speed or performance rating); Represents the average path delay (Average RTT). Represents reliability metrics (such as the percentage of normal responses); This represents a simulated power consumption value (such as the number of messages processed per unit time). The coefficients α, β, γ, δ, and λ are the normalized weights of the above five indicators, and satisfy α+β+γ+δ+λ=1.
[0074] The decision execution layer sorts the proxy nodes according to their weight scores, selects the node with the highest comprehensive score as the root proxy node, and initiates a backup proxy switching process when the root proxy fails or the load exceeds the threshold. This process includes steps such as proxy chain establishment, timing control block generation, load detection, and anomaly repair, realizing dynamic maintenance and high availability redundancy mechanisms for the root proxy.
[0075] Example 4: Distributed MQTT publish-subscribe mechanism system based on selective propagation.
[0076] The system comprises five core components: a topic interaction recording module, a subscription filtering module, a route pruning module, a message forwarding control module, and a consistency maintenance module.
[0077] The topic interaction record module maintains the topic mapping relationship between all publishers and subscribers in the system, establishing a topic relationship table and dependency matrix to support proxy nodes in quickly retrieving topic matching relationships during subscription request propagation. This module can automatically aggregate similar subscriptions based on the topic hierarchy structure, reducing redundancy in topic table storage.
[0078] When the agent receives a new subscription request, the subscription filtering module compares it with the topic dependency matrix of the current node to determine whether the topic already has the same or similar subscriptions in this region. If duplicate subscriptions exist, the module stops propagating to the upper-level agent, thereby avoiding unnecessary subscription flooding.
[0079] The routing pruning module optimizes the forwarding path of published messages based on topic distribution and logical topology information between proxies. By calculating topic relevance and path latency, the module selects the optimal proxies for forwarding, achieving selective propagation of published messages and effectively reducing duplicate forwarding and bandwidth consumption. Its main pruning rule is: when a proxies receive a published message on a specific topic, such as when proxies A receive a published message m on topic t, the system needs to determine whether it should forward it to downstream proxies C. j The indicator function is defined as follows:
[0080]
[0081] in yes The collection of locally subscribed topics, if t is If the topic is subscribed to, it will be forwarded; otherwise, it will be skipped. If the topic currently has no subscribers, or has been previously covered by a wider range of wildcard subscriptions (such as sensor / #), the system will automatically skip downstream forwarding of the message to reduce redundant communication overhead.
[0082] As a preferred implementation of global optimization, the route pruning module also implements dynamic route pruning through an SPF (Selective Path Forwarding) mechanism, namely: "pruning the propagation path of subscription requests based on the coverage relationship of wildcard topics" further includes the following steps:
[0083] The first step is for each proxy node to maintain its local subscription table and periodically report local topic interest summaries to the root proxy node.
[0084] The second step involves the root proxy node constructing a cross-domain topic propagation matrix based on the aggregated interest vectors. In this matrix, the elements Indicates agent and There is topic overlap, meaning there is subscription overlap; M ij =0 indicates that the two currently do not have any shared topics.
[0085] Third, when a message needs to be broadcast, the root proxy node calculates the minimum interest propagation tree covering all relevant subscribers based on the cross-domain topic propagation matrix M. This tree defines the backbone path for message forwarding.
[0086] Fourth, based on the generated minimum interest propagation tree, the system prunes the original message forwarding path, forwarding the message only along the links in the minimum interest propagation tree, skipping redundant proxy nodes not on the tree, thereby achieving on-demand propagation and reducing network redundancy.
[0087] Fifth, when the system detects a change in the subscription relationship of a proxy node, it triggers an incremental update of the cross-domain topic propagation matrix M and adjusts the minimum interest propagation tree accordingly to ensure the real-time optimality of the message forwarding path.
[0088] The message forwarding control module manages the specific transmission process of messages between agents, including message caching, priority determination, and dynamic forwarding decisions. When the system detects that the agent load is too high or the link latency exceeds the threshold, the module can temporarily store or forward some messages to backup agent nodes to ensure real-time performance and reliability.
[0089] The consistency maintenance module ensures global consistency of topic state and subscription relationships under multi-agent concurrent conditions. When agent nodes are added, deleted, or when load is migrated, the system uses a consistency verification mechanism to synchronize and update the topic table and message routing table to prevent topic failure or message loss.
[0090] By designing this selective publish-subscribe system, this invention effectively reduces the subscription diffusion range and the number of duplicate messages while ensuring MQTT protocol compatibility, optimizes message transmission paths, improves the overall system throughput and network resource utilization, and realizes the efficiency and scalability of distributed MQTT communication in the industrial Internet of Things environment.
[0091] Example 5: Distributed MQTT communication technology approach, such as... Figure 5 As shown, the framework is divided into three layers from top to bottom: a theoretical modeling layer, a core mechanism and algorithm layer, and a system implementation and verification layer.
[0092] The theoretical modeling layer establishes an undirected weighted communication graph model and a publish / subscribe mechanism model, providing a mathematical foundation for topology analysis and performance evaluation among distributed agents. The core mechanism and algorithm layer focuses on topology adaptive management algorithms, multi-dimensional evaluation root agent election algorithms, and publish / subscribe mechanism optimization algorithms based on selective propagation. This layer improves performance in the DWS-MQTT system through agent optimization and topic pruning mechanisms, and introduces dynamic weight balancing and load-aware control strategies to adapt to complex industrial environments. The system implementation and verification layer includes multi-level experimental system design, experimental platform construction, and multi-dimensional performance evaluation. Through simulation testing and real-world network verification, the performance of the DWS-MQTT system under different loads, latency, and node scales is analyzed, ultimately forming a high-performance distributed communication device evaluation system for the Industrial Internet of Things (IIoT).
[0093] Example 6: A distributed high-availability message communication method for the Industrial Internet of Things, comprising the following steps:
[0094] S1. The distributed MQTT broker layer includes: an MQTT distributed broker cluster module and a publish / subscribe communication module;
[0095] The MQTT distributed agent cluster module constructs a scalable multi-agent collaborative communication architecture. Through clustered deployment and intelligent routing mechanisms, it efficiently supports the access and management of a large number of terminal devices and is dedicated to reliable data relay and low-latency message forwarding on a global scale.
[0096] The publish / subscribe communication module establishes the communication between the underlying sensing network and the cloud application platform. It deeply integrates the MQTT protocol and uses its native publish / subscribe mechanism to efficiently organize and distribute data streams, thereby effectively ensuring low latency and high real-time performance of critical data transmissions end-to-end when facing massive concurrent device connections and data uplinks.
[0097] S2, the multidimensional evaluation root agent election module includes: performance acquisition submodule, comprehensive scoring submodule and hysteresis switching control submodule;
[0098] The performance acquisition submodule is used to collect and record the running status information of each agent node in real time, including but not limited to key parameters such as round-trip time (RTT), CPU utilization, message queue length, packet loss rate, and bandwidth utilization. At the same time, it performs smoothing and normalization calculations on the collected data to provide a unified input for subsequent scoring.
[0099] The comprehensive scoring submodule employs a multi-dimensional weighted scoring model to comprehensively and quantitatively evaluate the communication performance, computational load, and stability of the proxy nodes. The system calculates a comprehensive score by weighting and summing the various indicators according to their respective weighting coefficients. The node with the highest score is selected as the current root proxy node to achieve the optimal central distribution of the topology.
[0100] The hysteresis switching control submodule is used to set a dynamic hysteresis mechanism and switching threshold during the root agent election process. The system only triggers the root agent switching operation when the comprehensive score of the candidate node is higher than that of the current root agent for multiple consecutive monitoring periods, and the load of the current root agent continues to exceed the set threshold. In this process, a hysteresis time window and state stability judgment are introduced to prevent frequent switching due to instantaneous fluctuations, and to ensure a smooth transition and communication continuity of the system during dynamic adjustment.
[0101] S3, the selective publish / subscribe module includes: a subscription relationship table management section, an interest matching module, and a pruning and forwarding path module;
[0102] The subscription relationship table management section is used to maintain the local subscription topic table and its interest information for the agent nodes. Each agent periodically reports its subscription information to its parent node or root agent to form a global interest index aggregated across agents, thereby achieving efficient management and synchronous updates of distributed subscription relationships.
[0103] The interest matching module determines whether to forward the message to downstream or parallel proxy nodes based on the matching degree between the published topic and the aggregated subscription during message forwarding. Message passing is only performed when the target node has a valid subscription related to the current topic, thus significantly reducing resource waste caused by invalid cross-region forwarding.
[0104] The pruning and forwarding path submodule prunes and filters message paths in the topology by calculating topic relevance and interest thresholds. Based on a set interest function, the system suppresses low-relevance paths and retains key path nodes, thereby achieving on-demand propagation and path optimization, ensuring that messages are efficiently delivered only within the necessary node range.
[0105] S4, the monitoring and management module includes: status monitoring and topology reconstruction sub-modules;
[0106] The status monitoring periodically collects operational status data and link communication indicators from each agent node, including RTT fluctuations, message throughput, queue length changes, and connection availability. This submodule, through anomaly detection and trend analysis of time-series data, can proactively identify potential risks such as network congestion, link attenuation, and node anomalies.
[0107] The topology reconstruction submodule triggers root proxy switching and adaptive topology reconstruction when necessary, in the event of link anomalies, sudden increases in latency, or node failures. This submodule dynamically generates new proxy connection relationships based on real-time measured performance parameters, ensuring that the system maintains communication connectivity and load balancing even in the event of any node failure, while guaranteeing topology acyclicity.
[0108] This invention establishes a high-performance distributed MQTT communication method (DWS-MQTT) for the Industrial Internet of Things (IIoT), employing a distributed proxy architecture to achieve multi-node collaborative communication and dynamic management. By introducing a dynamic topology optimization mechanism and a loop-free structure design, it ensures high-reliability message transmission in complex industrial network environments, effectively improving the system's stability and fault tolerance in industrial field environments.
[0109] This invention constructs an ARPS multidimensional root agent election mechanism and an SPF selective publish-subscribe algorithm. The ARPS mechanism dynamically elects a root agent based on indicators such as node latency, CPU load, packet loss rate, and reliability, reducing data transmission latency for critical tasks and achieving high real-time communication. The SPF algorithm prunes redundant message forwarding paths, optimizes cross-domain message propagation, and improves bandwidth utilization and communication efficiency.
[0110] This invention introduces an interest-matching driven message scheduling strategy to achieve system-level adaptive scheduling and load balancing. The system can dynamically adjust its topology and message routing strategy based on real-time network conditions and agent node load, supporting parallel collaborative work by multiple agents, thereby meeting the performance requirements of large-scale device access and high-concurrency data transmission in the Industrial Internet of Things (IIoT).
[0111] This invention features excellent scalability and versatility, and can be widely applied to typical industrial IoT scenarios such as intelligent manufacturing, energy dispatching, and industrial control. This method provides a reliable, low-latency, and high-efficiency communication foundation for critical industrial operations, effectively overcoming the performance bottlenecks of traditional centralized MQTT under high concurrency and high load environments.
[0112] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "preferred embodiment," "detailed description," or "preferred embodiment," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0113] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Therefore, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope defined by the claims of the present invention.
Claims
1. A high-performance distributed MQTT communication device based on the Industrial Internet of Things, characterized in that, The device includes: The distributed MQTT broker layer, consisting of multiple broker nodes, is used to realize distributed access, processing and forwarding of messages in the industrial IoT environment, and supports high-concurrency communication from multiple source devices. The multi-dimensional evaluation root proxy election module comprehensively scores each proxy node based on its connectivity, computing power, path latency, reliability, and power consumption, and dynamically selects the optimal root proxy node to form a loop-free and efficient distributed topology. The selective publish-subscribe module is used to reduce redundant communication by pruning and optimizing the topic propagation path and forwarding subscription messages only between necessary brokers. The publish-subscribe module supports three quality of service levels: QoS0, QoS1, and QoS2, which correspond to message delivery guarantees of "at most once", "at least once", and "exactly once", respectively. The monitoring and management module triggers topology reconstruction and agent adjustment when it detects uneven load on agent nodes or abnormal links.
2. The communication device according to claim 1, characterized in that: The multiple agent nodes in the distributed MQTT agent layer are interconnected through a hierarchical spanning tree topology. The proxy layer periodically measures the round-trip time (RTT) between adjacent proxy nodes and maintains a weighted adjacency list, where RTT is calculated according to the formula... Calculate, where t send The timestamp t for sending the probe packet reply The timestamp for receiving the corresponding reply packet; the weighted adjacency list is used to provide network state data for the multidimensional evaluation root agent election module.
3. The communication device according to claim 1, characterized in that: The multidimensional evaluation root agent election module calculates a comprehensive score for each agent node using a comprehensive scoring function, specifically implemented through a comprehensive scoring function s(v): ; Where, d v C represents the connectivity of node v, reflecting the number of its adjacency proxies; v Represents computing power; D v R represents the average path delay; v Represents a reliability index; P v This represents the simulated power consumption value. The coefficients α, β, γ, δ, and λ are the normalized weights of the five indicators mentioned above, and satisfy α + β + γ + δ + λ = 1; max C represents the maximum connectivity of nodes in the network. The connectivity dv of each node v is the number of its neighbors. max It represents the maximum computing power of a node in the network.
4. The communication device according to claim 1, characterized in that: The selective publish / subscribe module manages the topic forwarding table Tlb, the historical topic table HT, and the subscription status table HS collaboratively, and prunes the subscription path based on the coverage relationship of wildcard topics. The selective publish / subscribe module performs the following: when the proxy node receives a subscription request from the client, it queries the HT and HS to see if there is a wildcard topic that can cover the topic of the request; if there is, it only records the subscription relationship locally and does not forward the subscription request; if there is no wildcard, it forwards the subscription request and updates Tlb, HT and HS.
5. The communication device according to claim 1, characterized in that: The monitoring and management module is configured as follows: Real-time data collection of round-trip time, link status, CPU utilization, and message queue length between proxy nodes; and topology adjustment based on the collected data, wherein the triggering of the topology adjustment satisfies a hysteresis control condition: The root agent switching and topology reconstruction operation is triggered only when the load of the current root agent node exceeds the preset threshold for N consecutive monitoring cycles, and there is a candidate agent node whose comprehensive score for M consecutive monitoring cycles is higher than that of the current root agent node. Furthermore, during topology switching, the data in the topic forwarding table Tlb, historical topic table HT, and subscription status table HS in the selective publish / subscribe module are synchronized.
6. The communication device according to claim 3, characterized in that, The multidimensional evaluation root agent election module is also configured to automatically trigger a re-election process under any of the following conditions: (a) The current root proxy node has not broadcast its status information for more than a preset time threshold; (b) The timeout rate of node performance parameters stored in each proxy node for election exceeds a preset threshold.
7. The communication device according to claim 4, characterized in that, The method for determining the coverage relationship based on wildcard topics is as follows: For a subscribed topic t, the set T subscribed by the local client... local Subscribing to set T with downstream agent nodes downstream The historical subscription set T, formed by the union of the sets, is denoted as: Determine if a wildcard topic exists. ; If it exists And the subject t with wildcard satisfy: ; in, This indicates a subscription to the matching function; Then determine if topic t is covered; When a match is found, the proxy node will no longer forward the subscription request upstream; when a match is not found, an upstream propagation record will be automatically generated and the forwarding table will be updated to achieve minimal propagation path control over the subscription.
8. The communication device according to claim 5, characterized in that, During the root agent switching process, the monitoring and management module is also used to: automatically cache the message queue to be processed, and resume the transmission of the cached messages after the new root agent node is established.
9. A high-performance distributed MQTT communication method based on the Industrial Internet of Things, characterized in that, The method includes the following steps: S1. Deploy multiple agent nodes to build a distributed MQTT agent layer; S2. A comprehensive score is given based on the connectivity, computing power, path latency, reliability and power consumption of each proxy node, and the optimal root proxy node is dynamically elected accordingly to form a loop-free and efficient distributed topology. S3. Through the collaborative management of topic forwarding tables, historical topic tables, and subscription status tables, and by tailoring the propagation path of subscription requests based on the coverage relationship of wildcard topics, the message forwarding path is optimized. S4. Collect the operating status and network indicators of the agent nodes in real time, and automatically trigger topology reconstruction and agent collaborative adjustment when the preset lag control conditions are met.
10. The communication method according to claim 9, characterized in that, The preset lag control conditions specifically refer to: the load value of the current root agent node exceeds the preset threshold for N consecutive monitoring cycles, and the comprehensive score of a candidate agent node is higher than that of the current root agent node for M consecutive monitoring cycles. The process of triggering a topology refactoring and performing a root agent switch also includes: Buffer messages with QoS1 or QoS2 that have not been fully transmitted; Once the new root proxy node is established and the topology reconstruction is completed, the message will be retransmitted based on the cached records to ensure the integrity and consistency of message transmission.