Online car-hailing order matching method based on driving direction integrating degree and dynamic weight
By calculating the angle score between the driver's historical GPS trajectory and the direction of the order destination, and dynamically adjusting the weights in conjunction with real-time traffic conditions, the ride-hailing matching strategy is optimized, solving the problem of roundabout pick-up routes caused by drivers' mismatched driving directions, and improving matching efficiency and system adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-08
AI Technical Summary
Existing ride-hailing matching strategies ignore the driver's real-time driving direction, resulting in roundabout pick-up routes and wasted resources. Furthermore, fixed weights cannot adapt to real-time traffic conditions, affecting matching effectiveness.
The system predicts the driving direction by calculating the driver's historical GPS trajectory, calculates the direction matching score by combining the direction angle of the order destination, and dynamically adjusts the direction and distance weights according to real-time traffic conditions to optimize the matching decision.
It effectively reduces the detours in pick-up routes, improves driver pick-up efficiency and system operation economy, and enhances the system's adaptability and intelligence in different scenarios.
Smart Images

Figure CN121998370A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a ride-hailing order matching method based on driving direction fit and dynamic weights. Background Technology
[0002] The core task of ride-hailing platforms is to achieve efficient and accurate matching of massive orders with transportation capacity. Existing matching strategies are mostly based on static or instantaneous spatial proximity, for example, prioritizing the allocation of orders to vehicles whose "hailing longitude" and "hailing latitude" are spatially closest to the passenger's "departure point".
[0003] This single-dimensional distance-based matching strategy, while direct and computationally simple, has significant limitations: the system might assign an order to a driver who is nearby but traveling in the opposite direction, requiring the driver to turn around or detour, increasing "mileage" and "waiting time," leading to resource waste and a degraded user experience. While some improved methods introduce multi-dimensional features such as "price" and "travel time" and use weighted summation for decision-making, these weights are usually fixed and cannot be dynamically adjusted based on real-time traffic conditions or order characteristics, limiting further improvements in matching effectiveness. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a ride-hailing order matching method based on driving direction matching and dynamic weights. This method calculates the cosine of the angle between the driver's historical GPS trajectory and the destination direction to obtain a direction matching score. Simultaneously, based on order information such as the time period of the booking and the category, the weights of direction matching and spatial distance in the overall score are dynamically adjusted. Finally, candidate drivers are ranked based on the overall score to achieve optimal matching.
[0005] To achieve the above objectives, the present invention adopts the following specific technical solution: The ride-hailing order matching method based on driving direction fit and dynamic weights provided by this invention includes the following steps: Step 1: Data Acquisition and Direction Prediction; Acquire the pick-up point coordinates, destination coordinates, and real-time location and historical GPS trajectory of the candidate vehicles for the orders to be matched; Predict the driving direction angle of the candidate vehicles based on the historical GPS trajectory. Step 2: Directional fit score calculation; Construct the order destination direction vector based on the boarding point coordinates and destination coordinates and calculate the destination direction angle. Calculate the angle between the predicted candidate vehicle driving direction angle and the order destination direction angle, and calculate the directional fit score based on the angle. Step 3: Dynamic weight calculation and comprehensive scoring; Calculate the spatial distance from the current location of the candidate vehicle to the order pick-up point and its distance score. At the same time, obtain the real-time traffic congestion index within the preset range of the current location of the candidate vehicle. Combine the time period of the order, the order category attribute and the real-time traffic congestion index to dynamically determine the direction matching weight and distance weight. Calculate the comprehensive priority score of the candidate vehicle based on the direction matching score, distance score and their respective weights. Step 4: Matching Decision and Order Distribution; Sort candidate vehicles according to their comprehensive priority scores, and assign the matching order to the driver of the candidate vehicle with the highest score.
[0006] Furthermore, in step one, the longitude and latitude data of the pick-up point of the order to be matched are obtained to obtain the pick-up point coordinates, and the longitude and latitude data of the destination are obtained to obtain the destination coordinates. Based on the historical GPS trajectory point sequence of the candidate vehicles, the driving direction angle of the candidate vehicles is predicted by a linear fitting method. .
[0007] Furthermore, in step two, the destination direction vector of the order to be matched is constructed with the pick-up point coordinates as the origin and the destination coordinates as the endpoint, and the destination direction angle is calculated. ; Calculate and predict the driving direction angle of candidate vehicles Destination direction angle of the order to be matched The included angle According to the included angle Calculate the directional fit score The calculation formula is: .
[0008] Furthermore, in step three, the spatial distance from the current location of the candidate vehicle to the pick-up point of the order to be matched is calculated. and distance score , Obtain the real-time traffic congestion index within a preset radius centered on the current location of the candidate vehicles. Based on the time period of the ride booking, the order category, and the real-time traffic congestion index. Dynamically determine the directional fit weight With distance weight , among which, when When the preset threshold is exceeded, increase The value of is reduced The value of ; when When the value is below the preset threshold, reduce The value of , improve The value of ; based on the direction fit score Distance score and directional fit weight Distance weight Calculate the overall priority score of candidate vehicles , .
[0009] The present invention can achieve the following technical effects: The real-time ride-hailing order matching method provided by this invention, based on driving direction compatibility and dynamic weights, overcomes the problems of traditional matching strategies, such as detours in pick-up routes, high empty mileage rates, and large fluctuations in system efficiency under different scenarios, caused by ignoring the driver's real-time driving direction and using fixed weights. By introducing direction compatibility calculation and combining it with a dynamic weight adjustment mechanism based on real-time scenarios, the matching decision prioritizes assigning orders to drivers whose driving direction is highly consistent with the order destination. This effectively reduces detours in pick-up routes caused by mismatched driving directions, lowers "mileage" wastage, and improves driver pick-up efficiency and overall system operational economy. Through the dynamic weight mechanism, the matching strategy can adapt to different time periods and order types, focusing more on overall traffic management efficiency during peak hours and more on response speed during off-peak hours, thus improving the system's intelligence level and scenario adaptability. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a ride-hailing order matching method based on driving direction fit and dynamic weights, provided by an embodiment of the present invention. Detailed Implementation
[0011] In the following description, embodiments of the invention will be described with reference to the accompanying drawings. In the description below, the same modules are denoted by the same reference numerals. Where the same reference numerals are used, their names and functions are also the same. Therefore, their detailed description will not be repeated.
[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0013] This invention provides a ride-hailing order matching method based on driving direction fit and dynamic weights, the overall process of which is as follows: Figure 1 As shown, the specific steps include the following: Step 1: Data Acquisition and Direction Prediction; Acquire the pick-up point coordinates, destination coordinates, and real-time location and historical GPS trajectory of the candidate vehicles for the orders to be matched, and predict the driving direction angle of the candidate vehicles based on the historical GPS trajectory.
[0014] The system obtains the pick-up point coordinates from the "longitude" and "latitude" of the order to be matched, and the destination coordinates from the "longitude" and "latitude" of the destination. It also obtains the latest GPS location and recent historical GPS trajectory of the candidate vehicle. Based on this trajectory point sequence, a linear fitting method is used to predict the short-term driving direction angle of the candidate vehicle. .
[0015] Step 2: Directional fit score calculation; Construct the order destination direction vector based on the boarding point coordinates and destination coordinates and calculate the destination direction angle. Calculate the angle between the predicted candidate vehicle driving direction angle and the order destination direction angle, and calculate the directional fit score based on the angle.
[0016] Using the pick-up point coordinates of the order to be matched as the origin and the destination coordinates as the endpoint, construct the destination direction vector of the order to be matched, and calculate the destination direction angle. Calculate and predict the driving direction angle of candidate vehicles. Destination direction angle of the order to be matched The included angle According to the included angle Calculate the directional fit score The calculation formula is: .
[0017] Step 3: Dynamic weight calculation and comprehensive scoring; Calculate the spatial distance from the current location of the candidate vehicle to the order pick-up point and its distance score. Obtain the real-time traffic congestion index within 500 meters of the current location of the candidate vehicle through the real-time traffic data interface. Based on the time period of the order, the order type, and the real-time traffic congestion index, dynamically determine the direction matching weight and distance weight, and calculate the comprehensive priority score of the candidate vehicle based on the direction matching score, distance score, and their respective weights.
[0018] Calculate the spatial distance from the current location of the candidate vehicle to the pick-up point of the order to be matched. Distance Score , Analyze the "booking time" and "category" attributes of the orders, and obtain the real-time traffic congestion index within 500 meters of the candidate vehicle's current location. Dynamically determine the directional fit weight. With distance weight Specifically, this includes: first, determining the basic weights based on "booking time" and "category". and Then, based on the congestion index... Adjust the base weights: Set congestion thresholds ,when Calculate the adjustment coefficient: Calculate the adjusted directional fit weights: , ;when Calculate the adjustment coefficient: Calculate the adjusted directional fit weights: Calculate the adjusted distance weights: Among them, the threshold To distinguish between congestion and non-congestion, the criteria are set according to urban road congestion classification standards. The adjustment coefficients of 0.2 and 0.1 represent the adjustment range under congested and non-congested scenarios, respectively, used to control the intensity of weight adjustment by congestion factors. 0.9 and 0.1 are the upper and lower limits of the directional fit weight, ensuring that the weight does not become ineffective due to over-adjustment. The specific values of these parameters can be adjusted according to the actual application scenario. (Based on directional fit score) Distance score and the adjusted directional fit weight Distance weight Calculate the overall priority score of candidate vehicles , .
[0019] Step 4: Matching Decision and Order Distribution; Candidate vehicles are matched according to their comprehensive priority score. Sort the orders in descending order, assign the orders to the candidate vehicle drivers with the highest scores, and record the "order matching time".
[0020] The following describes the specific implementation of the technical solution of the present invention using real ride-hailing travel data from Fuyang District, Hangzhou.
[0021] Select a real-time order from the dataset to be matched. Its "Booking Longitude" is 120.153840, "Booking Latitude" is 30.293410; "Destination Longitude" is 120.213073, "Destination Latitude" is 30.291450. The "Booking Time" is 2020-10-18 07:30:59, which is during the morning rush hour. The "Category" is 4800 (regular instant order).
[0022] Step 1: Data acquisition and direction prediction.
[0023] The system searches for available vehicles within a 2-kilometer radius of the order pick-up point (120.153840, 30.293410). Assuming vehicles A, B, and C are found, their GPS trajectory points for the most recent minute are obtained (from the platform's real-time data stream). Taking vehicle A as an example, its historical trajectory point sequence shows it is moving southeast along the road. Through linear fitting, its driving direction angle is predicted. (With true north as 0°, increase clockwise).
[0024] Step 2: Calculate the directional fit score.
[0025] Calculate the destination direction angle of the order The vector from the boarding point (120.153840, 30.293410) to the destination (120.213073, 30.291450), after calculation, has the following direction angle. .
[0026] Calculate the angle between the predicted direction and the order direction of vehicle A. .
[0027] Calculate the directional fit score .
[0028] Step 3: Dynamic weight calculation and comprehensive scoring.
[0029] The distance between vehicle A and the order pick-up point is calculated to be 1.5 kilometers. Distance score. .
[0030] At the same time, the system obtains the real-time traffic congestion index within 500 meters of vehicle A's current location. (Greater than the threshold of 6). Because the "ride-hailing time" falls during the morning rush hour, the basic direction compatibility weight is... Basic distance weight The base weights are adjusted based on the congestion index:
[0031] Calculate the overall score for vehicle A: .
[0032] Similarly, the same weighting method is used to calculate the scores for vehicles B and C, adjusting the weights based on the real-time traffic congestion conditions in their respective vicinities. The combined scores for vehicles B and C are assumed to be 0.532 and 0.218, respectively.
[0033] Step 4: Matching decisions and order distribution.
[0034] The system compares the combined scores of vehicles A (0.778), B (0.532), and C (0.218). The system prioritizes assigning the order to the driver of vehicle A, which has the highest score, and records the "order matching time" as 2020-10-18 07:38:01.
[0035] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0036] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
[0037] The specific embodiments of the present invention described above do not constitute a limitation on the scope of protection of the present invention. Any other corresponding changes and modifications made in accordance with the technical concept of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A ride-hailing order matching method based on driving direction fit and dynamic weights, characterized in that, Includes the following steps: Step 1: Data Acquisition and Direction Prediction; Acquire the pick-up point coordinates, destination coordinates, and real-time location and historical GPS trajectory of the candidate vehicles for the orders to be matched; Predict the driving direction angle of the candidate vehicles based on the historical GPS trajectory. Step 2: Directional fit score calculation; Construct the order destination direction vector based on the boarding point coordinates and destination coordinates and calculate the destination direction angle. Calculate the angle between the predicted candidate vehicle driving direction angle and the order destination direction angle, and calculate the directional fit score based on the angle. Step 3: Dynamic weight calculation and comprehensive scoring; Calculate the spatial distance from the current location of the candidate vehicle to the order pick-up point and its distance score, and obtain the real-time traffic congestion index within a preset range of the current location of the candidate vehicle; Based on the time period of the ride booking, the order category attributes, and the real-time traffic congestion index, the directional matching weight and distance weight are dynamically determined, and the comprehensive priority score of the candidate vehicles is calculated based on the directional matching score, distance score, and their respective weights. Step 4: Matching Decision and Order Distribution; Sort candidate vehicles according to their comprehensive priority scores, and assign the matching order to the driver of the candidate vehicle with the highest score.
2. The ride-hailing order matching method based on driving direction fit and dynamic weights according to claim 1, characterized in that, In step one, the longitude and latitude data of the pick-up point of the order to be matched are obtained to obtain the pick-up point coordinates, and the longitude and latitude data of the destination are obtained to obtain the destination coordinates. Based on the historical GPS trajectory point sequence of the candidate vehicles, the driving direction angle of the candidate vehicles is predicted by a linear fitting method. .
3. The ride-hailing order matching method based on driving direction fit and dynamic weights according to claim 2, characterized in that, In step two, the destination direction vector of the order to be matched is constructed with the pick-up point coordinates as the origin and the destination coordinates as the endpoint, and the destination direction angle is calculated. ; Calculate and predict the driving direction angle of candidate vehicles Destination direction angle of the order to be matched The included angle According to the included angle Calculate the directional fit score The calculation formula is: .
4. The ride-hailing order matching method based on driving direction fit and dynamic weights according to claim 3, characterized in that, In step three, the spatial distance from the current location of the candidate vehicle to the pick-up point of the order to be matched is calculated. and distance score , ; Obtain the real-time traffic congestion index within a preset range of the candidate vehicle's current location; Dynamically determine the direction matching weight based on the time period of the order's booking, order category attributes, and the real-time traffic congestion index. With distance weight When the real-time traffic congestion index exceeds a preset threshold, the weight of directional alignment is increased. The value of [value] is adjusted to reduce the distance weight. The value of is determined by reducing the weight of directional fit when the real-time traffic congestion index is below a preset threshold. The value of [value] is used to increase the distance weight. The value of ; based on the direction fit score Distance score and directional fit weight Distance weight Calculate the overall priority score of candidate vehicles , .