A logistics order-oriented vehicle intelligent matching method
By generating state snapshots and constraint validity certificates, the affected candidate relationships are identified and a local rematching subgraph is constructed to optimize the vehicle matching scheme for logistics orders. This solves the instability problem of vehicle matching under dynamic state changes in the prior art and achieves fast response and stable matching.
Patent Information
- Application Number
- CN202611454409.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-24
AI Technical Summary
Existing vehicle matching methods for logistics orders lack quantitative evidence of sustainable effective time under dynamic state changes, making it difficult to quickly identify candidate relationships that need to be recalculated. This leads to repeated calculations of all vehicles, increasing response latency and causing vehicle allocation oscillations.
By generating snapshots of order, vehicle, and road status, multidimensional constraint margins are calculated and their fluctuations are predicted. The effective retention time of candidate relationships is determined, a dependency index of event and constraint validity certificates is established, a local rematching subgraph is constructed in response to state changes, the matching scheme is optimized, and atomic writes are performed.
It reduces redundant calculations during dynamic scheduling, shortens the matching response time after state changes, improves the continuity and stability of matching results, and avoids matching result failure due to state changes.
Smart Images

Figure CN123160033A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics transportation scheduling technology, and in particular to a vehicle intelligent matching method for logistics orders. Background Technology
[0002] As the scale of logistics and transportation operations continues to expand, logistics dispatch platforms need to match vehicles to orders based on information such as the origin and destination of the order, transportation time, cargo weight, vehicle type requirements, as well as the vehicle's real-time location, remaining capacity, and current tasks. In actual transportation, whether a vehicle can fulfill an order is also affected by factors such as road congestion, height and weight restrictions, restricted hours, remaining range, and loading / unloading time windows. Therefore, the matching relationship between orders and vehicles is highly dynamic.
[0003] Existing vehicle matching methods typically first filter candidate vehicles based on vehicle type, load capacity, and distance, then score or optimize them according to transportation time, empty driving distance, or transportation cost, and finally allocate the calculated vehicles to the corresponding orders. When order requirements, vehicle status, or road conditions change, the scheduling results are usually adjusted by periodically updating or rematching all orders and vehicles.
[0004] However, existing methods primarily determine whether an order and vehicle meet matching conditions at the current moment, making it difficult to ascertain how long the matching relationship can remain valid. Changes in vehicle location, task completion time, or road conditions may cause the originally matched vehicle to fail to arrive on time or no longer meet transportation requirements. If all orders and vehicles are recalculated for each change, it generates a large amount of redundant candidate filtering and constraint judgment, increasing computational load and response latency. Furthermore, slight data fluctuations may lead to repeated switching of the same order between different vehicles. Therefore, accurately identifying affected matching relationships under dynamic state changes, reducing unnecessary full-scale recalculation, and maintaining the validity and stability of vehicle matching results are the technical problems that existing logistics order vehicle matching methods need to solve. Summary of the Invention
[0005] The technical problem that this invention aims to solve is that, under the circumstances of continuous changes in logistics order requirements, vehicle operating status and road conditions, the existing matching results lack quantitative basis for sustainable effective time, making it difficult to quickly identify candidate relationships that need to be recalculated, and full repeated matching can easily increase response delay and cause vehicle allocation oscillations.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A vehicle intelligent matching method for logistics orders includes: Acquire logistics order data, vehicle status data, and road status data, and generate order status snapshots, vehicle status snapshots, and road status snapshots with status version numbers respectively; Vehicles are screened by spatial range and transportation capacity to form order-vehicle candidate relationships. For each order-vehicle candidate relationship, a complete task execution path is determined, which includes at least the candidate path from the vehicle to the order pickup location and the order transportation path from the order pickup location to the delivery location. The multidimensional constraint margin of each order-vehicle candidate relationship is calculated, and order-vehicle candidate relationships that do not meet the hard constraints are deleted. The constraint margin is corrected based on the predicted fluctuations of each constraint margin. The constraint margin decrease rate is determined based on the change of the corrected constraint margin between adjacent state snapshots. The effective maintenance time of the order-vehicle candidate relationship is determined based on the corrected constraint margin and the constraint margin decrease rate, and a constraint validity certificate is generated. Establish a dependency index between state change events and constraint validity certificates based on the order, vehicle, and complete task execution path in the constraint validity certificate; In response to changes in order status, vehicle status, or road status, the affected constraint validity certificate is located based on the dependency index, and when the affected constraint validity certificate expires, a local rematch subgraph is constructed along the alternating relationship between the affected order, candidate vehicle, and the currently assigned order of the candidate vehicle. Candidate optimization schemes are determined based on the matching cost, effective retention time, and matching change amount of each order-vehicle candidate relationship in the local rematching subgraph. The target matching scheme is then determined from the candidate optimization schemes and the original matching schemes according to the hysteresis switching condition, wherein the hysteresis switching condition includes a revenue threshold and a retention threshold. The status version number used by the target matching scheme is compared with the current status version number. If they match, the target matching scheme is atomically written into the logistics task data, and the corresponding logistics task is sent to the target vehicle.
[0007] In one embodiment, the logistics order data includes order identifier, pickup location, delivery location, pickup time window, delivery time window, cargo weight, cargo volume, cargo type, vehicle type requirements, temperature control requirements, and loading and unloading time. The vehicle status data includes vehicle identification, real-time location, driving direction, vehicle type, available load capacity, available volume, remaining range, task sequence, estimated task completion time, and available status. The road status data includes road segment identification, road segment length, real-time driving speed, historical driving speed, height restriction conditions, weight restriction conditions, vehicle type restrictions, prohibited time periods, and closure status.
[0008] In one embodiment, forming the order-vehicle candidate relationship includes: Centered on the spatial grid where the order's pickup location is located, expand the adjacent spatial grids according to the preset search radius to obtain vehicles within the expanded range; The first layer of screening is based on vehicle availability, vehicle type, cargo type compatibility, and temperature control capability. The second layer of screening is based on the estimated completion time of the vehicle's current task, the estimated time of the vehicle's arrival at the pickup location, and the order pickup time window. For vehicles that pass the second-level screening, at least one candidate route to the pickup location is generated, and the target candidate route is determined based on road traffic constraints and estimated arrival time. The order transportation route is generated based on the pickup and delivery locations of the order. The target candidate route and the order transportation route are combined to form a complete task execution path, and road traffic constraint verification is performed on the complete task execution path.
[0009] In one embodiment, the multidimensional constraint margin includes at least load capacity constraint margin, volume constraint margin, pickup time constraint margin, delivery time constraint margin, and range constraint margin; Among them, the load constraint margin is the difference between the vehicle's available load capacity and the weight of the ordered goods; the volume constraint margin is the difference between the vehicle's available volume and the volume of the ordered goods; the pickup time constraint margin is the difference between the latest pickup time of the order and the estimated time when the vehicle arrives at the pickup location and completes loading preparation; the delivery time constraint margin is the difference between the latest delivery time of the order and the estimated time when the vehicle arrives at the delivery location along the order's transportation path after pickup and completes unloading; and the range constraint margin is the difference between the vehicle's net remaining available energy and the energy required to execute the complete task execution path plus the safety reserve energy; the vehicle's net remaining available energy is the vehicle's current remaining available energy minus the estimated remaining energy required to complete the current uninterrupted task. If any of the aforementioned constraint margins is less than zero, or if any road segment in the complete task execution path violates height restrictions, weight restrictions, vehicle type restrictions, prohibited hours, or closure status, the corresponding order-vehicle candidate relationship will be determined as not satisfying the hard constraints.
[0010] In one embodiment, the corrected constraint margin, the normalized hard constraint remaining space, the constraint margin descent rate, and the effective holding time are determined according to the following formulas: In the formula, Indicates a vehicle. Indicates an order. Indicates the constraint dimension. This represents the original constraint margin. This represents the prediction standard deviation of the corresponding constraint quantity. This represents the volatility correction factor. This indicates the adjusted constraint margin. Indicates the first Safety threshold of the constraint, Indicates the constraint scale. ε1 represents the first preset positive number used for normalizing the denominator and has the same dimension as the constraint scale; ε2 represents the second preset positive number used to effectively preserve the time denominator and has the dimension of the reciprocal of time. This represents the normalized residual space relative to the hard-constrained boundary. Indicates the state snapshot sequence number. This represents the time interval between adjacent state snapshots. This indicates the rate at which the constraint margin decreases. Indicates the effective holding time. This indicates the maximum effective holding time.
[0011] In one embodiment, the constraint validity certificate includes an order identifier and order status version number, a vehicle identifier and vehicle status version number, a complete task execution path, status version numbers of the road segments included in the complete task execution path, original constraint margin, corrected constraint margin, constraint margin decrease rate, valid retention time, certificate generation time, and last update time; when the certificate is generated, the last update time is set to the certificate generation time. When all corrected constraint margins are higher than the corresponding safety thresholds, the constraint validity certificate is determined to be in a valid state; when at least one corrected constraint margin is not higher than the corresponding safety threshold and all original constraint margins are not less than zero, the constraint validity certificate is determined to be in a critical state; when at least one original constraint margin is less than zero, the complete task execution path is unavailable, or the time elapsed since the most recent update time exceeds the recalculated valid retention time, the constraint validity certificate is determined to be in an invalid state.
[0012] In one embodiment, constructing the local rematching subgraph includes: The order and vehicle corresponding to the expired constraint validity certificate are taken as the initial affected nodes, and the alternative candidate vehicles of the order, the orders currently assigned to the alternative candidate vehicles, and other candidate vehicles of the assigned orders are added. Repeatedly expand along the order-vehicle candidate relationship and the current allocation relationship until no new nodes are generated, or the validity period of all constraint validity certificates at the expansion boundary is greater than the preset stability threshold and the boundary candidate relationship and the affected constraints do not have a common road segment dependency; The expanded orders, vehicles, and their candidate relationships are used to form the local rematching subgraph, while keeping the original matching relationships outside the local rematching subgraph unchanged.
[0013] In one embodiment, the objective function of the local rematching subgraph is determined according to the following formula: In the formula, Indicates the matching scheme. To indicate vehicles Does the order match? binary variables, Indicates the basic matching cost. Indicates the effective holding time. This represents the matching variable in the original matching scheme. This indicates the penalty weight for short hold time. This indicates a change in matching weights. The third presupposed positive number represents the same dimension as the effective holding time; Under the conditions that each order can be matched with at most one vehicle, the task time of the same vehicle does not conflict, and all hard constraints are satisfied, a candidate optimization scheme that minimizes the objective function is determined; if the original matching scheme is not feasible, the candidate optimization scheme is determined as the target matching scheme; if the original matching scheme is still feasible, the candidate optimization scheme is determined as the target matching scheme only if the improvement of the objective function is not less than a preset revenue threshold and the increase of the minimum effective retention time of the candidate optimization scheme relative to the minimum effective retention time of the original matching scheme is not less than a preset retention threshold.
[0014] In one embodiment, writing the target matching scheme atomically into the logistics task data includes: Reread the current status version number of the order, vehicle and road segment involved in the target matching scheme, and compare it with the status version number recorded in the corresponding constraint validity certificate; When the status version numbers are consistent, condition locking is performed on the corresponding orders and vehicles, and the consistency of the status version numbers of the involved road segments is used as the transaction commit condition. Before the same transaction commit, the road segment version comparison is performed again. If the versions are still consistent, the matching vehicle, complete task execution path, estimated arrival time, effective hold time, and matching batch identifier are written. If the status version numbers are inconsistent, the road segment version comparison is inconsistent before the commit, or the condition locking fails, the writing is terminated, the affected constraint validity certificate is located, and the local rematch subgraph is recalculated. Receive task confirmation information from the target vehicle; when the target vehicle rejects the task, communication times out, vehicle malfunctions, or deviates from the complete task execution path, determine the corresponding constraint validity certificate as invalid and trigger the corresponding local rematch.
[0015] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: In this invention, multidimensional constraint margins between orders and candidate vehicles are calculated based on logistics order data, vehicle status data, and road status data. The effective retention time of candidate relationships is determined by combining the predicted fluctuations and change rates of the constraint quantities. This ensures that the matching results reflect not only whether the conditions are met at the current moment but also the continued validity of the matching relationships during subsequent state changes. When the order, vehicle, or road status changes, the affected candidate relationships are located through the dependency relationship between the event and the constraint validity certificate. A local rematching range is constructed along the alternating relationships between orders, candidate vehicles, and assigned orders, thereby avoiding repeated candidate screening, path calculation, and constraint judgment for all orders and all vehicles. This reduces redundant calculations during dynamic scheduling and shortens the matching response time after state changes.
[0016] This invention considers empty driving distance, estimated arrival time, transportation energy consumption, effective holding time, and matching change amount simultaneously during vehicle matching. It limits frequent switching caused by minor fluctuations in vehicle position or road speed by using switching benefit thresholds and holding time thresholds, ensuring good continuity and stability of the generated vehicle matching relationships. Through consistency checks of order, vehicle, and road status versions, and atomic writing of matching results, it avoids invalid results being written due to status changes during matching calculations and reduces the possibility of the same vehicle being repeatedly used by multiple orders. When a vehicle rejects a task, communication times out, the vehicle malfunctions, or deviates from the route, it can trigger corresponding local re-matching through abnormal feedback, thus forming a complete closed-loop processing system from data collection, candidate selection, dynamic matching, result writing to vehicle feedback updates. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of the intelligent vehicle matching method of the present invention; Figure 2 This is a schematic diagram illustrating the generation and status division of the validity period certificate of this invention; Figure 3 This is a schematic diagram illustrating the dependency relationship between state change events and constraint validity certificates in this invention. Figure 4 This is a schematic diagram of the alternating expansion of the local rematching subgraph of the present invention; Figure 5 This is a schematic diagram of the closed-loop processing of local rematching, hysteresis switching, and result submission in this invention. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. These embodiments are used to illustrate the technical concept of the present invention and are not intended to limit the scope of protection of the present invention. Where there is no conflict, the technical features of the various embodiments can be combined with each other.
[0019] This method can be implemented on a logistics dispatching platform. The platform receives logistics orders submitted by shippers or business platforms through an order interface, and receives vehicle location, speed, direction, remaining energy, available capacity, and task execution status through vehicle positioning terminals or onboard communication interfaces. It also obtains real-time speed, historical speed, traffic restrictions, and closure status of road sections through a road data interface. The platform converts the matching results into a logistics task containing order, pickup and delivery location, candidate routes, and time limits, and sends it to the vehicle for execution.
[0020] At the start of a scheduling batch, read the logistics orders that have not yet been allocated or need to be reallocated. Each logistics order includes at least the order identifier, pickup location, delivery location, pickup time window, delivery time window, cargo weight, cargo volume, cargo type, vehicle type requirements, temperature control requirements, loading and unloading time, and order priority. The pickup and delivery locations can be represented using latitude and longitude coordinates, road node markers, or park loading and unloading point markers.
[0021] Simultaneously, vehicle status is read. Each vehicle status includes at least the vehicle identifier, data collection time, real-time location, driving direction, vehicle type, rated load, currently occupied load, rated volume, currently occupied volume, remaining available energy or remaining range, current task sequence, estimated task completion time, driving or operational restrictions, and availability status. The vehicle's available load is obtained by subtracting the currently occupied load from the rated load, and the vehicle's available volume is obtained by subtracting the currently occupied volume from the rated volume. For vehicles performing uninterrupted tasks, the remaining energy consumption required to complete the task is further predicted, and the net remaining available energy for new order matching is obtained by subtracting the predicted remaining energy consumption from the current remaining available energy.
[0022] Road status is stored by road segment. Each road segment records the road segment identifier, length, direction, real-time driving speed, historical driving speed, height restrictions, weight restrictions, vehicle type restrictions, prohibited hours, closure status, and data update time. For roads within the park, the availability of loading and unloading points and vehicle queue times can also be recorded. Each valid update to an order, vehicle, or road status monotonically increases its status version number. All version numbers used in a single calculation constitute the status version vector.
[0023] The collected data undergoes time benchmark unification, duplicate data deletion, outlier filtering, and missing value handling. When a vehicle's location point changes beyond a preset speed limit, the location data is marked as abnormal, and the previous valid location point is used. If real-time road speed is missing, historical speeds for the corresponding time period are used. If the vehicle status update time exceeds a preset timeout threshold, the vehicle is marked as unavailable and excluded from the candidate set. The preprocessing results are saved separately from the original data to facilitate locating changed data items when subsequent events occur.
[0024] like Figure 1 As shown, the candidate vehicle selection employs a hierarchical approach combining spatial and capability-based selection. First, the order pickup location is mapped to a spatial grid. Then, adjacent grids are expanded layer by layer around this spatial grid to obtain vehicles located within the maximum search radius. Expansion stops when the number of candidate vehicles reaches a preset limit and the lower bound of the estimated arrival time of the outermost grid is greater than the maximum allowable time among the current candidate vehicles. This stopping condition is designed to avoid missing vehicles with short road reachability times simply by using a fixed radius.
[0025] The vehicles selected through space screening undergo a first-level capability screening. This involves checking the vehicle's availability, model, cargo type compatibility, temperature control capability, available load capacity, and available volume. For orders involving hazardous materials, cold chain logistics, or those requiring dedicated loading / unloading interfaces, the vehicle's qualifications and the corresponding interface status are also checked. If any necessary capability is not met, the vehicle and order are removed from the candidate list.
[0026] For vehicles that pass the first-level screening, a second-level time screening is performed. If a vehicle is not currently performing a task, its current location is used as the starting point of a candidate path; if a vehicle is performing a task, its expected location and expected completion time after completing the uninterrupted task are used as the starting point of a candidate path. The earliest reachable time of the vehicle is calculated based on the candidate path starting point, the order pickup location, and the order pickup time window; if the earliest reachable time is later than the latest pickup time of the order, the corresponding candidate relationship is deleted.
[0027] For vehicles that pass the second-level screening, one or more candidate routes to the order pickup location are generated. Simultaneously, an order transportation route from pickup to delivery location is generated based on the order pickup and delivery locations. Both routes are then used together as the complete task execution path for road traffic constraint verification. The predicted speed for a road segment is obtained by fusing real-time speed and historical speeds from the same time period, calculated using the following formula: In the formula, Indicates road section Snapshot of the current state The predicted speed; Indicates real-time speed; Indicates historical speeds within the same time period; This represents the real-time speed fusion weight, with a value ranging from zero to one. When the real-time road data update time exceeds a preset time limit, the weight is reduced. When real-time data is continuous and stable, improve .
[0028] The estimated arrival time for vehicle v to fulfill order o is calculated using the following formula: In the formula, Indicates the remaining time for the vehicle to complete the current uninterruptible task; This indicates the target candidate path from the vehicle to the order pickup location; Indicates road section Length; This indicates the buffer time for waiting at intersections, parking, and queuing. Height restrictions, weight restrictions, vehicle type restrictions, prohibited hours, and closure status checks are applied to road sections within both the target candidate route and the order delivery route.
[0029] For each order-vehicle candidate relationship, calculate at least five constraint margins. The load constraint margin, volume constraint margin, pickup time constraint margin, delivery time constraint margin, and range constraint margin are calculated using the following formulas: In the formula, and These represent the vehicle's available load capacity and available volume, respectively. and These represent the weight and volume of the goods in the order, respectively. Indicates the latest possible pickup time for the order; Indicates the latest delivery time of the order; Indicates the current moment; Indicates the loading preparation time; This indicates the estimated total time from the current moment until the vehicle completes delivery and unloading along the full mission execution path; This indicates the vehicle's net remaining available energy, which is the current remaining available energy minus the predicted remaining energy required to complete the current uninterrupted task. This represents the predicted energy required for the vehicle to execute the order along the complete task execution path; This indicates that energy is being safely reserved. Time is measured in a uniform unit, while energy can be expressed as electricity, fuel equivalent, or converted driving range, depending on the vehicle type.
[0030] When any constraint margin is less than zero, the corresponding candidate relation is determined to be infeasible. For cases with multiple loading and unloading points or where vehicles are allowed to insert new orders along their routes, each allowed position of the order insertion into the vehicle's existing task sequence is treated as a candidate relation, and the time window margin and capacity margin of all tasks after the insertion position are recalculated; the insertion candidate relation is retained only if all affected tasks still satisfy the hard constraints.
[0031] like Figure 2 As shown, constraint validity certificates are generated for feasible candidate relations. Since there are prediction errors in vehicle arrival time, road speed, and task completion time, the prediction standard deviation σᵥ of the k-th constraint is first determined based on the prediction errors of the most recent state snapshots of the same road segment, the same time period, or the same vehicle. o When the sample size is insufficient, the historical standard deviation of the corresponding business area and time period is used, and a large fluctuation correction factor is set to avoid overestimating the duration when data is insufficient.
[0032] The conservative correction value for the constraint margin of the kth term is calculated according to the following formula: In the formula, Indicates the original constraint margin; Indicates the first Fluctuation correction factor for the constraint; Indicates the standard deviation of the forecast; This indicates the corrected constraint margin. For constraints with small changes in measurements such as load and volume, It can be lower; for constraints with large fluctuations, such as road time and energy prediction, It can be quite high.
[0033] To enable comparison of constraint margins in different units, the corrected constraint margins are normalized: In the formula, Indicates the first The scale parameter for the constraint can be either an allowable range or a historical quantile value; Indicates the first The safety threshold of the constraint is used to distinguish between effective states and critical states; It represents the first preset positive number to prevent the normalization denominator from being zero, and it has the same dimensions as the constraint scale; This represents the normalized residual space of the corrected constraint margin relative to the hard constraint zero boundary. The smaller the value, the closer the candidate relation is to the hard constraint boundary; when the corrected constraint margin is not greater than zero, Take zero.
[0034] Calculate the constraint margin descent rate based on adjacent state snapshots: In the formula, and These represent the normalized hard constraint remaining space in the previous state snapshot and the current state snapshot, respectively; This represents the time interval between two state snapshots; This indicates the descent rate for the remaining space below the hard constraint. When the margin increases, the descent rate is set to zero to prevent short-term improvements from leading to negative failure times.
[0035] The effective retention time of the order-vehicle candidate relationship is calculated according to the following formula: In the formula, Indicates the effective retention time of the candidate relationship; This indicates the preset upper limit for the hold time. The inner minimum value represents the minimum time required for the normalized hard constraint remaining space of each constraint to reach zero at the current descent rate, which is used as the effective hold time for the candidate relation. When When it is zero, As a second pre-set positive number with the same dimension as the descent rate, the calculation results remain finite, and are... Upper bound is set. Since the normalized hard constraint residual space is truncated by the original hard constraint zero boundary, the certificate can retain a positive effective hold time after entering the critical state until the expected hard constraint boundary is reached; the effective hold time will not become negative. In practical implementation, exponential smoothing can also be used for the most recent descent rates to suppress fluctuations in single measurements.
[0036] Each constraint validity certificate records at least the order identifier and order status version number, vehicle identifier and vehicle status version number, complete task execution path, status version number of each road segment in the complete task execution path, original constraint margin, corrected constraint margin, normalized hard constraint remaining space, descent rate, valid holding time, certificate generation time, last update time, and certificate status. The certificate status includes valid, critical, and invalid; when the certificate is first generated, the last update time is equal to the certificate generation time.
[0037] The certificate is valid when all corrected constraint margins are higher than the corresponding safety thresholds; it is in a critical state when at least one corrected constraint margin is not higher than the safety threshold but all original constraint margins are still not less than zero; and it is invalid when at least one original constraint margin is less than zero, the complete task execution path is unavailable, the order or vehicle on which the candidate relationship depends is cancelled, or the current time exceeds the sum of the certificate's most recent update time and the recalculated valid retention time. A critical state only indicates entry into a safety warning zone, which can increase the update frequency, but does not immediately trigger invalidation or switching.
[0038] During initial matching, the basic matching cost is calculated for each feasible candidate relation: In the formula, Indicates vehicle Matching orders The basic matching cost; , and These represent the normalized empty driving distance, estimated arrival time, and predicted energy consumption, respectively. The normalized effective holding time is the ratio of the effective holding time to the upper limit of the effective holding time and truncated to 0 to 1; the aforementioned normalized empty driving distance, estimated arrival time and predicted energy consumption are all converted according to the corresponding preset scale or historical quantile value and truncated to 0 to 1. to These are non-negative weights. The longer the effective retention time, the greater the weight in the formula. The smaller the value, the more likely it is to be selected as a candidate relationship with a longer duration when the basic costs are similar.
[0039] Under the conditions that each order is matched with at most one vehicle, the task execution time of the same vehicle does not conflict, vehicle capacity is not repeatedly occupied, and all hard constraints are met, an initial matching scheme can be obtained by using minimum cost flow, integer programming, bipartite graph matching, or order-by-order heuristic search. For high-priority orders that must be allocated on time, unallocated orders are set with a higher penalty cost; for orders that can be delayed, the unallocated state can be retained and matching can be triggered again in subsequent events.
[0040] like Figure 3As shown, an inverted event-certificate dependency index is built based on the order identifier, vehicle identifier, and road segment identifiers included in the complete task execution path in the certificate. The index includes at least the mapping from order to certificate, vehicle to certificate, and road segment to certificate. When the order weight, time window, or cancellation status changes, the certificate containing the order is directly obtained; when the vehicle location, available capacity, remaining energy, or fault status changes, the certificate containing the vehicle is obtained; when the road speed, traffic restriction, or closure status changes, the certificate for the road segment through which the complete task execution path passes is obtained.
[0041] Upon the arrival of an event, the event version is compared with the current state version, and older duplicate events are discarded. Then, only the data on which the affected certificate depends is recalculated. If the current state change does not cause any original constraint margin to be less than zero and the complete task execution path is still available, the normalized hard constraint remaining space, descent rate, and effective retention time are recalculated based on the updated constraint margins, and the certificate's most recent update time is updated to the current state update time. When a certificate only enters a critical state, the update frequency is increased without immediate reallocation. When any original constraint margin is less than zero, the complete task execution path is unavailable, or the certificate exceeds the updated effective retention time, the certificate is set to an invalid state, and the corresponding order and vehicle are added to the affected node set.
[0042] like Figure 4 As shown, the order and vehicle corresponding to the invalid certificate are the initial affected nodes, and the process expands alternately along the order-vehicle candidate relationship and the current allocation relationship. For affected orders, alternative candidate vehicles that are still valid or can be regenerated are added; for newly added vehicles, orders that the vehicle is currently allocated to and whose task time may be affected are added; for newly added orders, other candidate vehicles are added. Each time a node is added, the validity of adjacent certificates is checked.
[0043] Alternating expansion stops when any of the following conditions are met: no new nodes are generated; the number of expanded nodes reaches a preset upper limit; or the effective retention time of all certificates at the expansion boundary is greater than the stability threshold and there are no shared road segments with the affected constraints. The first two stopping conditions are used to control the computational scale in the worst case; if the node upper limit is reached but the boundary is still unstable, the local range can be expanded once, and only when it still cannot be closed will it switch to full matching. The original matching relationships outside the local subgraph remain unchanged in this calculation.
[0044] When solving for the locally rematched subgraph, in addition to the basic matching cost, a short effective hold time penalty and a matching change penalty are added. The objective function is: In the formula, Indicates the local matching scheme; Let it be a binary variable, with one representing a vehicle. Matching orders A value of zero indicates no match; Indicates the basic matching cost; Indicates the effective holding time; Indicates the variables in the original matching scheme; ε3 represents the penalty weight for short holding time; ε3 represents a third pre-set positive number with the same dimension as the effective holding time. This indicates the matching change weight. The absolute value term is used to count the allocation edges that change from zero to one or from one to zero, thereby suppressing unnecessary vehicle switching.
[0045] Candidate optimization solutions should satisfy the following conditions: unique order allocation within a local subgraph, no conflicting vehicle task time slots, no duplicate occupation of vehicle capacity, passable complete task execution path, and all order time windows can be satisfied, so that the objective function is optimized. The minimum solution can be found using integer programming. When there are many local nodes and a fast response is required, the original allocation edges with a longer effective holding time can be locked first, and then augmenting paths can be used to solve the remaining orders.
[0046] To avoid matching oscillations caused by slight data fluctuations, the improvement of the objective function of the candidate optimization scheme relative to the original matching scheme is calculated: In the formula, This represents the improvement in the objective function; and These represent the original matching scheme and the candidate optimization scheme, respectively. When the original matching scheme violates the hard constraints, the hysteresis constraint is not applied, and a feasible candidate optimization scheme is directly adopted; when the original matching scheme is still feasible, only... A switch is only executed if the minimum effective retention time of the candidate optimization solution is not less than the revenue threshold, and the increase in the minimum effective retention time of the candidate optimization solution relative to the original matching solution is not less than the retention threshold. Otherwise, the original matching solution is retained and its certificate is updated.
[0047] Revenue thresholds and retention thresholds can be set based on order priority. High-priority orders that are close to the latest pickup time use lower revenue thresholds to prioritize feasibility; ordinary orders use higher revenue thresholds to reduce frequent switching. When a vehicle has accepted a task and is approaching the pickup location, a vehicle switching lock period can be added; the lock is only released when the original matching scheme fails or a vehicle malfunctions.
[0048] like Figure 5As shown, a version consistency check is performed before writing the target matching scheme. The current status version number of the involved orders, vehicles, and road segments is reread and compared item by item with the status version vector used in this solution and the version recorded in the certificate. If any version is different, it means that the corresponding status has changed during the matching calculation. The result is not included in the logistics task data, but the affected certificate is relocated based on the changed item.
[0049] When versions are consistent, conditional locking is performed on the relevant order records and vehicle available resource records, and the consistency of the status version number of the involved road segments is used as the transaction commit condition. Conditional locking is premised on the record version number not changing, the order not being occupied by other batches, and the corresponding task time slot of the vehicle not being locked. Before transaction commit, the current status version number of the involved road segments is atomically compared with the version number used in this solution. Only when the road versions are still consistent, the order and vehicle matching relationship, complete task execution path, estimated arrival time, effective hold time, task sequence position, and matching batch identifier are written in the same transaction. If any condition update or version comparison fails, the entire transaction is rolled back, thereby avoiding writing tasks based on expired road states and avoiding the simultaneous allocation of the same vehicle time slot to conflicting orders.
[0050] After the task is successfully written, a logistics task is sent to the target vehicle, and the sending time, task version, and confirmation deadline are recorded. When the vehicle returns an acceptance message, the task status is updated to confirmed. If the vehicle rejects the task, fails to return a message before the confirmation deadline, reports a fault, or continuously deviates from the complete task execution path, an abnormal feedback event is generated, the corresponding certificate is invalidated, and a local re-match is triggered according to the event-certificate dependency index. During vehicle execution, the actual arrival time, loading / unloading completion time, and road travel time are continuously updated. This data is also used to update the prediction error standard deviation.
[0051] Here is a specific calculation example. An order for goods weighs 8 tons and has a volume of 28 cubic meters. The goods must be picked up within 60 minutes of the current time, with a loading preparation time of 5 minutes. A candidate vehicle has an available load capacity of 10 tons and an available volume of 35 cubic meters. It requires 10 minutes to complete the current uninterrupted task and 30 minutes to travel from the expected task completion location to the pickup location. Therefore, the load constraint margin is 2 tons, the volume constraint margin is 7 cubic meters, and the pickup time constraint margin is 15 minutes. If the forecast time standard deviation is 4 minutes and the time constraint fluctuation correction factor is 1.5, then the corrected pickup time constraint margin is 9 minutes.
[0052] Assuming a time constraint scale of 15 minutes, a time constraint safety threshold of 1.5 minutes, and that the first preset positive number is negligible relative to the scale, the normalized remaining space of the corrected 9-minute time margin relative to the hard constraint zero boundary is approximately 0.6. The previous state snapshot corresponds to a value of 0.8, and the interval between the two snapshots is 5 minutes, so the rate of decrease in the hard constraint remaining space is approximately 0.04 per minute. When the second preset positive number is much less than 0.04 per minute, the effective retention time is limited by the time dimension to approximately 15 minutes. Since the corrected time margin of 9 minutes is still higher than the 1.5-minute safety threshold, the certificate is in a valid state. If the subsequent corrected time margin drops to no more than 1.5 minutes but the original time margin is still not less than zero, the certificate enters a critical state. At this time, the effective retention time is recalculated based on the remaining space reaching the hard constraint zero boundary, and does not immediately return to zero due to entering the critical state. If any road segment in the subsequent complete task execution path experiences a closure event, the dependency index from the road segment to the certificate directly locates the candidate relationship and sets the path availability to invalid, without needing to re-examine all orders and vehicles. The local subgraph is expanded to other candidate vehicles for the order and the orders to which these vehicles have been assigned. Alternative solutions are then obtained before hysteresis and version verification are performed.
[0053] In another implementation, for gasoline-powered vehicles, the range constraint margin is replaced by the difference between the remaining fuel-supported mileage and the expected execution mileage plus the safe mileage; for new energy vehicles, the electricity required to perform the task is predicted based on road gradient, load, temperature, and historical energy consumption per unit mileage. Both types of vehicles can be compared using a unified normalized range margin within the same candidate set, but their respective original energy prediction models are calculated separately.
[0054] In another implementation, road status events are handled according to their impact level. Road closures, changes in height and weight restrictions, and the activation of restricted hours are considered mandatory failure events, directly rendering the entire task execution path dependent on that road segment invalid. Changes in road speed are considered numerical update events, requiring the recalculation of pickup time margin, delivery time margin, and remaining range margin. This approach not only handles impassable events promptly but also avoids meaningless task switching caused by ordinary speed noise.
[0055] In other implementations, spatial grid filtering can be replaced by road network proximity search, and target candidate paths can be obtained through A-star search, bidirectional search, or time-varying shortest path algorithms. Local optimization can be solved through minimum cost flow, integer programming, or heuristic augmentation. These substitutions do not change the core technical concept of determining the effective retention time of candidate relationships using multidimensional constraint margins, locating affected relationships based on event dependencies, performing stable re-matching within a local scope, and committing version consistency.
[0056] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A vehicle intelligent matching method for logistics orders, characterized in that, include: Acquire logistics order data, vehicle status data, and road status data, and generate order status snapshots, vehicle status snapshots, and road status snapshots with status version numbers respectively; Vehicles are filtered by spatial range and transportation capacity to form order-vehicle candidate relationships. For each order-vehicle candidate relationship, a complete task execution path is determined, which includes at least the candidate path from the vehicle to the order pickup location and the order transportation path from the order pickup location to the delivery location. The multidimensional constraint margin of each order-vehicle candidate relationship is calculated, and order-vehicle candidate relationships that do not meet the hard constraints are deleted. The constraint margin is corrected based on the predicted fluctuations of each constraint margin. The constraint margin decrease rate is determined based on the change of the corrected constraint margin between adjacent state snapshots. The effective maintenance time of the order-vehicle candidate relationship is determined based on the corrected constraint margin and the constraint margin decrease rate, and a constraint validity certificate is generated. Establish a dependency index between state change events and constraint validity certificates based on the order, vehicle, and complete task execution path in the constraint validity certificate; In response to changes in order status, vehicle status, or road status, the affected constraint validity certificate is located based on the dependency index, and when the affected constraint validity certificate expires, a local rematch subgraph is constructed along the alternating relationship between the affected order, candidate vehicle, and the currently assigned order of the candidate vehicle. Candidate optimization schemes are determined based on the matching cost, effective retention time, and matching change amount of each order-vehicle candidate relationship in the local rematching subgraph. The target matching scheme is then determined from the candidate optimization schemes and the original matching schemes according to the hysteresis switching condition, wherein the hysteresis switching condition includes a revenue threshold and a retention threshold. The status version number used by the target matching scheme is compared with the current status version number. If they match, the target matching scheme is atomically written into the logistics task data, and the corresponding logistics task is sent to the target vehicle.
2. The intelligent vehicle matching method for logistics orders according to claim 1, characterized in that, The logistics order data includes order identifier, pickup location, delivery location, pickup time window, delivery time window, cargo weight, cargo volume, cargo type, vehicle type requirements, temperature control requirements, and loading and unloading time. The vehicle status data includes vehicle identification, real-time location, driving direction, vehicle type, available load capacity, available volume, remaining range, task sequence, estimated task completion time, and available status. The road status data includes road segment identification, road segment length, real-time driving speed, historical driving speed, height restriction conditions, weight restriction conditions, vehicle type restrictions, prohibited driving periods, and closure status.
3. The intelligent vehicle matching method for logistics orders according to claim 1, characterized in that, The formation of the order-vehicle candidate relationship includes: Centered on the spatial grid where the order's pickup location is located, expand the adjacent spatial grids according to the preset search radius to obtain vehicles within the expanded range; The first layer of screening is based on vehicle availability, vehicle type, cargo type compatibility, and temperature control capability. The second layer of screening is based on the estimated completion time of the vehicle's current task, the estimated time of the vehicle's arrival at the pickup location, and the order pickup time window. For vehicles that pass the second-level screening, at least one candidate route to the pickup location is generated, and the target candidate route is determined based on road traffic constraints and estimated arrival time. The order transportation route is generated based on the pickup and delivery locations of the order. The target candidate route and the order transportation route are combined to form a complete task execution path, and road traffic constraint verification is performed on the complete task execution path.
4. The intelligent vehicle matching method for logistics orders according to claim 3, characterized in that, The multidimensional constraint margin includes at least load capacity constraint margin, volume constraint margin, pickup time constraint margin, delivery time constraint margin, and range constraint margin. Among them, the load constraint margin is the difference between the vehicle's available load capacity and the weight of the ordered goods; the volume constraint margin is the difference between the vehicle's available volume and the volume of the ordered goods; the pickup time constraint margin is the difference between the latest pickup time of the order and the estimated time when the vehicle arrives at the pickup location and completes loading preparation; the delivery time constraint margin is the difference between the latest delivery time of the order and the estimated time when the vehicle arrives at the delivery location along the order's transportation path after pickup and completes unloading; and the range constraint margin is the difference between the vehicle's net remaining available energy and the energy required to execute the complete task execution path plus the safety reserve energy; the vehicle's net remaining available energy is the vehicle's current remaining available energy minus the estimated remaining energy required to complete the current uninterrupted task. If any of the aforementioned constraint margins is less than zero, or if any road segment in the complete task execution path violates height restrictions, weight restrictions, vehicle type restrictions, prohibited hours, or closure status, the corresponding order-vehicle candidate relationship will be determined as not satisfying the hard constraints.
5. The intelligent vehicle matching method for logistics orders according to claim 4, characterized in that, The corrected constraint margin, normalized hard constraint remaining space, constraint margin descent rate, and effective holding time are determined according to the following formulas: In the formula, Indicates a vehicle. Indicates an order. Indicates the constraint dimension. This represents the original constraint margin. This represents the prediction standard deviation of the corresponding constraint quantity. This represents the volatility correction factor. This indicates the adjusted constraint margin. Indicates the first Safety threshold of the constraint, Indicates the constraint scale. ε1 represents the first preset positive number used for normalizing the denominator and has the same dimension as the constraint scale; ε2 represents the second preset positive number used to effectively preserve the time denominator and has the dimension of the reciprocal of time. This represents the normalized residual space relative to the hard-constrained boundary. Indicates the state snapshot sequence number. This represents the time interval between adjacent state snapshots. This indicates the rate at which the constraint margin decreases. Indicates the effective holding time. This indicates the maximum effective holding time.
6. The intelligent vehicle matching method for logistics orders according to claim 5, characterized in that, The constraint validity certificate includes an order identifier and order status version number, a vehicle identifier and vehicle status version number, a complete task execution path, status version numbers of the road segments included in the complete task execution path, original constraint margin, corrected constraint margin, constraint margin decrease rate, valid retention time, certificate generation time, and last update time; when the certificate is generated, the last update time is set to the certificate generation time. When all corrected constraint margins are higher than the corresponding safety thresholds, the constraint validity certificate is determined to be in a valid state; when at least one corrected constraint margin is not higher than the corresponding safety threshold and all original constraint margins are not less than zero, the constraint validity certificate is determined to be in a critical state; when at least one original constraint margin is less than zero, the complete task execution path is unavailable, or the time elapsed since the most recent update time exceeds the recalculated valid retention time, the constraint validity certificate is determined to be in an invalid state.
7. The intelligent vehicle matching method for logistics orders according to claim 6, characterized in that, Constructing the local rematching subgraph includes: The order and vehicle corresponding to the expired constraint validity certificate are taken as the initial affected nodes, and the alternative candidate vehicles of the order, the orders currently assigned to the alternative candidate vehicles, and other candidate vehicles of the assigned orders are added. Repeatedly expand along the order-vehicle candidate relationship and the current allocation relationship until no new nodes are generated, or the validity period of all constraint validity certificates at the expansion boundary is greater than the preset stability threshold and the boundary candidate relationship and the affected constraints do not have a common road segment dependency; The expanded orders, vehicles, and their candidate relationships constitute the local rematching subgraph, while keeping the original matching relationships outside the local rematching subgraph unchanged.
8. The intelligent vehicle matching method for logistics orders according to claim 7, characterized in that, The objective function of the local rematching subgraph is determined according to the following formula: In the formula, Indicates the matching scheme. To indicate vehicles Does the order match? binary variables, Indicates the basic matching cost. Indicates the effective holding time. This represents the matching variable in the original matching scheme. This indicates the penalty weight for short hold time. This indicates a change in matching weights. The third presupposed positive number represents the same dimension as the effective holding time; Under the conditions that each order matches at most one vehicle, the task time of the same vehicle does not conflict, and all hard constraints are satisfied, determine the candidate optimization scheme that minimizes the objective function. When the original matching scheme is not feasible, the candidate optimized scheme is determined as the target matching scheme; When the original matching scheme is still feasible, the candidate optimization scheme is determined as the target matching scheme only when the improvement of the objective function is not less than a preset profit threshold and the increase of the minimum effective retention time of the candidate optimization scheme relative to the minimum effective retention time of the original matching scheme is not less than a preset retention threshold.
9. A vehicle intelligent matching method for logistics orders according to claim 8, characterized in that, The process of atomically writing the target matching scheme into the logistics task data includes: Reread the current status version number of the order, vehicle and road segment involved in the target matching scheme, and compare it with the status version number recorded in the corresponding constraint validity certificate; When the status version numbers are consistent, condition locking is performed on the corresponding orders and vehicles, and the consistency of the status version numbers of the involved road segments is used as the transaction commit condition. Before the same transaction commits, the road segment version comparison is performed again. If the versions are still consistent, the matching vehicle, complete task execution path, estimated arrival time, effective hold time, and matching batch identifier are written. If the status version numbers are inconsistent, the road segment version comparison is inconsistent before the commit, or the condition locking fails, the writing is terminated, the affected constraint validity period certificate is located, and the local rematch subgraph is recalculated. Receive task confirmation information from the target vehicle; when the target vehicle rejects the task, communication times out, vehicle malfunctions, or deviates from the complete task execution path, determine the corresponding constraint validity certificate as invalid and trigger the corresponding local rematch.
