In underwater sensor networks, nodes are usually sparsely arranged, and autonomous underwater vehicles (AUVs) are often used to collect data by moving. However, it is a key problem for AUVs to shorten the path as much as possible to guarantee whole-network data acquisition. Aiming to solve this problem, this paper proposes an AUV underwater data collection method based on affinity propagation clustering. First, this clustering theory is used to select the nodes with large residual energy as cluster head nodes, and the clustering results are dynamically adjusted according to the communication radius of nodes to obtain the final clustering results. Finally, the cluster head nodes of the clusters are sequentially traversed using the traveling salesman problem, and an optimal path of AUV is planned to complete data collection for the whole network. A large number of simulation experiments verify that this method can effectively plan the mobile path of AUVs.
In wireless networks, multiple monitoring nodes are used to collect users’ transmission data in real time, which can be used for fault diagnosis and analytical feedback of the wireless network. Due to the limited number of monitoring nodes, key issues include how to optimize and schedule the channel resources of each node to cover more users, obtain more network data, and maximize the quality of network monitoring. In this paper, a channel allocation algorithm based on swarm intelligence—“discrete bacterial foraging optimization”—is proposed based on the classic bacterial foraging optimization algorithm. The position of each dimension in the iterative process is discretized to binary 0 or 1 to encode and express the channel allocation problem of wireless monitoring networks, and the channel allocation scheme is optimized by location updates guided by bacterial foraging. Many simulation and practical experiments have proved the effectiveness of the algorithm, and it also has low complexity and provable convergence. Compared with similar algorithms, this algorithm improves monitoring quality by 1.428% while boosting speed by up to 32.602%. The algorithm has lower complexity, higher performance, and can converge to the optimal solution at a faster rate.