# Multi-UAV Area Coverage Track Planning Based on the Voronoi Graph and Attention Mechanism
## 3 Method
### Trajectory Optimization Algorithm Integrating CSAM  
Based on the above ResNet50 and CSAM, the network structure with the integrated spatial channel attention mechanism is shown in Figure 4. By integrating CSAM into the  
Figure 3: Schematic diagram of drone flight selection.  
architecture of ResNet50, the model's perception of critical features in the image is further improved. As a lightweight attention module, CSAM successively pays attention to the channel and spatial dimensions of the feature map, thereby achieving more fine-grained feature rescaling. First, the channel attention mechanism evaluates the importance of each channel. It adjusts the feature response of the channel accordingly, highlighting the feature channels that are more important to the current task. Subsequently, the spatial attention mechanism identifies and emphasizes important spatial regions in the image, allowing the network to focus on processing information in these regions. This sequential processing attention mechanism optimizes the representation of features so that ResNet50 integrated with CSAM shows higher accuracy and efficiency in track classification selection. By carefully rescaling the channel and spatial information of the feature map, ResNet integrated with CSAM can more effectively utilize the expressive power of the deep network while maintaining the original advantages of ResNet, such as easy training and good generalization ability. This network model that combines deep residual learning and fine-grained attention mechanism shows the great potential of the method designed in this paper in solving trajectory optimization tasks.  
Based on the network model in Figure 4, the reinforcement learning strategy shown in Figure 5 is integrated. Reinforcement learning is a machine learning paradigm that aims to teach agents to take actions in the environment through trial and error to maximize a particular cumulative reward. Based on the interaction with the environment, the agent learns to formulate a strategy, the rule for choosing the best action in a given state. This process involves a balance between exploration (exploring unknown states or actions to gain new knowledge) and exploitation (using known information to obtain the maximum reward). The core components of reinforcement learning include state (the way the agent perceives the environment), action (the actions that the agent can perform), reward (the feedback given to the agent by the environment after performing a specific action), and strategy (the mapping from state to action). During the training process, the agent gradually learns the optimal strategy, that is, those actions that can maximize the cumulative reward in the long run by constantly trying and evaluating the results of different actions. Reinforcement learning applied to the network in this article can accelerate model convergence and improve the performance of trajectory optimization.  
Figure 4: Network structure integrating CSAM.  
Figure 6 shows that a pentagon is given and subdivided in the plane region. The total CPU running time is 2029.05 s, the total number of subdivisions is 3625 times, and the total number of pixels, including the pentagon composed of five plane line segments and their Voronoi diagrams, is 4062.  
As shown in Figure 7, an octagon is given and subdivided in the plane area. The total CPU running time is 2971.95 s, the total number of subdivisions is 7265, and the total number of pixels, including the octagon composed of eight plane line segments and their Voronoi diagram, is 8434.