This application provides a task scheduling method and
system, electronic device, and storage medium, belonging to the field of task scheduling technology. The method includes: acquiring historical site data for all sites within a scheduling area and historical
video recording data for all cameras within each site; determining the pre-allocated task volume for each site under different sampling types based on current scheduling resources, historical site task volume, and historical site event volume; determining the first correlation degree between the corresponding camera and the occurring
event based on the historical video task volume and historical event volume; selecting
multiple target camera devices from all camera devices within the site based on the first correlation degree of each camera device; and generating target scheduling data for each target camera device in the site based on historical time period data, the pre-allocated task volume corresponding to different sampling types, the
multiple target camera devices, and the tasks corresponding to the site. This application can improve the efficiency of task scheduling.