The difficulty, long delivery time, and high cost of last-mile delivery in rural areas make efficient and accurate last-mile delivery scheduling solutions particularly important. Aiming at the task allocation problem of multiple logistics Unmanned Aerial Vehicles (UAVs) in rural distribution scenarios, a multi-objective UAV task allocation model was established by considering the payload capacity of UAVs and the maximum flight distance of UAVs comprehensively, with the goal of minimizing the flight distance, dispatched quantity of UAVs and not violating time windows. Firstly, based on reinforcement learning, to address the problem of high dimensionality in task allocation, an encoder and attention mechanism were introduced to simplify the state space effectively. Secondly, the global-local search strategy was combined to explore the solution space while avoiding getting stuck in the local optimum, thereby improving the quality of the solution. Finally, further analysis was conducted on the parameter weight settings, and the optimal combination of weight coefficients for sub-objective functions was obtained through experiments. Simulation results show that compared to the Hybrid Q-learning network based Method (HQM), Adaptive Large Neighborhood Search algorithm (ALNS), Q-learning algorithm (Q-learning), and Genetic Algorithm (GA) in terms of the obtained final path length, the proposed algorithm SG-HQM (Sine and Gaussian HQM) reduced it by 8.35%, 9.88%, 10.29%, and 12.48%, respectively.