Seeking to give unmanned aerial vehicles (UAVs) a higher level of autonomous control, this study uses edge computing systems to replace the ground control station (GCS) commonly used to control UAVs. Since the GCS belongs to the central control architecture, the edge computing system of the distributed architecture can give drones more flexibility in dealing with changing environmental conditions, allowing them to autonomously and instantly plan their flight path, fly in formation, or even avoid obstacles. Broadcast communications are used to realize UAV-to-UAV communications, thus allocating tasks among a swarm of UAVs and ensuring that each individual UAV collaborates as an integrated member of the group. The dynamic path programming problem for UAV swarm missions uses a two-phase tabu search with a 2-Opt exchange method and an A* search as the path programming algorithm. Distance is taken as a cost function for path programming. The turning points of no-fly zones are then increased and expanded based on drone fleet coverage, thus preventing drones from entering prohibited areas. Unlike previous work, which mostly considers only single no-fly zones, this approach accounts for multiple restricted areas, ensuring that a UAV swarm can complete its assigned task without violating no-fly zones. A drone encountering an obstacle while traveling along the route set by the algorithm will update the map information in real time, allowing for instant recharting of the optimal path to the goal as a reverse search using the D* Lite algorithm.