Urban patrols can detect emergencies in a timely manner and collect information, which helps to improve the quality of services in the city and enhance the comfort of residents. This study proposes the use of IoT-based drones for urban patrol tasks, aiming to explore the potential applications of drones in smart city governance. The main technical challenge in the process of urban patrols by drones is how to plan a flight path for them. Therefore, this article first designs a smart patrol system based on drones and Internet of Things (IoT). Meanwhile, as information collection is an important aspect of urban patrol tasks, a mathematical model with the goal of maximizing information collection has been established to provide costeffective patrol services. On this basis, in order to improve the accuracy of crow search algorithm (CSA), differential crow search strategy and variable flight step size are designed. In addition, the Levy flight strategy is introduced into the traditional CSA algorithm, and an improved crow search algorithm (ICSA) is proposed. Finally, a corresponding simulation environment was established based on the actual urban scene and compared with other algorithms. The numerical results indicate that compared with the other three swarm intelligence algorithms, the algorithm designed in this paper has more superiority.