| With the development of Internet of Things(IoT)technology,an increasing number of publish/subscribe IoT systems are structured with distributed multi-agent clusters instead of centralized single-agent proxies to achieve high availability and redundancy,achieve high performance by load balancing and horizontal scaling,deploy the nearest proxy server to reduce message transmission and reduce system complexity and maintenance costs.However,bridging proxies in popular distributed multi-agent clusters may lead to potential message loops and broadcast storms due to the inherent characteristics of the publish/subscribe mechanism,In addition,the proxy servers with the present routing protocols forward too many useless messages.The thesis studies the method of loop elimination and routing algorithm in distributed multi-agent clusters based on publish/subscribe mechanism,and implements a cluster system on embedded platform.The main work of the thesis is as follows:1.A loop elimination method based on an improved spanning tree protocol is designed to generate a loop-free tree network structure by eliminating loops in the network.Its purpose is to automatically connect proxies in a loop-free topology and distribute messages among them.Meanwhile,considering that node changes may cause frequent topological reconstruction of the network,this thesis proposes a method of partitioning reconstruction to solve the problem of reconstructing the tree.Through simulation experiments,compared with the bridged fully connected network,the effectiveness of the algorithm in removing loops and avoiding network storms is verified.Compared with the bridged fully connected network,the traffic of message forwarding is reduced by 10%-32%under different numbers of proxies and published topics.The average CPU and memory occupancy rates are reduced by 2.71%and 1.93%,respectively.2.An enhanced Chord routing algorithm based on node importance ranking has been designed.This routing algorithm establishes a virtual logical network structure on top of the physical network,and distributes messages of the publish-subscribe system through hash mapping.The ranking algorithm employs the grounded Laplacian matrix to map the actual physical nodes to the Chord ring according to their importance ranking,which preserves the true physical topology information of the nodes.Simulation results prove that the message forwarding traffic is reduced by 27%to 35%compared with the bridged loop-free tree network by controlling the size of the routing table.3.A cluster management software is developed and implemented on a distributed embedded system based on the optimized publish/subscribe message communication mechanism,in which the status information of each node collected is analyzed for secure situational awareness and threat detection. |