Effective task assignment decisions are paramount for ensuring reliable task execution in multi-UAV systems. However, in the development of feasible plans, challenges stemming from extensive and prolonged task requirements are encountered. This paper establishes a decision-making framework for multiple unmanned aerial vehicles (multi-UAV) based on the well-known pigeon-inspired optimization (PIO) algorithm. By addressing the problem from a hierarchical structural perspective, the initial stage involves minimizing the global objective of the flight distance cost after obtaining the entire task distribution and task requirements, utilizing the global optimization capability of the classical PIO algorithm to allocate feasible task spaces for each UAV. In the second stage, building upon the decisions made in the preceding stage, each UAV is abstracted as an agent maximizing its own task execution benefits. An improved version of the PIO algorithm modified with a sine-cosine search mechanism is proposed, enabling the acquisition of the optimal task execution sequence. Simulation experiments involving two different scales of UAVs validate the effectiveness of the proposed methodology. Moreover, dynamic events such as UAV damage and task changes are considered in the simulation to validate the efficacy of the two-stage framework.