This application provides a method, apparatus, and storage medium for ride-hailing order allocation based on driver preferences. The method includes: obtaining real-time orders using a ride-hailing platform interface;
parsing the real-time orders to obtain the order
start coordinates, order destination coordinates, and discount flags; retrieving online drivers within a set
radius centered on the order
start coordinates using a spatial index to generate a candidate driver set; reading the
vehicle type information and order acceptance preferences of each driver in the candidate driver set; filtering the candidate driver set based on the order destination coordinates, discount flags, and order acceptance preferences using multiple conditions to obtain a target driver set that meets the order acceptance criteria; sorting the target driver set according to the real-
time distance from the driver to the order start, selecting the driver with the
shortest distance, and assigning the current real-time order to the selected driver. This application can improve the probability of drivers accepting orders and improve the accurate matching of discounted orders with driver preferences, thereby achieving real-time and efficient order dispatch.