Urban expansion and complex environments are escalating security challenges. This research presents a drone-based risk assessment approach, significantly enhanced by the YOLOv8 algorithm. Through continuous iterations, the algorithm's performance has improved approximately fourfold, greatly boosting detection accuracy for low-altitude law enforcement and overcoming the constraints of existing surveillance technologies. Furthermore, the algorithm was applied to five major marathon events, conducting security risk assessments based on EWM-TOPSIS and FCM clustering. The final risk ranking of the events was Zhanjiang, Shanghai, Qingdao, Jiangsu, and Tianjin, with the Zhanjiang Marathon showing a people risk index of 72.12, indicating a need for strengthened security measures. This research applies artificial intelligence to public safety, delivering a scalable solution for a variety of security challenges.